* refactor: extract windmill-api into 4 subcrates (api-auth, store, api-sse, api-jobs) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * refactor: eliminate refresh_token OnceLock bridge in windmill-store Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * refactor: eliminate FromRequestParts OnceLock bridge in windmill-api-auth Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * refactor: wire subcrates into workspace and clean up unused re-exports Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: resolve cargo check --all-features errors in subcrate wiring Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * sqlx * all * chore: update ee-repo-ref for warning fixes Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * refactor: extract windmill-trigger crate and expand windmill-api-jobs Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * refactor: extract windmill-trigger-kafka crate from windmill-api Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * refactor: extract windmill-trigger-postgres crate from windmill-api Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * refactor: extract windmill-trigger-websocket and windmill-trigger-mqtt crates Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * refactor: extract windmill-trigger-nats, sqs, gcp, and email crates Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * refactor: extract windmill-trigger-http crate from windmill-api Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * refactor: move token creation and permission helpers to windmill-api-auth Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * refactor: extract windmill-native-triggers crate from windmill-api Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * sqlx * all * refactor: extract windmill-api-embeddings crate and fix CI warnings Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: resolve type mismatch in oauth2_oss and remaining warnings Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: use correct HTTP_CLIENT config in embeddings crate (30s timeout, cert override) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * all * fix: gate oauth_refresh_ee on oauth2 feature to fix warnings Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * all --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
69 lines
1.8 KiB
Rust
69 lines
1.8 KiB
Rust
#[cfg(not(feature = "private"))]
|
|
use windmill_trigger::TriggerData;
|
|
|
|
#[allow(unused)]
|
|
#[cfg(feature = "private")]
|
|
pub use super::handler_ee::*;
|
|
|
|
#[cfg(not(feature = "private"))]
|
|
use {
|
|
super::EmailTrigger,
|
|
axum::async_trait,
|
|
sqlx::PgConnection,
|
|
windmill_api_auth::ApiAuthed,
|
|
windmill_common::{
|
|
db::DB,
|
|
error::{Error, Result},
|
|
},
|
|
windmill_git_sync::DeployedObject,
|
|
windmill_trigger::TriggerCrud,
|
|
};
|
|
|
|
#[cfg(not(feature = "private"))]
|
|
#[async_trait]
|
|
impl TriggerCrud for EmailTrigger {
|
|
type Trigger = ();
|
|
type TriggerConfig = ();
|
|
type TriggerConfigRequest = ();
|
|
type TestConnectionConfig = ();
|
|
|
|
const TABLE_NAME: &'static str = "";
|
|
const TRIGGER_TYPE: &'static str = "";
|
|
const SUPPORTS_SERVER_STATE: bool = false;
|
|
const SUPPORTS_TEST_CONNECTION: bool = false;
|
|
const ROUTE_PREFIX: &'static str = "/email_triggers";
|
|
const DEPLOYMENT_NAME: &'static str = "";
|
|
const IS_ALLOWED_ON_CLOUD: bool = false;
|
|
|
|
fn get_deployed_object(path: String) -> DeployedObject {
|
|
DeployedObject::EmailTrigger { path }
|
|
}
|
|
|
|
async fn create_trigger(
|
|
&self,
|
|
_db: &DB,
|
|
_tx: &mut PgConnection,
|
|
_authed: &ApiAuthed,
|
|
_w_id: &str,
|
|
_trigger: TriggerData<Self::TriggerConfigRequest>,
|
|
) -> Result<()> {
|
|
Err(Error::BadRequest(
|
|
"Email triggers are not available in open source version".to_string(),
|
|
))
|
|
}
|
|
|
|
async fn update_trigger(
|
|
&self,
|
|
_db: &DB,
|
|
_executor: &mut PgConnection,
|
|
_authed: &ApiAuthed,
|
|
_workspace_id: &str,
|
|
_path: &str,
|
|
_trigger: TriggerData<Self::TriggerConfigRequest>,
|
|
) -> Result<()> {
|
|
Err(Error::BadRequest(
|
|
"Email triggers are not available in open source version".to_string(),
|
|
))
|
|
}
|
|
}
|