Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

cloud_api_types: Add types for `POST /client/llm_tokens` endpoint (#35420)

Marshall Bowersb59f9929280e
diff --git a/crates/cloud_api_types/src/cloud_api_types.rs b/crates/cloud_api_types/src/cloud_api_types.rs
index 9f797703150..e4d4a27af5b 100644
--- a/crates/cloud_api_types/src/cloud_api_types.rs
+++ b/crates/cloud_api_types/src/cloud_api_types.rs
@@ -4,6 +4,8 @@ use serde::{Deserialize, Serialize};
pub use crate::timestamp::Timestamp;
+pub const ZED_SYSTEM_ID_HEADER_NAME: &str = "x-zed-system-id";
+
#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct GetAuthenticatedUserResponse {
pub user: AuthenticatedUser,
@@ -38,3 +40,11 @@ pub struct SubscriptionPeriod {
pub started_at: Timestamp,
pub ended_at: Timestamp,
}
+
+#[derive(Debug, PartialEq, Clone, Serialize, Deserialize)]
+pub struct LlmToken(pub String);
+
+#[derive(Debug, PartialEq, Clone, Serialize, Deserialize)]
+pub struct CreateLlmTokenResponse {
+ pub token: LlmToken,
+}