Files
zeekay 0c2f028a8c Generate the Swift client, which this copy did not carry
The forge tree held the package scaffolding and none of the generated sources —
2,435 files of APIs, Models and Infrastructure, including BaseAPI, were simply
absent, so anything depending on this copy had a package that compiled to
nothing usable.

Generated from the current API document rather than reconciled with the other
copy: a client is a function of the spec, so regenerating answers "which history
wins" without anyone having to choose. .spec-lock records which document, so the
next reader can tell.
2026-08-23 10:04:41 -07:00

85 lines
4.4 KiB
Swift

//
// ProjectsUpdate.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct ProjectsUpdate: Sendable, Codable, ParameterConvertible, Hashable {
/** CacheControl replaces the Cache-Control policy the edge serves this site's HTML under. Absent leaves it. */
public var cacheControl: String?
/** Description replaces the one-line summary. Absent leaves it. */
public var description: String?
/** Framework replaces the build hint. It affects the NEXT build only — nothing already deployed is rebuilt. */
public var framework: String?
/** Hidden is MODERATION, and the only admin-gated field on this body: it pulls a public project out of the catalogue from admin.hanzo.ai without editing the publisher's own visibility choice, so un-hiding restores exactly what they asked for. A tenant sending it is ignored. */
public var hidden: Bool?
/** HiddenReason records WHY moderation hid it, so the action can be explained and reviewed later. Admin-gated like hidden itself. */
public var hiddenReason: String?
/** License is the terms that upstream work carries, with the same clear-versus- leave rule. */
public var license: String?
/** Name replaces the display name. Absent leaves it; the slug never moves with it. */
public var name: String?
public var repo: ProjectsUpdateRepo?
/** Slug is the project to update, from the path. The URL is the addressing authority — a `slug` in the body cannot move the write to another project. */
public var slug: String?
/** Tags sets the site's browser tag config: platform slug → non-secret pixel id (e.g. {\"ga4\":\"G-…\",\"meta\":\"…\"}). track.js injects these first-party and the server CAPI reads them, per site. Absent LEAVES them; a present object REPLACES the set (send {} to clear). The ids are public — they ship in the page — so this is not the SECRET path (a CAPI token is sealed via POST /v1/destination). */
public var tags: [String: String]?
/** Upstream credits the third-party work this project was published from, and is settable after the fact because the live demos are the ones that most need crediting. An explicit empty string CLEARS the credit; absent leaves it. */
public var upstream: String?
/** Visibility flips an existing project between \"public\" and \"private\". Same ONE rule as at create: public is free, private needs a paid plan. */
public var visibility: String?
public init(cacheControl: String? = nil, description: String? = nil, framework: String? = nil, hidden: Bool? = nil, hiddenReason: String? = nil, license: String? = nil, name: String? = nil, repo: ProjectsUpdateRepo? = nil, slug: String? = nil, tags: [String: String]? = nil, upstream: String? = nil, visibility: String? = nil) {
self.cacheControl = cacheControl
self.description = description
self.framework = framework
self.hidden = hidden
self.hiddenReason = hiddenReason
self.license = license
self.name = name
self.repo = repo
self.slug = slug
self.tags = tags
self.upstream = upstream
self.visibility = visibility
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case cacheControl
case description
case framework
case hidden
case hiddenReason
case license
case name
case repo
case slug
case tags
case upstream
case visibility
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(cacheControl, forKey: .cacheControl)
try container.encodeIfPresent(description, forKey: .description)
try container.encodeIfPresent(framework, forKey: .framework)
try container.encodeIfPresent(hidden, forKey: .hidden)
try container.encodeIfPresent(hiddenReason, forKey: .hiddenReason)
try container.encodeIfPresent(license, forKey: .license)
try container.encodeIfPresent(name, forKey: .name)
try container.encodeIfPresent(repo, forKey: .repo)
try container.encodeIfPresent(slug, forKey: .slug)
try container.encodeIfPresent(tags, forKey: .tags)
try container.encodeIfPresent(upstream, forKey: .upstream)
try container.encodeIfPresent(visibility, forKey: .visibility)
}
}