1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import Foundation
/// social.grain.gallery.defs#galleryView
struct GrainGallery: Codable, Sendable, Identifiable {
let uri: String
let cid: String
var title: String?
var description: String?
var cameras: [String]?
var location: H3Location?
var address: Address?
var locationDisplay: String?
var facets: [Facet]?
let creator: GrainProfile
var record: AnyCodable?
var items: [GrainPhoto]?
var favCount: Int?
/// Accounts the viewer follows who favorited this gallery, capped server-side
/// for the card facepile. Never includes the viewer.
var favedByFollowing: [GrainProfile]?
var commentCount: Int?
var labels: [ATLabel]?
var createdAt: String?
let indexedAt: String
var viewer: GalleryViewerState?
var crossPost: CrossPostInfo?
var labelRevealed: Bool = false
var id: String {
uri
}
private enum CodingKeys: String, CodingKey {
case uri, cid, title, description, cameras, location, address, locationDisplay, facets, creator, record, items, favCount, favedByFollowing, commentCount, labels, createdAt, indexedAt, viewer, crossPost
}
}
/// social.grain.gallery.defs#viewerState
struct GalleryViewerState: Codable, Sendable {
var fav: String?
}
/// social.grain.gallery.defs#crossPostInfo
struct CrossPostInfo: Codable, Sendable {
let url: String
}