pub async fn initialize_user_state_doc( state: &AppState, user_id: &str, user_state: &UserState, ) -> Result<DocumentId, AppError>
Initializes a user state document.