/** Build INSERT for ephemeral credentials. expiresExpr is a SQL expression like 'NULL' or "NOW() + N * INTERVAL '1 second'". */
export declare const INSERT_EPHEMERAL: (expiresExpr: string) => string;
export declare const EXCHANGE_EPHEMERAL = "\n  UPDATE lt_ephemeral_credentials\n  SET use_count = use_count + 1\n  WHERE token = $1\n    AND (expires_at IS NULL OR expires_at > NOW())\n    AND (max_uses = 0 OR use_count < max_uses)\n  RETURNING value, use_count, max_uses";
export declare const DELETE_EPHEMERAL = "\n  DELETE FROM lt_ephemeral_credentials WHERE token = $1";
export declare const CLEANUP_EXPIRED_EPHEMERAL = "\n  DELETE FROM lt_ephemeral_credentials\n  WHERE expires_at IS NOT NULL AND expires_at < NOW()";
export declare const LIST_BOTS = "\n  SELECT * FROM lt_users\n  WHERE account_type = 'bot'\n  ORDER BY created_at DESC\n  LIMIT $1 OFFSET $2";
export declare const COUNT_BOTS = "\n  SELECT COUNT(*)::int AS total FROM lt_users WHERE account_type = 'bot'";
export declare const SET_ACCOUNT_TYPE_BOT = "\n  UPDATE lt_users SET account_type = $1 WHERE id = $2";
export declare const GET_USER_BY_EXTERNAL_ID = "\n  SELECT id FROM lt_users WHERE external_id = $1";
export declare const GET_USER_WITH_ROLES_FLEXIBLE = "\n  SELECT u.id, u.external_id, u.display_name, u.status, u.metadata,\n         r.role, r.type AS role_type\n  FROM lt_users u\n  LEFT JOIN lt_user_roles r ON r.user_id = u.id\n  WHERE u.external_id = $1 OR u.id::text = $1\n  ORDER BY r.created_at";
