pub struct IntegrationClient { /* private fields */ }Expand description
Client for managing integrations with external systems.
Implementations§
Source§impl IntegrationClient
impl IntegrationClient
Sourcepub async fn associate_prompt_with_integration(
&self,
ai_integration: &str,
model_name: &str,
prompt_name: &str,
) -> Result<()>
pub async fn associate_prompt_with_integration( &self, ai_integration: &str, model_name: &str, prompt_name: &str, ) -> Result<()>
Associate a prompt with an AI integration and model.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, or an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status.
Sourcepub async fn delete_integration_api(
&self,
api_name: &str,
integration_name: &str,
) -> Result<()>
pub async fn delete_integration_api( &self, api_name: &str, integration_name: &str, ) -> Result<()>
Delete a specific integration API.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, or an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status.
Sourcepub async fn delete_integration(&self, integration_name: &str) -> Result<()>
pub async fn delete_integration(&self, integration_name: &str) -> Result<()>
Delete an integration.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, or an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status.
Sourcepub async fn get_integration_api(
&self,
api_name: &str,
integration_name: &str,
) -> Result<IntegrationApi>
pub async fn get_integration_api( &self, api_name: &str, integration_name: &str, ) -> Result<IntegrationApi>
Get an integration API.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Sourcepub async fn get_integration_apis(
&self,
integration_name: &str,
) -> Result<Vec<IntegrationApi>>
pub async fn get_integration_apis( &self, integration_name: &str, ) -> Result<Vec<IntegrationApi>>
Get all APIs for an integration.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Sourcepub async fn get_integration(
&self,
integration_name: &str,
) -> Result<Integration>
pub async fn get_integration( &self, integration_name: &str, ) -> Result<Integration>
Get an integration.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Sourcepub async fn get_integrations(&self) -> Result<Vec<Integration>>
pub async fn get_integrations(&self) -> Result<Vec<Integration>>
Get all integrations.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Sourcepub async fn get_prompts_with_integration(
&self,
ai_integration: &str,
model_name: &str,
) -> Result<Vec<PromptTemplate>>
pub async fn get_prompts_with_integration( &self, ai_integration: &str, model_name: &str, ) -> Result<Vec<PromptTemplate>>
Get prompts associated with an integration.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Sourcepub async fn get_token_usage_for_integration(
&self,
api_name: &str,
integration_name: &str,
) -> Result<i64>
pub async fn get_token_usage_for_integration( &self, api_name: &str, integration_name: &str, ) -> Result<i64>
Get token usage for an integration API.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Sourcepub async fn get_token_usage_for_integration_provider(
&self,
name: &str,
) -> Result<Value>
pub async fn get_token_usage_for_integration_provider( &self, name: &str, ) -> Result<Value>
Get token usage for an integration provider.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Sourcepub async fn save_integration_api(
&self,
integration_name: &str,
api_name: &str,
api_details: &IntegrationApiUpdate,
) -> Result<()>
pub async fn save_integration_api( &self, integration_name: &str, api_name: &str, api_details: &IntegrationApiUpdate, ) -> Result<()>
Save (create or update) an integration API.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, or an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status.
Sourcepub async fn save_integration(
&self,
integration_name: &str,
integration_details: &IntegrationUpdate,
) -> Result<()>
pub async fn save_integration( &self, integration_name: &str, integration_details: &IntegrationUpdate, ) -> Result<()>
Save (create or update) an integration.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, or an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status.
Sourcepub async fn delete_tag_for_integration(
&self,
tags: &[MetadataTag],
integration_name: &str,
api_name: &str,
) -> Result<()>
pub async fn delete_tag_for_integration( &self, tags: &[MetadataTag], integration_name: &str, api_name: &str, ) -> Result<()>
Delete a tag from an integration.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Sourcepub async fn delete_tag_for_integration_provider(
&self,
tags: &[MetadataTag],
name: &str,
) -> Result<()>
pub async fn delete_tag_for_integration_provider( &self, tags: &[MetadataTag], name: &str, ) -> Result<()>
Delete a tag from an integration provider.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Sourcepub async fn put_tag_for_integration(
&self,
tags: &[MetadataTag],
integration_name: &str,
api_name: &str,
) -> Result<()>
pub async fn put_tag_for_integration( &self, tags: &[MetadataTag], integration_name: &str, api_name: &str, ) -> Result<()>
Set tags for an integration.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, or an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status.
Sourcepub async fn put_tag_for_integration_provider(
&self,
tags: &[MetadataTag],
name: &str,
) -> Result<()>
pub async fn put_tag_for_integration_provider( &self, tags: &[MetadataTag], name: &str, ) -> Result<()>
Set tags for an integration provider.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, or an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status.
Get tags for an integration.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Get tags for an integration provider.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Sourcepub async fn get_integration_available_apis(
&self,
integration_name: &str,
) -> Result<Vec<String>>
pub async fn get_integration_available_apis( &self, integration_name: &str, ) -> Result<Vec<String>>
Get available APIs for an integration provider.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Sourcepub async fn get_integration_provider_defs(&self) -> Result<Vec<Value>>
pub async fn get_integration_provider_defs(&self) -> Result<Vec<Value>>
Get all integration provider definitions.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.
Sourcepub async fn get_providers_and_integrations(&self) -> Result<Value>
pub async fn get_providers_and_integrations(&self) -> Result<Value>
Get all providers and their integrations.
§Errors
Returns crate::error::ConductorError::Http if the request fails at the transport level, an crate::error::ConductorError::Auth/crate::error::ConductorError::Api/crate::error::ConductorError::Server variant if the server responds with a non-2xx status, or crate::error::ConductorError::Json if the response body can’t be deserialized.