# NOTE: This file is auto generated by OpenAPI Generator 7.22.0 (https://openapi-generator.tech). # Do not edit this file manually. defmodule HookSniffAPI.Api.AuditLog do @moduledoc """ API calls for all endpoints tagged `AuditLog`. """ alias HookSniffAPI.Connection import HookSniffAPI.RequestBuilder @doc """ List audit log entries ### Parameters - `connection` (HookSniffAPI.Connection): Connection to server - `opts` (keyword): Optional parameters - `:page` (integer()): - `:action` (String.t): ### Returns - `{:ok, nil}` on success - `{:error, Tesla.Env.t}` on failure """ @spec audit_log_get(Tesla.Env.client, keyword()) :: {:ok, nil} | {:error, Tesla.Env.t} def audit_log_get(connection, opts \\ []) do optional_params = %{ :page => :query, :action => :query } request = %{} |> method(:get) |> url("/audit-log") |> add_optional_params(optional_params, opts) |> Enum.into([]) connection |> Connection.request(request) |> evaluate_response([ {200, false} ]) end @doc """ Get audit entry detail ### Parameters - `connection` (HookSniffAPI.Connection): Connection to server - `id` (String.t): - `opts` (keyword): Optional parameters ### Returns - `{:ok, nil}` on success - `{:error, Tesla.Env.t}` on failure """ @spec audit_log_id_get(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:error, Tesla.Env.t} def audit_log_id_get(connection, id, _opts \\ []) do request = %{} |> method(:get) |> url("/audit-log/#{id}") |> Enum.into([]) connection |> Connection.request(request) |> evaluate_response([ {200, false} ]) end end