pub trait LocalAsyncIntegrationsService<I: Stream<Item = Result<Bytes, Error>>> {
// Required methods
fn generate_slack_webhook_link(
&self,
auth_: &BearerToken,
workspace: Option<&WorkspaceRid>,
is_gov_slack: Option<bool>,
) -> impl Future<Output = Result<GenerateSlackWebhookResponse, Error>>;
fn create_slack_webhook(
&self,
auth_: &BearerToken,
code: &str,
state: &str,
) -> impl Future<Output = Result<(), Error>>;
fn create_integration(
&self,
auth_: &BearerToken,
create_integration_request: &CreateIntegrationRequest,
) -> impl Future<Output = Result<Integration, Error>>;
fn create_secure_webhook_integration(
&self,
auth_: &BearerToken,
request: &CreateSecureWebhookIntegrationRequest,
) -> impl Future<Output = Result<CreateSecureWebhookIntegrationResponse, Error>>;
fn send_secure_webhook_message(
&self,
auth_: &BearerToken,
integration_rid: &IntegrationRid,
request: &SendSecureWebhookMessageRequest,
) -> impl Future<Output = Result<SendSecureWebhookMessageResponse, Error>>;
fn delete_integration(
&self,
auth_: &BearerToken,
integration_rid: &IntegrationRid,
) -> impl Future<Output = Result<(), Error>>;
fn update_integration_metadata(
&self,
auth_: &BearerToken,
integration_rid: &IntegrationRid,
request: &UpdateIntegrationRequest,
) -> impl Future<Output = Result<Integration, Error>>;
fn update_integration_details(
&self,
auth_: &BearerToken,
integration_rid: &IntegrationRid,
request: &UpdateIntegrationDetailsRequest,
) -> impl Future<Output = Result<Integration, Error>>;
fn get_integration(
&self,
auth_: &BearerToken,
integration_rid: &IntegrationRid,
) -> impl Future<Output = Result<Integration, Error>>;
fn list_integrations(
&self,
auth_: &BearerToken,
workspaces: &BTreeSet<WorkspaceRid>,
) -> impl Future<Output = Result<Vec<Integration>, Error>>;
fn send_message(
&self,
auth_: &BearerToken,
request: &SendMessageRequest,
) -> impl Future<Output = Result<(), Error>>;
fn rotate_secure_webhook_integration_signing_key(
&self,
auth_: &BearerToken,
integration_rid: &IntegrationRid,
) -> impl Future<Output = Result<RotateWebhookSigningKeyResponse, Error>>;
}Expand description
Service for managing integrations with external services.
Required Methods§
Sourcefn generate_slack_webhook_link(
&self,
auth_: &BearerToken,
workspace: Option<&WorkspaceRid>,
is_gov_slack: Option<bool>,
) -> impl Future<Output = Result<GenerateSlackWebhookResponse, Error>>
fn generate_slack_webhook_link( &self, auth_: &BearerToken, workspace: Option<&WorkspaceRid>, is_gov_slack: Option<bool>, ) -> impl Future<Output = Result<GenerateSlackWebhookResponse, Error>>
Generates link to request permissions for Slack bot to join workspaces and use a webhook.
Sourcefn create_slack_webhook(
&self,
auth_: &BearerToken,
code: &str,
state: &str,
) -> impl Future<Output = Result<(), Error>>
fn create_slack_webhook( &self, auth_: &BearerToken, code: &str, state: &str, ) -> impl Future<Output = Result<(), Error>>
Creates a new Slack integration. Called internally after Slack authorization.
Sourcefn create_integration(
&self,
auth_: &BearerToken,
create_integration_request: &CreateIntegrationRequest,
) -> impl Future<Output = Result<Integration, Error>>
fn create_integration( &self, auth_: &BearerToken, create_integration_request: &CreateIntegrationRequest, ) -> impl Future<Output = Result<Integration, Error>>
Creates a new integration.
Sourcefn create_secure_webhook_integration(
&self,
auth_: &BearerToken,
request: &CreateSecureWebhookIntegrationRequest,
) -> impl Future<Output = Result<CreateSecureWebhookIntegrationResponse, Error>>
fn create_secure_webhook_integration( &self, auth_: &BearerToken, request: &CreateSecureWebhookIntegrationRequest, ) -> impl Future<Output = Result<CreateSecureWebhookIntegrationResponse, Error>>
Creates a new webhook integration with HMAC signing. Returns the integration and the server-generated signing key. The signing key is only returned once — store it securely.
Sourcefn send_secure_webhook_message(
&self,
auth_: &BearerToken,
integration_rid: &IntegrationRid,
request: &SendSecureWebhookMessageRequest,
) -> impl Future<Output = Result<SendSecureWebhookMessageResponse, Error>>
fn send_secure_webhook_message( &self, auth_: &BearerToken, integration_rid: &IntegrationRid, request: &SendSecureWebhookMessageRequest, ) -> impl Future<Output = Result<SendSecureWebhookMessageResponse, Error>>
Sends a message to a secure webhook integration with HMAC-SHA256 signature. Implements retry logic with exponential backoff based on merged delivery configuration. Request configuration overrides take precedence over integration’s stored configuration.
Sourcefn delete_integration(
&self,
auth_: &BearerToken,
integration_rid: &IntegrationRid,
) -> impl Future<Output = Result<(), Error>>
fn delete_integration( &self, auth_: &BearerToken, integration_rid: &IntegrationRid, ) -> impl Future<Output = Result<(), Error>>
Deletes an integration by archiving.
Sourcefn update_integration_metadata(
&self,
auth_: &BearerToken,
integration_rid: &IntegrationRid,
request: &UpdateIntegrationRequest,
) -> impl Future<Output = Result<Integration, Error>>
fn update_integration_metadata( &self, auth_: &BearerToken, integration_rid: &IntegrationRid, request: &UpdateIntegrationRequest, ) -> impl Future<Output = Result<Integration, Error>>
Updates the metadata of an integration.
Sourcefn update_integration_details(
&self,
auth_: &BearerToken,
integration_rid: &IntegrationRid,
request: &UpdateIntegrationDetailsRequest,
) -> impl Future<Output = Result<Integration, Error>>
fn update_integration_details( &self, auth_: &BearerToken, integration_rid: &IntegrationRid, request: &UpdateIntegrationDetailsRequest, ) -> impl Future<Output = Result<Integration, Error>>
Updates the integration details for an integration. Intended to allow changing webhooks or rotating API keys.
Sourcefn get_integration(
&self,
auth_: &BearerToken,
integration_rid: &IntegrationRid,
) -> impl Future<Output = Result<Integration, Error>>
fn get_integration( &self, auth_: &BearerToken, integration_rid: &IntegrationRid, ) -> impl Future<Output = Result<Integration, Error>>
Retrieves an integration with the specified integration RID.
Sourcefn list_integrations(
&self,
auth_: &BearerToken,
workspaces: &BTreeSet<WorkspaceRid>,
) -> impl Future<Output = Result<Vec<Integration>, Error>>
fn list_integrations( &self, auth_: &BearerToken, workspaces: &BTreeSet<WorkspaceRid>, ) -> impl Future<Output = Result<Vec<Integration>, Error>>
Lists all integrations. Archived integrations are not included.
Sourcefn send_message(
&self,
auth_: &BearerToken,
request: &SendMessageRequest,
) -> impl Future<Output = Result<(), Error>>
fn send_message( &self, auth_: &BearerToken, request: &SendMessageRequest, ) -> impl Future<Output = Result<(), Error>>
Sends a string message to the specified integration from a checklist execution.
Sourcefn rotate_secure_webhook_integration_signing_key(
&self,
auth_: &BearerToken,
integration_rid: &IntegrationRid,
) -> impl Future<Output = Result<RotateWebhookSigningKeyResponse, Error>>
fn rotate_secure_webhook_integration_signing_key( &self, auth_: &BearerToken, integration_rid: &IntegrationRid, ) -> impl Future<Output = Result<RotateWebhookSigningKeyResponse, Error>>
Rotates the HMAC signing key for a webhook integration. The old key is immediately invalidated and a new key is generated and returned. This is the only way to retrieve the signing key after initial creation.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.