/* tslint:disable */ /* eslint-disable */ /** * Deep Lynx * The construction of megaprojects has consistently demonstrated challenges for project managers in regard to meeting cost, schedule, and performance requirements. Megaproject construction challenges are common place within megaprojects with many active projects in the United States failing to meet cost and schedule efforts by significant margins. Currently, engineering teams operate in siloed tools and disparate teams where connections across design, procurement, and construction systems are translated manually or over brittle point-to-point integrations. The manual nature of data exchange increases the risk of silent errors in the reactor design, with each silent error cascading across the design. These cascading errors lead to uncontrollable risk during construction, resulting in significant delays and cost overruns. Deep Lynx allows for an integrated platform during design and operations of mega projects. The Deep Lynx Core API delivers a few main features. 1. Provides a set of methods and endpoints for manipulating data in an object oriented database. This allows us to store complex datatypes as records and then to compile them into actual, modifiable objects at run-time. Users can store taxonomies or ontologies in a readable format. 2. Provides methods for storing and retrieving data in a graph database. This data is structured and validated against the aformentioned object oriented database before storage. * * OpenAPI spec version: 1.0 * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; import { Configuration } from '../configuration'; // Some imports not used depending on template conditions // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; import { CreateTaskResponse } from '../models'; import { GetTaskResponse } from '../models'; import { ListTasksResponse } from '../models'; import { Task } from '../models'; import { UpdateTaskResponse } from '../models'; /** * TasksApi - axios parameter creator * @export */ export const TasksApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Creates a new task * @summary Create Task * @param {string} containerId * @param {Task} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ createTask: async (containerId: string, body?: Task, options: any = {}): Promise => { // verify required parameter 'containerId' is not null or undefined if (containerId === null || containerId === undefined) { throw new RequiredError('containerId','Required parameter containerId was null or undefined when calling createTask.'); } const localVarPath = `/containers/{container_id}/task` .replace(`{${"container_id"}}`, encodeURIComponent(String(containerId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, 'https://example.com'); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication BearerAuth required localVarHeaderParameter['Content-Type'] = 'application/json'; const query = new URLSearchParams(localVarUrlObj.search); for (const key in localVarQueryParameter) { query.set(key, localVarQueryParameter[key]); } for (const key in options.query) { query.set(key, options.query[key]); } localVarUrlObj.search = (new URLSearchParams(query)).toString(); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); return { url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, options: localVarRequestOptions, }; }, /** * Retrieves a specific task by ID * @summary Get Task * @param {string} containerId * @param {string} taskId * @param {*} [options] Override http request option. * @throws {RequiredError} */ getTask: async (containerId: string, taskId: string, options: any = {}): Promise => { // verify required parameter 'containerId' is not null or undefined if (containerId === null || containerId === undefined) { throw new RequiredError('containerId','Required parameter containerId was null or undefined when calling getTask.'); } // verify required parameter 'taskId' is not null or undefined if (taskId === null || taskId === undefined) { throw new RequiredError('taskId','Required parameter taskId was null or undefined when calling getTask.'); } const localVarPath = `/containers/{container_id}/task/{task_id}` .replace(`{${"container_id"}}`, encodeURIComponent(String(containerId))) .replace(`{${"task_id"}}`, encodeURIComponent(String(taskId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, 'https://example.com'); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication BearerAuth required const query = new URLSearchParams(localVarUrlObj.search); for (const key in localVarQueryParameter) { query.set(key, localVarQueryParameter[key]); } for (const key in options.query) { query.set(key, options.query[key]); } localVarUrlObj.search = (new URLSearchParams(query)).toString(); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, options: localVarRequestOptions, }; }, /** * Lists all tasks with a \"ready\" status * @summary List Tasks * @param {string} containerId * @param {*} [options] Override http request option. * @throws {RequiredError} */ listTasks: async (containerId: string, options: any = {}): Promise => { // verify required parameter 'containerId' is not null or undefined if (containerId === null || containerId === undefined) { throw new RequiredError('containerId','Required parameter containerId was null or undefined when calling listTasks.'); } const localVarPath = `/containers/{container_id}/task` .replace(`{${"container_id"}}`, encodeURIComponent(String(containerId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, 'https://example.com'); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication BearerAuth required const query = new URLSearchParams(localVarUrlObj.search); for (const key in localVarQueryParameter) { query.set(key, localVarQueryParameter[key]); } for (const key in options.query) { query.set(key, options.query[key]); } localVarUrlObj.search = (new URLSearchParams(query)).toString(); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, options: localVarRequestOptions, }; }, /** * Updates a task * @summary Update Task * @param {string} containerId * @param {string} taskId * @param {Task} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateTask: async (containerId: string, taskId: string, body?: Task, options: any = {}): Promise => { // verify required parameter 'containerId' is not null or undefined if (containerId === null || containerId === undefined) { throw new RequiredError('containerId','Required parameter containerId was null or undefined when calling updateTask.'); } // verify required parameter 'taskId' is not null or undefined if (taskId === null || taskId === undefined) { throw new RequiredError('taskId','Required parameter taskId was null or undefined when calling updateTask.'); } const localVarPath = `/containers/{container_id}/task/{task_id}` .replace(`{${"container_id"}}`, encodeURIComponent(String(containerId))) .replace(`{${"task_id"}}`, encodeURIComponent(String(taskId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, 'https://example.com'); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication BearerAuth required localVarHeaderParameter['Content-Type'] = 'application/json'; const query = new URLSearchParams(localVarUrlObj.search); for (const key in localVarQueryParameter) { query.set(key, localVarQueryParameter[key]); } for (const key in options.query) { query.set(key, options.query[key]); } localVarUrlObj.search = (new URLSearchParams(query)).toString(); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); return { url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, options: localVarRequestOptions, }; }, } }; /** * TasksApi - functional programming interface * @export */ export const TasksApiFp = function(configuration?: Configuration) { return { /** * Creates a new task * @summary Create Task * @param {string} containerId * @param {Task} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createTask(containerId: string, body?: Task, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await TasksApiAxiosParamCreator(configuration).createTask(containerId, body, options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, /** * Retrieves a specific task by ID * @summary Get Task * @param {string} containerId * @param {string} taskId * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getTask(containerId: string, taskId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await TasksApiAxiosParamCreator(configuration).getTask(containerId, taskId, options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, /** * Lists all tasks with a \"ready\" status * @summary List Tasks * @param {string} containerId * @param {*} [options] Override http request option. * @throws {RequiredError} */ async listTasks(containerId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await TasksApiAxiosParamCreator(configuration).listTasks(containerId, options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, /** * Updates a task * @summary Update Task * @param {string} containerId * @param {string} taskId * @param {Task} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async updateTask(containerId: string, taskId: string, body?: Task, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await TasksApiAxiosParamCreator(configuration).updateTask(containerId, taskId, body, options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, } }; /** * TasksApi - factory interface * @export */ export const TasksApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { return { /** * Creates a new task * @summary Create Task * @param {string} containerId * @param {Task} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ createTask(containerId: string, body?: Task, options?: any): AxiosPromise { return TasksApiFp(configuration).createTask(containerId, body, options).then((request) => request(axios, basePath)); }, /** * Retrieves a specific task by ID * @summary Get Task * @param {string} containerId * @param {string} taskId * @param {*} [options] Override http request option. * @throws {RequiredError} */ getTask(containerId: string, taskId: string, options?: any): AxiosPromise { return TasksApiFp(configuration).getTask(containerId, taskId, options).then((request) => request(axios, basePath)); }, /** * Lists all tasks with a \"ready\" status * @summary List Tasks * @param {string} containerId * @param {*} [options] Override http request option. * @throws {RequiredError} */ listTasks(containerId: string, options?: any): AxiosPromise { return TasksApiFp(configuration).listTasks(containerId, options).then((request) => request(axios, basePath)); }, /** * Updates a task * @summary Update Task * @param {string} containerId * @param {string} taskId * @param {Task} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateTask(containerId: string, taskId: string, body?: Task, options?: any): AxiosPromise { return TasksApiFp(configuration).updateTask(containerId, taskId, body, options).then((request) => request(axios, basePath)); }, }; }; /** * TasksApi - object-oriented interface * @export * @class TasksApi * @extends {BaseAPI} */ export class TasksApi extends BaseAPI { /** * Creates a new task * @summary Create Task * @param {string} containerId * @param {Task} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TasksApi */ public createTask(containerId: string, body?: Task, options?: any) { return TasksApiFp(this.configuration).createTask(containerId, body, options).then((request) => request(this.axios, this.basePath)); } /** * Retrieves a specific task by ID * @summary Get Task * @param {string} containerId * @param {string} taskId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TasksApi */ public getTask(containerId: string, taskId: string, options?: any) { return TasksApiFp(this.configuration).getTask(containerId, taskId, options).then((request) => request(this.axios, this.basePath)); } /** * Lists all tasks with a \"ready\" status * @summary List Tasks * @param {string} containerId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TasksApi */ public listTasks(containerId: string, options?: any) { return TasksApiFp(this.configuration).listTasks(containerId, options).then((request) => request(this.axios, this.basePath)); } /** * Updates a task * @summary Update Task * @param {string} containerId * @param {string} taskId * @param {Task} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TasksApi */ public updateTask(containerId: string, taskId: string, body?: Task, options?: any) { return TasksApiFp(this.configuration).updateTask(containerId, taskId, body, options).then((request) => request(this.axios, this.basePath)); } }