import Foundation /// One row of `webhook list`. nonisolated struct Webhook: Decodable, Sendable, Hashable, Identifiable { let id: Int64 let url: String let events: String let active: Bool let hasSecret: Bool enum CodingKeys: String, CodingKey { case id, url, events, active case hasSecret = "has_secret" } } /// One row of `webhook deliveries`. nonisolated struct WebhookDelivery: Decodable, Sendable, Hashable, Identifiable { let id: Int64 let url: String let event: String let status: String let attempts: Int let lastStatus: Int? let lastError: String? enum CodingKeys: String, CodingKey { case id, url, event, status, attempts case lastStatus = "last_status" case lastError = "last_error" } }