codemie-sdk 0.1.374 → 0.1.375

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -617,6 +617,16 @@ declare const AssistantVersionsListParamsSchema: z.ZodReadonly<z.ZodObject<{
617
617
  }, z.core.$strip>>;
618
618
  type AssistantVersionsListParams = Partial<z.infer<typeof AssistantVersionsListParamsSchema>>;
619
619
 
620
+ type VersionsListResponse = AssistantVersion[] | {
621
+ data: AssistantVersion[];
622
+ [key: string]: unknown;
623
+ } | {
624
+ versions: AssistantVersion[];
625
+ [key: string]: unknown;
626
+ } | {
627
+ items: AssistantVersion[];
628
+ [key: string]: unknown;
629
+ };
620
630
  declare class AssistantService {
621
631
  private api;
622
632
  constructor(config: AuthConfig);
@@ -1294,6 +1304,50 @@ declare class DatasourceService {
1294
1304
  private validateUpdateReindexParams;
1295
1305
  }
1296
1306
 
1307
+ /**
1308
+ * File upload response for single file
1309
+ */
1310
+ interface FileUploadResponse {
1311
+ file_url: string;
1312
+ }
1313
+ /**
1314
+ * Bulk file upload response
1315
+ */
1316
+ interface FileBulkUploadResponse {
1317
+ files: Array<{
1318
+ file_url: string;
1319
+ }>;
1320
+ failed_files?: Record<string, string>;
1321
+ }
1322
+ /**
1323
+ * File to upload
1324
+ */
1325
+ interface FileToUpload {
1326
+ name: string;
1327
+ content: Buffer;
1328
+ mimeType: string;
1329
+ }
1330
+
1331
+ declare class FileService {
1332
+ private api;
1333
+ constructor(config: AuthConfig);
1334
+ /**
1335
+ * Upload a single file
1336
+ * POST /v1/files/
1337
+ */
1338
+ upload(file: FileToUpload): Promise<FileUploadResponse>;
1339
+ /**
1340
+ * Upload multiple files
1341
+ * POST /v1/files/bulk
1342
+ */
1343
+ bulkUpload(files: FileToUpload[]): Promise<FileBulkUploadResponse>;
1344
+ /**
1345
+ * Get file by URL/ID
1346
+ * GET /v1/files/{file_name}
1347
+ */
1348
+ getFile(fileUrl: string): Promise<Buffer>;
1349
+ }
1350
+
1297
1351
  declare const IntegrationListParamsSchema: z.ZodReadonly<z.ZodObject<{
1298
1352
  setting_type: z.ZodPrefault<z.ZodEnum<{
1299
1353
  user: "user";
@@ -1902,11 +1956,12 @@ declare class CodeMieClient {
1902
1956
  private useCookieAuth;
1903
1957
  private _assistants;
1904
1958
  private _conversations;
1905
- private _llms;
1959
+ private _datasources;
1960
+ private _files;
1906
1961
  private _integrations;
1962
+ private _llms;
1907
1963
  private _tasks;
1908
1964
  private _users;
1909
- private _datasources;
1910
1965
  private _workflows;
1911
1966
  constructor(config: CodeMieClientConfig);
1912
1967
  /**
@@ -1937,6 +1992,10 @@ declare class CodeMieClient {
1937
1992
  * Get the DatasourceService instance.
1938
1993
  */
1939
1994
  get datasources(): DatasourceService;
1995
+ /**
1996
+ * Get the FileService instance.
1997
+ */
1998
+ get files(): FileService;
1940
1999
  /**
1941
2000
  * Get the WorkflowService instance.
1942
2001
  */
@@ -1975,4 +2034,4 @@ declare class NotFoundError extends ApiError {
1975
2034
  constructor(resourceType: string, resourceId: string);
1976
2035
  }
1977
2036
 
1978
- export { type AboutUser, type AboutUserResponse, type AgentErrorDetails, type AnyJson, ApiError, type Assistant, type AssistantBase, type AssistantCategory, type AssistantChatParams, AssistantChatParamsSchema, type AssistantCreateParams, AssistantCreateParamsSchema, type AssistantCreateResponse, type AssistantDataItem, type AssistantDetailsData, type AssistantListParams, AssistantListParamsSchema, type AssistantUpdateParams, AssistantUpdateParamsSchema, type AssistantUpdateResponse, type AssistantVersion, type AssistantVersionsListParams, AssistantVersionsListParamsSchema, type AuthConfig, 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 BaseUser, ChatRole, type Code, type CodeDataSourceCreateDto, type CodeDataSourceCreateParams, type CodeDataSourceResponse, CodeDataSourceType, type CodeDataSourceTypeType, type CodeDataSourceUpdateDto, type CodeDataSourceUpdateParams, CodeMieClient, type CodeMieClientConfig, CodeMieError, 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, 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, ERROR_MESSAGE_PATTERNS, ErrorCategory, ErrorCode, ErrorDetailLevel, type ErrorResponse, ExecutionStatus, type ExecutionStatusType, type File, type FileDataSourceCreateDto, type FileDataSourceCreateParams, type FileDataSourceUpdateDto, type FileDataSourceUpdateParams, 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, 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, type MCPServerConfig, type MCPServerDetails, type Mark, type MissingIntegration, type MissingIntegrationsByCredentialType, NotFoundError, type Operator, type OtherDataSourceCreateParams, type OtherDataSourceUpdateParams, type PaginatedResponse, type PaginationParams, type PromptVariable, type SortOrder, type SystemPromptHistory, type TaskUser, type Thought, type TokensUsage, type ToolDetails, type ToolErrorDetails, type ToolItem, type ToolKitDetails, type UserData, type Workflow, type WorkflowCreateParams, WorkflowCreateParamsSchema, type WorkflowExecution, type WorkflowExecutionCreateParams, WorkflowExecutionCreateParamsSchema, type WorkflowExecutionListParams, WorkflowExecutionListParamsSchema, type WorkflowExecutionResponse, type WorkflowExecutionState, type WorkflowExecutionStateListParams, WorkflowExecutionStateListParamsSchema, type WorkflowExecutionStateOutput, type WorkflowExecutionStateThought, type WorkflowListParams, WorkflowListParamsSchema, WorkflowMode, type WorkflowModeType, type WorkflowResponse, type WorkflowUpdateParams, WorkflowUpdateParamsSchema, classifyHttpError, formatCookies, formatToolErrorForLevel, formatToolErrorFull, formatToolErrorMinimal, formatToolErrorStandard, isRecoverableError };
2037
+ export { type AboutUser, type AboutUserResponse, type AgentErrorDetails, type AnyJson, ApiError, type Assistant, type AssistantBase, type AssistantCategory, type AssistantChatParams, AssistantChatParamsSchema, type AssistantCreateParams, AssistantCreateParamsSchema, type AssistantCreateResponse, type AssistantDataItem, type AssistantDetailsData, type AssistantListParams, AssistantListParamsSchema, AssistantService, type AssistantUpdateParams, AssistantUpdateParamsSchema, type AssistantUpdateResponse, type AssistantVersion, type AssistantVersionsListParams, AssistantVersionsListParamsSchema, type AuthConfig, 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 BaseUser, ChatRole, type Code, type CodeDataSourceCreateDto, type CodeDataSourceCreateParams, type CodeDataSourceResponse, CodeDataSourceType, type CodeDataSourceTypeType, type CodeDataSourceUpdateDto, type CodeDataSourceUpdateParams, CodeMieClient, type CodeMieClientConfig, CodeMieError, 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, 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, type MCPServerDetails, type Mark, type MissingIntegration, type MissingIntegrationsByCredentialType, NotFoundError, type Operator, type OtherDataSourceCreateParams, type OtherDataSourceUpdateParams, type PaginatedResponse, type PaginationParams, type PromptVariable, type SortOrder, type SystemPromptHistory, TaskService, type TaskUser, type Thought, type TokensUsage, type ToolDetails, type ToolErrorDetails, type ToolItem, type ToolKitDetails, type UserData, UserService, type VersionsListResponse, type Workflow, type WorkflowCreateParams, WorkflowCreateParamsSchema, 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, classifyHttpError, formatCookies, formatToolErrorForLevel, formatToolErrorFull, formatToolErrorMinimal, formatToolErrorStandard, isRecoverableError };
package/dist/index.d.ts CHANGED
@@ -617,6 +617,16 @@ declare const AssistantVersionsListParamsSchema: z.ZodReadonly<z.ZodObject<{
617
617
  }, z.core.$strip>>;
618
618
  type AssistantVersionsListParams = Partial<z.infer<typeof AssistantVersionsListParamsSchema>>;
619
619
 
620
+ type VersionsListResponse = AssistantVersion[] | {
621
+ data: AssistantVersion[];
622
+ [key: string]: unknown;
623
+ } | {
624
+ versions: AssistantVersion[];
625
+ [key: string]: unknown;
626
+ } | {
627
+ items: AssistantVersion[];
628
+ [key: string]: unknown;
629
+ };
620
630
  declare class AssistantService {
621
631
  private api;
622
632
  constructor(config: AuthConfig);
@@ -1294,6 +1304,50 @@ declare class DatasourceService {
1294
1304
  private validateUpdateReindexParams;
1295
1305
  }
1296
1306
 
1307
+ /**
1308
+ * File upload response for single file
1309
+ */
1310
+ interface FileUploadResponse {
1311
+ file_url: string;
1312
+ }
1313
+ /**
1314
+ * Bulk file upload response
1315
+ */
1316
+ interface FileBulkUploadResponse {
1317
+ files: Array<{
1318
+ file_url: string;
1319
+ }>;
1320
+ failed_files?: Record<string, string>;
1321
+ }
1322
+ /**
1323
+ * File to upload
1324
+ */
1325
+ interface FileToUpload {
1326
+ name: string;
1327
+ content: Buffer;
1328
+ mimeType: string;
1329
+ }
1330
+
1331
+ declare class FileService {
1332
+ private api;
1333
+ constructor(config: AuthConfig);
1334
+ /**
1335
+ * Upload a single file
1336
+ * POST /v1/files/
1337
+ */
1338
+ upload(file: FileToUpload): Promise<FileUploadResponse>;
1339
+ /**
1340
+ * Upload multiple files
1341
+ * POST /v1/files/bulk
1342
+ */
1343
+ bulkUpload(files: FileToUpload[]): Promise<FileBulkUploadResponse>;
1344
+ /**
1345
+ * Get file by URL/ID
1346
+ * GET /v1/files/{file_name}
1347
+ */
1348
+ getFile(fileUrl: string): Promise<Buffer>;
1349
+ }
1350
+
1297
1351
  declare const IntegrationListParamsSchema: z.ZodReadonly<z.ZodObject<{
1298
1352
  setting_type: z.ZodPrefault<z.ZodEnum<{
1299
1353
  user: "user";
@@ -1902,11 +1956,12 @@ declare class CodeMieClient {
1902
1956
  private useCookieAuth;
1903
1957
  private _assistants;
1904
1958
  private _conversations;
1905
- private _llms;
1959
+ private _datasources;
1960
+ private _files;
1906
1961
  private _integrations;
1962
+ private _llms;
1907
1963
  private _tasks;
1908
1964
  private _users;
1909
- private _datasources;
1910
1965
  private _workflows;
1911
1966
  constructor(config: CodeMieClientConfig);
1912
1967
  /**
@@ -1937,6 +1992,10 @@ declare class CodeMieClient {
1937
1992
  * Get the DatasourceService instance.
1938
1993
  */
1939
1994
  get datasources(): DatasourceService;
1995
+ /**
1996
+ * Get the FileService instance.
1997
+ */
1998
+ get files(): FileService;
1940
1999
  /**
1941
2000
  * Get the WorkflowService instance.
1942
2001
  */
@@ -1975,4 +2034,4 @@ declare class NotFoundError extends ApiError {
1975
2034
  constructor(resourceType: string, resourceId: string);
1976
2035
  }
1977
2036
 
1978
- export { type AboutUser, type AboutUserResponse, type AgentErrorDetails, type AnyJson, ApiError, type Assistant, type AssistantBase, type AssistantCategory, type AssistantChatParams, AssistantChatParamsSchema, type AssistantCreateParams, AssistantCreateParamsSchema, type AssistantCreateResponse, type AssistantDataItem, type AssistantDetailsData, type AssistantListParams, AssistantListParamsSchema, type AssistantUpdateParams, AssistantUpdateParamsSchema, type AssistantUpdateResponse, type AssistantVersion, type AssistantVersionsListParams, AssistantVersionsListParamsSchema, type AuthConfig, 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 BaseUser, ChatRole, type Code, type CodeDataSourceCreateDto, type CodeDataSourceCreateParams, type CodeDataSourceResponse, CodeDataSourceType, type CodeDataSourceTypeType, type CodeDataSourceUpdateDto, type CodeDataSourceUpdateParams, CodeMieClient, type CodeMieClientConfig, CodeMieError, 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, 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, ERROR_MESSAGE_PATTERNS, ErrorCategory, ErrorCode, ErrorDetailLevel, type ErrorResponse, ExecutionStatus, type ExecutionStatusType, type File, type FileDataSourceCreateDto, type FileDataSourceCreateParams, type FileDataSourceUpdateDto, type FileDataSourceUpdateParams, 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, 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, type MCPServerConfig, type MCPServerDetails, type Mark, type MissingIntegration, type MissingIntegrationsByCredentialType, NotFoundError, type Operator, type OtherDataSourceCreateParams, type OtherDataSourceUpdateParams, type PaginatedResponse, type PaginationParams, type PromptVariable, type SortOrder, type SystemPromptHistory, type TaskUser, type Thought, type TokensUsage, type ToolDetails, type ToolErrorDetails, type ToolItem, type ToolKitDetails, type UserData, type Workflow, type WorkflowCreateParams, WorkflowCreateParamsSchema, type WorkflowExecution, type WorkflowExecutionCreateParams, WorkflowExecutionCreateParamsSchema, type WorkflowExecutionListParams, WorkflowExecutionListParamsSchema, type WorkflowExecutionResponse, type WorkflowExecutionState, type WorkflowExecutionStateListParams, WorkflowExecutionStateListParamsSchema, type WorkflowExecutionStateOutput, type WorkflowExecutionStateThought, type WorkflowListParams, WorkflowListParamsSchema, WorkflowMode, type WorkflowModeType, type WorkflowResponse, type WorkflowUpdateParams, WorkflowUpdateParamsSchema, classifyHttpError, formatCookies, formatToolErrorForLevel, formatToolErrorFull, formatToolErrorMinimal, formatToolErrorStandard, isRecoverableError };
2037
+ export { type AboutUser, type AboutUserResponse, type AgentErrorDetails, type AnyJson, ApiError, type Assistant, type AssistantBase, type AssistantCategory, type AssistantChatParams, AssistantChatParamsSchema, type AssistantCreateParams, AssistantCreateParamsSchema, type AssistantCreateResponse, type AssistantDataItem, type AssistantDetailsData, type AssistantListParams, AssistantListParamsSchema, AssistantService, type AssistantUpdateParams, AssistantUpdateParamsSchema, type AssistantUpdateResponse, type AssistantVersion, type AssistantVersionsListParams, AssistantVersionsListParamsSchema, type AuthConfig, 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 BaseUser, ChatRole, type Code, type CodeDataSourceCreateDto, type CodeDataSourceCreateParams, type CodeDataSourceResponse, CodeDataSourceType, type CodeDataSourceTypeType, type CodeDataSourceUpdateDto, type CodeDataSourceUpdateParams, CodeMieClient, type CodeMieClientConfig, CodeMieError, 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, 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, type MCPServerDetails, type Mark, type MissingIntegration, type MissingIntegrationsByCredentialType, NotFoundError, type Operator, type OtherDataSourceCreateParams, type OtherDataSourceUpdateParams, type PaginatedResponse, type PaginationParams, type PromptVariable, type SortOrder, type SystemPromptHistory, TaskService, type TaskUser, type Thought, type TokensUsage, type ToolDetails, type ToolErrorDetails, type ToolItem, type ToolKitDetails, type UserData, UserService, type VersionsListResponse, type Workflow, type WorkflowCreateParams, WorkflowCreateParamsSchema, 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, classifyHttpError, formatCookies, formatToolErrorForLevel, formatToolErrorFull, formatToolErrorMinimal, formatToolErrorStandard, isRecoverableError };
package/dist/index.js CHANGED
@@ -887,6 +887,50 @@ var DatasourceService = class {
887
887
  }
888
888
  };
889
889
 
890
+ // src/services/files.ts
891
+ import FormData2 from "form-data";
892
+ var FileService = class {
893
+ constructor(config) {
894
+ this.api = new ApiRequestHandler(config);
895
+ }
896
+ /**
897
+ * Upload a single file
898
+ * POST /v1/files/
899
+ */
900
+ async upload(file) {
901
+ const formData = new FormData2();
902
+ formData.append("file", file.content, {
903
+ filename: file.name,
904
+ contentType: file.mimeType
905
+ });
906
+ return this.api.postMultipart("/v1/files/", formData);
907
+ }
908
+ /**
909
+ * Upload multiple files
910
+ * POST /v1/files/bulk
911
+ */
912
+ async bulkUpload(files) {
913
+ const formData = new FormData2();
914
+ for (const file of files) {
915
+ formData.append("files", file.content, {
916
+ filename: file.name,
917
+ contentType: file.mimeType
918
+ });
919
+ }
920
+ return this.api.postMultipart("/v1/files/bulk", formData);
921
+ }
922
+ /**
923
+ * Get file by URL/ID
924
+ * GET /v1/files/{file_name}
925
+ */
926
+ async getFile(fileUrl) {
927
+ const response = await this.api.get(`/v1/files/${fileUrl}`, void 0, {
928
+ responseType: "arraybuffer"
929
+ });
930
+ return Buffer.from(response);
931
+ }
932
+ };
933
+
890
934
  // src/models/integration.ts
891
935
  var CredentialTypes = {
892
936
  JIRA: "Jira",
@@ -1441,11 +1485,12 @@ var CodeMieClient = class {
1441
1485
  };
1442
1486
  this._assistants = new AssistantService(authConfig);
1443
1487
  this._conversations = new ConversationService(authConfig);
1444
- this._llms = new LLMService(authConfig);
1488
+ this._datasources = new DatasourceService(authConfig);
1489
+ this._files = new FileService(authConfig);
1445
1490
  this._integrations = new IntegrationService(authConfig);
1491
+ this._llms = new LLMService(authConfig);
1446
1492
  this._tasks = new TaskService(authConfig);
1447
1493
  this._users = new UserService(authConfig);
1448
- this._datasources = new DatasourceService(authConfig);
1449
1494
  this._workflows = new WorkflowService(authConfig);
1450
1495
  }
1451
1496
  /**
@@ -1490,6 +1535,12 @@ var CodeMieClient = class {
1490
1535
  get datasources() {
1491
1536
  return this._datasources;
1492
1537
  }
1538
+ /**
1539
+ * Get the FileService instance.
1540
+ */
1541
+ get files() {
1542
+ return this._files;
1543
+ }
1493
1544
  /**
1494
1545
  * Get the WorkflowService instance.
1495
1546
  */
@@ -1561,11 +1612,12 @@ var CodeMieClient = class {
1561
1612
  };
1562
1613
  this._assistants = new AssistantService(authConfig);
1563
1614
  this._conversations = new ConversationService(authConfig);
1564
- this._llms = new LLMService(authConfig);
1615
+ this._datasources = new DatasourceService(authConfig);
1616
+ this._files = new FileService(authConfig);
1565
1617
  this._integrations = new IntegrationService(authConfig);
1618
+ this._llms = new LLMService(authConfig);
1566
1619
  this._tasks = new TaskService(authConfig);
1567
1620
  this._users = new UserService(authConfig);
1568
- this._datasources = new DatasourceService(authConfig);
1569
1621
  this._workflows = new WorkflowService(authConfig);
1570
1622
  }
1571
1623
  };
@@ -1737,6 +1789,7 @@ export {
1737
1789
  AssistantChatParamsSchema,
1738
1790
  AssistantCreateParamsSchema,
1739
1791
  AssistantListParamsSchema,
1792
+ AssistantService,
1740
1793
  AssistantUpdateParamsSchema,
1741
1794
  AssistantVersionsListParamsSchema,
1742
1795
  BackgroundTaskStatus,
@@ -1746,29 +1799,39 @@ export {
1746
1799
  CodeMieError,
1747
1800
  ContextType,
1748
1801
  ConversationCreateParamsSchema,
1802
+ ConversationService,
1749
1803
  CredentialTypes,
1750
1804
  DataSourceStatus,
1751
1805
  DataSourceType,
1806
+ DatasourceService,
1752
1807
  ERROR_MESSAGE_PATTERNS,
1753
1808
  ErrorCategory,
1754
1809
  ErrorCode,
1755
1810
  ErrorDetailLevel,
1756
1811
  ExecutionStatus,
1812
+ FileService,
1757
1813
  HTTP_STATUS_TO_ERROR_CODE,
1758
1814
  IntegrationCreateParamsSchema,
1759
1815
  IntegrationGetByAliasParamsSchema,
1760
1816
  IntegrationGetParamsSchema,
1761
1817
  IntegrationListParamsSchema,
1818
+ IntegrationService,
1762
1819
  IntegrationType,
1763
1820
  IntegrationUpdateParamsSchema,
1764
1821
  LLMProvider,
1822
+ LLMService,
1765
1823
  NotFoundError,
1824
+ TaskService,
1825
+ UserService,
1766
1826
  WorkflowCreateParamsSchema,
1767
1827
  WorkflowExecutionCreateParamsSchema,
1768
1828
  WorkflowExecutionListParamsSchema,
1829
+ WorkflowExecutionService,
1769
1830
  WorkflowExecutionStateListParamsSchema,
1831
+ WorkflowExecutionStateService,
1770
1832
  WorkflowListParamsSchema,
1771
1833
  WorkflowMode,
1834
+ WorkflowService,
1772
1835
  WorkflowUpdateParamsSchema,
1773
1836
  classifyHttpError,
1774
1837
  formatCookies,