diff --git a/api/main.py b/api/main.py
index 6278f053..4e3bdbfb 100644
--- a/api/main.py
+++ b/api/main.py
@@ -9,6 +9,7 @@
from fastapi.encoders import jsonable_encoder
from fastapi.exceptions import RequestValidationError
from fastapi.middleware.cors import CORSMiddleware
+from fastapi.routing import APIRoute
from starlette.responses import RedirectResponse
from starlette.exceptions import HTTPException as StarletteHTTPException
@@ -173,6 +174,11 @@ async def update_user_setting(setting: UserSetting, user: User = Depends(authent
from ee.api import ai_optimisations
app.include_router(ai_optimisations.router)
+for route in app.routes:
+ if not isinstance(route, APIRoute):
+ continue
+
+ route.operation_id = route.name
if __name__ == '__main__':
app.run() # pylint: disable=no-member
diff --git a/frontend/js/api/.babelrc b/frontend/js/api/.babelrc
new file mode 100644
index 00000000..c73df9d5
--- /dev/null
+++ b/frontend/js/api/.babelrc
@@ -0,0 +1,33 @@
+{
+ "presets": [
+ "@babel/preset-env"
+ ],
+ "plugins": [
+ "@babel/plugin-syntax-dynamic-import",
+ "@babel/plugin-syntax-import-meta",
+ "@babel/plugin-proposal-class-properties",
+ "@babel/plugin-proposal-json-strings",
+ [
+ "@babel/plugin-proposal-decorators",
+ {
+ "legacy": true
+ }
+ ],
+ "@babel/plugin-proposal-function-sent",
+ "@babel/plugin-proposal-export-namespace-from",
+ "@babel/plugin-proposal-numeric-separator",
+ "@babel/plugin-proposal-throw-expressions",
+ "@babel/plugin-proposal-export-default-from",
+ "@babel/plugin-proposal-logical-assignment-operators",
+ "@babel/plugin-proposal-optional-chaining",
+ [
+ "@babel/plugin-proposal-pipeline-operator",
+ {
+ "proposal": "minimal"
+ }
+ ],
+ "@babel/plugin-proposal-nullish-coalescing-operator",
+ "@babel/plugin-proposal-do-expressions",
+ "@babel/plugin-proposal-function-bind"
+ ]
+}
diff --git a/frontend/js/api/.gitignore b/frontend/js/api/.gitignore
new file mode 100644
index 00000000..6a7d6d8e
--- /dev/null
+++ b/frontend/js/api/.gitignore
@@ -0,0 +1,130 @@
+# Logs
+logs
+*.log
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+lerna-debug.log*
+.pnpm-debug.log*
+
+# Diagnostic reports (https://nodejs.org/api/report.html)
+report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
+
+# Runtime data
+pids
+*.pid
+*.seed
+*.pid.lock
+
+# Directory for instrumented libs generated by jscoverage/JSCover
+lib-cov
+
+# Coverage directory used by tools like istanbul
+coverage
+*.lcov
+
+# nyc test coverage
+.nyc_output
+
+# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
+.grunt
+
+# Bower dependency directory (https://bower.io/)
+bower_components
+
+# node-waf configuration
+.lock-wscript
+
+# Compiled binary addons (https://nodejs.org/api/addons.html)
+build/Release
+
+# Dependency directories
+node_modules/
+jspm_packages/
+
+# Snowpack dependency directory (https://snowpack.dev/)
+web_modules/
+
+# TypeScript cache
+*.tsbuildinfo
+
+# Optional npm cache directory
+.npm
+
+# Optional eslint cache
+.eslintcache
+
+# Optional stylelint cache
+.stylelintcache
+
+# Microbundle cache
+.rpt2_cache/
+.rts2_cache_cjs/
+.rts2_cache_es/
+.rts2_cache_umd/
+
+# Optional REPL history
+.node_repl_history
+
+# Output of 'npm pack'
+*.tgz
+
+# Yarn Integrity file
+.yarn-integrity
+
+# dotenv environment variable files
+.env
+.env.development.local
+.env.test.local
+.env.production.local
+.env.local
+
+# parcel-bundler cache (https://parceljs.org/)
+.cache
+.parcel-cache
+
+# Next.js build output
+.next
+out
+
+# Nuxt.js build / generate output
+.nuxt
+dist
+
+# Gatsby files
+.cache/
+# Comment in the public line in if your project uses Gatsby and not Next.js
+# https://nextjs.org/blog/next-9-1#public-directory-support
+# public
+
+# vuepress build output
+.vuepress/dist
+
+# vuepress v2.x temp and cache directory
+.temp
+.cache
+
+# Docusaurus cache and generated files
+.docusaurus
+
+# Serverless directories
+.serverless/
+
+# FuseBox cache
+.fusebox/
+
+# DynamoDB Local files
+.dynamodb/
+
+# TernJS port file
+.tern-port
+
+# Stores VSCode versions used for testing VSCode extensions
+.vscode-test
+
+# yarn v2
+.yarn/cache
+.yarn/unplugged
+.yarn/build-state.yml
+.yarn/install-state.gz
+.pnp.*
\ No newline at end of file
diff --git a/frontend/js/api/.openapi-generator-ignore b/frontend/js/api/.openapi-generator-ignore
new file mode 100644
index 00000000..7484ee59
--- /dev/null
+++ b/frontend/js/api/.openapi-generator-ignore
@@ -0,0 +1,23 @@
+# OpenAPI Generator Ignore
+# Generated by openapi-generator https://github.com/openapitools/openapi-generator
+
+# Use this file to prevent files from being overwritten by the generator.
+# The patterns follow closely to .gitignore or .dockerignore.
+
+# As an example, the C# client generator defines ApiClient.cs.
+# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
+#ApiClient.cs
+
+# You can match any string of characters against a directory, file or extension with a single asterisk (*):
+#foo/*/qux
+# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
+
+# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
+#foo/**/qux
+# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
+
+# You can also negate patterns with an exclamation (!).
+# For example, you can ignore all files in a docs folder with the file extension .md:
+#docs/*.md
+# Then explicitly reverse the ignore rule for a single file:
+#!docs/README.md
diff --git a/frontend/js/api/.openapi-generator/FILES b/frontend/js/api/.openapi-generator/FILES
new file mode 100644
index 00000000..dacc488b
--- /dev/null
+++ b/frontend/js/api/.openapi-generator/FILES
@@ -0,0 +1,40 @@
+.babelrc
+.gitignore
+.openapi-generator-ignore
+.travis.yml
+README.md
+git_push.sh
+mocha.opts
+package.json
+src/ApiClient.js
+src/api/DefaultApi.js
+src/index.js
+src/model/CIMeasurement.js
+src/model/CIMeasurementOld.js
+src/model/CarbonIntensityG.js
+src/model/CarbonUg.js
+src/model/CbCompanyUuid.js
+src/model/CbMachineUuid.js
+src/model/CbProjectUuid.js
+src/model/City.js
+src/model/Co2Eq.js
+src/model/Co2I.js
+src/model/Email.js
+src/model/FilterMachine.js
+src/model/FilterProject.js
+src/model/FilterTags.js
+src/model/FilterType.js
+src/model/HTTPValidationError.js
+src/model/ImageUrl.js
+src/model/Ip.js
+src/model/JobChange.js
+src/model/Lat.js
+src/model/Lon.js
+src/model/Note.js
+src/model/ProjectId.js
+src/model/Software.js
+src/model/UsageScenarioVariables.js
+src/model/UserSetting.js
+src/model/ValidationError.js
+src/model/ValidationErrorLocInner.js
+src/model/Value.js
diff --git a/frontend/js/api/.openapi-generator/VERSION b/frontend/js/api/.openapi-generator/VERSION
new file mode 100644
index 00000000..eb1dc6a5
--- /dev/null
+++ b/frontend/js/api/.openapi-generator/VERSION
@@ -0,0 +1 @@
+7.13.0
diff --git a/frontend/js/api/.travis.yml b/frontend/js/api/.travis.yml
new file mode 100644
index 00000000..0968f7a4
--- /dev/null
+++ b/frontend/js/api/.travis.yml
@@ -0,0 +1,5 @@
+language: node_js
+cache: npm
+node_js:
+ - "6"
+ - "6.1"
diff --git a/frontend/js/api/README.md b/frontend/js/api/README.md
new file mode 100644
index 00000000..5d9c31e5
--- /dev/null
+++ b/frontend/js/api/README.md
@@ -0,0 +1,211 @@
+# fast_api
+
+FastApi - JavaScript client for fast_api
+No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
+
+- API version: 0.1.0
+- Package version: 0.1.0
+- Generator version: 7.13.0
+- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen
+
+## Installation
+
+### For [Node.js](https://nodejs.org/)
+
+#### npm
+
+To publish the library as a [npm](https://www.npmjs.com/), please follow the procedure in ["Publishing npm packages"](https://docs.npmjs.com/getting-started/publishing-npm-packages).
+
+Then install it via:
+
+```shell
+npm install fast_api --save
+```
+
+Finally, you need to build the module:
+
+```shell
+npm run build
+```
+
+##### Local development
+
+To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing `package.json` (and this README). Let's call this `JAVASCRIPT_CLIENT_DIR`. Then run:
+
+```shell
+npm install
+```
+
+Next, [link](https://docs.npmjs.com/cli/link) it globally in npm with the following, also from `JAVASCRIPT_CLIENT_DIR`:
+
+```shell
+npm link
+```
+
+To use the link you just defined in your project, switch to the directory you want to use your fast_api from, and run:
+
+```shell
+npm link /path/to/
+* An AMD (recommended!) or CommonJS application will generally do something equivalent to the following:
+* param
.
+ */
+ paramToString(param) {
+ if (param == undefined || param == null) {
+ return '';
+ }
+ if (param instanceof Date) {
+ return param.toJSON();
+ }
+ if (ApiClient.canBeJsonified(param)) {
+ return JSON.stringify(param);
+ }
+
+ return param.toString();
+ }
+
+ /**
+ * Returns a boolean indicating if the parameter could be JSON.stringified
+ * @param param The actual parameter
+ * @returns {Boolean} Flag indicating if param
can be JSON.stringified
+ */
+ static canBeJsonified(str) {
+ if (typeof str !== 'string' && typeof str !== 'object') return false;
+ try {
+ const type = str.toString();
+ return type === '[object Object]'
+ || type === '[object Array]';
+ } catch (err) {
+ return false;
+ }
+ };
+
+ /**
+ * Builds full URL by appending the given path to the base URL and replacing path parameter place-holders with parameter values.
+ * NOTE: query parameters are not handled here.
+ * @param {String} path The path to append to the base URL.
+ * @param {Object} pathParams The parameter values to append.
+ * @param {String} apiBasePath Base path defined in the path, operation level to override the default one
+ * @returns {String} The encoded path with parameter values substituted.
+ */
+ buildUrl(path, pathParams, apiBasePath) {
+ if (!path.match(/^\//)) {
+ path = '/' + path;
+ }
+
+ var url = this.basePath + path;
+
+ // use API (operation, path) base path if defined
+ if (apiBasePath !== null && apiBasePath !== undefined) {
+ url = apiBasePath + path;
+ }
+
+ url = url.replace(/\{([\w-\.#]+)\}/g, (fullMatch, key) => {
+ var value;
+ if (pathParams.hasOwnProperty(key)) {
+ value = this.paramToString(pathParams[key]);
+ } else {
+ value = fullMatch;
+ }
+
+ return encodeURIComponent(value);
+ });
+
+ return url;
+ }
+
+ /**
+ * Checks whether the given content type represents JSON.
+ * JSON content type examples:
+ *
+ *
+ * @param {String} contentType The MIME content type to check.
+ * @returns {Boolean} true
if contentType
represents JSON, otherwise false
.
+ */
+ isJsonMime(contentType) {
+ return Boolean(contentType != null && contentType.match(/^application\/json(;.*)?$/i));
+ }
+
+ /**
+ * Chooses a content type from the given array, with JSON preferred; i.e. return JSON if included, otherwise return the first.
+ * @param {Array.true
if param
represents a file.
+ */
+ isFileParam(param) {
+ // fs.ReadStream in Node.js and Electron (but not in runtime like browserify)
+ if (typeof require === 'function') {
+ let fs;
+ try {
+ fs = require('fs');
+ } catch (err) {}
+ if (fs && fs.ReadStream && param instanceof fs.ReadStream) {
+ return true;
+ }
+ }
+
+ // Buffer in Node.js
+ if (typeof Buffer === 'function' && param instanceof Buffer) {
+ return true;
+ }
+
+ // Blob in browser
+ if (typeof Blob === 'function' && param instanceof Blob) {
+ return true;
+ }
+
+ // File in browser (it seems File object is also instance of Blob, but keep this for safe)
+ if (typeof File === 'function' && param instanceof File) {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Normalizes parameter values:
+ *
+ *
+ * @param {Object.param
as is if collectionFormat
is multi
.
+ */
+ buildCollectionParam(param, collectionFormat) {
+ if (param == null) {
+ return null;
+ }
+ switch (collectionFormat) {
+ case 'csv':
+ return param.map(this.paramToString, this).join(',');
+ case 'ssv':
+ return param.map(this.paramToString, this).join(' ');
+ case 'tsv':
+ return param.map(this.paramToString, this).join('\t');
+ case 'pipes':
+ return param.map(this.paramToString, this).join('|');
+ case 'multi':
+ //return the array directly as SuperAgent will handle it as expected
+ return param.map(this.paramToString, this);
+ case 'passthrough':
+ return param;
+ default:
+ throw new Error('Unknown collection format: ' + collectionFormat);
+ }
+ }
+
+ /**
+ * Applies authentication headers to the request.
+ * @param {Object} request The request object created by a superagent()
call.
+ * @param {Array.data
will be converted to this type.
+ * @returns A value of the specified type.
+ */
+ deserialize(response, returnType) {
+ if (response == null || returnType == null || response.status == 204) {
+ return null;
+ }
+
+ // Rely on SuperAgent for parsing response body.
+ // See http://visionmedia.github.io/superagent/#parsing-response-bodies
+ var data = response.body;
+ if (data == null || (typeof data === 'object' && typeof data.length === 'undefined' && !Object.keys(data).length)) {
+ // SuperAgent does not always produce a body; use the unparsed response as a fallback
+ data = response.text;
+ }
+
+ return ApiClient.convertToType(data, returnType);
+ }
+
+
+ /**
+ * Invokes the REST service using the supplied settings and parameters.
+ * @param {String} path The base URL to invoke.
+ * @param {String} httpMethod The HTTP method to use.
+ * @param {Object.
data
will be converted to this type.
+ * @returns An instance of the specified type or null or undefined if data is null or undefined.
+ */
+ static convertToType(data, type) {
+ if (data === null || data === undefined)
+ return data
+
+ switch (type) {
+ case 'Boolean':
+ return Boolean(data);
+ case 'Integer':
+ return parseInt(data, 10);
+ case 'Number':
+ return parseFloat(data);
+ case 'String':
+ return String(data);
+ case 'Date':
+ return ApiClient.parseDate(String(data));
+ case 'Blob':
+ return data;
+ default:
+ if (type === Object) {
+ // generic object, return directly
+ return data;
+ } else if (typeof type.constructFromObject === 'function') {
+ // for model type like User and enum class
+ return type.constructFromObject(data);
+ } else if (Array.isArray(type)) {
+ // for array type like: ['String']
+ var itemType = type[0];
+
+ return data.map((item) => {
+ return ApiClient.convertToType(item, itemType);
+ });
+ } else if (typeof type === 'object') {
+ // for plain object type like: {'String': 'Integer'}
+ var keyType, valueType;
+ for (var k in type) {
+ if (type.hasOwnProperty(k)) {
+ keyType = k;
+ valueType = type[k];
+ break;
+ }
+ }
+
+ var result = {};
+ for (var k in data) {
+ if (data.hasOwnProperty(k)) {
+ var key = ApiClient.convertToType(k, keyType);
+ var value = ApiClient.convertToType(data[k], valueType);
+ result[key] = value;
+ }
+ }
+
+ return result;
+ } else {
+ // for unknown type, return the data directly
+ return data;
+ }
+ }
+ }
+
+ /**
+ * Gets an array of host settings
+ * @returns An array of host settings
+ */
+ hostSettings() {
+ return [
+ {
+ 'url': "",
+ 'description': "No description provided",
+ }
+ ];
+ }
+
+ getBasePathFromSettings(index, variables={}) {
+ var servers = this.hostSettings();
+
+ // check array index out of bound
+ if (index < 0 || index >= servers.length) {
+ throw new Error("Invalid index " + index + " when selecting the host settings. Must be less than " + servers.length);
+ }
+
+ var server = servers[index];
+ var url = server['url'];
+
+ // go through variable and assign a value
+ for (var variable_name in server['variables']) {
+ if (variable_name in variables) {
+ let variable = server['variables'][variable_name];
+ if ( !('enum_values' in variable) || variable['enum_values'].includes(variables[variable_name]) ) {
+ url = url.replace("{" + variable_name + "}", variables[variable_name]);
+ } else {
+ throw new Error("The variable `" + variable_name + "` in the host URL has invalid value " + variables[variable_name] + ". Must be " + server['variables'][variable_name]['enum_values'] + ".");
+ }
+ } else {
+ // use default value
+ url = url.replace("{" + variable_name + "}", server['variables'][variable_name]['default_value'])
+ }
+ }
+ return url;
+ }
+
+ /**
+ * Constructs a new map or array model from REST data.
+ * @param data {Object|Array} The REST data.
+ * @param obj {Object|Array} The target object or array.
+ */
+ static constructFromObject(data, obj, itemType) {
+ if (Array.isArray(data)) {
+ for (var i = 0; i < data.length; i++) {
+ if (data.hasOwnProperty(i))
+ obj[i] = ApiClient.convertToType(data[i], itemType);
+ }
+ } else {
+ for (var k in data) {
+ if (data.hasOwnProperty(k))
+ obj[k] = ApiClient.convertToType(data[k], itemType);
+ }
+ }
+ };
+}
+
+/**
+ * Enumeration of collection format separator strategies.
+ * @enum {String}
+ * @readonly
+ */
+ApiClient.CollectionFormatEnum = {
+ /**
+ * Comma-separated values. Value:
csv
+ * @const
+ */
+ CSV: ',',
+
+ /**
+ * Space-separated values. Value: ssv
+ * @const
+ */
+ SSV: ' ',
+
+ /**
+ * Tab-separated values. Value: tsv
+ * @const
+ */
+ TSV: '\t',
+
+ /**
+ * Pipe(|)-separated values. Value: pipes
+ * @const
+ */
+ PIPES: '|',
+
+ /**
+ * Native array. Value: multi
+ * @const
+ */
+ MULTI: 'multi'
+};
+
+/**
+* The default API client implementation.
+* @type {module:ApiClient}
+*/
+ApiClient.instance = new ApiClient();
+export default ApiClient;
diff --git a/frontend/js/api/src/api/DefaultApi.js b/frontend/js/api/src/api/DefaultApi.js
new file mode 100644
index 00000000..8afff8fe
--- /dev/null
+++ b/frontend/js/api/src/api/DefaultApi.js
@@ -0,0 +1,1810 @@
+/**
+ * FastAPI
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+
+import ApiClient from "../ApiClient";
+import CIMeasurement from '../model/CIMeasurement';
+import CIMeasurementOld from '../model/CIMeasurementOld';
+import HTTPValidationError from '../model/HTTPValidationError';
+import JobChange from '../model/JobChange';
+import Software from '../model/Software';
+import UserSetting from '../model/UserSetting';
+
+/**
+* Default service.
+* @module api/DefaultApi
+* @version 0.1.0
+*/
+export default class DefaultApi {
+
+ /**
+ * Constructs a new DefaultApi.
+ * @alias module:api/DefaultApi
+ * @class
+ * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
+ * default to {@link module:ApiClient#instance} if unspecified.
+ */
+ constructor(apiClient) {
+ this.apiClient = apiClient || ApiClient.instance;
+ }
+
+
+
+ /**
+ * Compare In Repo
+ * @param {String} ids
+ * @param {Object} opts Optional parameters
+ * @param {String} [forceMode]
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
+ */
+ compareInRepoWithHttpInfo(ids, opts) {
+ opts = opts || {};
+ let postBody = null;
+ // verify the required parameter 'ids' is set
+ if (ids === undefined || ids === null) {
+ throw new Error("Missing the required parameter 'ids' when calling compareInRepo");
+ }
+
+ let pathParams = {
+ };
+ let queryParams = {
+ 'ids': ids,
+ 'force_mode': opts['forceMode']
+ };
+ let headerParams = {
+ };
+ let formParams = {
+ };
+
+ let authNames = ['Header'];
+ let contentTypes = [];
+ let accepts = ['application/json'];
+ let returnType = Object;
+ return this.apiClient.callApi(
+ '/v1/compare', 'GET',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType, null
+ );
+ }
+
+ /**
+ * Compare In Repo
+ * @param {String} ids
+ * @param {Object} opts Optional parameters
+ * @param {String} opts.forceMode
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
+ */
+ compareInRepo(ids, opts) {
+ return this.compareInRepoWithHttpInfo(ids, opts)
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+
+
+ /**
+ * Diff
+ * @param {String} ids
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
+ */
+ diffWithHttpInfo(ids) {
+ let postBody = null;
+ // verify the required parameter 'ids' is set
+ if (ids === undefined || ids === null) {
+ throw new Error("Missing the required parameter 'ids' when calling diff");
+ }
+
+ let pathParams = {
+ };
+ let queryParams = {
+ 'ids': ids
+ };
+ let headerParams = {
+ };
+ let formParams = {
+ };
+
+ let authNames = ['Header'];
+ let contentTypes = [];
+ let accepts = ['application/json'];
+ let returnType = Object;
+ return this.apiClient.callApi(
+ '/v1/diff', 'GET',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType, null
+ );
+ }
+
+ /**
+ * Diff
+ * @param {String} ids
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
+ */
+ diff(ids) {
+ return this.diffWithHttpInfo(ids)
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+
+
+ /**
+ * Get Badge Single
+ * @param {String} runId
+ * @param {Object} opts Optional parameters
+ * @param {String} [metric = 'cpu_energy_rapl_msr_component')]
+ * @param {String} [unit = 'watt-hours')]
+ * @param {String} [phase]
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
+ */
+ getBadgeSingleWithHttpInfo(runId, opts) {
+ opts = opts || {};
+ let postBody = null;
+ // verify the required parameter 'runId' is set
+ if (runId === undefined || runId === null) {
+ throw new Error("Missing the required parameter 'runId' when calling getBadgeSingle");
+ }
+
+ let pathParams = {
+ 'run_id': runId
+ };
+ let queryParams = {
+ 'metric': opts['metric'],
+ 'unit': opts['unit'],
+ 'phase': opts['phase']
+ };
+ let headerParams = {
+ };
+ let formParams = {
+ };
+
+ let authNames = ['Header'];
+ let contentTypes = [];
+ let accepts = ['application/json'];
+ let returnType = Object;
+ return this.apiClient.callApi(
+ '/v1/badge/single/{run_id}', 'GET',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType, null
+ );
+ }
+
+ /**
+ * Get Badge Single
+ * @param {String} runId
+ * @param {Object} opts Optional parameters
+ * @param {String} opts.metric (default to 'cpu_energy_rapl_msr_component')
+ * @param {String} opts.unit (default to 'watt-hours')
+ * @param {String} opts.phase
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
+ */
+ getBadgeSingle(runId, opts) {
+ return this.getBadgeSingleWithHttpInfo(runId, opts)
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+
+
+ /**
+ * Get Ci Badge Get
+ * @param {String} repo
+ * @param {String} branch
+ * @param {String} workflow
+ * @param {Object} opts Optional parameters
+ * @param {String} [mode = 'last')]
+ * @param {String} [metric = 'energy')]
+ * @param {Number} [durationDays]
+ * @param {String} [unit = 'watt-hours')]
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
+ */
+ getCiBadgeGetWithHttpInfo(repo, branch, workflow, opts) {
+ opts = opts || {};
+ let postBody = null;
+ // verify the required parameter 'repo' is set
+ if (repo === undefined || repo === null) {
+ throw new Error("Missing the required parameter 'repo' when calling getCiBadgeGet");
+ }
+ // verify the required parameter 'branch' is set
+ if (branch === undefined || branch === null) {
+ throw new Error("Missing the required parameter 'branch' when calling getCiBadgeGet");
+ }
+ // verify the required parameter 'workflow' is set
+ if (workflow === undefined || workflow === null) {
+ throw new Error("Missing the required parameter 'workflow' when calling getCiBadgeGet");
+ }
+
+ let pathParams = {
+ };
+ let queryParams = {
+ 'repo': repo,
+ 'branch': branch,
+ 'workflow': workflow,
+ 'mode': opts['mode'],
+ 'metric': opts['metric'],
+ 'duration_days': opts['durationDays'],
+ 'unit': opts['unit']
+ };
+ let headerParams = {
+ };
+ let formParams = {
+ };
+
+ let authNames = ['Header'];
+ let contentTypes = [];
+ let accepts = ['application/json'];
+ let returnType = Object;
+ return this.apiClient.callApi(
+ '/v1/ci/badge/get', 'GET',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType, null
+ );
+ }
+
+ /**
+ * Get Ci Badge Get
+ * @param {String} repo
+ * @param {String} branch
+ * @param {String} workflow
+ * @param {Object} opts Optional parameters
+ * @param {String} opts.mode (default to 'last')
+ * @param {String} opts.metric (default to 'energy')
+ * @param {Number} opts.durationDays
+ * @param {String} opts.unit (default to 'watt-hours')
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
+ */
+ getCiBadgeGet(repo, branch, workflow, opts) {
+ return this.getCiBadgeGetWithHttpInfo(repo, branch, workflow, opts)
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+
+
+ /**
+ * Get Ci Badge Get
+ * @param {String} repo
+ * @param {String} branch
+ * @param {String} workflow
+ * @param {Object} opts Optional parameters
+ * @param {String} [mode = 'last')]
+ * @param {String} [metric = 'energy')]
+ * @param {Number} [durationDays]
+ * @param {String} [unit = 'watt-hours')]
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
+ */
+ getCiBadgeGet_0WithHttpInfo(repo, branch, workflow, opts) {
+ opts = opts || {};
+ let postBody = null;
+ // verify the required parameter 'repo' is set
+ if (repo === undefined || repo === null) {
+ throw new Error("Missing the required parameter 'repo' when calling getCiBadgeGet_0");
+ }
+ // verify the required parameter 'branch' is set
+ if (branch === undefined || branch === null) {
+ throw new Error("Missing the required parameter 'branch' when calling getCiBadgeGet_0");
+ }
+ // verify the required parameter 'workflow' is set
+ if (workflow === undefined || workflow === null) {
+ throw new Error("Missing the required parameter 'workflow' when calling getCiBadgeGet_0");
+ }
+
+ let pathParams = {
+ };
+ let queryParams = {
+ 'repo': repo,
+ 'branch': branch,
+ 'workflow': workflow,
+ 'mode': opts['mode'],
+ 'metric': opts['metric'],
+ 'duration_days': opts['durationDays'],
+ 'unit': opts['unit']
+ };
+ let headerParams = {
+ };
+ let formParams = {
+ };
+
+ let authNames = ['Header'];
+ let contentTypes = [];
+ let accepts = ['application/json'];
+ let returnType = Object;
+ return this.apiClient.callApi(
+ '/v1/ci/badge/get', 'HEAD',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType, null
+ );
+ }
+
+ /**
+ * Get Ci Badge Get
+ * @param {String} repo
+ * @param {String} branch
+ * @param {String} workflow
+ * @param {Object} opts Optional parameters
+ * @param {String} opts.mode (default to 'last')
+ * @param {String} opts.metric (default to 'energy')
+ * @param {Number} opts.durationDays
+ * @param {String} opts.unit (default to 'watt-hours')
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
+ */
+ getCiBadgeGet_0(repo, branch, workflow, opts) {
+ return this.getCiBadgeGet_0WithHttpInfo(repo, branch, workflow, opts)
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+
+
+ /**
+ * Get Ci Measurements
+ * @param {String} repo
+ * @param {String} branch
+ * @param {String} workflow
+ * @param {Date} startDate
+ * @param {Date} endDate
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
+ */
+ getCiMeasurementsWithHttpInfo(repo, branch, workflow, startDate, endDate) {
+ let postBody = null;
+ // verify the required parameter 'repo' is set
+ if (repo === undefined || repo === null) {
+ throw new Error("Missing the required parameter 'repo' when calling getCiMeasurements");
+ }
+ // verify the required parameter 'branch' is set
+ if (branch === undefined || branch === null) {
+ throw new Error("Missing the required parameter 'branch' when calling getCiMeasurements");
+ }
+ // verify the required parameter 'workflow' is set
+ if (workflow === undefined || workflow === null) {
+ throw new Error("Missing the required parameter 'workflow' when calling getCiMeasurements");
+ }
+ // verify the required parameter 'startDate' is set
+ if (startDate === undefined || startDate === null) {
+ throw new Error("Missing the required parameter 'startDate' when calling getCiMeasurements");
+ }
+ // verify the required parameter 'endDate' is set
+ if (endDate === undefined || endDate === null) {
+ throw new Error("Missing the required parameter 'endDate' when calling getCiMeasurements");
+ }
+
+ let pathParams = {
+ };
+ let queryParams = {
+ 'repo': repo,
+ 'branch': branch,
+ 'workflow': workflow,
+ 'start_date': startDate,
+ 'end_date': endDate
+ };
+ let headerParams = {
+ };
+ let formParams = {
+ };
+
+ let authNames = ['Header'];
+ let contentTypes = [];
+ let accepts = ['application/json'];
+ let returnType = Object;
+ return this.apiClient.callApi(
+ '/v1/ci/measurements', 'GET',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType, null
+ );
+ }
+
+ /**
+ * Get Ci Measurements
+ * @param {String} repo
+ * @param {String} branch
+ * @param {String} workflow
+ * @param {Date} startDate
+ * @param {Date} endDate
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
+ */
+ getCiMeasurements(repo, branch, workflow, startDate, endDate) {
+ return this.getCiMeasurementsWithHttpInfo(repo, branch, workflow, startDate, endDate)
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+
+
+ /**
+ * Get Ci Repositories
+ * @param {Object} opts Optional parameters
+ * @param {String} [repo]
+ * @param {String} [sortBy = 'name')]
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
+ */
+ getCiRepositoriesWithHttpInfo(opts) {
+ opts = opts || {};
+ let postBody = null;
+
+ let pathParams = {
+ };
+ let queryParams = {
+ 'repo': opts['repo'],
+ 'sort_by': opts['sortBy']
+ };
+ let headerParams = {
+ };
+ let formParams = {
+ };
+
+ let authNames = ['Header'];
+ let contentTypes = [];
+ let accepts = ['application/json'];
+ let returnType = Object;
+ return this.apiClient.callApi(
+ '/v1/ci/repositories', 'GET',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType, null
+ );
+ }
+
+ /**
+ * Get Ci Repositories
+ * @param {Object} opts Optional parameters
+ * @param {String} opts.repo
+ * @param {String} opts.sortBy (default to 'name')
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
+ */
+ getCiRepositories(opts) {
+ return this.getCiRepositoriesWithHttpInfo(opts)
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+
+
+ /**
+ * Get Ci Runs
+ * @param {String} repo
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
+ */
+ getCiRunsWithHttpInfo(repo) {
+ let postBody = null;
+ // verify the required parameter 'repo' is set
+ if (repo === undefined || repo === null) {
+ throw new Error("Missing the required parameter 'repo' when calling getCiRuns");
+ }
+
+ let pathParams = {
+ };
+ let queryParams = {
+ 'repo': repo
+ };
+ let headerParams = {
+ };
+ let formParams = {
+ };
+
+ let authNames = ['Header'];
+ let contentTypes = [];
+ let accepts = ['application/json'];
+ let returnType = Object;
+ return this.apiClient.callApi(
+ '/v1/ci/runs', 'GET',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType, null
+ );
+ }
+
+ /**
+ * Get Ci Runs
+ * @param {String} repo
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
+ */
+ getCiRuns(repo) {
+ return this.getCiRunsWithHttpInfo(repo)
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+
+
+ /**
+ * Get Ci Stats
+ * @param {String} repo
+ * @param {String} branch
+ * @param {String} workflow
+ * @param {Date} startDate
+ * @param {Date} endDate
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
+ */
+ getCiStatsWithHttpInfo(repo, branch, workflow, startDate, endDate) {
+ let postBody = null;
+ // verify the required parameter 'repo' is set
+ if (repo === undefined || repo === null) {
+ throw new Error("Missing the required parameter 'repo' when calling getCiStats");
+ }
+ // verify the required parameter 'branch' is set
+ if (branch === undefined || branch === null) {
+ throw new Error("Missing the required parameter 'branch' when calling getCiStats");
+ }
+ // verify the required parameter 'workflow' is set
+ if (workflow === undefined || workflow === null) {
+ throw new Error("Missing the required parameter 'workflow' when calling getCiStats");
+ }
+ // verify the required parameter 'startDate' is set
+ if (startDate === undefined || startDate === null) {
+ throw new Error("Missing the required parameter 'startDate' when calling getCiStats");
+ }
+ // verify the required parameter 'endDate' is set
+ if (endDate === undefined || endDate === null) {
+ throw new Error("Missing the required parameter 'endDate' when calling getCiStats");
+ }
+
+ let pathParams = {
+ };
+ let queryParams = {
+ 'repo': repo,
+ 'branch': branch,
+ 'workflow': workflow,
+ 'start_date': startDate,
+ 'end_date': endDate
+ };
+ let headerParams = {
+ };
+ let formParams = {
+ };
+
+ let authNames = ['Header'];
+ let contentTypes = [];
+ let accepts = ['application/json'];
+ let returnType = Object;
+ return this.apiClient.callApi(
+ '/v1/ci/stats', 'GET',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType, null
+ );
+ }
+
+ /**
+ * Get Ci Stats
+ * @param {String} repo
+ * @param {String} branch
+ * @param {String} workflow
+ * @param {Date} startDate
+ * @param {Date} endDate
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
+ */
+ getCiStats(repo, branch, workflow, startDate, endDate) {
+ return this.getCiStatsWithHttpInfo(repo, branch, workflow, startDate, endDate)
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+
+
+ /**
+ * Get Insights
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
+ */
+ getInsightsWithHttpInfo() {
+ let postBody = null;
+
+ let pathParams = {
+ };
+ let queryParams = {
+ };
+ let headerParams = {
+ };
+ let formParams = {
+ };
+
+ let authNames = ['Header'];
+ let contentTypes = [];
+ let accepts = ['application/json'];
+ let returnType = Object;
+ return this.apiClient.callApi(
+ '/v1/insights', 'GET',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType, null
+ );
+ }
+
+ /**
+ * Get Insights
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
+ */
+ getInsights() {
+ return this.getInsightsWithHttpInfo()
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+
+
+ /**
+ * Get Insights
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
+ */
+ getInsights_0WithHttpInfo() {
+ let postBody = null;
+
+ let pathParams = {
+ };
+ let queryParams = {
+ };
+ let headerParams = {
+ };
+ let formParams = {
+ };
+
+ let authNames = ['Header'];
+ let contentTypes = [];
+ let accepts = ['application/json'];
+ let returnType = Object;
+ return this.apiClient.callApi(
+ '/v1/ci/insights', 'GET',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType, null
+ );
+ }
+
+ /**
+ * Get Insights
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
+ */
+ getInsights_0() {
+ return this.getInsights_0WithHttpInfo()
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+
+
+ /**
+ * Get Jobs
+ * @param {Object} opts Optional parameters
+ * @param {Number} [machineId]
+ * @param {String} [state]
+ * @param {Number} [jobId]
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
+ */
+ getJobsWithHttpInfo(opts) {
+ opts = opts || {};
+ let postBody = null;
+
+ let pathParams = {
+ };
+ let queryParams = {
+ 'machine_id': opts['machineId'],
+ 'state': opts['state'],
+ 'job_id': opts['jobId']
+ };
+ let headerParams = {
+ };
+ let formParams = {
+ };
+
+ let authNames = ['Header'];
+ let contentTypes = [];
+ let accepts = ['application/json'];
+ let returnType = Object;
+ return this.apiClient.callApi(
+ '/v2/jobs', 'GET',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType, null
+ );
+ }
+
+ /**
+ * Get Jobs
+ * @param {Object} opts Optional parameters
+ * @param {Number} opts.machineId
+ * @param {String} opts.state
+ * @param {Number} opts.jobId
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
+ */
+ getJobs(opts) {
+ return this.getJobsWithHttpInfo(opts)
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+
+
+ /**
+ * Get Machines
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
+ */
+ getMachinesWithHttpInfo() {
+ let postBody = null;
+
+ let pathParams = {
+ };
+ let queryParams = {
+ };
+ let headerParams = {
+ };
+ let formParams = {
+ };
+
+ let authNames = ['Header'];
+ let contentTypes = [];
+ let accepts = ['application/json'];
+ let returnType = Object;
+ return this.apiClient.callApi(
+ '/v1/machines', 'GET',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType, null
+ );
+ }
+
+ /**
+ * Get Machines
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
+ */
+ getMachines() {
+ return this.getMachinesWithHttpInfo()
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+
+
+ /**
+ * Get Measurements Single
+ * @param {String} runId
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
+ */
+ getMeasurementsSingleWithHttpInfo(runId) {
+ let postBody = null;
+ // verify the required parameter 'runId' is set
+ if (runId === undefined || runId === null) {
+ throw new Error("Missing the required parameter 'runId' when calling getMeasurementsSingle");
+ }
+
+ let pathParams = {
+ 'run_id': runId
+ };
+ let queryParams = {
+ };
+ let headerParams = {
+ };
+ let formParams = {
+ };
+
+ let authNames = ['Header'];
+ let contentTypes = [];
+ let accepts = ['application/json'];
+ let returnType = Object;
+ return this.apiClient.callApi(
+ '/v1/measurements/single/{run_id}', 'GET',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType, null
+ );
+ }
+
+ /**
+ * Get Measurements Single
+ * @param {String} runId
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
+ */
+ getMeasurementsSingle(runId) {
+ return this.getMeasurementsSingleWithHttpInfo(runId)
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+
+
+ /**
+ * Get Network
+ * @param {Object} runId
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
+ */
+ getNetworkWithHttpInfo(runId) {
+ let postBody = null;
+ // verify the required parameter 'runId' is set
+ if (runId === undefined || runId === null) {
+ throw new Error("Missing the required parameter 'runId' when calling getNetwork");
+ }
+
+ let pathParams = {
+ 'run_id': runId
+ };
+ let queryParams = {
+ };
+ let headerParams = {
+ };
+ let formParams = {
+ };
+
+ let authNames = ['Header'];
+ let contentTypes = [];
+ let accepts = ['application/json'];
+ let returnType = Object;
+ return this.apiClient.callApi(
+ '/v1/network/{run_id}', 'GET',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType, null
+ );
+ }
+
+ /**
+ * Get Network
+ * @param {Object} runId
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
+ */
+ getNetwork(runId) {
+ return this.getNetworkWithHttpInfo(runId)
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+
+
+ /**
+ * Get Notes
+ * @param {Object} runId
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
+ */
+ getNotesWithHttpInfo(runId) {
+ let postBody = null;
+ // verify the required parameter 'runId' is set
+ if (runId === undefined || runId === null) {
+ throw new Error("Missing the required parameter 'runId' when calling getNotes");
+ }
+
+ let pathParams = {
+ 'run_id': runId
+ };
+ let queryParams = {
+ };
+ let headerParams = {
+ };
+ let formParams = {
+ };
+
+ let authNames = ['Header'];
+ let contentTypes = [];
+ let accepts = ['application/json'];
+ let returnType = Object;
+ return this.apiClient.callApi(
+ '/v1/notes/{run_id}', 'GET',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType, null
+ );
+ }
+
+ /**
+ * Get Notes
+ * @param {Object} runId
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
+ */
+ getNotes(runId) {
+ return this.getNotesWithHttpInfo(runId)
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+
+
+ /**
+ * Get Optimizations
+ * @param {String} runId
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
+ */
+ getOptimizationsWithHttpInfo(runId) {
+ let postBody = null;
+ // verify the required parameter 'runId' is set
+ if (runId === undefined || runId === null) {
+ throw new Error("Missing the required parameter 'runId' when calling getOptimizations");
+ }
+
+ let pathParams = {
+ 'run_id': runId
+ };
+ let queryParams = {
+ };
+ let headerParams = {
+ };
+ let formParams = {
+ };
+
+ let authNames = ['Header'];
+ let contentTypes = [];
+ let accepts = ['application/json'];
+ let returnType = Object;
+ return this.apiClient.callApi(
+ '/v1/optimizations/{run_id}', 'GET',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType, null
+ );
+ }
+
+ /**
+ * Get Optimizations
+ * @param {String} runId
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
+ */
+ getOptimizations(runId) {
+ return this.getOptimizationsWithHttpInfo(runId)
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+
+
+ /**
+ * Get Phase Stats Single
+ * @param {String} runId
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
+ */
+ getPhaseStatsSingleWithHttpInfo(runId) {
+ let postBody = null;
+ // verify the required parameter 'runId' is set
+ if (runId === undefined || runId === null) {
+ throw new Error("Missing the required parameter 'runId' when calling getPhaseStatsSingle");
+ }
+
+ let pathParams = {
+ 'run_id': runId
+ };
+ let queryParams = {
+ };
+ let headerParams = {
+ };
+ let formParams = {
+ };
+
+ let authNames = ['Header'];
+ let contentTypes = [];
+ let accepts = ['application/json'];
+ let returnType = Object;
+ return this.apiClient.callApi(
+ '/v1/phase_stats/single/{run_id}', 'GET',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType, null
+ );
+ }
+
+ /**
+ * Get Phase Stats Single
+ * @param {String} runId
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
+ */
+ getPhaseStatsSingle(runId) {
+ return this.getPhaseStatsSingleWithHttpInfo(runId)
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+
+
+ /**
+ * Get Repositories
+ * @param {Object} opts Optional parameters
+ * @param {String} [uri]
+ * @param {String} [branch]
+ * @param {Number} [machineId]
+ * @param {String} [machine]
+ * @param {String} [filename]
+ * @param {String} [sortBy = 'name')]
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
+ */
+ getRepositoriesWithHttpInfo(opts) {
+ opts = opts || {};
+ let postBody = null;
+
+ let pathParams = {
+ };
+ let queryParams = {
+ 'uri': opts['uri'],
+ 'branch': opts['branch'],
+ 'machine_id': opts['machineId'],
+ 'machine': opts['machine'],
+ 'filename': opts['filename'],
+ 'sort_by': opts['sortBy']
+ };
+ let headerParams = {
+ };
+ let formParams = {
+ };
+
+ let authNames = ['Header'];
+ let contentTypes = [];
+ let accepts = ['application/json'];
+ let returnType = Object;
+ return this.apiClient.callApi(
+ '/v1/repositories', 'GET',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType, null
+ );
+ }
+
+ /**
+ * Get Repositories
+ * @param {Object} opts Optional parameters
+ * @param {String} opts.uri
+ * @param {String} opts.branch
+ * @param {Number} opts.machineId
+ * @param {String} opts.machine
+ * @param {String} opts.filename
+ * @param {String} opts.sortBy (default to 'name')
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
+ */
+ getRepositories(opts) {
+ return this.getRepositoriesWithHttpInfo(opts)
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+
+
+ /**
+ * Get Run
+ * @param {String} runId
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
+ */
+ getRunWithHttpInfo(runId) {
+ let postBody = null;
+ // verify the required parameter 'runId' is set
+ if (runId === undefined || runId === null) {
+ throw new Error("Missing the required parameter 'runId' when calling getRun");
+ }
+
+ let pathParams = {
+ 'run_id': runId
+ };
+ let queryParams = {
+ };
+ let headerParams = {
+ };
+ let formParams = {
+ };
+
+ let authNames = ['Header'];
+ let contentTypes = [];
+ let accepts = ['application/json'];
+ let returnType = Object;
+ return this.apiClient.callApi(
+ '/v2/run/{run_id}', 'GET',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType, null
+ );
+ }
+
+ /**
+ * Get Run
+ * @param {String} runId
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
+ */
+ getRun(runId) {
+ return this.getRunWithHttpInfo(runId)
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+
+
+ /**
+ * Get Runs
+ * @param {Object} opts Optional parameters
+ * @param {String} [uri]
+ * @param {String} [branch]
+ * @param {Number} [machineId]
+ * @param {String} [machine]
+ * @param {String} [filename]
+ * @param {Number} [jobId]
+ * @param {Boolean} [failed]
+ * @param {Number} [limit]
+ * @param {Object} [uriMode]
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
+ */
+ getRunsWithHttpInfo(opts) {
+ opts = opts || {};
+ let postBody = null;
+
+ let pathParams = {
+ };
+ let queryParams = {
+ 'uri': opts['uri'],
+ 'branch': opts['branch'],
+ 'machine_id': opts['machineId'],
+ 'machine': opts['machine'],
+ 'filename': opts['filename'],
+ 'job_id': opts['jobId'],
+ 'failed': opts['failed'],
+ 'limit': opts['limit'],
+ 'uri_mode': opts['uriMode']
+ };
+ let headerParams = {
+ };
+ let formParams = {
+ };
+
+ let authNames = ['Header'];
+ let contentTypes = [];
+ let accepts = ['application/json'];
+ let returnType = Object;
+ return this.apiClient.callApi(
+ '/v2/runs', 'GET',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType, null
+ );
+ }
+
+ /**
+ * Get Runs
+ * @param {Object} opts Optional parameters
+ * @param {String} opts.uri
+ * @param {String} opts.branch
+ * @param {Number} opts.machineId
+ * @param {String} opts.machine
+ * @param {String} opts.filename
+ * @param {Number} opts.jobId
+ * @param {Boolean} opts.failed
+ * @param {Number} opts.limit
+ * @param {Object} opts.uriMode
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
+ */
+ getRuns(opts) {
+ return this.getRunsWithHttpInfo(opts)
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+
+
+ /**
+ * Get Timeline Badge
+ * @param {String} metric
+ * @param {String} uri
+ * @param {Object} opts Optional parameters
+ * @param {String} [detailName]
+ * @param {Number} [machineId]
+ * @param {String} [branch]
+ * @param {String} [filename]
+ * @param {String} [unit = 'watt-hours')]
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
+ */
+ getTimelineBadgeWithHttpInfo(metric, uri, opts) {
+ opts = opts || {};
+ let postBody = null;
+ // verify the required parameter 'metric' is set
+ if (metric === undefined || metric === null) {
+ throw new Error("Missing the required parameter 'metric' when calling getTimelineBadge");
+ }
+ // verify the required parameter 'uri' is set
+ if (uri === undefined || uri === null) {
+ throw new Error("Missing the required parameter 'uri' when calling getTimelineBadge");
+ }
+
+ let pathParams = {
+ };
+ let queryParams = {
+ 'metric': metric,
+ 'uri': uri,
+ 'detail_name': opts['detailName'],
+ 'machine_id': opts['machineId'],
+ 'branch': opts['branch'],
+ 'filename': opts['filename'],
+ 'unit': opts['unit']
+ };
+ let headerParams = {
+ };
+ let formParams = {
+ };
+
+ let authNames = ['Header'];
+ let contentTypes = [];
+ let accepts = ['application/json'];
+ let returnType = Object;
+ return this.apiClient.callApi(
+ '/v1/badge/timeline', 'GET',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType, null
+ );
+ }
+
+ /**
+ * Get Timeline Badge
+ * @param {String} metric
+ * @param {String} uri
+ * @param {Object} opts Optional parameters
+ * @param {String} opts.detailName
+ * @param {Number} opts.machineId
+ * @param {String} opts.branch
+ * @param {String} opts.filename
+ * @param {String} opts.unit (default to 'watt-hours')
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
+ */
+ getTimelineBadge(metric, uri, opts) {
+ return this.getTimelineBadgeWithHttpInfo(metric, uri, opts)
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+
+
+ /**
+ * Get Timeline Stats
+ * @param {String} uri
+ * @param {Number} machineId
+ * @param {Object} opts Optional parameters
+ * @param {String} [branch]
+ * @param {String} [filename]
+ * @param {Date} [startDate]
+ * @param {Date} [endDate]
+ * @param {String} [metric]
+ * @param {String} [phase]
+ * @param {String} [sorting]
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
+ */
+ getTimelineStatsWithHttpInfo(uri, machineId, opts) {
+ opts = opts || {};
+ let postBody = null;
+ // verify the required parameter 'uri' is set
+ if (uri === undefined || uri === null) {
+ throw new Error("Missing the required parameter 'uri' when calling getTimelineStats");
+ }
+ // verify the required parameter 'machineId' is set
+ if (machineId === undefined || machineId === null) {
+ throw new Error("Missing the required parameter 'machineId' when calling getTimelineStats");
+ }
+
+ let pathParams = {
+ };
+ let queryParams = {
+ 'uri': uri,
+ 'machine_id': machineId,
+ 'branch': opts['branch'],
+ 'filename': opts['filename'],
+ 'start_date': opts['startDate'],
+ 'end_date': opts['endDate'],
+ 'metric': opts['metric'],
+ 'phase': opts['phase'],
+ 'sorting': opts['sorting']
+ };
+ let headerParams = {
+ };
+ let formParams = {
+ };
+
+ let authNames = ['Header'];
+ let contentTypes = [];
+ let accepts = ['application/json'];
+ let returnType = Object;
+ return this.apiClient.callApi(
+ '/v1/timeline', 'GET',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType, null
+ );
+ }
+
+ /**
+ * Get Timeline Stats
+ * @param {String} uri
+ * @param {Number} machineId
+ * @param {Object} opts Optional parameters
+ * @param {String} opts.branch
+ * @param {String} opts.filename
+ * @param {Date} opts.startDate
+ * @param {Date} opts.endDate
+ * @param {String} opts.metric
+ * @param {String} opts.phase
+ * @param {String} opts.sorting
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
+ */
+ getTimelineStats(uri, machineId, opts) {
+ return this.getTimelineStatsWithHttpInfo(uri, machineId, opts)
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+
+
+ /**
+ * Get User Settings
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
+ */
+ getUserSettingsWithHttpInfo() {
+ let postBody = null;
+
+ let pathParams = {
+ };
+ let queryParams = {
+ };
+ let headerParams = {
+ };
+ let formParams = {
+ };
+
+ let authNames = ['Header'];
+ let contentTypes = [];
+ let accepts = ['application/json'];
+ let returnType = Object;
+ return this.apiClient.callApi(
+ '/v1/user/settings', 'GET',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType, null
+ );
+ }
+
+ /**
+ * Get User Settings
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
+ */
+ getUserSettings() {
+ return this.getUserSettingsWithHttpInfo()
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+
+
+ /**
+ * Get Watchlist
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
+ */
+ getWatchlistWithHttpInfo() {
+ let postBody = null;
+
+ let pathParams = {
+ };
+ let queryParams = {
+ };
+ let headerParams = {
+ };
+ let formParams = {
+ };
+
+ let authNames = ['Header'];
+ let contentTypes = [];
+ let accepts = ['application/json'];
+ let returnType = Object;
+ return this.apiClient.callApi(
+ '/v1/watchlist', 'GET',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType, null
+ );
+ }
+
+ /**
+ * Get Watchlist
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
+ */
+ getWatchlist() {
+ return this.getWatchlistWithHttpInfo()
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+
+
+ /**
+ * Home
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
+ */
+ homeWithHttpInfo() {
+ let postBody = null;
+
+ let pathParams = {
+ };
+ let queryParams = {
+ };
+ let headerParams = {
+ };
+ let formParams = {
+ };
+
+ let authNames = [];
+ let contentTypes = [];
+ let accepts = ['application/json'];
+ let returnType = Object;
+ return this.apiClient.callApi(
+ '/', 'GET',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType, null
+ );
+ }
+
+ /**
+ * Home
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
+ */
+ home() {
+ return this.homeWithHttpInfo()
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+
+
+ /**
+ * Old V1 Jobs Endpoint
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
+ */
+ oldV1JobsEndpointWithHttpInfo() {
+ let postBody = null;
+
+ let pathParams = {
+ };
+ let queryParams = {
+ };
+ let headerParams = {
+ };
+ let formParams = {
+ };
+
+ let authNames = [];
+ let contentTypes = [];
+ let accepts = ['application/json'];
+ let returnType = Object;
+ return this.apiClient.callApi(
+ '/v1/jobs', 'GET',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType, null
+ );
+ }
+
+ /**
+ * Old V1 Jobs Endpoint
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
+ */
+ oldV1JobsEndpoint() {
+ return this.oldV1JobsEndpointWithHttpInfo()
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+
+
+ /**
+ * Old V1 Run Endpoint
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
+ */
+ oldV1RunEndpointWithHttpInfo() {
+ let postBody = null;
+
+ let pathParams = {
+ };
+ let queryParams = {
+ };
+ let headerParams = {
+ };
+ let formParams = {
+ };
+
+ let authNames = [];
+ let contentTypes = [];
+ let accepts = ['application/json'];
+ let returnType = Object;
+ return this.apiClient.callApi(
+ '/v1/run/{run_id}', 'GET',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType, null
+ );
+ }
+
+ /**
+ * Old V1 Run Endpoint
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
+ */
+ oldV1RunEndpoint() {
+ return this.oldV1RunEndpointWithHttpInfo()
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+
+
+ /**
+ * Old V1 Runs Endpoint
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
+ */
+ oldV1RunsEndpointWithHttpInfo() {
+ let postBody = null;
+
+ let pathParams = {
+ };
+ let queryParams = {
+ };
+ let headerParams = {
+ };
+ let formParams = {
+ };
+
+ let authNames = [];
+ let contentTypes = [];
+ let accepts = ['application/json'];
+ let returnType = Object;
+ return this.apiClient.callApi(
+ '/v1/runs', 'GET',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType, null
+ );
+ }
+
+ /**
+ * Old V1 Runs Endpoint
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
+ */
+ oldV1RunsEndpoint() {
+ return this.oldV1RunsEndpointWithHttpInfo()
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+
+
+ /**
+ * Post Ci Measurement Add
+ * @param {module:model/CIMeasurement} cIMeasurement
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
+ */
+ postCiMeasurementAddWithHttpInfo(cIMeasurement) {
+ let postBody = cIMeasurement;
+ // verify the required parameter 'cIMeasurement' is set
+ if (cIMeasurement === undefined || cIMeasurement === null) {
+ throw new Error("Missing the required parameter 'cIMeasurement' when calling postCiMeasurementAdd");
+ }
+
+ let pathParams = {
+ };
+ let queryParams = {
+ };
+ let headerParams = {
+ };
+ let formParams = {
+ };
+
+ let authNames = ['Header'];
+ let contentTypes = ['application/json'];
+ let accepts = ['application/json'];
+ let returnType = Object;
+ return this.apiClient.callApi(
+ '/v2/ci/measurement/add', 'POST',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType, null
+ );
+ }
+
+ /**
+ * Post Ci Measurement Add
+ * @param {module:model/CIMeasurement} cIMeasurement
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
+ */
+ postCiMeasurementAdd(cIMeasurement) {
+ return this.postCiMeasurementAddWithHttpInfo(cIMeasurement)
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+
+
+ /**
+ * Post Ci Measurement Add Deprecated
+ * @param {module:model/CIMeasurementOld} cIMeasurementOld
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
+ */
+ postCiMeasurementAddDeprecatedWithHttpInfo(cIMeasurementOld) {
+ let postBody = cIMeasurementOld;
+ // verify the required parameter 'cIMeasurementOld' is set
+ if (cIMeasurementOld === undefined || cIMeasurementOld === null) {
+ throw new Error("Missing the required parameter 'cIMeasurementOld' when calling postCiMeasurementAddDeprecated");
+ }
+
+ let pathParams = {
+ };
+ let queryParams = {
+ };
+ let headerParams = {
+ };
+ let formParams = {
+ };
+
+ let authNames = ['Header'];
+ let contentTypes = ['application/json'];
+ let accepts = ['application/json'];
+ let returnType = Object;
+ return this.apiClient.callApi(
+ '/v1/ci/measurement/add', 'POST',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType, null
+ );
+ }
+
+ /**
+ * Post Ci Measurement Add Deprecated
+ * @param {module:model/CIMeasurementOld} cIMeasurementOld
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
+ */
+ postCiMeasurementAddDeprecated(cIMeasurementOld) {
+ return this.postCiMeasurementAddDeprecatedWithHttpInfo(cIMeasurementOld)
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+
+
+ /**
+ * Robots Txt
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
+ */
+ robotsTxtWithHttpInfo() {
+ let postBody = null;
+
+ let pathParams = {
+ };
+ let queryParams = {
+ };
+ let headerParams = {
+ };
+ let formParams = {
+ };
+
+ let authNames = [];
+ let contentTypes = [];
+ let accepts = ['application/json'];
+ let returnType = Object;
+ return this.apiClient.callApi(
+ '/robots.txt', 'GET',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType, null
+ );
+ }
+
+ /**
+ * Robots Txt
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
+ */
+ robotsTxt() {
+ return this.robotsTxtWithHttpInfo()
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+
+
+ /**
+ * Software Add
+ * @param {module:model/Software} software
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
+ */
+ softwareAddWithHttpInfo(software) {
+ let postBody = software;
+ // verify the required parameter 'software' is set
+ if (software === undefined || software === null) {
+ throw new Error("Missing the required parameter 'software' when calling softwareAdd");
+ }
+
+ let pathParams = {
+ };
+ let queryParams = {
+ };
+ let headerParams = {
+ };
+ let formParams = {
+ };
+
+ let authNames = ['Header'];
+ let contentTypes = ['application/json'];
+ let accepts = ['application/json'];
+ let returnType = Object;
+ return this.apiClient.callApi(
+ '/v1/software/add', 'POST',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType, null
+ );
+ }
+
+ /**
+ * Software Add
+ * @param {module:model/Software} software
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
+ */
+ softwareAdd(software) {
+ return this.softwareAddWithHttpInfo(software)
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+
+
+ /**
+ * Update Job
+ * @param {module:model/JobChange} jobChange
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
+ */
+ updateJobWithHttpInfo(jobChange) {
+ let postBody = jobChange;
+ // verify the required parameter 'jobChange' is set
+ if (jobChange === undefined || jobChange === null) {
+ throw new Error("Missing the required parameter 'jobChange' when calling updateJob");
+ }
+
+ let pathParams = {
+ };
+ let queryParams = {
+ };
+ let headerParams = {
+ };
+ let formParams = {
+ };
+
+ let authNames = ['Header'];
+ let contentTypes = ['application/json'];
+ let accepts = ['application/json'];
+ let returnType = Object;
+ return this.apiClient.callApi(
+ '/v1/job', 'PUT',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType, null
+ );
+ }
+
+ /**
+ * Update Job
+ * @param {module:model/JobChange} jobChange
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
+ */
+ updateJob(jobChange) {
+ return this.updateJobWithHttpInfo(jobChange)
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+
+
+ /**
+ * Update User Setting
+ * @param {module:model/UserSetting} userSetting
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response
+ */
+ updateUserSettingWithHttpInfo(userSetting) {
+ let postBody = userSetting;
+ // verify the required parameter 'userSetting' is set
+ if (userSetting === undefined || userSetting === null) {
+ throw new Error("Missing the required parameter 'userSetting' when calling updateUserSetting");
+ }
+
+ let pathParams = {
+ };
+ let queryParams = {
+ };
+ let headerParams = {
+ };
+ let formParams = {
+ };
+
+ let authNames = ['Header'];
+ let contentTypes = ['application/json'];
+ let accepts = ['application/json'];
+ let returnType = Object;
+ return this.apiClient.callApi(
+ '/v1/user/setting', 'PUT',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType, null
+ );
+ }
+
+ /**
+ * Update User Setting
+ * @param {module:model/UserSetting} userSetting
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}
+ */
+ updateUserSetting(userSetting) {
+ return this.updateUserSettingWithHttpInfo(userSetting)
+ .then(function(response_and_data) {
+ return response_and_data.data;
+ });
+ }
+
+
+}
diff --git a/frontend/js/api/src/index.js b/frontend/js/api/src/index.js
new file mode 100644
index 00000000..77fac69e
--- /dev/null
+++ b/frontend/js/api/src/index.js
@@ -0,0 +1,265 @@
+/**
+ * FastAPI
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+
+import ApiClient from './ApiClient';
+import CIMeasurement from './model/CIMeasurement';
+import CIMeasurementOld from './model/CIMeasurementOld';
+import CarbonIntensityG from './model/CarbonIntensityG';
+import CarbonUg from './model/CarbonUg';
+import CbCompanyUuid from './model/CbCompanyUuid';
+import CbMachineUuid from './model/CbMachineUuid';
+import CbProjectUuid from './model/CbProjectUuid';
+import City from './model/City';
+import Co2Eq from './model/Co2Eq';
+import Co2I from './model/Co2I';
+import Email from './model/Email';
+import FilterMachine from './model/FilterMachine';
+import FilterProject from './model/FilterProject';
+import FilterTags from './model/FilterTags';
+import FilterType from './model/FilterType';
+import HTTPValidationError from './model/HTTPValidationError';
+import ImageUrl from './model/ImageUrl';
+import Ip from './model/Ip';
+import JobChange from './model/JobChange';
+import Lat from './model/Lat';
+import Lon from './model/Lon';
+import Note from './model/Note';
+import ProjectId from './model/ProjectId';
+import Software from './model/Software';
+import UsageScenarioVariables from './model/UsageScenarioVariables';
+import UserSetting from './model/UserSetting';
+import ValidationError from './model/ValidationError';
+import ValidationErrorLocInner from './model/ValidationErrorLocInner';
+import Value from './model/Value';
+import DefaultApi from './api/DefaultApi';
+
+
+/**
+* JS API client generated by OpenAPI Generator.
+* The index
module provides access to constructors for all the classes which comprise the public API.
+*
+* var FastApi = require('index'); // See note below*.
+* var xxxSvc = new FastApi.XxxApi(); // Allocate the API class we're going to use.
+* var yyyModel = new FastApi.Yyy(); // Construct a model instance.
+* yyyModel.someProperty = 'someValue';
+* ...
+* var zzz = xxxSvc.doSomething(yyyModel); // Invoke the service.
+* ...
+*
+* *NOTE: For a top-level AMD script, use require(['index'], function(){...})
+* and put the application logic within the callback function.
+*
+* A non-AMD browser application (discouraged) might do something like this: +*
+* var xxxSvc = new FastApi.XxxApi(); // Allocate the API class we're going to use. +* var yyy = new FastApi.Yyy(); // Construct a model instance. +* yyyModel.someProperty = 'someValue'; +* ... +* var zzz = xxxSvc.doSomething(yyyModel); // Invoke the service. +* ... +*+* +* @module index +* @version 0.1.0 +*/ +export { + /** + * The ApiClient constructor. + * @property {module:ApiClient} + */ + ApiClient, + + /** + * The CIMeasurement model constructor. + * @property {module:model/CIMeasurement} + */ + CIMeasurement, + + /** + * The CIMeasurementOld model constructor. + * @property {module:model/CIMeasurementOld} + */ + CIMeasurementOld, + + /** + * The CarbonIntensityG model constructor. + * @property {module:model/CarbonIntensityG} + */ + CarbonIntensityG, + + /** + * The CarbonUg model constructor. + * @property {module:model/CarbonUg} + */ + CarbonUg, + + /** + * The CbCompanyUuid model constructor. + * @property {module:model/CbCompanyUuid} + */ + CbCompanyUuid, + + /** + * The CbMachineUuid model constructor. + * @property {module:model/CbMachineUuid} + */ + CbMachineUuid, + + /** + * The CbProjectUuid model constructor. + * @property {module:model/CbProjectUuid} + */ + CbProjectUuid, + + /** + * The City model constructor. + * @property {module:model/City} + */ + City, + + /** + * The Co2Eq model constructor. + * @property {module:model/Co2Eq} + */ + Co2Eq, + + /** + * The Co2I model constructor. + * @property {module:model/Co2I} + */ + Co2I, + + /** + * The Email model constructor. + * @property {module:model/Email} + */ + Email, + + /** + * The FilterMachine model constructor. + * @property {module:model/FilterMachine} + */ + FilterMachine, + + /** + * The FilterProject model constructor. + * @property {module:model/FilterProject} + */ + FilterProject, + + /** + * The FilterTags model constructor. + * @property {module:model/FilterTags} + */ + FilterTags, + + /** + * The FilterType model constructor. + * @property {module:model/FilterType} + */ + FilterType, + + /** + * The HTTPValidationError model constructor. + * @property {module:model/HTTPValidationError} + */ + HTTPValidationError, + + /** + * The ImageUrl model constructor. + * @property {module:model/ImageUrl} + */ + ImageUrl, + + /** + * The Ip model constructor. + * @property {module:model/Ip} + */ + Ip, + + /** + * The JobChange model constructor. + * @property {module:model/JobChange} + */ + JobChange, + + /** + * The Lat model constructor. + * @property {module:model/Lat} + */ + Lat, + + /** + * The Lon model constructor. + * @property {module:model/Lon} + */ + Lon, + + /** + * The Note model constructor. + * @property {module:model/Note} + */ + Note, + + /** + * The ProjectId model constructor. + * @property {module:model/ProjectId} + */ + ProjectId, + + /** + * The Software model constructor. + * @property {module:model/Software} + */ + Software, + + /** + * The UsageScenarioVariables model constructor. + * @property {module:model/UsageScenarioVariables} + */ + UsageScenarioVariables, + + /** + * The UserSetting model constructor. + * @property {module:model/UserSetting} + */ + UserSetting, + + /** + * The ValidationError model constructor. + * @property {module:model/ValidationError} + */ + ValidationError, + + /** + * The ValidationErrorLocInner model constructor. + * @property {module:model/ValidationErrorLocInner} + */ + ValidationErrorLocInner, + + /** + * The Value model constructor. + * @property {module:model/Value} + */ + Value, + + /** + * The DefaultApi service constructor. + * @property {module:api/DefaultApi} + */ + DefaultApi +}; diff --git a/frontend/js/api/src/model/CIMeasurement.js b/frontend/js/api/src/model/CIMeasurement.js new file mode 100644 index 00000000..b6fd0a29 --- /dev/null +++ b/frontend/js/api/src/model/CIMeasurement.js @@ -0,0 +1,382 @@ +/** + * FastAPI + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +import CarbonIntensityG from './CarbonIntensityG'; +import CarbonUg from './CarbonUg'; +import City from './City'; +import FilterMachine from './FilterMachine'; +import FilterProject from './FilterProject'; +import FilterTags from './FilterTags'; +import FilterType from './FilterType'; +import Ip from './Ip'; +import Lat from './Lat'; +import Lon from './Lon'; +import Note from './Note'; + +/** + * The CIMeasurement model module. + * @module model/CIMeasurement + * @version 0.1.0 + */ +class CIMeasurement { + /** + * Constructs a new
CIMeasurement
.
+ * @alias module:model/CIMeasurement
+ * @extends Object
+ * @param energyUj {Number}
+ * @param repo {String}
+ * @param branch {String}
+ * @param cpu {String}
+ * @param cpuUtilAvg {Number}
+ * @param commitHash {String}
+ * @param workflow {String}
+ * @param runId {String}
+ * @param source {String}
+ * @param label {String}
+ * @param durationUs {Number}
+ */
+ constructor(energyUj, repo, branch, cpu, cpuUtilAvg, commitHash, workflow, runId, source, label, durationUs) {
+
+ CIMeasurement.initialize(this, energyUj, repo, branch, cpu, cpuUtilAvg, commitHash, workflow, runId, source, label, durationUs);
+ }
+
+ /**
+ * Initializes the fields of this object.
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
+ * Only for internal use.
+ */
+ static initialize(obj, energyUj, repo, branch, cpu, cpuUtilAvg, commitHash, workflow, runId, source, label, durationUs) {
+ obj['energy_uj'] = energyUj;
+ obj['repo'] = repo;
+ obj['branch'] = branch;
+ obj['cpu'] = cpu;
+ obj['cpu_util_avg'] = cpuUtilAvg;
+ obj['commit_hash'] = commitHash;
+ obj['workflow'] = workflow;
+ obj['run_id'] = runId;
+ obj['source'] = source;
+ obj['label'] = label;
+ obj['duration_us'] = durationUs;
+ }
+
+ /**
+ * Constructs a CIMeasurement
from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data
to obj
if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:model/CIMeasurement} obj Optional instance to populate.
+ * @return {module:model/CIMeasurement} The populated CIMeasurement
instance.
+ */
+ static constructFromObject(data, obj) {
+ if (data) {
+ obj = obj || new CIMeasurement();
+
+ ApiClient.constructFromObject(data, obj, 'Object');
+
+
+ if (data.hasOwnProperty('energy_uj')) {
+ obj['energy_uj'] = ApiClient.convertToType(data['energy_uj'], 'Number');
+ }
+ if (data.hasOwnProperty('repo')) {
+ obj['repo'] = ApiClient.convertToType(data['repo'], 'String');
+ }
+ if (data.hasOwnProperty('branch')) {
+ obj['branch'] = ApiClient.convertToType(data['branch'], 'String');
+ }
+ if (data.hasOwnProperty('cpu')) {
+ obj['cpu'] = ApiClient.convertToType(data['cpu'], 'String');
+ }
+ if (data.hasOwnProperty('cpu_util_avg')) {
+ obj['cpu_util_avg'] = ApiClient.convertToType(data['cpu_util_avg'], 'Number');
+ }
+ if (data.hasOwnProperty('commit_hash')) {
+ obj['commit_hash'] = ApiClient.convertToType(data['commit_hash'], 'String');
+ }
+ if (data.hasOwnProperty('workflow')) {
+ obj['workflow'] = ApiClient.convertToType(data['workflow'], 'String');
+ }
+ if (data.hasOwnProperty('run_id')) {
+ obj['run_id'] = ApiClient.convertToType(data['run_id'], 'String');
+ }
+ if (data.hasOwnProperty('source')) {
+ obj['source'] = ApiClient.convertToType(data['source'], 'String');
+ }
+ if (data.hasOwnProperty('label')) {
+ obj['label'] = ApiClient.convertToType(data['label'], 'String');
+ }
+ if (data.hasOwnProperty('duration_us')) {
+ obj['duration_us'] = ApiClient.convertToType(data['duration_us'], 'Number');
+ }
+ if (data.hasOwnProperty('workflow_name')) {
+ obj['workflow_name'] = ApiClient.convertToType(data['workflow_name'], 'String');
+ }
+ if (data.hasOwnProperty('filter_type')) {
+ obj['filter_type'] = FilterType.constructFromObject(data['filter_type']);
+ }
+ if (data.hasOwnProperty('filter_project')) {
+ obj['filter_project'] = FilterProject.constructFromObject(data['filter_project']);
+ }
+ if (data.hasOwnProperty('filter_machine')) {
+ obj['filter_machine'] = FilterMachine.constructFromObject(data['filter_machine']);
+ }
+ if (data.hasOwnProperty('filter_tags')) {
+ obj['filter_tags'] = FilterTags.constructFromObject(data['filter_tags']);
+ }
+ if (data.hasOwnProperty('lat')) {
+ obj['lat'] = Lat.constructFromObject(data['lat']);
+ }
+ if (data.hasOwnProperty('lon')) {
+ obj['lon'] = Lon.constructFromObject(data['lon']);
+ }
+ if (data.hasOwnProperty('city')) {
+ obj['city'] = City.constructFromObject(data['city']);
+ }
+ if (data.hasOwnProperty('carbon_intensity_g')) {
+ obj['carbon_intensity_g'] = CarbonIntensityG.constructFromObject(data['carbon_intensity_g']);
+ }
+ if (data.hasOwnProperty('carbon_ug')) {
+ obj['carbon_ug'] = CarbonUg.constructFromObject(data['carbon_ug']);
+ }
+ if (data.hasOwnProperty('ip')) {
+ obj['ip'] = Ip.constructFromObject(data['ip']);
+ }
+ if (data.hasOwnProperty('note')) {
+ obj['note'] = Note.constructFromObject(data['note']);
+ }
+ }
+ return obj;
+ }
+
+ /**
+ * Validates the JSON data with respect to CIMeasurement
.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @return {boolean} to indicate whether the JSON data is valid with respect to CIMeasurement
.
+ */
+ static validateJSON(data) {
+ // check to make sure all required properties are present in the JSON string
+ for (const property of CIMeasurement.RequiredProperties) {
+ if (!data.hasOwnProperty(property)) {
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
+ }
+ }
+ // ensure the json data is a string
+ if (data['repo'] && !(typeof data['repo'] === 'string' || data['repo'] instanceof String)) {
+ throw new Error("Expected the field `repo` to be a primitive type in the JSON string but got " + data['repo']);
+ }
+ // ensure the json data is a string
+ if (data['branch'] && !(typeof data['branch'] === 'string' || data['branch'] instanceof String)) {
+ throw new Error("Expected the field `branch` to be a primitive type in the JSON string but got " + data['branch']);
+ }
+ // ensure the json data is a string
+ if (data['cpu'] && !(typeof data['cpu'] === 'string' || data['cpu'] instanceof String)) {
+ throw new Error("Expected the field `cpu` to be a primitive type in the JSON string but got " + data['cpu']);
+ }
+ // ensure the json data is a string
+ if (data['commit_hash'] && !(typeof data['commit_hash'] === 'string' || data['commit_hash'] instanceof String)) {
+ throw new Error("Expected the field `commit_hash` to be a primitive type in the JSON string but got " + data['commit_hash']);
+ }
+ // ensure the json data is a string
+ if (data['workflow'] && !(typeof data['workflow'] === 'string' || data['workflow'] instanceof String)) {
+ throw new Error("Expected the field `workflow` to be a primitive type in the JSON string but got " + data['workflow']);
+ }
+ // ensure the json data is a string
+ if (data['run_id'] && !(typeof data['run_id'] === 'string' || data['run_id'] instanceof String)) {
+ throw new Error("Expected the field `run_id` to be a primitive type in the JSON string but got " + data['run_id']);
+ }
+ // ensure the json data is a string
+ if (data['source'] && !(typeof data['source'] === 'string' || data['source'] instanceof String)) {
+ throw new Error("Expected the field `source` to be a primitive type in the JSON string but got " + data['source']);
+ }
+ // ensure the json data is a string
+ if (data['label'] && !(typeof data['label'] === 'string' || data['label'] instanceof String)) {
+ throw new Error("Expected the field `label` to be a primitive type in the JSON string but got " + data['label']);
+ }
+ // ensure the json data is a string
+ if (data['workflow_name'] && !(typeof data['workflow_name'] === 'string' || data['workflow_name'] instanceof String)) {
+ throw new Error("Expected the field `workflow_name` to be a primitive type in the JSON string but got " + data['workflow_name']);
+ }
+ // validate the optional field `filter_type`
+ if (data['filter_type']) { // data not null
+ FilterType.validateJSON(data['filter_type']);
+ }
+ // validate the optional field `filter_project`
+ if (data['filter_project']) { // data not null
+ FilterProject.validateJSON(data['filter_project']);
+ }
+ // validate the optional field `filter_machine`
+ if (data['filter_machine']) { // data not null
+ FilterMachine.validateJSON(data['filter_machine']);
+ }
+ // validate the optional field `filter_tags`
+ if (data['filter_tags']) { // data not null
+ FilterTags.validateJSON(data['filter_tags']);
+ }
+ // validate the optional field `lat`
+ if (data['lat']) { // data not null
+ Lat.validateJSON(data['lat']);
+ }
+ // validate the optional field `lon`
+ if (data['lon']) { // data not null
+ Lon.validateJSON(data['lon']);
+ }
+ // validate the optional field `city`
+ if (data['city']) { // data not null
+ City.validateJSON(data['city']);
+ }
+ // validate the optional field `carbon_intensity_g`
+ if (data['carbon_intensity_g']) { // data not null
+ CarbonIntensityG.validateJSON(data['carbon_intensity_g']);
+ }
+ // validate the optional field `carbon_ug`
+ if (data['carbon_ug']) { // data not null
+ CarbonUg.validateJSON(data['carbon_ug']);
+ }
+ // validate the optional field `ip`
+ if (data['ip']) { // data not null
+ Ip.validateJSON(data['ip']);
+ }
+ // validate the optional field `note`
+ if (data['note']) { // data not null
+ Note.validateJSON(data['note']);
+ }
+
+ return true;
+ }
+
+
+}
+
+CIMeasurement.RequiredProperties = ["energy_uj", "repo", "branch", "cpu", "cpu_util_avg", "commit_hash", "workflow", "run_id", "source", "label", "duration_us"];
+
+/**
+ * @member {Number} energy_uj
+ */
+CIMeasurement.prototype['energy_uj'] = undefined;
+
+/**
+ * @member {String} repo
+ */
+CIMeasurement.prototype['repo'] = undefined;
+
+/**
+ * @member {String} branch
+ */
+CIMeasurement.prototype['branch'] = undefined;
+
+/**
+ * @member {String} cpu
+ */
+CIMeasurement.prototype['cpu'] = undefined;
+
+/**
+ * @member {Number} cpu_util_avg
+ */
+CIMeasurement.prototype['cpu_util_avg'] = undefined;
+
+/**
+ * @member {String} commit_hash
+ */
+CIMeasurement.prototype['commit_hash'] = undefined;
+
+/**
+ * @member {String} workflow
+ */
+CIMeasurement.prototype['workflow'] = undefined;
+
+/**
+ * @member {String} run_id
+ */
+CIMeasurement.prototype['run_id'] = undefined;
+
+/**
+ * @member {String} source
+ */
+CIMeasurement.prototype['source'] = undefined;
+
+/**
+ * @member {String} label
+ */
+CIMeasurement.prototype['label'] = undefined;
+
+/**
+ * @member {Number} duration_us
+ */
+CIMeasurement.prototype['duration_us'] = undefined;
+
+/**
+ * @member {String} workflow_name
+ */
+CIMeasurement.prototype['workflow_name'] = undefined;
+
+/**
+ * @member {module:model/FilterType} filter_type
+ */
+CIMeasurement.prototype['filter_type'] = undefined;
+
+/**
+ * @member {module:model/FilterProject} filter_project
+ */
+CIMeasurement.prototype['filter_project'] = undefined;
+
+/**
+ * @member {module:model/FilterMachine} filter_machine
+ */
+CIMeasurement.prototype['filter_machine'] = undefined;
+
+/**
+ * @member {module:model/FilterTags} filter_tags
+ */
+CIMeasurement.prototype['filter_tags'] = undefined;
+
+/**
+ * @member {module:model/Lat} lat
+ */
+CIMeasurement.prototype['lat'] = undefined;
+
+/**
+ * @member {module:model/Lon} lon
+ */
+CIMeasurement.prototype['lon'] = undefined;
+
+/**
+ * @member {module:model/City} city
+ */
+CIMeasurement.prototype['city'] = undefined;
+
+/**
+ * @member {module:model/CarbonIntensityG} carbon_intensity_g
+ */
+CIMeasurement.prototype['carbon_intensity_g'] = undefined;
+
+/**
+ * @member {module:model/CarbonUg} carbon_ug
+ */
+CIMeasurement.prototype['carbon_ug'] = undefined;
+
+/**
+ * @member {module:model/Ip} ip
+ */
+CIMeasurement.prototype['ip'] = undefined;
+
+/**
+ * @member {module:model/Note} note
+ */
+CIMeasurement.prototype['note'] = undefined;
+
+
+
+
+
+
+export default CIMeasurement;
+
diff --git a/frontend/js/api/src/model/CIMeasurementOld.js b/frontend/js/api/src/model/CIMeasurementOld.js
new file mode 100644
index 00000000..54c42667
--- /dev/null
+++ b/frontend/js/api/src/model/CIMeasurementOld.js
@@ -0,0 +1,370 @@
+/**
+ * FastAPI
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+import ApiClient from '../ApiClient';
+import CbCompanyUuid from './CbCompanyUuid';
+import CbMachineUuid from './CbMachineUuid';
+import CbProjectUuid from './CbProjectUuid';
+import City from './City';
+import Co2Eq from './Co2Eq';
+import Co2I from './Co2I';
+import Lat from './Lat';
+import Lon from './Lon';
+import ProjectId from './ProjectId';
+
+/**
+ * The CIMeasurementOld model module.
+ * @module model/CIMeasurementOld
+ * @version 0.1.0
+ */
+class CIMeasurementOld {
+ /**
+ * Constructs a new CIMeasurementOld
.
+ * @alias module:model/CIMeasurementOld
+ * @extends Object
+ * @param energyValue {Number}
+ * @param energyUnit {String}
+ * @param repo {String}
+ * @param branch {String}
+ * @param cpu {String}
+ * @param cpuUtilAvg {Number}
+ * @param commitHash {String}
+ * @param workflow {String}
+ * @param runId {String}
+ * @param source {String}
+ * @param label {String}
+ * @param duration {Number}
+ */
+ constructor(energyValue, energyUnit, repo, branch, cpu, cpuUtilAvg, commitHash, workflow, runId, source, label, duration) {
+
+ CIMeasurementOld.initialize(this, energyValue, energyUnit, repo, branch, cpu, cpuUtilAvg, commitHash, workflow, runId, source, label, duration);
+ }
+
+ /**
+ * Initializes the fields of this object.
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
+ * Only for internal use.
+ */
+ static initialize(obj, energyValue, energyUnit, repo, branch, cpu, cpuUtilAvg, commitHash, workflow, runId, source, label, duration) {
+ obj['energy_value'] = energyValue;
+ obj['energy_unit'] = energyUnit;
+ obj['repo'] = repo;
+ obj['branch'] = branch;
+ obj['cpu'] = cpu;
+ obj['cpu_util_avg'] = cpuUtilAvg;
+ obj['commit_hash'] = commitHash;
+ obj['workflow'] = workflow;
+ obj['run_id'] = runId;
+ obj['source'] = source;
+ obj['label'] = label;
+ obj['duration'] = duration;
+ }
+
+ /**
+ * Constructs a CIMeasurementOld
from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data
to obj
if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:model/CIMeasurementOld} obj Optional instance to populate.
+ * @return {module:model/CIMeasurementOld} The populated CIMeasurementOld
instance.
+ */
+ static constructFromObject(data, obj) {
+ if (data) {
+ obj = obj || new CIMeasurementOld();
+
+ ApiClient.constructFromObject(data, obj, 'Object');
+
+
+ if (data.hasOwnProperty('energy_value')) {
+ obj['energy_value'] = ApiClient.convertToType(data['energy_value'], 'Number');
+ }
+ if (data.hasOwnProperty('energy_unit')) {
+ obj['energy_unit'] = ApiClient.convertToType(data['energy_unit'], 'String');
+ }
+ if (data.hasOwnProperty('repo')) {
+ obj['repo'] = ApiClient.convertToType(data['repo'], 'String');
+ }
+ if (data.hasOwnProperty('branch')) {
+ obj['branch'] = ApiClient.convertToType(data['branch'], 'String');
+ }
+ if (data.hasOwnProperty('cpu')) {
+ obj['cpu'] = ApiClient.convertToType(data['cpu'], 'String');
+ }
+ if (data.hasOwnProperty('cpu_util_avg')) {
+ obj['cpu_util_avg'] = ApiClient.convertToType(data['cpu_util_avg'], 'Number');
+ }
+ if (data.hasOwnProperty('commit_hash')) {
+ obj['commit_hash'] = ApiClient.convertToType(data['commit_hash'], 'String');
+ }
+ if (data.hasOwnProperty('workflow')) {
+ obj['workflow'] = ApiClient.convertToType(data['workflow'], 'String');
+ }
+ if (data.hasOwnProperty('run_id')) {
+ obj['run_id'] = ApiClient.convertToType(data['run_id'], 'String');
+ }
+ if (data.hasOwnProperty('source')) {
+ obj['source'] = ApiClient.convertToType(data['source'], 'String');
+ }
+ if (data.hasOwnProperty('label')) {
+ obj['label'] = ApiClient.convertToType(data['label'], 'String');
+ }
+ if (data.hasOwnProperty('duration')) {
+ obj['duration'] = ApiClient.convertToType(data['duration'], 'Number');
+ }
+ if (data.hasOwnProperty('workflow_name')) {
+ obj['workflow_name'] = ApiClient.convertToType(data['workflow_name'], 'String');
+ }
+ if (data.hasOwnProperty('cb_company_uuid')) {
+ obj['cb_company_uuid'] = CbCompanyUuid.constructFromObject(data['cb_company_uuid']);
+ }
+ if (data.hasOwnProperty('cb_project_uuid')) {
+ obj['cb_project_uuid'] = CbProjectUuid.constructFromObject(data['cb_project_uuid']);
+ }
+ if (data.hasOwnProperty('cb_machine_uuid')) {
+ obj['cb_machine_uuid'] = CbMachineUuid.constructFromObject(data['cb_machine_uuid']);
+ }
+ if (data.hasOwnProperty('lat')) {
+ obj['lat'] = Lat.constructFromObject(data['lat']);
+ }
+ if (data.hasOwnProperty('lon')) {
+ obj['lon'] = Lon.constructFromObject(data['lon']);
+ }
+ if (data.hasOwnProperty('city')) {
+ obj['city'] = City.constructFromObject(data['city']);
+ }
+ if (data.hasOwnProperty('co2i')) {
+ obj['co2i'] = Co2I.constructFromObject(data['co2i']);
+ }
+ if (data.hasOwnProperty('co2eq')) {
+ obj['co2eq'] = Co2Eq.constructFromObject(data['co2eq']);
+ }
+ if (data.hasOwnProperty('project_id')) {
+ obj['project_id'] = ProjectId.constructFromObject(data['project_id']);
+ }
+ }
+ return obj;
+ }
+
+ /**
+ * Validates the JSON data with respect to CIMeasurementOld
.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @return {boolean} to indicate whether the JSON data is valid with respect to CIMeasurementOld
.
+ */
+ static validateJSON(data) {
+ // check to make sure all required properties are present in the JSON string
+ for (const property of CIMeasurementOld.RequiredProperties) {
+ if (!data.hasOwnProperty(property)) {
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
+ }
+ }
+ // ensure the json data is a string
+ if (data['energy_unit'] && !(typeof data['energy_unit'] === 'string' || data['energy_unit'] instanceof String)) {
+ throw new Error("Expected the field `energy_unit` to be a primitive type in the JSON string but got " + data['energy_unit']);
+ }
+ // ensure the json data is a string
+ if (data['repo'] && !(typeof data['repo'] === 'string' || data['repo'] instanceof String)) {
+ throw new Error("Expected the field `repo` to be a primitive type in the JSON string but got " + data['repo']);
+ }
+ // ensure the json data is a string
+ if (data['branch'] && !(typeof data['branch'] === 'string' || data['branch'] instanceof String)) {
+ throw new Error("Expected the field `branch` to be a primitive type in the JSON string but got " + data['branch']);
+ }
+ // ensure the json data is a string
+ if (data['cpu'] && !(typeof data['cpu'] === 'string' || data['cpu'] instanceof String)) {
+ throw new Error("Expected the field `cpu` to be a primitive type in the JSON string but got " + data['cpu']);
+ }
+ // ensure the json data is a string
+ if (data['commit_hash'] && !(typeof data['commit_hash'] === 'string' || data['commit_hash'] instanceof String)) {
+ throw new Error("Expected the field `commit_hash` to be a primitive type in the JSON string but got " + data['commit_hash']);
+ }
+ // ensure the json data is a string
+ if (data['workflow'] && !(typeof data['workflow'] === 'string' || data['workflow'] instanceof String)) {
+ throw new Error("Expected the field `workflow` to be a primitive type in the JSON string but got " + data['workflow']);
+ }
+ // ensure the json data is a string
+ if (data['run_id'] && !(typeof data['run_id'] === 'string' || data['run_id'] instanceof String)) {
+ throw new Error("Expected the field `run_id` to be a primitive type in the JSON string but got " + data['run_id']);
+ }
+ // ensure the json data is a string
+ if (data['source'] && !(typeof data['source'] === 'string' || data['source'] instanceof String)) {
+ throw new Error("Expected the field `source` to be a primitive type in the JSON string but got " + data['source']);
+ }
+ // ensure the json data is a string
+ if (data['label'] && !(typeof data['label'] === 'string' || data['label'] instanceof String)) {
+ throw new Error("Expected the field `label` to be a primitive type in the JSON string but got " + data['label']);
+ }
+ // ensure the json data is a string
+ if (data['workflow_name'] && !(typeof data['workflow_name'] === 'string' || data['workflow_name'] instanceof String)) {
+ throw new Error("Expected the field `workflow_name` to be a primitive type in the JSON string but got " + data['workflow_name']);
+ }
+ // validate the optional field `cb_company_uuid`
+ if (data['cb_company_uuid']) { // data not null
+ CbCompanyUuid.validateJSON(data['cb_company_uuid']);
+ }
+ // validate the optional field `cb_project_uuid`
+ if (data['cb_project_uuid']) { // data not null
+ CbProjectUuid.validateJSON(data['cb_project_uuid']);
+ }
+ // validate the optional field `cb_machine_uuid`
+ if (data['cb_machine_uuid']) { // data not null
+ CbMachineUuid.validateJSON(data['cb_machine_uuid']);
+ }
+ // validate the optional field `lat`
+ if (data['lat']) { // data not null
+ Lat.validateJSON(data['lat']);
+ }
+ // validate the optional field `lon`
+ if (data['lon']) { // data not null
+ Lon.validateJSON(data['lon']);
+ }
+ // validate the optional field `city`
+ if (data['city']) { // data not null
+ City.validateJSON(data['city']);
+ }
+ // validate the optional field `co2i`
+ if (data['co2i']) { // data not null
+ Co2I.validateJSON(data['co2i']);
+ }
+ // validate the optional field `co2eq`
+ if (data['co2eq']) { // data not null
+ Co2Eq.validateJSON(data['co2eq']);
+ }
+ // validate the optional field `project_id`
+ if (data['project_id']) { // data not null
+ ProjectId.validateJSON(data['project_id']);
+ }
+
+ return true;
+ }
+
+
+}
+
+CIMeasurementOld.RequiredProperties = ["energy_value", "energy_unit", "repo", "branch", "cpu", "cpu_util_avg", "commit_hash", "workflow", "run_id", "source", "label", "duration"];
+
+/**
+ * @member {Number} energy_value
+ */
+CIMeasurementOld.prototype['energy_value'] = undefined;
+
+/**
+ * @member {String} energy_unit
+ */
+CIMeasurementOld.prototype['energy_unit'] = undefined;
+
+/**
+ * @member {String} repo
+ */
+CIMeasurementOld.prototype['repo'] = undefined;
+
+/**
+ * @member {String} branch
+ */
+CIMeasurementOld.prototype['branch'] = undefined;
+
+/**
+ * @member {String} cpu
+ */
+CIMeasurementOld.prototype['cpu'] = undefined;
+
+/**
+ * @member {Number} cpu_util_avg
+ */
+CIMeasurementOld.prototype['cpu_util_avg'] = undefined;
+
+/**
+ * @member {String} commit_hash
+ */
+CIMeasurementOld.prototype['commit_hash'] = undefined;
+
+/**
+ * @member {String} workflow
+ */
+CIMeasurementOld.prototype['workflow'] = undefined;
+
+/**
+ * @member {String} run_id
+ */
+CIMeasurementOld.prototype['run_id'] = undefined;
+
+/**
+ * @member {String} source
+ */
+CIMeasurementOld.prototype['source'] = undefined;
+
+/**
+ * @member {String} label
+ */
+CIMeasurementOld.prototype['label'] = undefined;
+
+/**
+ * @member {Number} duration
+ */
+CIMeasurementOld.prototype['duration'] = undefined;
+
+/**
+ * @member {String} workflow_name
+ */
+CIMeasurementOld.prototype['workflow_name'] = undefined;
+
+/**
+ * @member {module:model/CbCompanyUuid} cb_company_uuid
+ */
+CIMeasurementOld.prototype['cb_company_uuid'] = undefined;
+
+/**
+ * @member {module:model/CbProjectUuid} cb_project_uuid
+ */
+CIMeasurementOld.prototype['cb_project_uuid'] = undefined;
+
+/**
+ * @member {module:model/CbMachineUuid} cb_machine_uuid
+ */
+CIMeasurementOld.prototype['cb_machine_uuid'] = undefined;
+
+/**
+ * @member {module:model/Lat} lat
+ */
+CIMeasurementOld.prototype['lat'] = undefined;
+
+/**
+ * @member {module:model/Lon} lon
+ */
+CIMeasurementOld.prototype['lon'] = undefined;
+
+/**
+ * @member {module:model/City} city
+ */
+CIMeasurementOld.prototype['city'] = undefined;
+
+/**
+ * @member {module:model/Co2I} co2i
+ */
+CIMeasurementOld.prototype['co2i'] = undefined;
+
+/**
+ * @member {module:model/Co2Eq} co2eq
+ */
+CIMeasurementOld.prototype['co2eq'] = undefined;
+
+/**
+ * @member {module:model/ProjectId} project_id
+ */
+CIMeasurementOld.prototype['project_id'] = undefined;
+
+
+
+
+
+
+export default CIMeasurementOld;
+
diff --git a/frontend/js/api/src/model/CarbonIntensityG.js b/frontend/js/api/src/model/CarbonIntensityG.js
new file mode 100644
index 00000000..4bfe3f2a
--- /dev/null
+++ b/frontend/js/api/src/model/CarbonIntensityG.js
@@ -0,0 +1,15 @@
+/**
+ * FastAPI
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+import ApiClient from '../ApiClient';
+// TODO: add anyof model support
diff --git a/frontend/js/api/src/model/CarbonUg.js b/frontend/js/api/src/model/CarbonUg.js
new file mode 100644
index 00000000..4bfe3f2a
--- /dev/null
+++ b/frontend/js/api/src/model/CarbonUg.js
@@ -0,0 +1,15 @@
+/**
+ * FastAPI
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+import ApiClient from '../ApiClient';
+// TODO: add anyof model support
diff --git a/frontend/js/api/src/model/CbCompanyUuid.js b/frontend/js/api/src/model/CbCompanyUuid.js
new file mode 100644
index 00000000..4bfe3f2a
--- /dev/null
+++ b/frontend/js/api/src/model/CbCompanyUuid.js
@@ -0,0 +1,15 @@
+/**
+ * FastAPI
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+import ApiClient from '../ApiClient';
+// TODO: add anyof model support
diff --git a/frontend/js/api/src/model/CbMachineUuid.js b/frontend/js/api/src/model/CbMachineUuid.js
new file mode 100644
index 00000000..4bfe3f2a
--- /dev/null
+++ b/frontend/js/api/src/model/CbMachineUuid.js
@@ -0,0 +1,15 @@
+/**
+ * FastAPI
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+import ApiClient from '../ApiClient';
+// TODO: add anyof model support
diff --git a/frontend/js/api/src/model/CbProjectUuid.js b/frontend/js/api/src/model/CbProjectUuid.js
new file mode 100644
index 00000000..4bfe3f2a
--- /dev/null
+++ b/frontend/js/api/src/model/CbProjectUuid.js
@@ -0,0 +1,15 @@
+/**
+ * FastAPI
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+import ApiClient from '../ApiClient';
+// TODO: add anyof model support
diff --git a/frontend/js/api/src/model/City.js b/frontend/js/api/src/model/City.js
new file mode 100644
index 00000000..4bfe3f2a
--- /dev/null
+++ b/frontend/js/api/src/model/City.js
@@ -0,0 +1,15 @@
+/**
+ * FastAPI
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+import ApiClient from '../ApiClient';
+// TODO: add anyof model support
diff --git a/frontend/js/api/src/model/Co2Eq.js b/frontend/js/api/src/model/Co2Eq.js
new file mode 100644
index 00000000..4bfe3f2a
--- /dev/null
+++ b/frontend/js/api/src/model/Co2Eq.js
@@ -0,0 +1,15 @@
+/**
+ * FastAPI
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+import ApiClient from '../ApiClient';
+// TODO: add anyof model support
diff --git a/frontend/js/api/src/model/Co2I.js b/frontend/js/api/src/model/Co2I.js
new file mode 100644
index 00000000..4bfe3f2a
--- /dev/null
+++ b/frontend/js/api/src/model/Co2I.js
@@ -0,0 +1,15 @@
+/**
+ * FastAPI
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+import ApiClient from '../ApiClient';
+// TODO: add anyof model support
diff --git a/frontend/js/api/src/model/Email.js b/frontend/js/api/src/model/Email.js
new file mode 100644
index 00000000..4bfe3f2a
--- /dev/null
+++ b/frontend/js/api/src/model/Email.js
@@ -0,0 +1,15 @@
+/**
+ * FastAPI
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+import ApiClient from '../ApiClient';
+// TODO: add anyof model support
diff --git a/frontend/js/api/src/model/FilterMachine.js b/frontend/js/api/src/model/FilterMachine.js
new file mode 100644
index 00000000..4bfe3f2a
--- /dev/null
+++ b/frontend/js/api/src/model/FilterMachine.js
@@ -0,0 +1,15 @@
+/**
+ * FastAPI
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+import ApiClient from '../ApiClient';
+// TODO: add anyof model support
diff --git a/frontend/js/api/src/model/FilterProject.js b/frontend/js/api/src/model/FilterProject.js
new file mode 100644
index 00000000..4bfe3f2a
--- /dev/null
+++ b/frontend/js/api/src/model/FilterProject.js
@@ -0,0 +1,15 @@
+/**
+ * FastAPI
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+import ApiClient from '../ApiClient';
+// TODO: add anyof model support
diff --git a/frontend/js/api/src/model/FilterTags.js b/frontend/js/api/src/model/FilterTags.js
new file mode 100644
index 00000000..4bfe3f2a
--- /dev/null
+++ b/frontend/js/api/src/model/FilterTags.js
@@ -0,0 +1,15 @@
+/**
+ * FastAPI
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+import ApiClient from '../ApiClient';
+// TODO: add anyof model support
diff --git a/frontend/js/api/src/model/FilterType.js b/frontend/js/api/src/model/FilterType.js
new file mode 100644
index 00000000..4bfe3f2a
--- /dev/null
+++ b/frontend/js/api/src/model/FilterType.js
@@ -0,0 +1,15 @@
+/**
+ * FastAPI
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+import ApiClient from '../ApiClient';
+// TODO: add anyof model support
diff --git a/frontend/js/api/src/model/HTTPValidationError.js b/frontend/js/api/src/model/HTTPValidationError.js
new file mode 100644
index 00000000..a9eeb0f1
--- /dev/null
+++ b/frontend/js/api/src/model/HTTPValidationError.js
@@ -0,0 +1,94 @@
+/**
+ * FastAPI
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+import ApiClient from '../ApiClient';
+import ValidationError from './ValidationError';
+
+/**
+ * The HTTPValidationError model module.
+ * @module model/HTTPValidationError
+ * @version 0.1.0
+ */
+class HTTPValidationError {
+ /**
+ * Constructs a new HTTPValidationError
.
+ * @alias module:model/HTTPValidationError
+ */
+ constructor() {
+
+ HTTPValidationError.initialize(this);
+ }
+
+ /**
+ * Initializes the fields of this object.
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
+ * Only for internal use.
+ */
+ static initialize(obj) {
+ }
+
+ /**
+ * Constructs a HTTPValidationError
from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data
to obj
if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:model/HTTPValidationError} obj Optional instance to populate.
+ * @return {module:model/HTTPValidationError} The populated HTTPValidationError
instance.
+ */
+ static constructFromObject(data, obj) {
+ if (data) {
+ obj = obj || new HTTPValidationError();
+
+ if (data.hasOwnProperty('detail')) {
+ obj['detail'] = ApiClient.convertToType(data['detail'], [ValidationError]);
+ }
+ }
+ return obj;
+ }
+
+ /**
+ * Validates the JSON data with respect to HTTPValidationError
.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @return {boolean} to indicate whether the JSON data is valid with respect to HTTPValidationError
.
+ */
+ static validateJSON(data) {
+ if (data['detail']) { // data not null
+ // ensure the json data is an array
+ if (!Array.isArray(data['detail'])) {
+ throw new Error("Expected the field `detail` to be an array in the JSON data but got " + data['detail']);
+ }
+ // validate the optional field `detail` (array)
+ for (const item of data['detail']) {
+ ValidationError.validateJSON(item);
+ };
+ }
+
+ return true;
+ }
+
+
+}
+
+
+
+/**
+ * @member {Array.JobChange
.
+ * @alias module:model/JobChange
+ * @extends Object
+ * @param jobId {Number}
+ * @param action {String}
+ */
+ constructor(jobId, action) {
+
+ JobChange.initialize(this, jobId, action);
+ }
+
+ /**
+ * Initializes the fields of this object.
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
+ * Only for internal use.
+ */
+ static initialize(obj, jobId, action) {
+ obj['job_id'] = jobId;
+ obj['action'] = action;
+ }
+
+ /**
+ * Constructs a JobChange
from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data
to obj
if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:model/JobChange} obj Optional instance to populate.
+ * @return {module:model/JobChange} The populated JobChange
instance.
+ */
+ static constructFromObject(data, obj) {
+ if (data) {
+ obj = obj || new JobChange();
+
+ ApiClient.constructFromObject(data, obj, 'Object');
+
+
+ if (data.hasOwnProperty('job_id')) {
+ obj['job_id'] = ApiClient.convertToType(data['job_id'], 'Number');
+ }
+ if (data.hasOwnProperty('action')) {
+ obj['action'] = ApiClient.convertToType(data['action'], 'String');
+ }
+ }
+ return obj;
+ }
+
+ /**
+ * Validates the JSON data with respect to JobChange
.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @return {boolean} to indicate whether the JSON data is valid with respect to JobChange
.
+ */
+ static validateJSON(data) {
+ // check to make sure all required properties are present in the JSON string
+ for (const property of JobChange.RequiredProperties) {
+ if (!data.hasOwnProperty(property)) {
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
+ }
+ }
+ // ensure the json data is a string
+ if (data['action'] && !(typeof data['action'] === 'string' || data['action'] instanceof String)) {
+ throw new Error("Expected the field `action` to be a primitive type in the JSON string but got " + data['action']);
+ }
+
+ return true;
+ }
+
+
+}
+
+JobChange.RequiredProperties = ["job_id", "action"];
+
+/**
+ * @member {Number} job_id
+ */
+JobChange.prototype['job_id'] = undefined;
+
+/**
+ * @member {String} action
+ */
+JobChange.prototype['action'] = undefined;
+
+
+
+
+
+
+export default JobChange;
+
diff --git a/frontend/js/api/src/model/Lat.js b/frontend/js/api/src/model/Lat.js
new file mode 100644
index 00000000..4bfe3f2a
--- /dev/null
+++ b/frontend/js/api/src/model/Lat.js
@@ -0,0 +1,15 @@
+/**
+ * FastAPI
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+import ApiClient from '../ApiClient';
+// TODO: add anyof model support
diff --git a/frontend/js/api/src/model/Lon.js b/frontend/js/api/src/model/Lon.js
new file mode 100644
index 00000000..4bfe3f2a
--- /dev/null
+++ b/frontend/js/api/src/model/Lon.js
@@ -0,0 +1,15 @@
+/**
+ * FastAPI
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+import ApiClient from '../ApiClient';
+// TODO: add anyof model support
diff --git a/frontend/js/api/src/model/Note.js b/frontend/js/api/src/model/Note.js
new file mode 100644
index 00000000..4bfe3f2a
--- /dev/null
+++ b/frontend/js/api/src/model/Note.js
@@ -0,0 +1,15 @@
+/**
+ * FastAPI
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+import ApiClient from '../ApiClient';
+// TODO: add anyof model support
diff --git a/frontend/js/api/src/model/ProjectId.js b/frontend/js/api/src/model/ProjectId.js
new file mode 100644
index 00000000..4bfe3f2a
--- /dev/null
+++ b/frontend/js/api/src/model/ProjectId.js
@@ -0,0 +1,15 @@
+/**
+ * FastAPI
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+import ApiClient from '../ApiClient';
+// TODO: add anyof model support
diff --git a/frontend/js/api/src/model/Software.js b/frontend/js/api/src/model/Software.js
new file mode 100644
index 00000000..33357c51
--- /dev/null
+++ b/frontend/js/api/src/model/Software.js
@@ -0,0 +1,204 @@
+/**
+ * FastAPI
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+import ApiClient from '../ApiClient';
+import Email from './Email';
+import ImageUrl from './ImageUrl';
+import UsageScenarioVariables from './UsageScenarioVariables';
+
+/**
+ * The Software model module.
+ * @module model/Software
+ * @version 0.1.0
+ */
+class Software {
+ /**
+ * Constructs a new Software
.
+ * @alias module:model/Software
+ * @extends Object
+ * @param name {String}
+ * @param repoUrl {String}
+ * @param filename {String}
+ * @param branch {String}
+ * @param machineId {Number}
+ * @param scheduleMode {String}
+ */
+ constructor(name, repoUrl, filename, branch, machineId, scheduleMode) {
+
+ Software.initialize(this, name, repoUrl, filename, branch, machineId, scheduleMode);
+ }
+
+ /**
+ * Initializes the fields of this object.
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
+ * Only for internal use.
+ */
+ static initialize(obj, name, repoUrl, filename, branch, machineId, scheduleMode) {
+ obj['name'] = name;
+ obj['repo_url'] = repoUrl;
+ obj['filename'] = filename;
+ obj['branch'] = branch;
+ obj['machine_id'] = machineId;
+ obj['schedule_mode'] = scheduleMode;
+ }
+
+ /**
+ * Constructs a Software
from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data
to obj
if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:model/Software} obj Optional instance to populate.
+ * @return {module:model/Software} The populated Software
instance.
+ */
+ static constructFromObject(data, obj) {
+ if (data) {
+ obj = obj || new Software();
+
+ ApiClient.constructFromObject(data, obj, 'Object');
+
+
+ if (data.hasOwnProperty('name')) {
+ obj['name'] = ApiClient.convertToType(data['name'], 'String');
+ }
+ if (data.hasOwnProperty('image_url')) {
+ obj['image_url'] = ImageUrl.constructFromObject(data['image_url']);
+ }
+ if (data.hasOwnProperty('repo_url')) {
+ obj['repo_url'] = ApiClient.convertToType(data['repo_url'], 'String');
+ }
+ if (data.hasOwnProperty('email')) {
+ obj['email'] = Email.constructFromObject(data['email']);
+ }
+ if (data.hasOwnProperty('filename')) {
+ obj['filename'] = ApiClient.convertToType(data['filename'], 'String');
+ }
+ if (data.hasOwnProperty('branch')) {
+ obj['branch'] = ApiClient.convertToType(data['branch'], 'String');
+ }
+ if (data.hasOwnProperty('machine_id')) {
+ obj['machine_id'] = ApiClient.convertToType(data['machine_id'], 'Number');
+ }
+ if (data.hasOwnProperty('schedule_mode')) {
+ obj['schedule_mode'] = ApiClient.convertToType(data['schedule_mode'], 'String');
+ }
+ if (data.hasOwnProperty('usage_scenario_variables')) {
+ obj['usage_scenario_variables'] = UsageScenarioVariables.constructFromObject(data['usage_scenario_variables']);
+ }
+ }
+ return obj;
+ }
+
+ /**
+ * Validates the JSON data with respect to Software
.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @return {boolean} to indicate whether the JSON data is valid with respect to Software
.
+ */
+ static validateJSON(data) {
+ // check to make sure all required properties are present in the JSON string
+ for (const property of Software.RequiredProperties) {
+ if (!data.hasOwnProperty(property)) {
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
+ }
+ }
+ // ensure the json data is a string
+ if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
+ throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
+ }
+ // validate the optional field `image_url`
+ if (data['image_url']) { // data not null
+ ImageUrl.validateJSON(data['image_url']);
+ }
+ // ensure the json data is a string
+ if (data['repo_url'] && !(typeof data['repo_url'] === 'string' || data['repo_url'] instanceof String)) {
+ throw new Error("Expected the field `repo_url` to be a primitive type in the JSON string but got " + data['repo_url']);
+ }
+ // validate the optional field `email`
+ if (data['email']) { // data not null
+ Email.validateJSON(data['email']);
+ }
+ // ensure the json data is a string
+ if (data['filename'] && !(typeof data['filename'] === 'string' || data['filename'] instanceof String)) {
+ throw new Error("Expected the field `filename` to be a primitive type in the JSON string but got " + data['filename']);
+ }
+ // ensure the json data is a string
+ if (data['branch'] && !(typeof data['branch'] === 'string' || data['branch'] instanceof String)) {
+ throw new Error("Expected the field `branch` to be a primitive type in the JSON string but got " + data['branch']);
+ }
+ // ensure the json data is a string
+ if (data['schedule_mode'] && !(typeof data['schedule_mode'] === 'string' || data['schedule_mode'] instanceof String)) {
+ throw new Error("Expected the field `schedule_mode` to be a primitive type in the JSON string but got " + data['schedule_mode']);
+ }
+ // validate the optional field `usage_scenario_variables`
+ if (data['usage_scenario_variables']) { // data not null
+ UsageScenarioVariables.validateJSON(data['usage_scenario_variables']);
+ }
+
+ return true;
+ }
+
+
+}
+
+Software.RequiredProperties = ["name", "repo_url", "filename", "branch", "machine_id", "schedule_mode"];
+
+/**
+ * @member {String} name
+ */
+Software.prototype['name'] = undefined;
+
+/**
+ * @member {module:model/ImageUrl} image_url
+ */
+Software.prototype['image_url'] = undefined;
+
+/**
+ * @member {String} repo_url
+ */
+Software.prototype['repo_url'] = undefined;
+
+/**
+ * @member {module:model/Email} email
+ */
+Software.prototype['email'] = undefined;
+
+/**
+ * @member {String} filename
+ */
+Software.prototype['filename'] = undefined;
+
+/**
+ * @member {String} branch
+ */
+Software.prototype['branch'] = undefined;
+
+/**
+ * @member {Number} machine_id
+ */
+Software.prototype['machine_id'] = undefined;
+
+/**
+ * @member {String} schedule_mode
+ */
+Software.prototype['schedule_mode'] = undefined;
+
+/**
+ * @member {module:model/UsageScenarioVariables} usage_scenario_variables
+ */
+Software.prototype['usage_scenario_variables'] = undefined;
+
+
+
+
+
+
+export default Software;
+
diff --git a/frontend/js/api/src/model/UsageScenarioVariables.js b/frontend/js/api/src/model/UsageScenarioVariables.js
new file mode 100644
index 00000000..4bfe3f2a
--- /dev/null
+++ b/frontend/js/api/src/model/UsageScenarioVariables.js
@@ -0,0 +1,15 @@
+/**
+ * FastAPI
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+import ApiClient from '../ApiClient';
+// TODO: add anyof model support
diff --git a/frontend/js/api/src/model/UserSetting.js b/frontend/js/api/src/model/UserSetting.js
new file mode 100644
index 00000000..8155edc2
--- /dev/null
+++ b/frontend/js/api/src/model/UserSetting.js
@@ -0,0 +1,114 @@
+/**
+ * FastAPI
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+import ApiClient from '../ApiClient';
+import Value from './Value';
+
+/**
+ * The UserSetting model module.
+ * @module model/UserSetting
+ * @version 0.1.0
+ */
+class UserSetting {
+ /**
+ * Constructs a new UserSetting
.
+ * @alias module:model/UserSetting
+ * @extends Object
+ * @param name {String}
+ * @param value {module:model/Value}
+ */
+ constructor(name, value) {
+
+ UserSetting.initialize(this, name, value);
+ }
+
+ /**
+ * Initializes the fields of this object.
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
+ * Only for internal use.
+ */
+ static initialize(obj, name, value) {
+ obj['name'] = name;
+ obj['value'] = value;
+ }
+
+ /**
+ * Constructs a UserSetting
from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data
to obj
if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:model/UserSetting} obj Optional instance to populate.
+ * @return {module:model/UserSetting} The populated UserSetting
instance.
+ */
+ static constructFromObject(data, obj) {
+ if (data) {
+ obj = obj || new UserSetting();
+
+ ApiClient.constructFromObject(data, obj, 'Object');
+
+
+ if (data.hasOwnProperty('name')) {
+ obj['name'] = ApiClient.convertToType(data['name'], 'String');
+ }
+ if (data.hasOwnProperty('value')) {
+ obj['value'] = Value.constructFromObject(data['value']);
+ }
+ }
+ return obj;
+ }
+
+ /**
+ * Validates the JSON data with respect to UserSetting
.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @return {boolean} to indicate whether the JSON data is valid with respect to UserSetting
.
+ */
+ static validateJSON(data) {
+ // check to make sure all required properties are present in the JSON string
+ for (const property of UserSetting.RequiredProperties) {
+ if (!data.hasOwnProperty(property)) {
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
+ }
+ }
+ // ensure the json data is a string
+ if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
+ throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
+ }
+ // validate the optional field `value`
+ if (data['value']) { // data not null
+ Value.validateJSON(data['value']);
+ }
+
+ return true;
+ }
+
+
+}
+
+UserSetting.RequiredProperties = ["name", "value"];
+
+/**
+ * @member {String} name
+ */
+UserSetting.prototype['name'] = undefined;
+
+/**
+ * @member {module:model/Value} value
+ */
+UserSetting.prototype['value'] = undefined;
+
+
+
+
+
+
+export default UserSetting;
+
diff --git a/frontend/js/api/src/model/ValidationError.js b/frontend/js/api/src/model/ValidationError.js
new file mode 100644
index 00000000..7c6d42c6
--- /dev/null
+++ b/frontend/js/api/src/model/ValidationError.js
@@ -0,0 +1,130 @@
+/**
+ * FastAPI
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 0.1.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+import ApiClient from '../ApiClient';
+import ValidationErrorLocInner from './ValidationErrorLocInner';
+
+/**
+ * The ValidationError model module.
+ * @module model/ValidationError
+ * @version 0.1.0
+ */
+class ValidationError {
+ /**
+ * Constructs a new ValidationError
.
+ * @alias module:model/ValidationError
+ * @param loc {Array.ValidationError
from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data
to obj
if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:model/ValidationError} obj Optional instance to populate.
+ * @return {module:model/ValidationError} The populated ValidationError
instance.
+ */
+ static constructFromObject(data, obj) {
+ if (data) {
+ obj = obj || new ValidationError();
+
+ if (data.hasOwnProperty('loc')) {
+ obj['loc'] = ApiClient.convertToType(data['loc'], [ValidationErrorLocInner]);
+ }
+ if (data.hasOwnProperty('msg')) {
+ obj['msg'] = ApiClient.convertToType(data['msg'], 'String');
+ }
+ if (data.hasOwnProperty('type')) {
+ obj['type'] = ApiClient.convertToType(data['type'], 'String');
+ }
+ }
+ return obj;
+ }
+
+ /**
+ * Validates the JSON data with respect to ValidationError
.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @return {boolean} to indicate whether the JSON data is valid with respect to ValidationError
.
+ */
+ static validateJSON(data) {
+ // check to make sure all required properties are present in the JSON string
+ for (const property of ValidationError.RequiredProperties) {
+ if (!data.hasOwnProperty(property)) {
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
+ }
+ }
+ if (data['loc']) { // data not null
+ // ensure the json data is an array
+ if (!Array.isArray(data['loc'])) {
+ throw new Error("Expected the field `loc` to be an array in the JSON data but got " + data['loc']);
+ }
+ // validate the optional field `loc` (array)
+ for (const item of data['loc']) {
+ ValidationErrorLocInner.validateJSON(item);
+ };
+ }
+ // ensure the json data is a string
+ if (data['msg'] && !(typeof data['msg'] === 'string' || data['msg'] instanceof String)) {
+ throw new Error("Expected the field `msg` to be a primitive type in the JSON string but got " + data['msg']);
+ }
+ // ensure the json data is a string
+ if (data['type'] && !(typeof data['type'] === 'string' || data['type'] instanceof String)) {
+ throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data['type']);
+ }
+
+ return true;
+ }
+
+
+}
+
+ValidationError.RequiredProperties = ["loc", "msg", "type"];
+
+/**
+ * @member {Array.