···11+import Foundation
22+33+public struct ListRecordsOutput: Decodable, Sendable {
44+ public struct Record: Decodable, Sendable {
55+ public let uri: String
66+ public let cid: String
77+ /// Pretty-printed, sorted-keys JSON bytes of the record value. Callers
88+ /// write these bytes directly to disk when rendering records as files.
99+ public let value: Data
1010+1111+ enum CodingKeys: String, CodingKey { case uri, cid, value }
1212+1313+ public init(from decoder: Decoder) throws {
1414+ let c = try decoder.container(keyedBy: CodingKeys.self)
1515+ uri = try c.decode(String.self, forKey: .uri)
1616+ cid = try c.decode(String.self, forKey: .cid)
1717+ let any = try c.decode(AnyDecodable.self, forKey: .value)
1818+ value = try JSONSerialization.data(
1919+ withJSONObject: any.value,
2020+ options: [.prettyPrinted, .sortedKeys]
2121+ )
2222+ }
2323+ }
2424+2525+ public let records: [Record]
2626+ public let cursor: String?
2727+}