Skip to main content

IntegrationsService

Trait IntegrationsService 

Source
pub trait IntegrationsService<I: Iterator<Item = Result<Bytes, Error>>> {
    // Required methods
    fn generate_slack_webhook_link(
        &self,
        auth_: &BearerToken,
        workspace: Option<&ResourceIdentifier>,
        is_gov_slack: Option<bool>,
    ) -> Result<GenerateSlackWebhookResponse, Error>;
    fn create_slack_webhook(
        &self,
        auth_: &BearerToken,
        code: &str,
        state: &str,
    ) -> Result<(), Error>;
    fn create_integration(
        &self,
        auth_: &BearerToken,
        create_integration_request: &CreateIntegrationRequest,
    ) -> Result<Integration, Error>;
    fn create_secure_webhook_integration(
        &self,
        auth_: &BearerToken,
        request: &CreateSecureWebhookIntegrationRequest,
    ) -> Result<CreateSecureWebhookIntegrationResponse, Error>;
    fn send_secure_webhook_message(
        &self,
        auth_: &BearerToken,
        integration_rid: &IntegrationRid,
        request: &SendSecureWebhookMessageRequest,
    ) -> Result<SendSecureWebhookMessageResponse, Error>;
    fn delete_integration(
        &self,
        auth_: &BearerToken,
        integration_rid: &IntegrationRid,
    ) -> Result<(), Error>;
    fn update_integration_metadata(
        &self,
        auth_: &BearerToken,
        integration_rid: &IntegrationRid,
        request: &UpdateIntegrationRequest,
    ) -> Result<Integration, Error>;
    fn update_integration_details(
        &self,
        auth_: &BearerToken,
        integration_rid: &IntegrationRid,
        request: &UpdateIntegrationDetailsRequest,
    ) -> Result<Integration, Error>;
    fn get_integration(
        &self,
        auth_: &BearerToken,
        integration_rid: &IntegrationRid,
    ) -> Result<Integration, Error>;
    fn list_integrations(
        &self,
        auth_: &BearerToken,
        workspaces: &BTreeSet<ResourceIdentifier>,
    ) -> Result<Vec<Integration>, Error>;
    fn send_message(
        &self,
        auth_: &BearerToken,
        request: &SendMessageRequest,
    ) -> Result<(), Error>;
    fn rotate_secure_webhook_integration_signing_key(
        &self,
        auth_: &BearerToken,
        integration_rid: &IntegrationRid,
    ) -> Result<RotateWebhookSigningKeyResponse, Error>;
}
Expand description

Service for managing integrations with external services.

Required Methods§

Generates link to request permissions for Slack bot to join workspaces and use a webhook.

Source

fn create_slack_webhook( &self, auth_: &BearerToken, code: &str, state: &str, ) -> Result<(), Error>

Creates a new Slack integration. Called internally after Slack authorization.

Source

fn create_integration( &self, auth_: &BearerToken, create_integration_request: &CreateIntegrationRequest, ) -> Result<Integration, Error>

Creates a new integration.

Source

fn create_secure_webhook_integration( &self, auth_: &BearerToken, request: &CreateSecureWebhookIntegrationRequest, ) -> 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.

Source

fn send_secure_webhook_message( &self, auth_: &BearerToken, integration_rid: &IntegrationRid, request: &SendSecureWebhookMessageRequest, ) -> 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.

Source

fn delete_integration( &self, auth_: &BearerToken, integration_rid: &IntegrationRid, ) -> Result<(), Error>

Deletes an integration by archiving.

Source

fn update_integration_metadata( &self, auth_: &BearerToken, integration_rid: &IntegrationRid, request: &UpdateIntegrationRequest, ) -> Result<Integration, Error>

Updates the metadata of an integration.

Source

fn update_integration_details( &self, auth_: &BearerToken, integration_rid: &IntegrationRid, request: &UpdateIntegrationDetailsRequest, ) -> Result<Integration, Error>

Updates the integration details for an integration. Intended to allow changing webhooks or rotating API keys.

Source

fn get_integration( &self, auth_: &BearerToken, integration_rid: &IntegrationRid, ) -> Result<Integration, Error>

Retrieves an integration with the specified integration RID.

Source

fn list_integrations( &self, auth_: &BearerToken, workspaces: &BTreeSet<ResourceIdentifier>, ) -> Result<Vec<Integration>, Error>

Lists all integrations. Archived integrations are not included.

Source

fn send_message( &self, auth_: &BearerToken, request: &SendMessageRequest, ) -> Result<(), Error>

Sends a string message to the specified integration from a checklist execution.

Source

fn rotate_secure_webhook_integration_signing_key( &self, auth_: &BearerToken, integration_rid: &IntegrationRid, ) -> 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 dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<I: Iterator<Item = Result<Bytes, Error>>, __C> IntegrationsService<I> for IntegrationsServiceClient<__C>
where __C: Client<ResponseBody = I>,