pub mod tts;
pub mod voice;
pub mod spotify;
pub mod sonos;
pub mod shazam;
pub mod webhooks;
pub mod cron;
pub mod zapier;
pub mod n8n;
pub mod gmail;
pub mod calls;
pub mod notion;
pub mod obsidian;
pub mod github;
pub mod trello;
pub mod things;
pub mod apple;
pub mod bear;
pub mod camera;
pub mod screen;
pub mod gif;
pub mod weather;
pub mod twitter;
pub mod onepassword;
pub mod smarthome;
pub use tts::{TtsConfig, TtsClient, Voice};
pub use voice::{VoiceWakeConfig, VoiceWakeClient, WakeWordDetection};
pub use spotify::{SpotifyClient, SpotifyConfig, Track, PlaybackState};
pub use sonos::{SonosClient, SonosConfig, SonosDevice};
pub use shazam::{ShazamClient, ShazamConfig, SongMatch};
pub use webhooks::{WebhookClient, WebhookConfig, WebhookEndpoint};
pub use cron::{CronClient, CronConfig, CronJob};
pub use zapier::{ZapierClient, ZapierConfig};
pub use n8n::{N8nClient, N8nConfig, Workflow};
pub use gmail::{GmailClient, GmailConfig, Email};
pub use calls::{CallClient, CallConfig, CallStatus};
pub use notion::{NotionClient, NotionConfig, Page as NotionPage};
pub use obsidian::{ObsidianClient, ObsidianConfig, Note as ObsidianNote};
pub use github::{GitHubClient, GitHubConfig, Issue as GitHubIssue};
pub use trello::{TrelloClient, TrelloConfig, Card as TrelloCard};
pub use things::{ThingsClient, ThingsConfig, Task as ThingsTask};
pub use apple::{AppleClient, AppleConfig};
pub use bear::{BearClient, BearConfig, Note as BearNote};
pub use camera::{CameraClient, CameraConfig, CapturedPhoto};
pub use screen::{ScreenClient, ScreenConfig, Screenshot};
pub use gif::{GifClient, GifConfig, Gif};
pub use weather::{WeatherClient, WeatherConfig, CurrentWeather};
pub use twitter::{TwitterClient, TwitterConfig, Tweet};
pub use onepassword::{OnePasswordClient, OnePasswordConfig, Item as OnePasswordItem};
pub use smarthome::{SmartHomeClient, SmartHomeConfig, Device as SmartHomeDevice};
use crate::error::Result;
use serde::{Deserialize, Serialize};
use std::path::PathBuf;
#[async_trait::async_trait]
pub trait Integration: Send + Sync {
fn name(&self) -> &'static str;
fn is_configured(&self) -> bool;
async fn initialize(&mut self) -> Result<()>;
async fn shutdown(&mut self) -> Result<()>;
fn config_path(&self) -> PathBuf;
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
pub enum IntegrationHealth {
Healthy,
Degraded,
Unhealthy,
Unknown,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct IntegrationCapabilities {
pub network: bool,
pub filesystem: bool,
pub audio: bool,
pub camera: bool,
pub screen: bool,
pub location: bool,
}
impl IntegrationCapabilities {
pub const fn all() -> Self {
Self {
network: true,
filesystem: true,
audio: true,
camera: true,
screen: true,
location: true,
}
}
pub const fn network_only() -> Self {
Self {
network: true,
filesystem: false,
audio: false,
camera: false,
screen: false,
location: false,
}
}
}