Files
zeekay 1df3ddf6bd Regenerate against the document the deployment answers for
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.
2026-09-05 18:55:38 -07:00

63 lines
2.8 KiB
Swift

//
// EventView.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct EventView: Sendable, Codable, ParameterConvertible, Hashable {
/** Actor is who produced the turn. A write that names nobody takes the calling principal, so this is rarely empty in practice. */
public var actor: String?
/** CreatedAt is when the turn was recorded, RFC 3339 in UTC to the second. Seconds are coarse enough that two turns can share one, which is why Seq and not this is the order. */
public var createdAt: String?
/** ID is the event's own handle, minted as \"evt_\" + 32 hex characters. It identifies the turn; Seq is what ORDERS it. */
public var id: String?
/** Kind is what the turn IS, from a closed six: message (a model turn), tool-call, spawn (a subagent started), log, status, control (a steering command the running surface consumes). Anything else is refused at the write. */
public var kind: String?
public var payload: JSONValue?
/** Seq is the turn's position in this session's log: monotonic from 1, assigned by the store inside the insert, and unique PER SESSION rather than globally. It is the cursor a reader resumes from after a reconnect — ask for everything after your last-seen seq. */
public var seq: Int64?
/** SessionID is the session this turn belongs to. Carried on every event so a stream frame stands alone — a subscriber watching a whole tree gets turns from several sessions down one connection. */
public var sessionId: String?
public init(actor: String? = nil, createdAt: String? = nil, id: String? = nil, kind: String? = nil, payload: JSONValue? = nil, seq: Int64? = nil, sessionId: String? = nil) {
self.actor = actor
self.createdAt = createdAt
self.id = id
self.kind = kind
self.payload = payload
self.seq = seq
self.sessionId = sessionId
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case actor
case createdAt
case id
case kind
case payload
case seq
case sessionId
}
// 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(createdAt, forKey: .createdAt)
try container.encodeIfPresent(id, forKey: .id)
try container.encodeIfPresent(kind, forKey: .kind)
try container.encodeIfPresent(payload, forKey: .payload)
try container.encodeIfPresent(seq, forKey: .seq)
try container.encodeIfPresent(sessionId, forKey: .sessionId)
}
}
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
extension EventView: Identifiable {}