Skip to main content

LocalAsyncIntegrationsService

Trait LocalAsyncIntegrationsService 

Source
pub trait LocalAsyncIntegrationsService {
    // 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: String,
        state: String,
    ) -> 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§

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

Source

fn create_slack_webhook( &self, auth_: BearerToken, code: String, state: String, ) -> impl Future<Output = Result<(), Error>>

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

Source

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

Creates a new integration.

Source

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.

Source

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.

Source

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

Deletes an integration by archiving.

Source

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

Updates the metadata of an integration.

Source

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.

Source

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

Retrieves an integration with the specified integration RID.

Source

fn list_integrations( &self, auth_: BearerToken, workspaces: BTreeSet<WorkspaceRid>, ) -> impl Future<Output = Result<Vec<Integration>, Error>>

Lists all integrations. Archived integrations are not included.

Source

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.

Source

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.

Implementors§