/* tslint:disable */ /* eslint-disable */ /** * Tuix MCP Host API * Service managing MCP servers for Tuix applications. * * The version of the OpenAPI document: 0.0.1 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import * as runtime from '../runtime'; import type { AccountDTO, ApplicationDTO, ApplicationMCPServerDTO, CreateAPIKeyRequestDTO, CreateAPIKeyResponseDTO, CreateAccountDTO, CreateApplicationDTO, CreateMCPServerDTO, CreateRoleDTO, ErrorDTO, GetAPIKeysResponseDTO, MCPServerDTO, MCPServerStatusDTO, PaginatedApplicationsDTO, PaginatedMCPServerDTO, PaginatedRoleDTO, RoleDTO, UpdateApplicationDTO, UpdateMCPServerDTO, UpdateRoleDTO, } from '../models/index'; import { AccountDTOFromJSON, AccountDTOToJSON, ApplicationDTOFromJSON, ApplicationDTOToJSON, ApplicationMCPServerDTOFromJSON, ApplicationMCPServerDTOToJSON, CreateAPIKeyRequestDTOFromJSON, CreateAPIKeyRequestDTOToJSON, CreateAPIKeyResponseDTOFromJSON, CreateAPIKeyResponseDTOToJSON, CreateAccountDTOFromJSON, CreateAccountDTOToJSON, CreateApplicationDTOFromJSON, CreateApplicationDTOToJSON, CreateMCPServerDTOFromJSON, CreateMCPServerDTOToJSON, CreateRoleDTOFromJSON, CreateRoleDTOToJSON, ErrorDTOFromJSON, ErrorDTOToJSON, GetAPIKeysResponseDTOFromJSON, GetAPIKeysResponseDTOToJSON, MCPServerDTOFromJSON, MCPServerDTOToJSON, MCPServerStatusDTOFromJSON, MCPServerStatusDTOToJSON, PaginatedApplicationsDTOFromJSON, PaginatedApplicationsDTOToJSON, PaginatedMCPServerDTOFromJSON, PaginatedMCPServerDTOToJSON, PaginatedRoleDTOFromJSON, PaginatedRoleDTOToJSON, RoleDTOFromJSON, RoleDTOToJSON, UpdateApplicationDTOFromJSON, UpdateApplicationDTOToJSON, UpdateMCPServerDTOFromJSON, UpdateMCPServerDTOToJSON, UpdateRoleDTOFromJSON, UpdateRoleDTOToJSON, } from '../models/index'; export interface ApiKeysGetRequest { page?: number; pageSize?: number; } export interface ApiKeysIdDeleteRequest { id: string; } export interface ApiKeysPostRequest { createAPIKeyRequestDTO: CreateAPIKeyRequestDTO; } export interface AttachMCPServerRequest { applicationId: string; applicationMCPServerDTO: ApplicationMCPServerDTO; } export interface CreateAccountRequest { createAccountDTO: CreateAccountDTO; } export interface CreateApplicationRequest { createApplicationDTO: CreateApplicationDTO; } export interface CreateMCPServerRequest { createMCPServerDTO: CreateMCPServerDTO; } export interface CreateRoleRequest { applicationId: string; createRoleDTO: CreateRoleDTO; } export interface DeleteApplicationRequest { applicationId: string; } export interface DeleteMCPServerRequest { mcpServerId: string; } export interface DeleteRoleRequest { applicationId: string; roleId: string; } export interface DetachMCPServerRequest { applicationId: string; mcpServerId: string; } export interface GetApplicationByIDRequest { applicationId: string; } export interface GetApplicationsRequest { page?: number; pageSize?: number; } export interface GetAvailableMCPServersByApplicationRequest { applicationId: string; page?: number; pageSize?: number; } export interface GetMCPServerStatusRequest { mcpServerId: string; } export interface GetMCPServersRequest { page?: number; pageSize?: number; } export interface GetMCPServersByApplicationRequest { applicationId: string; page?: number; pageSize?: number; } export interface GetRolesByApplicationIdRequest { applicationId: string; page?: number; pageSize?: number; } export interface UpdateApplicationRequest { applicationId: string; updateApplicationDTO: UpdateApplicationDTO; } export interface UpdateMCPServerRequest { mcpServerId: string; updateMCPServerDTO: UpdateMCPServerDTO; } export interface UpdateRoleRequest { applicationId: string; roleId: string; updateRoleDTO: UpdateRoleDTO; } /** * */ export class ClientApi extends runtime.BaseAPI { /** * Creates request options for apiKeysGet without sending the request */ async apiKeysGetRequestOpts(requestParameters: ApiKeysGetRequest): Promise { const queryParameters: any = {}; if (requestParameters['page'] != null) { queryParameters['page'] = requestParameters['page']; } if (requestParameters['pageSize'] != null) { queryParameters['page_size'] = requestParameters['pageSize']; } const headerParameters: runtime.HTTPHeaders = {}; let urlPath = `/api-keys`; return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, }; } /** * Retrieve all API keys associated with the authenticated user\'s account with pagination. * Get all API keys for the authenticated user */ async apiKeysGetRaw(requestParameters: ApiKeysGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const requestOptions = await this.apiKeysGetRequestOpts(requestParameters); const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => GetAPIKeysResponseDTOFromJSON(jsonValue)); } /** * Retrieve all API keys associated with the authenticated user\'s account with pagination. * Get all API keys for the authenticated user */ async apiKeysGet(requestParameters: ApiKeysGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.apiKeysGetRaw(requestParameters, initOverrides); return await response.value(); } /** * Creates request options for apiKeysIdDelete without sending the request */ async apiKeysIdDeleteRequestOpts(requestParameters: ApiKeysIdDeleteRequest): Promise { if (requestParameters['id'] == null) { throw new runtime.RequiredError( 'id', 'Required parameter "id" was null or undefined when calling apiKeysIdDelete().' ); } const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; let urlPath = `/api-keys/{id}`; urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))); return { path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, }; } /** * Delete a specific API key belonging to the authenticated user. * Delete an API key */ async apiKeysIdDeleteRaw(requestParameters: ApiKeysIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const requestOptions = await this.apiKeysIdDeleteRequestOpts(requestParameters); const response = await this.request(requestOptions, initOverrides); return new runtime.VoidApiResponse(response); } /** * Delete a specific API key belonging to the authenticated user. * Delete an API key */ async apiKeysIdDelete(requestParameters: ApiKeysIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { await this.apiKeysIdDeleteRaw(requestParameters, initOverrides); } /** * Creates request options for apiKeysPost without sending the request */ async apiKeysPostRequestOpts(requestParameters: ApiKeysPostRequest): Promise { if (requestParameters['createAPIKeyRequestDTO'] == null) { throw new runtime.RequiredError( 'createAPIKeyRequestDTO', 'Required parameter "createAPIKeyRequestDTO" was null or undefined when calling apiKeysPost().' ); } const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; headerParameters['Content-Type'] = 'application/json'; let urlPath = `/api-keys`; return { path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, body: CreateAPIKeyRequestDTOToJSON(requestParameters['createAPIKeyRequestDTO']), }; } /** * Create a new API key for accessing the RAG service. * Create a new API key */ async apiKeysPostRaw(requestParameters: ApiKeysPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const requestOptions = await this.apiKeysPostRequestOpts(requestParameters); const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => CreateAPIKeyResponseDTOFromJSON(jsonValue)); } /** * Create a new API key for accessing the RAG service. * Create a new API key */ async apiKeysPost(requestParameters: ApiKeysPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.apiKeysPostRaw(requestParameters, initOverrides); return await response.value(); } /** * Creates request options for attachMCPServer without sending the request */ async attachMCPServerRequestOpts(requestParameters: AttachMCPServerRequest): Promise { if (requestParameters['applicationId'] == null) { throw new runtime.RequiredError( 'applicationId', 'Required parameter "applicationId" was null or undefined when calling attachMCPServer().' ); } if (requestParameters['applicationMCPServerDTO'] == null) { throw new runtime.RequiredError( 'applicationMCPServerDTO', 'Required parameter "applicationMCPServerDTO" was null or undefined when calling attachMCPServer().' ); } const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; headerParameters['Content-Type'] = 'application/json'; let urlPath = `/applications/{applicationId}/mcp-servers`; urlPath = urlPath.replace(`{${"applicationId"}}`, encodeURIComponent(String(requestParameters['applicationId']))); return { path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, body: ApplicationMCPServerDTOToJSON(requestParameters['applicationMCPServerDTO']), }; } /** * Attach an existing MCP server to the specified application within the authenticated account * Attach MCP server to application */ async attachMCPServerRaw(requestParameters: AttachMCPServerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const requestOptions = await this.attachMCPServerRequestOpts(requestParameters); const response = await this.request(requestOptions, initOverrides); return new runtime.VoidApiResponse(response); } /** * Attach an existing MCP server to the specified application within the authenticated account * Attach MCP server to application */ async attachMCPServer(requestParameters: AttachMCPServerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { await this.attachMCPServerRaw(requestParameters, initOverrides); } /** * Creates request options for createAccount without sending the request */ async createAccountRequestOpts(requestParameters: CreateAccountRequest): Promise { if (requestParameters['createAccountDTO'] == null) { throw new runtime.RequiredError( 'createAccountDTO', 'Required parameter "createAccountDTO" was null or undefined when calling createAccount().' ); } const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; headerParameters['Content-Type'] = 'application/json'; let urlPath = `/accounts`; return { path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, body: CreateAccountDTOToJSON(requestParameters['createAccountDTO']), }; } /** * Create an account * Creates a new account */ async createAccountRaw(requestParameters: CreateAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const requestOptions = await this.createAccountRequestOpts(requestParameters); const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => AccountDTOFromJSON(jsonValue)); } /** * Create an account * Creates a new account */ async createAccount(requestParameters: CreateAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.createAccountRaw(requestParameters, initOverrides); return await response.value(); } /** * Creates request options for createApplication without sending the request */ async createApplicationRequestOpts(requestParameters: CreateApplicationRequest): Promise { if (requestParameters['createApplicationDTO'] == null) { throw new runtime.RequiredError( 'createApplicationDTO', 'Required parameter "createApplicationDTO" was null or undefined when calling createApplication().' ); } const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; headerParameters['Content-Type'] = 'application/json'; let urlPath = `/applications`; return { path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, body: CreateApplicationDTOToJSON(requestParameters['createApplicationDTO']), }; } /** * Create a new application for the authenticated account * Create a new application */ async createApplicationRaw(requestParameters: CreateApplicationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const requestOptions = await this.createApplicationRequestOpts(requestParameters); const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ApplicationDTOFromJSON(jsonValue)); } /** * Create a new application for the authenticated account * Create a new application */ async createApplication(requestParameters: CreateApplicationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.createApplicationRaw(requestParameters, initOverrides); return await response.value(); } /** * Creates request options for createMCPServer without sending the request */ async createMCPServerRequestOpts(requestParameters: CreateMCPServerRequest): Promise { if (requestParameters['createMCPServerDTO'] == null) { throw new runtime.RequiredError( 'createMCPServerDTO', 'Required parameter "createMCPServerDTO" was null or undefined when calling createMCPServer().' ); } const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; headerParameters['Content-Type'] = 'application/json'; let urlPath = `/mcp-servers`; return { path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, body: CreateMCPServerDTOToJSON(requestParameters['createMCPServerDTO']), }; } /** * Create a new MCP server for the authenticated account * Create a new MCP server */ async createMCPServerRaw(requestParameters: CreateMCPServerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const requestOptions = await this.createMCPServerRequestOpts(requestParameters); const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => MCPServerDTOFromJSON(jsonValue)); } /** * Create a new MCP server for the authenticated account * Create a new MCP server */ async createMCPServer(requestParameters: CreateMCPServerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.createMCPServerRaw(requestParameters, initOverrides); return await response.value(); } /** * Creates request options for createRole without sending the request */ async createRoleRequestOpts(requestParameters: CreateRoleRequest): Promise { if (requestParameters['applicationId'] == null) { throw new runtime.RequiredError( 'applicationId', 'Required parameter "applicationId" was null or undefined when calling createRole().' ); } if (requestParameters['createRoleDTO'] == null) { throw new runtime.RequiredError( 'createRoleDTO', 'Required parameter "createRoleDTO" was null or undefined when calling createRole().' ); } const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; headerParameters['Content-Type'] = 'application/json'; let urlPath = `/applications/{applicationId}/roles`; urlPath = urlPath.replace(`{${"applicationId"}}`, encodeURIComponent(String(requestParameters['applicationId']))); return { path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, body: CreateRoleDTOToJSON(requestParameters['createRoleDTO']), }; } /** * Create a new role for a specific application with empty permissions by default * Create a new role */ async createRoleRaw(requestParameters: CreateRoleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const requestOptions = await this.createRoleRequestOpts(requestParameters); const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => RoleDTOFromJSON(jsonValue)); } /** * Create a new role for a specific application with empty permissions by default * Create a new role */ async createRole(requestParameters: CreateRoleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.createRoleRaw(requestParameters, initOverrides); return await response.value(); } /** * Creates request options for deleteApplication without sending the request */ async deleteApplicationRequestOpts(requestParameters: DeleteApplicationRequest): Promise { if (requestParameters['applicationId'] == null) { throw new runtime.RequiredError( 'applicationId', 'Required parameter "applicationId" was null or undefined when calling deleteApplication().' ); } const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; let urlPath = `/applications/{applicationId}`; urlPath = urlPath.replace(`{${"applicationId"}}`, encodeURIComponent(String(requestParameters['applicationId']))); return { path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, }; } /** * Delete an application belonging to the authenticated account * Delete an application */ async deleteApplicationRaw(requestParameters: DeleteApplicationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const requestOptions = await this.deleteApplicationRequestOpts(requestParameters); const response = await this.request(requestOptions, initOverrides); return new runtime.VoidApiResponse(response); } /** * Delete an application belonging to the authenticated account * Delete an application */ async deleteApplication(requestParameters: DeleteApplicationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { await this.deleteApplicationRaw(requestParameters, initOverrides); } /** * Creates request options for deleteMCPServer without sending the request */ async deleteMCPServerRequestOpts(requestParameters: DeleteMCPServerRequest): Promise { if (requestParameters['mcpServerId'] == null) { throw new runtime.RequiredError( 'mcpServerId', 'Required parameter "mcpServerId" was null or undefined when calling deleteMCPServer().' ); } const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; let urlPath = `/mcp-servers/{mcpServerId}`; urlPath = urlPath.replace(`{${"mcpServerId"}}`, encodeURIComponent(String(requestParameters['mcpServerId']))); return { path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, }; } /** * Delete an MCP server from the authenticated account * Delete an MCP server */ async deleteMCPServerRaw(requestParameters: DeleteMCPServerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const requestOptions = await this.deleteMCPServerRequestOpts(requestParameters); const response = await this.request(requestOptions, initOverrides); return new runtime.VoidApiResponse(response); } /** * Delete an MCP server from the authenticated account * Delete an MCP server */ async deleteMCPServer(requestParameters: DeleteMCPServerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { await this.deleteMCPServerRaw(requestParameters, initOverrides); } /** * Creates request options for deleteRole without sending the request */ async deleteRoleRequestOpts(requestParameters: DeleteRoleRequest): Promise { if (requestParameters['applicationId'] == null) { throw new runtime.RequiredError( 'applicationId', 'Required parameter "applicationId" was null or undefined when calling deleteRole().' ); } if (requestParameters['roleId'] == null) { throw new runtime.RequiredError( 'roleId', 'Required parameter "roleId" was null or undefined when calling deleteRole().' ); } const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; let urlPath = `/applications/{applicationId}/roles/{roleId}`; urlPath = urlPath.replace(`{${"applicationId"}}`, encodeURIComponent(String(requestParameters['applicationId']))); urlPath = urlPath.replace(`{${"roleId"}}`, encodeURIComponent(String(requestParameters['roleId']))); return { path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, }; } /** * Delete a specific role by ID * Delete a role */ async deleteRoleRaw(requestParameters: DeleteRoleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const requestOptions = await this.deleteRoleRequestOpts(requestParameters); const response = await this.request(requestOptions, initOverrides); return new runtime.VoidApiResponse(response); } /** * Delete a specific role by ID * Delete a role */ async deleteRole(requestParameters: DeleteRoleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { await this.deleteRoleRaw(requestParameters, initOverrides); } /** * Creates request options for detachMCPServer without sending the request */ async detachMCPServerRequestOpts(requestParameters: DetachMCPServerRequest): Promise { if (requestParameters['applicationId'] == null) { throw new runtime.RequiredError( 'applicationId', 'Required parameter "applicationId" was null or undefined when calling detachMCPServer().' ); } if (requestParameters['mcpServerId'] == null) { throw new runtime.RequiredError( 'mcpServerId', 'Required parameter "mcpServerId" was null or undefined when calling detachMCPServer().' ); } const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; let urlPath = `/applications/{applicationId}/mcp-servers/{mcpServerId}`; urlPath = urlPath.replace(`{${"applicationId"}}`, encodeURIComponent(String(requestParameters['applicationId']))); urlPath = urlPath.replace(`{${"mcpServerId"}}`, encodeURIComponent(String(requestParameters['mcpServerId']))); return { path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, }; } /** * Detach an existing MCP server from the specified application within the authenticated account * Detach MCP server from application */ async detachMCPServerRaw(requestParameters: DetachMCPServerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const requestOptions = await this.detachMCPServerRequestOpts(requestParameters); const response = await this.request(requestOptions, initOverrides); return new runtime.VoidApiResponse(response); } /** * Detach an existing MCP server from the specified application within the authenticated account * Detach MCP server from application */ async detachMCPServer(requestParameters: DetachMCPServerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { await this.detachMCPServerRaw(requestParameters, initOverrides); } /** * Creates request options for getApplicationByID without sending the request */ async getApplicationByIDRequestOpts(requestParameters: GetApplicationByIDRequest): Promise { if (requestParameters['applicationId'] == null) { throw new runtime.RequiredError( 'applicationId', 'Required parameter "applicationId" was null or undefined when calling getApplicationByID().' ); } const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; let urlPath = `/applications/{applicationId}`; urlPath = urlPath.replace(`{${"applicationId"}}`, encodeURIComponent(String(requestParameters['applicationId']))); return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, }; } /** * Get a specific application belonging to the authenticated account * Get an application by applicationId */ async getApplicationByIDRaw(requestParameters: GetApplicationByIDRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const requestOptions = await this.getApplicationByIDRequestOpts(requestParameters); const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ApplicationDTOFromJSON(jsonValue)); } /** * Get a specific application belonging to the authenticated account * Get an application by applicationId */ async getApplicationByID(requestParameters: GetApplicationByIDRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.getApplicationByIDRaw(requestParameters, initOverrides); return await response.value(); } /** * Creates request options for getApplications without sending the request */ async getApplicationsRequestOpts(requestParameters: GetApplicationsRequest): Promise { const queryParameters: any = {}; if (requestParameters['page'] != null) { queryParameters['page'] = requestParameters['page']; } if (requestParameters['pageSize'] != null) { queryParameters['pageSize'] = requestParameters['pageSize']; } const headerParameters: runtime.HTTPHeaders = {}; let urlPath = `/applications`; return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, }; } /** * Get all applications belonging to the authenticated account * Get all applications for the account */ async getApplicationsRaw(requestParameters: GetApplicationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const requestOptions = await this.getApplicationsRequestOpts(requestParameters); const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedApplicationsDTOFromJSON(jsonValue)); } /** * Get all applications belonging to the authenticated account * Get all applications for the account */ async getApplications(requestParameters: GetApplicationsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.getApplicationsRaw(requestParameters, initOverrides); return await response.value(); } /** * Creates request options for getAvailableMCPServersByApplication without sending the request */ async getAvailableMCPServersByApplicationRequestOpts(requestParameters: GetAvailableMCPServersByApplicationRequest): Promise { if (requestParameters['applicationId'] == null) { throw new runtime.RequiredError( 'applicationId', 'Required parameter "applicationId" was null or undefined when calling getAvailableMCPServersByApplication().' ); } const queryParameters: any = {}; if (requestParameters['page'] != null) { queryParameters['page'] = requestParameters['page']; } if (requestParameters['pageSize'] != null) { queryParameters['pageSize'] = requestParameters['pageSize']; } const headerParameters: runtime.HTTPHeaders = {}; let urlPath = `/applications/{applicationId}/available-mcp-servers`; urlPath = urlPath.replace(`{${"applicationId"}}`, encodeURIComponent(String(requestParameters['applicationId']))); return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, }; } /** * Get all MCP servers in the account that are NOT attached to a specific application * List available MCP servers for an application */ async getAvailableMCPServersByApplicationRaw(requestParameters: GetAvailableMCPServersByApplicationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const requestOptions = await this.getAvailableMCPServersByApplicationRequestOpts(requestParameters); const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedMCPServerDTOFromJSON(jsonValue)); } /** * Get all MCP servers in the account that are NOT attached to a specific application * List available MCP servers for an application */ async getAvailableMCPServersByApplication(requestParameters: GetAvailableMCPServersByApplicationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.getAvailableMCPServersByApplicationRaw(requestParameters, initOverrides); return await response.value(); } /** * Creates request options for getMCPServerStatus without sending the request */ async getMCPServerStatusRequestOpts(requestParameters: GetMCPServerStatusRequest): Promise { if (requestParameters['mcpServerId'] == null) { throw new runtime.RequiredError( 'mcpServerId', 'Required parameter "mcpServerId" was null or undefined when calling getMCPServerStatus().' ); } const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; let urlPath = `/mcp-servers/{mcpServerId}/status`; urlPath = urlPath.replace(`{${"mcpServerId"}}`, encodeURIComponent(String(requestParameters['mcpServerId']))); return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, }; } /** * Get the pipeline status of a generated MCP server * Get MCP server generation status */ async getMCPServerStatusRaw(requestParameters: GetMCPServerStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const requestOptions = await this.getMCPServerStatusRequestOpts(requestParameters); const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => MCPServerStatusDTOFromJSON(jsonValue)); } /** * Get the pipeline status of a generated MCP server * Get MCP server generation status */ async getMCPServerStatus(requestParameters: GetMCPServerStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.getMCPServerStatusRaw(requestParameters, initOverrides); return await response.value(); } /** * Creates request options for getMCPServers without sending the request */ async getMCPServersRequestOpts(requestParameters: GetMCPServersRequest): Promise { const queryParameters: any = {}; if (requestParameters['page'] != null) { queryParameters['page'] = requestParameters['page']; } if (requestParameters['pageSize'] != null) { queryParameters['pageSize'] = requestParameters['pageSize']; } const headerParameters: runtime.HTTPHeaders = {}; let urlPath = `/mcp-servers`; return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, }; } /** * Get all MCP servers attached to any application within the authenticated account * List MCP servers for account */ async getMCPServersRaw(requestParameters: GetMCPServersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const requestOptions = await this.getMCPServersRequestOpts(requestParameters); const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedMCPServerDTOFromJSON(jsonValue)); } /** * Get all MCP servers attached to any application within the authenticated account * List MCP servers for account */ async getMCPServers(requestParameters: GetMCPServersRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.getMCPServersRaw(requestParameters, initOverrides); return await response.value(); } /** * Creates request options for getMCPServersByApplication without sending the request */ async getMCPServersByApplicationRequestOpts(requestParameters: GetMCPServersByApplicationRequest): Promise { if (requestParameters['applicationId'] == null) { throw new runtime.RequiredError( 'applicationId', 'Required parameter "applicationId" was null or undefined when calling getMCPServersByApplication().' ); } const queryParameters: any = {}; if (requestParameters['page'] != null) { queryParameters['page'] = requestParameters['page']; } if (requestParameters['pageSize'] != null) { queryParameters['pageSize'] = requestParameters['pageSize']; } const headerParameters: runtime.HTTPHeaders = {}; let urlPath = `/applications/{applicationId}/mcp-servers`; urlPath = urlPath.replace(`{${"applicationId"}}`, encodeURIComponent(String(requestParameters['applicationId']))); return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, }; } /** * Get all MCP servers attached to a specific application * List MCP servers for an application */ async getMCPServersByApplicationRaw(requestParameters: GetMCPServersByApplicationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const requestOptions = await this.getMCPServersByApplicationRequestOpts(requestParameters); const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedMCPServerDTOFromJSON(jsonValue)); } /** * Get all MCP servers attached to a specific application * List MCP servers for an application */ async getMCPServersByApplication(requestParameters: GetMCPServersByApplicationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.getMCPServersByApplicationRaw(requestParameters, initOverrides); return await response.value(); } /** * Creates request options for getRolesByApplicationId without sending the request */ async getRolesByApplicationIdRequestOpts(requestParameters: GetRolesByApplicationIdRequest): Promise { if (requestParameters['applicationId'] == null) { throw new runtime.RequiredError( 'applicationId', 'Required parameter "applicationId" was null or undefined when calling getRolesByApplicationId().' ); } const queryParameters: any = {}; if (requestParameters['page'] != null) { queryParameters['page'] = requestParameters['page']; } if (requestParameters['pageSize'] != null) { queryParameters['pageSize'] = requestParameters['pageSize']; } const headerParameters: runtime.HTTPHeaders = {}; let urlPath = `/applications/{applicationId}/roles`; urlPath = urlPath.replace(`{${"applicationId"}}`, encodeURIComponent(String(requestParameters['applicationId']))); return { path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, }; } /** * Retrieve all roles associated with a specific application * Get all roles for a specific application */ async getRolesByApplicationIdRaw(requestParameters: GetRolesByApplicationIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const requestOptions = await this.getRolesByApplicationIdRequestOpts(requestParameters); const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedRoleDTOFromJSON(jsonValue)); } /** * Retrieve all roles associated with a specific application * Get all roles for a specific application */ async getRolesByApplicationId(requestParameters: GetRolesByApplicationIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.getRolesByApplicationIdRaw(requestParameters, initOverrides); return await response.value(); } /** * Creates request options for updateApplication without sending the request */ async updateApplicationRequestOpts(requestParameters: UpdateApplicationRequest): Promise { if (requestParameters['applicationId'] == null) { throw new runtime.RequiredError( 'applicationId', 'Required parameter "applicationId" was null or undefined when calling updateApplication().' ); } if (requestParameters['updateApplicationDTO'] == null) { throw new runtime.RequiredError( 'updateApplicationDTO', 'Required parameter "updateApplicationDTO" was null or undefined when calling updateApplication().' ); } const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; headerParameters['Content-Type'] = 'application/json'; let urlPath = `/applications/{applicationId}`; urlPath = urlPath.replace(`{${"applicationId"}}`, encodeURIComponent(String(requestParameters['applicationId']))); return { path: urlPath, method: 'PATCH', headers: headerParameters, query: queryParameters, body: UpdateApplicationDTOToJSON(requestParameters['updateApplicationDTO']), }; } /** * Update an application belonging to the authenticated account * Update an application */ async updateApplicationRaw(requestParameters: UpdateApplicationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const requestOptions = await this.updateApplicationRequestOpts(requestParameters); const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => ApplicationDTOFromJSON(jsonValue)); } /** * Update an application belonging to the authenticated account * Update an application */ async updateApplication(requestParameters: UpdateApplicationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.updateApplicationRaw(requestParameters, initOverrides); return await response.value(); } /** * Creates request options for updateMCPServer without sending the request */ async updateMCPServerRequestOpts(requestParameters: UpdateMCPServerRequest): Promise { if (requestParameters['mcpServerId'] == null) { throw new runtime.RequiredError( 'mcpServerId', 'Required parameter "mcpServerId" was null or undefined when calling updateMCPServer().' ); } if (requestParameters['updateMCPServerDTO'] == null) { throw new runtime.RequiredError( 'updateMCPServerDTO', 'Required parameter "updateMCPServerDTO" was null or undefined when calling updateMCPServer().' ); } const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; headerParameters['Content-Type'] = 'application/json'; let urlPath = `/mcp-servers/{mcpServerId}`; urlPath = urlPath.replace(`{${"mcpServerId"}}`, encodeURIComponent(String(requestParameters['mcpServerId']))); return { path: urlPath, method: 'PATCH', headers: headerParameters, query: queryParameters, body: UpdateMCPServerDTOToJSON(requestParameters['updateMCPServerDTO']), }; } /** * Update an existing MCP server for the authenticated account * Update an existing MCP server */ async updateMCPServerRaw(requestParameters: UpdateMCPServerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const requestOptions = await this.updateMCPServerRequestOpts(requestParameters); const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => MCPServerDTOFromJSON(jsonValue)); } /** * Update an existing MCP server for the authenticated account * Update an existing MCP server */ async updateMCPServer(requestParameters: UpdateMCPServerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.updateMCPServerRaw(requestParameters, initOverrides); return await response.value(); } /** * Creates request options for updateRole without sending the request */ async updateRoleRequestOpts(requestParameters: UpdateRoleRequest): Promise { if (requestParameters['applicationId'] == null) { throw new runtime.RequiredError( 'applicationId', 'Required parameter "applicationId" was null or undefined when calling updateRole().' ); } if (requestParameters['roleId'] == null) { throw new runtime.RequiredError( 'roleId', 'Required parameter "roleId" was null or undefined when calling updateRole().' ); } if (requestParameters['updateRoleDTO'] == null) { throw new runtime.RequiredError( 'updateRoleDTO', 'Required parameter "updateRoleDTO" was null or undefined when calling updateRole().' ); } const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; headerParameters['Content-Type'] = 'application/json'; let urlPath = `/applications/{applicationId}/roles/{roleId}`; urlPath = urlPath.replace(`{${"applicationId"}}`, encodeURIComponent(String(requestParameters['applicationId']))); urlPath = urlPath.replace(`{${"roleId"}}`, encodeURIComponent(String(requestParameters['roleId']))); return { path: urlPath, method: 'PATCH', headers: headerParameters, query: queryParameters, body: UpdateRoleDTOToJSON(requestParameters['updateRoleDTO']), }; } /** * Update a role\'s name and/or permissions * Update a role */ async updateRoleRaw(requestParameters: UpdateRoleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const requestOptions = await this.updateRoleRequestOpts(requestParameters); const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => RoleDTOFromJSON(jsonValue)); } /** * Update a role\'s name and/or permissions * Update a role */ async updateRole(requestParameters: UpdateRoleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.updateRoleRaw(requestParameters, initOverrides); return await response.value(); } }