/* 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 { RSACancelRequest } from '../models'; import { RSAInitRequest } from '../models'; import { RSAResponse } from '../models'; import { RSAStatusRequest } from '../models'; import { RSAStatusResponse } from '../models'; import { RSAVerifyRequest } from '../models'; import { TokenExchangeRequest } from '../models'; /** * AuthenticationApi - axios parameter creator * @export */ export const AuthenticationApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Exchanges credentials for a JSON Web Token (JWT). Multiple authentication flows are supported, see Deep Lynx documentation for details. * @summary Exchange OAuth Token * @param {TokenExchangeRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ exchangeOAuthToken: async (body?: TokenExchangeRequest, options: any = {}): Promise => { const localVarPath = `/oauth/exchange`; // 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, }; }, /** * Returns an OAuth token. The API key and secret must be supplied. * @summary Retrieve OAuth Token * @param {string} xApiKey The API key * @param {string} xApiSecret The API secret * @param {string} [xApiExpiry] The API expiry date * @param {*} [options] Override http request option. * @throws {RequiredError} */ retrieveOAuthToken: async (xApiKey: string, xApiSecret: string, xApiExpiry?: string, options: any = {}): Promise => { // verify required parameter 'xApiKey' is not null or undefined if (xApiKey === null || xApiKey === undefined) { throw new RequiredError('xApiKey','Required parameter xApiKey was null or undefined when calling retrieveOAuthToken.'); } // verify required parameter 'xApiSecret' is not null or undefined if (xApiSecret === null || xApiSecret === undefined) { throw new RequiredError('xApiSecret','Required parameter xApiSecret was null or undefined when calling retrieveOAuthToken.'); } const localVarPath = `/oauth/token`; // 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 if (xApiKey !== undefined && xApiKey !== null) { localVarHeaderParameter['x-api-key'] = String(xApiKey); } if (xApiSecret !== undefined && xApiSecret !== null) { localVarHeaderParameter['x-api-secret'] = String(xApiSecret); } if (xApiExpiry !== undefined && xApiExpiry !== null) { localVarHeaderParameter['x-api-expiry'] = String(xApiExpiry); } 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, }; }, /** * Cancels an RSA authentication attempt * @summary RSA Cancel * @param {RSACancelRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ rsaCancel: async (body?: RSACancelRequest, options: any = {}): Promise => { const localVarPath = `/rsa/cancel`; // 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, }; }, /** * Used to begin (and optionally complete) an RSA authentication. Either a user's ID may be provided and the SecurID provided in a later `verify` request, or else the user may provide both the user ID (`subjectName`) and `securID` at once to `initialize` to complete the authentication request. The `securID` is the combination of the user's memorized token and 6 digit temporary RSA pin (with no spaces or characters between them). * @summary RSA Initialize * @param {RSAInitRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ rsaInitialize: async (body?: RSAInitRequest, options: any = {}): Promise => { const localVarPath = `/rsa/initialize`; // 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, }; }, /** * Returns the status of an RSA authentication attempt * @summary RSA Status * @param {RSAStatusRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ rsaStatus: async (body?: RSAStatusRequest, options: any = {}): Promise => { const localVarPath = `/rsa/status`; // 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, }; }, /** * Provides RSA with the user's SecurID to complete authentication * @summary RSA Verify * @param {RSAVerifyRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ rsaVerify: async (body?: RSAVerifyRequest, options: any = {}): Promise => { const localVarPath = `/rsa/verify`; // 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, }; }, } }; /** * AuthenticationApi - functional programming interface * @export */ export const AuthenticationApiFp = function(configuration?: Configuration) { return { /** * Exchanges credentials for a JSON Web Token (JWT). Multiple authentication flows are supported, see Deep Lynx documentation for details. * @summary Exchange OAuth Token * @param {TokenExchangeRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async exchangeOAuthToken(body?: TokenExchangeRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await AuthenticationApiAxiosParamCreator(configuration).exchangeOAuthToken(body, options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, /** * Returns an OAuth token. The API key and secret must be supplied. * @summary Retrieve OAuth Token * @param {string} xApiKey The API key * @param {string} xApiSecret The API secret * @param {string} [xApiExpiry] The API expiry date * @param {*} [options] Override http request option. * @throws {RequiredError} */ async retrieveOAuthToken(xApiKey: string, xApiSecret: string, xApiExpiry?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await AuthenticationApiAxiosParamCreator(configuration).retrieveOAuthToken(xApiKey, xApiSecret, xApiExpiry, options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, /** * Cancels an RSA authentication attempt * @summary RSA Cancel * @param {RSACancelRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async rsaCancel(body?: RSACancelRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await AuthenticationApiAxiosParamCreator(configuration).rsaCancel(body, options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, /** * Used to begin (and optionally complete) an RSA authentication. Either a user's ID may be provided and the SecurID provided in a later `verify` request, or else the user may provide both the user ID (`subjectName`) and `securID` at once to `initialize` to complete the authentication request. The `securID` is the combination of the user's memorized token and 6 digit temporary RSA pin (with no spaces or characters between them). * @summary RSA Initialize * @param {RSAInitRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async rsaInitialize(body?: RSAInitRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await AuthenticationApiAxiosParamCreator(configuration).rsaInitialize(body, options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, /** * Returns the status of an RSA authentication attempt * @summary RSA Status * @param {RSAStatusRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async rsaStatus(body?: RSAStatusRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await AuthenticationApiAxiosParamCreator(configuration).rsaStatus(body, options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, /** * Provides RSA with the user's SecurID to complete authentication * @summary RSA Verify * @param {RSAVerifyRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async rsaVerify(body?: RSAVerifyRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await AuthenticationApiAxiosParamCreator(configuration).rsaVerify(body, options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, } }; /** * AuthenticationApi - factory interface * @export */ export const AuthenticationApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { return { /** * Exchanges credentials for a JSON Web Token (JWT). Multiple authentication flows are supported, see Deep Lynx documentation for details. * @summary Exchange OAuth Token * @param {TokenExchangeRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ exchangeOAuthToken(body?: TokenExchangeRequest, options?: any): AxiosPromise { return AuthenticationApiFp(configuration).exchangeOAuthToken(body, options).then((request) => request(axios, basePath)); }, /** * Returns an OAuth token. The API key and secret must be supplied. * @summary Retrieve OAuth Token * @param {string} xApiKey The API key * @param {string} xApiSecret The API secret * @param {string} [xApiExpiry] The API expiry date * @param {*} [options] Override http request option. * @throws {RequiredError} */ retrieveOAuthToken(xApiKey: string, xApiSecret: string, xApiExpiry?: string, options?: any): AxiosPromise { return AuthenticationApiFp(configuration).retrieveOAuthToken(xApiKey, xApiSecret, xApiExpiry, options).then((request) => request(axios, basePath)); }, /** * Cancels an RSA authentication attempt * @summary RSA Cancel * @param {RSACancelRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ rsaCancel(body?: RSACancelRequest, options?: any): AxiosPromise { return AuthenticationApiFp(configuration).rsaCancel(body, options).then((request) => request(axios, basePath)); }, /** * Used to begin (and optionally complete) an RSA authentication. Either a user's ID may be provided and the SecurID provided in a later `verify` request, or else the user may provide both the user ID (`subjectName`) and `securID` at once to `initialize` to complete the authentication request. The `securID` is the combination of the user's memorized token and 6 digit temporary RSA pin (with no spaces or characters between them). * @summary RSA Initialize * @param {RSAInitRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ rsaInitialize(body?: RSAInitRequest, options?: any): AxiosPromise { return AuthenticationApiFp(configuration).rsaInitialize(body, options).then((request) => request(axios, basePath)); }, /** * Returns the status of an RSA authentication attempt * @summary RSA Status * @param {RSAStatusRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ rsaStatus(body?: RSAStatusRequest, options?: any): AxiosPromise { return AuthenticationApiFp(configuration).rsaStatus(body, options).then((request) => request(axios, basePath)); }, /** * Provides RSA with the user's SecurID to complete authentication * @summary RSA Verify * @param {RSAVerifyRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ rsaVerify(body?: RSAVerifyRequest, options?: any): AxiosPromise { return AuthenticationApiFp(configuration).rsaVerify(body, options).then((request) => request(axios, basePath)); }, }; }; /** * AuthenticationApi - object-oriented interface * @export * @class AuthenticationApi * @extends {BaseAPI} */ export class AuthenticationApi extends BaseAPI { /** * Exchanges credentials for a JSON Web Token (JWT). Multiple authentication flows are supported, see Deep Lynx documentation for details. * @summary Exchange OAuth Token * @param {TokenExchangeRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AuthenticationApi */ public exchangeOAuthToken(body?: TokenExchangeRequest, options?: any) { return AuthenticationApiFp(this.configuration).exchangeOAuthToken(body, options).then((request) => request(this.axios, this.basePath)); } /** * Returns an OAuth token. The API key and secret must be supplied. * @summary Retrieve OAuth Token * @param {string} xApiKey The API key * @param {string} xApiSecret The API secret * @param {string} [xApiExpiry] The API expiry date * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AuthenticationApi */ public retrieveOAuthToken(xApiKey: string, xApiSecret: string, xApiExpiry?: string, options?: any) { return AuthenticationApiFp(this.configuration).retrieveOAuthToken(xApiKey, xApiSecret, xApiExpiry, options).then((request) => request(this.axios, this.basePath)); } /** * Cancels an RSA authentication attempt * @summary RSA Cancel * @param {RSACancelRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AuthenticationApi */ public rsaCancel(body?: RSACancelRequest, options?: any) { return AuthenticationApiFp(this.configuration).rsaCancel(body, options).then((request) => request(this.axios, this.basePath)); } /** * Used to begin (and optionally complete) an RSA authentication. Either a user's ID may be provided and the SecurID provided in a later `verify` request, or else the user may provide both the user ID (`subjectName`) and `securID` at once to `initialize` to complete the authentication request. The `securID` is the combination of the user's memorized token and 6 digit temporary RSA pin (with no spaces or characters between them). * @summary RSA Initialize * @param {RSAInitRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AuthenticationApi */ public rsaInitialize(body?: RSAInitRequest, options?: any) { return AuthenticationApiFp(this.configuration).rsaInitialize(body, options).then((request) => request(this.axios, this.basePath)); } /** * Returns the status of an RSA authentication attempt * @summary RSA Status * @param {RSAStatusRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AuthenticationApi */ public rsaStatus(body?: RSAStatusRequest, options?: any) { return AuthenticationApiFp(this.configuration).rsaStatus(body, options).then((request) => request(this.axios, this.basePath)); } /** * Provides RSA with the user's SecurID to complete authentication * @summary RSA Verify * @param {RSAVerifyRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AuthenticationApi */ public rsaVerify(body?: RSAVerifyRequest, options?: any) { return AuthenticationApiFp(this.configuration).rsaVerify(body, options).then((request) => request(this.axios, this.basePath)); } }