import { ProjectScopeConfig } from "../../db/manage/scope-definitions.js";
import { PaginationConfig } from "../../types/utility.js";
import { AgentsRunDatabaseClient } from "../../db/runtime/runtime-client.js";
import "../../types/index.js";
import { EventInsert } from "../../types/entities.js";

//#region src/data-access/runtime/events.d.ts
declare const createEvent: (db: AgentsRunDatabaseClient) => (params: EventInsert) => Promise<{
  row: {
    type: string;
    id: string;
    properties: Record<string, unknown> | null;
    createdAt: string;
    updatedAt: string;
    tenantId: string;
    projectId: string;
    metadata: Record<string, unknown> | null;
    agentId: string | null;
    conversationId: string | null;
    userProperties: Record<string, unknown> | null;
    messageId: string | null;
    serverMetadata: {
      [k: string]: unknown;
      authMethod?: string;
    } | null;
  };
  conflict: false;
} | {
  row: {
    createdAt: string;
    updatedAt: string;
    type: string;
    agentId: string | null;
    conversationId: string | null;
    messageId: string | null;
    properties: Record<string, unknown> | null;
    userProperties: Record<string, unknown> | null;
    metadata: Record<string, unknown> | null;
    serverMetadata: {
      [k: string]: unknown;
      authMethod?: string;
    } | null;
    projectId: string;
    tenantId: string;
    id: string;
  };
  conflict: true;
}>;
declare const getEventById: (db: AgentsRunDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
  eventId: string;
}) => Promise<{
  createdAt: string;
  updatedAt: string;
  type: string;
  agentId: string | null;
  conversationId: string | null;
  messageId: string | null;
  properties: Record<string, unknown> | null;
  userProperties: Record<string, unknown> | null;
  metadata: Record<string, unknown> | null;
  serverMetadata: {
    [k: string]: unknown;
    authMethod?: string;
  } | null;
  projectId: string;
  tenantId: string;
  id: string;
}>;
declare const listEventsByConversationId: (db: AgentsRunDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
  conversationId: string;
  pagination?: PaginationConfig;
}) => Promise<{
  createdAt: string;
  updatedAt: string;
  type: string;
  agentId: string | null;
  conversationId: string | null;
  messageId: string | null;
  properties: Record<string, unknown> | null;
  userProperties: Record<string, unknown> | null;
  metadata: Record<string, unknown> | null;
  serverMetadata: {
    [k: string]: unknown;
    authMethod?: string;
  } | null;
  projectId: string;
  tenantId: string;
  id: string;
}[]>;
declare const deleteEventsByConversationIds: (db: AgentsRunDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
  conversationIds: string[];
}) => Promise<number>;
//#endregion
export { createEvent, deleteEventsByConversationIds, getEventById, listEventsByConversationId };