pub struct Client { /* private fields */ }Implementations§
Source§impl Client
impl Client
pub async fn get_rate_limits_with_reset_credits( &self, ) -> Result<RateLimitsWithResetCredits>
pub async fn list_rate_limit_reset_credits( &self, ) -> Result<RateLimitResetCreditsDetails>
pub async fn consume_rate_limit_reset_credit( &self, redeem_request_id: &str, ) -> Result<ConsumeRateLimitResetCreditResponse>
pub async fn consume_rate_limit_reset_credit_by_id( &self, redeem_request_id: &str, credit_id: &str, ) -> Result<ConsumeRateLimitResetCreditResponse>
Source§impl Client
impl Client
pub fn new( base_url: impl Into<String>, http_client_factory: HttpClientFactory, ) -> Self
pub fn from_auth( base_url: impl Into<String>, auth: &CodexAuth, http_client_factory: HttpClientFactory, ) -> Self
pub fn with_auth_provider(self, auth: SharedAuthProvider) -> Self
pub fn with_user_agent(self, ua: impl Into<String>) -> Self
pub fn with_chatgpt_account_id(self, account_id: impl Into<String>) -> Self
pub fn with_fedramp_routing_header(self) -> Self
pub fn with_path_style(self, style: PathStyle) -> Self
pub async fn get_rate_limits(&self) -> Result<RateLimitSnapshot>
pub async fn get_rate_limits_many(&self) -> Result<Vec<RateLimitSnapshot>>
pub async fn get_accounts_check(&self) -> Result<AccountsCheckResponse>
pub async fn get_token_usage_profile(&self) -> Result<TokenUsageProfile>
pub async fn send_add_credits_nudge_email( &self, credit_type: AddCreditsNudgeCreditType, ) -> Result<(), RequestError>
pub async fn list_tasks( &self, limit: Option<i32>, task_filter: Option<&str>, environment_id: Option<&str>, cursor: Option<&str>, ) -> Result<PaginatedListTaskListItem>
pub async fn get_task_details( &self, task_id: &str, ) -> Result<CodeTaskDetailsResponse>
pub async fn get_task_details_with_body( &self, task_id: &str, ) -> Result<(CodeTaskDetailsResponse, String, String)>
pub async fn list_sibling_turns( &self, task_id: &str, turn_id: &str, ) -> Result<TurnAttemptsSiblingTurnsResponse>
Sourcepub async fn get_config_bundle(
&self,
) -> Result<ConfigBundleResponse, RequestError>
pub async fn get_config_bundle( &self, ) -> Result<ConfigBundleResponse, RequestError>
Fetch the selected cloud-managed config bundle from codex-backend.
GET /api/codex/config/bundle (Codex API style) or
GET /wham/config/bundle (ChatGPT backend-api style).
Sourcepub async fn get_user_settings(
&self,
) -> Result<CodexUserSettingsResponse, RequestError>
pub async fn get_user_settings( &self, ) -> Result<CodexUserSettingsResponse, RequestError>
Fetch authenticated Codex user settings from the active backend route.
Uses GET /api/codex/settings/user for Codex API hosts and
GET /wham/settings/user for ChatGPT backend-api hosts.
pub async fn list_workspace_messages( &self, ) -> Result<CodexWorkspaceMessagesResponse, RequestError>
Sourcepub async fn create_task(&self, request_body: Value) -> Result<String>
pub async fn create_task(&self, request_body: Value) -> Result<String>
Create a new task (user turn) by POSTing to the appropriate backend path
based on path_style. Returns the created task id.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Client
impl !RefUnwindSafe for Client
impl !UnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnsafeUnpin for Client
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<T> AsTypeStaticRegistered for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
impl<T> HasTyVTable for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestCreates a shared type from an unshared type.