update-bundle/src/receipt.rs
//! Machine-readable receipts emitted by finalize and import. Receipts never carry
//! a private key, token, password, or secret file content — only identities,
//! digests, and counts.
use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
use crate::verify::ApprovalRecord;
/// Emitted by `holger-bundle finalize`.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct FinalizationReceipt {
pub bundle_id: String,
pub sequence: u64,
pub supplier: String,
pub product: String,
pub release_version: String,
pub candidate_digest: String,
pub release_signer_fingerprint: String,
pub approvals: Vec<ApprovalRecord>,
pub finalized_at: DateTime<Utc>,
/// SHA-256 of the finalized `.holger.znippy` file.
pub bundle_sha256: String,
pub bundle_size_bytes: u64,
}
/// Emitted by `holger-server bundle import`.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ImportReceipt {
pub bundle_id: String,
pub sequence: u64,
pub supplier: String,
pub product: String,
pub release_version: String,
pub candidate_digest: String,
pub release_signer_fingerprint: String,
pub imported_at: DateTime<Utc>,
/// "new" or "idempotent-reimport".
pub outcome: String,
/// SHA-256 of the imported bundle file.
pub bundle_sha256: String,
}