1- //
2- // File.swift
3- // NextcloudKit
4- //
5- // Created by Milen Pivchev on 10.07.25.
6- //
1+ // SPDX-FileCopyrightText: Nextcloud GmbH
2+ // SPDX-FileCopyrightText: 2025 Milen Pivchev
3+ // SPDX-License-Identifier: GPL-3.0-or-later
74
85import Foundation
96import Alamofire
10- //
11- //public struct NKDeclarativeUI {
12- // public struct ContextMenu: Codable {
13- // let title: String
14- // let url: String
15- // }
16- //}
17- //
18- //public struct DeclarativeUI: Codable {
19- // public let contextMenu: [ContextMenuItem]
20- //
21- // enum CodingKeys: String, CodingKey {
22- // case contextMenu = "context-menu"
23- // }
24- //}
25- //
26- //public struct ContextMenuItem: Codable {
27- // public let title: String
28- // public let endpoint: String
29- //
30- // public init(from decoder: Decoder) throws {
31- // var container = try decoder.unkeyedContainer()
32- // title = try container.decode(String.self)
33- // endpoint = try container.decode(String.self)
34- // }
35- //
36- // public func encode(to encoder: Encoder) throws {
37- // var container = encoder.unkeyedContainer()
38- // try container.encode(title)
39- // try container.encode(endpoint)
40- // }
41- //}
427
43- public struct NKDeclarativeUICapabilities : Codable {
8+ public struct NKClientIntegration : Codable {
449 public let apps : [ String : AppContext ]
4510
4611 public init ( from decoder: Decoder ) throws {
@@ -75,9 +40,11 @@ public struct NKDeclarativeUICapabilities: Codable {
7540 }
7641
7742public struct AppContext : Codable {
43+ public let version : Double
7844 public let contextMenu : [ ContextMenuAction ]
7945
8046 enum CodingKeys : String , CodingKey {
47+ case version
8148 case contextMenu = " context-menu "
8249 }
8350}
@@ -89,7 +56,6 @@ public struct ContextMenuAction: Codable {
8956 public let mimetypeFilters : String ?
9057 public let params : [ String : String ] ?
9158 public let icon : String ?
92- // public let filter: String?
9359
9460 enum CodingKeys : String , CodingKey {
9561 case name, url, method, icon, params
0 commit comments