/* 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 { InlineResponse200 } from '../models'; /** * DataQueryApi - axios parameter creator * @export */ export const DataQueryApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Query the graph of the specified container using GraphQL. GraphQL queries may be formatted as json or plain text. * @summary Query Graph * @param {any} body * @param {string} containerId * @param {*} [options] Override http request option. * @throws {RequiredError} */ queryGraph: async (body: any, containerId: string, options: any = {}): Promise => { // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new RequiredError('body','Required parameter body was null or undefined when calling queryGraph.'); } // 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 queryGraph.'); } const localVarPath = `/containers/{container_id}/query` .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, }; }, } }; /** * DataQueryApi - functional programming interface * @export */ export const DataQueryApiFp = function(configuration?: Configuration) { return { /** * Query the graph of the specified container using GraphQL. GraphQL queries may be formatted as json or plain text. * @summary Query Graph * @param {any} body * @param {string} containerId * @param {*} [options] Override http request option. * @throws {RequiredError} */ async queryGraph(body: any, containerId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await DataQueryApiAxiosParamCreator(configuration).queryGraph(body, containerId, options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, } }; /** * DataQueryApi - factory interface * @export */ export const DataQueryApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { return { /** * Query the graph of the specified container using GraphQL. GraphQL queries may be formatted as json or plain text. * @summary Query Graph * @param {any} body * @param {string} containerId * @param {*} [options] Override http request option. * @throws {RequiredError} */ queryGraph(body: any, containerId: string, options?: any): AxiosPromise { return DataQueryApiFp(configuration).queryGraph(body, containerId, options).then((request) => request(axios, basePath)); }, }; }; /** * DataQueryApi - object-oriented interface * @export * @class DataQueryApi * @extends {BaseAPI} */ export class DataQueryApi extends BaseAPI { /** * Query the graph of the specified container using GraphQL. GraphQL queries may be formatted as json or plain text. * @summary Query Graph * @param {any} body * @param {string} containerId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DataQueryApi */ public queryGraph(body: any, containerId: string, options?: any) { return DataQueryApiFp(this.configuration).queryGraph(body, containerId, options).then((request) => request(this.axios, this.basePath)); } }