diff --git a/Libraryfile b/Libraryfile index c55911ad1b..3b31843631 100644 --- a/Libraryfile +++ b/Libraryfile @@ -1 +1 @@ -MIDDLE_VERSION=v0.32.0-rc8 +MIDDLE_VERSION=v0.32.0-rc10 diff --git a/Modules/ProtobufMessages/Sources/Generated/commands+invocation.swift b/Modules/ProtobufMessages/Sources/Generated/commands+invocation.swift index 87f7bae383..de9ffc0d8f 100644 --- a/Modules/ProtobufMessages/Sources/Generated/commands+invocation.swift +++ b/Modules/ProtobufMessages/Sources/Generated/commands+invocation.swift @@ -1066,6 +1066,11 @@ extension Anytype_Rpc.Space.RequestDecline.Response.Error: ResponseError { public var isNull: Bool { code == .null } } +extension Anytype_Rpc.Space.StopSharing.Response: ResultWithError {} +extension Anytype_Rpc.Space.StopSharing.Response.Error: ResponseError { + public var isNull: Bool { code == .null } +} + extension Anytype_Rpc.Template.Clone.Response: ResultWithError {} extension Anytype_Rpc.Template.Clone.Response.Error: ResponseError { public var isNull: Bool { code == .null } diff --git a/Modules/ProtobufMessages/Sources/Generated/service+invocation.swift b/Modules/ProtobufMessages/Sources/Generated/service+invocation.swift index 5e1ff80ba1..6f5ac17bce 100644 --- a/Modules/ProtobufMessages/Sources/Generated/service+invocation.swift +++ b/Modules/ProtobufMessages/Sources/Generated/service+invocation.swift @@ -394,6 +394,16 @@ public struct ClientCommands { } } + public static func spaceStopSharing( + _ request: Anytype_Rpc.Space.StopSharing.Request = .init() + ) -> Invocation { + return Invocation(messageName: "SpaceStopSharing", request: request) { request in + let requestData = try request.serializedData() + let responseData = Lib.ServiceSpaceStopSharing(requestData) ?? Data() + return try Anytype_Rpc.Space.StopSharing.Response(serializedData: responseData) + } + } + public static func spaceRequestApprove( _ request: Anytype_Rpc.Space.RequestApprove.Request = .init() ) -> Invocation { diff --git a/Modules/ProtobufMessages/Sources/Protocol/commands.pb.swift b/Modules/ProtobufMessages/Sources/Protocol/commands.pb.swift index bab77a7740..acd7d96dc3 100644 --- a/Modules/ProtobufMessages/Sources/Protocol/commands.pb.swift +++ b/Modules/ProtobufMessages/Sources/Protocol/commands.pb.swift @@ -443,6 +443,103 @@ public struct Anytype_Rpc { public init() {} } + public struct StopSharing { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public struct Request { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var spaceID: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + } + + public struct Response { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var error: Anytype_Rpc.Space.StopSharing.Response.Error { + get {return _error ?? Anytype_Rpc.Space.StopSharing.Response.Error()} + set {_error = newValue} + } + /// Returns true if `error` has been explicitly set. + public var hasError: Bool {return self._error != nil} + /// Clears the value of `error`. Subsequent reads from it will return its default value. + public mutating func clearError() {self._error = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public struct Error { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + public var code: Anytype_Rpc.Space.StopSharing.Response.Error.Code = .null + + public var description_p: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public enum Code: SwiftProtobuf.Enum { + public typealias RawValue = Int + case null // = 0 + case unknownError // = 1 + case badInput // = 2 + case noSuchSpace // = 101 + case spaceIsDeleted // = 102 + case requestFailed // = 103 + case UNRECOGNIZED(Int) + + public init() { + self = .null + } + + public init?(rawValue: Int) { + switch rawValue { + case 0: self = .null + case 1: self = .unknownError + case 2: self = .badInput + case 101: self = .noSuchSpace + case 102: self = .spaceIsDeleted + case 103: self = .requestFailed + default: self = .UNRECOGNIZED(rawValue) + } + } + + public var rawValue: Int { + switch self { + case .null: return 0 + case .unknownError: return 1 + case .badInput: return 2 + case .noSuchSpace: return 101 + case .spaceIsDeleted: return 102 + case .requestFailed: return 103 + case .UNRECOGNIZED(let i): return i + } + } + + } + + public init() {} + } + + public init() {} + + fileprivate var _error: Anytype_Rpc.Space.StopSharing.Response.Error? = nil + } + + public init() {} + } + public struct InviteGetCurrent { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for @@ -5904,6 +6001,8 @@ public struct Anytype_Rpc { /// Clears the value of `details`. Subsequent reads from it will return its default value. public mutating func clearDetails() {self._details = nil} + public var addPageContent: Bool = false + public var unknownFields = SwiftProtobuf.UnknownStorage() public init() {} @@ -26140,6 +26239,18 @@ extension Anytype_Rpc.Space.InviteGenerate.Response.Error.Code: CaseIterable { ] } +extension Anytype_Rpc.Space.StopSharing.Response.Error.Code: CaseIterable { + // The compiler won't synthesize support with the UNRECOGNIZED case. + public static let allCases: [Anytype_Rpc.Space.StopSharing.Response.Error.Code] = [ + .null, + .unknownError, + .badInput, + .noSuchSpace, + .spaceIsDeleted, + .requestFailed, + ] +} + extension Anytype_Rpc.Space.InviteGetCurrent.Response.Error.Code: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. public static let allCases: [Anytype_Rpc.Space.InviteGetCurrent.Response.Error.Code] = [ @@ -28501,6 +28612,11 @@ extension Anytype_Rpc.Space.InviteGenerate.Request: @unchecked Sendable {} extension Anytype_Rpc.Space.InviteGenerate.Response: @unchecked Sendable {} extension Anytype_Rpc.Space.InviteGenerate.Response.Error: @unchecked Sendable {} extension Anytype_Rpc.Space.InviteGenerate.Response.Error.Code: @unchecked Sendable {} +extension Anytype_Rpc.Space.StopSharing: @unchecked Sendable {} +extension Anytype_Rpc.Space.StopSharing.Request: @unchecked Sendable {} +extension Anytype_Rpc.Space.StopSharing.Response: @unchecked Sendable {} +extension Anytype_Rpc.Space.StopSharing.Response.Error: @unchecked Sendable {} +extension Anytype_Rpc.Space.StopSharing.Response.Error.Code: @unchecked Sendable {} extension Anytype_Rpc.Space.InviteGetCurrent: @unchecked Sendable {} extension Anytype_Rpc.Space.InviteGetCurrent.Request: @unchecked Sendable {} extension Anytype_Rpc.Space.InviteGetCurrent.Response: @unchecked Sendable {} @@ -30385,6 +30501,142 @@ extension Anytype_Rpc.Space.InviteGenerate.Response.Error.Code: SwiftProtobuf._P ] } +extension Anytype_Rpc.Space.StopSharing: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = Anytype_Rpc.Space.protoMessageName + ".StopSharing" + public static let _protobuf_nameMap = SwiftProtobuf._NameMap() + + public mutating func decodeMessage(decoder: inout D) throws { + while let _ = try decoder.nextFieldNumber() { + } + } + + public func traverse(visitor: inout V) throws { + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Anytype_Rpc.Space.StopSharing, rhs: Anytype_Rpc.Space.StopSharing) -> Bool { + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Anytype_Rpc.Space.StopSharing.Request: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = Anytype_Rpc.Space.StopSharing.protoMessageName + ".Request" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "spaceId"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self.spaceID) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if !self.spaceID.isEmpty { + try visitor.visitSingularStringField(value: self.spaceID, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Anytype_Rpc.Space.StopSharing.Request, rhs: Anytype_Rpc.Space.StopSharing.Request) -> Bool { + if lhs.spaceID != rhs.spaceID {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Anytype_Rpc.Space.StopSharing.Response: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = Anytype_Rpc.Space.StopSharing.protoMessageName + ".Response" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "error"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularMessageField(value: &self._error) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._error { + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + } }() + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Anytype_Rpc.Space.StopSharing.Response, rhs: Anytype_Rpc.Space.StopSharing.Response) -> Bool { + if lhs._error != rhs._error {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Anytype_Rpc.Space.StopSharing.Response.Error: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let protoMessageName: String = Anytype_Rpc.Space.StopSharing.Response.protoMessageName + ".Error" + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "code"), + 2: .same(proto: "description"), + ] + + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularEnumField(value: &self.code) }() + case 2: try { try decoder.decodeSingularStringField(value: &self.description_p) }() + default: break + } + } + } + + public func traverse(visitor: inout V) throws { + if self.code != .null { + try visitor.visitSingularEnumField(value: self.code, fieldNumber: 1) + } + if !self.description_p.isEmpty { + try visitor.visitSingularStringField(value: self.description_p, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + public static func ==(lhs: Anytype_Rpc.Space.StopSharing.Response.Error, rhs: Anytype_Rpc.Space.StopSharing.Response.Error) -> Bool { + if lhs.code != rhs.code {return false} + if lhs.description_p != rhs.description_p {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Anytype_Rpc.Space.StopSharing.Response.Error.Code: SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "NULL"), + 1: .same(proto: "UNKNOWN_ERROR"), + 2: .same(proto: "BAD_INPUT"), + 101: .same(proto: "NO_SUCH_SPACE"), + 102: .same(proto: "SPACE_IS_DELETED"), + 103: .same(proto: "REQUEST_FAILED"), + ] +} + extension Anytype_Rpc.Space.InviteGetCurrent: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = Anytype_Rpc.Space.protoMessageName + ".InviteGetCurrent" public static let _protobuf_nameMap = SwiftProtobuf._NameMap() @@ -37803,6 +38055,7 @@ extension Anytype_Rpc.Object.CreateFromUrl.Request: SwiftProtobuf.Message, Swift 2: .same(proto: "objectTypeUniqueKey"), 3: .same(proto: "url"), 4: .same(proto: "details"), + 5: .same(proto: "addPageContent"), ] public mutating func decodeMessage(decoder: inout D) throws { @@ -37815,6 +38068,7 @@ extension Anytype_Rpc.Object.CreateFromUrl.Request: SwiftProtobuf.Message, Swift case 2: try { try decoder.decodeSingularStringField(value: &self.objectTypeUniqueKey) }() case 3: try { try decoder.decodeSingularStringField(value: &self.url) }() case 4: try { try decoder.decodeSingularMessageField(value: &self._details) }() + case 5: try { try decoder.decodeSingularBoolField(value: &self.addPageContent) }() default: break } } @@ -37837,6 +38091,9 @@ extension Anytype_Rpc.Object.CreateFromUrl.Request: SwiftProtobuf.Message, Swift try { if let v = self._details { try visitor.visitSingularMessageField(value: v, fieldNumber: 4) } }() + if self.addPageContent != false { + try visitor.visitSingularBoolField(value: self.addPageContent, fieldNumber: 5) + } try unknownFields.traverse(visitor: &visitor) } @@ -37845,6 +38102,7 @@ extension Anytype_Rpc.Object.CreateFromUrl.Request: SwiftProtobuf.Message, Swift if lhs.objectTypeUniqueKey != rhs.objectTypeUniqueKey {return false} if lhs.url != rhs.url {return false} if lhs._details != rhs._details {return false} + if lhs.addPageContent != rhs.addPageContent {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } diff --git a/Modules/Services/Sources/Generated/BundledRelationKey+SystemKeys.swift b/Modules/Services/Sources/Generated/BundledRelationKey+SystemKeys.swift index 346d8d1576..a1401bbee9 100644 --- a/Modules/Services/Sources/Generated/BundledRelationKey+SystemKeys.swift +++ b/Modules/Services/Sources/Generated/BundledRelationKey+SystemKeys.swift @@ -78,6 +78,7 @@ public extension BundledRelationKey { .spaceInviteFileKey, .participantPermissions, .participantStatus, + .latestAclHeadId, .identity, ] } diff --git a/Modules/Services/Sources/Generated/BundledRelationKey.swift b/Modules/Services/Sources/Generated/BundledRelationKey.swift index 709e240508..a9e3e495ba 100644 --- a/Modules/Services/Sources/Generated/BundledRelationKey.swift +++ b/Modules/Services/Sources/Generated/BundledRelationKey.swift @@ -29,6 +29,9 @@ public enum BundledRelationKey: String { /// Relation option color case relationOptionColor = "relationOptionColor" + /// Latest Acl head id + case latestAclHeadId = "latestAclHeadId" + case instructions = "instructions" /// Done checkbox used to render action layout. diff --git a/Modules/Services/Sources/Generated/BundledRelationsValueProvider.swift b/Modules/Services/Sources/Generated/BundledRelationsValueProvider.swift index 947dfc3b75..f2375d13ec 100644 --- a/Modules/Services/Sources/Generated/BundledRelationsValueProvider.swift +++ b/Modules/Services/Sources/Generated/BundledRelationsValueProvider.swift @@ -16,6 +16,7 @@ public protocol BundledRelationsValueProvider { var relationFormatObjectTypes: [ObjectId] { get } var relationKey: String { get } var relationOptionColor: String { get } + var latestAclHeadId: String { get } var instructions: String { get } var done: Bool { get } var mediaArtistURL: AnytypeURL? { get } @@ -207,6 +208,10 @@ public extension BundledRelationsValueProvider where Self: RelationValueProvider var relationOptionColor: String { return value(for: BundledRelationKey.relationOptionColor.rawValue) } + /// Latest Acl head id + var latestAclHeadId: String { + return value(for: BundledRelationKey.latestAclHeadId.rawValue) + } var instructions: String { return value(for: BundledRelationKey.instructions.rawValue) }