1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Serialize, Deserialize)]
6pub struct SkillsIndex {
7 pub hub_id: String,
8 pub generated_at: String,
9 pub skills: Vec<SkillEntry>,
10}
11
12#[derive(Debug, Serialize, Deserialize)]
13pub struct SkillEntry {
14 pub slug: String,
15 pub name: String,
16 pub description: String,
17 pub version: String,
18 #[serde(skip_serializing_if = "Option::is_none")]
19 pub compatibility: Option<String>,
20 #[serde(skip_serializing_if = "Option::is_none")]
21 pub license: Option<String>,
22 pub git_url: String,
23 pub path: String,
24 pub commit: String,
25 #[serde(default)]
26 pub has_lifecycle: bool,
27}
28
29#[derive(Debug, Serialize, Deserialize)]
32pub struct DocsIndex {
33 #[serde(rename = "type")]
34 pub kind: String,
35 pub version: String,
36 pub entries: Vec<DocEntry>,
37 pub metadata: DocsMetadata,
38}
39
40#[derive(Debug, Serialize, Deserialize)]
41pub struct DocEntry {
42 pub title: String,
43 pub summary: String,
44 pub path: String,
45 pub commit_hash: String,
46 pub last_updated: String,
47 pub status: DocStatus,
48 pub read_when: Vec<String>,
49}
50
51#[derive(Debug, Serialize, Deserialize)]
52#[serde(rename_all = "lowercase")]
53pub enum DocStatus {
54 Active,
55 Draft,
56 Deprecated,
57}
58
59#[derive(Debug, Serialize, Deserialize)]
60pub struct DocsMetadata {
61 pub generated_at: String,
62 pub commit_hash: String,
63 pub total_entries: usize,
64}