codemie-sdk 0.1.285 → 0.1.286
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.cjs +51 -20
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +30 -13
- package/dist/index.d.ts +30 -13
- package/dist/index.js +51 -20
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -255,10 +255,7 @@ var AssistantChatParamsSchema = import_zod.z.object({
|
|
|
255
255
|
metadata: import_zod.z.record(import_zod.z.unknown()).optional(),
|
|
256
256
|
mcp_server_single_usage: import_zod.z.boolean().optional(),
|
|
257
257
|
version: import_zod.z.number().optional(),
|
|
258
|
-
output_schema: import_zod.z.union([
|
|
259
|
-
import_zod.z.custom((val) => val instanceof import_zod.z.ZodType),
|
|
260
|
-
import_zod.z.record(import_zod.z.unknown())
|
|
261
|
-
]).optional()
|
|
258
|
+
output_schema: import_zod.z.union([import_zod.z.custom((val) => val instanceof import_zod.z.ZodType), import_zod.z.record(import_zod.z.unknown())]).optional()
|
|
262
259
|
}).readonly();
|
|
263
260
|
var AssistantVersionsListParamsSchema = import_zod.z.object({
|
|
264
261
|
page: import_zod.z.number().optional(),
|
|
@@ -653,27 +650,56 @@ var DatasourceMapper = class _DatasourceMapper {
|
|
|
653
650
|
/** Transforms API response into a client-friendly DataSource model, maintaining API-agnostic interface */
|
|
654
651
|
static mapDatasourceResponse(response) {
|
|
655
652
|
return omitUndefined({
|
|
653
|
+
..._DatasourceMapper.mapDataSourceResponseCommonFields(response),
|
|
654
|
+
...response.index_type === DataSourceType.JIRA && {
|
|
655
|
+
jira: response.jira
|
|
656
|
+
},
|
|
657
|
+
...response.index_type === DataSourceType.CONFLUENCE && {
|
|
658
|
+
confluence: response.confluence
|
|
659
|
+
},
|
|
660
|
+
...response.index_type === DataSourceType.GOOGLE && {
|
|
661
|
+
google_doc: response.google_doc_link
|
|
662
|
+
},
|
|
663
|
+
...response.index_type === DataSourceType.CODE && {
|
|
664
|
+
code: _DatasourceMapper.extractCodeDataSourceResponseFields(
|
|
665
|
+
response
|
|
666
|
+
)
|
|
667
|
+
}
|
|
668
|
+
});
|
|
669
|
+
}
|
|
670
|
+
static mapDataSourceResponseCommonFields(response) {
|
|
671
|
+
return {
|
|
656
672
|
id: response.id,
|
|
657
|
-
|
|
658
|
-
|
|
673
|
+
created_by: response.created_by,
|
|
674
|
+
created_date: response.date,
|
|
659
675
|
description: response.description,
|
|
660
|
-
type: response.index_type,
|
|
661
676
|
embeddings_model: response.embeddings_model,
|
|
662
|
-
status: response.status,
|
|
663
|
-
setting_id: response.setting_id,
|
|
664
|
-
created_date: response.date,
|
|
665
|
-
created_by: response.created_by,
|
|
666
|
-
shared_with_project: response.project_space_visible,
|
|
667
|
-
update_date: response.update_date,
|
|
668
677
|
error_message: response.text,
|
|
669
|
-
|
|
670
|
-
processing_info: response.processing_info ? _DatasourceMapper.mapDatasourceProcessingInfoResponse(response.processing_info) : void 0,
|
|
678
|
+
name: response.repo_name,
|
|
671
679
|
processed_documents: response.processed_files,
|
|
680
|
+
processing_info: response.processing_info ? _DatasourceMapper.mapDatasourceProcessingInfoResponse(response.processing_info) : void 0,
|
|
681
|
+
project_name: response.project_name,
|
|
682
|
+
setting_id: response.setting_id,
|
|
683
|
+
shared_with_project: response.project_space_visible,
|
|
684
|
+
status: response.status,
|
|
672
685
|
tokens_usage: response.tokens_usage,
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
686
|
+
type: response.index_type,
|
|
687
|
+
update_date: response.update_date,
|
|
688
|
+
user_abilities: response.user_abilities
|
|
689
|
+
};
|
|
690
|
+
}
|
|
691
|
+
static extractCodeDataSourceResponseFields(response) {
|
|
692
|
+
return omitUndefined({
|
|
693
|
+
branch: response.branch,
|
|
694
|
+
docsGeneration: response.docs_generation || false,
|
|
695
|
+
embeddingsModel: response.embeddings_model,
|
|
696
|
+
filesFilter: response.files_filter,
|
|
697
|
+
indexType: response.index_type,
|
|
698
|
+
link: response.link,
|
|
699
|
+
projectSpaceVisible: response.project_space_visible || false,
|
|
700
|
+
prompt: response.prompt,
|
|
701
|
+
settingId: response.setting_id,
|
|
702
|
+
summarizationModel: response.summarization_model
|
|
677
703
|
});
|
|
678
704
|
}
|
|
679
705
|
/** Converts processing metadata from API format to client model format with consistent property naming */
|
|
@@ -1322,7 +1348,12 @@ var WorkflowExecutionService = class {
|
|
|
1322
1348
|
*/
|
|
1323
1349
|
async resume(executionId, propagateHeaders, headers) {
|
|
1324
1350
|
const config = { params: { propagate_headers: propagateHeaders } };
|
|
1325
|
-
return this.api.put(
|
|
1351
|
+
return this.api.put(
|
|
1352
|
+
`/v1/workflows/${this.workflowId}/executions/${executionId}/resume`,
|
|
1353
|
+
{},
|
|
1354
|
+
config,
|
|
1355
|
+
headers
|
|
1356
|
+
);
|
|
1326
1357
|
}
|
|
1327
1358
|
};
|
|
1328
1359
|
|