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

51 lines
2.2 KiB
Swift

//
// SocialPostBody.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct SocialPostBody: Sendable, Codable, ParameterConvertible, Hashable {
/** Channel is the network to publish to: x, facebook, instagram, linkedin, tiktok, youtube or threads. Omitted means x. Example: \"x\" */
public var channel: String?
/** Content is the post's text. Required — an empty body is a 400 — and bounded at 8192 characters, comfortably above every network's own limit. Example: \"Shipping today.\" */
public var content: String?
/** Media is the post's attached media as URLs, at most 10, each bounded at 1024 characters. Blank entries are dropped. Omitting it CLEARS any stored media. */
public var media: [String]?
/** ScheduleAt is when to publish, as a unix timestamp in SECONDS. 0 means unscheduled. A negative value is clamped to 0. It only matters for a post whose status is scheduled. */
public var scheduleAt: Int64?
/** Status is the post's lifecycle state: draft, scheduled, published or failed. Omitted means draft. The transient publishing claim is never settable here — accepting it from a request would let a caller wedge or replay the guard that stops two publishers double-posting the same row. */
public var status: String?
public init(channel: String? = nil, content: String? = nil, media: [String]? = nil, scheduleAt: Int64? = nil, status: String? = nil) {
self.channel = channel
self.content = content
self.media = media
self.scheduleAt = scheduleAt
self.status = status
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case channel
case content
case media
case scheduleAt
case status
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(channel, forKey: .channel)
try container.encodeIfPresent(content, forKey: .content)
try container.encodeIfPresent(media, forKey: .media)
try container.encodeIfPresent(scheduleAt, forKey: .scheduleAt)
try container.encodeIfPresent(status, forKey: .status)
}
}