use crate::ctx;
#[async_trait::async_trait]
pub trait Client<CTXEXT> {
async fn create_api_key<PC: crate::ctx::persistent_cache::PersistentCacheClient>(
&self,
ctx: ctx::Context<CTXEXT, PC>,
request: objectiveai_sdk::auth::request::CreateApiKeyRequest,
) -> Result<
objectiveai_sdk::auth::response::CreateApiKeyResponse,
objectiveai_sdk::error::ResponseError,
>;
async fn create_openrouter_byok_api_key<PC: crate::ctx::persistent_cache::PersistentCacheClient>(
&self,
ctx: ctx::Context<CTXEXT, PC>,
request: objectiveai_sdk::auth::request::CreateOpenRouterByokApiKeyRequest,
) -> Result<
objectiveai_sdk::auth::response::CreateOpenRouterByokApiKeyResponse,
objectiveai_sdk::error::ResponseError,
>;
async fn disable_api_key<PC: crate::ctx::persistent_cache::PersistentCacheClient>(
&self,
ctx: ctx::Context<CTXEXT, PC>,
request: objectiveai_sdk::auth::request::DisableApiKeyRequest,
) -> Result<
objectiveai_sdk::auth::response::DisableApiKeyResponse,
objectiveai_sdk::error::ResponseError,
>;
async fn delete_openrouter_byok_api_key<PC: crate::ctx::persistent_cache::PersistentCacheClient>(
&self,
ctx: ctx::Context<CTXEXT, PC>,
) -> Result<(), objectiveai_sdk::error::ResponseError>;
async fn list_api_keys<PC: crate::ctx::persistent_cache::PersistentCacheClient>(
&self,
ctx: ctx::Context<CTXEXT, PC>,
) -> Result<
objectiveai_sdk::auth::response::ListApiKeyResponse,
objectiveai_sdk::error::ResponseError,
>;
async fn get_openrouter_byok_api_key<PC: crate::ctx::persistent_cache::PersistentCacheClient>(
&self,
ctx: ctx::Context<CTXEXT, PC>,
) -> Result<
objectiveai_sdk::auth::response::GetOpenRouterByokApiKeyResponse,
objectiveai_sdk::error::ResponseError,
>;
async fn get_credits<PC: crate::ctx::persistent_cache::PersistentCacheClient>(
&self,
ctx: ctx::Context<CTXEXT, PC>,
) -> Result<
objectiveai_sdk::auth::response::GetCreditsResponse,
objectiveai_sdk::error::ResponseError,
>;
}