Packages
nuon
0.19.22
0.19.138
0.19.137
0.19.136
0.19.135
0.19.134
0.19.133
0.19.132
0.19.123
0.19.122
0.19.121
0.19.119
0.19.113
0.19.112
0.19.111
0.19.110
0.19.109
0.19.108
0.19.106
0.19.105
0.19.104
0.19.103
0.19.102
0.19.101
0.19.100
0.19.99
0.19.98
0.19.97
0.19.96
0.19.95
0.19.94
0.19.93
0.19.92
0.19.91
0.19.90
0.19.88
0.19.87
0.19.86
0.19.85
0.19.84
0.19.83
0.19.81
0.19.80
0.19.79
0.19.78
0.19.77
0.19.76
0.19.75
0.19.73
0.19.72
0.19.71
0.19.70
0.19.69
0.19.68
0.19.67
0.19.66
0.19.65
0.19.64
0.19.63
0.19.62
0.19.61
0.19.60
0.19.59
0.19.58
0.19.57
0.19.52
0.19.51
0.19.50
0.19.49
0.19.48
0.19.47
0.19.46
0.19.45
0.19.44
0.19.43
0.19.42
0.19.41
0.19.40
0.19.39
0.19.38
0.19.37
0.19.36
0.19.35
0.19.34
0.19.33
0.19.32
0.19.31
0.19.30
0.19.29
0.19.28
0.19.27
0.19.26
0.19.25
0.19.24
0.19.23
0.19.22
0.19.21
0.19.20
0.19.19
0.19.18
0.19.17
0.19.16
0.19.15
0.19.14
API for managing nuon apps, components, and installs.
Current section
Files
Jump to
Current section
Files
lib/nuon_api/api/vcs.ex
# NOTE: This file is auto generated by OpenAPI Generator 7.3.0-SNAPSHOT (https://openapi-generator.tech).
# Do not edit this file manually.
defmodule NuonAPI.Api.Vcs do
@moduledoc """
API calls for all endpoints tagged `Vcs`.
"""
alias NuonAPI.Connection
import NuonAPI.RequestBuilder
@doc """
create a vcs connection for Github
### Parameters
- `connection` (NuonAPI.Connection): Connection to server
- `service_create_connection_request` (ServiceCreateConnectionRequest): Input
- `opts` (keyword): Optional parameters
### Returns
- `{:ok, NuonAPI.Model.AppVcsConnection.t}` on success
- `{:error, Tesla.Env.t}` on failure
"""
@spec create_vcs_connection(Tesla.Env.client, NuonAPI.Model.ServiceCreateConnectionRequest.t, keyword()) :: {:ok, NuonAPI.Model.AppVcsConnection.t} | {:ok, NuonAPI.Model.StderrErrResponse.t} | {:error, Tesla.Env.t}
def create_vcs_connection(connection, service_create_connection_request, _opts \\ []) do
request =
%{}
|> method(:post)
|> url("/v1/vcs/connections")
|> add_param(:body, :body, service_create_connection_request)
|> Enum.into([])
connection
|> Connection.request(request)
|> evaluate_response([
{201, NuonAPI.Model.AppVcsConnection},
{400, NuonAPI.Model.StderrErrResponse},
{401, NuonAPI.Model.StderrErrResponse},
{403, NuonAPI.Model.StderrErrResponse},
{404, NuonAPI.Model.StderrErrResponse},
{500, NuonAPI.Model.StderrErrResponse}
])
end
@doc """
public connection to create a vcs connection via a callback
### Parameters
- `connection` (NuonAPI.Connection): Connection to server
- `service_create_connection_callback_request` (ServiceCreateConnectionCallbackRequest): Input
- `opts` (keyword): Optional parameters
### Returns
- `{:ok, NuonAPI.Model.AppVcsConnection.t}` on success
- `{:error, Tesla.Env.t}` on failure
"""
@spec create_vcs_connection_callback(Tesla.Env.client, NuonAPI.Model.ServiceCreateConnectionCallbackRequest.t, keyword()) :: {:ok, NuonAPI.Model.AppVcsConnection.t} | {:ok, NuonAPI.Model.StderrErrResponse.t} | {:error, Tesla.Env.t}
def create_vcs_connection_callback(connection, service_create_connection_callback_request, _opts \\ []) do
request =
%{}
|> method(:post)
|> url("/v1/vcs/connection-callback")
|> add_param(:body, :body, service_create_connection_callback_request)
|> Enum.into([])
connection
|> Connection.request(request)
|> evaluate_response([
{201, NuonAPI.Model.AppVcsConnection},
{400, NuonAPI.Model.StderrErrResponse},
{401, NuonAPI.Model.StderrErrResponse},
{403, NuonAPI.Model.StderrErrResponse},
{404, NuonAPI.Model.StderrErrResponse},
{500, NuonAPI.Model.StderrErrResponse}
])
end
@doc """
get all vcs connected repos for an org
### Parameters
- `connection` (NuonAPI.Connection): Connection to server
- `opts` (keyword): Optional parameters
### Returns
- `{:ok, [%ServiceRepository{}, ...]}` on success
- `{:error, Tesla.Env.t}` on failure
"""
@spec get_all_vcs_connected_repos(Tesla.Env.client, keyword()) :: {:ok, NuonAPI.Model.StderrErrResponse.t} | {:ok, list(NuonAPI.Model.ServiceRepository.t)} | {:error, Tesla.Env.t}
def get_all_vcs_connected_repos(connection, _opts \\ []) do
request =
%{}
|> method(:get)
|> url("/v1/vcs/connected-repos")
|> Enum.into([])
connection
|> Connection.request(request)
|> evaluate_response([
{200, NuonAPI.Model.ServiceRepository},
{400, NuonAPI.Model.StderrErrResponse},
{401, NuonAPI.Model.StderrErrResponse},
{403, NuonAPI.Model.StderrErrResponse},
{404, NuonAPI.Model.StderrErrResponse},
{500, NuonAPI.Model.StderrErrResponse}
])
end
@doc """
get vcs connection for an org
### Parameters
- `connection` (NuonAPI.Connection): Connection to server
- `opts` (keyword): Optional parameters
### Returns
- `{:ok, [%AppVcsConnection{}, ...]}` on success
- `{:error, Tesla.Env.t}` on failure
"""
@spec get_org_vcs_connections(Tesla.Env.client, keyword()) :: {:ok, list(NuonAPI.Model.AppVcsConnection.t)} | {:ok, NuonAPI.Model.StderrErrResponse.t} | {:error, Tesla.Env.t}
def get_org_vcs_connections(connection, _opts \\ []) do
request =
%{}
|> method(:get)
|> url("/v1/vcs/connections")
|> Enum.into([])
connection
|> Connection.request(request)
|> evaluate_response([
{200, NuonAPI.Model.AppVcsConnection},
{400, NuonAPI.Model.StderrErrResponse},
{401, NuonAPI.Model.StderrErrResponse},
{403, NuonAPI.Model.StderrErrResponse},
{404, NuonAPI.Model.StderrErrResponse},
{500, NuonAPI.Model.StderrErrResponse}
])
end
@doc """
returns a vcs connection for an org
### Parameters
- `connection` (NuonAPI.Connection): Connection to server
- `connection_id` (String.t): connection ID
- `opts` (keyword): Optional parameters
### Returns
- `{:ok, NuonAPI.Model.AppVcsConnection.t}` on success
- `{:error, Tesla.Env.t}` on failure
"""
@spec get_vcs_connection(Tesla.Env.client, String.t, keyword()) :: {:ok, NuonAPI.Model.AppVcsConnection.t} | {:ok, NuonAPI.Model.StderrErrResponse.t} | {:error, Tesla.Env.t}
def get_vcs_connection(connection, connection_id, _opts \\ []) do
request =
%{}
|> method(:get)
|> url("/v1/vcs/connections/#{connection_id}")
|> Enum.into([])
connection
|> Connection.request(request)
|> evaluate_response([
{200, NuonAPI.Model.AppVcsConnection},
{400, NuonAPI.Model.StderrErrResponse},
{401, NuonAPI.Model.StderrErrResponse},
{403, NuonAPI.Model.StderrErrResponse},
{404, NuonAPI.Model.StderrErrResponse},
{500, NuonAPI.Model.StderrErrResponse}
])
end
end