Current section
Files
Jump to
Current section
Files
lib/letta_api/api/auth.ex
# NOTE: This file is auto generated by OpenAPI Generator 7.13.0 (https://openapi-generator.tech).
# Do not edit this file manually.
defmodule LettaAPI.Api.Auth do
@moduledoc """
API calls for all endpoints tagged `Auth`.
"""
alias LettaAPI.Connection
import LettaAPI.RequestBuilder
@doc """
Authenticate User
Authenticates the user and sends response with User related data. Currently, this is a placeholder that simply returns a UUID placeholder
### Parameters
- `connection` (LettaAPI.Connection): Connection to server
- `auth_request` (AuthRequest):
- `opts` (keyword): Optional parameters
### Returns
- `{:ok, LettaAPI.Model.AuthResponse.t}` on success
- `{:error, Tesla.Env.t}` on failure
"""
@spec authenticate_user_v1_auth_post(Tesla.Env.client, LettaAPI.Model.AuthRequest.t, keyword()) :: {:ok, LettaAPI.Model.AuthResponse.t} | {:ok, LettaAPI.Model.HttpValidationError.t} | {:error, Tesla.Env.t}
def authenticate_user_v1_auth_post(connection, auth_request, _opts \\ []) do
request =
%{}
|> method(:post)
|> url("/v1/auth")
|> add_param(:body, :body, auth_request)
|> Enum.into([])
connection
|> Connection.request(request)
|> evaluate_response([
{200, LettaAPI.Model.AuthResponse},
{422, LettaAPI.Model.HttpValidationError}
])
end
end