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

84 lines
4.1 KiB
Swift

//
// Endpoint.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct Endpoint: Sendable, Codable, ParameterConvertible, Hashable {
/** CreatedAt is when the endpoint was registered, RFC3339 in UTC — stored in that spelling because it sorts as a string. */
public var created: String?
/** Deliveries7d is how many deliveries SETTLED in the trailing 7 days — the attempts that ended ok or failed, so a delivery still retrying is in neither counter yet. It is counted from the log at read time rather than stored, and it is filled only on a list or a get; a create answers 0 because there is no history, which is why it is never omitted. */
public var deliveries7d: Int64?
/** Description is the operator's own label for the endpoint. Never sent anywhere. */
public var description: String?
/** Events are the subject patterns this endpoint subscribes to (\"commerce.order.>\"). An EMPTY list means every event, not none. */
public var events: [String]?
/** Failures7d is how many of those settled as failed — the subscriber never accepted it and no further attempt will be made. It is the numerator to Deliveries7d, over the same window. */
public var failures7d: Int64?
/** ID is the endpoint's handle, server-minted and stable for its life. It is what every other route here addresses. */
public var id: String?
/** Org is the tenant that owns the endpoint, taken from the validated principal rather than from any request field. */
public var org: String?
/** Secret is the HMAC-SHA256 signing key a subscriber recomputes the signature with. It is returned exactly ONCE, on create: a later read of the endpoint omits it, so a lost secret is replaced rather than recovered. */
public var secret: String?
/** Status is \"active\" or \"disabled\" — nothing else is accepted. A disabled endpoint keeps its subscription and receives no deliveries, except a manual test send, which goes out anyway. */
public var status: String?
/** UpdatedAt is when its url, events, status or description last changed. */
public var updated: String?
/** URL is where the POST goes. Changing it is the one edit that redirects an org's events, which is why it is never bindable from a query string. */
public var url: String?
public init(created: String? = nil, deliveries7d: Int64? = nil, description: String? = nil, events: [String]? = nil, failures7d: Int64? = nil, id: String? = nil, org: String? = nil, secret: String? = nil, status: String? = nil, updated: String? = nil, url: String? = nil) {
self.created = created
self.deliveries7d = deliveries7d
self.description = description
self.events = events
self.failures7d = failures7d
self.id = id
self.org = org
self.secret = secret
self.status = status
self.updated = updated
self.url = url
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case created
case deliveries7d
case description
case events
case failures7d
case id
case org
case secret
case status
case updated
case url
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(created, forKey: .created)
try container.encodeIfPresent(deliveries7d, forKey: .deliveries7d)
try container.encodeIfPresent(description, forKey: .description)
try container.encodeIfPresent(events, forKey: .events)
try container.encodeIfPresent(failures7d, forKey: .failures7d)
try container.encodeIfPresent(id, forKey: .id)
try container.encodeIfPresent(org, forKey: .org)
try container.encodeIfPresent(secret, forKey: .secret)
try container.encodeIfPresent(status, forKey: .status)
try container.encodeIfPresent(updated, forKey: .updated)
try container.encodeIfPresent(url, forKey: .url)
}
}
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
extension Endpoint: Identifiable {}