import type { RecoveryAction } from './compatibility.js'; /** * Status vocabulary. The word "delivered" is intentionally absent: * Provider Acceptance is not evidence that a notification was displayed or * seen, and Companion Receipt is best-effort diagnostic evidence only. */ export declare const DELIVERY_STATES: readonly ["queued", "retry_scheduled", "provider_accepted", "provider_rejected", "outcome_unknown", "expired"]; export type DeliveryState = (typeof DELIVERY_STATES)[number]; /** States from which no further dispatch attempt may run. */ export declare const TERMINAL_DELIVERY_STATES: readonly DeliveryState[]; export declare const OVERALL_STATES: readonly ["pending", "provider_accepted_all", "provider_accepted_partial", "provider_rejected_all"]; export type OverallState = (typeof OVERALL_STATES)[number]; export declare const EVIDENCE_STAGES: readonly ["accepted", "queued", "attempt_started", "provider_accepted", "provider_rejected", "retry_scheduled", "outcome_unknown", "expired", "registration_invalidated", "companion_received", "reply_received"]; export type EvidenceStage = (typeof EVIDENCE_STAGES)[number]; /** * Whether the evidence trail contains a Companion Receipt for a Delivery. * `unknown` is deliberately not `failed`: receipt reporting is best-effort, * and elapsed time alone never turns absence into proof of non-receipt. */ export declare const COMPANION_RECEIPT_STATES: readonly ["observed", "unknown"]; export type CompanionReceiptState = (typeof COMPANION_RECEIPT_STATES)[number]; /** Summarize per-Delivery states into one overall request state. */ export declare function summarizeOverall(states: readonly DeliveryState[]): OverallState; export declare const ERROR_CODES: readonly ["auth_required", "no_active_plan", "machine_revoked", "no_active_devices", "feature_unavailable", "unknown_device", "unsupported_field", "payload_too_large", "invalid_request", "pairing_not_found", "pairing_expired", "pairing_already_used", "rate_limited", "usage_limit_reached", "billing_unavailable", "billing_pending", "idempotency_conflict", "invalid_signature", "not_found", "conflict", "reply_not_enabled", "reply_window_closed", "acknowledgement_text_required", "unknown_choice", "session_not_accepting_messages", "answer_not_editable", "answer_changed", "claim_refused", "internal_error"]; export type ErrorCode = (typeof ERROR_CODES)[number]; export interface ApiErrorBody { error: { code: ErrorCode; message: string; /** Legacy explanatory text for non-compatibility errors. Never executed. */ next_action?: string; /** Closed compatibility recovery rendered from local client knowledge. */ recovery_action?: RecoveryAction; details?: unknown; }; }