/* 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 { CreateMetatypeRequest } from '../models'; import { CreateMetatypesResponse } from '../models'; import { ErrorResponse } from '../models'; import { Generic200Response } from '../models'; import { GetMetatypeResponse } from '../models'; import { ListMetatypesResponse } from '../models'; import { UpdateMetatypeRequest } from '../models'; import { UpdateMetatypeResponse } from '../models'; import { ValidateMetatypePropertiesRequest } from '../models'; import { ValidateMetatypePropertiesResponse } from '../models'; /** * MetatypesApi - axios parameter creator * @export */ export const MetatypesApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Archives the metatype. This is preferred over deletion as deletion has a cascading effect on the deleted metatype's keys, relationships, and relationship keys. When in doubt, archive over delete. We'd rather have tombstones than cremating the metatype. * @summary Archive Metatype * @param {string} containerId * @param {string} metatypeId * @param {*} [options] Override http request option. * @throws {RequiredError} */ archiveMetatype: async (containerId: string, metatypeId: 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 archiveMetatype.'); } // verify required parameter 'metatypeId' is not null or undefined if (metatypeId === null || metatypeId === undefined) { throw new RequiredError('metatypeId','Required parameter metatypeId was null or undefined when calling archiveMetatype.'); } const localVarPath = `/containers/{container_id}/metatypes/{metatype_id}` .replace(`{${"container_id"}}`, encodeURIComponent(String(containerId))) .replace(`{${"metatype_id"}}`, encodeURIComponent(String(metatypeId))); // 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: 'DELETE', ...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, }; }, /** * Create a new metatype. Pass in an array for bulk creation. * @summary Create Metatype * @param {CreateMetatypeRequest} body * @param {string} containerId * @param {*} [options] Override http request option. * @throws {RequiredError} */ createMetatype: async (body: CreateMetatypeRequest, 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 createMetatype.'); } // 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 createMetatype.'); } const localVarPath = `/containers/{container_id}/metatypes` .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, }; }, /** * List all metatypes that the container has access to. * @summary List Metatypes * @param {string} containerId * @param {number} [limit] * @param {number} [offset] * @param {string} [name] Filter metatypes with names that match this pattern * @param {string} [description] Filter metatypes with descriptions that match this pattern * @param {string} [count] Set to true to return an integer count of the number of metatypes * @param {string} [loadKeys] Set to false to not return the keys for the selected metatypes (true by default) * @param {string} [sortBy] Supply the name of a metatype attribute (name, created_at, etc) by which to sort * @param {string} [sortDesc] Set true to sort descending * @param {*} [options] Override http request option. * @throws {RequiredError} */ listMetatypes: async (containerId: string, limit?: number, offset?: number, name?: string, description?: string, count?: string, loadKeys?: string, sortBy?: string, sortDesc?: 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 listMetatypes.'); } const localVarPath = `/containers/{container_id}/metatypes` .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 if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } if (offset !== undefined) { localVarQueryParameter['offset'] = offset; } if (name !== undefined) { localVarQueryParameter['name'] = name; } if (description !== undefined) { localVarQueryParameter['description'] = description; } if (count !== undefined) { localVarQueryParameter['count'] = count; } if (loadKeys !== undefined) { localVarQueryParameter['loadKeys'] = loadKeys; } if (sortBy !== undefined) { localVarQueryParameter['sortBy'] = sortBy; } if (sortDesc !== undefined) { localVarQueryParameter['sortDesc'] = sortDesc; } 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, }; }, /** * Retrieves a single metatype. * @summary Retrieve Metatype * @param {string} containerId * @param {string} metatypeId * @param {*} [options] Override http request option. * @throws {RequiredError} */ retrieveMetaype: async (containerId: string, metatypeId: 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 retrieveMetaype.'); } // verify required parameter 'metatypeId' is not null or undefined if (metatypeId === null || metatypeId === undefined) { throw new RequiredError('metatypeId','Required parameter metatypeId was null or undefined when calling retrieveMetaype.'); } const localVarPath = `/containers/{container_id}/metatypes/{metatype_id}` .replace(`{${"container_id"}}`, encodeURIComponent(String(containerId))) .replace(`{${"metatype_id"}}`, encodeURIComponent(String(metatypeId))); // 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, }; }, /** * Update a single Metatype in storage. Will fail if the updated name has already been taken. * @summary Update Metatype * @param {UpdateMetatypeRequest} body * @param {string} containerId * @param {string} metatypeId * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateMetatype: async (body: UpdateMetatypeRequest, containerId: string, metatypeId: 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 updateMetatype.'); } // 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 updateMetatype.'); } // verify required parameter 'metatypeId' is not null or undefined if (metatypeId === null || metatypeId === undefined) { throw new RequiredError('metatypeId','Required parameter metatypeId was null or undefined when calling updateMetatype.'); } const localVarPath = `/containers/{container_id}/metatypes/{metatype_id}` .replace(`{${"container_id"}}`, encodeURIComponent(String(containerId))) .replace(`{${"metatype_id"}}`, encodeURIComponent(String(metatypeId))); // 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, }; }, /** * Returns any errors associated with the intended properties or keys for a metatype or else the data itself if no errors are present. * @summary Validate Metatype Properties * @param {string} containerId * @param {string} metatypeId * @param {ValidateMetatypePropertiesRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ validateMetatypeProperties: async (containerId: string, metatypeId: string, body?: ValidateMetatypePropertiesRequest, 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 validateMetatypeProperties.'); } // verify required parameter 'metatypeId' is not null or undefined if (metatypeId === null || metatypeId === undefined) { throw new RequiredError('metatypeId','Required parameter metatypeId was null or undefined when calling validateMetatypeProperties.'); } const localVarPath = `/containers/{container_id}/metatypes/{metatype_id}` .replace(`{${"container_id"}}`, encodeURIComponent(String(containerId))) .replace(`{${"metatype_id"}}`, encodeURIComponent(String(metatypeId))); // 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, }; }, } }; /** * MetatypesApi - functional programming interface * @export */ export const MetatypesApiFp = function(configuration?: Configuration) { return { /** * Archives the metatype. This is preferred over deletion as deletion has a cascading effect on the deleted metatype's keys, relationships, and relationship keys. When in doubt, archive over delete. We'd rather have tombstones than cremating the metatype. * @summary Archive Metatype * @param {string} containerId * @param {string} metatypeId * @param {*} [options] Override http request option. * @throws {RequiredError} */ async archiveMetatype(containerId: string, metatypeId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await MetatypesApiAxiosParamCreator(configuration).archiveMetatype(containerId, metatypeId, options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, /** * Create a new metatype. Pass in an array for bulk creation. * @summary Create Metatype * @param {CreateMetatypeRequest} body * @param {string} containerId * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createMetatype(body: CreateMetatypeRequest, containerId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await MetatypesApiAxiosParamCreator(configuration).createMetatype(body, containerId, options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, /** * List all metatypes that the container has access to. * @summary List Metatypes * @param {string} containerId * @param {number} [limit] * @param {number} [offset] * @param {string} [name] Filter metatypes with names that match this pattern * @param {string} [description] Filter metatypes with descriptions that match this pattern * @param {string} [count] Set to true to return an integer count of the number of metatypes * @param {string} [loadKeys] Set to false to not return the keys for the selected metatypes (true by default) * @param {string} [sortBy] Supply the name of a metatype attribute (name, created_at, etc) by which to sort * @param {string} [sortDesc] Set true to sort descending * @param {*} [options] Override http request option. * @throws {RequiredError} */ async listMetatypes(containerId: string, limit?: number, offset?: number, name?: string, description?: string, count?: string, loadKeys?: string, sortBy?: string, sortDesc?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await MetatypesApiAxiosParamCreator(configuration).listMetatypes(containerId, limit, offset, name, description, count, loadKeys, sortBy, sortDesc, options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, /** * Retrieves a single metatype. * @summary Retrieve Metatype * @param {string} containerId * @param {string} metatypeId * @param {*} [options] Override http request option. * @throws {RequiredError} */ async retrieveMetaype(containerId: string, metatypeId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await MetatypesApiAxiosParamCreator(configuration).retrieveMetaype(containerId, metatypeId, options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, /** * Update a single Metatype in storage. Will fail if the updated name has already been taken. * @summary Update Metatype * @param {UpdateMetatypeRequest} body * @param {string} containerId * @param {string} metatypeId * @param {*} [options] Override http request option. * @throws {RequiredError} */ async updateMetatype(body: UpdateMetatypeRequest, containerId: string, metatypeId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await MetatypesApiAxiosParamCreator(configuration).updateMetatype(body, containerId, metatypeId, options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, /** * Returns any errors associated with the intended properties or keys for a metatype or else the data itself if no errors are present. * @summary Validate Metatype Properties * @param {string} containerId * @param {string} metatypeId * @param {ValidateMetatypePropertiesRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async validateMetatypeProperties(containerId: string, metatypeId: string, body?: ValidateMetatypePropertiesRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await MetatypesApiAxiosParamCreator(configuration).validateMetatypeProperties(containerId, metatypeId, body, options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, } }; /** * MetatypesApi - factory interface * @export */ export const MetatypesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { return { /** * Archives the metatype. This is preferred over deletion as deletion has a cascading effect on the deleted metatype's keys, relationships, and relationship keys. When in doubt, archive over delete. We'd rather have tombstones than cremating the metatype. * @summary Archive Metatype * @param {string} containerId * @param {string} metatypeId * @param {*} [options] Override http request option. * @throws {RequiredError} */ archiveMetatype(containerId: string, metatypeId: string, options?: any): AxiosPromise { return MetatypesApiFp(configuration).archiveMetatype(containerId, metatypeId, options).then((request) => request(axios, basePath)); }, /** * Create a new metatype. Pass in an array for bulk creation. * @summary Create Metatype * @param {CreateMetatypeRequest} body * @param {string} containerId * @param {*} [options] Override http request option. * @throws {RequiredError} */ createMetatype(body: CreateMetatypeRequest, containerId: string, options?: any): AxiosPromise { return MetatypesApiFp(configuration).createMetatype(body, containerId, options).then((request) => request(axios, basePath)); }, /** * List all metatypes that the container has access to. * @summary List Metatypes * @param {string} containerId * @param {number} [limit] * @param {number} [offset] * @param {string} [name] Filter metatypes with names that match this pattern * @param {string} [description] Filter metatypes with descriptions that match this pattern * @param {string} [count] Set to true to return an integer count of the number of metatypes * @param {string} [loadKeys] Set to false to not return the keys for the selected metatypes (true by default) * @param {string} [sortBy] Supply the name of a metatype attribute (name, created_at, etc) by which to sort * @param {string} [sortDesc] Set true to sort descending * @param {*} [options] Override http request option. * @throws {RequiredError} */ listMetatypes(containerId: string, limit?: number, offset?: number, name?: string, description?: string, count?: string, loadKeys?: string, sortBy?: string, sortDesc?: string, options?: any): AxiosPromise { return MetatypesApiFp(configuration).listMetatypes(containerId, limit, offset, name, description, count, loadKeys, sortBy, sortDesc, options).then((request) => request(axios, basePath)); }, /** * Retrieves a single metatype. * @summary Retrieve Metatype * @param {string} containerId * @param {string} metatypeId * @param {*} [options] Override http request option. * @throws {RequiredError} */ retrieveMetaype(containerId: string, metatypeId: string, options?: any): AxiosPromise { return MetatypesApiFp(configuration).retrieveMetaype(containerId, metatypeId, options).then((request) => request(axios, basePath)); }, /** * Update a single Metatype in storage. Will fail if the updated name has already been taken. * @summary Update Metatype * @param {UpdateMetatypeRequest} body * @param {string} containerId * @param {string} metatypeId * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateMetatype(body: UpdateMetatypeRequest, containerId: string, metatypeId: string, options?: any): AxiosPromise { return MetatypesApiFp(configuration).updateMetatype(body, containerId, metatypeId, options).then((request) => request(axios, basePath)); }, /** * Returns any errors associated with the intended properties or keys for a metatype or else the data itself if no errors are present. * @summary Validate Metatype Properties * @param {string} containerId * @param {string} metatypeId * @param {ValidateMetatypePropertiesRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ validateMetatypeProperties(containerId: string, metatypeId: string, body?: ValidateMetatypePropertiesRequest, options?: any): AxiosPromise { return MetatypesApiFp(configuration).validateMetatypeProperties(containerId, metatypeId, body, options).then((request) => request(axios, basePath)); }, }; }; /** * MetatypesApi - object-oriented interface * @export * @class MetatypesApi * @extends {BaseAPI} */ export class MetatypesApi extends BaseAPI { /** * Archives the metatype. This is preferred over deletion as deletion has a cascading effect on the deleted metatype's keys, relationships, and relationship keys. When in doubt, archive over delete. We'd rather have tombstones than cremating the metatype. * @summary Archive Metatype * @param {string} containerId * @param {string} metatypeId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof MetatypesApi */ public archiveMetatype(containerId: string, metatypeId: string, options?: any) { return MetatypesApiFp(this.configuration).archiveMetatype(containerId, metatypeId, options).then((request) => request(this.axios, this.basePath)); } /** * Create a new metatype. Pass in an array for bulk creation. * @summary Create Metatype * @param {CreateMetatypeRequest} body * @param {string} containerId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof MetatypesApi */ public createMetatype(body: CreateMetatypeRequest, containerId: string, options?: any) { return MetatypesApiFp(this.configuration).createMetatype(body, containerId, options).then((request) => request(this.axios, this.basePath)); } /** * List all metatypes that the container has access to. * @summary List Metatypes * @param {string} containerId * @param {number} [limit] * @param {number} [offset] * @param {string} [name] Filter metatypes with names that match this pattern * @param {string} [description] Filter metatypes with descriptions that match this pattern * @param {string} [count] Set to true to return an integer count of the number of metatypes * @param {string} [loadKeys] Set to false to not return the keys for the selected metatypes (true by default) * @param {string} [sortBy] Supply the name of a metatype attribute (name, created_at, etc) by which to sort * @param {string} [sortDesc] Set true to sort descending * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof MetatypesApi */ public listMetatypes(containerId: string, limit?: number, offset?: number, name?: string, description?: string, count?: string, loadKeys?: string, sortBy?: string, sortDesc?: string, options?: any) { return MetatypesApiFp(this.configuration).listMetatypes(containerId, limit, offset, name, description, count, loadKeys, sortBy, sortDesc, options).then((request) => request(this.axios, this.basePath)); } /** * Retrieves a single metatype. * @summary Retrieve Metatype * @param {string} containerId * @param {string} metatypeId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof MetatypesApi */ public retrieveMetaype(containerId: string, metatypeId: string, options?: any) { return MetatypesApiFp(this.configuration).retrieveMetaype(containerId, metatypeId, options).then((request) => request(this.axios, this.basePath)); } /** * Update a single Metatype in storage. Will fail if the updated name has already been taken. * @summary Update Metatype * @param {UpdateMetatypeRequest} body * @param {string} containerId * @param {string} metatypeId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof MetatypesApi */ public updateMetatype(body: UpdateMetatypeRequest, containerId: string, metatypeId: string, options?: any) { return MetatypesApiFp(this.configuration).updateMetatype(body, containerId, metatypeId, options).then((request) => request(this.axios, this.basePath)); } /** * Returns any errors associated with the intended properties or keys for a metatype or else the data itself if no errors are present. * @summary Validate Metatype Properties * @param {string} containerId * @param {string} metatypeId * @param {ValidateMetatypePropertiesRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof MetatypesApi */ public validateMetatypeProperties(containerId: string, metatypeId: string, body?: ValidateMetatypePropertiesRequest, options?: any) { return MetatypesApiFp(this.configuration).validateMetatypeProperties(containerId, metatypeId, body, options).then((request) => request(this.axios, this.basePath)); } }