/* 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 { AssignRoleRequest } from '../models'; import { ContainerInvite } from '../models'; import { Generic200Response } from '../models'; import { GetUserResponse } from '../models'; import { ListContainerInvitesResponse } from '../models'; import { ListUserInvitesResponse } from '../models'; import { ListUserPermissionsResponse } from '../models'; import { ListUserRoles } from '../models'; import { ListUsersForContainerResponse } from '../models'; import { ListUsersResponse } from '../models'; import { NotFound404 } from '../models'; import { User } from '../models'; /** * UsersApi - axios parameter creator * @export */ export const UsersApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Accepts a container invite for the current user. The token received in the container invite previously must be attached to this request as a query parameter. * @summary Accept Container Invite * @param {string} token the token supplied in the container invite * @param {*} [options] Override http request option. * @throws {RequiredError} */ acceptContainerInvite: async (token: string, options: any = {}): Promise => { // verify required parameter 'token' is not null or undefined if (token === null || token === undefined) { throw new RequiredError('token','Required parameter token was null or undefined when calling acceptContainerInvite.'); } const localVarPath = `/users/invite`; // 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 (token !== undefined) { localVarQueryParameter['token'] = token; } 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, }; }, /** * Assign a role to a user, roles must consist of role name and domain * @summary Assign User Role * @param {AssignRoleRequest} body * @param {string} containerId * @param {*} [options] Override http request option. * @throws {RequiredError} */ assignUserRole: async (body: AssignRoleRequest, 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 assignUserRole.'); } // 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 assignUserRole.'); } const localVarPath = `/containers/{container_id}/users/roles` .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, }; }, /** * Deletes the specified user. * @summary Delete User * @param {string} userId * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteUser: async (userId: string, options: any = {}): Promise => { // verify required parameter 'userId' is not null or undefined if (userId === null || userId === undefined) { throw new RequiredError('userId','Required parameter userId was null or undefined when calling deleteUser.'); } const localVarPath = `/users/{user_id}` .replace(`{${"user_id"}}`, encodeURIComponent(String(userId))); // 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 user using the username_password identity type. * @summary Invite User to Container * @param {string} containerId * @param {ContainerInvite} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inviteUserToContainer: async (containerId: string, body?: ContainerInvite, 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 inviteUserToContainer.'); } const localVarPath = `/containers/{container_id}/users/invite` .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 invitations to container. * @summary List Invited Users for Container * @param {string} containerId * @param {*} [options] Override http request option. * @throws {RequiredError} */ listInvitedUsersForContainer: 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 listInvitedUsersForContainer.'); } const localVarPath = `/containers/{container_id}/users/invite` .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, }; }, /** * Lists the outstanding container invites for the current user. * @summary List Outstanding Invites * @param {*} [options] Override http request option. * @throws {RequiredError} */ listOutstandingInvites: async (options: any = {}): Promise => { const localVarPath = `/users/invites`; // 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, }; }, /** * List permissions for the user. * @summary List User Permissions * @param {*} [options] Override http request option. * @throws {RequiredError} */ listUserPermissions: async (options: any = {}): Promise => { const localVarPath = `/users/permissions`; // 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, }; }, /** * List users. * @summary List Users * @param {boolean} [count] boolean indicating if the return value should be a count only * @param {boolean} [loadKeys] if supplied, the API keys for the user will also be returned * @param {number} [limit] * @param {number} [offset] * @param {string} [sortBy] column to sort results by * @param {boolean} [sortDesc] boolean indicating if results should be in descending order * @param {*} [options] Override http request option. * @throws {RequiredError} */ listUsers: async (count?: boolean, loadKeys?: boolean, limit?: number, offset?: number, sortBy?: string, sortDesc?: boolean, options: any = {}): Promise => { const localVarPath = `/users`; // 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 (count !== undefined) { localVarQueryParameter['count'] = count; } if (loadKeys !== undefined) { localVarQueryParameter['loadKeys'] = loadKeys; } if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } if (offset !== undefined) { localVarQueryParameter['offset'] = offset; } 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, }; }, /** * List Users for container. * @summary List Users for Container * @param {string} containerId * @param {number} [limit] * @param {number} [offset] * @param {*} [options] Override http request option. * @throws {RequiredError} */ listUsersForContainer: async (containerId: string, limit?: number, offset?: number, 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 listUsersForContainer.'); } const localVarPath = `/containers/{container_id}/users` .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; } 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, }; }, /** * List Users' roles * @summary List User's Roles * @param {string} containerId * @param {string} userId * @param {*} [options] Override http request option. * @throws {RequiredError} */ listUsersRoles: async (containerId: string, userId: 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 listUsersRoles.'); } // verify required parameter 'userId' is not null or undefined if (userId === null || userId === undefined) { throw new RequiredError('userId','Required parameter userId was null or undefined when calling listUsersRoles.'); } const localVarPath = `/containers/{container_id}/users/{user_id}/roles` .replace(`{${"container_id"}}`, encodeURIComponent(String(containerId))) .replace(`{${"user_id"}}`, encodeURIComponent(String(userId))); // 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, }; }, /** * Retrieve a user by ID * @summary Retrieve User * @param {string} containerId * @param {string} userId * @param {*} [options] Override http request option. * @throws {RequiredError} */ retrieveUser: async (containerId: string, userId: 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 retrieveUser.'); } // verify required parameter 'userId' is not null or undefined if (userId === null || userId === undefined) { throw new RequiredError('userId','Required parameter userId was null or undefined when calling retrieveUser.'); } const localVarPath = `/containers/{container_id}/users/{user_id}` .replace(`{${"container_id"}}`, encodeURIComponent(String(containerId))) .replace(`{${"user_id"}}`, encodeURIComponent(String(userId))); // 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 the specified user. * @summary Update User * @param {string} userId * @param {User} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateUser: async (userId: string, body?: User, options: any = {}): Promise => { // verify required parameter 'userId' is not null or undefined if (userId === null || userId === undefined) { throw new RequiredError('userId','Required parameter userId was null or undefined when calling updateUser.'); } const localVarPath = `/users/{user_id}` .replace(`{${"user_id"}}`, encodeURIComponent(String(userId))); // 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, }; }, } }; /** * UsersApi - functional programming interface * @export */ export const UsersApiFp = function(configuration?: Configuration) { return { /** * Accepts a container invite for the current user. The token received in the container invite previously must be attached to this request as a query parameter. * @summary Accept Container Invite * @param {string} token the token supplied in the container invite * @param {*} [options] Override http request option. * @throws {RequiredError} */ async acceptContainerInvite(token: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await UsersApiAxiosParamCreator(configuration).acceptContainerInvite(token, options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, /** * Assign a role to a user, roles must consist of role name and domain * @summary Assign User Role * @param {AssignRoleRequest} body * @param {string} containerId * @param {*} [options] Override http request option. * @throws {RequiredError} */ async assignUserRole(body: AssignRoleRequest, containerId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await UsersApiAxiosParamCreator(configuration).assignUserRole(body, containerId, options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, /** * Deletes the specified user. * @summary Delete User * @param {string} userId * @param {*} [options] Override http request option. * @throws {RequiredError} */ async deleteUser(userId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await UsersApiAxiosParamCreator(configuration).deleteUser(userId, options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, /** * Create a new user using the username_password identity type. * @summary Invite User to Container * @param {string} containerId * @param {ContainerInvite} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async inviteUserToContainer(containerId: string, body?: ContainerInvite, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await UsersApiAxiosParamCreator(configuration).inviteUserToContainer(containerId, body, options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, /** * List all invitations to container. * @summary List Invited Users for Container * @param {string} containerId * @param {*} [options] Override http request option. * @throws {RequiredError} */ async listInvitedUsersForContainer(containerId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await UsersApiAxiosParamCreator(configuration).listInvitedUsersForContainer(containerId, options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, /** * Lists the outstanding container invites for the current user. * @summary List Outstanding Invites * @param {*} [options] Override http request option. * @throws {RequiredError} */ async listOutstandingInvites(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await UsersApiAxiosParamCreator(configuration).listOutstandingInvites(options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, /** * List permissions for the user. * @summary List User Permissions * @param {*} [options] Override http request option. * @throws {RequiredError} */ async listUserPermissions(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await UsersApiAxiosParamCreator(configuration).listUserPermissions(options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, /** * List users. * @summary List Users * @param {boolean} [count] boolean indicating if the return value should be a count only * @param {boolean} [loadKeys] if supplied, the API keys for the user will also be returned * @param {number} [limit] * @param {number} [offset] * @param {string} [sortBy] column to sort results by * @param {boolean} [sortDesc] boolean indicating if results should be in descending order * @param {*} [options] Override http request option. * @throws {RequiredError} */ async listUsers(count?: boolean, loadKeys?: boolean, limit?: number, offset?: number, sortBy?: string, sortDesc?: boolean, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await UsersApiAxiosParamCreator(configuration).listUsers(count, loadKeys, limit, offset, sortBy, sortDesc, options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, /** * List Users for container. * @summary List Users for Container * @param {string} containerId * @param {number} [limit] * @param {number} [offset] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async listUsersForContainer(containerId: string, limit?: number, offset?: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await UsersApiAxiosParamCreator(configuration).listUsersForContainer(containerId, limit, offset, options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, /** * List Users' roles * @summary List User's Roles * @param {string} containerId * @param {string} userId * @param {*} [options] Override http request option. * @throws {RequiredError} */ async listUsersRoles(containerId: string, userId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await UsersApiAxiosParamCreator(configuration).listUsersRoles(containerId, userId, options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, /** * Retrieve a user by ID * @summary Retrieve User * @param {string} containerId * @param {string} userId * @param {*} [options] Override http request option. * @throws {RequiredError} */ async retrieveUser(containerId: string, userId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await UsersApiAxiosParamCreator(configuration).retrieveUser(containerId, userId, options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, /** * Updates the specified user. * @summary Update User * @param {string} userId * @param {User} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async updateUser(userId: string, body?: User, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await UsersApiAxiosParamCreator(configuration).updateUser(userId, body, options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, } }; /** * UsersApi - factory interface * @export */ export const UsersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { return { /** * Accepts a container invite for the current user. The token received in the container invite previously must be attached to this request as a query parameter. * @summary Accept Container Invite * @param {string} token the token supplied in the container invite * @param {*} [options] Override http request option. * @throws {RequiredError} */ acceptContainerInvite(token: string, options?: any): AxiosPromise { return UsersApiFp(configuration).acceptContainerInvite(token, options).then((request) => request(axios, basePath)); }, /** * Assign a role to a user, roles must consist of role name and domain * @summary Assign User Role * @param {AssignRoleRequest} body * @param {string} containerId * @param {*} [options] Override http request option. * @throws {RequiredError} */ assignUserRole(body: AssignRoleRequest, containerId: string, options?: any): AxiosPromise { return UsersApiFp(configuration).assignUserRole(body, containerId, options).then((request) => request(axios, basePath)); }, /** * Deletes the specified user. * @summary Delete User * @param {string} userId * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteUser(userId: string, options?: any): AxiosPromise { return UsersApiFp(configuration).deleteUser(userId, options).then((request) => request(axios, basePath)); }, /** * Create a new user using the username_password identity type. * @summary Invite User to Container * @param {string} containerId * @param {ContainerInvite} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ inviteUserToContainer(containerId: string, body?: ContainerInvite, options?: any): AxiosPromise { return UsersApiFp(configuration).inviteUserToContainer(containerId, body, options).then((request) => request(axios, basePath)); }, /** * List all invitations to container. * @summary List Invited Users for Container * @param {string} containerId * @param {*} [options] Override http request option. * @throws {RequiredError} */ listInvitedUsersForContainer(containerId: string, options?: any): AxiosPromise { return UsersApiFp(configuration).listInvitedUsersForContainer(containerId, options).then((request) => request(axios, basePath)); }, /** * Lists the outstanding container invites for the current user. * @summary List Outstanding Invites * @param {*} [options] Override http request option. * @throws {RequiredError} */ listOutstandingInvites(options?: any): AxiosPromise { return UsersApiFp(configuration).listOutstandingInvites(options).then((request) => request(axios, basePath)); }, /** * List permissions for the user. * @summary List User Permissions * @param {*} [options] Override http request option. * @throws {RequiredError} */ listUserPermissions(options?: any): AxiosPromise { return UsersApiFp(configuration).listUserPermissions(options).then((request) => request(axios, basePath)); }, /** * List users. * @summary List Users * @param {boolean} [count] boolean indicating if the return value should be a count only * @param {boolean} [loadKeys] if supplied, the API keys for the user will also be returned * @param {number} [limit] * @param {number} [offset] * @param {string} [sortBy] column to sort results by * @param {boolean} [sortDesc] boolean indicating if results should be in descending order * @param {*} [options] Override http request option. * @throws {RequiredError} */ listUsers(count?: boolean, loadKeys?: boolean, limit?: number, offset?: number, sortBy?: string, sortDesc?: boolean, options?: any): AxiosPromise { return UsersApiFp(configuration).listUsers(count, loadKeys, limit, offset, sortBy, sortDesc, options).then((request) => request(axios, basePath)); }, /** * List Users for container. * @summary List Users for Container * @param {string} containerId * @param {number} [limit] * @param {number} [offset] * @param {*} [options] Override http request option. * @throws {RequiredError} */ listUsersForContainer(containerId: string, limit?: number, offset?: number, options?: any): AxiosPromise { return UsersApiFp(configuration).listUsersForContainer(containerId, limit, offset, options).then((request) => request(axios, basePath)); }, /** * List Users' roles * @summary List User's Roles * @param {string} containerId * @param {string} userId * @param {*} [options] Override http request option. * @throws {RequiredError} */ listUsersRoles(containerId: string, userId: string, options?: any): AxiosPromise { return UsersApiFp(configuration).listUsersRoles(containerId, userId, options).then((request) => request(axios, basePath)); }, /** * Retrieve a user by ID * @summary Retrieve User * @param {string} containerId * @param {string} userId * @param {*} [options] Override http request option. * @throws {RequiredError} */ retrieveUser(containerId: string, userId: string, options?: any): AxiosPromise { return UsersApiFp(configuration).retrieveUser(containerId, userId, options).then((request) => request(axios, basePath)); }, /** * Updates the specified user. * @summary Update User * @param {string} userId * @param {User} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateUser(userId: string, body?: User, options?: any): AxiosPromise { return UsersApiFp(configuration).updateUser(userId, body, options).then((request) => request(axios, basePath)); }, }; }; /** * UsersApi - object-oriented interface * @export * @class UsersApi * @extends {BaseAPI} */ export class UsersApi extends BaseAPI { /** * Accepts a container invite for the current user. The token received in the container invite previously must be attached to this request as a query parameter. * @summary Accept Container Invite * @param {string} token the token supplied in the container invite * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UsersApi */ public acceptContainerInvite(token: string, options?: any) { return UsersApiFp(this.configuration).acceptContainerInvite(token, options).then((request) => request(this.axios, this.basePath)); } /** * Assign a role to a user, roles must consist of role name and domain * @summary Assign User Role * @param {AssignRoleRequest} body * @param {string} containerId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UsersApi */ public assignUserRole(body: AssignRoleRequest, containerId: string, options?: any) { return UsersApiFp(this.configuration).assignUserRole(body, containerId, options).then((request) => request(this.axios, this.basePath)); } /** * Deletes the specified user. * @summary Delete User * @param {string} userId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UsersApi */ public deleteUser(userId: string, options?: any) { return UsersApiFp(this.configuration).deleteUser(userId, options).then((request) => request(this.axios, this.basePath)); } /** * Create a new user using the username_password identity type. * @summary Invite User to Container * @param {string} containerId * @param {ContainerInvite} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UsersApi */ public inviteUserToContainer(containerId: string, body?: ContainerInvite, options?: any) { return UsersApiFp(this.configuration).inviteUserToContainer(containerId, body, options).then((request) => request(this.axios, this.basePath)); } /** * List all invitations to container. * @summary List Invited Users for Container * @param {string} containerId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UsersApi */ public listInvitedUsersForContainer(containerId: string, options?: any) { return UsersApiFp(this.configuration).listInvitedUsersForContainer(containerId, options).then((request) => request(this.axios, this.basePath)); } /** * Lists the outstanding container invites for the current user. * @summary List Outstanding Invites * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UsersApi */ public listOutstandingInvites(options?: any) { return UsersApiFp(this.configuration).listOutstandingInvites(options).then((request) => request(this.axios, this.basePath)); } /** * List permissions for the user. * @summary List User Permissions * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UsersApi */ public listUserPermissions(options?: any) { return UsersApiFp(this.configuration).listUserPermissions(options).then((request) => request(this.axios, this.basePath)); } /** * List users. * @summary List Users * @param {boolean} [count] boolean indicating if the return value should be a count only * @param {boolean} [loadKeys] if supplied, the API keys for the user will also be returned * @param {number} [limit] * @param {number} [offset] * @param {string} [sortBy] column to sort results by * @param {boolean} [sortDesc] boolean indicating if results should be in descending order * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UsersApi */ public listUsers(count?: boolean, loadKeys?: boolean, limit?: number, offset?: number, sortBy?: string, sortDesc?: boolean, options?: any) { return UsersApiFp(this.configuration).listUsers(count, loadKeys, limit, offset, sortBy, sortDesc, options).then((request) => request(this.axios, this.basePath)); } /** * List Users for container. * @summary List Users for Container * @param {string} containerId * @param {number} [limit] * @param {number} [offset] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UsersApi */ public listUsersForContainer(containerId: string, limit?: number, offset?: number, options?: any) { return UsersApiFp(this.configuration).listUsersForContainer(containerId, limit, offset, options).then((request) => request(this.axios, this.basePath)); } /** * List Users' roles * @summary List User's Roles * @param {string} containerId * @param {string} userId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UsersApi */ public listUsersRoles(containerId: string, userId: string, options?: any) { return UsersApiFp(this.configuration).listUsersRoles(containerId, userId, options).then((request) => request(this.axios, this.basePath)); } /** * Retrieve a user by ID * @summary Retrieve User * @param {string} containerId * @param {string} userId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UsersApi */ public retrieveUser(containerId: string, userId: string, options?: any) { return UsersApiFp(this.configuration).retrieveUser(containerId, userId, options).then((request) => request(this.axios, this.basePath)); } /** * Updates the specified user. * @summary Update User * @param {string} userId * @param {User} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UsersApi */ public updateUser(userId: string, body?: User, options?: any) { return UsersApiFp(this.configuration).updateUser(userId, body, options).then((request) => request(this.axios, this.basePath)); } }