Owner-authorized recovery of accumulated source changes.
Includes accepted work and in-progress changes; NOT a release or acceptance.
Parent baseline 1b6db09bd1. Runtime data, build caches and local credentials excluded.
68 lines
2.2 KiB
Rust
68 lines
2.2 KiB
Rust
use crank_core::{
|
|
WorkspaceId,
|
|
ids::PromptId,
|
|
prompt::{PromptDefinition, PromptDraft, PromptSensitivity},
|
|
prompt_composition::PromptDependencyPin,
|
|
};
|
|
use time::OffsetDateTime;
|
|
|
|
#[derive(Clone, Debug, PartialEq, Eq)]
|
|
pub struct PromptDraftRecord {
|
|
pub prompt: PromptDraft,
|
|
/// Точная опубликованная версия, если Prompt уже публиковался (Story 3.13).
|
|
pub latest_published_version: Option<u32>,
|
|
/// Разрешённые пины зависимостей этой версии в порядке объявления (Story 3.16).
|
|
pub dependencies: Vec<PromptDependencyPin>,
|
|
pub created_at: OffsetDateTime,
|
|
pub updated_at: OffsetDateTime,
|
|
}
|
|
|
|
/// Immutable Published Prompt Version, прочитанная по точному номеру версии.
|
|
#[derive(Clone, Debug, PartialEq, Eq)]
|
|
pub struct PromptPublicationRecord {
|
|
pub prompt_id: PromptId,
|
|
pub version: u32,
|
|
pub name: String,
|
|
pub description: String,
|
|
pub sensitivity: PromptSensitivity,
|
|
pub definition: PromptDefinition,
|
|
/// Пины зависимостей, зафиксированные публикацией (Story 3.16).
|
|
pub dependencies: Vec<PromptDependencyPin>,
|
|
pub published_at: OffsetDateTime,
|
|
}
|
|
|
|
#[derive(Debug)]
|
|
pub struct PublishPromptRequest {
|
|
pub workspace_id: WorkspaceId,
|
|
pub prompt_id: PromptId,
|
|
pub expected_updated_at: OffsetDateTime,
|
|
pub published_at: OffsetDateTime,
|
|
}
|
|
|
|
#[derive(Debug)]
|
|
pub struct ArchivePromptRequest {
|
|
pub workspace_id: WorkspaceId,
|
|
pub prompt_id: PromptId,
|
|
pub expected_updated_at: OffsetDateTime,
|
|
pub archived_at: OffsetDateTime,
|
|
}
|
|
|
|
#[derive(Debug)]
|
|
pub struct CreatePromptDraftRequest {
|
|
pub workspace_id: WorkspaceId,
|
|
pub prompt_id: PromptId,
|
|
pub sensitivity: PromptSensitivity,
|
|
pub definition: PromptDefinition,
|
|
pub created_at: OffsetDateTime,
|
|
}
|
|
|
|
#[derive(Debug)]
|
|
pub struct UpdatePromptDraftRequest {
|
|
pub workspace_id: WorkspaceId,
|
|
pub prompt_id: PromptId,
|
|
pub sensitivity: PromptSensitivity,
|
|
pub definition: PromptDefinition,
|
|
pub expected_updated_at: OffsetDateTime,
|
|
pub updated_at: OffsetDateTime,
|
|
}
|