objectiveai_sdk/auth/
response.rs1use serde::{Deserialize, Serialize};
8use schemars::JsonSchema;
9
10#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
15#[schemars(rename = "auth.GetCreditsResponse")]
16pub struct GetCreditsResponse {
17 #[serde(deserialize_with = "crate::serde_util::decimal")]
19 #[schemars(with = "f64")]
20 pub credits: rust_decimal::Decimal,
21 #[serde(deserialize_with = "crate::serde_util::decimal")]
23 #[schemars(with = "f64")]
24 pub total_credits_purchased: rust_decimal::Decimal,
25 #[serde(deserialize_with = "crate::serde_util::decimal")]
27 #[schemars(with = "f64")]
28 pub total_credits_used: rust_decimal::Decimal,
29}
30
31pub type CreateApiKeyResponse = super::ApiKeyWithMetadata;
35
36pub type DisableApiKeyResponse = super::ApiKeyWithMetadata;
40
41#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
43#[schemars(rename = "auth.ListApiKeyResponse")]
44pub struct ListApiKeyResponse {
45 pub data: Vec<ListApiKeyItem>,
47}
48
49#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
54#[schemars(rename = "auth.ListApiKeyItem")]
55pub struct ListApiKeyItem {
56 #[serde(flatten)]
58 pub inner: super::ApiKeyWithMetadata,
59 #[serde(deserialize_with = "crate::serde_util::decimal")]
61 #[schemars(with = "f64")]
62 pub cost: rust_decimal::Decimal,
63}
64
65#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
67#[schemars(rename = "auth.GetOpenRouterByokApiKeyResponse")]
68pub struct GetOpenRouterByokApiKeyResponse {
69 pub api_key: Option<String>,
71}
72
73pub type CreateOpenRouterByokApiKeyResponse = GetOpenRouterByokApiKeyResponse;