import type { ApiSuccess, KnexPaginatedData } from '../..';
import type { AiAgentSummary, AiAgentThreadSummary, AiAgentUser, AiModelOption } from './index';
import type { AiAgentModelConfig, AiThreadCreatedFrom } from './requestTypes';
export type AiAgentAdminFilters = {
    projectUuids?: string[];
    agentUuids?: string[];
    userUuids?: string[];
    createdFrom?: AiThreadCreatedFrom;
    humanScore?: number;
    dateFrom?: string;
    dateTo?: string;
    search?: string;
};
export type AiAgentAdminSortField = 'createdAt' | 'title';
export type AiAgentAdminSort = {
    field: AiAgentAdminSortField;
    direction: 'asc' | 'desc';
};
export type AiAgentAdminFeedbackSummary = {
    upvotes: number;
    downvotes: number;
    neutral: number;
    total: number;
};
type ThreadSummary = Pick<AiAgentThreadSummary<AiAgentUser & {
    slackUserId: string | null;
    email: string | null;
}>, 'user' | 'createdAt' | 'createdFrom' | 'title' | 'uuid'>;
export type AiAgentAdminThreadSummary = ThreadSummary & {
    agent: Pick<AiAgentSummary, 'uuid' | 'name' | 'imageUrl'>;
    project: {
        uuid: string;
        name: string;
    };
    feedbackSummary: AiAgentAdminFeedbackSummary;
    promptCount: number;
    slackChannelId: string | null;
    slackThreadTs: string | null;
};
export type AiAgentAdminConversationsSummary = {
    threads: AiAgentAdminThreadSummary[];
};
export type ApiAiAgentAdminConversationsResponse = ApiSuccess<KnexPaginatedData<AiAgentAdminConversationsSummary>>;
export type AiAgentAdminPromptActivityPoint = {
    date: string;
    promptCount: number;
};
export type ApiAiAgentAdminPromptActivityResponse = ApiSuccess<AiAgentAdminPromptActivityPoint[]>;
export type McpActivityStatus = 'success' | 'error';
export type McpActivityFilters = {
    projectUuids?: string[];
    userUuids?: string[];
    agentUuids?: string[];
    toolNames?: string[];
    clientNames?: string[];
    status?: McpActivityStatus;
    dateFrom?: string;
    dateTo?: string;
};
export type McpActivitySortField = 'createdAt' | 'durationMs';
export type McpActivitySort = {
    field: McpActivitySortField;
    direction: 'asc' | 'desc';
};
/**
 * Server-computed display group for session-grouped activity: a session
 * split into segments on 1h inactivity gaps (sessionless calls chunk the
 * same way under a shared no-session block). Counts cover the whole
 * segment, not just the loaded page. Null when the query isn't
 * session-grouped (e.g. sorted by duration).
 */
export type McpActivitySessionGroup = {
    key: string;
    callCount: number;
    errorCount: number;
};
export type McpActivityItem = {
    uuid: string;
    createdAt: string;
    user: {
        uuid: string;
        name: string;
        email: string | null;
    };
    project: {
        uuid: string;
        name: string;
    } | null;
    agent: {
        uuid: string;
        name: string;
    } | null;
    toolName: string;
    toolArgs: Record<string, unknown>;
    status: McpActivityStatus;
    errorMessage: string | null;
    durationMs: number;
    clientName: string | null;
    clientVersion: string | null;
    userAgent: string | null;
    authType: string;
    protocolVersion: string | null;
    sessionId: string | null;
    sessionGroup: McpActivitySessionGroup | null;
};
export type McpActivitySummary = {
    toolCalls: McpActivityItem[];
};
export type ApiMcpActivityResponse = ApiSuccess<KnexPaginatedData<McpActivitySummary>>;
export type McpActivityToolCount = {
    toolName: string;
    count: number;
};
export type McpActivityAgentCount = {
    agent: {
        uuid: string;
        name: string;
    } | null;
    count: number;
};
export type McpActivityStats = {
    totalCalls: number;
    errorCalls: number;
    topTools: McpActivityToolCount[];
    agents: McpActivityAgentCount[];
    recentErrors: McpActivityItem[];
};
export type McpActivityStatsFilters = Omit<McpActivityFilters, 'status'>;
export type ApiMcpActivityStatsResponse = ApiSuccess<McpActivityStats>;
export type ComputedAiOrganizationSettings = {
    isCopilotEnabled: boolean;
    isTrial: boolean;
    defaultAiAgentModelOptions: AiModelOption[];
    configurableModelOptions?: AiModelOption[] | null;
    aiAgentReviewsPausedByByok?: boolean;
};
export declare const BYO_AI_PROVIDERS: readonly ["anthropic", "openai"];
export type ByoAiProvider = (typeof BYO_AI_PROVIDERS)[number];
export declare const isByoAiProvider: (provider: string) => provider is ByoAiProvider;
export type AiProviderApiKeysSet = {
    anthropic: boolean;
    openai: boolean;
};
export type AiProviderApiKeyHints = {
    anthropic: string | null;
    openai: string | null;
};
export type UpdateAiProviderApiKeys = {
    anthropic?: string | null;
    openai?: string | null;
};
export type AiOrgProviderModelVisibility = {
    enabled: boolean;
    allowedModels?: string[];
};
export type AiOrgModelVisibility = Partial<Record<ByoAiProvider, AiOrgProviderModelVisibility>>;
export type AiOrganizationSettings = {
    organizationUuid: string;
    aiAgentsVisible: boolean;
    aiAgentReviewsEnabled: boolean;
    mcpContentWritesEnabled: boolean;
    defaultAiAgentModelConfig: AiAgentModelConfig | null;
    modelVisibility?: AiOrgModelVisibility | null;
    providerApiKeysSet: AiProviderApiKeysSet;
    providerApiKeyHints: AiProviderApiKeyHints;
};
export type CreateAiOrganizationSettings = Omit<AiOrganizationSettings, 'providerApiKeysSet' | 'providerApiKeyHints'> & {
    providerApiKeys?: UpdateAiProviderApiKeys;
};
export type UpdateAiOrganizationSettings = {
    aiAgentsVisible?: boolean;
    aiAgentReviewsEnabled?: boolean;
    mcpContentWritesEnabled?: boolean;
    defaultAiAgentModelConfig?: AiAgentModelConfig | null;
    modelVisibility?: AiOrgModelVisibility | null;
    providerApiKeys?: UpdateAiProviderApiKeys;
};
export type ApiAiOrganizationSettingsResponse = ApiSuccess<AiOrganizationSettings & ComputedAiOrganizationSettings>;
export type ApiUpdateAiOrganizationSettingsResponse = ApiSuccess<AiOrganizationSettings>;
export {};
//# sourceMappingURL=adminTypes.d.ts.map