HookAction

Enum HookAction 

Source
pub enum HookAction {
Show 38 variants CreateCalendarEvent { calendar_id: String, title: String, start: String, end: String, description: Option<String>, attendees: Option<Vec<String>>, location: Option<String>, }, SendEmail { account: String, to: Vec<String>, subject: String, body: String, attachments: Option<Vec<String>>, }, CreateNote { app: String, title: String, content: String, folder: Option<String>, tags: Option<Vec<String>>, }, CreateTask { app: String, title: String, description: Option<String>, due_date: Option<String>, priority: Option<u8>, project: Option<String>, }, SlackMessage { channel: String, text: String, thread_ts: Option<String>, }, DiscordMessage { channel_id: String, content: String, }, TeamsMessage { channel: String, content: String, }, TelegramMessage { chat_id: String, text: String, }, SendSms { to: String, message: String, }, Notification { title: String, body: String, sound: Option<String>, actions: Option<Vec<String>>, }, OpenUrl { url: String, browser: Option<String>, }, BrowserAutomation { script: String, headless: bool, }, ScrapeWebpage { url: String, selectors: HashMap<String, String>, }, FillForm { url: String, fields: HashMap<String, String>, submit: bool, }, RunCommand { command: String, args: Vec<String>, cwd: Option<String>, env: Option<HashMap<String, String>>, }, GitOperation { repo: String, operation: String, args: HashMap<String, String>, }, CreateGitHubIssue { repo: String, title: String, body: String, labels: Option<Vec<String>>, }, DockerCommand { command: String, container: Option<String>, args: Vec<String>, }, ControlDevice { device_id: String, action: String, parameters: Option<HashMap<String, Value>>, }, SetScene { scene_id: String, }, HomeAssistantService { domain: String, service: String, data: Option<Value>, }, CopyFile { source: String, destination: String, }, MoveFile { source: String, destination: String, }, CreateFile { path: String, content: String, }, DeleteFile { path: String, }, SyncFolder { source: String, destination: String, delete_extra: bool, }, HttpRequest { method: String, url: String, headers: Option<HashMap<String, String>>, body: Option<String>, }, StoreData { key: String, value: Value, ttl_seconds: Option<u64>, }, QueryDatabase { connection: String, query: String, params: Option<Vec<Value>>, }, RunAgent { agent_name: String, input: String, context: Option<HashMap<String, Value>>, }, Summarize { content: String, max_length: Option<u32>, }, Classify { content: String, categories: Vec<String>, }, ExtractData { content: String, schema: Value, }, ChainHook { hook_id: String, data: Option<Value>, }, Conditional { condition: String, if_true: Box<HookAction>, if_false: Option<Box<HookAction>>, }, Parallel { actions: Vec<HookAction>, }, Delay { seconds: u64, }, Log { level: String, message: String, },
}
Expand description

Action to execute when hook triggers

Variants§

§

CreateCalendarEvent

Create calendar event

Fields

§calendar_id: String
§title: String
§start: String
§description: Option<String>
§attendees: Option<Vec<String>>
§location: Option<String>
§

SendEmail

Send email

Fields

§account: String
§subject: String
§body: String
§attachments: Option<Vec<String>>
§

CreateNote

Create note

Fields

§title: String
§content: String
§folder: Option<String>
§

CreateTask

Create task

Fields

§title: String
§description: Option<String>
§due_date: Option<String>
§priority: Option<u8>
§project: Option<String>
§

SlackMessage

Send Slack message

Fields

§channel: String
§text: String
§thread_ts: Option<String>
§

DiscordMessage

Send Discord message

Fields

§channel_id: String
§content: String
§

TeamsMessage

Send Teams message

Fields

§channel: String
§content: String
§

TelegramMessage

Send Telegram message

Fields

§chat_id: String
§text: String
§

SendSms

Send SMS

Fields

§message: String
§

Notification

Send notification

Fields

§title: String
§body: String
§actions: Option<Vec<String>>
§

OpenUrl

Open URL

Fields

§browser: Option<String>
§

BrowserAutomation

Run browser automation

Fields

§script: String
§headless: bool
§

ScrapeWebpage

Scrape webpage

Fields

§selectors: HashMap<String, String>
§

FillForm

Fill form

Fields

§submit: bool
§

RunCommand

Run shell command

Fields

§command: String
§args: Vec<String>
§

GitOperation

Git operation

Fields

§repo: String
§operation: String
§

CreateGitHubIssue

Create GitHub issue

Fields

§repo: String
§title: String
§body: String
§labels: Option<Vec<String>>
§

DockerCommand

Run Docker command

Fields

§command: String
§container: Option<String>
§args: Vec<String>
§

ControlDevice

Control device

Fields

§device_id: String
§action: String
§parameters: Option<HashMap<String, Value>>
§

SetScene

Set scene

Fields

§scene_id: String
§

HomeAssistantService

Home Assistant service call

Fields

§domain: String
§service: String
§

CopyFile

Copy file

Fields

§source: String
§destination: String
§

MoveFile

Move file

Fields

§source: String
§destination: String
§

CreateFile

Create file

Fields

§path: String
§content: String
§

DeleteFile

Delete file

Fields

§path: String
§

SyncFolder

Sync folder

Fields

§source: String
§destination: String
§delete_extra: bool
§

HttpRequest

HTTP request

Fields

§method: String
§

StoreData

Store data

Fields

§value: Value
§ttl_seconds: Option<u64>
§

QueryDatabase

Query database

Fields

§connection: String
§query: String
§params: Option<Vec<Value>>
§

RunAgent

Run agent

Fields

§agent_name: String
§input: String
§

Summarize

Summarize content

Fields

§content: String
§max_length: Option<u32>
§

Classify

Classify content

Fields

§content: String
§categories: Vec<String>
§

ExtractData

Extract data

Fields

§content: String
§schema: Value
§

ChainHook

Chain to another hook

Fields

§hook_id: String
§

Conditional

Conditional branch

Fields

§condition: String
§if_true: Box<HookAction>
§if_false: Option<Box<HookAction>>
§

Parallel

Parallel execution

Fields

§actions: Vec<HookAction>
§

Delay

Delay

Fields

§seconds: u64
§

Log

Log message

Fields

§level: String
§message: String

Trait Implementations§

Source§

impl Clone for HookAction

Source§

fn clone(&self) -> HookAction

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for HookAction

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for HookAction

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for HookAction

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,