Skip to main content

AsyncIntegrationsService

Trait AsyncIntegrationsService 

Source
pub trait AsyncIntegrationsService {
    // Required methods
    fn generate_slack_webhook_link(
        &self,
        auth_: BearerToken,
        workspace: Option<WorkspaceRid>,
        is_gov_slack: Option<bool>,
    ) -> impl Future<Output = Result<GenerateSlackWebhookResponse, Error>> + Send;
    fn create_slack_webhook(
        &self,
        auth_: BearerToken,
        code: String,
        state: String,
    ) -> impl Future<Output = Result<(), Error>> + Send;
    fn create_integration(
        &self,
        auth_: BearerToken,
        create_integration_request: CreateIntegrationRequest,
    ) -> impl Future<Output = Result<Integration, Error>> + Send;
    fn create_secure_webhook_integration(
        &self,
        auth_: BearerToken,
        request: CreateSecureWebhookIntegrationRequest,
    ) -> impl Future<Output = Result<CreateSecureWebhookIntegrationResponse, Error>> + Send;
    fn delete_integration(
        &self,
        auth_: BearerToken,
        integration_rid: IntegrationRid,
    ) -> impl Future<Output = Result<(), Error>> + Send;
    fn update_integration_metadata(
        &self,
        auth_: BearerToken,
        integration_rid: IntegrationRid,
        request: UpdateIntegrationRequest,
    ) -> impl Future<Output = Result<Integration, Error>> + Send;
    fn update_integration_details(
        &self,
        auth_: BearerToken,
        integration_rid: IntegrationRid,
        request: UpdateIntegrationDetailsRequest,
    ) -> impl Future<Output = Result<Integration, Error>> + Send;
    fn get_integration(
        &self,
        auth_: BearerToken,
        integration_rid: IntegrationRid,
    ) -> impl Future<Output = Result<Integration, Error>> + Send;
    fn list_integrations(
        &self,
        auth_: BearerToken,
        workspaces: BTreeSet<WorkspaceRid>,
    ) -> impl Future<Output = Result<Vec<Integration>, Error>> + Send;
    fn send_message(
        &self,
        auth_: BearerToken,
        request: SendMessageRequest,
    ) -> impl Future<Output = Result<(), Error>> + Send;
    fn rotate_secure_webhook_integration_signing_key(
        &self,
        auth_: BearerToken,
        integration_rid: IntegrationRid,
    ) -> impl Future<Output = Result<RotateWebhookSigningKeyResponse, Error>> + Send;
}
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>> + Send

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>> + Send

Creates a new integration.

Source

fn create_secure_webhook_integration( &self, auth_: BearerToken, request: CreateSecureWebhookIntegrationRequest, ) -> impl Future<Output = Result<CreateSecureWebhookIntegrationResponse, Error>> + Send

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 delete_integration( &self, auth_: BearerToken, integration_rid: IntegrationRid, ) -> impl Future<Output = Result<(), Error>> + Send

Deletes an integration by archiving.

Source

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

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>> + Send

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>> + Send

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>> + Send

Lists all integrations. Archived integrations are not included.

Source

fn send_message( &self, auth_: BearerToken, request: SendMessageRequest, ) -> impl Future<Output = Result<(), Error>> + Send

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>> + Send

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§