@@ -105,7 +105,7 @@ struct Commit: Codable, Hashable, Identifiable {
105105
106106 /// The web's address of the commit, for Copy Link and Open on the Web.
107107 var webURL : URL {
108- htmlUrl . flatMap ( URL . init ( string : ) ) ?? APIClient . baseURL . appending ( path : " @ \( author ? . handle ?? " " ) / \( id ) " )
108+ htmlUrl . flatMap ( URL . init ( string : ) ) ?? APIClient . baseURL . appending ( path : " @ \( author ? . handle ?? " " ) /commits/ \( id ) " )
109109 }
110110
111111 /// The people who replied last, newest first, at most three, for the action row.
@@ -147,6 +147,8 @@ struct LogPage: Decodable {
147147struct CommitPage : Decodable {
148148 let data : Commit
149149 let ancestors : [ Commit ] ?
150+ /// Who a reply can go to besides the author: the people the commit's thread already addresses.
151+ var replyParticipants : [ User ] ? = nil
150152}
151153
152154struct Translation : Codable , Hashable {
@@ -214,9 +216,11 @@ struct Profile: Decodable {
214216 let streaks : Streaks ?
215217 let achievements : Achievements ?
216218 var pinnedCommit : Commit ?
219+ /// The handles the bio mentions that are on /dev/null, lowercased, so the rest link to GitHub.
220+ let bioProfiles : [ String : String ] ?
217221
218222 private enum CodingKeys : String , CodingKey {
219- case data , isFollowing , followsYou , isMuting , activity , streaks , achievements , pinnedCommit
223+ case data , isFollowing , followsYou , isMuting , activity , streaks , achievements , pinnedCommit , bioProfiles
220224 }
221225
222226 init ( from decoder : Decoder ) throws {
@@ -230,10 +234,12 @@ struct Profile: Decodable {
230234 streaks = try container . decodeIfPresent ( Streaks . self , forKey : . streaks )
231235 achievements = try container . decodeIfPresent ( Achievements . self , forKey : . achievements )
232236 pinnedCommit = try container . decodeIfPresent ( Commit . self , forKey : . pinnedCommit )
237+ bioProfiles = try? container . decodeIfPresent ( [ String : String ] . self , forKey : . bioProfiles )
233238 }
234239}
235240
236- /// A GitHub organization at an "@handle" no user has, mirrored from GitHub, as its page on the web shows it.
241+ /// A GitHub organization at an "@handle" no user has, mirrored from GitHub, as its page on the web shows it. Its page
242+ /// also says who follows it, its admins and the color they chose; a list says whether the user follows each one.
237243struct Organization : Decodable , Hashable , Identifiable {
238244 let handle : String
239245 let name : String
@@ -243,11 +249,23 @@ struct Organization: Decodable, Hashable, Identifiable {
243249 let website : String ?
244250 let githubUrl : String
245251 let htmlUrl : String
252+ var isFollowed : Bool ? = nil
253+ var followersCount : Int ? = nil
254+ var lane : Lane ? = nil
255+ var admins : [ User ] ? = nil
246256
247257 var id : String { handle }
248258 var avatarURL : URL ? { avatarUrl . flatMap ( URL . init ( string : ) ) }
249259}
250260
261+ /// GET organizations/{handle}: the page, with what only a signed request gets beside it.
262+ struct OrganizationPage : Decodable {
263+ var data : Organization
264+ var isFollowing : Bool ? = nil
265+ var canClaim : Bool ? = nil
266+ var settingsUrl : String ? = nil
267+ }
268+
251269// MARK: - Notifications
252270
253271enum NotificationKind : String , Codable , Hashable {
@@ -259,6 +277,7 @@ enum NotificationKind: String, Codable, Hashable {
259277 case quoted
260278 case starred
261279 case leveledUp = " leveled_up "
280+ case firstCommit = " first_commit "
262281 case unknown
263282
264283 init ( from decoder : Decoder ) throws {
@@ -272,6 +291,7 @@ enum NotificationKind: String, Codable, Hashable {
272291 case . quoted : " arrow.2.squarepath "
273292 case . starred : " star "
274293 case . mentioned : " at "
294+ case . firstCommit : " arrow.triangle.branch "
275295 case . approved : " checkmark "
276296 case . rejected : " xmark "
277297 case . leveledUp , . unknown : " chevron.up.2 "
0 commit comments