/** * v2 `PATCH …/session/` success body: stored slice only (not full BotonicSessionBuilder JSON). * @see openspec/specs/BE-botonic-v2-botonic-session-endpoints/spec.md */ import type { BotonicSession, BotonicSessionUser, UserExtraData } from '@botonic/shared'; import { WebchatClientSettings } from '@botonic/shared'; export interface BotonicSessionPatchSlice { shadowing?: boolean; flow_thread_id?: string; is_first_interaction?: boolean; custom?: Record; webviews_custom?: Record; webchat_client_settings?: WebchatClientSettings; /** Flow Builder capture node id (`null` clears). */ capture_user_input_node_id?: string | null; } /** * Mutates `session` with fields from the PATCH session response (slice), deep-merging object fields * to mirror server `deep_merge` behavior for nested dicts. */ export declare function mergeBotonicSessionPatchSlice(session: BotonicSession, slice: BotonicSessionPatchSlice): void; /** `PATCH …/users//` 200 body (echo slice). */ export interface ChatUserPatchResponse { override_name?: string; locale?: string; country?: string; system_locale?: string; extra_data?: UserExtraData; } export declare function mergeChatUserPatchResponseIntoSessionUser(user: BotonicSessionUser, response: ChatUserPatchResponse): void;