import { ExecutionStatus } from '../../common/constants/executions.constant'; import { Paginated } from '../content/content.type'; export type { ExecutionStatus }; /** GET /api/v1/executions, GET /api/v1/executions/{uuid}, * GET /api/v1/rules/content/{contentId}/executions. */ export interface ContentExecution { uuid: string; /** FK to target `Mt5Account`. */ contentUuid: string; typeName?: string; /** transitionName (action executed). */ operation?: string; operationName?: string; /** FK to `content_rules.id`. */ ruleId?: number; evaluationGroupId?: string; actorId?: number; /** CMS lifecycle status (NOT the triage state). */ status: ExecutionStatus; params?: Record; /** Detection reason / LLM output (FEAT-003/005). */ result?: Record; error?: Record; info?: string | Record; durationMs?: number; retryCount: number; hooks?: { before?: unknown; after?: unknown; }; /** ISO 8601 — "detectedAt" / "triggeredAt". */ createdAt: string; /** ISO 8601. */ updatedAt: string; } /** `ExecutionListResponse` → GET /api/v1/executions. Alias for the * canonical `Paginated` envelope. */ export type ExecutionListResponse = Paginated; /** Query params for GET /api/v1/executions. */ export interface ExecutionListParams { /** Filter by target content UUID. */ contentUuid?: string; /** Filter by transitionName (e.g. `'set_field'` / `'action'`). This is the * execution `transition_name`, NOT the rule `conditionType` (so `'llm_agent'` * cannot be used here to filter detections). */ operation?: string; status?: ExecutionStatus; page?: number; perPage?: number; /** NOT a query param — switches the list to the byContent endpoint. */ contentId?: number; /** byContent pagination (offset/limit); ignored for the base list. */ offset?: number; limit?: number; /** byContent filter: signal | cron | batch | stream. */ sourceType?: string; /** When true, sends `?exclude_params=true` — the backend drops the `params` * JSONB column from every row AND skips loading it from PostgreSQL. Use this * for list views (history, detections) that only read `result` + `operationName`. * Fetch a single row via `GET /executions/{uuid}` when `params` is needed. */ excludeParams?: boolean; /** When true, sends `?include_unlinked=true` — without it the list returns * only rows carrying BOTH `content_uuid` AND `rule_id`; hand-written pack * `_audit` rows (projection audits, FEAT-014 E10a transitions) carry no * `rule_id` and need this flag to appear (api_references §7.2). */ includeUnlinked?: boolean; /** When true, sends `?llm_only=true` — narrows to executions whose backing * rule has `condition_type='llm_agent'` (AI-skill lane). */ llmOnly?: boolean; [key: string]: unknown; } //# sourceMappingURL=executions.type.d.ts.map