Skip to main content

langfuse_client_base/models/
skill_version.rs

1#![allow(deprecated)]
2/*
3 * server
4 *
5 * ## Real-time data  The only real-time path to get tracing data is to ingest via OpenTelemetry (`POST /api/public/otel/v1/traces`) and retrieve via Observations API v2 (`GET /api/public/v2/observations`) and Metrics API v2 (`GET /api/public/v2/metrics`). Other public API write and read endpoints can delay data by about 10 minutes. Direct OpenTelemetry exporters must send the `x-langfuse-ingestion-version: 4` header; current Python and JS SDKs already do. See the [Public API docs](https://langfuse.com/docs/api-and-data-platform/features/public-api) and [real-time ingestion](https://langfuse.com/integrations/native/opentelemetry.md#real-time-ingestion).  ## Authentication  Authenticate with the API using [Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication), get API keys in the project settings:  - username: Langfuse Public Key - password: Langfuse Secret Key  ## Exports  - OpenAPI spec: https://cloud.langfuse.com/generated/api/openapi.yml - Self-hosted deployments: interactive API reference at `/api/docs` and OpenAPI spec at `/api/openapi.yaml`
6 *
7 * The version of the OpenAPI document:
8 *
9 * Generated by: https://openapi-generator.tech
10 */
11
12use crate::models;
13use serde::{Deserialize, Serialize};
14
15#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, bon::Builder)]
16pub struct SkillVersion {
17    #[serde(rename = "id")]
18    pub id: String,
19    #[serde(rename = "createdAt")]
20    pub created_at: jiff::Timestamp,
21    #[serde(rename = "updatedAt")]
22    pub updated_at: jiff::Timestamp,
23    #[serde(rename = "projectId")]
24    pub project_id: String,
25    #[serde(rename = "createdBy")]
26    pub created_by: String,
27    #[serde(rename = "name")]
28    pub name: String,
29    #[serde(rename = "description")]
30    pub description: String,
31    #[serde(rename = "frontmatter", default)]
32    pub frontmatter: Option<serde_json::Value>,
33    #[serde(rename = "version")]
34    pub version: i64,
35    #[serde(rename = "tags")]
36    pub tags: Vec<String>,
37    #[serde(rename = "labels")]
38    pub labels: Vec<String>,
39    #[serde(rename = "commitMessage", default)]
40    pub commit_message: Option<String>,
41    #[serde(rename = "files")]
42    pub files: Vec<models::SkillFile>,
43}
44
45impl SkillVersion {
46    pub fn new(
47        id: String,
48        created_at: jiff::Timestamp,
49        updated_at: jiff::Timestamp,
50        project_id: String,
51        created_by: String,
52        name: String,
53        description: String,
54        frontmatter: Option<serde_json::Value>,
55        version: i64,
56        tags: Vec<String>,
57        labels: Vec<String>,
58        commit_message: Option<String>,
59        files: Vec<models::SkillFile>,
60    ) -> SkillVersion {
61        SkillVersion {
62            id,
63            created_at,
64            updated_at,
65            project_id,
66            created_by,
67            name,
68            description,
69            frontmatter,
70            version,
71            tags,
72            labels,
73            commit_message,
74            files,
75        }
76    }
77}
78
79impl crate::models::validation::Validate for SkillVersion {
80    fn validate_into(
81        &self,
82        _path: &crate::models::validation::Path<'_>,
83        _errors: &mut Vec<crate::models::validation::ValidationError>,
84    ) {
85    }
86}