mirror of
https://github.com/hanzoai/swift-sdk.git
synced 2026-10-30 18:20:19 +00:00
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.
46 lines
2.0 KiB
Swift
46 lines
2.0 KiB
Swift
//
|
|
// StorefrontResult.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct StorefrontResult: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** ImageURL is the absolute URL the listing's headerImage now points at. The image is REFERENCED, not copied — it stays in the org's studio output bucket, so removing it there empties the storefront tile. */
|
|
public var imageUrl: String?
|
|
/** Slug is the product handle the image was attached to. It IS the asset's `design` field — that equality is the whole join between the studio and the catalog, which is why an asset with no design produces no storefront result at all. */
|
|
public var slug: String?
|
|
/** Status is one of \"published\" (the product image was set), \"not_configured\" (no commerce edge, no store provisioned for the org, or a token that is not admin on the store — a fail-closed no-op) or \"failed\" (commerce answered and errored). None of the three fails the transition that produced it. */
|
|
public var status: String?
|
|
/** Store is the commerce store id the image landed in, resolved for the org mid-call. Present only on \"published\": a result that never got that far carries none. */
|
|
public var store: String?
|
|
|
|
public init(imageUrl: String? = nil, slug: String? = nil, status: String? = nil, store: String? = nil) {
|
|
self.imageUrl = imageUrl
|
|
self.slug = slug
|
|
self.status = status
|
|
self.store = store
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case imageUrl
|
|
case slug
|
|
case status
|
|
case store
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(imageUrl, forKey: .imageUrl)
|
|
try container.encodeIfPresent(slug, forKey: .slug)
|
|
try container.encodeIfPresent(status, forKey: .status)
|
|
try container.encodeIfPresent(store, forKey: .store)
|
|
}
|
|
}
|
|
|