Miosa.Integrations (Miosa v1.0.0)

Copy Markdown View Source

OAuth account-level integrations — GitHub, Slack, Linear, Discord.

Example

client = Miosa.client(System.fetch_env!("MIOSA_API_KEY"))

{:ok, integrations} = Miosa.Integrations.list(client)
{:ok, %{"url" => url}} = Miosa.Integrations.start(client, "github")

Summary

Functions

List available providers in the integration catalog.

Disconnect (revoke) an integration by provider name.

Send a test message to the connected Discord channel.

List GitHub repositories accessible to this integration.

List configured GitHub deploy (SSH) keys.

Create a Linear issue via the connected workspace.

Begin the Linear OAuth flow.

List active OAuth integrations for the tenant.

Force-refresh the access token for a connected provider.

Send a test message to the connected Slack channel.

Begin the OAuth flow for a provider — returns an authorize URL.

Functions

catalog(client)

@spec catalog(Miosa.Client.t()) :: Miosa.Client.result(map())

List available providers in the integration catalog.

disconnect(client, provider)

@spec disconnect(Miosa.Client.t(), String.t()) :: Miosa.Client.result(map())

Disconnect (revoke) an integration by provider name.

discord_send_test(client, body \\ %{})

@spec discord_send_test(Miosa.Client.t(), map()) :: Miosa.Client.result(map())

Send a test message to the connected Discord channel.

github_repos(client)

@spec github_repos(Miosa.Client.t()) :: Miosa.Client.result(map())

List GitHub repositories accessible to this integration.

github_ssh_keys(client)

@spec github_ssh_keys(Miosa.Client.t()) :: Miosa.Client.result(map())

List configured GitHub deploy (SSH) keys.

linear_create_issue(client, attrs)

@spec linear_create_issue(Miosa.Client.t(), map()) :: Miosa.Client.result(map())

Create a Linear issue via the connected workspace.

linear_start(client)

@spec linear_start(Miosa.Client.t()) :: Miosa.Client.result(map())

Begin the Linear OAuth flow.

list(client)

@spec list(Miosa.Client.t()) :: Miosa.Client.result(map())

List active OAuth integrations for the tenant.

refresh(client, provider)

@spec refresh(Miosa.Client.t(), String.t()) :: Miosa.Client.result(map())

Force-refresh the access token for a connected provider.

slack_send_test(client, body \\ %{})

@spec slack_send_test(Miosa.Client.t(), map()) :: Miosa.Client.result(map())

Send a test message to the connected Slack channel.

start(client, provider)

Begin the OAuth flow for a provider — returns an authorize URL.