import type { ErrorInfo, ServerEvent } from '@optima-chat/gateway-protocol'; import type { ChatStore } from '../store/chat-store.js'; import type { ChatProviderProps } from '../types.js'; import type { StoreApi } from 'zustand/vanilla'; /** * Detect server `error` events meaning "the access token the SDK presented * has been rejected" — canonical `AUTH_TOKEN_INVALID` code, casing variants, * or a legacy server with no code but a recognizable message. Used by the * ChatProvider event handler to trigger Layer A token recovery (#54). */ export declare function isAuthExpiredSignal(error: ErrorInfo): boolean; /** * — wires GatewayClient + ConversationAPI + Store together, * parses incoming ServerEvents into store mutations, and forwards selected * events to the consumer-supplied callbacks. */ export declare function ChatProvider(props: ChatProviderProps): React.ReactElement; /** * Core event dispatch: parse → apply store mutations → forward to callbacks. * Exposed as a pure function so it can be unit-tested. */ export declare function handleServerEvent(event: ServerEvent, store: StoreApi, props: ChatProviderProps): void; //# sourceMappingURL=chat-provider.d.ts.map