Provides API endpoints related to integrations
Summary
Functions
Cancel OAuth connection
Complete OAuth connection
Get OAuth attempt status
Connect with key
Begin OAuth connection
Get integration
List integrations
Types
@type v2_integration_attempt_status_200_json_resp() :: %{ data: v2_integration_attempt_status_200_json_resp_data(), location: OpenCode.Generated.LocationInfo.t() }
@type v2_integration_attempt_status_200_json_resp_data() :: %{ message: String.t(), status: String.t(), time: v2_integration_attempt_status_200_json_resp_data_time() }
@type v2_integration_connect_oauth_200_json_resp() :: %{ data: OpenCode.Generated.IntegrationAttempt.t(), location: OpenCode.Generated.LocationInfo.t() }
@type v2_integration_get_200_json_resp() :: %{ data: OpenCode.Generated.IntegrationInfo.t(), location: OpenCode.Generated.LocationInfo.t() }
@type v2_integration_list_200_json_resp() :: %{ data: [OpenCode.Generated.IntegrationInfo.t()], location: OpenCode.Generated.LocationInfo.t() }
Functions
@spec v2_integration_attempt_cancel(attemptID :: String.t(), opts :: keyword()) :: :ok | {:error, OpenCode.Generated.InvalidRequestError.t() | OpenCode.Generated.UnauthorizedError.t()}
Cancel OAuth connection
Cancel an OAuth attempt and release its resources.
Options
location
@spec v2_integration_attempt_complete( attemptID :: String.t(), body :: map(), opts :: keyword() ) :: :ok | {:error, OpenCode.Generated.InvalidRequestError.t() | OpenCode.Generated.UnauthorizedError.t()}
Complete OAuth connection
Complete a code-based OAuth attempt and store the resulting credential.
Options
location
Request Body
Content Types: application/json
@spec v2_integration_attempt_status(attemptID :: String.t(), opts :: keyword()) :: {:ok, v2_integration_attempt_status_200_json_resp()} | {:error, OpenCode.Generated.InvalidRequestError.t() | OpenCode.Generated.UnauthorizedError.t()}
Get OAuth attempt status
Poll the current status of an OAuth attempt.
Options
location
@spec v2_integration_connect_key( integrationID :: String.t(), body :: map(), opts :: keyword() ) :: :ok | {:error, OpenCode.Generated.InvalidRequestError.t() | OpenCode.Generated.UnauthorizedError.t()}
Connect with key
Run a key authentication method and store the resulting credential.
Options
location
Request Body
Content Types: application/json
@spec v2_integration_connect_oauth( integrationID :: String.t(), body :: map(), opts :: keyword() ) :: {:ok, v2_integration_connect_oauth_200_json_resp()} | {:error, OpenCode.Generated.InvalidRequestError.t() | OpenCode.Generated.UnauthorizedError.t()}
Begin OAuth connection
Start an OAuth attempt and return the authorization details.
Options
location
Request Body
Content Types: application/json
@spec v2_integration_get(integrationID :: String.t(), opts :: keyword()) :: {:ok, v2_integration_get_200_json_resp()} | {:error, OpenCode.Generated.InvalidRequestError.t() | OpenCode.Generated.UnauthorizedError.t()}
Get integration
Retrieve one integration and its authentication methods.
Options
location
@spec v2_integration_list(opts :: keyword()) :: {:ok, v2_integration_list_200_json_resp()} | {:error, OpenCode.Generated.InvalidRequestError.t() | OpenCode.Generated.UnauthorizedError.t()}
List integrations
Retrieve available integrations and their authentication methods.
Options
location