diff --git a/integrationos-api/src/endpoints/connection_definition.rs b/integrationos-api/src/endpoints/connection_definition.rs index 3427b3a6..fa74bb70 100644 --- a/integrationos-api/src/endpoints/connection_definition.rs +++ b/integrationos-api/src/endpoints/connection_definition.rs @@ -57,6 +57,8 @@ pub struct CreateRequest { pub helper_link: Option, pub authentication: Vec, pub auth_method: Option, + #[serde(default)] + pub multi_env: bool, pub settings: Settings, pub paths: Paths, pub test_connection: Option, @@ -307,6 +309,7 @@ impl RequestExt for CreateRequest { test_connection: self.test_connection, auth_secrets, auth_method: self.auth_method.clone(), + multi_env: self.multi_env.clone(), paths: self.paths.clone(), settings: self.settings.clone(), hidden: false, @@ -329,6 +332,7 @@ impl RequestExt for CreateRequest { record.frontend.spec.tags.clone_from(&self.tags); record.test_connection = self.test_connection; record.platform.clone_from(&self.platform); + record.multi_env = self.multi_env.clone(); record.record_metadata.active = self.active; record } diff --git a/integrationos-api/src/endpoints/connection_oauth_definition.rs b/integrationos-api/src/endpoints/connection_oauth_definition.rs index 9d1e9e0d..1b56aeed 100644 --- a/integrationos-api/src/endpoints/connection_oauth_definition.rs +++ b/integrationos-api/src/endpoints/connection_oauth_definition.rs @@ -37,6 +37,8 @@ pub fn get_router() -> Router> { pub struct CreateRequest { pub connection_platform: String, pub platform_redirect_uri: String, + #[serde(skip_serializing_if = "Option::is_none")] + pub sandbox_platform_redirect_uri: Option, pub ios_redirect_uri: String, pub scopes: String, #[serde(skip_serializing_if = "Option::is_none")] @@ -116,6 +118,7 @@ impl RequestExt for CreateRequest { }, frontend: Frontend { platform_redirect_uri: self.platform_redirect_uri.clone(), + sandbox_platform_redirect_uri: self.sandbox_platform_redirect_uri.clone(), ios_redirect_uri: self.ios_redirect_uri.clone(), scopes: self.scopes.clone(), separator: self.separator.clone(), @@ -176,6 +179,7 @@ impl RequestExt for CreateRequest { }; record.frontend = Frontend { platform_redirect_uri: self.platform_redirect_uri.clone(), + sandbox_platform_redirect_uri: self.sandbox_platform_redirect_uri.clone(), ios_redirect_uri: self.ios_redirect_uri.clone(), scopes: self.scopes.clone(), separator: self.separator.clone(), diff --git a/integrationos-domain/src/domain/connection/connection_definition.rs b/integrationos-domain/src/domain/connection/connection_definition.rs index 8710ddf0..d282f90b 100644 --- a/integrationos-domain/src/domain/connection/connection_definition.rs +++ b/integrationos-domain/src/domain/connection/connection_definition.rs @@ -20,6 +20,8 @@ pub struct ConnectionDefinition { pub name: String, pub auth_secrets: Vec, pub auth_method: Option, + #[serde(default)] + pub multi_env: bool, pub frontend: Frontend, pub paths: Paths, pub settings: Settings, @@ -101,6 +103,7 @@ impl ConnectionDefinition { test_connection: None, auth_secrets: vec![], auth_method: None, + multi_env: false, paths: Paths { id: None, event: None, diff --git a/integrationos-domain/src/domain/connection/connection_oauth_definition.rs b/integrationos-domain/src/domain/connection/connection_oauth_definition.rs index 893be3fc..9c37ae32 100644 --- a/integrationos-domain/src/domain/connection/connection_oauth_definition.rs +++ b/integrationos-domain/src/domain/connection/connection_oauth_definition.rs @@ -62,6 +62,8 @@ pub struct ComputeRequest { #[serde(rename_all = "camelCase")] pub struct Frontend { pub platform_redirect_uri: String, + #[serde(skip_serializing_if = "Option::is_none")] + pub sandbox_platform_redirect_uri: Option, pub scopes: String, pub ios_redirect_uri: String, #[serde(skip_serializing_if = "Option::is_none", default = "default_separator")]