import { z } from 'zod'; import { AxiosResponse } from 'axios/index'; import FormData from 'form-data'; interface TokensUsage { input_tokens?: number; output_tokens?: number; money_spent?: number; } interface BaseUser { id?: string; username: string; name: string; } interface PaginationParams { page?: number; per_page?: number; } interface PaginatedResponse { data: T[]; pagination: { page: number; per_page: number; total: number; pages: number; }; } type SortOrder = "asc" | "desc"; /** API specification not defined in the OpenAPI spec. */ type AnyJson = Record; /** * Authentication configuration for API requests. * Used by ApiRequestHandler and all service classes. */ interface AuthConfig { apiDomain: string; token?: string | null; verifySSL?: boolean; cookies?: Record; tokenGetter?: (() => Promise) | null; } interface ResponseMetadata { timestamp: string; data_as_of: string; filters_applied: Record; execution_time_ms: number; } interface PaginationMetadata { page: number; per_page: number; total_count: number; has_more: boolean; } interface ColumnDefinition { id: string; label: string; type: string; format?: string; description?: string; } interface Metric { id: string; label: string; type: string; value: unknown; format?: string; description?: string; } interface SummariesData { metrics: Metric[]; } interface TabularData { columns: ColumnDefinition[]; rows: Record[]; totals?: Record; } interface UserListItem { id: string; name: string; } interface UsersListData { users: UserListItem[]; total_count: number; } interface SummariesResponse { data: SummariesData; metadata: ResponseMetadata; } interface TabularResponse { data: TabularData; metadata: ResponseMetadata; pagination?: PaginationMetadata; } interface UsersListResponse { data: UsersListData; metadata: ResponseMetadata; } declare const TIME_PERIOD_VALUES: readonly ["last_hour", "last_6_hours", "last_24_hours", "last_7_days", "last_30_days", "last_60_days", "last_year"]; type TimePeriod = (typeof TIME_PERIOD_VALUES)[number]; declare const AnalyticsQueryParamsSchema: z.ZodReadonly>; start_date: z.ZodOptional; end_date: z.ZodOptional; users: z.ZodOptional; projects: z.ZodOptional; }, z.core.$strip>>; type AnalyticsQueryParams = Partial>; declare const PaginatedAnalyticsQueryParamsSchema: z.ZodReadonly>; start_date: z.ZodOptional; end_date: z.ZodOptional; users: z.ZodOptional; projects: z.ZodOptional; page: z.ZodDefault; per_page: z.ZodDefault; }, z.core.$strip>>; type PaginatedAnalyticsQueryParams = Partial>; declare class AnalyticsService { private api; constructor(config: AuthConfig); getSummaries(_params?: AnalyticsQueryParams): Promise; getCliSummary(_params?: AnalyticsQueryParams): Promise; getUsers(_params?: AnalyticsQueryParams): Promise; getAssistantsChats(_params?: PaginatedAnalyticsQueryParams): Promise; getWorkflows(_params?: PaginatedAnalyticsQueryParams): Promise; getToolsUsage(_params?: PaginatedAnalyticsQueryParams): Promise; getWebhooksInvocation(_params?: PaginatedAnalyticsQueryParams): Promise; getMcpServers(_params?: PaginatedAnalyticsQueryParams): Promise; getMcpServersByUsers(_params?: PaginatedAnalyticsQueryParams): Promise; getProjectsSpending(_params?: PaginatedAnalyticsQueryParams): Promise; getLlmsUsage(_params?: PaginatedAnalyticsQueryParams): Promise; getUsersSpending(_params?: PaginatedAnalyticsQueryParams): Promise; getBudgetSoftLimit(_params?: PaginatedAnalyticsQueryParams): Promise; getBudgetHardLimit(_params?: PaginatedAnalyticsQueryParams): Promise; getUsersActivity(_params?: PaginatedAnalyticsQueryParams): Promise; getProjectsActivity(_params?: PaginatedAnalyticsQueryParams): Promise; getAgentsUsage(_params?: PaginatedAnalyticsQueryParams): Promise; getCliAgents(_params?: PaginatedAnalyticsQueryParams): Promise; getCliLlms(_params?: PaginatedAnalyticsQueryParams): Promise; getCliUsers(_params?: PaginatedAnalyticsQueryParams): Promise; getCliErrors(_params?: PaginatedAnalyticsQueryParams): Promise; getCliRepositories(_params?: PaginatedAnalyticsQueryParams): Promise; } /** Models for integration-related data structures */ /** * Credential types as constant object */ declare const CredentialTypes: { readonly JIRA: "Jira"; readonly CONFLUENCE: "Confluence"; readonly GIT: "Git"; readonly KUBERNETES: "Kubernetes"; readonly AWS: "AWS"; readonly GCP: "GCP"; readonly KEYCLOAK: "Keycloak"; readonly AZURE: "Azure"; readonly ELASTIC: "Elastic"; readonly OPENAPI: "OpenAPI"; readonly PLUGIN: "Plugin"; readonly FILESYSTEM: "FileSystem"; readonly SCHEDULER: "Scheduler"; readonly WEBHOOK: "Webhook"; readonly EMAIL: "Email"; readonly AZURE_DEVOPS: "AzureDevOps"; readonly SONAR: "Sonar"; readonly SQL: "SQL"; readonly TELEGRAM: "Telegram"; readonly ZEPHYR_SCALE: "ZephyrScale"; readonly ZEPHYR_SQUAD: "ZephyrSquad"; readonly SERVICE_NOW: "ServiceNow"; readonly DIAL: "DIAL"; readonly A2A: "A2A"; readonly MCP: "MCP"; readonly LITE_LLM: "LiteLLM"; readonly REPORT_PORTAL: "ReportPortal"; readonly XRAY: "Xray"; readonly SHAREPOINT: "SharePoint"; }; type CredentialTypesType = (typeof CredentialTypes)[keyof typeof CredentialTypes]; /** * Integration types as constant object */ declare const IntegrationType: { readonly USER: "user"; readonly PROJECT: "project"; }; type IntegrationTypeType = (typeof IntegrationType)[keyof typeof IntegrationType]; /** * Model for credential values */ interface CredentialValues { /** Key for the credential value */ key: string; /** Value of the credential (can be any type) */ value: unknown; } /** * Model for settings configuration */ interface Integration { /** Integration ID */ id: string; /** Creation date */ date?: string; /** Last update date */ update_date?: string; /** User ID */ user_id?: string; /** Project name */ project_name: string; /** Integration alias */ alias?: string; /** Whether this is the default integration */ default?: boolean; /** Whether this is a global integration */ is_global?: boolean; /** Type of credential */ credential_type: CredentialTypesType; /** List of credential values */ credential_values: CredentialValues[]; /** Type of integration */ setting_type: IntegrationTypeType; } /** * Error models for structured error handling in CodeMie SDK responses. * * This module provides error classification and structured error details that match * the CodeMie API error response format, enabling proper error handling without * parsing error messages. */ /** * High-level categorization of errors in the CodeMie system. * * Separates errors by their source to enable proper handling and debugging. */ declare enum ErrorCategory { AGENT = "agent",// Agent-level errors (execution, callbacks, etc.) TOOL = "tool",// Tool execution errors (HTTP errors, timeouts, etc.) LLM = "llm",// LLM provider errors (rate limits, content policy, etc.) VALIDATION = "validation" } /** * Specific error codes for detailed error classification. * * These codes enable clients to programmatically handle different error scenarios * without parsing error messages. */ declare enum ErrorCode { AGENT_TIMEOUT = "agent_timeout", AGENT_TOKEN_LIMIT = "agent_token_limit", AGENT_BUDGET_EXCEEDED = "agent_budget_exceeded", AGENT_CALLBACK_FAILURE = "agent_callback_failure", AGENT_NETWORK_ERROR = "agent_network_error", AGENT_CONFIGURATION_ERROR = "agent_configuration_error", AGENT_INTERNAL_ERROR = "agent_internal_error", TOOL_AUTHENTICATION = "tool_authentication",// 401 Unauthorized TOOL_AUTHORIZATION = "tool_authorization",// 403 Forbidden TOOL_NOT_FOUND = "tool_not_found",// 404 Not Found TOOL_CONFLICT = "tool_conflict",// 409 Conflict TOOL_RATE_LIMITED = "tool_rate_limited",// 429 Too Many Requests TOOL_SERVER_ERROR = "tool_server_error",// 5xx Server Error TOOL_TIMEOUT = "tool_timeout", TOOL_VALIDATION = "tool_validation",// Invalid tool input TOOL_NETWORK_ERROR = "tool_network_error", TOOL_EXECUTION_FAILED = "tool_execution_failed",// Generic tool failure LLM_CONTENT_POLICY = "llm_content_policy", LLM_CONTEXT_LENGTH = "llm_context_length", LLM_UNAVAILABLE = "llm_unavailable", LLM_RATE_LIMITED = "llm_rate_limited", LLM_INVALID_REQUEST = "llm_invalid_request", VALIDATION_INPUT = "validation_input", VALIDATION_OUTPUT = "validation_output", VALIDATION_SCHEMA = "validation_schema" } /** * Structured details for a tool execution error. * * Captures comprehensive information about tool failures to enable proper * debugging and error handling without relying on the LLM to interpret errors. */ interface ToolErrorDetails { /** Name of the tool that encountered an error */ tool_name: string; /** Unique identifier for the tool call */ tool_call_id?: string; /** Classified error code for programmatic handling */ error_code: ErrorCode; /** Human-readable error message */ message: string; /** HTTP status code if applicable (401, 403, 404, 5xx, etc.) */ http_status?: number; /** Additional error context (integration name, action, etc.) */ details?: Record; /** ISO 8601 timestamp of when error occurred */ timestamp: string; } /** * Error verbosity level for API responses. * * Controls how much detail is included in tool error responses: * - Minimal: Only error code and message (for production clients) * - Standard: Adds HTTP status and tool_call_id (default, for debugging) * - Full: Includes all details including timestamp (for development) */ declare enum ErrorDetailLevel { Minimal = "minimal", Standard = "standard", Full = "full" } /** * Structured details for an agent-level error. * * Captures agent execution failures that are not related to specific tools, * such as token limits, budget constraints, or internal errors. */ interface AgentErrorDetails { /** Classified error code for programmatic handling */ error_code: ErrorCode; /** Human-readable error message */ message: string; /** Additional error context */ details?: Record; /** Full stacktrace for debugging (only in debug mode) */ stacktrace?: string; } /** * Complete error response with separated agent and tool errors. * * This structure ensures that errors from different sources are clearly * distinguished and not absorbed by the LLM's response text. */ interface ErrorResponse { /** High-level error category */ category: ErrorCategory; /** Agent-level error details (if applicable) */ agent_error?: AgentErrorDetails; /** Tool error details (multiple tools can fail) */ tool_errors?: ToolErrorDetails[]; /** Whether the error is recoverable */ is_recoverable: boolean; } /** * Format tool error details to minimal format (code + message only). */ declare function formatToolErrorMinimal(error: ToolErrorDetails): Record; /** * Format tool error details to standard format (+ http_status, tool_call_id). */ declare function formatToolErrorStandard(error: ToolErrorDetails): Record; /** * Format tool error details to full format (all fields). */ declare function formatToolErrorFull(error: ToolErrorDetails): Record; /** * Format tool error details based on verbosity level. */ declare function formatToolErrorForLevel(error: ToolErrorDetails, level: ErrorDetailLevel): Record; /** * HTTP status code to error code mapping. */ declare const HTTP_STATUS_TO_ERROR_CODE: Record; /** * Error message keywords to error code mapping. */ declare const ERROR_MESSAGE_PATTERNS: Record; /** * Classify HTTP status codes into appropriate ErrorCode values. * * Uses a two-stage classification approach: * 1. Primary: Classification by HTTP status code using dictionary mapping * 2. Fallback: If status yields generic result, analyze error message content */ declare function classifyHttpError(statusCode: number, errorMessage?: string): ErrorCode; /** * Determine if an error is recoverable (can be retried). */ declare function isRecoverableError(errorCode: ErrorCode): boolean; /** Models for assistant-related data structures. */ declare enum ContextType { KNOWLEDGE_BASE = "knowledge_base", CODE = "code" } declare enum ChatRole { ASSISTANT = "Assistant", USER = "User" } interface ToolDetails { description?: string | null; label?: string; name: string; settings?: Integration | null; settings_config: boolean; user_description?: string; } interface ToolKitDetails { is_external: boolean; label: string; settings?: Integration; settings_config: boolean; toolkit: string; tools: ToolDetails[]; } interface Context { context_type: ContextType; name: string; } interface PromptVariable { key: string; description?: string; default_value: string; } interface MCPServerConfig { command?: string; url?: string; args?: string[]; env?: Record; headers?: Record; type?: string; auth_token?: string; single_usage?: boolean; audience?: string; } interface MCPServerDetails { name: string; description?: string; enabled: boolean; config?: MCPServerConfig; mcp_connect_url?: string; tools_tokens_size_limit?: number; command?: string; arguments?: string; settings?: Integration; mcp_connect_auth_token?: Integration; } interface SystemPromptHistory { system_prompt: string; date: string; created_by?: BaseUser; } interface AssistantCategory { id: string; name: string; description?: string; } interface AssistantBase { id: string; created_by?: BaseUser; description: string; icon_url?: string; name: string; } interface Assistant extends AssistantBase { display_name?: string | null; assistant_ids: string[]; categories?: AssistantCategory[]; context: Context[]; skill_ids?: string[]; conversation_starters: string[]; created_date?: string; creator: string; is_global: boolean; is_react: boolean; llm_model_type?: string; mcp_servers: MCPServerDetails[]; nested_assistants: Partial[]; project: string; prompt_variables?: PromptVariable[]; shared: boolean; slug?: string; system_prompt: string; system_prompt_history: SystemPromptHistory[]; temperature?: number; toolkits: ToolKitDetails[]; top_p?: number; unique_users_count?: number; updated_date?: string; user_abilities?: unknown[]; version_count?: number; } /** * API response for assistant chat (camelCase format from API). * * Error fields expose agent and tool errors. */ interface BaseModelApiResponse { generated: string; timeElapsed?: number; tokensUsed?: number; thoughts?: Record[]; taskId?: string; success?: boolean; agentError?: AgentErrorDetails; toolErrors?: ToolErrorDetails[]; } /** * Client-facing response for assistant chat (snake_case format). * * Error fields expose agent and tool errors without breaking backward * compatibility (all error fields optional). */ interface BaseModelResponse { generated: string | object | unknown; time_elapsed?: number; tokens_used?: number; thoughts?: Record[]; task_id?: string; success?: boolean; agent_error?: AgentErrorDetails; tool_errors?: ToolErrorDetails[]; } interface AssistantVersion { version_number: number; created_date: string; created_by?: BaseUser; change_notes?: string; description?: string; system_prompt: string; llm_model_type?: string; temperature?: number; top_p?: number; context: Context[]; toolkits: ToolKitDetails[]; mcp_servers: MCPServerDetails[]; assistant_ids: string[]; prompt_variables?: PromptVariable[]; [key: string]: unknown; } interface MissingIntegration { toolkit: string; tool: string; label: string; credential_type?: string; } interface MissingIntegrationsByCredentialType { credential_type: string; missing_tools: MissingIntegration[]; assistant_id?: string; assistant_name?: string; icon_url?: string; } interface IntegrationValidationResult { has_missing_integrations: boolean; missing_by_credential_type: MissingIntegrationsByCredentialType[]; sub_assistants_missing: MissingIntegrationsByCredentialType[]; message?: string; } interface AssistantCreateResponse { message: string; assistant_id?: string; validation?: IntegrationValidationResult; } interface AssistantUpdateResponse { message: string; validation?: IntegrationValidationResult; } declare const AssistantListParamsSchema: z.ZodReadonly; scope: z.ZodDefault>; page: z.ZodDefault; per_page: z.ZodDefault; filters: z.ZodOptional>; }, z.core.$strip>>; type AssistantListParams = Partial>; declare const MCPServerConfigSchema: z.ZodOptional; command: z.ZodOptional; args: z.ZodOptional>; env: z.ZodOptional>; auth_token: z.ZodOptional; headers: z.ZodOptional>; type: z.ZodOptional; single_usage: z.ZodOptional; audience: z.ZodOptional; }, z.core.$strip>>; declare const AssistantCreateParamsSchema: z.ZodReadonly; system_prompt: z.ZodString; project: z.ZodString; context: z.ZodArray; name: z.ZodString; }, z.core.$strip>>; llm_model_type: z.ZodString; toolkits: z.ZodArray; settings_config: z.ZodBoolean; user_description: z.ZodOptional; settings: z.ZodOptional>; }, z.core.$strip>>; label: z.ZodString; settings_config: z.ZodBoolean; is_external: z.ZodBoolean; settings: z.ZodOptional; }, z.core.$strip>>; conversation_starters: z.ZodArray; shared: z.ZodOptional; is_react: z.ZodOptional; is_global: z.ZodOptional; slug: z.ZodOptional; temperature: z.ZodOptional; top_p: z.ZodOptional; mcp_servers: z.ZodArray; enabled: z.ZodBoolean; config: z.ZodOptional; command: z.ZodOptional; args: z.ZodOptional>; env: z.ZodOptional>; auth_token: z.ZodOptional; headers: z.ZodOptional>; type: z.ZodOptional; single_usage: z.ZodOptional; audience: z.ZodOptional; }, z.core.$strip>>; mcp_connect_url: z.ZodOptional; tools_tokens_size_limit: z.ZodOptional; command: z.ZodOptional; arguments: z.ZodOptional; settings: z.ZodOptional; mcp_connect_auth_token: z.ZodOptional; }, z.core.$strip>>; assistant_ids: z.ZodArray; skill_ids: z.ZodOptional>; prompt_variables: z.ZodDefault; default_value: z.ZodString; }, z.core.$strip>>>>; categories: z.ZodOptional>; skip_integration_validation: z.ZodDefault>; }, z.core.$strip>>; type AssistantCreateParams = z.input; declare const AssistantUpdateParamsSchema: z.ZodReadonly; system_prompt: z.ZodString; project: z.ZodString; context: z.ZodArray; name: z.ZodString; }, z.core.$strip>>; llm_model_type: z.ZodString; toolkits: z.ZodArray; settings_config: z.ZodBoolean; user_description: z.ZodOptional; settings: z.ZodOptional>; }, z.core.$strip>>; label: z.ZodString; settings_config: z.ZodBoolean; is_external: z.ZodBoolean; settings: z.ZodOptional; }, z.core.$strip>>; conversation_starters: z.ZodArray; shared: z.ZodOptional; is_react: z.ZodOptional; is_global: z.ZodOptional; slug: z.ZodOptional; temperature: z.ZodOptional; top_p: z.ZodOptional; mcp_servers: z.ZodArray; enabled: z.ZodBoolean; config: z.ZodOptional; command: z.ZodOptional; args: z.ZodOptional>; env: z.ZodOptional>; auth_token: z.ZodOptional; headers: z.ZodOptional>; type: z.ZodOptional; single_usage: z.ZodOptional; audience: z.ZodOptional; }, z.core.$strip>>; mcp_connect_url: z.ZodOptional; tools_tokens_size_limit: z.ZodOptional; command: z.ZodOptional; arguments: z.ZodOptional; settings: z.ZodOptional; mcp_connect_auth_token: z.ZodOptional; }, z.core.$strip>>; assistant_ids: z.ZodArray; skill_ids: z.ZodOptional>; prompt_variables: z.ZodDefault; default_value: z.ZodString; }, z.core.$strip>>>>; categories: z.ZodOptional>; skip_integration_validation: z.ZodDefault>; }, z.core.$strip>>; type AssistantUpdateParams = z.input; declare const AssistantChatParamsSchema: z.ZodReadonly; text: z.ZodString; content_raw: z.ZodOptional; file_names: z.ZodOptional>; llm_model: z.ZodOptional; history: z.ZodUnion; message: z.ZodOptional; }, z.core.$strip>>, z.ZodString]>; history_index: z.ZodOptional; stream: z.ZodOptional; propagate_headers: z.ZodOptional; custom_metadata: z.ZodOptional>; top_k: z.ZodOptional; system_prompt: z.ZodOptional; background_task: z.ZodOptional; metadata: z.ZodOptional>; mcp_server_single_usage: z.ZodOptional; save_history: z.ZodOptional; version: z.ZodOptional; output_schema: z.ZodOptional, z.ZodRecord]>>; }, z.core.$strip>>; type AssistantChatParams = z.infer; declare const VirtualAssistantChatParamsSchema: z.ZodReadonly; llm_model_type: z.ZodOptional; temperature: z.ZodOptional; top_p: z.ZodOptional; toolkits: z.ZodDefault>; settings_config: z.ZodBoolean; user_description: z.ZodOptional>; settings: z.ZodOptional>; }, z.core.$strip>>; label: z.ZodString; settings_config: z.ZodBoolean; is_external: z.ZodOptional>; settings: z.ZodOptional; }, z.core.$strip>>>; context: z.ZodDefault; name: z.ZodString; }, z.core.$strip>>>; mcp_servers: z.ZodDefault>; enabled: z.ZodBoolean; config: z.ZodOptional>; url: z.ZodOptional>; args: z.ZodOptional>>; env: z.ZodOptional>>; auth_token: z.ZodOptional>; headers: z.ZodOptional>>; type: z.ZodOptional>; single_usage: z.ZodOptional>; audience: z.ZodOptional>; auth_config: z.ZodOptional>>; tools: z.ZodOptional>>; }, z.core.$strip>>; mcp_connect_url: z.ZodOptional>; tools_tokens_size_limit: z.ZodOptional>; command: z.ZodOptional>; arguments: z.ZodOptional>; settings: z.ZodOptional; mcp_connect_auth_token: z.ZodOptional; }, z.core.$strip>>>; skill_ids: z.ZodDefault>; assistant_ids: z.ZodDefault>; agent_mode: z.ZodDefault>; plan_prompt: z.ZodOptional; smart_tool_selection_enabled: z.ZodDefault; prompt_variables: z.ZodDefault; default_value: z.ZodString; }, z.core.$strip>>>; conversation_id: z.ZodOptional; text: z.ZodString; content_raw: z.ZodOptional; file_names: z.ZodOptional>; history: z.ZodDefault; message: z.ZodOptional; }, z.core.$strip>>, z.ZodString]>>; stream: z.ZodOptional; output_schema: z.ZodOptional, z.ZodRecord]>>; tools_config: z.ZodOptional>; integration_id: z.ZodOptional; }, z.core.$strip>>>; metadata: z.ZodOptional>; top_k: z.ZodDefault; propagate_headers: z.ZodDefault; disable_cache: z.ZodOptional; mcp_server_single_usage: z.ZodOptional; }, z.core.$strip>>; type VirtualAssistantChatParams = z.input; declare const AssistantEvaluationParamsSchema: z.ZodReadonly; llm_model: z.ZodOptional; }, z.core.$strip>>; type AssistantEvaluationParams = z.infer; declare const AssistantVersionsListParamsSchema: z.ZodReadonly; per_page: z.ZodOptional; }, z.core.$strip>>; type AssistantVersionsListParams = Partial>; type VersionsListResponse = AssistantVersion[] | { data: AssistantVersion[]; [key: string]: unknown; } | { versions: AssistantVersion[]; [key: string]: unknown; } | { items: AssistantVersion[]; [key: string]: unknown; }; declare class AssistantService { private api; constructor(config: AuthConfig); /** * Get list of available assistants. */ list(_params?: AssistantListParams): Promise<(Assistant | AssistantBase)[]>; /** * Get list of available assistants with pagination metadata. */ listPaginated(_params?: AssistantListParams): Promise>; /** * Get assistant by ID. */ get(assistantId: string): Promise; /** * Get assistant by slug. */ getBySlug(slug: string): Promise; /** * Create a new assistant. * @returns AssistantCreateResponse with assistant_id and optional validation results */ create(_params: AssistantCreateParams): Promise; /** * Update an existing assistant. * @returns AssistantUpdateResponse with optional validation results */ update(assistantId: string, _params: AssistantUpdateParams): Promise; /** * Get list of available tools. */ getTools(): Promise; /** * Delete an assistant by ID. */ delete(assistantId: string): Promise; /** * Get list of prebuilt assistants. */ getPrebuilt(): Promise; /** * Get prebuilt assistant by slug. */ getPrebuiltBySlug(slug: string): Promise; /** * List assistant versions. */ listVersions(assistantId: string, _params?: AssistantVersionsListParams): Promise; /** * Get a specific assistant version by number. */ getVersion(assistantId: string, versionNumber: number): Promise; /** * Send a chat request to an assistant. */ chat(assistantId: string, _params: AssistantChatParams, headers?: Record): Promise; /** * Send a chat request to an assistant by slug. */ chatBySlug(assistantSlug: string, _params: AssistantChatParams, headers?: Record): Promise; /** * Run inference using an inline (virtual) assistant definition. * No database assistant record is required. History is never persisted. */ askVirtual(_params: VirtualAssistantChatParams, headers?: Record): Promise; /** * Compare two assistant versions. */ compareVersions(assistantId: string, v1: number, v2: number): Promise>; /** * Rollback assistant to a specific version. Creates a new version mirroring the target. */ rollbackToVersion(assistantId: string, versionNumber: number): Promise; /** * Send a chat request to a specific assistant version. */ chatWithVersion(assistantId: string, versionNumber: number, _params: AssistantChatParams): Promise; /** * Evaluate an assistant with a dataset. */ evaluate(assistantId: string, _params: AssistantEvaluationParams): Promise; } interface Conversation { id: string; name: string; folder?: string; pinned: boolean; date: string; assistant_ids: string[]; initial_assistant_id?: string; } interface Mark { mark: string; rating: number; comments: string; date: string; operator?: Operator; } interface Operator { user_id: string; name: string; } interface Thought { id: string; parent_id?: string; metadata: Record; in_progress: boolean; input_text?: string; message?: string; author_type: string; author_name: string; output_format: string; error?: boolean; children: string[]; } interface HistoryMark { mark: string; rating: number; comments?: string; date: string; } interface HistoryItem { role: string; message: string; historyIndex: number; date: string; responseTime?: number; inputTokens?: number; outputTokens?: number; moneySpent?: number; userMark?: HistoryMark; operatorMark?: HistoryMark; messageRaw?: string; fileNames: string[]; assistantId?: string; thoughts?: Thought[]; } interface ContextItem { context_type?: "knowledge_base" | "code" | "provider"; name: string; } interface ToolItem { name: string; label?: string; settings_config?: boolean; user_description?: string; } interface AssistantDataItem { assistant_id: string; assistant_name: string; assistant_icon?: string; assistant_type: string; context: (ContextItem | string)[]; tools: ToolItem[]; conversation_starters: string[]; } interface ConversationDetailsData { llm_model?: string; context: ContextItem[]; app_name?: string; repo_name?: string; index_type?: string; } interface AssistantDetailsData { assistant_id: string; assistant_name: string; assistant_icon: string; assistant_type: string; context: (ContextItem | string)[]; tools: ToolItem[]; conversation_starters: string[]; } interface ConversationDetails { id: string; date: string; update_date: string; conversation_id: string; conversation_name: string; llm_model?: string; folder?: string; pinned: boolean; history: HistoryItem[]; user_id: string; user_name: string; assistant_ids: string[]; assistant_data: AssistantDataItem[]; initial_assistant_id: string; final_user_mark?: Mark; final_operator_mark?: Mark; project: string; conversation_details?: ConversationDetailsData; assistant_details?: AssistantDetailsData; user_abilities?: string[]; is_folder_migrated: boolean; category?: string; mcp_server_single_usage?: boolean; } interface ConversationCreateRequest { initial_assistant_id?: string; folder?: string; mcp_server_single_usage?: boolean; } declare const ConversationCreateParamsSchema: z.ZodReadonly; folder: z.ZodOptional; mcp_server_single_usage: z.ZodDefault>; }, z.core.$strip>>; type ConversationCreateParams = z.input; declare class ConversationService { private api; constructor(config: AuthConfig); /** * Get list of all conversations for the current user. */ list(): Promise; /** * Get list of all conversations for the current user that include the specified assistant. */ listByAssistantId(assistantId: string): Promise; /** * Get details for a specific conversation by its ID. */ get(conversationId: string): Promise; /** * Create a new conversation. */ create(_params?: ConversationCreateParams): Promise; /** * Delete a specific conversation by its ID. */ delete(conversationId: string): Promise; } /** Models for datasource service. */ /** Code datasource type options */ declare const CodeDataSourceType: { readonly CODE: "code"; readonly SUMMARY: "summary"; readonly CHUNK_SUMMARY: "chunk-summary"; }; type CodeDataSourceTypeType = (typeof CodeDataSourceType)[keyof typeof CodeDataSourceType]; /** Datasource type options */ declare const DataSourceType: { readonly CODE: "code"; readonly CONFLUENCE: "knowledge_base_confluence"; readonly JIRA: "knowledge_base_jira"; readonly FILE: "knowledge_base_file"; readonly GOOGLE: "llm_routing_google"; readonly PROVIDER: "provider"; readonly SUMMARY: "summary"; readonly CHUNK_SUMMARY: "chunk-summary"; readonly JSON: "knowledge_base_json"; readonly BEDROCK: "knowledge_base_bedrock"; readonly XRAY: "knowledge_base_xray"; readonly PLATFORM: "platform_marketplace_assistant"; readonly AZURE_DEVOPS_WIKI: "knowledge_base_azure_devops_wiki"; readonly AZURE_DEVOPS_WORK_ITEM: "knowledge_base_azure_devops_work_item"; readonly SHAREPOINT: "knowledge_base_sharepoint"; }; type DataSourceTypeType = (typeof DataSourceType)[keyof typeof DataSourceType]; /** Datasource status options */ declare const DataSourceStatus: { readonly COMPLETED: "completed"; readonly FAILED: "failed"; readonly FETCHING: "fetching"; readonly IN_PROGRESS: "in_progress"; }; type DataSourceStatusType = (typeof DataSourceStatus)[keyof typeof DataSourceStatus]; /** Base file model for file datasources */ type File = Readonly<{ /** File name */ name: string; /** File content */ content: string | Buffer; /** MIME type of the file */ mime_type: string; }>; /** Confluence-specific configuration */ interface Confluence { cql: string; include_restricted_content?: boolean; include_archived_content?: boolean; include_attachments?: boolean; include_comments?: boolean; keep_markdown_format?: boolean; keep_newlines?: boolean; max_pages?: number; pages_per_request?: number; } /** Jira-specific configuration */ interface Jira { jql: string; } /** Google-specific configuration */ interface Google { googleDoc: string; } /** File-specific configuration */ interface Files { files: File[]; } /** Code repository configuration */ interface Code { branch: string; docsGeneration?: boolean; embeddingsModel?: string; filesFilter?: string; indexType: CodeDataSourceTypeType; link: string; projectSpaceVisible?: boolean; prompt?: string; settingId: string; summarizationModel?: string; } /** Azure DevOps Wiki-specific configuration */ interface AzureDevOpsWiki { wiki_query?: string; organization?: string; project?: string; wiki_name?: string; } /** Azure DevOps Work Item-specific configuration */ interface AzureDevOpsWorkItem { wiql_query?: string; organization?: string; project?: string; } /** SharePoint authentication type */ type SharePointAuthType = "integration" | "oauth_codemie" | "oauth_custom"; /** SharePoint-specific configuration (used in responses) */ interface SharePoint { site_url: string; include_pages?: boolean; include_documents?: boolean; include_lists?: boolean; max_file_size_mb?: number; files_filter?: string; auth_type?: SharePointAuthType; oauth_client_id?: string; oauth_tenant_id?: string; } /** SharePoint-specific create/update parameters */ interface BaseSharePointParams { /** SharePoint site URL (must start with https://) */ site_url: string; /** Index SharePoint site pages */ include_pages?: boolean; /** Index document libraries */ include_documents?: boolean; /** Index list items */ include_lists?: boolean; /** Maximum file size in MB to index (1–500, default 50) */ max_file_size_mb?: number; /** Gitignore-style file/path filter */ files_filter?: string; /** Authentication method */ auth_type?: SharePointAuthType; /** OAuth access token (required for oauth_codemie and oauth_custom) */ access_token?: string; /** Azure app client ID (oauth_custom only) */ oauth_client_id?: string; /** Azure AD tenant ID (oauth_custom only) */ oauth_tenant_id?: string; /** Override default embedding model */ embedding_model?: string; /** Cron expression for scheduled reindexing */ cron_expression?: string; } /** Elasticsearch statistics response */ interface ElasticsearchStats { index_name: string; size_in_bytes: number; } /** Code Analysis provider datasource creation parameters */ interface CodeAnalysisProviderCreateParams { name: string; description: string; project_name: string; shared_with_project?: boolean; branch: string; api_url: string; access_token: string; analyzer: string; datasource_root: string; } /** Code Exploration provider datasource creation parameters */ interface CodeExplorationProviderCreateParams { name: string; description: string; project_name: string; shared_with_project?: boolean; code_analysis_datasource_ids: string[]; } /** Provider datasource creation parameters */ type ProviderDataSourceRequest = CodeAnalysisProviderCreateParams | CodeExplorationProviderCreateParams; /** Base data source DTO */ interface BaseDataSourceCreateDto { name: string; project_name: string; description: string; project_space_visible: boolean; setting_id: string | null; type: DataSourceTypeType; } interface ConfluenceDataSourceCreateDto extends BaseDataSourceCreateDto, Confluence { type: typeof DataSourceType.CONFLUENCE; } interface JiraDataSourceCreateDto extends BaseDataSourceCreateDto, Jira { type: typeof DataSourceType.JIRA; } interface GoogleDataSourceCreateDto extends BaseDataSourceCreateDto, Google { type: typeof DataSourceType.GOOGLE; } interface FileDataSourceCreateDto extends BaseDataSourceCreateDto, Files { type: typeof DataSourceType.FILE; } interface CodeDataSourceCreateDto extends Omit, Code { type: typeof DataSourceType.CODE; } interface AzureDevOpsWikiDataSourceCreateDto extends BaseDataSourceCreateDto, AzureDevOpsWiki { type: typeof DataSourceType.AZURE_DEVOPS_WIKI; } interface AzureDevOpsWorkItemDataSourceCreateDto extends BaseDataSourceCreateDto, AzureDevOpsWorkItem { type: typeof DataSourceType.AZURE_DEVOPS_WORK_ITEM; } interface XrayDataSourceCreateDto extends BaseDataSourceCreateDto, Jira { type: typeof DataSourceType.XRAY; } interface SharePointDataSourceCreateDto extends BaseDataSourceCreateDto, BaseSharePointParams { type: typeof DataSourceType.SHAREPOINT; } type DataSourceCreateDto = ConfluenceDataSourceCreateDto | JiraDataSourceCreateDto | GoogleDataSourceCreateDto | FileDataSourceCreateDto | CodeDataSourceCreateDto | AzureDevOpsWikiDataSourceCreateDto | AzureDevOpsWorkItemDataSourceCreateDto | XrayDataSourceCreateDto | SharePointDataSourceCreateDto | BaseDataSourceCreateDto; /** Base data source update DTO */ interface BaseDataSourceUpdateDto { name: string; project_name: string; description?: string; project_space_visible?: boolean; setting_id?: string | null; type: DataSourceTypeType; full_reindex?: boolean; skip_reindex?: boolean; resume_indexing?: boolean; incremental_reindex?: boolean; } interface ConfluenceDataSourceUpdateDto extends BaseDataSourceUpdateDto, Partial { type: typeof DataSourceType.CONFLUENCE; } interface JiraDataSourceUpdateDto extends BaseDataSourceUpdateDto, Partial { type: typeof DataSourceType.JIRA; } interface GoogleDataSourceUpdateDto extends BaseDataSourceUpdateDto, Partial { type: typeof DataSourceType.GOOGLE; } interface FileDataSourceUpdateDto extends BaseDataSourceUpdateDto, Partial { type: typeof DataSourceType.FILE; } interface CodeDataSourceUpdateDto extends Omit, Partial { type: typeof DataSourceType.CODE; } interface AzureDevOpsWikiDataSourceUpdateDto extends BaseDataSourceUpdateDto, Partial { type: typeof DataSourceType.AZURE_DEVOPS_WIKI; } interface AzureDevOpsWorkItemDataSourceUpdateDto extends BaseDataSourceUpdateDto, Partial { type: typeof DataSourceType.AZURE_DEVOPS_WORK_ITEM; } interface XrayDataSourceUpdateDto extends BaseDataSourceUpdateDto, Partial { type: typeof DataSourceType.XRAY; } interface SharePointDataSourceUpdateDto extends BaseDataSourceUpdateDto, Partial { type: typeof DataSourceType.SHAREPOINT; } type DataSourceUpdateDto = ConfluenceDataSourceUpdateDto | JiraDataSourceUpdateDto | GoogleDataSourceUpdateDto | FileDataSourceUpdateDto | CodeDataSourceUpdateDto | AzureDevOpsWikiDataSourceUpdateDto | AzureDevOpsWorkItemDataSourceUpdateDto | XrayDataSourceUpdateDto | SharePointDataSourceUpdateDto | BaseDataSourceUpdateDto; /** Processing information for datasource */ interface DataSourceProcessingInfoResponse { /** Total number of documents processed */ total_documents?: number; /** Number of documents skipped */ skipped_documents?: number; /** Total size in kilobytes */ total_size_kb?: number; /** Average file size in bytes */ average_file_size_bytes?: number; /** List of unique file extensions */ unique_extensions?: string[]; /** Filtered documents count or list */ filtered_documents?: number | string[]; /** Number of processed documents */ documents_count_key?: number; } /** Processing information for datasource */ interface DataSourceProcessingInfo { /** Total number of documents processed */ total_documents_count?: number; /** Number of documents skipped */ skipped_documents_count?: number; /** Total size in kilobytes */ total_size_kb?: number; /** Average file size in bytes */ average_file_size_bytes?: number; /** List of unique file extensions */ unique_extensions?: string[]; /** Filtered documents count or list */ filtered_documents?: number | string[]; /** Number of processed documents */ processed_documents_count?: number; } type DataSourceResponse = BaseDataSourceResponse | CodeDataSourceResponse; /** Datasource response interface */ interface BaseDataSourceResponse { /** Unique identifier */ id: string; /** Project name */ project_name: string; /** Datasource name */ repo_name: string; /** Description */ description?: string; /** Type of datasource */ index_type: DataSourceTypeType; /** Embeddings model used */ embeddings_model?: string; /** Whether datasource has an error */ error?: boolean; /** Whether datasource indexing is complete */ completed?: boolean; /** Whether datasource is currently fetching */ is_fetching?: boolean; /** Whether datasource is queued */ is_queued?: boolean; /** Setting ID reference */ setting_id?: string; /** Creation date */ date: string; /** Creator information */ created_by: BaseUser; /** Whether shared with project */ project_space_visible: boolean; /** Last update date */ update_date: string; /** Error message if failed */ text?: string; /** User abilities list */ user_abilities: string[]; /** Processing information */ processing_info?: DataSourceProcessingInfoResponse; /** List of processed documents */ processed_files?: string[]; /** Token usage statistics */ tokens_usage?: TokensUsage; /** Jira-specific configuration */ jira?: Jira; /** Confluence-specific configuration */ confluence?: Confluence; /** Google document link */ google_doc_link?: string; /** Azure DevOps Wiki-specific configuration */ azure_devops_wiki?: AzureDevOpsWiki; /** Azure DevOps Work Item-specific configuration */ azure_devops_work_item?: AzureDevOpsWorkItem; /** SharePoint-specific configuration */ sharepoint?: SharePoint; } type CodeDataSourceResponse = BaseDataSourceResponse & { /** Repository URL */ link: string; /** Branch name */ branch: string; /** Type of index to create */ index_type: CodeDataSourceTypeType; /** Files filter pattern */ files_filter?: string; /** Embeddings model to use */ embeddings_model?: string; /** Summarization model to use */ summarization_model?: string; /** Custom summarization prompt */ prompt?: string; /** Enable documentation generation */ docs_generation?: boolean; }; /** Datasource model */ interface DataSource { /** Unique identifier */ id: string; /** Project name */ project_name: string; /** Datasource name */ name: string; /** Description */ description?: string; /** Type of datasource */ type: DataSourceTypeType; /** Embeddings model used */ embeddings_model?: string; /** Current status */ status: DataSourceStatusType; /** Setting ID reference */ setting_id?: string | null; /** Creation date */ created_date: string; /** Creator information */ created_by: BaseUser; /** Whether shared with project */ shared_with_project: boolean; /** Last update date */ update_date: string; /** Error message if failed */ error_message?: string; /** User abilities list */ user_abilities: string[]; /** Processing information */ processing_info?: DataSourceProcessingInfo; /** List of processed documents */ processed_documents?: string[]; /** Token usage statistics */ tokens_usage?: TokensUsage; /** Code-specific configuration */ code?: Partial; /** Jira-specific configuration */ jira?: Jira; /** Confluence-specific configuration */ confluence?: Confluence; /** Google document link */ google_doc_link?: string; /** Azure DevOps Wiki-specific configuration */ azure_devops_wiki?: AzureDevOpsWiki; /** Azure DevOps Work Item-specific configuration */ azure_devops_work_item?: AzureDevOpsWorkItem; /** SharePoint-specific configuration */ sharepoint?: SharePoint; } /** DataSource fetch parameters */ type DataSourceListParams = { page?: number; per_page?: number; sort_key?: "date" | "update_date"; sort_order?: SortOrder; datasource_types?: DataSourceTypeType[]; projects?: string[]; owner?: string; status?: DataSourceStatusType; search?: string; }; interface BaseConfluenceParams { /** Confluence Query Language string */ cql: string; /** Include restricted content */ include_restricted_content?: boolean; /** Include archived content */ include_archived_content?: boolean; /** Include attachments */ include_attachments?: boolean; /** Include comments */ include_comments?: boolean; /** Keep markdown format */ keep_markdown_format?: boolean; /** Keep newlines */ keep_newlines?: boolean; /** Maximum pages to fetch */ max_pages?: number; /** Pages per request */ pages_per_request?: number; } interface BaseJiraParams { /** Jira Query Language string */ jql: string; } /** File-specific configuration */ interface BaseFileParams { /** List of files with their content and mime type */ files: File[]; } /** Google-specific configuration */ interface BaseGoogleParams { /** Google document ID or URL */ google_doc: string; } /** Code repository configuration */ interface BaseCodeParams { /** Repository URL */ link: string; /** Branch name */ branch: string; /** Type of index to create */ index_type: CodeDataSourceTypeType; /** Files filter pattern */ files_filter?: string; /** Embeddings model to use */ embeddings_model?: string; /** Summarization model to use */ summarization_model?: string; /** Custom summarization prompt */ prompt?: string; /** Enable documentation generation */ docs_generation?: boolean; } interface BaseDataSourceCreateParams { /** Name of the datasource */ name: string; /** Project name */ project_name: string; /** Description of the datasource */ description: string; /** Whether to share with project */ shared_with_project: boolean; /** Setting ID reference */ setting_id: string | null; /** Type of datasource */ type: DataSourceTypeType; } interface ConfluenceDataSourceCreateParams extends BaseDataSourceCreateParams, BaseConfluenceParams { type: typeof DataSourceType.CONFLUENCE; } interface JiraDataSourceCreateParams extends BaseDataSourceCreateParams, BaseJiraParams { type: typeof DataSourceType.JIRA; } interface GoogleDataSourceCreateParams extends BaseDataSourceCreateParams, BaseGoogleParams { type: typeof DataSourceType.GOOGLE; } interface FileDataSourceCreateParams extends BaseDataSourceCreateParams, BaseFileParams { type: typeof DataSourceType.FILE; } interface CodeDataSourceCreateParams extends BaseDataSourceCreateParams, BaseCodeParams { type: typeof DataSourceType.CODE; } interface AzureDevOpsWikiDataSourceCreateParams extends BaseDataSourceCreateParams, AzureDevOpsWiki { type: typeof DataSourceType.AZURE_DEVOPS_WIKI; } interface AzureDevOpsWorkItemDataSourceCreateParams extends BaseDataSourceCreateParams, AzureDevOpsWorkItem { type: typeof DataSourceType.AZURE_DEVOPS_WORK_ITEM; } interface XrayDataSourceCreateParams extends BaseDataSourceCreateParams, BaseJiraParams { type: typeof DataSourceType.XRAY; } interface SharePointDataSourceCreateParams extends BaseDataSourceCreateParams, BaseSharePointParams { type: typeof DataSourceType.SHAREPOINT; } interface OtherDataSourceCreateParams extends BaseDataSourceCreateParams { type: typeof DataSourceType.PROVIDER | typeof DataSourceType.SUMMARY | typeof DataSourceType.CHUNK_SUMMARY | typeof DataSourceType.JSON | typeof DataSourceType.PLATFORM; } /** DataSource create parameters */ type DataSourceCreateParams = ConfluenceDataSourceCreateParams | JiraDataSourceCreateParams | GoogleDataSourceCreateParams | FileDataSourceCreateParams | CodeDataSourceCreateParams | AzureDevOpsWikiDataSourceCreateParams | AzureDevOpsWorkItemDataSourceCreateParams | XrayDataSourceCreateParams | SharePointDataSourceCreateParams | OtherDataSourceCreateParams; interface BaseDataSourceUpdateParams { /** Type of datasource */ type: DataSourceTypeType; /** Name of the datasource */ name: string; /** Project name */ project_name: string; /** Description of the datasource */ description?: string; /** Whether to share with project */ shared_with_project?: boolean; /** Setting ID reference */ setting_id?: string | null; /** Perform full reindex */ full_reindex?: boolean; /** Skip reindex operation */ skip_reindex?: boolean; /** Resume interrupted indexing */ resume_indexing?: boolean; /** Perform incremental reindex */ incremental_reindex?: boolean; } interface ConfluenceDataSourceUpdateParams extends BaseDataSourceUpdateParams, Partial { type: typeof DataSourceType.CONFLUENCE; } interface JiraDataSourceUpdateParams extends BaseDataSourceUpdateParams, Partial { type: typeof DataSourceType.JIRA; } interface GoogleDataSourceUpdateParams extends BaseDataSourceUpdateParams, Partial { type: typeof DataSourceType.GOOGLE; } interface FileDataSourceUpdateParams extends BaseDataSourceUpdateParams, Partial { type: typeof DataSourceType.FILE; } interface CodeDataSourceUpdateParams extends BaseDataSourceUpdateParams, Partial { type: typeof DataSourceType.CODE; } interface AzureDevOpsWikiDataSourceUpdateParams extends BaseDataSourceUpdateParams, Partial { type: typeof DataSourceType.AZURE_DEVOPS_WIKI; } interface AzureDevOpsWorkItemDataSourceUpdateParams extends BaseDataSourceUpdateParams, Partial { type: typeof DataSourceType.AZURE_DEVOPS_WORK_ITEM; } interface XrayDataSourceUpdateParams extends BaseDataSourceUpdateParams, Partial { type: typeof DataSourceType.XRAY; } interface SharePointDataSourceUpdateParams extends BaseDataSourceUpdateParams, Partial { type: typeof DataSourceType.SHAREPOINT; } interface OtherDataSourceUpdateParams extends BaseDataSourceUpdateParams { type: typeof DataSourceType.PROVIDER | typeof DataSourceType.SUMMARY | typeof DataSourceType.CHUNK_SUMMARY | typeof DataSourceType.JSON | typeof DataSourceType.PLATFORM; } /** DataSource update parameters */ type DataSourceUpdateParams = ConfluenceDataSourceUpdateParams | JiraDataSourceUpdateParams | GoogleDataSourceUpdateParams | FileDataSourceUpdateParams | CodeDataSourceUpdateParams | AzureDevOpsWikiDataSourceUpdateParams | AzureDevOpsWorkItemDataSourceUpdateParams | XrayDataSourceUpdateParams | SharePointDataSourceUpdateParams | OtherDataSourceUpdateParams; declare class DatasourceService { private api; constructor(config: AuthConfig); /** * Create a new datasource. */ create(params: DataSourceCreateParams): Promise; /** * Create a file datasource. */ private createFileDatasource; /** * Update an existing datasource. */ update(params: DataSourceUpdateParams): Promise; /** * List datasources with pagination and filtering support. */ list(params?: DataSourceListParams): Promise; /** * Get datasource by ID. */ get(datasourceId: string): Promise; /** * Delete a datasource by ID. */ delete(datasourceId: string): Promise; /** * Get all assistants that use a specific datasource. */ getAssistantsUsingDatasource(datasourceId: string): Promise; /** * Create a provider datasource (CodeAnalysis or CodeExploration). */ createProvider(toolkitId: string, providerName: string, params: ProviderDataSourceRequest): Promise; /** * Get Elasticsearch index statistics for a datasource. */ getElasticsearchStats(datasourceId: string): Promise; private getCreateDatasourceUrl; private getKnowledgeBaseParam; /** * Validates update parameters for reindexing. * @throws {Error} If the update parameters are invalid for the given datasource type. */ private validateUpdateReindexParams; } /** * File upload response for single file */ interface FileUploadResponse { file_url: string; } /** * Bulk file upload response */ interface FileBulkUploadResponse { files: Array<{ file_url: string; }>; failed_files?: Record; } /** * File to upload */ interface FileToUpload { name: string; content: Buffer; mimeType: string; } declare class FileService { private api; constructor(config: AuthConfig); /** * Upload a single file * POST /v1/files/ */ upload(file: FileToUpload): Promise; /** * Upload multiple files * POST /v1/files/bulk */ bulkUpload(files: FileToUpload[]): Promise; /** * Get file by URL/ID * GET /v1/files/{file_name} */ getFile(fileUrl: string): Promise; } declare const IntegrationListParamsSchema: z.ZodReadonly>; page: z.ZodDefault; per_page: z.ZodDefault; filters: z.ZodOptional>; }, z.core.$strip>>; type IntegrationListParams = Partial>; declare const IntegrationGetParamsSchema: z.ZodReadonly>; }, z.core.$strip>>; type IntegrationGetParams = z.infer; declare const IntegrationGetByAliasParamsSchema: z.ZodReadonly>; }, z.core.$strip>>; type IntegrationGetByAliasParams = Omit, "setting_type"> & { setting_type?: IntegrationTypeType; }; declare const IntegrationCreateParamsSchema: z.ZodReadonly; credential_values: z.ZodArray>; project_name: z.ZodString; setting_type: z.ZodDefault>; alias: z.ZodOptional; default: z.ZodDefault>; project: z.ZodOptional; enabled: z.ZodDefault>; external_id: z.ZodOptional; }, z.core.$strip>>; type IntegrationCreateParams = Omit, "default" | "enabled"> & { default?: boolean; enabled?: boolean; }; declare const IntegrationUpdateParamsSchema: z.ZodReadonly; credential_values: z.ZodArray>; project_name: z.ZodString; setting_type: z.ZodDefault>; alias: z.ZodOptional; default: z.ZodDefault>; project: z.ZodOptional; enabled: z.ZodDefault>; external_id: z.ZodOptional; }, z.core.$strip>>; type IntegrationUpdateParams = Omit, "default" | "enabled"> & { default?: boolean; enabled?: boolean; }; declare class IntegrationService { private api; constructor(config: AuthConfig); /** * Get base API path based on setting type. */ private getBasePath; /** * Get list of available integrations. */ list(_params?: IntegrationListParams): Promise; /** * Get integration by ID. */ get(_params: IntegrationGetParams): Promise; /** * Get integration by alias. */ getByAlias(_params: IntegrationGetByAliasParams): Promise; /** * Create a new integration. */ create(_params: IntegrationCreateParams): Promise; /** * Update an existing integration. */ update(settingId: string, _params: IntegrationUpdateParams): Promise; /** * Delete an integration by ID. */ delete(settingId: string, settingType?: IntegrationTypeType): Promise; } /** Models for LLM service. */ /** LLM provider options as constant object */ declare const LLMProvider: { readonly AZURE_OPENAI: "azure_openai"; readonly AWS_BEDROCK: "aws_bedrock"; readonly GOOGLE_VERTEXAI: "google_vertexai"; }; type LLMProviderType = (typeof LLMProvider)[keyof typeof LLMProvider]; /** Cost configuration for LLM model */ interface CostConfig { /** Cost per input token */ input: number; /** Cost per output token */ output: number; } /** Features supported by LLM model */ interface LLMFeatures { /** Support for streaming responses */ streaming: boolean; /** Support for tool usage */ tools: boolean; /** Support for temperature parameter */ temperature: boolean; /** Support for parallel tool calls */ parallel_tool_calls: boolean; /** Support for system prompt */ system_prompt: boolean; /** Support for max tokens parameter */ max_tokens: boolean; } /** LLM model configuration. */ interface LLMModel { /** Base name of the model */ base_name: string; /** Deployment name */ deployment_name: string; /** Display label */ label?: string; /** Whether model supports multimodal inputs */ multimodal?: boolean; /** Whether model supports react agent pattern */ react_agent?: boolean; /** Whether the model is enabled */ enabled: boolean; /** LLM provider */ provider?: LLMProviderType; /** Whether this is the default model */ default?: boolean; /** Cost configuration */ cost?: CostConfig; /** Maximum output tokens */ max_output_tokens?: number; /** Supported features */ features: LLMFeatures; } declare class LLMService { private api; constructor(config: AuthConfig); /** * Get list of available LLM models. */ list(): Promise; /** * Get list of available embeddings models. */ listEmbeddings(): Promise; } /** Models for skill-related data structures. */ declare enum SkillVisibility { PRIVATE = "private", PROJECT = "project", PUBLIC = "public" } declare enum SkillScopeFilter { MARKETPLACE = "marketplace", PROJECT = "project", PROJECT_WITH_MARKETPLACE = "project_with_marketplace" } declare enum SkillSortBy { CREATED_DATE = "created_date", ASSISTANTS_COUNT = "assistants_count", RELEVANCE = "relevance" } declare enum SkillCategory { DEVELOPMENT = "development", ENGINEERING = "engineering", TESTING = "testing", QUALITY_ASSURANCE = "quality_assurance", CODE_REVIEW = "code_review", DOCUMENTATION = "documentation", DEVOPS = "devops", SECURITY = "security", COMPLIANCE = "compliance", MONITORING_ALERTS = "monitoring_alerts", ARCHITECTURE = "architecture", UI_UX_DESIGN = "ui_ux_design", DATA_ANALYSIS = "data_analysis", DATA_ANALYTICS = "data_analytics", PROJECT_MANAGEMENT = "project_management", PRODUCT_MANAGEMENT = "product_management", BUSINESS_ANALYSIS = "business_analysis", MIGRATION_MODERNIZATION = "migration_modernization", SUPPORT = "support", CUSTOMER_EXPERIENCE = "customer_experience", KNOWLEDGE_MANAGEMENT = "knowledge_management", TRAINING = "training", PRESALES = "presales", INTERVIEW = "interview", TALENT_ACQUISITION = "talent_acquisition", OTHER = "other" } interface SkillCreatedBy { id: string; username: string; name: string; } interface SkillListItem { id: string; name: string; description: string; project: string; visibility: SkillVisibility; created_by: SkillCreatedBy | null; categories: SkillCategory[]; createdDate: string; updatedDate: string | null; is_attached: boolean; assistants_count: number; user_abilities: string[]; unique_likes_count: number; unique_dislikes_count: number; } interface SkillDetail extends SkillListItem { display_name?: string | null; content: string; toolkits: unknown[]; mcp_servers: unknown[]; } interface SkillListPaginatedResponse { skills: SkillListItem[]; page: number; perPage: number; pages: number; total: number; } /** Skill category API response item. */ interface SkillCategoryItem { value: string; label: string; description?: string; } /** Parameters for creating a skill. */ interface SkillCreateParams { /** Kebab-case identifier, 3–64 chars (e.g. "my-skill"). Must start and end with a letter or number. */ name: string; /** 10–1000 chars. */ description: string; /** Markdown skill instructions, minimum 100 chars. */ content: string; project: string; visibility?: SkillVisibility; /** Max 3 categories. */ categories?: string[]; toolkits?: unknown[]; mcp_servers?: unknown[]; } /** Parameters for updating a skill. */ interface SkillUpdateParams { /** Kebab-case identifier, 3–64 chars. Must start and end with a letter or number. */ name?: string; /** 10–1000 chars. */ description?: string; /** Markdown skill instructions, minimum 100 chars. */ content?: string; project?: string; visibility?: SkillVisibility; /** Max 3 categories. */ categories?: string[]; toolkits?: unknown[]; mcp_servers?: unknown[]; } /** Parameters for importing a skill from .md file. */ interface SkillImportParams { /** * Base64-encoded markdown file content. The file must include YAML frontmatter * with `name` and `description` fields. This matches the format produced by `export()`. * * @example * Buffer.from("---\nname: my-skill\ndescription: What this skill does\n---\n\n# Instructions\n...").toString("base64") */ file_content: string; filename: string; project: string; visibility?: SkillVisibility; } declare const SkillListParamsSchema: z.ZodReadonly; per_page: z.ZodDefault; filters: z.ZodOptional>; sort_by: z.ZodOptional>; scope: z.ZodOptional>; assistant_id: z.ZodOptional; }, z.core.$strip>>; type SkillListParams = Partial>; declare class SkillService { private api; constructor(config: AuthConfig); /** * Get paginated list of skills accessible to the current user. */ listPaginated(_params?: SkillListParams): Promise; /** * Get flat list of skills (without pagination metadata). */ list(_params?: SkillListParams): Promise; /** * Get skill details by ID. */ get(skillId: string): Promise; /** * Create a new skill. */ create(params: SkillCreateParams): Promise; /** * Update an existing skill. */ update(skillId: string, params: SkillUpdateParams): Promise; /** * Delete a skill by ID. */ delete(skillId: string): Promise; /** * Import a skill from .md file content. */ importSkill(params: SkillImportParams): Promise; /** * Export a skill as markdown content. */ export(skillId: string): Promise; /** * Attach a skill to an assistant. */ attachToAssistant(assistantId: string, skillId: string): Promise; /** * Detach a skill from an assistant. */ detachFromAssistant(assistantId: string, skillId: string): Promise; /** * Get all skills attached to an assistant. */ getAssistantSkills(assistantId: string): Promise; /** * Bulk attach a skill to multiple assistants. */ bulkAttachToAssistants(skillId: string, assistantIds: string[]): Promise; /** * Get all assistants using this skill. */ getSkillAssistants(skillId: string): Promise; /** * Publish a skill to the marketplace. */ publish(skillId: string, categories?: string[]): Promise; /** * Unpublish a skill from the marketplace. */ unpublish(skillId: string): Promise; /** * Get list of available skill categories. */ listCategories(): Promise; /** * Get users with access to skills. */ getUsers(): Promise; /** * React to a skill. */ react(skillId: string, reaction: "like" | "dislike"): Promise; /** * Remove all reactions from a skill. */ removeReactions(skillId: string): Promise; } /** Models for task service. */ /** Background task status constants */ declare const BackgroundTaskStatus: { readonly STARTED: "STARTED"; readonly COMPLETED: "COMPLETED"; readonly FAILED: "FAILED"; }; type BackgroundTaskStatusType = (typeof BackgroundTaskStatus)[keyof typeof BackgroundTaskStatus]; /** Model representing task user information */ interface TaskUser { /** Unique identifier of the user */ user_id: string; /** Username of the task owner */ username: string; /** Display name of the task owner */ name: string; } /** Model representing a background task */ interface BackgroundTaskEntity { /** Unique identifier of the task */ id: string; /** Task description or name */ task: string; /** Information about the task owner */ user: TaskUser; /** The final result or output of the task */ final_output?: string; /** Current step or stage of the task */ current_step?: string; /** Task status (STARTED, COMPLETED, or FAILED) */ status: BackgroundTaskStatusType; /** Task creation timestamp */ date: string; /** Last update timestamp */ update_date: string; } declare class TaskService { private api; constructor(config: AuthConfig); /** * Get a background task by ID. */ get(taskId: string): Promise; } /** Models for user service. */ /** User API response. */ interface AboutUserResponse { user_id: string; name: string; username: string; email: string; is_admin: boolean; applications: string[]; applications_admin: string[]; picture: string; knowledge_bases: string[]; } /** User model. */ interface AboutUser { user_id: string; name: string; username: string; email: string; is_admin: boolean; applications: string[]; applications_admin: string[]; picture: string; knowledge_bases: string[]; } /** User data and preferences model. */ interface UserData { id?: string; date?: string; update_date?: string; user_id?: string; } declare class UserService { private api; constructor(config: AuthConfig); /** * Get current user profile. */ aboutMe(): Promise; /** * Get user data and preferences. */ getData(): Promise; } interface Category { id: string; name: string; description?: string; } interface CategoryResponse { id: string; name: string; description?: string; marketplaceAssistantCount: number; projectAssistantCount: number; /** ISO datetime string */ createdAt: string; /** ISO datetime string */ updatedAt?: string; } interface CategoryListResponse { categories: CategoryResponse[]; page: number; per_page: number; total: number; pages: number; } interface CategoryCreateParams { /** 1–255 chars */ name: string; /** Optional description, max 1000 chars */ description?: string; } interface CategoryUpdateParams { /** 1–255 chars */ name: string; /** Optional description, max 1000 chars */ description?: string; } declare class CategoryService { private api; constructor(config: AuthConfig); /** * Get all available assistant categories (legacy, non-paginated). * Public endpoint — no admin access required. * GET /v1/assistants/categories */ getCategories(): Promise; /** * Get paginated list of categories with marketplace/project assistant counts. * Admin access required. * GET /v1/assistants/categories/list */ listCategories(page?: number, perPage?: number): Promise; /** * Get a specific category by ID with assistant counts. * Admin access required. * GET /v1/assistants/categories/{id} */ getCategory(categoryId: string): Promise; /** * Create a new category. The ID is auto-generated from the name. * Admin access required. * POST /v1/assistants/categories */ createCategory(params: CategoryCreateParams): Promise; /** * Update an existing category. * Admin access required. * PUT /v1/assistants/categories/{id} */ updateCategory(categoryId: string, params: CategoryUpdateParams): Promise; /** * Delete a category. Fails with 409 if any assistants are assigned to it. * Admin access required. * DELETE /v1/assistants/categories/{id} */ deleteCategory(categoryId: string): Promise; } /** Models for workflow functionality */ /** Available workflow modes */ declare const WorkflowMode: { readonly SEQUENTIAL: "Sequential"; readonly AUTONOMOUS: "Autonomous"; }; type WorkflowModeType = (typeof WorkflowMode)[keyof typeof WorkflowMode]; /** Workflow execution status */ declare const ExecutionStatus: { readonly IN_PROGRESS: "In Progress"; readonly NOT_STARTED: "Not Started"; readonly INTERRUPTED: "Interrupted"; readonly FAILED: "Failed"; readonly SUCCEEDED: "Succeeded"; readonly ABORTED: "Aborted"; }; type ExecutionStatusType = (typeof ExecutionStatus)[keyof typeof ExecutionStatus]; /** Workflow API response */ interface WorkflowResponse { /** Unique identifier */ id: string; /** Project name */ project: string; /** Workflow name */ name: string; /** Workflow description */ description?: string; /** YAML configuration */ yaml_config?: string; /** Workflow execution mode */ mode: WorkflowModeType; /** Whether workflow is shared */ shared: boolean; /** URL to workflow icon */ icon_url?: string; /** Creation date */ date: string; /** Last update date */ update_date: string; /** Creator information */ created_by: BaseUser; } /** Workflow model */ interface Workflow { /** Unique identifier */ id: string; /** Project name */ project: string; /** Workflow name */ name: string; /** Workflow description */ description?: string; /** YAML configuration */ yaml_config?: string; /** Workflow execution mode */ mode: WorkflowModeType; /** Whether workflow is shared */ shared: boolean; /** URL to workflow icon */ icon_url?: string; /** Creation date */ created_date: string; /** Last update date */ update_date: string; /** Creator information */ created_by: BaseUser; /** Project display name, populated at response time */ display_name?: string | null; } /** Workflow execution API response */ interface WorkflowExecutionResponse { /** Unique identifier */ id: string; /** Execution identifier */ execution_id: string; /** Associated workflow identifier */ workflow_id: string; /** Execution status */ overall_status: ExecutionStatusType; /** Creation date */ date: string; /** Execution prompt */ prompt: string; /** Last update date */ updated_date?: string; /** Creator information */ created_by: BaseUser; /** Token usage statistics */ tokens_usage?: TokensUsage; } /** Model representing a workflow execution */ interface WorkflowExecution { /** Unique identifier */ id: string; /** Execution identifier */ execution_id: string; /** Associated workflow identifier */ workflow_id: string; /** Execution status */ overall_status: ExecutionStatusType; /** Creation date */ created_date: string; /** Execution prompt */ prompt: string; /** Last update date */ updated_date?: string; /** Creator information */ created_by: BaseUser; /** Token usage statistics */ tokens_usage?: TokensUsage; } /** Model for workflow execution state thought */ interface WorkflowExecutionStateThought { /** Unique identifier */ id: string; /** Thought content */ text: string; /** Creation timestamp */ created_at: string; /** Parent thought identifier */ parent_id?: string; } /** Model for workflow execution state */ interface WorkflowExecutionState { /** Unique identifier */ id: string; /** Execution identifier */ execution_id: string; /** State name */ name: string; /** Associated task */ task?: string; /** State status */ status: ExecutionStatusType; /** Start timestamp */ started_at?: string; /** Completion timestamp */ completed_at?: string; } /** Model for workflow execution state output */ interface WorkflowExecutionStateOutput { /** Output content */ output?: string; } /** * Workflow list parameters schema */ declare const WorkflowListParamsSchema: z.ZodReadonly; per_page: z.ZodDefault; projects: z.ZodOptional>; search: z.ZodOptional; }, z.core.$strip>>; type WorkflowListParams = Partial>; /** * Workflow create parameters schema */ declare const WorkflowCreateParamsSchema: z.ZodReadonly; yaml_config: z.ZodString; mode: z.ZodEnum<{ Sequential: "Sequential"; Autonomous: "Autonomous"; }>; shared: z.ZodBoolean; icon_url: z.ZodOptional; }, z.core.$strip>>; type WorkflowCreateParams = z.infer; /** * Workflow update parameters schema */ declare const WorkflowUpdateParamsSchema: z.ZodReadonly; yaml_config: z.ZodString; mode: z.ZodOptional>; shared: z.ZodOptional; icon_url: z.ZodOptional; }, z.core.$strip>>; type WorkflowUpdateParams = z.infer; /** * Workflow evaluation parameters schema */ declare const WorkflowEvaluationParamsSchema: z.ZodReadonly; }, z.core.$strip>>; type WorkflowEvaluationParams = z.infer; /** * Workflow execution list parameters schema */ declare const WorkflowExecutionListParamsSchema: z.ZodReadonly; per_page: z.ZodDefault; }, z.core.$strip>>; type WorkflowExecutionListParams = Partial>; /** * Workflow execution create parameters schema */ declare const WorkflowExecutionCreateParamsSchema: z.ZodReadonly, z.ZodArray, z.ZodNumber, z.ZodBoolean]>>; file_name: z.ZodOptional; session_id: z.ZodOptional; propagate_headers: z.ZodOptional; tags: z.ZodOptional>; }, z.core.$strip>>; type WorkflowExecutionCreateParams = z.infer; /** * Workflow execution state list parameters schema */ declare const WorkflowExecutionStateListParamsSchema: z.ZodReadonly; per_page: z.ZodDefault; }, z.core.$strip>>; type WorkflowExecutionStateListParams = Partial>; /** * Convert cookies object to cookie string format. * Example: {key1: "value1", key2: "value2"} => "key1=value1; key2=value2" */ declare function formatCookies(cookies: Record): string; declare class ApiRequestHandler { private client; constructor(config: AuthConfig); private request; /** * Merge extra headers into the request (used for X-* propagation) */ private withHeaders; get(path: string, params?: Record, config?: Record, extraHeaders?: Record): Promise; post(path: string, data?: unknown, config?: Record, extraHeaders?: Record): Promise; put(path: string, data?: unknown, config?: Record, extraHeaders?: Record): Promise; postMultipart(url: string, formData: FormData, params?: Record): Promise; delete(path: string, config?: Record): Promise; stream(path: string, data?: unknown, config?: Record): Promise; private processFailedResponse; } declare class WorkflowExecutionStateService { private api; private workflowId; private executionId; constructor(api: ApiRequestHandler, workflowId: string, executionId: string); /** * List states for the workflow execution with filtering and pagination support. */ list(_params?: WorkflowExecutionStateListParams): Promise; /** * Get output for a specific execution state. */ getOutput(stateId: string): Promise; } declare class WorkflowExecutionService { private api; private workflowId; constructor(api: ApiRequestHandler, workflowId: string); /** * List executions for the workflow with filtering and pagination support. */ list(_params?: WorkflowExecutionListParams): Promise; /** * Create a new workflow execution. */ create(userInput?: string | Record | unknown[] | number | boolean, fileName?: string, sessionId?: string, propagateHeaders?: boolean, headers?: Record, tags?: string[]): Promise; /** * Get workflow execution by ID. */ get(executionId: string): Promise; /** * Get states service for a specific workflow execution. */ states(executionId: string): WorkflowExecutionStateService; /** * Delete all workflow executions. */ deleteAll(): Promise; /** * Abort a running workflow execution. */ abort(executionId: string): Promise; /** * Resume an interrupted workflow execution. */ resume(executionId: string, propagateHeaders?: boolean, headers?: Record): Promise; } declare class WorkflowService { private api; constructor(config: AuthConfig); /** * Get list of prebuilt workflows. */ getPrebuilt(): Promise; /** * Create a new workflow. */ create(_params: WorkflowCreateParams): Promise; /** * Update an existing workflow. */ update(workflowId: string, _params: WorkflowUpdateParams): Promise; /** * List workflows with filtering and pagination support. */ list(_params?: WorkflowListParams): Promise; /** * Get workflow by ID. */ get(workflowId: string): Promise; /** * Delete a workflow by ID. */ delete(workflowId: string): Promise; /** * Run a workflow by ID. */ run(workflowId: string, userInput?: string | Record | unknown[] | number | boolean, fileName?: string, sessionId?: string, propagateHeaders?: boolean, headers?: Record, tags?: string[]): Promise; /** * Evaluate a workflow with a dataset. */ evaluate(workflowId: string, _params: WorkflowEvaluationParams): Promise; /** * Get workflow execution service for the specified workflow. */ executions(workflowId: string): WorkflowExecutionService; } interface CodeMieClientConfig { auth_server_url?: string; auth_realm_name?: string; codemie_api_domain: string; auth_client_id?: string; auth_client_secret?: string; username?: string; password?: string; external_token?: string; external_idp?: string; cookies?: Record; verify_ssl?: boolean; jwt_token?: string; } declare class CodeMieClient { private auth; private token; private cookies; private apiDomain; private verifySSL; private useCookieAuth; private _isJwtAuth; private _jwtToken; private _analytics; private _assistants; private _conversations; private _datasources; private _files; private _integrations; private _llms; private _skills; private _tasks; private _users; private _categories; private _workflows; constructor(config: CodeMieClientConfig); /** * Get the AnalyticsService instance. */ get analytics(): AnalyticsService; /** * Get the AssistantService instance. */ get assistants(): AssistantService; /** * Get the ConversationService instance. */ get conversations(): ConversationService; /** * Get the LLMService instance. */ get llms(): LLMService; /** * Get the IntegrationService instance. */ get integrations(): IntegrationService; /** * Get the TaskService instance. */ get tasks(): TaskService; /** * Get the UserService instance. */ get users(): UserService; /** * Get the DatasourceService instance. */ get datasources(): DatasourceService; /** * Get the FileService instance. */ get files(): FileService; /** * Get the CategoryService instance. */ get categories(): CategoryService; /** * Get the SkillService instance. */ get skills(): SkillService; /** * Get the WorkflowService instance. */ get workflows(): WorkflowService; /** * Initialize the client by obtaining the initial token. * This should be called after creating the client instance. * When using cookie-based or JWT token authentication, this is a no-op. */ initialize(): Promise; /** * Get the current access token or fetch a new one if not available. * Returns null when using cookie-based authentication. */ getToken(): Promise; /** * Force token refresh and update all services with the new token. * Throws an error when using cookie-based authentication. * Returns the static token unchanged when using JWT authentication. */ refreshToken(): Promise; /** * Reinitialize all services with the current token or cookies. */ private refreshServices; } declare class CodeMieError extends Error { constructor(message: string); } declare class ApiError extends CodeMieError { statusCode?: number; response?: AnyJson; constructor(message: string, statusCode?: number, response?: AnyJson); } declare class NotFoundError extends ApiError { constructor(resourceType: string, resourceId: string); } declare const ProjectSchema: z.ZodObject<{ name: z.ZodString; display_name: z.ZodOptional>; description: z.ZodOptional; project_type: z.ZodOptional; created_by: z.ZodOptional; created_at: z.ZodOptional; }, z.core.$strip>; type Project = z.infer; export { type AboutUser, type AboutUserResponse, type AgentErrorDetails, type AnalyticsQueryParams, AnalyticsQueryParamsSchema, AnalyticsService, type AnyJson, ApiError, type Assistant, type AssistantBase, type AssistantCategory, type AssistantChatParams, AssistantChatParamsSchema, type AssistantCreateParams, AssistantCreateParamsSchema, type AssistantCreateResponse, type AssistantDataItem, type AssistantDetailsData, type AssistantEvaluationParams, AssistantEvaluationParamsSchema, type AssistantListParams, AssistantListParamsSchema, AssistantService, type AssistantUpdateParams, AssistantUpdateParamsSchema, type AssistantUpdateResponse, type AssistantVersion, type AssistantVersionsListParams, AssistantVersionsListParamsSchema, type AuthConfig, type AzureDevOpsWiki, type AzureDevOpsWikiDataSourceCreateDto, type AzureDevOpsWikiDataSourceCreateParams, type AzureDevOpsWikiDataSourceUpdateDto, type AzureDevOpsWikiDataSourceUpdateParams, type AzureDevOpsWorkItem, type AzureDevOpsWorkItemDataSourceCreateDto, type AzureDevOpsWorkItemDataSourceCreateParams, type AzureDevOpsWorkItemDataSourceUpdateDto, type AzureDevOpsWorkItemDataSourceUpdateParams, type BackgroundTaskEntity, BackgroundTaskStatus, type BackgroundTaskStatusType, type BaseCodeParams, type BaseConfluenceParams, type BaseDataSourceCreateDto, type BaseDataSourceCreateParams, type BaseDataSourceResponse, type BaseDataSourceUpdateDto, type BaseDataSourceUpdateParams, type BaseFileParams, type BaseGoogleParams, type BaseJiraParams, type BaseModelApiResponse, type BaseModelResponse, type BaseSharePointParams, type BaseUser, type Category, type CategoryCreateParams, type CategoryListResponse, type CategoryResponse, CategoryService, type CategoryUpdateParams, ChatRole, type Code, type CodeAnalysisProviderCreateParams, type CodeDataSourceCreateDto, type CodeDataSourceCreateParams, type CodeDataSourceResponse, CodeDataSourceType, type CodeDataSourceTypeType, type CodeDataSourceUpdateDto, type CodeDataSourceUpdateParams, type CodeExplorationProviderCreateParams, CodeMieClient, type CodeMieClientConfig, CodeMieError, type ColumnDefinition, type Confluence, type ConfluenceDataSourceCreateDto, type ConfluenceDataSourceCreateParams, type ConfluenceDataSourceUpdateDto, type ConfluenceDataSourceUpdateParams, type Context, type ContextItem, ContextType, type Conversation, type ConversationCreateParams, ConversationCreateParamsSchema, type ConversationCreateRequest, type ConversationDetails, type ConversationDetailsData, ConversationService, type CostConfig, CredentialTypes, type CredentialTypesType, type CredentialValues, type DataSource, type DataSourceCreateDto, type DataSourceCreateParams, type DataSourceListParams, type DataSourceProcessingInfo, type DataSourceProcessingInfoResponse, type DataSourceResponse, DataSourceStatus, type DataSourceStatusType, DataSourceType, type DataSourceTypeType, type DataSourceUpdateDto, type DataSourceUpdateParams, DatasourceService, ERROR_MESSAGE_PATTERNS, type ElasticsearchStats, ErrorCategory, ErrorCode, ErrorDetailLevel, type ErrorResponse, ExecutionStatus, type ExecutionStatusType, type File, type FileBulkUploadResponse, type FileDataSourceCreateDto, type FileDataSourceCreateParams, type FileDataSourceUpdateDto, type FileDataSourceUpdateParams, FileService, type FileToUpload, type FileUploadResponse, type Files, type Google, type GoogleDataSourceCreateDto, type GoogleDataSourceCreateParams, type GoogleDataSourceUpdateDto, type GoogleDataSourceUpdateParams, HTTP_STATUS_TO_ERROR_CODE, type HistoryItem, type HistoryMark, type Integration, type IntegrationCreateParams, IntegrationCreateParamsSchema, type IntegrationGetByAliasParams, IntegrationGetByAliasParamsSchema, type IntegrationGetParams, IntegrationGetParamsSchema, type IntegrationListParams, IntegrationListParamsSchema, IntegrationService, IntegrationType, type IntegrationTypeType, type IntegrationUpdateParams, IntegrationUpdateParamsSchema, type IntegrationValidationResult, type Jira, type JiraDataSourceCreateDto, type JiraDataSourceCreateParams, type JiraDataSourceUpdateDto, type JiraDataSourceUpdateParams, type LLMFeatures, type LLMModel, LLMProvider, type LLMProviderType, LLMService, type MCPServerConfig, MCPServerConfigSchema, type MCPServerDetails, type Mark, type Metric, type MissingIntegration, type MissingIntegrationsByCredentialType, NotFoundError, type Operator, type OtherDataSourceCreateParams, type OtherDataSourceUpdateParams, type PaginatedAnalyticsQueryParams, PaginatedAnalyticsQueryParamsSchema, type PaginatedResponse, type PaginationMetadata, type PaginationParams, type Project, ProjectSchema, type PromptVariable, type ProviderDataSourceRequest, type ResponseMetadata, type SharePoint, type SharePointAuthType, type SharePointDataSourceCreateDto, type SharePointDataSourceCreateParams, type SharePointDataSourceUpdateDto, type SharePointDataSourceUpdateParams, SkillCategory, type SkillCategoryItem, type SkillCreateParams, type SkillCreatedBy, type SkillDetail, type SkillImportParams, type SkillListItem, type SkillListPaginatedResponse, type SkillListParams, SkillListParamsSchema, SkillScopeFilter, SkillService, SkillSortBy, type SkillUpdateParams, SkillVisibility, type SortOrder, type SummariesData, type SummariesResponse, type SystemPromptHistory, TIME_PERIOD_VALUES, type TabularData, type TabularResponse, TaskService, type TaskUser, type Thought, type TimePeriod, type TokensUsage, type ToolDetails, type ToolErrorDetails, type ToolItem, type ToolKitDetails, type UserData, type UserListItem, UserService, type UsersListData, type UsersListResponse, type VersionsListResponse, type VirtualAssistantChatParams, VirtualAssistantChatParamsSchema, type Workflow, type WorkflowCreateParams, WorkflowCreateParamsSchema, type WorkflowEvaluationParams, WorkflowEvaluationParamsSchema, type WorkflowExecution, type WorkflowExecutionCreateParams, WorkflowExecutionCreateParamsSchema, type WorkflowExecutionListParams, WorkflowExecutionListParamsSchema, type WorkflowExecutionResponse, WorkflowExecutionService, type WorkflowExecutionState, type WorkflowExecutionStateListParams, WorkflowExecutionStateListParamsSchema, type WorkflowExecutionStateOutput, WorkflowExecutionStateService, type WorkflowExecutionStateThought, type WorkflowListParams, WorkflowListParamsSchema, WorkflowMode, type WorkflowModeType, type WorkflowResponse, WorkflowService, type WorkflowUpdateParams, WorkflowUpdateParamsSchema, type XrayDataSourceCreateDto, type XrayDataSourceCreateParams, type XrayDataSourceUpdateDto, type XrayDataSourceUpdateParams, classifyHttpError, formatCookies, formatToolErrorForLevel, formatToolErrorFull, formatToolErrorMinimal, formatToolErrorStandard, isRecoverableError };