Skip to content

Commit 1c91146

Browse files
committed
Update lexicon models and methods
1 parent cb1aa40 commit 1c91146

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

Sources/ATProtoKit/Models/Lexicons/app.bsky/Feed/AppBskyFeedDefs.swift

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,19 @@ extension AppBskyLexicon.Feed {
147147
}
148148
}
149149

150+
/// A definition model for metadata about this post in the thread context.
151+
///
152+
/// - Note: According to the AT Protocol specifications: "Metadata about this post within the context of the thread it is in."
153+
///
154+
/// - SeeAlso: This is based on the [`app.bsky.feed.defs`][github] lexicon.
155+
///
156+
/// [github]: https://github.com/bluesky-social/atproto/blob/main/lexicons/app/bsky/feed/defs.json
157+
public struct ThreadContextDefinition: Sendable, Codable, Equatable, Hashable {
158+
159+
/// The URI of the root author's like record.
160+
public let rootAuthorLike: String
161+
}
162+
150163
/// A definition model for a feed's view.
151164
///
152165
/// - SeeAlso: This is based on the [`app.bsky.feed.defs`][github] lexicon.
@@ -266,6 +279,9 @@ extension AppBskyLexicon.Feed {
266279

267280
/// An array of posts of various types. Optional.
268281
public let replies: [ATUnion.ThreadViewPostRepliesUnion]?
282+
283+
/// The context of the thread view. Optional.
284+
public let threadContext: ThreadContextDefinition?
269285
}
270286

271287
/// A definition model for a post that may not have been found.

Sources/ATProtoKit/Models/Lexicons/app.bsky/Feed/AppBskyFeedGetAuthorFeed.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ extension AppBskyLexicon.Feed {
2929

3030
/// Indicates the array of feeds will contain posts that are threads.
3131
case postAndAuthorThreads = "posts_and_author_threads"
32+
33+
/// Indicates the array of the feeds will contain videos.
34+
case postsWithVideo = "posts_with_video"
3235
}
3336
}
3437

Sources/ATProtoKit/Models/Lexicons/tools.ozone/Moderation/ToolsOzoneModerationDefs.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -611,10 +611,17 @@ extension ToolsOzoneLexicon.Moderation {
611611
/// An array of labels that's applied to a user for the purpose of negating.
612612
public let negateLabelValues: [String]
613613

614+
/// Indicates the duration of the label’s validity, applicable only to newly added labels.
615+
///
616+
/// - Note: According to the AT Protocol specifications: "Indicates how long the label
617+
/// will remain on the subject. Only applies on labels that are being added."
618+
public let durationInHours: Int?
619+
614620
enum CodingKeys: String, CodingKey {
615621
case comment
616622
case createLabelValues = "createLabelVals"
617623
case negateLabelValues = "negateLabelVals"
624+
case durationInHours
618625
}
619626
}
620627

0 commit comments

Comments
 (0)