From afb9519a6c68d1938d362725de045e54ca920c10 Mon Sep 17 00:00:00 2001
From: winniehell
+* 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..f20c4f6c
--- /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
+ */
+ compareInRepoV1CompareGetWithHttpInfo(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 compareInRepoV1CompareGet");
+ }
+
+ 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}
+ */
+ compareInRepoV1CompareGet(ids, opts) {
+ return this.compareInRepoV1CompareGetWithHttpInfo(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
+ */
+ diffV1DiffGetWithHttpInfo(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 diffV1DiffGet");
+ }
+
+ 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}
+ */
+ diffV1DiffGet(ids) {
+ return this.diffV1DiffGetWithHttpInfo(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
+ */
+ getBadgeSingleV1BadgeSingleRunIdGetWithHttpInfo(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 getBadgeSingleV1BadgeSingleRunIdGet");
+ }
+
+ 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}
+ */
+ getBadgeSingleV1BadgeSingleRunIdGet(runId, opts) {
+ return this.getBadgeSingleV1BadgeSingleRunIdGetWithHttpInfo(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
+ */
+ getCiBadgeGetV1CiBadgeGetGetWithHttpInfo(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 getCiBadgeGetV1CiBadgeGetGet");
+ }
+ // verify the required parameter 'branch' is set
+ if (branch === undefined || branch === null) {
+ throw new Error("Missing the required parameter 'branch' when calling getCiBadgeGetV1CiBadgeGetGet");
+ }
+ // verify the required parameter 'workflow' is set
+ if (workflow === undefined || workflow === null) {
+ throw new Error("Missing the required parameter 'workflow' when calling getCiBadgeGetV1CiBadgeGetGet");
+ }
+
+ 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}
+ */
+ getCiBadgeGetV1CiBadgeGetGet(repo, branch, workflow, opts) {
+ return this.getCiBadgeGetV1CiBadgeGetGetWithHttpInfo(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
+ */
+ getCiBadgeGetV1CiBadgeGetHeadWithHttpInfo(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 getCiBadgeGetV1CiBadgeGetHead");
+ }
+ // verify the required parameter 'branch' is set
+ if (branch === undefined || branch === null) {
+ throw new Error("Missing the required parameter 'branch' when calling getCiBadgeGetV1CiBadgeGetHead");
+ }
+ // verify the required parameter 'workflow' is set
+ if (workflow === undefined || workflow === null) {
+ throw new Error("Missing the required parameter 'workflow' when calling getCiBadgeGetV1CiBadgeGetHead");
+ }
+
+ 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}
+ */
+ getCiBadgeGetV1CiBadgeGetHead(repo, branch, workflow, opts) {
+ return this.getCiBadgeGetV1CiBadgeGetHeadWithHttpInfo(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
+ */
+ getCiMeasurementsV1CiMeasurementsGetWithHttpInfo(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 getCiMeasurementsV1CiMeasurementsGet");
+ }
+ // verify the required parameter 'branch' is set
+ if (branch === undefined || branch === null) {
+ throw new Error("Missing the required parameter 'branch' when calling getCiMeasurementsV1CiMeasurementsGet");
+ }
+ // verify the required parameter 'workflow' is set
+ if (workflow === undefined || workflow === null) {
+ throw new Error("Missing the required parameter 'workflow' when calling getCiMeasurementsV1CiMeasurementsGet");
+ }
+ // verify the required parameter 'startDate' is set
+ if (startDate === undefined || startDate === null) {
+ throw new Error("Missing the required parameter 'startDate' when calling getCiMeasurementsV1CiMeasurementsGet");
+ }
+ // verify the required parameter 'endDate' is set
+ if (endDate === undefined || endDate === null) {
+ throw new Error("Missing the required parameter 'endDate' when calling getCiMeasurementsV1CiMeasurementsGet");
+ }
+
+ 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}
+ */
+ getCiMeasurementsV1CiMeasurementsGet(repo, branch, workflow, startDate, endDate) {
+ return this.getCiMeasurementsV1CiMeasurementsGetWithHttpInfo(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
+ */
+ getCiRepositoriesV1CiRepositoriesGetWithHttpInfo(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}
+ */
+ getCiRepositoriesV1CiRepositoriesGet(opts) {
+ return this.getCiRepositoriesV1CiRepositoriesGetWithHttpInfo(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
+ */
+ getCiRunsV1CiRunsGetWithHttpInfo(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 getCiRunsV1CiRunsGet");
+ }
+
+ 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}
+ */
+ getCiRunsV1CiRunsGet(repo) {
+ return this.getCiRunsV1CiRunsGetWithHttpInfo(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
+ */
+ getCiStatsV1CiStatsGetWithHttpInfo(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 getCiStatsV1CiStatsGet");
+ }
+ // verify the required parameter 'branch' is set
+ if (branch === undefined || branch === null) {
+ throw new Error("Missing the required parameter 'branch' when calling getCiStatsV1CiStatsGet");
+ }
+ // verify the required parameter 'workflow' is set
+ if (workflow === undefined || workflow === null) {
+ throw new Error("Missing the required parameter 'workflow' when calling getCiStatsV1CiStatsGet");
+ }
+ // verify the required parameter 'startDate' is set
+ if (startDate === undefined || startDate === null) {
+ throw new Error("Missing the required parameter 'startDate' when calling getCiStatsV1CiStatsGet");
+ }
+ // verify the required parameter 'endDate' is set
+ if (endDate === undefined || endDate === null) {
+ throw new Error("Missing the required parameter 'endDate' when calling getCiStatsV1CiStatsGet");
+ }
+
+ 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}
+ */
+ getCiStatsV1CiStatsGet(repo, branch, workflow, startDate, endDate) {
+ return this.getCiStatsV1CiStatsGetWithHttpInfo(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
+ */
+ getInsightsV1CiInsightsGetWithHttpInfo() {
+ 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}
+ */
+ getInsightsV1CiInsightsGet() {
+ return this.getInsightsV1CiInsightsGetWithHttpInfo()
+ .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
+ */
+ getInsightsV1InsightsGetWithHttpInfo() {
+ 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}
+ */
+ getInsightsV1InsightsGet() {
+ return this.getInsightsV1InsightsGetWithHttpInfo()
+ .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
+ */
+ getJobsV2JobsGetWithHttpInfo(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}
+ */
+ getJobsV2JobsGet(opts) {
+ return this.getJobsV2JobsGetWithHttpInfo(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
+ */
+ getMachinesV1MachinesGetWithHttpInfo() {
+ 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}
+ */
+ getMachinesV1MachinesGet() {
+ return this.getMachinesV1MachinesGetWithHttpInfo()
+ .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
+ */
+ getMeasurementsSingleV1MeasurementsSingleRunIdGetWithHttpInfo(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 getMeasurementsSingleV1MeasurementsSingleRunIdGet");
+ }
+
+ 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}
+ */
+ getMeasurementsSingleV1MeasurementsSingleRunIdGet(runId) {
+ return this.getMeasurementsSingleV1MeasurementsSingleRunIdGetWithHttpInfo(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
+ */
+ getNetworkV1NetworkRunIdGetWithHttpInfo(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 getNetworkV1NetworkRunIdGet");
+ }
+
+ 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}
+ */
+ getNetworkV1NetworkRunIdGet(runId) {
+ return this.getNetworkV1NetworkRunIdGetWithHttpInfo(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
+ */
+ getNotesV1NotesRunIdGetWithHttpInfo(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 getNotesV1NotesRunIdGet");
+ }
+
+ 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}
+ */
+ getNotesV1NotesRunIdGet(runId) {
+ return this.getNotesV1NotesRunIdGetWithHttpInfo(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
+ */
+ getOptimizationsV1OptimizationsRunIdGetWithHttpInfo(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 getOptimizationsV1OptimizationsRunIdGet");
+ }
+
+ 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}
+ */
+ getOptimizationsV1OptimizationsRunIdGet(runId) {
+ return this.getOptimizationsV1OptimizationsRunIdGetWithHttpInfo(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
+ */
+ getPhaseStatsSingleV1PhaseStatsSingleRunIdGetWithHttpInfo(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 getPhaseStatsSingleV1PhaseStatsSingleRunIdGet");
+ }
+
+ 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}
+ */
+ getPhaseStatsSingleV1PhaseStatsSingleRunIdGet(runId) {
+ return this.getPhaseStatsSingleV1PhaseStatsSingleRunIdGetWithHttpInfo(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
+ */
+ getRepositoriesV1RepositoriesGetWithHttpInfo(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}
+ */
+ getRepositoriesV1RepositoriesGet(opts) {
+ return this.getRepositoriesV1RepositoriesGetWithHttpInfo(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
+ */
+ getRunV2RunRunIdGetWithHttpInfo(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 getRunV2RunRunIdGet");
+ }
+
+ 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}
+ */
+ getRunV2RunRunIdGet(runId) {
+ return this.getRunV2RunRunIdGetWithHttpInfo(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
+ */
+ getRunsV2RunsGetWithHttpInfo(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}
+ */
+ getRunsV2RunsGet(opts) {
+ return this.getRunsV2RunsGetWithHttpInfo(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
+ */
+ getTimelineBadgeV1BadgeTimelineGetWithHttpInfo(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 getTimelineBadgeV1BadgeTimelineGet");
+ }
+ // verify the required parameter 'uri' is set
+ if (uri === undefined || uri === null) {
+ throw new Error("Missing the required parameter 'uri' when calling getTimelineBadgeV1BadgeTimelineGet");
+ }
+
+ 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}
+ */
+ getTimelineBadgeV1BadgeTimelineGet(metric, uri, opts) {
+ return this.getTimelineBadgeV1BadgeTimelineGetWithHttpInfo(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
+ */
+ getTimelineStatsV1TimelineGetWithHttpInfo(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 getTimelineStatsV1TimelineGet");
+ }
+ // verify the required parameter 'machineId' is set
+ if (machineId === undefined || machineId === null) {
+ throw new Error("Missing the required parameter 'machineId' when calling getTimelineStatsV1TimelineGet");
+ }
+
+ 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}
+ */
+ getTimelineStatsV1TimelineGet(uri, machineId, opts) {
+ return this.getTimelineStatsV1TimelineGetWithHttpInfo(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
+ */
+ getUserSettingsV1UserSettingsGetWithHttpInfo() {
+ 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}
+ */
+ getUserSettingsV1UserSettingsGet() {
+ return this.getUserSettingsV1UserSettingsGetWithHttpInfo()
+ .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
+ */
+ getWatchlistV1WatchlistGetWithHttpInfo() {
+ 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}
+ */
+ getWatchlistV1WatchlistGet() {
+ return this.getWatchlistV1WatchlistGetWithHttpInfo()
+ .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
+ */
+ homeGetWithHttpInfo() {
+ 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}
+ */
+ homeGet() {
+ return this.homeGetWithHttpInfo()
+ .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
+ */
+ oldV1JobsEndpointV1JobsGetWithHttpInfo() {
+ 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}
+ */
+ oldV1JobsEndpointV1JobsGet() {
+ return this.oldV1JobsEndpointV1JobsGetWithHttpInfo()
+ .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
+ */
+ oldV1RunEndpointV1RunRunIdGetWithHttpInfo() {
+ 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}
+ */
+ oldV1RunEndpointV1RunRunIdGet() {
+ return this.oldV1RunEndpointV1RunRunIdGetWithHttpInfo()
+ .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
+ */
+ oldV1RunsEndpointV1RunsGetWithHttpInfo() {
+ 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}
+ */
+ oldV1RunsEndpointV1RunsGet() {
+ return this.oldV1RunsEndpointV1RunsGetWithHttpInfo()
+ .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
+ */
+ postCiMeasurementAddDeprecatedV1CiMeasurementAddPostWithHttpInfo(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 postCiMeasurementAddDeprecatedV1CiMeasurementAddPost");
+ }
+
+ 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}
+ */
+ postCiMeasurementAddDeprecatedV1CiMeasurementAddPost(cIMeasurementOld) {
+ return this.postCiMeasurementAddDeprecatedV1CiMeasurementAddPostWithHttpInfo(cIMeasurementOld)
+ .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
+ */
+ postCiMeasurementAddV2CiMeasurementAddPostWithHttpInfo(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 postCiMeasurementAddV2CiMeasurementAddPost");
+ }
+
+ 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}
+ */
+ postCiMeasurementAddV2CiMeasurementAddPost(cIMeasurement) {
+ return this.postCiMeasurementAddV2CiMeasurementAddPostWithHttpInfo(cIMeasurement)
+ .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
+ */
+ robotsTxtRobotsTxtGetWithHttpInfo() {
+ 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}
+ */
+ robotsTxtRobotsTxtGet() {
+ return this.robotsTxtRobotsTxtGetWithHttpInfo()
+ .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
+ */
+ softwareAddV1SoftwareAddPostWithHttpInfo(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 softwareAddV1SoftwareAddPost");
+ }
+
+ 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}
+ */
+ softwareAddV1SoftwareAddPost(software) {
+ return this.softwareAddV1SoftwareAddPostWithHttpInfo(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
+ */
+ updateJobV1JobPutWithHttpInfo(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 updateJobV1JobPut");
+ }
+
+ 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}
+ */
+ updateJobV1JobPut(jobChange) {
+ return this.updateJobV1JobPutWithHttpInfo(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
+ */
+ updateUserSettingV1UserSettingPutWithHttpInfo(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 updateUserSettingV1UserSettingPut");
+ }
+
+ 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}
+ */
+ updateUserSettingV1UserSettingPut(userSetting) {
+ return this.updateUserSettingV1UserSettingPutWithHttpInfo(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.