mirror of
https://github.com/hanzoai/swift-sdk.git
synced 2026-10-30 18:20:19 +00:00
The projection these were generated from predated the compute migration, so they described /v1/visor — which the API serves at zero paths now. No /v1/visor path survives here.
51 lines
1.9 KiB
Swift
51 lines
1.9 KiB
Swift
//
|
|
// LastEventView.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct LastEventView: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Actor is who produced the turn, defaulted to the calling principal when the writer named nobody. */
|
|
public var actor: String?
|
|
/** At is when the turn was recorded, RFC 3339 in UTC to the second. */
|
|
public var at: String?
|
|
/** Kind is what the turn was, from the log's closed six: message, tool-call, spawn, log, status, control. */
|
|
public var kind: String?
|
|
/** Preview is the first 240 bytes of the event's payload, cut without regard for the JSON inside it — it is a string to SHOW, never a value to parse. Read the detail or the stream for the whole payload. */
|
|
public var preview: String?
|
|
/** Seq is that event's position in the session's log — monotonic from 1, per session. A reader holding it can ask the detail or stream reads for everything after it, so this doubles as the list's resume cursor. */
|
|
public var seq: Int64?
|
|
|
|
public init(actor: String? = nil, at: String? = nil, kind: String? = nil, preview: String? = nil, seq: Int64? = nil) {
|
|
self.actor = actor
|
|
self.at = at
|
|
self.kind = kind
|
|
self.preview = preview
|
|
self.seq = seq
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case actor
|
|
case at
|
|
case kind
|
|
case preview
|
|
case seq
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(actor, forKey: .actor)
|
|
try container.encodeIfPresent(at, forKey: .at)
|
|
try container.encodeIfPresent(kind, forKey: .kind)
|
|
try container.encodeIfPresent(preview, forKey: .preview)
|
|
try container.encodeIfPresent(seq, forKey: .seq)
|
|
}
|
|
}
|
|
|