from _typeshed import Incomplete
from collections.abc import Generator
from docassemble.base.config import daconfig as daconfig
from docassemble.base.functions import get_default_timezone as get_default_timezone, word as word
from docassemble.base.logger import logmessage as logmessage
from docassemble.webapp.app_socket import app as app, db as db, socketio as socketio
from docassemble.webapp.backend import encrypt_phrase as encrypt_phrase, fetch_user_dict as fetch_user_dict, fix_pickle_obj as fix_pickle_obj, get_chat_log as get_chat_log, get_session as get_session, nice_utc_date as nice_utc_date, pack_phrase as pack_phrase
from docassemble.webapp.daredis import redis_host as redis_host, redis_offset as redis_offset, redis_port as redis_port
from docassemble.webapp.users.models import ChatLog as ChatLog, UserModel as UserModel

store: Incomplete
kv_session: Incomplete
threads: Incomplete
secrets: Incomplete
Session: Incomplete

def session_scope() -> Generator[Incomplete, None, None]: ...
def obtain_lock(user_code, filename) -> None: ...
def release_lock(user_code, filename) -> None: ...
def background_thread(sid: Incomplete | None = ..., user_id: Incomplete | None = ..., temp_user_id: Incomplete | None = ...) -> None: ...
def interview_start_being_controlled(data) -> None: ...
def chat_log(data) -> None: ...
def handle_message(message) -> None: ...
def terminate_interview_connection() -> None: ...
def chat_message(data) -> None: ...
def wait_for_channel(the_rr, channel): ...
def on_interview_connect() -> None: ...
def on_interview_reconnect(data) -> None: ...
def interview_connect(yaml_filename) -> None: ...
def on_interview_manual_disconnect(data) -> None: ...
def on_interview_disconnect() -> None: ...
def get_current_info(yaml_filename, session_id, secret): ...
def get_dict(yaml_filename): ...
def get_dict_encrypt(yaml_filename): ...
def monitor_thread(sid: Incomplete | None = ..., user_id: Incomplete | None = ...) -> None: ...
def on_monitor_connect() -> None: ...
def on_monitor_disconnect() -> None: ...
def terminate_monitor_connection() -> None: ...
def monitor_block(data) -> None: ...
def monitor_unblock(data) -> None: ...
def decode_dict(the_dict): ...
def update_monitor(message) -> None: ...
def monitor_chat_message(data) -> None: ...
def monitor_chat_log(data) -> None: ...
def observer_thread(sid: Incomplete | None = ..., key: Incomplete | None = ...) -> None: ...
def on_observer_connect() -> None: ...
def on_observe(message) -> None: ...
def start_control(message) -> None: ...
def stop_control(message) -> None: ...
def observer_changes(message) -> None: ...
def on_observer_disconnect() -> None: ...
def terminate_observer_connection() -> None: ...
