chatbolt-dev / apps /agent-service /libs /shared /src /entities /agent-hook.entity.d.ts
MTayyaBH
Refactor code structure for improved readability and maintainability
d714fad
Raw
History Blame Contribute Delete
1.05 kB
export declare class AgentHook {
id: string;
tenant_id: string;
agent_id: string;
name: string;
description: string | null;
trigger: 'before_message' | 'after_response';
type: 'sql_select' | 'webhook';
order_index: number;
is_active: boolean;
sql: string | null;
db_connection_id: string | null;
validate_rule: {
conditions?: Array<{
column: string;
op: '=' | '!=' | '<' | '<=' | '>' | '>=' | 'is_null' | 'is_empty' | 'contains';
value: any;
block_message?: string;
}>;
logic?: 'AND' | 'OR';
column?: string;
op?: '=' | '!=' | '<' | '<=' | '>' | '>=' | 'is_null' | 'is_empty' | 'contains';
value?: any;
block: boolean;
block_message: string;
} | null;
webhook_url: string | null;
webhook_method: 'POST' | 'PUT' | null;
webhook_headers: Record<string, string> | null;
webhook_payload_template: Record<string, any> | null;
created_at: Date;
updated_at: Date;
}