import { ResolvedRef } from "@inkeep/agents-core";
import { Context } from "hono";

//#region src/domains/run/services/TriggerService.d.ts

type TriggerWebhookParams = {
  tenantId: string;
  projectId: string;
  agentId: string;
  triggerId: string;
  resolvedRef: ResolvedRef;
  rawBody: string;
  honoContext: Context;
};
type TriggerWebhookResult = {
  success: true;
  invocationId: string;
  conversationId: string;
} | {
  success: false;
  error: string;
  status: 400 | 401 | 403 | 404 | 422 | 500;
  validationErrors?: string[];
};
/**
 * Process a trigger webhook request.
 * Handles validation, transformation, and dispatches async execution.
 */
declare function processWebhook(params: TriggerWebhookParams): Promise<TriggerWebhookResult>;
//#endregion
export { TriggerWebhookParams, TriggerWebhookResult, processWebhook };