/** Conversation route, thread, transcript and config schemas. */ import { z } from 'zod'; /** The inbound door a route is bound to: the authed API, or a channel medium. */ export declare const conversationDoor: z.ZodEnum<{ channel: "channel"; api: "api"; }>; export type ConversationDoor = z.infer; /** What a route's turn runs: a registered agent, or a tool dispatch. */ export declare const conversationTargetKind: z.ZodEnum<{ tool: "tool"; agent: "agent"; }>; export type ConversationTargetKind = z.infer; /** * A route's default control mode (`initial_mode`) when a thread carries no * per-thread override: `agent` runs the target turn, `manual` suppresses it for an * operator to answer. The same value vocabulary as a per-thread mode override, but * a distinct concept (the route default vs. one thread's override). */ export declare const conversationMode: z.ZodEnum<{ agent: "agent"; manual: "manual"; }>; export type ConversationMode = z.infer; /** * Where a record sits between intake and a terminal outcome. `failed` is the one * the monitor surfaces loudly; `shed` and `silent` are terminal by design and * never send. `merged` and `superseded` are the overlap-policy outcomes: this * record's text was carried into (`merged`) or dropped in favour of (`superseded`) * a later turn, named by `successor_id`; both are terminal and never send. */ export declare const conversationDeliveryStatus: z.ZodEnum<{ failed: "failed"; accepted: "accepted"; pending_delivery: "pending_delivery"; provisional: "provisional"; delivered: "delivered"; shed: "shed"; silent: "silent"; merged: "merged"; superseded: "superseded"; }>; export type ConversationDeliveryStatus = z.infer; /** The nature of a turn's outcome, orthogonal to where its delivery stands. */ export declare const conversationAnswerStatus: z.ZodEnum<{ error: "error"; silent: "silent"; merged: "merged"; superseded: "superseded"; answered: "answered"; }>; export type ConversationAnswerStatus = z.infer; /** * Who authored a record's outgoing side. `client` is the ordinary turn the flow * answered; `operator` is a message a human sent into the thread, whose text * rides `answer` (its `inbound_text` is empty). */ export declare const conversationRecordOrigin: z.ZodEnum<{ client: "client"; operator: "operator"; }>; export type ConversationRecordOrigin = z.infer; export declare const conversationRoutes: z.ZodObject<{ items: z.ZodArray>; callback_url: z.ZodDefault>; cancel_expr: z.ZodDefault; id: z.ZodOptional; kwargs: z.ZodOptional>; }, z.core.$strict>, z.ZodNull]>>; channel: z.ZodDefault>; door: z.ZodEnum<{ channel: "channel"; api: "api"; }>; error_reply_text: z.ZodDefault>; execution_key: z.ZodString; execution_key_fingerprint: z.ZodString; extras_expr: z.ZodDefault; id: z.ZodOptional; kwargs: z.ZodOptional>; }, z.core.$strict>, z.ZodNull]>>; initial_mode: z.ZodDefault>; locale: z.ZodDefault>; our_identity: z.ZodDefault>; overlap: z.ZodDefault>; running: z.ZodDefault>; settle_seconds: z.ZodDefault; }, z.core.$strip>>; reply_expr: z.ZodDefault; id: z.ZodOptional; kwargs: z.ZodOptional>; }, z.core.$strict>, z.ZodNull]>>; resume_expr: z.ZodDefault; id: z.ZodOptional; kwargs: z.ZodOptional>; }, z.core.$strict>, z.ZodNull]>>; route_name: z.ZodString; start_expr: z.ZodDefault; id: z.ZodOptional; kwargs: z.ZodOptional>; }, z.core.$strict>, z.ZodNull]>>; target_kind: z.ZodEnum<{ tool: "tool"; agent: "agent"; }>; target_name: z.ZodString; turns_per_hour_override: z.ZodDefault>; }, z.core.$strip>>; total: z.ZodNumber; }, z.core.$strip>; export type ConversationRoutes = z.infer; /** * The create/replace reply: whether THIS call created the row (vs. replaced an * existing one), the row itself (its `callback_secret` withheld), and the * `callback_secret` returned ONCE for an `api`-door row (`null` for a `channel` * row). The secret signs delivery callbacks and is never re-read from any door, so * a caller that needs it must capture it from this reply. */ export declare const conversationRouteWritten: z.ZodObject<{ created: z.ZodBoolean; route_name: z.ZodString; route: z.ZodObject<{ callback_secret: z.ZodDefault>; callback_url: z.ZodDefault>; cancel_expr: z.ZodDefault; id: z.ZodOptional; kwargs: z.ZodOptional>; }, z.core.$strict>, z.ZodNull]>>; channel: z.ZodDefault>; door: z.ZodEnum<{ channel: "channel"; api: "api"; }>; error_reply_text: z.ZodDefault>; execution_key: z.ZodString; execution_key_fingerprint: z.ZodString; extras_expr: z.ZodDefault; id: z.ZodOptional; kwargs: z.ZodOptional>; }, z.core.$strict>, z.ZodNull]>>; initial_mode: z.ZodDefault>; locale: z.ZodDefault>; our_identity: z.ZodDefault>; overlap: z.ZodDefault>; running: z.ZodDefault>; settle_seconds: z.ZodDefault; }, z.core.$strip>>; reply_expr: z.ZodDefault; id: z.ZodOptional; kwargs: z.ZodOptional>; }, z.core.$strict>, z.ZodNull]>>; resume_expr: z.ZodDefault; id: z.ZodOptional; kwargs: z.ZodOptional>; }, z.core.$strict>, z.ZodNull]>>; route_name: z.ZodString; start_expr: z.ZodDefault; id: z.ZodOptional; kwargs: z.ZodOptional>; }, z.core.$strict>, z.ZodNull]>>; target_kind: z.ZodEnum<{ tool: "tool"; agent: "agent"; }>; target_name: z.ZodString; turns_per_hour_override: z.ZodDefault>; }, z.core.$strip>; callback_secret: z.ZodNullable; }, z.core.$strip>; export type ConversationRouteWritten = z.infer; /** * The delete reply: `removed` says whether THIS call removed the routing row (a * retryable reclamation of orphaned thread indexes answers `false` rather than a * 404). */ export declare const conversationRouteDeleted: z.ZodObject<{ removed: z.ZodBoolean; route_name: z.ZodString; }, z.core.$strip>; export type ConversationRouteDeleted = z.infer; /** * One thread of a route, summarized from its newest record. A `thread_id` holds * an api-door address (`{principal}/{end user}`, percent-encoded), so it never * goes back into a URL as a path segment — the transcript door takes it as a * query value. */ export declare const conversationThread: z.ZodObject<{ thread_id: z.ZodString; client_address: z.ZodString; last_activity_at: z.ZodNumber; message_count: z.ZodNumber; last_delivery_status: z.ZodEnum<{ failed: "failed"; accepted: "accepted"; pending_delivery: "pending_delivery"; provisional: "provisional"; delivered: "delivered"; shed: "shed"; silent: "silent"; merged: "merged"; superseded: "superseded"; }>; }, z.core.$strip>; export type ConversationThread = z.infer; export declare const conversationThreadsPage: z.ZodObject<{ total: z.ZodNumber; page: z.ZodNumber; page_size: z.ZodNumber; next_page: z.ZodNullable; truncated: z.ZodBoolean; items: z.ZodArray; }, z.core.$strip>>; }, z.core.$strip>; export type ConversationThreadsPage = z.infer; /** * One exchange: the visitor's `inbound_text` — every record answers a message, so * both projections always carry it — and the agent's `answer`, plus where that * answer's delivery stands. `successor_id` names the later turn a `merged` or * `superseded` record was folded into, `null` on every other outcome. The fields * after `updated_at` are ADMIN ONLY — the same door serves a caller-scoped * projection that withholds them — so they are optional here and absence means * "not published to this reader". */ export declare const conversationMessage: z.ZodObject<{ message_id: z.ZodString; route_name: z.ZodString; door: z.ZodEnum<{ channel: "channel"; api: "api"; }>; thread_id: z.ZodString; client_address: z.ZodString; caller_principal: z.ZodNullable; inbound_text: z.ZodString; answer_status: z.ZodNullable>; answer: z.ZodNullable; successor_id: z.ZodNullable; origin: z.ZodEnum<{ client: "client"; operator: "operator"; }>; delivery_status: z.ZodEnum<{ failed: "failed"; accepted: "accepted"; pending_delivery: "pending_delivery"; provisional: "provisional"; delivered: "delivered"; shed: "shed"; silent: "silent"; merged: "merged"; superseded: "superseded"; }>; created_at: z.ZodNumber; updated_at: z.ZodNumber; channel: z.ZodOptional>; our_identity: z.ZodOptional>; provider_message_id: z.ZodOptional>; callback_url: z.ZodOptional>; error: z.ZodOptional>; outbound_message_ids: z.ZodOptional>; attempts: z.ZodOptional; }, z.core.$strip>; export type ConversationMessage = z.infer; /** * The direction a transcript page reads in. `asc` is the reading order (oldest * first); `desc` is the live-tail order, where page 1 is always the newest page * and paging forward walks BACKWARDS through the thread's history. */ export declare const transcriptOrder: z.ZodEnum<{ asc: "asc"; desc: "desc"; }>; export type TranscriptOrder = z.infer; /** A transcript page, echoing the order it was read in. */ export declare const conversationTranscriptPage: z.ZodObject<{ order: z.ZodEnum<{ asc: "asc"; desc: "desc"; }>; total: z.ZodNumber; page: z.ZodNumber; page_size: z.ZodNumber; next_page: z.ZodNullable; truncated: z.ZodBoolean; items: z.ZodArray; thread_id: z.ZodString; client_address: z.ZodString; caller_principal: z.ZodNullable; inbound_text: z.ZodString; answer_status: z.ZodNullable>; answer: z.ZodNullable; successor_id: z.ZodNullable; origin: z.ZodEnum<{ client: "client"; operator: "operator"; }>; delivery_status: z.ZodEnum<{ failed: "failed"; accepted: "accepted"; pending_delivery: "pending_delivery"; provisional: "provisional"; delivered: "delivered"; shed: "shed"; silent: "silent"; merged: "merged"; superseded: "superseded"; }>; created_at: z.ZodNumber; updated_at: z.ZodNumber; channel: z.ZodOptional>; our_identity: z.ZodOptional>; provider_message_id: z.ZodOptional>; callback_url: z.ZodOptional>; error: z.ZodOptional>; outbound_message_ids: z.ZodOptional>; attempts: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>; export type ConversationTranscriptPage = z.infer; /** * A route-scoped message search (`GET /api/conversations/{route}/messages/search?q`): * every record on the route whose text matches `q`, across threads, newest first. * The record shape is the transcript's exactly, so a hit renders with the same * projection. `truncated` says the match set outran the door's scan cap — surfaced * loudly, never a silent cut. */ export declare const conversationMessageSearchPage: z.ZodObject<{ total: z.ZodNumber; page: z.ZodNumber; page_size: z.ZodNumber; next_page: z.ZodNullable; truncated: z.ZodBoolean; items: z.ZodArray; thread_id: z.ZodString; client_address: z.ZodString; caller_principal: z.ZodNullable; inbound_text: z.ZodString; answer_status: z.ZodNullable>; answer: z.ZodNullable; successor_id: z.ZodNullable; origin: z.ZodEnum<{ client: "client"; operator: "operator"; }>; delivery_status: z.ZodEnum<{ failed: "failed"; accepted: "accepted"; pending_delivery: "pending_delivery"; provisional: "provisional"; delivered: "delivered"; shed: "shed"; silent: "silent"; merged: "merged"; superseded: "superseded"; }>; created_at: z.ZodNumber; updated_at: z.ZodNumber; channel: z.ZodOptional>; our_identity: z.ZodOptional>; provider_message_id: z.ZodOptional>; callback_url: z.ZodOptional>; error: z.ZodOptional>; outbound_message_ids: z.ZodOptional>; attempts: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>; export type ConversationMessageSearchPage = z.infer; /** * Who answers a thread's incoming messages: `agent` lets the flow reply on its * own; `manual` holds the flow back so a human answers. `source` says whether the * setting is the thread's own (`thread`) or inherited from its route (`route`). */ export declare const conversationThreadMode: z.ZodEnum<{ agent: "agent"; manual: "manual"; }>; export type ConversationThreadMode = z.infer; export declare const conversationThreadModeState: z.ZodObject<{ mode: z.ZodEnum<{ agent: "agent"; manual: "manual"; }>; source: z.ZodEnum<{ route: "route"; thread: "thread"; }>; }, z.core.$strip>; export type ConversationThreadModeState = z.infer; /** The receipt a thread-message write returns: the stored id and its thread. */ export declare const conversationThreadMessageSent: z.ZodObject<{ message_id: z.ZodString; thread_id: z.ZodString; }, z.core.$strip>; export type ConversationThreadMessageSent = z.infer; /** Every stored per-target config (`GET /api/conversation-configs`). */ export declare const conversationConfigs: z.ZodObject<{ items: z.ZodArray>; multichannel: z.ZodDefault; state_binding: z.ZodDefault; id: z.ZodOptional; kwargs: z.ZodOptional>; }, z.core.$strict>, z.ZodNull]>>; template_jq: z.ZodDefault>; }, z.core.$strict>>>; scope_expr: z.ZodDefault; id: z.ZodOptional; kwargs: z.ZodOptional>; }, z.core.$strict>, z.ZodNull]>>; state: z.ZodString; subject_expr: z.ZodObject<{ content: z.ZodOptional; id: z.ZodOptional; kwargs: z.ZodOptional>; }, z.core.$strict>; templates: z.ZodDefault>; updates: z.ZodDefault; id: z.ZodOptional; kwargs: z.ZodOptional>; }, z.core.$strict>, z.ZodNull]>>; jq: z.ZodDefault; id: z.ZodOptional; kwargs: z.ZodOptional>; }, z.core.$strict>, z.ZodNull]>>; op_id: z.ZodDefault; id: z.ZodOptional; kwargs: z.ZodOptional>; }, z.core.$strict>, z.ZodNull]>>; template_jq: z.ZodDefault>; }, z.core.$strict>>>; }, z.core.$strict>>; }, z.core.$strict>, z.ZodNull]>>; target_kind: z.ZodEnum<{ tool: "tool"; agent: "agent"; }>; target_name: z.ZodString; }, z.core.$strip>>; total: z.ZodNumber; }, z.core.$strip>; export type ConversationConfigs = z.infer; /** * The upsert reply: whether THIS call created the config (vs. replaced an existing * one), its key, and the stored row. */ export declare const conversationConfigWritten: z.ZodObject<{ created: z.ZodBoolean; target_kind: z.ZodEnum<{ tool: "tool"; agent: "agent"; }>; target_name: z.ZodString; config: z.ZodObject<{ greeting_template: z.ZodDefault>; multichannel: z.ZodDefault; state_binding: z.ZodDefault; id: z.ZodOptional; kwargs: z.ZodOptional>; }, z.core.$strict>, z.ZodNull]>>; template_jq: z.ZodDefault>; }, z.core.$strict>>>; scope_expr: z.ZodDefault; id: z.ZodOptional; kwargs: z.ZodOptional>; }, z.core.$strict>, z.ZodNull]>>; state: z.ZodString; subject_expr: z.ZodObject<{ content: z.ZodOptional; id: z.ZodOptional; kwargs: z.ZodOptional>; }, z.core.$strict>; templates: z.ZodDefault>; updates: z.ZodDefault; id: z.ZodOptional; kwargs: z.ZodOptional>; }, z.core.$strict>, z.ZodNull]>>; jq: z.ZodDefault; id: z.ZodOptional; kwargs: z.ZodOptional>; }, z.core.$strict>, z.ZodNull]>>; op_id: z.ZodDefault; id: z.ZodOptional; kwargs: z.ZodOptional>; }, z.core.$strict>, z.ZodNull]>>; template_jq: z.ZodDefault>; }, z.core.$strict>>>; }, z.core.$strict>>; }, z.core.$strict>, z.ZodNull]>>; target_kind: z.ZodEnum<{ tool: "tool"; agent: "agent"; }>; target_name: z.ZodString; }, z.core.$strip>; }, z.core.$strip>; export type ConversationConfigWritten = z.infer; /** The config-delete reply: `removed` is always `true` on success (an unknown key is a 404). */ export declare const conversationConfigDeleted: z.ZodObject<{ removed: z.ZodBoolean; target_kind: z.ZodEnum<{ tool: "tool"; agent: "agent"; }>; target_name: z.ZodString; }, z.core.$strip>; export type ConversationConfigDeleted = z.infer; /** * The admin-only failed-delivery listing (`GET /api/conversations/messages/failed`): * every answer record whose delivery ended `failed`, across every route and caller. * The records are the ADMIN projection (delivery bookkeeping and `error` included), * so the row shape is {@link conversationMessage} exactly. It is NOT a paged window — * the door returns `{items, total}` and nothing more. */ export declare const conversationFailedMessages: z.ZodObject<{ items: z.ZodArray; thread_id: z.ZodString; client_address: z.ZodString; caller_principal: z.ZodNullable; inbound_text: z.ZodString; answer_status: z.ZodNullable>; answer: z.ZodNullable; successor_id: z.ZodNullable; origin: z.ZodEnum<{ client: "client"; operator: "operator"; }>; delivery_status: z.ZodEnum<{ failed: "failed"; accepted: "accepted"; pending_delivery: "pending_delivery"; provisional: "provisional"; delivered: "delivered"; shed: "shed"; silent: "silent"; merged: "merged"; superseded: "superseded"; }>; created_at: z.ZodNumber; updated_at: z.ZodNumber; channel: z.ZodOptional>; our_identity: z.ZodOptional>; provider_message_id: z.ZodOptional>; callback_url: z.ZodOptional>; error: z.ZodOptional>; outbound_message_ids: z.ZodOptional>; attempts: z.ZodOptional; }, z.core.$strip>>; total: z.ZodNumber; }, z.core.$strip>; export type ConversationFailedMessages = z.infer; /** * The thread-delete reply (`DELETE /api/conversations/{route_name}/thread?thread_id=`). * `removed` is a COUNT of the answer records this call deleted — `0` when a prior * run already cleared them, when they had aged out under retention, or when the id * was never stored (forgetting is absolute, never a 404 on a valid id). */ export declare const conversationThreadDeleted: z.ZodObject<{ removed: z.ZodNumber; route_name: z.ZodString; thread_id: z.ZodString; }, z.core.$strip>; export type ConversationThreadDeleted = z.infer; /** * The person-erase reply (`DELETE /api/conversations/persons/{person_id}`). * `removed` counts the answer records deleted across the person's routes; `erased` * says whether THIS call removed the person row (`false` on a retry or an * already-gone person — never a 404). */ export declare const conversationPersonDeleted: z.ZodObject<{ person_id: z.ZodString; removed: z.ZodNumber; erased: z.ZodBoolean; }, z.core.$strip>; export type ConversationPersonDeleted = z.infer; //# sourceMappingURL=conversations.d.ts.map