pub struct Api { /* private fields */ }Implementations§
Source§impl Api
impl Api
pub fn new(config: &Config, services: LocalServices) -> Self
pub async fn telegram_user_lock(&self, telegram_user_id: i64) -> Arc<Mutex<()>>
pub fn kmap_node(&self, node_id: &str) -> Result<Node, ApiError>
pub fn user_root_node_id(&self) -> &str
pub fn kennedy_root_node_id(&self) -> &str
pub fn cancel_intelligence(&self, operation_id: Uuid) -> Result<bool, ApiError>
pub fn history_health(&self) -> Result<(), ApiError>
pub async fn history_list(&self) -> Result<Vec<SessionRecord>, ApiError>
pub async fn history_get_session( &self, id: &str, ) -> Result<SessionRecord, ApiError>
pub async fn history_register( &self, input: RegisterSession, ) -> Result<SessionRecord, ApiError>
pub async fn history_command_heads( &self, ) -> Result<Vec<SessionCommand>, ApiError>
pub async fn history_claim_command( &self, id: &str, ) -> Result<SessionCommand, ApiError>
pub async fn history_complete_command( &self, id: &str, outcome: Value, ) -> Result<SessionCommand, ApiError>
pub fn history_listen_for_stop( &self, id: &str, ) -> Result<StopListener, ApiError>
pub async fn history_stop_heads( &self, ) -> Result<Vec<SessionStopRequest>, ApiError>
pub async fn history_complete_stop( &self, id: &str, outcome: Value, ) -> Result<SessionStopRequest, ApiError>
pub async fn history_checkpoint( &self, id: &str, input: Checkpoint, ) -> Result<SessionRecord, ApiError>
pub async fn history_request_ingress( &self, id: &str, input: Checkpoint, ) -> Result<SessionRecord, ApiError>
pub async fn history_start_ingress( &self, id: &str, input: StartIngress, ) -> Result<SessionRecord, ApiError>
pub async fn history_complete_ingress( &self, id: &str, expected_version: i64, ) -> Result<SessionRecord, ApiError>
pub async fn history_fail_ingress( &self, id: &str, input: IngressFailure, ) -> Result<SessionRecord, ApiError>
pub async fn history_complete( &self, id: &str, input: Checkpoint, ) -> Result<SessionRecord, ApiError>
pub async fn history_release_interrupted_ingress( &self, ) -> Result<Vec<String>, ApiError>
pub fn directory_user(&self, telegram_user_id: i64) -> Result<User, ApiError>
pub fn directory_group(&self, group_id: &str) -> Result<Group, ApiError>
pub async fn release_managed_sources(&self, session_id: &str)
pub fn telegram_health(&self)
pub async fn telegram_private_sessions( &self, ) -> Result<Vec<PrivateSession>, ApiError>
pub async fn telegram_events(&self) -> Result<Value, ApiError>
pub async fn telegram_group_ingress(&self) -> Result<Value, ApiError>
pub async fn telegram_complete_group_ingress( &self, batch_id: &str, ) -> Result<Value, ApiError>
pub async fn telegram_group_session_updates(&self) -> Result<Value, ApiError>
pub async fn telegram_complete_silent_group_reset( &self, conversation_id: &str, ) -> Result<Value, ApiError>
pub async fn telegram_acknowledge_group_context( &self, conversation_id: &str, through_message_id: i64, ) -> Result<Value, ApiError>
pub async fn telegram_detach_group_session( &self, conversation_id: &str, group_id: &str, telegram_user_id: i64, ) -> Result<Value, ApiError>
pub async fn telegram_save_group_message_preparation( &self, chat_id: i64, message_id: i64, text: &str, model: Option<&str>, format: Option<&str>, truncated: bool, ) -> Result<Value, ApiError>
pub async fn telegram_bind_event( &self, event_id: &str, conversation_id: &str, expected_conversation_id: Option<&str>, ) -> Result<Value, ApiError>
pub async fn telegram_reply_event( &self, event_id: &str, conversation_id: &str, text: &str, context_warning: Option<&str>, ) -> Result<Value, ApiError>
pub async fn telegram_abort_event( &self, event_id: &str, conversation_id: Option<&str>, message: &str, ) -> Result<Value, ApiError>
pub async fn telegram_interrupt_event( &self, event_id: &str, conversation_id: &str, ) -> Result<Value, ApiError>
pub async fn telegram_complete_reset( &self, event_id: &str, message: Option<&str>, ) -> Result<Value, ApiError>
pub fn telegram_event_media( &self, event_id: &str, ) -> Result<(Vec<u8>, String), ApiError>
pub fn telegram_group_message_media( &self, chat_id: i64, message_id: i64, ) -> Result<(Vec<u8>, String), ApiError>
pub fn telegram_group_message_media_metadata( &self, chat_id: i64, message_id: i64, ) -> Result<(u64, String), ApiError>
pub async fn telegram_send_object( &self, event_id: &str, conversation_id: &str, file: &ResolvedObject, caption: Option<&str>, complete: bool, ) -> Result<Value, ApiError>
pub async fn extract_document( &self, bytes: Vec<u8>, filename: String, mime: &str, ) -> Result<DocumentExtraction, ApiError>
pub async fn synchronize_audio_ingress(&self) -> Result<(), ApiError>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Api
impl !UnwindSafe for Api
impl Freeze for Api
impl Send for Api
impl Sync for Api
impl Unpin for Api
impl UnsafeUnpin for Api
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Erasable for T
impl<T> Erasable for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more