Skip to content

Commit 8b09f02

Browse files
Automation: Update middleware to v0.44.0-nightly.20251202.1
1 parent 9f9f85c commit 8b09f02

File tree

6 files changed

+53
-7
lines changed

6 files changed

+53
-7
lines changed

Libraryfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
MIDDLE_VERSION=v0.44.0-nightly.20251126.1
1+
MIDDLE_VERSION=v0.44.0-nightly.20251202.1

Modules/ProtobufMessages/Sources/Protocol/Commands/Anytype_Rpc.Wallet.Create.swift

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ extension Anytype_Rpc.Wallet {
5656
/// Mnemonic of a new account (sequence of words, divided by spaces)
5757
public var mnemonic: String = String()
5858

59+
public var accountKey: String = String()
60+
5961
public var unknownFields = SwiftProtobuf.UnknownStorage()
6062

6163
public struct Error: Sendable {
@@ -187,7 +189,7 @@ extension Anytype_Rpc.Wallet.Create.Request: SwiftProtobuf.Message, SwiftProtobu
187189

188190
extension Anytype_Rpc.Wallet.Create.Response: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
189191
public static let protoMessageName: String = Anytype_Rpc.Wallet.Create.protoMessageName + ".Response"
190-
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}error\0\u{1}mnemonic\0")
192+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}error\0\u{1}mnemonic\0\u{1}accountKey\0")
191193

192194
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
193195
while let fieldNumber = try decoder.nextFieldNumber() {
@@ -197,6 +199,7 @@ extension Anytype_Rpc.Wallet.Create.Response: SwiftProtobuf.Message, SwiftProtob
197199
switch fieldNumber {
198200
case 1: try { try decoder.decodeSingularMessageField(value: &self._error) }()
199201
case 2: try { try decoder.decodeSingularStringField(value: &self.mnemonic) }()
202+
case 3: try { try decoder.decodeSingularStringField(value: &self.accountKey) }()
200203
default: break
201204
}
202205
}
@@ -213,12 +216,16 @@ extension Anytype_Rpc.Wallet.Create.Response: SwiftProtobuf.Message, SwiftProtob
213216
if !self.mnemonic.isEmpty {
214217
try visitor.visitSingularStringField(value: self.mnemonic, fieldNumber: 2)
215218
}
219+
if !self.accountKey.isEmpty {
220+
try visitor.visitSingularStringField(value: self.accountKey, fieldNumber: 3)
221+
}
216222
try unknownFields.traverse(visitor: &visitor)
217223
}
218224

219225
public static func ==(lhs: Anytype_Rpc.Wallet.Create.Response, rhs: Anytype_Rpc.Wallet.Create.Response) -> Bool {
220226
if lhs._error != rhs._error {return false}
221227
if lhs.mnemonic != rhs.mnemonic {return false}
228+
if lhs.accountKey != rhs.accountKey {return false}
222229
if lhs.unknownFields != rhs.unknownFields {return false}
223230
return true
224231
}

Modules/ProtobufMessages/Sources/Protocol/Commands/Anytype_Rpc.Wallet.CreateSession.swift

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ extension Anytype_Rpc.Wallet {
3535
set {auth = .mnemonic(newValue)}
3636
}
3737

38-
/// persistent app key, that can be used to restore session
38+
/// persistent app key, that can be used to restore session. Used for Local JSON API
3939
public var appKey: String {
4040
get {
4141
if case .appKey(let v)? = auth {return v}
@@ -53,15 +53,26 @@ extension Anytype_Rpc.Wallet {
5353
set {auth = .token(newValue)}
5454
}
5555

56+
/// private key of specific account
57+
public var accountKey: String {
58+
get {
59+
if case .accountKey(let v)? = auth {return v}
60+
return String()
61+
}
62+
set {auth = .accountKey(newValue)}
63+
}
64+
5665
public var unknownFields = SwiftProtobuf.UnknownStorage()
5766

5867
public enum OneOf_Auth: Equatable, Sendable {
5968
/// cold auth
6069
case mnemonic(String)
61-
/// persistent app key, that can be used to restore session
70+
/// persistent app key, that can be used to restore session. Used for Local JSON API
6271
case appKey(String)
6372
/// token from the previous session
6473
case token(String)
74+
/// private key of specific account
75+
case accountKey(String)
6576

6677
}
6778

@@ -180,7 +191,7 @@ extension Anytype_Rpc.Wallet.CreateSession: SwiftProtobuf.Message, SwiftProtobuf
180191

181192
extension Anytype_Rpc.Wallet.CreateSession.Request: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
182193
public static let protoMessageName: String = Anytype_Rpc.Wallet.CreateSession.protoMessageName + ".Request"
183-
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}mnemonic\0\u{1}appKey\0\u{1}token\0")
194+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}mnemonic\0\u{1}appKey\0\u{1}token\0\u{1}accountKey\0")
184195

185196
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
186197
while let fieldNumber = try decoder.nextFieldNumber() {
@@ -212,6 +223,14 @@ extension Anytype_Rpc.Wallet.CreateSession.Request: SwiftProtobuf.Message, Swift
212223
self.auth = .token(v)
213224
}
214225
}()
226+
case 4: try {
227+
var v: String?
228+
try decoder.decodeSingularStringField(value: &v)
229+
if let v = v {
230+
if self.auth != nil {try decoder.handleConflictingOneOf()}
231+
self.auth = .accountKey(v)
232+
}
233+
}()
215234
default: break
216235
}
217236
}
@@ -235,6 +254,10 @@ extension Anytype_Rpc.Wallet.CreateSession.Request: SwiftProtobuf.Message, Swift
235254
guard case .token(let v)? = self.auth else { preconditionFailure() }
236255
try visitor.visitSingularStringField(value: v, fieldNumber: 3)
237256
}()
257+
case .accountKey?: try {
258+
guard case .accountKey(let v)? = self.auth else { preconditionFailure() }
259+
try visitor.visitSingularStringField(value: v, fieldNumber: 4)
260+
}()
238261
case nil: break
239262
}
240263
try unknownFields.traverse(visitor: &visitor)

Modules/ProtobufMessages/Sources/Protocol/Commands/Anytype_Rpc.Wallet.Recover.swift

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,15 @@ extension Anytype_Rpc.Wallet {
2929
/// Path to a wallet directory
3030
public var rootPath: String = String()
3131

32-
/// Mnemonic of a wallet to recover
32+
/// Mnemonic of a wallet to recover (mutually exclusive with accountKey)
3333
public var mnemonic: String = String()
3434

3535
/// optional, default fts language
3636
public var fulltextPrimaryLanguage: String = String()
3737

38+
/// optional: serialized account master node (base64 encoded), used to auth account instead of mnemonic
39+
public var accountKey: String = String()
40+
3841
public var unknownFields = SwiftProtobuf.UnknownStorage()
3942

4043
public init() {}
@@ -151,7 +154,7 @@ extension Anytype_Rpc.Wallet.Recover: SwiftProtobuf.Message, SwiftProtobuf._Mess
151154

152155
extension Anytype_Rpc.Wallet.Recover.Request: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
153156
public static let protoMessageName: String = Anytype_Rpc.Wallet.Recover.protoMessageName + ".Request"
154-
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}rootPath\0\u{1}mnemonic\0\u{1}fulltextPrimaryLanguage\0")
157+
public static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}rootPath\0\u{1}mnemonic\0\u{1}fulltextPrimaryLanguage\0\u{1}accountKey\0")
155158

156159
public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
157160
while let fieldNumber = try decoder.nextFieldNumber() {
@@ -162,6 +165,7 @@ extension Anytype_Rpc.Wallet.Recover.Request: SwiftProtobuf.Message, SwiftProtob
162165
case 1: try { try decoder.decodeSingularStringField(value: &self.rootPath) }()
163166
case 2: try { try decoder.decodeSingularStringField(value: &self.mnemonic) }()
164167
case 3: try { try decoder.decodeSingularStringField(value: &self.fulltextPrimaryLanguage) }()
168+
case 4: try { try decoder.decodeSingularStringField(value: &self.accountKey) }()
165169
default: break
166170
}
167171
}
@@ -177,13 +181,17 @@ extension Anytype_Rpc.Wallet.Recover.Request: SwiftProtobuf.Message, SwiftProtob
177181
if !self.fulltextPrimaryLanguage.isEmpty {
178182
try visitor.visitSingularStringField(value: self.fulltextPrimaryLanguage, fieldNumber: 3)
179183
}
184+
if !self.accountKey.isEmpty {
185+
try visitor.visitSingularStringField(value: self.accountKey, fieldNumber: 4)
186+
}
180187
try unknownFields.traverse(visitor: &visitor)
181188
}
182189

183190
public static func ==(lhs: Anytype_Rpc.Wallet.Recover.Request, rhs: Anytype_Rpc.Wallet.Recover.Request) -> Bool {
184191
if lhs.rootPath != rhs.rootPath {return false}
185192
if lhs.mnemonic != rhs.mnemonic {return false}
186193
if lhs.fulltextPrimaryLanguage != rhs.fulltextPrimaryLanguage {return false}
194+
if lhs.accountKey != rhs.accountKey {return false}
187195
if lhs.unknownFields != rhs.unknownFields {return false}
188196
return true
189197
}

Modules/Services/Sources/Generated/BundledPropertiesValueProvider.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ public protocol BundledPropertiesValueProvider {
184184
var isMainChat: Bool { get }
185185
var lastMessageDate: Date? { get }
186186
var fileAvailableOffline: Bool { get }
187+
var analyticsChatId: String { get }
187188
}
188189

189190
public extension BundledPropertiesValueProvider where Self: PropertyValueProvider {
@@ -859,4 +860,8 @@ public extension BundledPropertiesValueProvider where Self: PropertyValueProvide
859860
var fileAvailableOffline: Bool {
860861
return value(for: BundledPropertyKey.fileAvailableOffline.rawValue)
861862
}
863+
/// Anonymous chat analytics id
864+
var analyticsChatId: String {
865+
return value(for: BundledPropertyKey.analyticsChatId.rawValue)
866+
}
862867
}

Modules/Services/Sources/Generated/BundledPropertyKey.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,4 +501,7 @@ public enum BundledPropertyKey: String, Sendable {
501501

502502
/// Is file available offline
503503
case fileAvailableOffline = "fileAvailableOffline"
504+
505+
/// Anonymous chat analytics id
506+
case analyticsChatId = "analyticsChatId"
504507
}

0 commit comments

Comments
 (0)