Skip to content

Commit c9a9c83

Browse files
authored
Merge pull request #332 from mcprostar205/main
Add missing init in preferences and include new Describe Server property for blobUploadLimit
2 parents fab7fef + e1d73bc commit c9a9c83

2 files changed

Lines changed: 36 additions & 0 deletions

File tree

Sources/ATProtoKit/Models/Lexicons/app.bsky/Actor/AppBskyActorDefs.swift

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,21 @@ extension AppBskyLexicon.Actor {
6060
/// - Note: According to the AT Protocol specifications: "Debug information for internal development."
6161
public let debug: UnknownType?
6262

63+
public init(actorDID: String, actorHandle: String, displayName: String? = nil, pronouns: String? = nil, avatarImageURL: URL? = nil, associated: ProfileAssociatedDefinition? = nil, viewer: ViewerStateDefinition? = nil, labels: [ComAtprotoLexicon.Label.LabelDefinition]? = nil, createdAt: Date? = nil, verificationState: VerificationStateDefinition? = nil, status: StatusViewDefinition? = nil, debug: UnknownType? = nil) {
64+
self.actorDID = actorDID
65+
self.actorHandle = actorHandle
66+
self.displayName = displayName
67+
self.pronouns = pronouns
68+
self.avatarImageURL = avatarImageURL
69+
self.associated = associated
70+
self.viewer = viewer
71+
self.labels = labels
72+
self.createdAt = createdAt
73+
self.verificationState = verificationState
74+
self.status = status
75+
self.debug = debug
76+
}
77+
6378
public init(from decoder: any Decoder) throws {
6479
let container = try decoder.container(keyedBy: CodingKeys.self)
6580

@@ -169,6 +184,23 @@ extension AppBskyLexicon.Actor {
169184
/// - Note: According to the AT Protocol specifications: "Debug information for internal development."
170185
public let debug: UnknownType?
171186

187+
public init(actorDID: String, actorHandle: String, displayName: String? = nil, description: String? = nil, pronouns: String? = nil, websiteURL: URL? = nil, avatarImageURL: URL? = nil, associated: ProfileAssociatedDefinition? = nil, indexedAt: Date? = nil, createdAt: Date? = nil, viewer: ViewerStateDefinition? = nil, labels: [ComAtprotoLexicon.Label.LabelDefinition]? = nil, verificationState: VerificationStateDefinition? = nil, status: StatusViewDefinition? = nil, debug: UnknownType? = nil) {
188+
self.actorDID = actorDID
189+
self.actorHandle = actorHandle
190+
self.displayName = displayName
191+
self.description = description
192+
self.pronouns = pronouns
193+
self.websiteURL = websiteURL
194+
self.avatarImageURL = avatarImageURL
195+
self.associated = associated
196+
self.indexedAt = indexedAt
197+
self.createdAt = createdAt
198+
self.viewer = viewer
199+
self.labels = labels
200+
self.verificationState = verificationState
201+
self.status = status
202+
self.debug = nil
203+
}
172204
public init(from decoder: any Decoder) throws {
173205
let container = try decoder.container(keyedBy: CodingKeys.self)
174206

Sources/ATProtoKit/Models/Lexicons/com.atproto/Server/ComAtprotoServerDescribeServer.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,17 @@ extension ComAtprotoLexicon.Server {
9595
/// The decentralized identifier (DID) of the server.
9696
public let serverDID: String
9797

98+
/// Maximum size of a blob that can be uploaded via com.atproto.repo.uploadBlob, in bytes.
99+
public let blobUploadLimit: Int?
100+
98101
enum CodingKeys: String, CodingKey {
99102
case isInviteCodeRequired = "inviteCodeRequired"
100103
case isPhoneVerificationRequired = "phoneVerificationRequired"
101104
case availableUserDomains
102105
case servicePolicyURLs = "links"
103106
case contactInformation = "contact"
104107
case serverDID = "did"
108+
case blobUploadLimit
105109
}
106110
}
107111
}

0 commit comments

Comments
 (0)