codemie-sdk 0.1.424 → 0.1.426

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
@@ -39,6 +39,127 @@ interface AuthConfig {
39
39
  cookies?: Record<string, string>;
40
40
  }
41
41
 
42
+ interface ResponseMetadata {
43
+ timestamp: string;
44
+ data_as_of: string;
45
+ filters_applied: Record<string, unknown>;
46
+ execution_time_ms: number;
47
+ }
48
+ interface PaginationMetadata {
49
+ page: number;
50
+ per_page: number;
51
+ total_count: number;
52
+ has_more: boolean;
53
+ }
54
+ interface ColumnDefinition {
55
+ id: string;
56
+ label: string;
57
+ type: string;
58
+ format?: string;
59
+ description?: string;
60
+ }
61
+ interface Metric {
62
+ id: string;
63
+ label: string;
64
+ type: string;
65
+ value: unknown;
66
+ format?: string;
67
+ description?: string;
68
+ }
69
+ interface SummariesData {
70
+ metrics: Metric[];
71
+ }
72
+ interface TabularData {
73
+ columns: ColumnDefinition[];
74
+ rows: Record<string, unknown>[];
75
+ totals?: Record<string, unknown>;
76
+ }
77
+ interface UserListItem {
78
+ id: string;
79
+ name: string;
80
+ }
81
+ interface UsersListData {
82
+ users: UserListItem[];
83
+ total_count: number;
84
+ }
85
+ interface SummariesResponse {
86
+ data: SummariesData;
87
+ metadata: ResponseMetadata;
88
+ }
89
+ interface TabularResponse {
90
+ data: TabularData;
91
+ metadata: ResponseMetadata;
92
+ pagination?: PaginationMetadata;
93
+ }
94
+ interface UsersListResponse {
95
+ data: UsersListData;
96
+ metadata: ResponseMetadata;
97
+ }
98
+
99
+ 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"];
100
+ type TimePeriod = (typeof TIME_PERIOD_VALUES)[number];
101
+ declare const AnalyticsQueryParamsSchema: z.ZodReadonly<z.ZodObject<{
102
+ time_period: z.ZodOptional<z.ZodEnum<{
103
+ last_hour: "last_hour";
104
+ last_6_hours: "last_6_hours";
105
+ last_24_hours: "last_24_hours";
106
+ last_7_days: "last_7_days";
107
+ last_30_days: "last_30_days";
108
+ last_60_days: "last_60_days";
109
+ last_year: "last_year";
110
+ }>>;
111
+ start_date: z.ZodOptional<z.ZodString>;
112
+ end_date: z.ZodOptional<z.ZodString>;
113
+ users: z.ZodOptional<z.ZodString>;
114
+ projects: z.ZodOptional<z.ZodString>;
115
+ }, z.core.$strip>>;
116
+ type AnalyticsQueryParams = Partial<z.infer<typeof AnalyticsQueryParamsSchema>>;
117
+ declare const PaginatedAnalyticsQueryParamsSchema: z.ZodReadonly<z.ZodObject<{
118
+ time_period: z.ZodOptional<z.ZodEnum<{
119
+ last_hour: "last_hour";
120
+ last_6_hours: "last_6_hours";
121
+ last_24_hours: "last_24_hours";
122
+ last_7_days: "last_7_days";
123
+ last_30_days: "last_30_days";
124
+ last_60_days: "last_60_days";
125
+ last_year: "last_year";
126
+ }>>;
127
+ start_date: z.ZodOptional<z.ZodString>;
128
+ end_date: z.ZodOptional<z.ZodString>;
129
+ users: z.ZodOptional<z.ZodString>;
130
+ projects: z.ZodOptional<z.ZodString>;
131
+ page: z.ZodDefault<z.ZodNumber>;
132
+ per_page: z.ZodDefault<z.ZodNumber>;
133
+ }, z.core.$strip>>;
134
+ type PaginatedAnalyticsQueryParams = Partial<z.infer<typeof PaginatedAnalyticsQueryParamsSchema>>;
135
+
136
+ declare class AnalyticsService {
137
+ private api;
138
+ constructor(config: AuthConfig);
139
+ getSummaries(_params?: AnalyticsQueryParams): Promise<SummariesResponse>;
140
+ getCliSummary(_params?: AnalyticsQueryParams): Promise<SummariesResponse>;
141
+ getUsers(_params?: AnalyticsQueryParams): Promise<UsersListResponse>;
142
+ getAssistantsChats(_params?: PaginatedAnalyticsQueryParams): Promise<TabularResponse>;
143
+ getWorkflows(_params?: PaginatedAnalyticsQueryParams): Promise<TabularResponse>;
144
+ getToolsUsage(_params?: PaginatedAnalyticsQueryParams): Promise<TabularResponse>;
145
+ getWebhooksInvocation(_params?: PaginatedAnalyticsQueryParams): Promise<TabularResponse>;
146
+ getMcpServers(_params?: PaginatedAnalyticsQueryParams): Promise<TabularResponse>;
147
+ getMcpServersByUsers(_params?: PaginatedAnalyticsQueryParams): Promise<TabularResponse>;
148
+ getProjectsSpending(_params?: PaginatedAnalyticsQueryParams): Promise<TabularResponse>;
149
+ getLlmsUsage(_params?: PaginatedAnalyticsQueryParams): Promise<TabularResponse>;
150
+ getUsersSpending(_params?: PaginatedAnalyticsQueryParams): Promise<TabularResponse>;
151
+ getBudgetSoftLimit(_params?: PaginatedAnalyticsQueryParams): Promise<TabularResponse>;
152
+ getBudgetHardLimit(_params?: PaginatedAnalyticsQueryParams): Promise<TabularResponse>;
153
+ getUsersActivity(_params?: PaginatedAnalyticsQueryParams): Promise<TabularResponse>;
154
+ getProjectsActivity(_params?: PaginatedAnalyticsQueryParams): Promise<TabularResponse>;
155
+ getAgentsUsage(_params?: PaginatedAnalyticsQueryParams): Promise<TabularResponse>;
156
+ getCliAgents(_params?: PaginatedAnalyticsQueryParams): Promise<TabularResponse>;
157
+ getCliLlms(_params?: PaginatedAnalyticsQueryParams): Promise<TabularResponse>;
158
+ getCliUsers(_params?: PaginatedAnalyticsQueryParams): Promise<TabularResponse>;
159
+ getCliErrors(_params?: PaginatedAnalyticsQueryParams): Promise<TabularResponse>;
160
+ getCliRepositories(_params?: PaginatedAnalyticsQueryParams): Promise<TabularResponse>;
161
+ }
162
+
42
163
  /** Models for integration-related data structures */
43
164
  /**
44
165
  * Credential types as constant object
@@ -2424,6 +2545,7 @@ declare class CodeMieClient {
2424
2545
  private apiDomain;
2425
2546
  private verifySSL;
2426
2547
  private useCookieAuth;
2548
+ private _analytics;
2427
2549
  private _assistants;
2428
2550
  private _conversations;
2429
2551
  private _datasources;
@@ -2436,6 +2558,10 @@ declare class CodeMieClient {
2436
2558
  private _skills;
2437
2559
  private _workflows;
2438
2560
  constructor(config: CodeMieClientConfig);
2561
+ /**
2562
+ * Get the AnalyticsService instance.
2563
+ */
2564
+ get analytics(): AnalyticsService;
2439
2565
  /**
2440
2566
  * Get the AssistantService instance.
2441
2567
  */
@@ -2514,4 +2640,4 @@ declare class NotFoundError extends ApiError {
2514
2640
  constructor(resourceType: string, resourceId: string);
2515
2641
  }
2516
2642
 
2517
- 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 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 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, type MCPServerDetails, type Mark, type MissingIntegration, type MissingIntegrationsByCredentialType, NotFoundError, type Operator, type OtherDataSourceCreateParams, type OtherDataSourceUpdateParams, type PaginatedResponse, type PaginationParams, type PromptVariable, type ProviderDataSourceRequest, 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, SkillScopeFilter, SkillService, SkillSortBy, type SkillUpdateParams, 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, type XrayDataSourceCreateDto, type XrayDataSourceCreateParams, type XrayDataSourceUpdateDto, type XrayDataSourceUpdateParams, classifyHttpError, formatCookies, formatToolErrorForLevel, formatToolErrorFull, formatToolErrorMinimal, formatToolErrorStandard, isRecoverableError };
2643
+ 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 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, 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 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, 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 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, type XrayDataSourceCreateDto, type XrayDataSourceCreateParams, type XrayDataSourceUpdateDto, type XrayDataSourceUpdateParams, classifyHttpError, formatCookies, formatToolErrorForLevel, formatToolErrorFull, formatToolErrorMinimal, formatToolErrorStandard, isRecoverableError };
package/dist/index.d.ts CHANGED
@@ -39,6 +39,127 @@ interface AuthConfig {
39
39
  cookies?: Record<string, string>;
40
40
  }
41
41
 
42
+ interface ResponseMetadata {
43
+ timestamp: string;
44
+ data_as_of: string;
45
+ filters_applied: Record<string, unknown>;
46
+ execution_time_ms: number;
47
+ }
48
+ interface PaginationMetadata {
49
+ page: number;
50
+ per_page: number;
51
+ total_count: number;
52
+ has_more: boolean;
53
+ }
54
+ interface ColumnDefinition {
55
+ id: string;
56
+ label: string;
57
+ type: string;
58
+ format?: string;
59
+ description?: string;
60
+ }
61
+ interface Metric {
62
+ id: string;
63
+ label: string;
64
+ type: string;
65
+ value: unknown;
66
+ format?: string;
67
+ description?: string;
68
+ }
69
+ interface SummariesData {
70
+ metrics: Metric[];
71
+ }
72
+ interface TabularData {
73
+ columns: ColumnDefinition[];
74
+ rows: Record<string, unknown>[];
75
+ totals?: Record<string, unknown>;
76
+ }
77
+ interface UserListItem {
78
+ id: string;
79
+ name: string;
80
+ }
81
+ interface UsersListData {
82
+ users: UserListItem[];
83
+ total_count: number;
84
+ }
85
+ interface SummariesResponse {
86
+ data: SummariesData;
87
+ metadata: ResponseMetadata;
88
+ }
89
+ interface TabularResponse {
90
+ data: TabularData;
91
+ metadata: ResponseMetadata;
92
+ pagination?: PaginationMetadata;
93
+ }
94
+ interface UsersListResponse {
95
+ data: UsersListData;
96
+ metadata: ResponseMetadata;
97
+ }
98
+
99
+ 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"];
100
+ type TimePeriod = (typeof TIME_PERIOD_VALUES)[number];
101
+ declare const AnalyticsQueryParamsSchema: z.ZodReadonly<z.ZodObject<{
102
+ time_period: z.ZodOptional<z.ZodEnum<{
103
+ last_hour: "last_hour";
104
+ last_6_hours: "last_6_hours";
105
+ last_24_hours: "last_24_hours";
106
+ last_7_days: "last_7_days";
107
+ last_30_days: "last_30_days";
108
+ last_60_days: "last_60_days";
109
+ last_year: "last_year";
110
+ }>>;
111
+ start_date: z.ZodOptional<z.ZodString>;
112
+ end_date: z.ZodOptional<z.ZodString>;
113
+ users: z.ZodOptional<z.ZodString>;
114
+ projects: z.ZodOptional<z.ZodString>;
115
+ }, z.core.$strip>>;
116
+ type AnalyticsQueryParams = Partial<z.infer<typeof AnalyticsQueryParamsSchema>>;
117
+ declare const PaginatedAnalyticsQueryParamsSchema: z.ZodReadonly<z.ZodObject<{
118
+ time_period: z.ZodOptional<z.ZodEnum<{
119
+ last_hour: "last_hour";
120
+ last_6_hours: "last_6_hours";
121
+ last_24_hours: "last_24_hours";
122
+ last_7_days: "last_7_days";
123
+ last_30_days: "last_30_days";
124
+ last_60_days: "last_60_days";
125
+ last_year: "last_year";
126
+ }>>;
127
+ start_date: z.ZodOptional<z.ZodString>;
128
+ end_date: z.ZodOptional<z.ZodString>;
129
+ users: z.ZodOptional<z.ZodString>;
130
+ projects: z.ZodOptional<z.ZodString>;
131
+ page: z.ZodDefault<z.ZodNumber>;
132
+ per_page: z.ZodDefault<z.ZodNumber>;
133
+ }, z.core.$strip>>;
134
+ type PaginatedAnalyticsQueryParams = Partial<z.infer<typeof PaginatedAnalyticsQueryParamsSchema>>;
135
+
136
+ declare class AnalyticsService {
137
+ private api;
138
+ constructor(config: AuthConfig);
139
+ getSummaries(_params?: AnalyticsQueryParams): Promise<SummariesResponse>;
140
+ getCliSummary(_params?: AnalyticsQueryParams): Promise<SummariesResponse>;
141
+ getUsers(_params?: AnalyticsQueryParams): Promise<UsersListResponse>;
142
+ getAssistantsChats(_params?: PaginatedAnalyticsQueryParams): Promise<TabularResponse>;
143
+ getWorkflows(_params?: PaginatedAnalyticsQueryParams): Promise<TabularResponse>;
144
+ getToolsUsage(_params?: PaginatedAnalyticsQueryParams): Promise<TabularResponse>;
145
+ getWebhooksInvocation(_params?: PaginatedAnalyticsQueryParams): Promise<TabularResponse>;
146
+ getMcpServers(_params?: PaginatedAnalyticsQueryParams): Promise<TabularResponse>;
147
+ getMcpServersByUsers(_params?: PaginatedAnalyticsQueryParams): Promise<TabularResponse>;
148
+ getProjectsSpending(_params?: PaginatedAnalyticsQueryParams): Promise<TabularResponse>;
149
+ getLlmsUsage(_params?: PaginatedAnalyticsQueryParams): Promise<TabularResponse>;
150
+ getUsersSpending(_params?: PaginatedAnalyticsQueryParams): Promise<TabularResponse>;
151
+ getBudgetSoftLimit(_params?: PaginatedAnalyticsQueryParams): Promise<TabularResponse>;
152
+ getBudgetHardLimit(_params?: PaginatedAnalyticsQueryParams): Promise<TabularResponse>;
153
+ getUsersActivity(_params?: PaginatedAnalyticsQueryParams): Promise<TabularResponse>;
154
+ getProjectsActivity(_params?: PaginatedAnalyticsQueryParams): Promise<TabularResponse>;
155
+ getAgentsUsage(_params?: PaginatedAnalyticsQueryParams): Promise<TabularResponse>;
156
+ getCliAgents(_params?: PaginatedAnalyticsQueryParams): Promise<TabularResponse>;
157
+ getCliLlms(_params?: PaginatedAnalyticsQueryParams): Promise<TabularResponse>;
158
+ getCliUsers(_params?: PaginatedAnalyticsQueryParams): Promise<TabularResponse>;
159
+ getCliErrors(_params?: PaginatedAnalyticsQueryParams): Promise<TabularResponse>;
160
+ getCliRepositories(_params?: PaginatedAnalyticsQueryParams): Promise<TabularResponse>;
161
+ }
162
+
42
163
  /** Models for integration-related data structures */
43
164
  /**
44
165
  * Credential types as constant object
@@ -2424,6 +2545,7 @@ declare class CodeMieClient {
2424
2545
  private apiDomain;
2425
2546
  private verifySSL;
2426
2547
  private useCookieAuth;
2548
+ private _analytics;
2427
2549
  private _assistants;
2428
2550
  private _conversations;
2429
2551
  private _datasources;
@@ -2436,6 +2558,10 @@ declare class CodeMieClient {
2436
2558
  private _skills;
2437
2559
  private _workflows;
2438
2560
  constructor(config: CodeMieClientConfig);
2561
+ /**
2562
+ * Get the AnalyticsService instance.
2563
+ */
2564
+ get analytics(): AnalyticsService;
2439
2565
  /**
2440
2566
  * Get the AssistantService instance.
2441
2567
  */
@@ -2514,4 +2640,4 @@ declare class NotFoundError extends ApiError {
2514
2640
  constructor(resourceType: string, resourceId: string);
2515
2641
  }
2516
2642
 
2517
- 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 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 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, type MCPServerDetails, type Mark, type MissingIntegration, type MissingIntegrationsByCredentialType, NotFoundError, type Operator, type OtherDataSourceCreateParams, type OtherDataSourceUpdateParams, type PaginatedResponse, type PaginationParams, type PromptVariable, type ProviderDataSourceRequest, 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, SkillScopeFilter, SkillService, SkillSortBy, type SkillUpdateParams, 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, type XrayDataSourceCreateDto, type XrayDataSourceCreateParams, type XrayDataSourceUpdateDto, type XrayDataSourceUpdateParams, classifyHttpError, formatCookies, formatToolErrorForLevel, formatToolErrorFull, formatToolErrorMinimal, formatToolErrorStandard, isRecoverableError };
2643
+ 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 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, 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 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, 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 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, type XrayDataSourceCreateDto, type XrayDataSourceCreateParams, type XrayDataSourceUpdateDto, type XrayDataSourceUpdateParams, classifyHttpError, formatCookies, formatToolErrorForLevel, formatToolErrorFull, formatToolErrorMinimal, formatToolErrorStandard, isRecoverableError };