codemie-sdk 0.1.416 → 0.1.418
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 +163 -48
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +112 -4
- package/dist/index.d.ts +112 -4
- package/dist/index.js +158 -48
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -450,8 +450,8 @@ interface AssistantUpdateResponse {
|
|
|
450
450
|
declare const AssistantListParamsSchema: z.ZodReadonly<z.ZodObject<{
|
|
451
451
|
minimal_response: z.ZodPrefault<z.ZodBoolean>;
|
|
452
452
|
scope: z.ZodPrefault<z.ZodEnum<{
|
|
453
|
-
visible_to_user: "visible_to_user";
|
|
454
453
|
marketplace: "marketplace";
|
|
454
|
+
visible_to_user: "visible_to_user";
|
|
455
455
|
}>>;
|
|
456
456
|
page: z.ZodPrefault<z.ZodNumber>;
|
|
457
457
|
per_page: z.ZodPrefault<z.ZodNumber>;
|
|
@@ -1035,8 +1035,14 @@ interface BaseDataSourceResponse {
|
|
|
1035
1035
|
index_type: DataSourceTypeType;
|
|
1036
1036
|
/** Embeddings model used */
|
|
1037
1037
|
embeddings_model?: string;
|
|
1038
|
-
/**
|
|
1039
|
-
|
|
1038
|
+
/** Whether datasource has an error */
|
|
1039
|
+
error?: boolean;
|
|
1040
|
+
/** Whether datasource indexing is complete */
|
|
1041
|
+
completed?: boolean;
|
|
1042
|
+
/** Whether datasource is currently fetching */
|
|
1043
|
+
is_fetching?: boolean;
|
|
1044
|
+
/** Whether datasource is queued */
|
|
1045
|
+
is_queued?: boolean;
|
|
1040
1046
|
/** Setting ID reference */
|
|
1041
1047
|
setting_id?: string;
|
|
1042
1048
|
/** Creation date */
|
|
@@ -1137,6 +1143,7 @@ type DataSourceListParams = {
|
|
|
1137
1143
|
projects?: string[];
|
|
1138
1144
|
owner?: string;
|
|
1139
1145
|
status?: DataSourceStatusType;
|
|
1146
|
+
search?: string;
|
|
1140
1147
|
};
|
|
1141
1148
|
interface BaseConfluenceParams {
|
|
1142
1149
|
/** Confluence Query Language string */
|
|
@@ -1615,6 +1622,101 @@ declare class UserService {
|
|
|
1615
1622
|
getData(): Promise<UserData>;
|
|
1616
1623
|
}
|
|
1617
1624
|
|
|
1625
|
+
/** Models for skill-related data structures. */
|
|
1626
|
+
declare enum SkillVisibility {
|
|
1627
|
+
PRIVATE = "private",
|
|
1628
|
+
PROJECT = "project",
|
|
1629
|
+
PUBLIC = "public"
|
|
1630
|
+
}
|
|
1631
|
+
declare enum SkillScopeFilter {
|
|
1632
|
+
MARKETPLACE = "marketplace",
|
|
1633
|
+
PROJECT = "project",
|
|
1634
|
+
PROJECT_WITH_MARKETPLACE = "project_with_marketplace"
|
|
1635
|
+
}
|
|
1636
|
+
declare enum SkillSortBy {
|
|
1637
|
+
CREATED_DATE = "created_date",
|
|
1638
|
+
ASSISTANTS_COUNT = "assistants_count",
|
|
1639
|
+
RELEVANCE = "relevance"
|
|
1640
|
+
}
|
|
1641
|
+
declare enum SkillCategory {
|
|
1642
|
+
DEVELOPMENT = "development",
|
|
1643
|
+
ENGINEERING = "engineering",
|
|
1644
|
+
TESTING = "testing",
|
|
1645
|
+
QUALITY_ASSURANCE = "quality_assurance",
|
|
1646
|
+
CODE_REVIEW = "code_review",
|
|
1647
|
+
DOCUMENTATION = "documentation",
|
|
1648
|
+
DEVOPS = "devops",
|
|
1649
|
+
SECURITY = "security",
|
|
1650
|
+
COMPLIANCE = "compliance",
|
|
1651
|
+
MONITORING_ALERTS = "monitoring_alerts",
|
|
1652
|
+
ARCHITECTURE = "architecture",
|
|
1653
|
+
UI_UX_DESIGN = "ui_ux_design",
|
|
1654
|
+
DATA_ANALYSIS = "data_analysis",
|
|
1655
|
+
DATA_ANALYTICS = "data_analytics",
|
|
1656
|
+
PROJECT_MANAGEMENT = "project_management",
|
|
1657
|
+
PRODUCT_MANAGEMENT = "product_management",
|
|
1658
|
+
BUSINESS_ANALYSIS = "business_analysis"
|
|
1659
|
+
}
|
|
1660
|
+
interface SkillCreatedBy {
|
|
1661
|
+
id: string;
|
|
1662
|
+
name: string;
|
|
1663
|
+
email?: string;
|
|
1664
|
+
}
|
|
1665
|
+
interface SkillListItem {
|
|
1666
|
+
id: string;
|
|
1667
|
+
name: string;
|
|
1668
|
+
description: string;
|
|
1669
|
+
project: string;
|
|
1670
|
+
visibility: SkillVisibility;
|
|
1671
|
+
created_by: SkillCreatedBy | null;
|
|
1672
|
+
categories: SkillCategory[];
|
|
1673
|
+
created_date: string;
|
|
1674
|
+
updated_date: string | null;
|
|
1675
|
+
is_attached: boolean;
|
|
1676
|
+
assistants_count: number;
|
|
1677
|
+
user_abilities: string[];
|
|
1678
|
+
unique_likes_count: number;
|
|
1679
|
+
unique_dislikes_count: number;
|
|
1680
|
+
}
|
|
1681
|
+
interface SkillDetail extends SkillListItem {
|
|
1682
|
+
content: string;
|
|
1683
|
+
toolkits: unknown[];
|
|
1684
|
+
mcp_servers: unknown[];
|
|
1685
|
+
}
|
|
1686
|
+
interface SkillListPaginatedResponse {
|
|
1687
|
+
skills: SkillListItem[];
|
|
1688
|
+
page: number;
|
|
1689
|
+
per_page: number;
|
|
1690
|
+
pages: number;
|
|
1691
|
+
total: number;
|
|
1692
|
+
}
|
|
1693
|
+
|
|
1694
|
+
declare const SkillListParamsSchema: z.ZodReadonly<z.ZodObject<{
|
|
1695
|
+
page: z.ZodDefault<z.ZodNumber>;
|
|
1696
|
+
per_page: z.ZodDefault<z.ZodNumber>;
|
|
1697
|
+
filters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1698
|
+
sort_by: z.ZodOptional<z.ZodEnum<typeof SkillSortBy>>;
|
|
1699
|
+
scope: z.ZodOptional<z.ZodEnum<typeof SkillScopeFilter>>;
|
|
1700
|
+
}, z.core.$strip>>;
|
|
1701
|
+
type SkillListParams = Partial<z.infer<typeof SkillListParamsSchema>>;
|
|
1702
|
+
|
|
1703
|
+
declare class SkillService {
|
|
1704
|
+
private api;
|
|
1705
|
+
constructor(config: AuthConfig);
|
|
1706
|
+
/**
|
|
1707
|
+
* Get paginated list of skills accessible to the current user.
|
|
1708
|
+
*/
|
|
1709
|
+
listPaginated(_params?: SkillListParams): Promise<SkillListPaginatedResponse>;
|
|
1710
|
+
/**
|
|
1711
|
+
* Get flat list of skills (without pagination metadata).
|
|
1712
|
+
*/
|
|
1713
|
+
list(_params?: SkillListParams): Promise<SkillListItem[]>;
|
|
1714
|
+
/**
|
|
1715
|
+
* Get skill details by ID.
|
|
1716
|
+
*/
|
|
1717
|
+
get(skillId: string): Promise<SkillDetail>;
|
|
1718
|
+
}
|
|
1719
|
+
|
|
1618
1720
|
/** Models for workflow functionality */
|
|
1619
1721
|
|
|
1620
1722
|
/** Available workflow modes */
|
|
@@ -1766,6 +1868,7 @@ declare const WorkflowListParamsSchema: z.ZodReadonly<z.ZodObject<{
|
|
|
1766
1868
|
page: z.ZodPrefault<z.ZodNumber>;
|
|
1767
1869
|
per_page: z.ZodPrefault<z.ZodNumber>;
|
|
1768
1870
|
projects: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1871
|
+
search: z.ZodOptional<z.ZodString>;
|
|
1769
1872
|
}, z.core.$strip>>;
|
|
1770
1873
|
type WorkflowListParams = Partial<z.infer<typeof WorkflowListParamsSchema>>;
|
|
1771
1874
|
/**
|
|
@@ -1964,6 +2067,7 @@ declare class CodeMieClient {
|
|
|
1964
2067
|
private _llms;
|
|
1965
2068
|
private _tasks;
|
|
1966
2069
|
private _users;
|
|
2070
|
+
private _skills;
|
|
1967
2071
|
private _workflows;
|
|
1968
2072
|
constructor(config: CodeMieClientConfig);
|
|
1969
2073
|
/**
|
|
@@ -1998,6 +2102,10 @@ declare class CodeMieClient {
|
|
|
1998
2102
|
* Get the FileService instance.
|
|
1999
2103
|
*/
|
|
2000
2104
|
get files(): FileService;
|
|
2105
|
+
/**
|
|
2106
|
+
* Get the SkillService instance.
|
|
2107
|
+
*/
|
|
2108
|
+
get skills(): SkillService;
|
|
2001
2109
|
/**
|
|
2002
2110
|
* Get the WorkflowService instance.
|
|
2003
2111
|
*/
|
|
@@ -2036,4 +2144,4 @@ declare class NotFoundError extends ApiError {
|
|
|
2036
2144
|
constructor(resourceType: string, resourceId: string);
|
|
2037
2145
|
}
|
|
2038
2146
|
|
|
2039
|
-
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 };
|
|
2147
|
+
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, SkillCategory, type SkillCreatedBy, type SkillDetail, type SkillListItem, type SkillListPaginatedResponse, SkillScopeFilter, SkillService, SkillSortBy, SkillVisibility, 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
|
@@ -450,8 +450,8 @@ interface AssistantUpdateResponse {
|
|
|
450
450
|
declare const AssistantListParamsSchema: z.ZodReadonly<z.ZodObject<{
|
|
451
451
|
minimal_response: z.ZodPrefault<z.ZodBoolean>;
|
|
452
452
|
scope: z.ZodPrefault<z.ZodEnum<{
|
|
453
|
-
visible_to_user: "visible_to_user";
|
|
454
453
|
marketplace: "marketplace";
|
|
454
|
+
visible_to_user: "visible_to_user";
|
|
455
455
|
}>>;
|
|
456
456
|
page: z.ZodPrefault<z.ZodNumber>;
|
|
457
457
|
per_page: z.ZodPrefault<z.ZodNumber>;
|
|
@@ -1035,8 +1035,14 @@ interface BaseDataSourceResponse {
|
|
|
1035
1035
|
index_type: DataSourceTypeType;
|
|
1036
1036
|
/** Embeddings model used */
|
|
1037
1037
|
embeddings_model?: string;
|
|
1038
|
-
/**
|
|
1039
|
-
|
|
1038
|
+
/** Whether datasource has an error */
|
|
1039
|
+
error?: boolean;
|
|
1040
|
+
/** Whether datasource indexing is complete */
|
|
1041
|
+
completed?: boolean;
|
|
1042
|
+
/** Whether datasource is currently fetching */
|
|
1043
|
+
is_fetching?: boolean;
|
|
1044
|
+
/** Whether datasource is queued */
|
|
1045
|
+
is_queued?: boolean;
|
|
1040
1046
|
/** Setting ID reference */
|
|
1041
1047
|
setting_id?: string;
|
|
1042
1048
|
/** Creation date */
|
|
@@ -1137,6 +1143,7 @@ type DataSourceListParams = {
|
|
|
1137
1143
|
projects?: string[];
|
|
1138
1144
|
owner?: string;
|
|
1139
1145
|
status?: DataSourceStatusType;
|
|
1146
|
+
search?: string;
|
|
1140
1147
|
};
|
|
1141
1148
|
interface BaseConfluenceParams {
|
|
1142
1149
|
/** Confluence Query Language string */
|
|
@@ -1615,6 +1622,101 @@ declare class UserService {
|
|
|
1615
1622
|
getData(): Promise<UserData>;
|
|
1616
1623
|
}
|
|
1617
1624
|
|
|
1625
|
+
/** Models for skill-related data structures. */
|
|
1626
|
+
declare enum SkillVisibility {
|
|
1627
|
+
PRIVATE = "private",
|
|
1628
|
+
PROJECT = "project",
|
|
1629
|
+
PUBLIC = "public"
|
|
1630
|
+
}
|
|
1631
|
+
declare enum SkillScopeFilter {
|
|
1632
|
+
MARKETPLACE = "marketplace",
|
|
1633
|
+
PROJECT = "project",
|
|
1634
|
+
PROJECT_WITH_MARKETPLACE = "project_with_marketplace"
|
|
1635
|
+
}
|
|
1636
|
+
declare enum SkillSortBy {
|
|
1637
|
+
CREATED_DATE = "created_date",
|
|
1638
|
+
ASSISTANTS_COUNT = "assistants_count",
|
|
1639
|
+
RELEVANCE = "relevance"
|
|
1640
|
+
}
|
|
1641
|
+
declare enum SkillCategory {
|
|
1642
|
+
DEVELOPMENT = "development",
|
|
1643
|
+
ENGINEERING = "engineering",
|
|
1644
|
+
TESTING = "testing",
|
|
1645
|
+
QUALITY_ASSURANCE = "quality_assurance",
|
|
1646
|
+
CODE_REVIEW = "code_review",
|
|
1647
|
+
DOCUMENTATION = "documentation",
|
|
1648
|
+
DEVOPS = "devops",
|
|
1649
|
+
SECURITY = "security",
|
|
1650
|
+
COMPLIANCE = "compliance",
|
|
1651
|
+
MONITORING_ALERTS = "monitoring_alerts",
|
|
1652
|
+
ARCHITECTURE = "architecture",
|
|
1653
|
+
UI_UX_DESIGN = "ui_ux_design",
|
|
1654
|
+
DATA_ANALYSIS = "data_analysis",
|
|
1655
|
+
DATA_ANALYTICS = "data_analytics",
|
|
1656
|
+
PROJECT_MANAGEMENT = "project_management",
|
|
1657
|
+
PRODUCT_MANAGEMENT = "product_management",
|
|
1658
|
+
BUSINESS_ANALYSIS = "business_analysis"
|
|
1659
|
+
}
|
|
1660
|
+
interface SkillCreatedBy {
|
|
1661
|
+
id: string;
|
|
1662
|
+
name: string;
|
|
1663
|
+
email?: string;
|
|
1664
|
+
}
|
|
1665
|
+
interface SkillListItem {
|
|
1666
|
+
id: string;
|
|
1667
|
+
name: string;
|
|
1668
|
+
description: string;
|
|
1669
|
+
project: string;
|
|
1670
|
+
visibility: SkillVisibility;
|
|
1671
|
+
created_by: SkillCreatedBy | null;
|
|
1672
|
+
categories: SkillCategory[];
|
|
1673
|
+
created_date: string;
|
|
1674
|
+
updated_date: string | null;
|
|
1675
|
+
is_attached: boolean;
|
|
1676
|
+
assistants_count: number;
|
|
1677
|
+
user_abilities: string[];
|
|
1678
|
+
unique_likes_count: number;
|
|
1679
|
+
unique_dislikes_count: number;
|
|
1680
|
+
}
|
|
1681
|
+
interface SkillDetail extends SkillListItem {
|
|
1682
|
+
content: string;
|
|
1683
|
+
toolkits: unknown[];
|
|
1684
|
+
mcp_servers: unknown[];
|
|
1685
|
+
}
|
|
1686
|
+
interface SkillListPaginatedResponse {
|
|
1687
|
+
skills: SkillListItem[];
|
|
1688
|
+
page: number;
|
|
1689
|
+
per_page: number;
|
|
1690
|
+
pages: number;
|
|
1691
|
+
total: number;
|
|
1692
|
+
}
|
|
1693
|
+
|
|
1694
|
+
declare const SkillListParamsSchema: z.ZodReadonly<z.ZodObject<{
|
|
1695
|
+
page: z.ZodDefault<z.ZodNumber>;
|
|
1696
|
+
per_page: z.ZodDefault<z.ZodNumber>;
|
|
1697
|
+
filters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1698
|
+
sort_by: z.ZodOptional<z.ZodEnum<typeof SkillSortBy>>;
|
|
1699
|
+
scope: z.ZodOptional<z.ZodEnum<typeof SkillScopeFilter>>;
|
|
1700
|
+
}, z.core.$strip>>;
|
|
1701
|
+
type SkillListParams = Partial<z.infer<typeof SkillListParamsSchema>>;
|
|
1702
|
+
|
|
1703
|
+
declare class SkillService {
|
|
1704
|
+
private api;
|
|
1705
|
+
constructor(config: AuthConfig);
|
|
1706
|
+
/**
|
|
1707
|
+
* Get paginated list of skills accessible to the current user.
|
|
1708
|
+
*/
|
|
1709
|
+
listPaginated(_params?: SkillListParams): Promise<SkillListPaginatedResponse>;
|
|
1710
|
+
/**
|
|
1711
|
+
* Get flat list of skills (without pagination metadata).
|
|
1712
|
+
*/
|
|
1713
|
+
list(_params?: SkillListParams): Promise<SkillListItem[]>;
|
|
1714
|
+
/**
|
|
1715
|
+
* Get skill details by ID.
|
|
1716
|
+
*/
|
|
1717
|
+
get(skillId: string): Promise<SkillDetail>;
|
|
1718
|
+
}
|
|
1719
|
+
|
|
1618
1720
|
/** Models for workflow functionality */
|
|
1619
1721
|
|
|
1620
1722
|
/** Available workflow modes */
|
|
@@ -1766,6 +1868,7 @@ declare const WorkflowListParamsSchema: z.ZodReadonly<z.ZodObject<{
|
|
|
1766
1868
|
page: z.ZodPrefault<z.ZodNumber>;
|
|
1767
1869
|
per_page: z.ZodPrefault<z.ZodNumber>;
|
|
1768
1870
|
projects: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1871
|
+
search: z.ZodOptional<z.ZodString>;
|
|
1769
1872
|
}, z.core.$strip>>;
|
|
1770
1873
|
type WorkflowListParams = Partial<z.infer<typeof WorkflowListParamsSchema>>;
|
|
1771
1874
|
/**
|
|
@@ -1964,6 +2067,7 @@ declare class CodeMieClient {
|
|
|
1964
2067
|
private _llms;
|
|
1965
2068
|
private _tasks;
|
|
1966
2069
|
private _users;
|
|
2070
|
+
private _skills;
|
|
1967
2071
|
private _workflows;
|
|
1968
2072
|
constructor(config: CodeMieClientConfig);
|
|
1969
2073
|
/**
|
|
@@ -1998,6 +2102,10 @@ declare class CodeMieClient {
|
|
|
1998
2102
|
* Get the FileService instance.
|
|
1999
2103
|
*/
|
|
2000
2104
|
get files(): FileService;
|
|
2105
|
+
/**
|
|
2106
|
+
* Get the SkillService instance.
|
|
2107
|
+
*/
|
|
2108
|
+
get skills(): SkillService;
|
|
2001
2109
|
/**
|
|
2002
2110
|
* Get the WorkflowService instance.
|
|
2003
2111
|
*/
|
|
@@ -2036,4 +2144,4 @@ declare class NotFoundError extends ApiError {
|
|
|
2036
2144
|
constructor(resourceType: string, resourceId: string);
|
|
2037
2145
|
}
|
|
2038
2146
|
|
|
2039
|
-
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 };
|
|
2147
|
+
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, SkillCategory, type SkillCreatedBy, type SkillDetail, type SkillListItem, type SkillListPaginatedResponse, SkillScopeFilter, SkillService, SkillSortBy, SkillVisibility, 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
|
@@ -649,6 +649,16 @@ var DatasourceMapper = class _DatasourceMapper {
|
|
|
649
649
|
});
|
|
650
650
|
}
|
|
651
651
|
static mapDataSourceResponseCommonFields(response) {
|
|
652
|
+
let status;
|
|
653
|
+
if (response.error) {
|
|
654
|
+
status = DataSourceStatus.FAILED;
|
|
655
|
+
} else if (response.completed) {
|
|
656
|
+
status = DataSourceStatus.COMPLETED;
|
|
657
|
+
} else if (response.is_fetching) {
|
|
658
|
+
status = DataSourceStatus.FETCHING;
|
|
659
|
+
} else {
|
|
660
|
+
status = DataSourceStatus.IN_PROGRESS;
|
|
661
|
+
}
|
|
652
662
|
return {
|
|
653
663
|
id: response.id,
|
|
654
664
|
created_by: response.created_by,
|
|
@@ -662,7 +672,7 @@ var DatasourceMapper = class _DatasourceMapper {
|
|
|
662
672
|
project_name: response.project_name,
|
|
663
673
|
setting_id: response.setting_id,
|
|
664
674
|
shared_with_project: response.project_space_visible,
|
|
665
|
-
status
|
|
675
|
+
status,
|
|
666
676
|
tokens_usage: response.tokens_usage,
|
|
667
677
|
type: response.index_type,
|
|
668
678
|
update_date: response.update_date,
|
|
@@ -860,12 +870,13 @@ var DatasourceService = class {
|
|
|
860
870
|
sort_key: params.sort_key || "update_date",
|
|
861
871
|
sort_order: params.sort_order || "desc"
|
|
862
872
|
};
|
|
863
|
-
if (params.datasource_types || params.projects || params.status || params.owner) {
|
|
873
|
+
if (params.datasource_types || params.projects || params.status || params.owner || params.search) {
|
|
864
874
|
const filters = {};
|
|
865
875
|
if (params.datasource_types) filters.index_type = params.datasource_types;
|
|
866
876
|
if (params.projects) filters.project = params.projects;
|
|
867
877
|
if (params.status) filters.status = params.status;
|
|
868
878
|
if (params.owner) filters.created_by = params.owner;
|
|
879
|
+
if (params.search) filters.name = params.search;
|
|
869
880
|
queryParams.filters = JSON.stringify(filters);
|
|
870
881
|
}
|
|
871
882
|
const response = await this.api.get(
|
|
@@ -1190,6 +1201,88 @@ var UserService = class {
|
|
|
1190
1201
|
}
|
|
1191
1202
|
};
|
|
1192
1203
|
|
|
1204
|
+
// src/schemas/skill.ts
|
|
1205
|
+
import { z as z5 } from "zod";
|
|
1206
|
+
|
|
1207
|
+
// src/models/skill.ts
|
|
1208
|
+
var SkillVisibility = /* @__PURE__ */ ((SkillVisibility2) => {
|
|
1209
|
+
SkillVisibility2["PRIVATE"] = "private";
|
|
1210
|
+
SkillVisibility2["PROJECT"] = "project";
|
|
1211
|
+
SkillVisibility2["PUBLIC"] = "public";
|
|
1212
|
+
return SkillVisibility2;
|
|
1213
|
+
})(SkillVisibility || {});
|
|
1214
|
+
var SkillScopeFilter = /* @__PURE__ */ ((SkillScopeFilter2) => {
|
|
1215
|
+
SkillScopeFilter2["MARKETPLACE"] = "marketplace";
|
|
1216
|
+
SkillScopeFilter2["PROJECT"] = "project";
|
|
1217
|
+
SkillScopeFilter2["PROJECT_WITH_MARKETPLACE"] = "project_with_marketplace";
|
|
1218
|
+
return SkillScopeFilter2;
|
|
1219
|
+
})(SkillScopeFilter || {});
|
|
1220
|
+
var SkillSortBy = /* @__PURE__ */ ((SkillSortBy2) => {
|
|
1221
|
+
SkillSortBy2["CREATED_DATE"] = "created_date";
|
|
1222
|
+
SkillSortBy2["ASSISTANTS_COUNT"] = "assistants_count";
|
|
1223
|
+
SkillSortBy2["RELEVANCE"] = "relevance";
|
|
1224
|
+
return SkillSortBy2;
|
|
1225
|
+
})(SkillSortBy || {});
|
|
1226
|
+
var SkillCategory = /* @__PURE__ */ ((SkillCategory2) => {
|
|
1227
|
+
SkillCategory2["DEVELOPMENT"] = "development";
|
|
1228
|
+
SkillCategory2["ENGINEERING"] = "engineering";
|
|
1229
|
+
SkillCategory2["TESTING"] = "testing";
|
|
1230
|
+
SkillCategory2["QUALITY_ASSURANCE"] = "quality_assurance";
|
|
1231
|
+
SkillCategory2["CODE_REVIEW"] = "code_review";
|
|
1232
|
+
SkillCategory2["DOCUMENTATION"] = "documentation";
|
|
1233
|
+
SkillCategory2["DEVOPS"] = "devops";
|
|
1234
|
+
SkillCategory2["SECURITY"] = "security";
|
|
1235
|
+
SkillCategory2["COMPLIANCE"] = "compliance";
|
|
1236
|
+
SkillCategory2["MONITORING_ALERTS"] = "monitoring_alerts";
|
|
1237
|
+
SkillCategory2["ARCHITECTURE"] = "architecture";
|
|
1238
|
+
SkillCategory2["UI_UX_DESIGN"] = "ui_ux_design";
|
|
1239
|
+
SkillCategory2["DATA_ANALYSIS"] = "data_analysis";
|
|
1240
|
+
SkillCategory2["DATA_ANALYTICS"] = "data_analytics";
|
|
1241
|
+
SkillCategory2["PROJECT_MANAGEMENT"] = "project_management";
|
|
1242
|
+
SkillCategory2["PRODUCT_MANAGEMENT"] = "product_management";
|
|
1243
|
+
SkillCategory2["BUSINESS_ANALYSIS"] = "business_analysis";
|
|
1244
|
+
return SkillCategory2;
|
|
1245
|
+
})(SkillCategory || {});
|
|
1246
|
+
|
|
1247
|
+
// src/schemas/skill.ts
|
|
1248
|
+
var SkillListParamsSchema = z5.object({
|
|
1249
|
+
page: z5.number().default(0),
|
|
1250
|
+
per_page: z5.number().default(20),
|
|
1251
|
+
filters: z5.record(z5.string(), z5.unknown()).optional(),
|
|
1252
|
+
sort_by: z5.nativeEnum(SkillSortBy).optional(),
|
|
1253
|
+
scope: z5.nativeEnum(SkillScopeFilter).optional()
|
|
1254
|
+
}).readonly();
|
|
1255
|
+
|
|
1256
|
+
// src/services/skill.ts
|
|
1257
|
+
var SkillService = class {
|
|
1258
|
+
constructor(config) {
|
|
1259
|
+
this.api = new ApiRequestHandler(config);
|
|
1260
|
+
}
|
|
1261
|
+
/**
|
|
1262
|
+
* Get paginated list of skills accessible to the current user.
|
|
1263
|
+
*/
|
|
1264
|
+
async listPaginated(_params = {}) {
|
|
1265
|
+
const params = SkillListParamsSchema.parse(_params);
|
|
1266
|
+
return this.api.get("/v1/skills", {
|
|
1267
|
+
...params,
|
|
1268
|
+
...params.filters && { filters: JSON.stringify(params.filters) }
|
|
1269
|
+
});
|
|
1270
|
+
}
|
|
1271
|
+
/**
|
|
1272
|
+
* Get flat list of skills (without pagination metadata).
|
|
1273
|
+
*/
|
|
1274
|
+
async list(_params = {}) {
|
|
1275
|
+
const response = await this.listPaginated(_params);
|
|
1276
|
+
return response.skills;
|
|
1277
|
+
}
|
|
1278
|
+
/**
|
|
1279
|
+
* Get skill details by ID.
|
|
1280
|
+
*/
|
|
1281
|
+
async get(skillId) {
|
|
1282
|
+
return this.api.get(`/v1/skills/${skillId}`);
|
|
1283
|
+
}
|
|
1284
|
+
};
|
|
1285
|
+
|
|
1193
1286
|
// src/mappers/workflow.mapper.ts
|
|
1194
1287
|
var WorkflowMapper = class {
|
|
1195
1288
|
static mapWorkflowResponse(response) {
|
|
@@ -1223,7 +1316,7 @@ var WorkflowMapper = class {
|
|
|
1223
1316
|
};
|
|
1224
1317
|
|
|
1225
1318
|
// src/schemas/workflow.ts
|
|
1226
|
-
import { z as
|
|
1319
|
+
import { z as z6 } from "zod";
|
|
1227
1320
|
|
|
1228
1321
|
// src/models/workflow.ts
|
|
1229
1322
|
var WorkflowMode = {
|
|
@@ -1240,49 +1333,50 @@ var ExecutionStatus = {
|
|
|
1240
1333
|
};
|
|
1241
1334
|
|
|
1242
1335
|
// src/schemas/workflow.ts
|
|
1243
|
-
var WorkflowListParamsSchema =
|
|
1244
|
-
page:
|
|
1245
|
-
per_page:
|
|
1246
|
-
projects:
|
|
1336
|
+
var WorkflowListParamsSchema = z6.object({
|
|
1337
|
+
page: z6.number().prefault(0),
|
|
1338
|
+
per_page: z6.number().prefault(10),
|
|
1339
|
+
projects: z6.array(z6.string()).optional(),
|
|
1340
|
+
search: z6.string().optional()
|
|
1247
1341
|
}).readonly();
|
|
1248
|
-
var WorkflowCreateParamsSchema =
|
|
1249
|
-
project:
|
|
1250
|
-
name:
|
|
1251
|
-
description:
|
|
1252
|
-
yaml_config:
|
|
1253
|
-
mode:
|
|
1254
|
-
shared:
|
|
1255
|
-
icon_url:
|
|
1342
|
+
var WorkflowCreateParamsSchema = z6.object({
|
|
1343
|
+
project: z6.string(),
|
|
1344
|
+
name: z6.string(),
|
|
1345
|
+
description: z6.string().optional(),
|
|
1346
|
+
yaml_config: z6.string(),
|
|
1347
|
+
mode: z6.enum([WorkflowMode.SEQUENTIAL, WorkflowMode.AUTONOMOUS]),
|
|
1348
|
+
shared: z6.boolean(),
|
|
1349
|
+
icon_url: z6.string().optional()
|
|
1256
1350
|
}).readonly();
|
|
1257
|
-
var WorkflowUpdateParamsSchema =
|
|
1258
|
-
project:
|
|
1259
|
-
name:
|
|
1260
|
-
description:
|
|
1261
|
-
yaml_config:
|
|
1262
|
-
mode:
|
|
1263
|
-
shared:
|
|
1264
|
-
icon_url:
|
|
1351
|
+
var WorkflowUpdateParamsSchema = z6.object({
|
|
1352
|
+
project: z6.string(),
|
|
1353
|
+
name: z6.string(),
|
|
1354
|
+
description: z6.string().optional(),
|
|
1355
|
+
yaml_config: z6.string(),
|
|
1356
|
+
mode: z6.enum([WorkflowMode.SEQUENTIAL, WorkflowMode.AUTONOMOUS]).optional(),
|
|
1357
|
+
shared: z6.boolean().optional(),
|
|
1358
|
+
icon_url: z6.string().optional()
|
|
1265
1359
|
}).readonly();
|
|
1266
|
-
var WorkflowExecutionListParamsSchema =
|
|
1267
|
-
page:
|
|
1268
|
-
per_page:
|
|
1360
|
+
var WorkflowExecutionListParamsSchema = z6.object({
|
|
1361
|
+
page: z6.number().prefault(0),
|
|
1362
|
+
per_page: z6.number().prefault(10)
|
|
1269
1363
|
}).readonly();
|
|
1270
|
-
var WorkflowExecutionCreateParamsSchema =
|
|
1271
|
-
user_input:
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1364
|
+
var WorkflowExecutionCreateParamsSchema = z6.object({
|
|
1365
|
+
user_input: z6.union([
|
|
1366
|
+
z6.string(),
|
|
1367
|
+
z6.record(z6.string(), z6.unknown()),
|
|
1368
|
+
z6.array(z6.unknown()),
|
|
1369
|
+
z6.number(),
|
|
1370
|
+
z6.boolean()
|
|
1277
1371
|
]).optional(),
|
|
1278
|
-
file_name:
|
|
1279
|
-
session_id:
|
|
1280
|
-
propagate_headers:
|
|
1281
|
-
tags:
|
|
1372
|
+
file_name: z6.string().optional(),
|
|
1373
|
+
session_id: z6.string().optional(),
|
|
1374
|
+
propagate_headers: z6.boolean().optional(),
|
|
1375
|
+
tags: z6.array(z6.string()).optional()
|
|
1282
1376
|
}).readonly();
|
|
1283
|
-
var WorkflowExecutionStateListParamsSchema =
|
|
1284
|
-
page:
|
|
1285
|
-
per_page:
|
|
1377
|
+
var WorkflowExecutionStateListParamsSchema = z6.object({
|
|
1378
|
+
page: z6.number().prefault(0),
|
|
1379
|
+
per_page: z6.number().prefault(10)
|
|
1286
1380
|
}).readonly();
|
|
1287
1381
|
|
|
1288
1382
|
// src/services/workflow_execution_state.ts
|
|
@@ -1424,15 +1518,18 @@ var WorkflowService = class {
|
|
|
1424
1518
|
async list(_params = {}) {
|
|
1425
1519
|
const params = WorkflowListParamsSchema.parse(_params);
|
|
1426
1520
|
const queryParams = {
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
per_page: params.per_page,
|
|
1430
|
-
...params.projects?.length ? { projects: params.projects } : {}
|
|
1431
|
-
})
|
|
1521
|
+
page: params.page,
|
|
1522
|
+
per_page: params.per_page
|
|
1432
1523
|
};
|
|
1433
|
-
const
|
|
1434
|
-
|
|
1435
|
-
|
|
1524
|
+
const filters = {};
|
|
1525
|
+
if (params.projects?.length) filters.project = params.projects;
|
|
1526
|
+
if (params.search) filters.name = params.search;
|
|
1527
|
+
if (Object.keys(filters).length)
|
|
1528
|
+
queryParams.filters = JSON.stringify(filters);
|
|
1529
|
+
const workflows = await this.api.get(
|
|
1530
|
+
"/v1/workflows",
|
|
1531
|
+
queryParams
|
|
1532
|
+
);
|
|
1436
1533
|
return workflows.data.map(WorkflowMapper.mapWorkflowResponse);
|
|
1437
1534
|
}
|
|
1438
1535
|
/**
|
|
@@ -1524,6 +1621,7 @@ var CodeMieClient = class {
|
|
|
1524
1621
|
this._llms = new LLMService(authConfig);
|
|
1525
1622
|
this._tasks = new TaskService(authConfig);
|
|
1526
1623
|
this._users = new UserService(authConfig);
|
|
1624
|
+
this._skills = new SkillService(authConfig);
|
|
1527
1625
|
this._workflows = new WorkflowService(authConfig);
|
|
1528
1626
|
}
|
|
1529
1627
|
/**
|
|
@@ -1574,6 +1672,12 @@ var CodeMieClient = class {
|
|
|
1574
1672
|
get files() {
|
|
1575
1673
|
return this._files;
|
|
1576
1674
|
}
|
|
1675
|
+
/**
|
|
1676
|
+
* Get the SkillService instance.
|
|
1677
|
+
*/
|
|
1678
|
+
get skills() {
|
|
1679
|
+
return this._skills;
|
|
1680
|
+
}
|
|
1577
1681
|
/**
|
|
1578
1682
|
* Get the WorkflowService instance.
|
|
1579
1683
|
*/
|
|
@@ -1651,6 +1755,7 @@ var CodeMieClient = class {
|
|
|
1651
1755
|
this._llms = new LLMService(authConfig);
|
|
1652
1756
|
this._tasks = new TaskService(authConfig);
|
|
1653
1757
|
this._users = new UserService(authConfig);
|
|
1758
|
+
this._skills = new SkillService(authConfig);
|
|
1654
1759
|
this._workflows = new WorkflowService(authConfig);
|
|
1655
1760
|
}
|
|
1656
1761
|
};
|
|
@@ -1854,6 +1959,11 @@ export {
|
|
|
1854
1959
|
LLMProvider,
|
|
1855
1960
|
LLMService,
|
|
1856
1961
|
NotFoundError,
|
|
1962
|
+
SkillCategory,
|
|
1963
|
+
SkillScopeFilter,
|
|
1964
|
+
SkillService,
|
|
1965
|
+
SkillSortBy,
|
|
1966
|
+
SkillVisibility,
|
|
1857
1967
|
TaskService,
|
|
1858
1968
|
UserService,
|
|
1859
1969
|
WorkflowCreateParamsSchema,
|