import type { components, paths } from '../generated/openapi.js'; import type { RequestOptions } from '../types.js'; import { BaseResource } from './base.js'; /** Conversation shape returned by list/get (contract §2.3), incl. `outbound_number`. */ export type Chat = components['schemas']['Chat']; export type ChatTypingStart = components['schemas']['ChatTypingStart']; export type ChatTypingStop = components['schemas']['ChatTypingStop']; export type ChatMarkRead = components['schemas']['ChatMarkRead']; export type ShareContactCardResult = components['schemas']['ShareContactCardResult']; export type ListChatsQuery = NonNullable; export type TypingStartBody = NonNullable['content']['application/json']; export type MarkReadBody = NonNullable['content']['application/json']; export type ShareContactCardBody = NonNullable['content']['application/json']; export declare class ChatsResource extends BaseResource { /** * `GET /v1/chats/{chat_id}` — fetch a single conversation by its * `chat_` id. Same shape as the list items, including * `outbound_number` for shared-plan lines (§2.3). Cross-account and * out-of-scope ids resolve 404. */ get(chatId: string, opts?: RequestOptions): Promise; /** * `GET /v1/chats` — cursor-paginated list of the caller's conversations, * newest activity first, as an AsyncIterable. The iterator threads * `next_cursor` across pages so the consumer can * `for await (const chat of client.chats.list({...}))` and get every * matching chat. Filter by `line_id`, bound the activity window with * `since` / `until` (ISO-8601, inclusive), and tune the page size with * `limit` (1–100). On shared-plan lines each chat carries * `outbound_number` — the physical number currently serving that * contact; `null` on non-shared lines or once the binding is released. */ list(filters?: Omit, opts?: RequestOptions): AsyncIterable; /** * `POST /v1/chats/{chat_id}/typing` — start an explicit typing indicator * on a chat. The dots stay visible until `typingStop` is called or a * message is sent (see contract §2.3 — explicit overrides * `use_typing_indicator`). */ typingStart(chatId: string, body: TypingStartBody, opts?: RequestOptions): Promise; /** `DELETE /v1/chats/{chat_id}/typing` — stop the explicit typing indicator. */ typingStop(chatId: string, opts?: RequestOptions): Promise; /** `POST /v1/chats/{chat_id}/read` — mark messages up to a given message as read. */ markRead(chatId: string, body: MarkReadBody, opts?: RequestOptions): Promise; /** * `POST /v1/chats/{chat_id}/share-contact-card` — share an Apple * contact-card vCard attachment with the recipient. */ shareContactCard(chatId: string, body: ShareContactCardBody, opts?: RequestOptions): Promise; } //# sourceMappingURL=chats.d.ts.map