| 47 | |
| 48 | #[derive(Debug, Clone, Serialize, Deserialize)] |
| 49 | pub struct CredentialConfig { |
| 50 | pub id: String, |
| 51 | #[serde(default)] |
| 52 | pub channel: ChannelKind, |
| 53 | #[serde(default = "default_enabled")] |
| 54 | pub enabled: bool, |
| 55 | #[serde(default)] |
| 56 | pub order: u32, |
| 57 | #[serde(default)] |
| 58 | pub access_token: String, |
| 59 | #[serde(default)] |
| 60 | pub refresh_token: String, |
| 61 | #[serde(default)] |
| 62 | pub expires_at_unix_ms: u64, |
| 63 | #[serde(default = "default_enabled")] |
| 64 | pub enable_sonnet_1m: bool, |
| 65 | #[serde(default = "default_enabled")] |
| 66 | pub enable_opus_1m: bool, |
| 67 | #[serde(default)] |
| 68 | pub user_email: Option<String>, |
| 69 | #[serde(default)] |
| 70 | pub account_uuid: Option<String>, |
| 71 | #[serde(default)] |
| 72 | pub organization_uuid: Option<String>, |
| 73 | #[serde(default)] |
| 74 | pub subscription_type: Option<String>, |
| 75 | #[serde(default)] |
| 76 | pub rate_limit_tier: Option<String>, |
| 77 | #[serde(default)] |
| 78 | pub status: CredentialStatus, |
| 79 | #[serde(default)] |
| 80 | pub cooldown_until_unix_ms: Option<u64>, |
| 81 | #[serde(default)] |
| 82 | pub last_error: Option<String>, |
| 83 | #[serde(default)] |
| 84 | pub last_used_at_unix_ms: Option<u64>, |
| 85 | } |
| 86 | |
| 87 | #[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq, Default)] |
| 88 | #[serde(rename_all = "snake_case")] |
nothing calls this directly
no outgoing calls
no test coverage detected