1use serde::{Deserialize, Serialize};
4
5#[derive(Debug, Clone, Deserialize)]
6pub enum RepoStatus {
7 #[serde(rename = "syncing")]
8 Syncing,
9}
10
11#[derive(Debug, Clone, Deserialize)]
13pub struct Repo {
14 pub id: String,
16 pub org: String,
18 pub name: String,
20 pub default_branch: String,
22 pub size_bytes: u64,
24 pub last_push_at: Option<String>,
26 pub created_at: String,
28 pub status: Option<RepoStatus>,
30}
31
32#[derive(Debug, Clone, Serialize)]
34pub struct CreateRepoRequest {
35 pub name: String,
37 #[serde(skip_serializing_if = "Option::is_none")]
39 pub default_branch: Option<String>,
40}
41
42#[derive(Debug, Clone, Serialize)]
44pub struct RenameRepoRequest {
45 pub name: String,
47}
48
49#[derive(Debug, Clone, Deserialize)]
51pub struct ListReposResponse {
52 pub repos: Vec<Repo>,
54 pub next_cursor: Option<String>,
56 pub has_more: bool,
58}