import { JSONSchema7 } from '@botpress/sdk';
import { DataSource } from './data-sources';
export declare namespace Definitions {
    type PrimitiveDefinition = ConversationDefinition | WorkflowDefinition | KnowledgeDefinition | TriggerDefinition | ActionDefinition | TableDefinition;
    interface Primitive {
        getDefinition(): PrimitiveDefinition;
    }
    type ConversationDefinition = {
        type: 'conversation';
        channel: string | string[];
        /**
         * Array of event names this conversation listens to.
         * Only events with conversationId property are routable to conversations.
         * Undefined or empty means no events (only messages).
         */
        events?: string[];
    };
    type WorkflowDefinition = {
        type: 'workflow';
        name: string;
        description?: string;
        input?: JSONSchema7;
        output?: JSONSchema7;
        state?: JSONSchema7;
        schedule?: string;
        timeout: number;
    };
    type KnowledgeDefinition = {
        type: 'knowledge';
        name: string;
        description?: string;
        sources: DataSource[];
    };
    type TriggerDefinition = {
        type: 'trigger';
        name: string;
        description?: string;
        state?: JSONSchema7;
        events: string[];
    };
    type ActionDefinition = {
        type: 'action';
        name: string;
        title?: string;
        description?: string;
        attributes?: Record<string, string>;
        input?: JSONSchema7;
        output?: JSONSchema7;
        cached?: boolean;
    };
    type TableDefinition = {
        type: 'table';
        name: string;
        schema: JSONSchema7;
        factor: number;
        keyColumn?: string;
        tags?: Record<string, string>;
    };
    function isConversationDefinition(value: unknown): value is ConversationDefinition;
    function isWorkflowDefinition(value: unknown): value is WorkflowDefinition;
    function isKnowledgeDefinition(value: unknown): value is KnowledgeDefinition;
    function isTriggerDefinition(value: unknown): value is TriggerDefinition;
    function isActionDefinition(value: unknown): value is ActionDefinition;
    function isTableDefinition(value: unknown): value is TableDefinition;
    function isValidDefinition(value: unknown): value is PrimitiveDefinition;
    /**
     * Extracts the definition from a class that implements the Primitive interface.
     * If the class does not implement the interface or the definition is invalid,
     * it returns undefined.
     *
     * @param maybeClass - The object to check for a Primitive definition.
     * @returns The definition if valid, otherwise undefined.
     */
    function getDefinition(maybeClass: unknown): PrimitiveDefinition | undefined;
}
//# sourceMappingURL=definition.d.ts.map