From 3a22430d853b7750a45e461476dbeb066e4e400a Mon Sep 17 00:00:00 2001 From: Julian Locke Date: Wed, 28 Aug 2024 13:36:26 -0400 Subject: [PATCH] Point to latest stone and codegen (#432) --- .../Generated/DropboxBaseRequestBox.swift | 6 +- .../Shared/Generated/FileRequests.swift | 20 +- .../Shared/Generated/FileRequestsRoutes.swift | 26 +- .../Shared/Generated/Files.swift | 156 +++--- .../Shared/Generated/FilesRoutes.swift | 362 ++++++------ .../Generated/ReconnectionHelpers.swift | 12 +- .../SwiftyDropbox/Shared/Generated/Team.swift | 132 ++--- .../Shared/Generated/TeamRoutes.swift | 200 +++---- .../Generated/DBXDropboxBaseRequestBox.swift | 6 +- .../Generated/DBXFileRequestsRoutes.swift | 56 +- .../Shared/Generated/DBXFilesRoutes.swift | 228 ++++---- .../Shared/Generated/DBXTeamRoutes.swift | 516 +++++++++--------- stone | 2 +- 13 files changed, 861 insertions(+), 861 deletions(-) diff --git a/Source/SwiftyDropbox/Shared/Generated/DropboxBaseRequestBox.swift b/Source/SwiftyDropbox/Shared/Generated/DropboxBaseRequestBox.swift index 32a0223f..f84e958e 100644 --- a/Source/SwiftyDropbox/Shared/Generated/DropboxBaseRequestBox.swift +++ b/Source/SwiftyDropbox/Shared/Generated/DropboxBaseRequestBox.swift @@ -18,8 +18,8 @@ public enum DropboxBaseRequestBox: CustomStringConvertible { case files_paperCreate(UploadRequest) case files_paperUpdate(UploadRequest) case files_upload(UploadRequest) - case files_uploadSessionAppendV2(UploadRequest) case files_uploadSessionAppend(UploadRequest) + case files_uploadSessionAppendV2(UploadRequest) case files_uploadSessionFinish(UploadRequest) case files_uploadSessionStart(UploadRequest) case paper_docsCreate(UploadRequest) @@ -49,10 +49,10 @@ public enum DropboxBaseRequestBox: CustomStringConvertible { return "files/paper/update" case .files_upload: return "files/upload" - case .files_uploadSessionAppendV2: - return "files/upload_session/append_v2" case .files_uploadSessionAppend: return "files/upload_session/append" + case .files_uploadSessionAppendV2: + return "files/upload_session/append_v2" case .files_uploadSessionFinish: return "files/upload_session/finish" case .files_uploadSessionStart: diff --git a/Source/SwiftyDropbox/Shared/Generated/FileRequests.swift b/Source/SwiftyDropbox/Shared/Generated/FileRequests.swift index 64061988..719f0498 100644 --- a/Source/SwiftyDropbox/Shared/Generated/FileRequests.swift +++ b/Source/SwiftyDropbox/Shared/Generated/FileRequests.swift @@ -1784,13 +1784,13 @@ public class FileRequests { style: .rpc ) ) - static let listV2 = Route( - name: "list_v2", - version: 2, + static let list_ = Route( + name: "list", + version: 1, namespace: "file_requests", deprecated: false, - argSerializer: FileRequests.ListFileRequestsArgSerializer(), - responseSerializer: FileRequests.ListFileRequestsV2ResultSerializer(), + argSerializer: Serialization._VoidSerializer, + responseSerializer: FileRequests.ListFileRequestsResultSerializer(), errorSerializer: FileRequests.ListFileRequestsErrorSerializer(), attributes: RouteAttributes( auth: [.user], @@ -1798,13 +1798,13 @@ public class FileRequests { style: .rpc ) ) - static let list_ = Route( - name: "list", - version: 1, + static let listV2 = Route( + name: "list_v2", + version: 2, namespace: "file_requests", deprecated: false, - argSerializer: Serialization._VoidSerializer, - responseSerializer: FileRequests.ListFileRequestsResultSerializer(), + argSerializer: FileRequests.ListFileRequestsArgSerializer(), + responseSerializer: FileRequests.ListFileRequestsV2ResultSerializer(), errorSerializer: FileRequests.ListFileRequestsErrorSerializer(), attributes: RouteAttributes( auth: [.user], diff --git a/Source/SwiftyDropbox/Shared/Generated/FileRequestsRoutes.swift b/Source/SwiftyDropbox/Shared/Generated/FileRequestsRoutes.swift index 6ea345af..03b662f2 100644 --- a/Source/SwiftyDropbox/Shared/Generated/FileRequestsRoutes.swift +++ b/Source/SwiftyDropbox/Shared/Generated/FileRequestsRoutes.swift @@ -101,15 +101,12 @@ public class FileRequestsRoutes: DropboxTransportClientOwning { /// /// - scope: file_requests.read /// - /// - parameter limit: The maximum number of file requests that should be returned per request. /// - /// - returns: Through the response callback, the caller will receive a `FileRequests.ListFileRequestsV2Result` - /// object on success or a `FileRequests.ListFileRequestsError` object on failure. - @discardableResult public func listV2(limit: UInt64 = 1_000) - -> RpcRequest { - let route = FileRequests.listV2 - let serverArgs = FileRequests.ListFileRequestsArg(limit: limit) - return client.request(route, serverArgs: serverArgs) + /// - returns: Through the response callback, the caller will receive a `FileRequests.ListFileRequestsResult` object + /// on success or a `FileRequests.ListFileRequestsError` object on failure. + @discardableResult public func list_() -> RpcRequest { + let route = FileRequests.list_ + return client.request(route) } /// Returns a list of file requests owned by this user. For apps with the app folder permission, this will only @@ -117,12 +114,15 @@ public class FileRequestsRoutes: DropboxTransportClientOwning { /// /// - scope: file_requests.read /// + /// - parameter limit: The maximum number of file requests that should be returned per request. /// - /// - returns: Through the response callback, the caller will receive a `FileRequests.ListFileRequestsResult` object - /// on success or a `FileRequests.ListFileRequestsError` object on failure. - @discardableResult public func list_() -> RpcRequest { - let route = FileRequests.list_ - return client.request(route) + /// - returns: Through the response callback, the caller will receive a `FileRequests.ListFileRequestsV2Result` + /// object on success or a `FileRequests.ListFileRequestsError` object on failure. + @discardableResult public func listV2(limit: UInt64 = 1_000) + -> RpcRequest { + let route = FileRequests.listV2 + let serverArgs = FileRequests.ListFileRequestsArg(limit: limit) + return client.request(route, serverArgs: serverArgs) } /// Once a cursor has been retrieved from listV2, use this to paginate through all file requests. The cursor must diff --git a/Source/SwiftyDropbox/Shared/Generated/Files.swift b/Source/SwiftyDropbox/Shared/Generated/Files.swift index 52dd2f0d..a3b6b9f3 100644 --- a/Source/SwiftyDropbox/Shared/Generated/Files.swift +++ b/Source/SwiftyDropbox/Shared/Generated/Files.swift @@ -12012,20 +12012,6 @@ public class Files { style: .upload ) ) - static let copyV2 = Route( - name: "copy_v2", - version: 2, - namespace: "files", - deprecated: false, - argSerializer: Files.RelocationArgSerializer(), - responseSerializer: Files.RelocationResultSerializer(), - errorSerializer: Files.RelocationErrorSerializer(), - attributes: RouteAttributes( - auth: [.user], - host: .api, - style: .rpc - ) - ) static let copy = Route( name: "copy", version: 1, @@ -12040,14 +12026,14 @@ public class Files { style: .rpc ) ) - static let copyBatchV2 = Route( - name: "copy_batch_v2", + static let copyV2 = Route( + name: "copy_v2", version: 2, namespace: "files", deprecated: false, - argSerializer: Files.RelocationBatchArgBaseSerializer(), - responseSerializer: Files.RelocationBatchV2LaunchSerializer(), - errorSerializer: Serialization._VoidSerializer, + argSerializer: Files.RelocationArgSerializer(), + responseSerializer: Files.RelocationResultSerializer(), + errorSerializer: Files.RelocationErrorSerializer(), attributes: RouteAttributes( auth: [.user], host: .api, @@ -12068,14 +12054,14 @@ public class Files { style: .rpc ) ) - static let copyBatchCheckV2 = Route( - name: "copy_batch/check_v2", + static let copyBatchV2 = Route( + name: "copy_batch_v2", version: 2, namespace: "files", deprecated: false, - argSerializer: Async.PollArgSerializer(), - responseSerializer: Files.RelocationBatchV2JobStatusSerializer(), - errorSerializer: Async.PollErrorSerializer(), + argSerializer: Files.RelocationBatchArgBaseSerializer(), + responseSerializer: Files.RelocationBatchV2LaunchSerializer(), + errorSerializer: Serialization._VoidSerializer, attributes: RouteAttributes( auth: [.user], host: .api, @@ -12096,6 +12082,20 @@ public class Files { style: .rpc ) ) + static let copyBatchCheckV2 = Route( + name: "copy_batch/check_v2", + version: 2, + namespace: "files", + deprecated: false, + argSerializer: Async.PollArgSerializer(), + responseSerializer: Files.RelocationBatchV2JobStatusSerializer(), + errorSerializer: Async.PollErrorSerializer(), + attributes: RouteAttributes( + auth: [.user], + host: .api, + style: .rpc + ) + ) static let copyReferenceGet = Route( name: "copy_reference/get", version: 1, @@ -12124,13 +12124,13 @@ public class Files { style: .rpc ) ) - static let createFolderV2 = Route( - name: "create_folder_v2", - version: 2, + static let createFolder = Route( + name: "create_folder", + version: 1, namespace: "files", - deprecated: false, + deprecated: true, argSerializer: Files.CreateFolderArgSerializer(), - responseSerializer: Files.CreateFolderResultSerializer(), + responseSerializer: Files.FolderMetadataSerializer(), errorSerializer: Files.CreateFolderErrorSerializer(), attributes: RouteAttributes( auth: [.user], @@ -12138,13 +12138,13 @@ public class Files { style: .rpc ) ) - static let createFolder = Route( - name: "create_folder", - version: 1, + static let createFolderV2 = Route( + name: "create_folder_v2", + version: 2, namespace: "files", - deprecated: true, + deprecated: false, argSerializer: Files.CreateFolderArgSerializer(), - responseSerializer: Files.FolderMetadataSerializer(), + responseSerializer: Files.CreateFolderResultSerializer(), errorSerializer: Files.CreateFolderErrorSerializer(), attributes: RouteAttributes( auth: [.user], @@ -12180,13 +12180,13 @@ public class Files { style: .rpc ) ) - static let deleteV2 = Route( - name: "delete_v2", - version: 2, + static let delete = Route( + name: "delete", + version: 1, namespace: "files", - deprecated: false, + deprecated: true, argSerializer: Files.DeleteArgSerializer(), - responseSerializer: Files.DeleteResultSerializer(), + responseSerializer: Files.MetadataSerializer(), errorSerializer: Files.DeleteErrorSerializer(), attributes: RouteAttributes( auth: [.user], @@ -12194,13 +12194,13 @@ public class Files { style: .rpc ) ) - static let delete = Route( - name: "delete", - version: 1, + static let deleteV2 = Route( + name: "delete_v2", + version: 2, namespace: "files", - deprecated: true, + deprecated: false, argSerializer: Files.DeleteArgSerializer(), - responseSerializer: Files.MetadataSerializer(), + responseSerializer: Files.DeleteResultSerializer(), errorSerializer: Files.DeleteErrorSerializer(), attributes: RouteAttributes( auth: [.user], @@ -12474,20 +12474,6 @@ public class Files { style: .rpc ) ) - static let moveV2 = Route( - name: "move_v2", - version: 2, - namespace: "files", - deprecated: false, - argSerializer: Files.RelocationArgSerializer(), - responseSerializer: Files.RelocationResultSerializer(), - errorSerializer: Files.RelocationErrorSerializer(), - attributes: RouteAttributes( - auth: [.user], - host: .api, - style: .rpc - ) - ) static let move = Route( name: "move", version: 1, @@ -12502,14 +12488,14 @@ public class Files { style: .rpc ) ) - static let moveBatchV2 = Route( - name: "move_batch_v2", + static let moveV2 = Route( + name: "move_v2", version: 2, namespace: "files", deprecated: false, - argSerializer: Files.MoveBatchArgSerializer(), - responseSerializer: Files.RelocationBatchV2LaunchSerializer(), - errorSerializer: Serialization._VoidSerializer, + argSerializer: Files.RelocationArgSerializer(), + responseSerializer: Files.RelocationResultSerializer(), + errorSerializer: Files.RelocationErrorSerializer(), attributes: RouteAttributes( auth: [.user], host: .api, @@ -12530,14 +12516,14 @@ public class Files { style: .rpc ) ) - static let moveBatchCheckV2 = Route( - name: "move_batch/check_v2", + static let moveBatchV2 = Route( + name: "move_batch_v2", version: 2, namespace: "files", deprecated: false, - argSerializer: Async.PollArgSerializer(), - responseSerializer: Files.RelocationBatchV2JobStatusSerializer(), - errorSerializer: Async.PollErrorSerializer(), + argSerializer: Files.MoveBatchArgSerializer(), + responseSerializer: Files.RelocationBatchV2LaunchSerializer(), + errorSerializer: Serialization._VoidSerializer, attributes: RouteAttributes( auth: [.user], host: .api, @@ -12558,6 +12544,20 @@ public class Files { style: .rpc ) ) + static let moveBatchCheckV2 = Route( + name: "move_batch/check_v2", + version: 2, + namespace: "files", + deprecated: false, + argSerializer: Async.PollArgSerializer(), + responseSerializer: Files.RelocationBatchV2JobStatusSerializer(), + errorSerializer: Async.PollErrorSerializer(), + attributes: RouteAttributes( + auth: [.user], + host: .api, + style: .rpc + ) + ) static let paperCreate = Route( name: "paper/create", version: 1, @@ -12838,12 +12838,12 @@ public class Files { style: .upload ) ) - static let uploadSessionAppendV2 = Route( - name: "upload_session/append_v2", - version: 2, + static let uploadSessionAppend = Route( + name: "upload_session/append", + version: 1, namespace: "files", - deprecated: false, - argSerializer: Files.UploadSessionAppendArgSerializer(), + deprecated: true, + argSerializer: Files.UploadSessionCursorSerializer(), responseSerializer: Serialization._VoidSerializer, errorSerializer: Files.UploadSessionAppendErrorSerializer(), attributes: RouteAttributes( @@ -12852,12 +12852,12 @@ public class Files { style: .upload ) ) - static let uploadSessionAppend = Route( - name: "upload_session/append", - version: 1, + static let uploadSessionAppendV2 = Route( + name: "upload_session/append_v2", + version: 2, namespace: "files", - deprecated: true, - argSerializer: Files.UploadSessionCursorSerializer(), + deprecated: false, + argSerializer: Files.UploadSessionAppendArgSerializer(), responseSerializer: Serialization._VoidSerializer, errorSerializer: Files.UploadSessionAppendErrorSerializer(), attributes: RouteAttributes( diff --git a/Source/SwiftyDropbox/Shared/Generated/FilesRoutes.swift b/Source/SwiftyDropbox/Shared/Generated/FilesRoutes.swift index e5ca7d5b..b9822aae 100644 --- a/Source/SwiftyDropbox/Shared/Generated/FilesRoutes.swift +++ b/Source/SwiftyDropbox/Shared/Generated/FilesRoutes.swift @@ -173,16 +173,17 @@ public class FilesRoutes: DropboxTransportClientOwning { /// - parameter allowOwnershipTransfer: Allow moves by owner even if it would result in an ownership transfer for /// the content being moved. This does not apply to copies. /// - /// - returns: Through the response callback, the caller will receive a `Files.RelocationResult` object on success - /// or a `Files.RelocationError` object on failure. - @discardableResult public func copyV2( + /// - returns: Through the response callback, the caller will receive a `Files.Metadata` object on success or a + /// `Files.RelocationError` object on failure. + @available(*, unavailable, message: "copy is deprecated. Use copyV2.") + @discardableResult public func copy( fromPath: String, toPath: String, allowSharedFolder: Bool = false, autorename: Bool = false, allowOwnershipTransfer: Bool = false - ) -> RpcRequest { - let route = Files.copyV2 + ) -> RpcRequest { + let route = Files.copy let serverArgs = Files.RelocationArg( fromPath: fromPath, toPath: toPath, @@ -204,17 +205,16 @@ public class FilesRoutes: DropboxTransportClientOwning { /// - parameter allowOwnershipTransfer: Allow moves by owner even if it would result in an ownership transfer for /// the content being moved. This does not apply to copies. /// - /// - returns: Through the response callback, the caller will receive a `Files.Metadata` object on success or a - /// `Files.RelocationError` object on failure. - @available(*, unavailable, message: "copy is deprecated. Use copyV2.") - @discardableResult public func copy( + /// - returns: Through the response callback, the caller will receive a `Files.RelocationResult` object on success + /// or a `Files.RelocationError` object on failure. + @discardableResult public func copyV2( fromPath: String, toPath: String, allowSharedFolder: Bool = false, autorename: Bool = false, allowOwnershipTransfer: Bool = false - ) -> RpcRequest { - let route = Files.copy + ) -> RpcRequest { + let route = Files.copyV2 let serverArgs = Files.RelocationArg( fromPath: fromPath, toPath: toPath, @@ -225,28 +225,6 @@ public class FilesRoutes: DropboxTransportClientOwning { return client.request(route, serverArgs: serverArgs) } - /// Copy multiple files or folders to different locations at once in the user's Dropbox. This route will replace - /// copyBatch. The main difference is this route will return status for each entry, while copyBatch raises - /// failure if any entry fails. This route will either finish synchronously, or return a job ID and do the async - /// copy job in background. Please use copyBatchCheckV2 to check the job status. - /// - /// - scope: files.content.write - /// - /// - parameter entries: List of entries to be moved or copied. Each entry is RelocationPath. - /// - parameter autorename: If there's a conflict with any file, have the Dropbox server try to autorename that file - /// to avoid the conflict. - /// - /// - returns: Through the response callback, the caller will receive a `Files.RelocationBatchV2Launch` object on - /// success or a `Void` object on failure. - @discardableResult public func copyBatchV2( - entries: [Files.RelocationPath], - autorename: Bool = false - ) -> RpcRequest { - let route = Files.copyBatchV2 - let serverArgs = Files.RelocationBatchArgBase(entries: entries, autorename: autorename) - return client.request(route, serverArgs: serverArgs) - } - /// Copy multiple files or folders to different locations at once in the user's Dropbox. This route will return job /// ID immediately and do the async copy job in background. Please use copyBatchCheck to check the job status. /// @@ -275,18 +253,25 @@ public class FilesRoutes: DropboxTransportClientOwning { return client.request(route, serverArgs: serverArgs) } - /// Returns the status of an asynchronous job for copyBatchV2. It returns list of results for each entry. + /// Copy multiple files or folders to different locations at once in the user's Dropbox. This route will replace + /// copyBatch. The main difference is this route will return status for each entry, while copyBatch raises + /// failure if any entry fails. This route will either finish synchronously, or return a job ID and do the async + /// copy job in background. Please use copyBatchCheckV2 to check the job status. /// /// - scope: files.content.write /// - /// - parameter asyncJobId: Id of the asynchronous job. This is the value of a response returned from the method - /// that launched the job. + /// - parameter entries: List of entries to be moved or copied. Each entry is RelocationPath. + /// - parameter autorename: If there's a conflict with any file, have the Dropbox server try to autorename that file + /// to avoid the conflict. /// - /// - returns: Through the response callback, the caller will receive a `Files.RelocationBatchV2JobStatus` object on - /// success or a `Async.PollError` object on failure. - @discardableResult public func copyBatchCheckV2(asyncJobId: String) -> RpcRequest { - let route = Files.copyBatchCheckV2 - let serverArgs = Async.PollArg(asyncJobId: asyncJobId) + /// - returns: Through the response callback, the caller will receive a `Files.RelocationBatchV2Launch` object on + /// success or a `Void` object on failure. + @discardableResult public func copyBatchV2( + entries: [Files.RelocationPath], + autorename: Bool = false + ) -> RpcRequest { + let route = Files.copyBatchV2 + let serverArgs = Files.RelocationBatchArgBase(entries: entries, autorename: autorename) return client.request(route, serverArgs: serverArgs) } @@ -306,6 +291,21 @@ public class FilesRoutes: DropboxTransportClientOwning { return client.request(route, serverArgs: serverArgs) } + /// Returns the status of an asynchronous job for copyBatchV2. It returns list of results for each entry. + /// + /// - scope: files.content.write + /// + /// - parameter asyncJobId: Id of the asynchronous job. This is the value of a response returned from the method + /// that launched the job. + /// + /// - returns: Through the response callback, the caller will receive a `Files.RelocationBatchV2JobStatus` object on + /// success or a `Async.PollError` object on failure. + @discardableResult public func copyBatchCheckV2(asyncJobId: String) -> RpcRequest { + let route = Files.copyBatchCheckV2 + let serverArgs = Async.PollArg(asyncJobId: asyncJobId) + return client.request(route, serverArgs: serverArgs) + } + /// Get a copy reference to a file or folder. This reference string can be used to save that file or folder to /// another user's Dropbox by passing it to copyReferenceSave. /// @@ -347,13 +347,14 @@ public class FilesRoutes: DropboxTransportClientOwning { /// - parameter autorename: If there's a conflict, have the Dropbox server try to autorename the folder to avoid the /// conflict. /// - /// - returns: Through the response callback, the caller will receive a `Files.CreateFolderResult` object on success - /// or a `Files.CreateFolderError` object on failure. - @discardableResult public func createFolderV2( + /// - returns: Through the response callback, the caller will receive a `Files.FolderMetadata` object on success or + /// a `Files.CreateFolderError` object on failure. + @available(*, unavailable, message: "createFolder is deprecated. Use createFolderV2.") + @discardableResult public func createFolder( path: String, autorename: Bool = false - ) -> RpcRequest { - let route = Files.createFolderV2 + ) -> RpcRequest { + let route = Files.createFolder let serverArgs = Files.CreateFolderArg(path: path, autorename: autorename) return client.request(route, serverArgs: serverArgs) } @@ -366,14 +367,13 @@ public class FilesRoutes: DropboxTransportClientOwning { /// - parameter autorename: If there's a conflict, have the Dropbox server try to autorename the folder to avoid the /// conflict. /// - /// - returns: Through the response callback, the caller will receive a `Files.FolderMetadata` object on success or - /// a `Files.CreateFolderError` object on failure. - @available(*, unavailable, message: "createFolder is deprecated. Use createFolderV2.") - @discardableResult public func createFolder( + /// - returns: Through the response callback, the caller will receive a `Files.CreateFolderResult` object on success + /// or a `Files.CreateFolderError` object on failure. + @discardableResult public func createFolderV2( path: String, autorename: Bool = false - ) -> RpcRequest { - let route = Files.createFolder + ) -> RpcRequest { + let route = Files.createFolderV2 let serverArgs = Files.CreateFolderArg(path: path, autorename: autorename) return client.request(route, serverArgs: serverArgs) } @@ -431,10 +431,11 @@ public class FilesRoutes: DropboxTransportClientOwning { /// - parameter parentRev: Perform delete if given "rev" matches the existing file's latest "rev". This field does /// not support deleting a folder. /// - /// - returns: Through the response callback, the caller will receive a `Files.DeleteResult` object on success or a + /// - returns: Through the response callback, the caller will receive a `Files.Metadata` object on success or a /// `Files.DeleteError` object on failure. - @discardableResult public func deleteV2(path: String, parentRev: String? = nil) -> RpcRequest { - let route = Files.deleteV2 + @available(*, unavailable, message: "delete is deprecated. Use deleteV2.") + @discardableResult public func delete(path: String, parentRev: String? = nil) -> RpcRequest { + let route = Files.delete let serverArgs = Files.DeleteArg(path: path, parentRev: parentRev) return client.request(route, serverArgs: serverArgs) } @@ -450,11 +451,10 @@ public class FilesRoutes: DropboxTransportClientOwning { /// - parameter parentRev: Perform delete if given "rev" matches the existing file's latest "rev". This field does /// not support deleting a folder. /// - /// - returns: Through the response callback, the caller will receive a `Files.Metadata` object on success or a + /// - returns: Through the response callback, the caller will receive a `Files.DeleteResult` object on success or a /// `Files.DeleteError` object on failure. - @available(*, unavailable, message: "delete is deprecated. Use deleteV2.") - @discardableResult public func delete(path: String, parentRev: String? = nil) -> RpcRequest { - let route = Files.delete + @discardableResult public func deleteV2(path: String, parentRev: String? = nil) -> RpcRequest { + let route = Files.deleteV2 let serverArgs = Files.DeleteArg(path: path, parentRev: parentRev) return client.request(route, serverArgs: serverArgs) } @@ -1108,7 +1108,7 @@ public class FilesRoutes: DropboxTransportClientOwning { } /// Move a file or folder to a different location in the user's Dropbox. If the source path is a folder all its - /// contents will be moved. Note that we do not currently support case-only renaming. + /// contents will be moved. /// /// - scope: files.content.write /// @@ -1118,16 +1118,17 @@ public class FilesRoutes: DropboxTransportClientOwning { /// - parameter allowOwnershipTransfer: Allow moves by owner even if it would result in an ownership transfer for /// the content being moved. This does not apply to copies. /// - /// - returns: Through the response callback, the caller will receive a `Files.RelocationResult` object on success - /// or a `Files.RelocationError` object on failure. - @discardableResult public func moveV2( + /// - returns: Through the response callback, the caller will receive a `Files.Metadata` object on success or a + /// `Files.RelocationError` object on failure. + @available(*, unavailable, message: "move is deprecated. Use moveV2.") + @discardableResult public func move( fromPath: String, toPath: String, allowSharedFolder: Bool = false, autorename: Bool = false, allowOwnershipTransfer: Bool = false - ) -> RpcRequest { - let route = Files.moveV2 + ) -> RpcRequest { + let route = Files.move let serverArgs = Files.RelocationArg( fromPath: fromPath, toPath: toPath, @@ -1139,7 +1140,7 @@ public class FilesRoutes: DropboxTransportClientOwning { } /// Move a file or folder to a different location in the user's Dropbox. If the source path is a folder all its - /// contents will be moved. + /// contents will be moved. Note that we do not currently support case-only renaming. /// /// - scope: files.content.write /// @@ -1149,17 +1150,16 @@ public class FilesRoutes: DropboxTransportClientOwning { /// - parameter allowOwnershipTransfer: Allow moves by owner even if it would result in an ownership transfer for /// the content being moved. This does not apply to copies. /// - /// - returns: Through the response callback, the caller will receive a `Files.Metadata` object on success or a - /// `Files.RelocationError` object on failure. - @available(*, unavailable, message: "move is deprecated. Use moveV2.") - @discardableResult public func move( + /// - returns: Through the response callback, the caller will receive a `Files.RelocationResult` object on success + /// or a `Files.RelocationError` object on failure. + @discardableResult public func moveV2( fromPath: String, toPath: String, allowSharedFolder: Bool = false, autorename: Bool = false, allowOwnershipTransfer: Bool = false - ) -> RpcRequest { - let route = Files.move + ) -> RpcRequest { + let route = Files.moveV2 let serverArgs = Files.RelocationArg( fromPath: fromPath, toPath: toPath, @@ -1170,29 +1170,6 @@ public class FilesRoutes: DropboxTransportClientOwning { return client.request(route, serverArgs: serverArgs) } - /// Move multiple files or folders to different locations at once in the user's Dropbox. Note that we do not - /// currently support case-only renaming. This route will replace moveBatch. The main difference is this route - /// will return status for each entry, while moveBatch raises failure if any entry fails. This route will either - /// finish synchronously, or return a job ID and do the async move job in background. Please use - /// moveBatchCheckV2 to check the job status. - /// - /// - scope: files.content.write - /// - /// - parameter allowOwnershipTransfer: Allow moves by owner even if it would result in an ownership transfer for - /// the content being moved. This does not apply to copies. - /// - /// - returns: Through the response callback, the caller will receive a `Files.RelocationBatchV2Launch` object on - /// success or a `Void` object on failure. - @discardableResult public func moveBatchV2( - entries: [Files.RelocationPath], - autorename: Bool = false, - allowOwnershipTransfer: Bool = false - ) -> RpcRequest { - let route = Files.moveBatchV2 - let serverArgs = Files.MoveBatchArg(entries: entries, autorename: autorename, allowOwnershipTransfer: allowOwnershipTransfer) - return client.request(route, serverArgs: serverArgs) - } - /// Move multiple files or folders to different locations at once in the user's Dropbox. This route will return job /// ID immediately and do the async moving job in background. Please use moveBatchCheck to check the job status. /// @@ -1221,18 +1198,26 @@ public class FilesRoutes: DropboxTransportClientOwning { return client.request(route, serverArgs: serverArgs) } - /// Returns the status of an asynchronous job for moveBatchV2. It returns list of results for each entry. + /// Move multiple files or folders to different locations at once in the user's Dropbox. Note that we do not + /// currently support case-only renaming. This route will replace moveBatch. The main difference is this route + /// will return status for each entry, while moveBatch raises failure if any entry fails. This route will either + /// finish synchronously, or return a job ID and do the async move job in background. Please use + /// moveBatchCheckV2 to check the job status. /// /// - scope: files.content.write /// - /// - parameter asyncJobId: Id of the asynchronous job. This is the value of a response returned from the method - /// that launched the job. + /// - parameter allowOwnershipTransfer: Allow moves by owner even if it would result in an ownership transfer for + /// the content being moved. This does not apply to copies. /// - /// - returns: Through the response callback, the caller will receive a `Files.RelocationBatchV2JobStatus` object on - /// success or a `Async.PollError` object on failure. - @discardableResult public func moveBatchCheckV2(asyncJobId: String) -> RpcRequest { - let route = Files.moveBatchCheckV2 - let serverArgs = Async.PollArg(asyncJobId: asyncJobId) + /// - returns: Through the response callback, the caller will receive a `Files.RelocationBatchV2Launch` object on + /// success or a `Void` object on failure. + @discardableResult public func moveBatchV2( + entries: [Files.RelocationPath], + autorename: Bool = false, + allowOwnershipTransfer: Bool = false + ) -> RpcRequest { + let route = Files.moveBatchV2 + let serverArgs = Files.MoveBatchArg(entries: entries, autorename: autorename, allowOwnershipTransfer: allowOwnershipTransfer) return client.request(route, serverArgs: serverArgs) } @@ -1252,6 +1237,21 @@ public class FilesRoutes: DropboxTransportClientOwning { return client.request(route, serverArgs: serverArgs) } + /// Returns the status of an asynchronous job for moveBatchV2. It returns list of results for each entry. + /// + /// - scope: files.content.write + /// + /// - parameter asyncJobId: Id of the asynchronous job. This is the value of a response returned from the method + /// that launched the job. + /// + /// - returns: Through the response callback, the caller will receive a `Files.RelocationBatchV2JobStatus` object on + /// success or a `Async.PollError` object on failure. + @discardableResult public func moveBatchCheckV2(asyncJobId: String) -> RpcRequest { + let route = Files.moveBatchCheckV2 + let serverArgs = Async.PollArg(asyncJobId: asyncJobId) + return client.request(route, serverArgs: serverArgs) + } + /// Creates a new Paper doc with the provided content. /// /// - scope: files.content.write @@ -1821,6 +1821,84 @@ public class FilesRoutes: DropboxTransportClientOwning { return client.request(route, serverArgs: serverArgs, input: .stream(input)) } + /// Append more data to an upload session. A single request should not upload more than 150 MB. The maximum size of + /// a file one can upload to an upload session is 350 GB. Calls to this endpoint will count as data transport + /// calls for any Dropbox Business teams with a limit on the number of data transport calls allowed per month. + /// For more information, see the Data transport limit page + /// https://www.dropbox.com/developers/reference/data-transport-limit. + /// + /// - scope: files.content.write + /// + /// - parameter sessionId: The upload session ID (returned by uploadSessionStart). + /// - parameter offset: Offset in bytes at which data should be appended. We use this to make sure upload data isn't + /// lost or duplicated in the event of a network error. + /// - parameter input: The file to upload, as an Data object. + /// + /// - returns: Through the response callback, the caller will receive a `Void` object on success or a + /// `Files.UploadSessionAppendError` object on failure. + @available(*, unavailable, message: "uploadSessionAppend is deprecated. Use uploadSessionAppendV2.") + @discardableResult public func uploadSessionAppend( + sessionId: String, + offset: UInt64, + input: Data + ) -> UploadRequest { + let route = Files.uploadSessionAppend + let serverArgs = Files.UploadSessionCursor(sessionId: sessionId, offset: offset) + return client.request(route, serverArgs: serverArgs, input: .data(input)) + } + + /// Append more data to an upload session. A single request should not upload more than 150 MB. The maximum size of + /// a file one can upload to an upload session is 350 GB. Calls to this endpoint will count as data transport + /// calls for any Dropbox Business teams with a limit on the number of data transport calls allowed per month. + /// For more information, see the Data transport limit page + /// https://www.dropbox.com/developers/reference/data-transport-limit. + /// + /// - scope: files.content.write + /// + /// - parameter sessionId: The upload session ID (returned by uploadSessionStart). + /// - parameter offset: Offset in bytes at which data should be appended. We use this to make sure upload data isn't + /// lost or duplicated in the event of a network error. + /// - parameter input: The file to upload, as an URL object. + /// + /// - returns: Through the response callback, the caller will receive a `Void` object on success or a + /// `Files.UploadSessionAppendError` object on failure. + @available(*, unavailable, message: "uploadSessionAppend is deprecated. Use uploadSessionAppendV2.") + @discardableResult public func uploadSessionAppend( + sessionId: String, + offset: UInt64, + input: URL + ) -> UploadRequest { + let route = Files.uploadSessionAppend + let serverArgs = Files.UploadSessionCursor(sessionId: sessionId, offset: offset) + return client.request(route, serverArgs: serverArgs, input: .file(input)) + } + + /// Append more data to an upload session. A single request should not upload more than 150 MB. The maximum size of + /// a file one can upload to an upload session is 350 GB. Calls to this endpoint will count as data transport + /// calls for any Dropbox Business teams with a limit on the number of data transport calls allowed per month. + /// For more information, see the Data transport limit page + /// https://www.dropbox.com/developers/reference/data-transport-limit. + /// + /// - scope: files.content.write + /// + /// - parameter sessionId: The upload session ID (returned by uploadSessionStart). + /// - parameter offset: Offset in bytes at which data should be appended. We use this to make sure upload data isn't + /// lost or duplicated in the event of a network error. + /// - parameter input: The file to upload, as an InputStream object. + /// + /// - returns: Through the response callback, the caller will receive a `Void` object on success or a + /// `Files.UploadSessionAppendError` object on failure. + @available(*, unavailable, message: "uploadSessionAppend is deprecated. Use uploadSessionAppendV2.") + @discardableResult public func uploadSessionAppend( + sessionId: String, + offset: UInt64, + input: InputStream + ) -> UploadRequest { + let route = Files.uploadSessionAppend + let serverArgs = Files.UploadSessionCursor(sessionId: sessionId, offset: offset) + return client.request(route, serverArgs: serverArgs, input: .stream(input)) + } + /// Append more data to an upload session. When the parameter close is set, this call will close the session. A /// single request should not upload more than 150 MB. The maximum size of a file one can upload to an upload /// session is 350 GB. Calls to this endpoint will count as data transport calls for any Dropbox Business teams @@ -1908,84 +1986,6 @@ public class FilesRoutes: DropboxTransportClientOwning { return client.request(route, serverArgs: serverArgs, input: .stream(input)) } - /// Append more data to an upload session. A single request should not upload more than 150 MB. The maximum size of - /// a file one can upload to an upload session is 350 GB. Calls to this endpoint will count as data transport - /// calls for any Dropbox Business teams with a limit on the number of data transport calls allowed per month. - /// For more information, see the Data transport limit page - /// https://www.dropbox.com/developers/reference/data-transport-limit. - /// - /// - scope: files.content.write - /// - /// - parameter sessionId: The upload session ID (returned by uploadSessionStart). - /// - parameter offset: Offset in bytes at which data should be appended. We use this to make sure upload data isn't - /// lost or duplicated in the event of a network error. - /// - parameter input: The file to upload, as an Data object. - /// - /// - returns: Through the response callback, the caller will receive a `Void` object on success or a - /// `Files.UploadSessionAppendError` object on failure. - @available(*, unavailable, message: "uploadSessionAppend is deprecated. Use uploadSessionAppendV2.") - @discardableResult public func uploadSessionAppend( - sessionId: String, - offset: UInt64, - input: Data - ) -> UploadRequest { - let route = Files.uploadSessionAppend - let serverArgs = Files.UploadSessionCursor(sessionId: sessionId, offset: offset) - return client.request(route, serverArgs: serverArgs, input: .data(input)) - } - - /// Append more data to an upload session. A single request should not upload more than 150 MB. The maximum size of - /// a file one can upload to an upload session is 350 GB. Calls to this endpoint will count as data transport - /// calls for any Dropbox Business teams with a limit on the number of data transport calls allowed per month. - /// For more information, see the Data transport limit page - /// https://www.dropbox.com/developers/reference/data-transport-limit. - /// - /// - scope: files.content.write - /// - /// - parameter sessionId: The upload session ID (returned by uploadSessionStart). - /// - parameter offset: Offset in bytes at which data should be appended. We use this to make sure upload data isn't - /// lost or duplicated in the event of a network error. - /// - parameter input: The file to upload, as an URL object. - /// - /// - returns: Through the response callback, the caller will receive a `Void` object on success or a - /// `Files.UploadSessionAppendError` object on failure. - @available(*, unavailable, message: "uploadSessionAppend is deprecated. Use uploadSessionAppendV2.") - @discardableResult public func uploadSessionAppend( - sessionId: String, - offset: UInt64, - input: URL - ) -> UploadRequest { - let route = Files.uploadSessionAppend - let serverArgs = Files.UploadSessionCursor(sessionId: sessionId, offset: offset) - return client.request(route, serverArgs: serverArgs, input: .file(input)) - } - - /// Append more data to an upload session. A single request should not upload more than 150 MB. The maximum size of - /// a file one can upload to an upload session is 350 GB. Calls to this endpoint will count as data transport - /// calls for any Dropbox Business teams with a limit on the number of data transport calls allowed per month. - /// For more information, see the Data transport limit page - /// https://www.dropbox.com/developers/reference/data-transport-limit. - /// - /// - scope: files.content.write - /// - /// - parameter sessionId: The upload session ID (returned by uploadSessionStart). - /// - parameter offset: Offset in bytes at which data should be appended. We use this to make sure upload data isn't - /// lost or duplicated in the event of a network error. - /// - parameter input: The file to upload, as an InputStream object. - /// - /// - returns: Through the response callback, the caller will receive a `Void` object on success or a - /// `Files.UploadSessionAppendError` object on failure. - @available(*, unavailable, message: "uploadSessionAppend is deprecated. Use uploadSessionAppendV2.") - @discardableResult public func uploadSessionAppend( - sessionId: String, - offset: UInt64, - input: InputStream - ) -> UploadRequest { - let route = Files.uploadSessionAppend - let serverArgs = Files.UploadSessionCursor(sessionId: sessionId, offset: offset) - return client.request(route, serverArgs: serverArgs, input: .stream(input)) - } - /// Finish an upload session and save the uploaded data to the given file path. A single request should not upload /// more than 150 MB. The maximum size of a file one can upload to an upload session is 350 GB. Calls to this /// endpoint will count as data transport calls for any Dropbox Business teams with a limit on the number of diff --git a/Source/SwiftyDropbox/Shared/Generated/ReconnectionHelpers.swift b/Source/SwiftyDropbox/Shared/Generated/ReconnectionHelpers.swift index 837003f4..dcc7f27a 100644 --- a/Source/SwiftyDropbox/Shared/Generated/ReconnectionHelpers.swift +++ b/Source/SwiftyDropbox/Shared/Generated/ReconnectionHelpers.swift @@ -102,21 +102,21 @@ enum ReconnectionHelpers: ReconnectionHelpersShared { client: client ) ) - case "files/upload_session/append_v2": - return .files_uploadSessionAppendV2( + case "files/upload_session/append": + return .files_uploadSessionAppend( rebuildRequest( apiRequest: apiRequest, info: info, - route: Files.uploadSessionAppendV2, + route: Files.uploadSessionAppend, client: client ) ) - case "files/upload_session/append": - return .files_uploadSessionAppend( + case "files/upload_session/append_v2": + return .files_uploadSessionAppendV2( rebuildRequest( apiRequest: apiRequest, info: info, - route: Files.uploadSessionAppend, + route: Files.uploadSessionAppendV2, client: client ) ) diff --git a/Source/SwiftyDropbox/Shared/Generated/Team.swift b/Source/SwiftyDropbox/Shared/Generated/Team.swift index 2cf40989..9565d7bc 100644 --- a/Source/SwiftyDropbox/Shared/Generated/Team.swift +++ b/Source/SwiftyDropbox/Shared/Generated/Team.swift @@ -16880,6 +16880,20 @@ public class Team { style: .rpc ) ) + static let membersAdd = Route( + name: "members/add", + version: 1, + namespace: "team", + deprecated: false, + argSerializer: Team.MembersAddArgSerializer(), + responseSerializer: Team.MembersAddLaunchSerializer(), + errorSerializer: Serialization._VoidSerializer, + attributes: RouteAttributes( + auth: [.team], + host: .api, + style: .rpc + ) + ) static let membersAddV2 = Route( name: "members/add_v2", version: 2, @@ -16894,14 +16908,14 @@ public class Team { style: .rpc ) ) - static let membersAdd = Route( - name: "members/add", + static let membersAddJobStatusGet = Route( + name: "members/add/job_status/get", version: 1, namespace: "team", deprecated: false, - argSerializer: Team.MembersAddArgSerializer(), - responseSerializer: Team.MembersAddLaunchSerializer(), - errorSerializer: Serialization._VoidSerializer, + argSerializer: Async.PollArgSerializer(), + responseSerializer: Team.MembersAddJobStatusSerializer(), + errorSerializer: Async.PollErrorSerializer(), attributes: RouteAttributes( auth: [.team], host: .api, @@ -16922,14 +16936,14 @@ public class Team { style: .rpc ) ) - static let membersAddJobStatusGet = Route( - name: "members/add/job_status/get", + static let membersDeleteProfilePhoto = Route( + name: "members/delete_profile_photo", version: 1, namespace: "team", deprecated: false, - argSerializer: Async.PollArgSerializer(), - responseSerializer: Team.MembersAddJobStatusSerializer(), - errorSerializer: Async.PollErrorSerializer(), + argSerializer: Team.MembersDeleteProfilePhotoArgSerializer(), + responseSerializer: Team.TeamMemberInfoSerializer(), + errorSerializer: Team.MembersDeleteProfilePhotoErrorSerializer(), attributes: RouteAttributes( auth: [.team], host: .api, @@ -16950,28 +16964,28 @@ public class Team { style: .rpc ) ) - static let membersDeleteProfilePhoto = Route( - name: "members/delete_profile_photo", + static let membersGetAvailableTeamMemberRoles = Route( + name: "members/get_available_team_member_roles", version: 1, namespace: "team", deprecated: false, - argSerializer: Team.MembersDeleteProfilePhotoArgSerializer(), - responseSerializer: Team.TeamMemberInfoSerializer(), - errorSerializer: Team.MembersDeleteProfilePhotoErrorSerializer(), + argSerializer: Serialization._VoidSerializer, + responseSerializer: Team.MembersGetAvailableTeamMemberRolesResultSerializer(), + errorSerializer: Serialization._VoidSerializer, attributes: RouteAttributes( auth: [.team], host: .api, style: .rpc ) ) - static let membersGetAvailableTeamMemberRoles = Route( - name: "members/get_available_team_member_roles", + static let membersGetInfo = Route( + name: "members/get_info", version: 1, namespace: "team", deprecated: false, - argSerializer: Serialization._VoidSerializer, - responseSerializer: Team.MembersGetAvailableTeamMemberRolesResultSerializer(), - errorSerializer: Serialization._VoidSerializer, + argSerializer: Team.MembersGetInfoArgsSerializer(), + responseSerializer: ArraySerializer(Team.MembersGetInfoItemSerializer()), + errorSerializer: Team.MembersGetInfoErrorSerializer(), attributes: RouteAttributes( auth: [.team], host: .api, @@ -16992,14 +17006,14 @@ public class Team { style: .rpc ) ) - static let membersGetInfo = Route( - name: "members/get_info", + static let membersList = Route( + name: "members/list", version: 1, namespace: "team", deprecated: false, - argSerializer: Team.MembersGetInfoArgsSerializer(), - responseSerializer: ArraySerializer(Team.MembersGetInfoItemSerializer()), - errorSerializer: Team.MembersGetInfoErrorSerializer(), + argSerializer: Team.MembersListArgSerializer(), + responseSerializer: Team.MembersListResultSerializer(), + errorSerializer: Team.MembersListErrorSerializer(), attributes: RouteAttributes( auth: [.team], host: .api, @@ -17020,14 +17034,14 @@ public class Team { style: .rpc ) ) - static let membersList = Route( - name: "members/list", + static let membersListContinue = Route( + name: "members/list/continue", version: 1, namespace: "team", deprecated: false, - argSerializer: Team.MembersListArgSerializer(), + argSerializer: Team.MembersListContinueArgSerializer(), responseSerializer: Team.MembersListResultSerializer(), - errorSerializer: Team.MembersListErrorSerializer(), + errorSerializer: Team.MembersListContinueErrorSerializer(), attributes: RouteAttributes( auth: [.team], host: .api, @@ -17048,20 +17062,6 @@ public class Team { style: .rpc ) ) - static let membersListContinue = Route( - name: "members/list/continue", - version: 1, - namespace: "team", - deprecated: false, - argSerializer: Team.MembersListContinueArgSerializer(), - responseSerializer: Team.MembersListResultSerializer(), - errorSerializer: Team.MembersListContinueErrorSerializer(), - attributes: RouteAttributes( - auth: [.team], - host: .api, - style: .rpc - ) - ) static let membersMoveFormerMemberFiles = Route( name: "members/move_former_member_files", version: 1, @@ -17188,20 +17188,6 @@ public class Team { style: .rpc ) ) - static let membersSetAdminPermissionsV2 = Route( - name: "members/set_admin_permissions_v2", - version: 2, - namespace: "team", - deprecated: false, - argSerializer: Team.MembersSetPermissions2ArgSerializer(), - responseSerializer: Team.MembersSetPermissions2ResultSerializer(), - errorSerializer: Team.MembersSetPermissions2ErrorSerializer(), - attributes: RouteAttributes( - auth: [.team], - host: .api, - style: .rpc - ) - ) static let membersSetAdminPermissions = Route( name: "members/set_admin_permissions", version: 1, @@ -17216,14 +17202,14 @@ public class Team { style: .rpc ) ) - static let membersSetProfileV2 = Route( - name: "members/set_profile_v2", + static let membersSetAdminPermissionsV2 = Route( + name: "members/set_admin_permissions_v2", version: 2, namespace: "team", deprecated: false, - argSerializer: Team.MembersSetProfileArgSerializer(), - responseSerializer: Team.TeamMemberInfoV2ResultSerializer(), - errorSerializer: Team.MembersSetProfileErrorSerializer(), + argSerializer: Team.MembersSetPermissions2ArgSerializer(), + responseSerializer: Team.MembersSetPermissions2ResultSerializer(), + errorSerializer: Team.MembersSetPermissions2ErrorSerializer(), attributes: RouteAttributes( auth: [.team], host: .api, @@ -17244,14 +17230,14 @@ public class Team { style: .rpc ) ) - static let membersSetProfilePhotoV2 = Route( - name: "members/set_profile_photo_v2", + static let membersSetProfileV2 = Route( + name: "members/set_profile_v2", version: 2, namespace: "team", deprecated: false, - argSerializer: Team.MembersSetProfilePhotoArgSerializer(), + argSerializer: Team.MembersSetProfileArgSerializer(), responseSerializer: Team.TeamMemberInfoV2ResultSerializer(), - errorSerializer: Team.MembersSetProfilePhotoErrorSerializer(), + errorSerializer: Team.MembersSetProfileErrorSerializer(), attributes: RouteAttributes( auth: [.team], host: .api, @@ -17272,6 +17258,20 @@ public class Team { style: .rpc ) ) + static let membersSetProfilePhotoV2 = Route( + name: "members/set_profile_photo_v2", + version: 2, + namespace: "team", + deprecated: false, + argSerializer: Team.MembersSetProfilePhotoArgSerializer(), + responseSerializer: Team.TeamMemberInfoV2ResultSerializer(), + errorSerializer: Team.MembersSetProfilePhotoErrorSerializer(), + attributes: RouteAttributes( + auth: [.team], + host: .api, + style: .rpc + ) + ) static let membersSuspend = Route( name: "members/suspend", version: 1, diff --git a/Source/SwiftyDropbox/Shared/Generated/TeamRoutes.swift b/Source/SwiftyDropbox/Shared/Generated/TeamRoutes.swift index 67e66bf6..179a489b 100644 --- a/Source/SwiftyDropbox/Shared/Generated/TeamRoutes.swift +++ b/Source/SwiftyDropbox/Shared/Generated/TeamRoutes.swift @@ -738,14 +738,14 @@ public class TeamRoutes: DropboxTransportClientOwning { /// /// - parameter newMembers: Details of new members to be added to the team. /// - /// - returns: Through the response callback, the caller will receive a `Team.MembersAddLaunchV2Result` object on - /// success or a `Void` object on failure. - @discardableResult public func membersAddV2( - newMembers: [Team.MemberAddV2Arg], + /// - returns: Through the response callback, the caller will receive a `Team.MembersAddLaunch` object on success or + /// a `Void` object on failure. + @discardableResult public func membersAdd( + newMembers: [Team.MemberAddArg], forceAsync: Bool = false - ) -> RpcRequest { - let route = Team.membersAddV2 - let serverArgs = Team.MembersAddV2Arg(newMembers: newMembers, forceAsync: forceAsync) + ) -> RpcRequest { + let route = Team.membersAdd + let serverArgs = Team.MembersAddArg(newMembers: newMembers, forceAsync: forceAsync) return client.request(route, serverArgs: serverArgs) } @@ -761,18 +761,18 @@ public class TeamRoutes: DropboxTransportClientOwning { /// /// - parameter newMembers: Details of new members to be added to the team. /// - /// - returns: Through the response callback, the caller will receive a `Team.MembersAddLaunch` object on success or - /// a `Void` object on failure. - @discardableResult public func membersAdd( - newMembers: [Team.MemberAddArg], + /// - returns: Through the response callback, the caller will receive a `Team.MembersAddLaunchV2Result` object on + /// success or a `Void` object on failure. + @discardableResult public func membersAddV2( + newMembers: [Team.MemberAddV2Arg], forceAsync: Bool = false - ) -> RpcRequest { - let route = Team.membersAdd - let serverArgs = Team.MembersAddArg(newMembers: newMembers, forceAsync: forceAsync) + ) -> RpcRequest { + let route = Team.membersAddV2 + let serverArgs = Team.MembersAddV2Arg(newMembers: newMembers, forceAsync: forceAsync) return client.request(route, serverArgs: serverArgs) } - /// Once an async_job_id is returned from membersAddV2 , use this to poll the status of the asynchronous request. + /// Once an async_job_id is returned from membersAdd , use this to poll the status of the asynchronous request. /// Permission : Team member management. /// /// - scope: members.write @@ -780,16 +780,15 @@ public class TeamRoutes: DropboxTransportClientOwning { /// - parameter asyncJobId: Id of the asynchronous job. This is the value of a response returned from the method /// that launched the job. /// - /// - returns: Through the response callback, the caller will receive a `Team.MembersAddJobStatusV2Result` object on - /// success or a `Async.PollError` object on failure. - @discardableResult public func membersAddJobStatusGetV2(asyncJobId: String) - -> RpcRequest { - let route = Team.membersAddJobStatusGetV2 + /// - returns: Through the response callback, the caller will receive a `Team.MembersAddJobStatus` object on success + /// or a `Async.PollError` object on failure. + @discardableResult public func membersAddJobStatusGet(asyncJobId: String) -> RpcRequest { + let route = Team.membersAddJobStatusGet let serverArgs = Async.PollArg(asyncJobId: asyncJobId) return client.request(route, serverArgs: serverArgs) } - /// Once an async_job_id is returned from membersAdd , use this to poll the status of the asynchronous request. + /// Once an async_job_id is returned from membersAddV2 , use this to poll the status of the asynchronous request. /// Permission : Team member management. /// /// - scope: members.write @@ -797,10 +796,11 @@ public class TeamRoutes: DropboxTransportClientOwning { /// - parameter asyncJobId: Id of the asynchronous job. This is the value of a response returned from the method /// that launched the job. /// - /// - returns: Through the response callback, the caller will receive a `Team.MembersAddJobStatus` object on success - /// or a `Async.PollError` object on failure. - @discardableResult public func membersAddJobStatusGet(asyncJobId: String) -> RpcRequest { - let route = Team.membersAddJobStatusGet + /// - returns: Through the response callback, the caller will receive a `Team.MembersAddJobStatusV2Result` object on + /// success or a `Async.PollError` object on failure. + @discardableResult public func membersAddJobStatusGetV2(asyncJobId: String) + -> RpcRequest { + let route = Team.membersAddJobStatusGetV2 let serverArgs = Async.PollArg(asyncJobId: asyncJobId) return client.request(route, serverArgs: serverArgs) } @@ -811,13 +811,13 @@ public class TeamRoutes: DropboxTransportClientOwning { /// /// - parameter user: Identity of the user whose profile photo will be deleted. /// - /// - returns: Through the response callback, the caller will receive a `Team.TeamMemberInfoV2Result` object on - /// success or a `Team.MembersDeleteProfilePhotoError` object on failure. - @discardableResult public func membersDeleteProfilePhotoV2( + /// - returns: Through the response callback, the caller will receive a `Team.TeamMemberInfo` object on success or a + /// `Team.MembersDeleteProfilePhotoError` object on failure. + @discardableResult public func membersDeleteProfilePhoto( user: Team .UserSelectorArg - ) -> RpcRequest { - let route = Team.membersDeleteProfilePhotoV2 + ) -> RpcRequest { + let route = Team.membersDeleteProfilePhoto let serverArgs = Team.MembersDeleteProfilePhotoArg(user: user) return client.request(route, serverArgs: serverArgs) } @@ -828,13 +828,13 @@ public class TeamRoutes: DropboxTransportClientOwning { /// /// - parameter user: Identity of the user whose profile photo will be deleted. /// - /// - returns: Through the response callback, the caller will receive a `Team.TeamMemberInfo` object on success or a - /// `Team.MembersDeleteProfilePhotoError` object on failure. - @discardableResult public func membersDeleteProfilePhoto( + /// - returns: Through the response callback, the caller will receive a `Team.TeamMemberInfoV2Result` object on + /// success or a `Team.MembersDeleteProfilePhotoError` object on failure. + @discardableResult public func membersDeleteProfilePhotoV2( user: Team .UserSelectorArg - ) -> RpcRequest { - let route = Team.membersDeleteProfilePhoto + ) -> RpcRequest { + let route = Team.membersDeleteProfilePhotoV2 let serverArgs = Team.MembersDeleteProfilePhotoArg(user: user) return client.request(route, serverArgs: serverArgs) } @@ -859,12 +859,12 @@ public class TeamRoutes: DropboxTransportClientOwning { /// /// - parameter members: List of team members. /// - /// - returns: Through the response callback, the caller will receive a `Team.MembersGetInfoV2Result` object on + /// - returns: Through the response callback, the caller will receive a `Array` object on /// success or a `Team.MembersGetInfoError` object on failure. - @discardableResult public func membersGetInfoV2(members: [Team.UserSelectorArg]) - -> RpcRequest { - let route = Team.membersGetInfoV2 - let serverArgs = Team.MembersGetInfoV2Arg(members: members) + @discardableResult public func membersGetInfo(members: [Team.UserSelectorArg]) + -> RpcRequest, Team.MembersGetInfoErrorSerializer> { + let route = Team.membersGetInfo + let serverArgs = Team.MembersGetInfoArgs(members: members) return client.request(route, serverArgs: serverArgs) } @@ -875,12 +875,12 @@ public class TeamRoutes: DropboxTransportClientOwning { /// /// - parameter members: List of team members. /// - /// - returns: Through the response callback, the caller will receive a `Array` object on + /// - returns: Through the response callback, the caller will receive a `Team.MembersGetInfoV2Result` object on /// success or a `Team.MembersGetInfoError` object on failure. - @discardableResult public func membersGetInfo(members: [Team.UserSelectorArg]) - -> RpcRequest, Team.MembersGetInfoErrorSerializer> { - let route = Team.membersGetInfo - let serverArgs = Team.MembersGetInfoArgs(members: members) + @discardableResult public func membersGetInfoV2(members: [Team.UserSelectorArg]) + -> RpcRequest { + let route = Team.membersGetInfoV2 + let serverArgs = Team.MembersGetInfoV2Arg(members: members) return client.request(route, serverArgs: serverArgs) } @@ -891,13 +891,13 @@ public class TeamRoutes: DropboxTransportClientOwning { /// - parameter limit: Number of results to return per call. /// - parameter includeRemoved: Whether to return removed members. /// - /// - returns: Through the response callback, the caller will receive a `Team.MembersListV2Result` object on success + /// - returns: Through the response callback, the caller will receive a `Team.MembersListResult` object on success /// or a `Team.MembersListError` object on failure. - @discardableResult public func membersListV2( + @discardableResult public func membersList( limit: UInt32 = 1_000, includeRemoved: Bool = false - ) -> RpcRequest { - let route = Team.membersListV2 + ) -> RpcRequest { + let route = Team.membersList let serverArgs = Team.MembersListArg(limit: limit, includeRemoved: includeRemoved) return client.request(route, serverArgs: serverArgs) } @@ -909,45 +909,45 @@ public class TeamRoutes: DropboxTransportClientOwning { /// - parameter limit: Number of results to return per call. /// - parameter includeRemoved: Whether to return removed members. /// - /// - returns: Through the response callback, the caller will receive a `Team.MembersListResult` object on success + /// - returns: Through the response callback, the caller will receive a `Team.MembersListV2Result` object on success /// or a `Team.MembersListError` object on failure. - @discardableResult public func membersList( + @discardableResult public func membersListV2( limit: UInt32 = 1_000, includeRemoved: Bool = false - ) -> RpcRequest { - let route = Team.membersList + ) -> RpcRequest { + let route = Team.membersListV2 let serverArgs = Team.MembersListArg(limit: limit, includeRemoved: includeRemoved) return client.request(route, serverArgs: serverArgs) } - /// Once a cursor has been retrieved from membersListV2, use this to paginate through all team members. Permission : + /// Once a cursor has been retrieved from membersList, use this to paginate through all team members. Permission : /// Team information. /// /// - scope: members.read /// /// - parameter cursor: Indicates from what point to get the next set of members. /// - /// - returns: Through the response callback, the caller will receive a `Team.MembersListV2Result` object on success + /// - returns: Through the response callback, the caller will receive a `Team.MembersListResult` object on success /// or a `Team.MembersListContinueError` object on failure. - @discardableResult public func membersListContinueV2(cursor: String) - -> RpcRequest { - let route = Team.membersListContinueV2 + @discardableResult public func membersListContinue(cursor: String) + -> RpcRequest { + let route = Team.membersListContinue let serverArgs = Team.MembersListContinueArg(cursor: cursor) return client.request(route, serverArgs: serverArgs) } - /// Once a cursor has been retrieved from membersList, use this to paginate through all team members. Permission : + /// Once a cursor has been retrieved from membersListV2, use this to paginate through all team members. Permission : /// Team information. /// /// - scope: members.read /// /// - parameter cursor: Indicates from what point to get the next set of members. /// - /// - returns: Through the response callback, the caller will receive a `Team.MembersListResult` object on success + /// - returns: Through the response callback, the caller will receive a `Team.MembersListV2Result` object on success /// or a `Team.MembersListContinueError` object on failure. - @discardableResult public func membersListContinue(cursor: String) - -> RpcRequest { - let route = Team.membersListContinue + @discardableResult public func membersListContinueV2(cursor: String) + -> RpcRequest { + let route = Team.membersListContinueV2 let serverArgs = Team.MembersListContinueArg(cursor: cursor) return client.request(route, serverArgs: serverArgs) } @@ -1136,17 +1136,16 @@ public class TeamRoutes: DropboxTransportClientOwning { /// - scope: members.write /// /// - parameter user: Identity of user whose role will be set. - /// - parameter newRoles: The new roles for the member. Send empty list to make user member only. For now, only up - /// to one role is allowed. + /// - parameter newRole: The new role of the member. /// - /// - returns: Through the response callback, the caller will receive a `Team.MembersSetPermissions2Result` object - /// on success or a `Team.MembersSetPermissions2Error` object on failure. - @discardableResult public func membersSetAdminPermissionsV2( + /// - returns: Through the response callback, the caller will receive a `Team.MembersSetPermissionsResult` object on + /// success or a `Team.MembersSetPermissionsError` object on failure. + @discardableResult public func membersSetAdminPermissions( user: Team.UserSelectorArg, - newRoles: [String]? = nil - ) -> RpcRequest { - let route = Team.membersSetAdminPermissionsV2 - let serverArgs = Team.MembersSetPermissions2Arg(user: user, newRoles: newRoles) + newRole: Team.AdminTier + ) -> RpcRequest { + let route = Team.membersSetAdminPermissions + let serverArgs = Team.MembersSetPermissionsArg(user: user, newRole: newRole) return client.request(route, serverArgs: serverArgs) } @@ -1155,16 +1154,17 @@ public class TeamRoutes: DropboxTransportClientOwning { /// - scope: members.write /// /// - parameter user: Identity of user whose role will be set. - /// - parameter newRole: The new role of the member. + /// - parameter newRoles: The new roles for the member. Send empty list to make user member only. For now, only up + /// to one role is allowed. /// - /// - returns: Through the response callback, the caller will receive a `Team.MembersSetPermissionsResult` object on - /// success or a `Team.MembersSetPermissionsError` object on failure. - @discardableResult public func membersSetAdminPermissions( + /// - returns: Through the response callback, the caller will receive a `Team.MembersSetPermissions2Result` object + /// on success or a `Team.MembersSetPermissions2Error` object on failure. + @discardableResult public func membersSetAdminPermissionsV2( user: Team.UserSelectorArg, - newRole: Team.AdminTier - ) -> RpcRequest { - let route = Team.membersSetAdminPermissions - let serverArgs = Team.MembersSetPermissionsArg(user: user, newRole: newRole) + newRoles: [String]? = nil + ) -> RpcRequest { + let route = Team.membersSetAdminPermissionsV2 + let serverArgs = Team.MembersSetPermissions2Arg(user: user, newRoles: newRoles) return client.request(route, serverArgs: serverArgs) } @@ -1181,9 +1181,9 @@ public class TeamRoutes: DropboxTransportClientOwning { /// configuration. /// - parameter newIsDirectoryRestricted: New value for whether the user is a directory restricted user. /// - /// - returns: Through the response callback, the caller will receive a `Team.TeamMemberInfoV2Result` object on - /// success or a `Team.MembersSetProfileError` object on failure. - @discardableResult public func membersSetProfileV2( + /// - returns: Through the response callback, the caller will receive a `Team.TeamMemberInfo` object on success or a + /// `Team.MembersSetProfileError` object on failure. + @discardableResult public func membersSetProfile( user: Team.UserSelectorArg, newEmail: String? = nil, newExternalId: String? = nil, @@ -1191,8 +1191,8 @@ public class TeamRoutes: DropboxTransportClientOwning { newSurname: String? = nil, newPersistentId: String? = nil, newIsDirectoryRestricted: Bool? = nil - ) -> RpcRequest { - let route = Team.membersSetProfileV2 + ) -> RpcRequest { + let route = Team.membersSetProfile let serverArgs = Team.MembersSetProfileArg( user: user, newEmail: newEmail, @@ -1218,9 +1218,9 @@ public class TeamRoutes: DropboxTransportClientOwning { /// configuration. /// - parameter newIsDirectoryRestricted: New value for whether the user is a directory restricted user. /// - /// - returns: Through the response callback, the caller will receive a `Team.TeamMemberInfo` object on success or a - /// `Team.MembersSetProfileError` object on failure. - @discardableResult public func membersSetProfile( + /// - returns: Through the response callback, the caller will receive a `Team.TeamMemberInfoV2Result` object on + /// success or a `Team.MembersSetProfileError` object on failure. + @discardableResult public func membersSetProfileV2( user: Team.UserSelectorArg, newEmail: String? = nil, newExternalId: String? = nil, @@ -1228,8 +1228,8 @@ public class TeamRoutes: DropboxTransportClientOwning { newSurname: String? = nil, newPersistentId: String? = nil, newIsDirectoryRestricted: Bool? = nil - ) -> RpcRequest { - let route = Team.membersSetProfile + ) -> RpcRequest { + let route = Team.membersSetProfileV2 let serverArgs = Team.MembersSetProfileArg( user: user, newEmail: newEmail, @@ -1249,13 +1249,13 @@ public class TeamRoutes: DropboxTransportClientOwning { /// - parameter user: Identity of the user whose profile photo will be set. /// - parameter photo: Image to set as the member's new profile photo. /// - /// - returns: Through the response callback, the caller will receive a `Team.TeamMemberInfoV2Result` object on - /// success or a `Team.MembersSetProfilePhotoError` object on failure. - @discardableResult public func membersSetProfilePhotoV2( + /// - returns: Through the response callback, the caller will receive a `Team.TeamMemberInfo` object on success or a + /// `Team.MembersSetProfilePhotoError` object on failure. + @discardableResult public func membersSetProfilePhoto( user: Team.UserSelectorArg, photo: Account.PhotoSourceArg - ) -> RpcRequest { - let route = Team.membersSetProfilePhotoV2 + ) -> RpcRequest { + let route = Team.membersSetProfilePhoto let serverArgs = Team.MembersSetProfilePhotoArg(user: user, photo: photo) return client.request(route, serverArgs: serverArgs) } @@ -1267,13 +1267,13 @@ public class TeamRoutes: DropboxTransportClientOwning { /// - parameter user: Identity of the user whose profile photo will be set. /// - parameter photo: Image to set as the member's new profile photo. /// - /// - returns: Through the response callback, the caller will receive a `Team.TeamMemberInfo` object on success or a - /// `Team.MembersSetProfilePhotoError` object on failure. - @discardableResult public func membersSetProfilePhoto( + /// - returns: Through the response callback, the caller will receive a `Team.TeamMemberInfoV2Result` object on + /// success or a `Team.MembersSetProfilePhotoError` object on failure. + @discardableResult public func membersSetProfilePhotoV2( user: Team.UserSelectorArg, photo: Account.PhotoSourceArg - ) -> RpcRequest { - let route = Team.membersSetProfilePhoto + ) -> RpcRequest { + let route = Team.membersSetProfilePhotoV2 let serverArgs = Team.MembersSetProfilePhotoArg(user: user, photo: photo) return client.request(route, serverArgs: serverArgs) } diff --git a/Source/SwiftyDropboxObjC/Shared/Generated/DBXDropboxBaseRequestBox.swift b/Source/SwiftyDropboxObjC/Shared/Generated/DBXDropboxBaseRequestBox.swift index 870fb546..fb6f63c5 100644 --- a/Source/SwiftyDropboxObjC/Shared/Generated/DBXDropboxBaseRequestBox.swift +++ b/Source/SwiftyDropboxObjC/Shared/Generated/DBXDropboxBaseRequestBox.swift @@ -39,12 +39,12 @@ extension DropboxBaseRequestBox { if case .files_upload(let swift) = self { return DBXFilesUploadUploadRequest(swift: swift) } - if case .files_uploadSessionAppendV2(let swift) = self { - return DBXFilesUploadSessionAppendUploadRequestV2(swift: swift) - } if case .files_uploadSessionAppend(let swift) = self { return DBXFilesUploadSessionAppendUploadRequest(swift: swift) } + if case .files_uploadSessionAppendV2(let swift) = self { + return DBXFilesUploadSessionAppendUploadRequestV2(swift: swift) + } if case .files_uploadSessionFinish(let swift) = self { return DBXFilesUploadSessionFinishUploadRequest(swift: swift) } diff --git a/Source/SwiftyDropboxObjC/Shared/Generated/DBXFileRequestsRoutes.swift b/Source/SwiftyDropboxObjC/Shared/Generated/DBXFileRequestsRoutes.swift index a8746f3d..d9deecc6 100644 --- a/Source/SwiftyDropboxObjC/Shared/Generated/DBXFileRequestsRoutes.swift +++ b/Source/SwiftyDropboxObjC/Shared/Generated/DBXFileRequestsRoutes.swift @@ -118,14 +118,13 @@ public class DBXFileRequestsRoutes: NSObject { /// /// - scope: file_requests.read /// - /// - parameter limit: The maximum number of file requests that should be returned per request. /// - /// - returns: Through the response callback, the caller will receive a `FileRequests.ListFileRequestsV2Result` - /// object on success or a `FileRequests.ListFileRequestsError` object on failure. + /// - returns: Through the response callback, the caller will receive a `FileRequests.ListFileRequestsResult` object + /// on success or a `FileRequests.ListFileRequestsError` object on failure. @objc - @discardableResult public func listV2(limit: NSNumber) -> DBXFileRequestsList_RpcRequestV2 { - let swift = swift.listV2(limit: limit.uint64Value) - return DBXFileRequestsList_RpcRequestV2(swift: swift) + @discardableResult public func list_() -> DBXFileRequestsList_RpcRequest { + let swift = swift.list_() + return DBXFileRequestsList_RpcRequest(swift: swift) } /// Returns a list of file requests owned by this user. For apps with the app folder permission, this will only @@ -133,11 +132,13 @@ public class DBXFileRequestsRoutes: NSObject { /// /// - scope: file_requests.read /// + /// - parameter limit: The maximum number of file requests that should be returned per request. + /// /// - returns: Through the response callback, the caller will receive a `FileRequests.ListFileRequestsV2Result` /// object on success or a `FileRequests.ListFileRequestsError` object on failure. @objc - @discardableResult public func listV2() -> DBXFileRequestsList_RpcRequestV2 { - let swift = swift.listV2() + @discardableResult public func listV2(limit: NSNumber) -> DBXFileRequestsList_RpcRequestV2 { + let swift = swift.listV2(limit: limit.uint64Value) return DBXFileRequestsList_RpcRequestV2(swift: swift) } @@ -146,13 +147,12 @@ public class DBXFileRequestsRoutes: NSObject { /// /// - scope: file_requests.read /// - /// - /// - returns: Through the response callback, the caller will receive a `FileRequests.ListFileRequestsResult` object - /// on success or a `FileRequests.ListFileRequestsError` object on failure. + /// - returns: Through the response callback, the caller will receive a `FileRequests.ListFileRequestsV2Result` + /// object on success or a `FileRequests.ListFileRequestsError` object on failure. @objc - @discardableResult public func list_() -> DBXFileRequestsList_RpcRequest { - let swift = swift.list_() - return DBXFileRequestsList_RpcRequest(swift: swift) + @discardableResult public func listV2() -> DBXFileRequestsList_RpcRequestV2 { + let swift = swift.listV2() + return DBXFileRequestsList_RpcRequestV2(swift: swift) } /// Once a cursor has been retrieved from listV2, use this to paginate through all file requests. The cursor must @@ -549,16 +549,16 @@ public class DBXFileRequestsGetRpcRequest: NSObject, DBXRequest { } @objc -public class DBXFileRequestsList_RpcRequestV2: NSObject, DBXRequest { - var swift: RpcRequest +public class DBXFileRequestsList_RpcRequest: NSObject, DBXRequest { + var swift: RpcRequest - init(swift: RpcRequest) { + init(swift: RpcRequest) { self.swift = swift } @objc @discardableResult public func response( - completionHandler: @escaping (DBXFileRequestsListFileRequestsV2Result?, DBXFileRequestsListFileRequestsError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXFileRequestsListFileRequestsResult?, DBXFileRequestsListFileRequestsError?, DBXCallError?) -> Void ) -> Self { response(queue: nil, completionHandler: completionHandler) } @@ -566,7 +566,7 @@ public class DBXFileRequestsList_RpcRequestV2: NSObject, DBXRequest { @objc @discardableResult public func response( queue: DispatchQueue?, - completionHandler: @escaping (DBXFileRequestsListFileRequestsV2Result?, DBXFileRequestsListFileRequestsError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXFileRequestsListFileRequestsResult?, DBXFileRequestsListFileRequestsError?, DBXCallError?) -> Void ) -> Self { swift.response(queue: queue) { result, error in var routeError: DBXFileRequestsListFileRequestsError? @@ -580,9 +580,9 @@ public class DBXFileRequestsList_RpcRequestV2: NSObject, DBXRequest { callError = error?.objc } - var objc: DBXFileRequestsListFileRequestsV2Result? + var objc: DBXFileRequestsListFileRequestsResult? if let swift = result { - objc = DBXFileRequestsListFileRequestsV2Result(swift: swift) + objc = DBXFileRequestsListFileRequestsResult(swift: swift) } completionHandler(objc, routeError, callError) } @@ -616,16 +616,16 @@ public class DBXFileRequestsList_RpcRequestV2: NSObject, DBXRequest { } @objc -public class DBXFileRequestsList_RpcRequest: NSObject, DBXRequest { - var swift: RpcRequest +public class DBXFileRequestsList_RpcRequestV2: NSObject, DBXRequest { + var swift: RpcRequest - init(swift: RpcRequest) { + init(swift: RpcRequest) { self.swift = swift } @objc @discardableResult public func response( - completionHandler: @escaping (DBXFileRequestsListFileRequestsResult?, DBXFileRequestsListFileRequestsError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXFileRequestsListFileRequestsV2Result?, DBXFileRequestsListFileRequestsError?, DBXCallError?) -> Void ) -> Self { response(queue: nil, completionHandler: completionHandler) } @@ -633,7 +633,7 @@ public class DBXFileRequestsList_RpcRequest: NSObject, DBXRequest { @objc @discardableResult public func response( queue: DispatchQueue?, - completionHandler: @escaping (DBXFileRequestsListFileRequestsResult?, DBXFileRequestsListFileRequestsError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXFileRequestsListFileRequestsV2Result?, DBXFileRequestsListFileRequestsError?, DBXCallError?) -> Void ) -> Self { swift.response(queue: queue) { result, error in var routeError: DBXFileRequestsListFileRequestsError? @@ -647,9 +647,9 @@ public class DBXFileRequestsList_RpcRequest: NSObject, DBXRequest { callError = error?.objc } - var objc: DBXFileRequestsListFileRequestsResult? + var objc: DBXFileRequestsListFileRequestsV2Result? if let swift = result { - objc = DBXFileRequestsListFileRequestsResult(swift: swift) + objc = DBXFileRequestsListFileRequestsV2Result(swift: swift) } completionHandler(objc, routeError, callError) } diff --git a/Source/SwiftyDropboxObjC/Shared/Generated/DBXFilesRoutes.swift b/Source/SwiftyDropboxObjC/Shared/Generated/DBXFilesRoutes.swift index 3d5dbc6c..326b4fbd 100644 --- a/Source/SwiftyDropboxObjC/Shared/Generated/DBXFilesRoutes.swift +++ b/Source/SwiftyDropboxObjC/Shared/Generated/DBXFilesRoutes.swift @@ -2519,16 +2519,16 @@ public class DBXFilesAlphaUploadUploadRequest: NSObject, DBXRequest { } @objc -public class DBXFilesCopyRpcRequestV2: NSObject, DBXRequest { - var swift: RpcRequest +public class DBXFilesCopyRpcRequest: NSObject, DBXRequest { + var swift: RpcRequest - init(swift: RpcRequest) { + init(swift: RpcRequest) { self.swift = swift } @objc @discardableResult public func response( - completionHandler: @escaping (DBXFilesRelocationResult?, DBXFilesRelocationError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXFilesMetadata?, DBXFilesRelocationError?, DBXCallError?) -> Void ) -> Self { response(queue: nil, completionHandler: completionHandler) } @@ -2536,7 +2536,7 @@ public class DBXFilesCopyRpcRequestV2: NSObject, DBXRequest { @objc @discardableResult public func response( queue: DispatchQueue?, - completionHandler: @escaping (DBXFilesRelocationResult?, DBXFilesRelocationError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXFilesMetadata?, DBXFilesRelocationError?, DBXCallError?) -> Void ) -> Self { swift.response(queue: queue) { result, error in var routeError: DBXFilesRelocationError? @@ -2550,9 +2550,9 @@ public class DBXFilesCopyRpcRequestV2: NSObject, DBXRequest { callError = error?.objc } - var objc: DBXFilesRelocationResult? + var objc: DBXFilesMetadata? if let swift = result { - objc = DBXFilesRelocationResult(swift: swift) + objc = DBXFilesMetadata.wrapPreservingSubtypes(swift: swift) } completionHandler(objc, routeError, callError) } @@ -2586,16 +2586,16 @@ public class DBXFilesCopyRpcRequestV2: NSObject, DBXRequest { } @objc -public class DBXFilesCopyRpcRequest: NSObject, DBXRequest { - var swift: RpcRequest +public class DBXFilesCopyRpcRequestV2: NSObject, DBXRequest { + var swift: RpcRequest - init(swift: RpcRequest) { + init(swift: RpcRequest) { self.swift = swift } @objc @discardableResult public func response( - completionHandler: @escaping (DBXFilesMetadata?, DBXFilesRelocationError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXFilesRelocationResult?, DBXFilesRelocationError?, DBXCallError?) -> Void ) -> Self { response(queue: nil, completionHandler: completionHandler) } @@ -2603,7 +2603,7 @@ public class DBXFilesCopyRpcRequest: NSObject, DBXRequest { @objc @discardableResult public func response( queue: DispatchQueue?, - completionHandler: @escaping (DBXFilesMetadata?, DBXFilesRelocationError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXFilesRelocationResult?, DBXFilesRelocationError?, DBXCallError?) -> Void ) -> Self { swift.response(queue: queue) { result, error in var routeError: DBXFilesRelocationError? @@ -2617,9 +2617,9 @@ public class DBXFilesCopyRpcRequest: NSObject, DBXRequest { callError = error?.objc } - var objc: DBXFilesMetadata? + var objc: DBXFilesRelocationResult? if let swift = result { - objc = DBXFilesMetadata.wrapPreservingSubtypes(swift: swift) + objc = DBXFilesRelocationResult(swift: swift) } completionHandler(objc, routeError, callError) } @@ -2653,16 +2653,16 @@ public class DBXFilesCopyRpcRequest: NSObject, DBXRequest { } @objc -public class DBXFilesCopyBatchRpcRequestV2: NSObject, DBXRequest { - var swift: RpcRequest +public class DBXFilesCopyBatchRpcRequest: NSObject, DBXRequest { + var swift: RpcRequest - init(swift: RpcRequest) { + init(swift: RpcRequest) { self.swift = swift } @objc @discardableResult public func response( - completionHandler: @escaping (DBXFilesRelocationBatchV2Launch?, DBXCallError?) -> Void + completionHandler: @escaping (DBXFilesRelocationBatchLaunch?, DBXCallError?) -> Void ) -> Self { response(queue: nil, completionHandler: completionHandler) } @@ -2670,12 +2670,12 @@ public class DBXFilesCopyBatchRpcRequestV2: NSObject, DBXRequest { @objc @discardableResult public func response( queue: DispatchQueue?, - completionHandler: @escaping (DBXFilesRelocationBatchV2Launch?, DBXCallError?) -> Void + completionHandler: @escaping (DBXFilesRelocationBatchLaunch?, DBXCallError?) -> Void ) -> Self { swift.response(queue: queue) { result, error in - var objc: DBXFilesRelocationBatchV2Launch? + var objc: DBXFilesRelocationBatchLaunch? if let swift = result { - objc = DBXFilesRelocationBatchV2Launch.factory(swift: swift) + objc = DBXFilesRelocationBatchLaunch.factory(swift: swift) } completionHandler(objc, error?.objc) } @@ -2709,16 +2709,16 @@ public class DBXFilesCopyBatchRpcRequestV2: NSObject, DBXRequest { } @objc -public class DBXFilesCopyBatchRpcRequest: NSObject, DBXRequest { - var swift: RpcRequest +public class DBXFilesCopyBatchRpcRequestV2: NSObject, DBXRequest { + var swift: RpcRequest - init(swift: RpcRequest) { + init(swift: RpcRequest) { self.swift = swift } @objc @discardableResult public func response( - completionHandler: @escaping (DBXFilesRelocationBatchLaunch?, DBXCallError?) -> Void + completionHandler: @escaping (DBXFilesRelocationBatchV2Launch?, DBXCallError?) -> Void ) -> Self { response(queue: nil, completionHandler: completionHandler) } @@ -2726,12 +2726,12 @@ public class DBXFilesCopyBatchRpcRequest: NSObject, DBXRequest { @objc @discardableResult public func response( queue: DispatchQueue?, - completionHandler: @escaping (DBXFilesRelocationBatchLaunch?, DBXCallError?) -> Void + completionHandler: @escaping (DBXFilesRelocationBatchV2Launch?, DBXCallError?) -> Void ) -> Self { swift.response(queue: queue) { result, error in - var objc: DBXFilesRelocationBatchLaunch? + var objc: DBXFilesRelocationBatchV2Launch? if let swift = result { - objc = DBXFilesRelocationBatchLaunch.factory(swift: swift) + objc = DBXFilesRelocationBatchV2Launch.factory(swift: swift) } completionHandler(objc, error?.objc) } @@ -2765,16 +2765,16 @@ public class DBXFilesCopyBatchRpcRequest: NSObject, DBXRequest { } @objc -public class DBXFilesCopyBatchCheckRpcRequestV2: NSObject, DBXRequest { - var swift: RpcRequest +public class DBXFilesCopyBatchCheckRpcRequest: NSObject, DBXRequest { + var swift: RpcRequest - init(swift: RpcRequest) { + init(swift: RpcRequest) { self.swift = swift } @objc @discardableResult public func response( - completionHandler: @escaping (DBXFilesRelocationBatchV2JobStatus?, DBXAsyncPollError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXFilesRelocationBatchJobStatus?, DBXAsyncPollError?, DBXCallError?) -> Void ) -> Self { response(queue: nil, completionHandler: completionHandler) } @@ -2782,7 +2782,7 @@ public class DBXFilesCopyBatchCheckRpcRequestV2: NSObject, DBXRequest { @objc @discardableResult public func response( queue: DispatchQueue?, - completionHandler: @escaping (DBXFilesRelocationBatchV2JobStatus?, DBXAsyncPollError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXFilesRelocationBatchJobStatus?, DBXAsyncPollError?, DBXCallError?) -> Void ) -> Self { swift.response(queue: queue) { result, error in var routeError: DBXAsyncPollError? @@ -2796,9 +2796,9 @@ public class DBXFilesCopyBatchCheckRpcRequestV2: NSObject, DBXRequest { callError = error?.objc } - var objc: DBXFilesRelocationBatchV2JobStatus? + var objc: DBXFilesRelocationBatchJobStatus? if let swift = result { - objc = DBXFilesRelocationBatchV2JobStatus.factory(swift: swift) + objc = DBXFilesRelocationBatchJobStatus.factory(swift: swift) } completionHandler(objc, routeError, callError) } @@ -2832,16 +2832,16 @@ public class DBXFilesCopyBatchCheckRpcRequestV2: NSObject, DBXRequest { } @objc -public class DBXFilesCopyBatchCheckRpcRequest: NSObject, DBXRequest { - var swift: RpcRequest +public class DBXFilesCopyBatchCheckRpcRequestV2: NSObject, DBXRequest { + var swift: RpcRequest - init(swift: RpcRequest) { + init(swift: RpcRequest) { self.swift = swift } @objc @discardableResult public func response( - completionHandler: @escaping (DBXFilesRelocationBatchJobStatus?, DBXAsyncPollError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXFilesRelocationBatchV2JobStatus?, DBXAsyncPollError?, DBXCallError?) -> Void ) -> Self { response(queue: nil, completionHandler: completionHandler) } @@ -2849,7 +2849,7 @@ public class DBXFilesCopyBatchCheckRpcRequest: NSObject, DBXRequest { @objc @discardableResult public func response( queue: DispatchQueue?, - completionHandler: @escaping (DBXFilesRelocationBatchJobStatus?, DBXAsyncPollError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXFilesRelocationBatchV2JobStatus?, DBXAsyncPollError?, DBXCallError?) -> Void ) -> Self { swift.response(queue: queue) { result, error in var routeError: DBXAsyncPollError? @@ -2863,9 +2863,9 @@ public class DBXFilesCopyBatchCheckRpcRequest: NSObject, DBXRequest { callError = error?.objc } - var objc: DBXFilesRelocationBatchJobStatus? + var objc: DBXFilesRelocationBatchV2JobStatus? if let swift = result { - objc = DBXFilesRelocationBatchJobStatus.factory(swift: swift) + objc = DBXFilesRelocationBatchV2JobStatus.factory(swift: swift) } completionHandler(objc, routeError, callError) } @@ -3033,16 +3033,16 @@ public class DBXFilesCopyReferenceSaveRpcRequest: NSObject, DBXRequest { } @objc -public class DBXFilesCreateFolderRpcRequestV2: NSObject, DBXRequest { - var swift: RpcRequest +public class DBXFilesCreateFolderRpcRequest: NSObject, DBXRequest { + var swift: RpcRequest - init(swift: RpcRequest) { + init(swift: RpcRequest) { self.swift = swift } @objc @discardableResult public func response( - completionHandler: @escaping (DBXFilesCreateFolderResult?, DBXFilesCreateFolderError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXFilesFolderMetadata?, DBXFilesCreateFolderError?, DBXCallError?) -> Void ) -> Self { response(queue: nil, completionHandler: completionHandler) } @@ -3050,7 +3050,7 @@ public class DBXFilesCreateFolderRpcRequestV2: NSObject, DBXRequest { @objc @discardableResult public func response( queue: DispatchQueue?, - completionHandler: @escaping (DBXFilesCreateFolderResult?, DBXFilesCreateFolderError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXFilesFolderMetadata?, DBXFilesCreateFolderError?, DBXCallError?) -> Void ) -> Self { swift.response(queue: queue) { result, error in var routeError: DBXFilesCreateFolderError? @@ -3064,9 +3064,9 @@ public class DBXFilesCreateFolderRpcRequestV2: NSObject, DBXRequest { callError = error?.objc } - var objc: DBXFilesCreateFolderResult? + var objc: DBXFilesFolderMetadata? if let swift = result { - objc = DBXFilesCreateFolderResult(swift: swift) + objc = DBXFilesFolderMetadata(swift: swift) } completionHandler(objc, routeError, callError) } @@ -3100,16 +3100,16 @@ public class DBXFilesCreateFolderRpcRequestV2: NSObject, DBXRequest { } @objc -public class DBXFilesCreateFolderRpcRequest: NSObject, DBXRequest { - var swift: RpcRequest +public class DBXFilesCreateFolderRpcRequestV2: NSObject, DBXRequest { + var swift: RpcRequest - init(swift: RpcRequest) { + init(swift: RpcRequest) { self.swift = swift } @objc @discardableResult public func response( - completionHandler: @escaping (DBXFilesFolderMetadata?, DBXFilesCreateFolderError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXFilesCreateFolderResult?, DBXFilesCreateFolderError?, DBXCallError?) -> Void ) -> Self { response(queue: nil, completionHandler: completionHandler) } @@ -3117,7 +3117,7 @@ public class DBXFilesCreateFolderRpcRequest: NSObject, DBXRequest { @objc @discardableResult public func response( queue: DispatchQueue?, - completionHandler: @escaping (DBXFilesFolderMetadata?, DBXFilesCreateFolderError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXFilesCreateFolderResult?, DBXFilesCreateFolderError?, DBXCallError?) -> Void ) -> Self { swift.response(queue: queue) { result, error in var routeError: DBXFilesCreateFolderError? @@ -3131,9 +3131,9 @@ public class DBXFilesCreateFolderRpcRequest: NSObject, DBXRequest { callError = error?.objc } - var objc: DBXFilesFolderMetadata? + var objc: DBXFilesCreateFolderResult? if let swift = result { - objc = DBXFilesFolderMetadata(swift: swift) + objc = DBXFilesCreateFolderResult(swift: swift) } completionHandler(objc, routeError, callError) } @@ -3290,16 +3290,16 @@ public class DBXFilesCreateFolderBatchCheckRpcRequest: NSObject, DBXRequest { } @objc -public class DBXFilesDeleteRpcRequestV2: NSObject, DBXRequest { - var swift: RpcRequest +public class DBXFilesDeleteRpcRequest: NSObject, DBXRequest { + var swift: RpcRequest - init(swift: RpcRequest) { + init(swift: RpcRequest) { self.swift = swift } @objc @discardableResult public func response( - completionHandler: @escaping (DBXFilesDeleteResult?, DBXFilesDeleteError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXFilesMetadata?, DBXFilesDeleteError?, DBXCallError?) -> Void ) -> Self { response(queue: nil, completionHandler: completionHandler) } @@ -3307,7 +3307,7 @@ public class DBXFilesDeleteRpcRequestV2: NSObject, DBXRequest { @objc @discardableResult public func response( queue: DispatchQueue?, - completionHandler: @escaping (DBXFilesDeleteResult?, DBXFilesDeleteError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXFilesMetadata?, DBXFilesDeleteError?, DBXCallError?) -> Void ) -> Self { swift.response(queue: queue) { result, error in var routeError: DBXFilesDeleteError? @@ -3321,9 +3321,9 @@ public class DBXFilesDeleteRpcRequestV2: NSObject, DBXRequest { callError = error?.objc } - var objc: DBXFilesDeleteResult? + var objc: DBXFilesMetadata? if let swift = result { - objc = DBXFilesDeleteResult(swift: swift) + objc = DBXFilesMetadata.wrapPreservingSubtypes(swift: swift) } completionHandler(objc, routeError, callError) } @@ -3357,16 +3357,16 @@ public class DBXFilesDeleteRpcRequestV2: NSObject, DBXRequest { } @objc -public class DBXFilesDeleteRpcRequest: NSObject, DBXRequest { - var swift: RpcRequest +public class DBXFilesDeleteRpcRequestV2: NSObject, DBXRequest { + var swift: RpcRequest - init(swift: RpcRequest) { + init(swift: RpcRequest) { self.swift = swift } @objc @discardableResult public func response( - completionHandler: @escaping (DBXFilesMetadata?, DBXFilesDeleteError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXFilesDeleteResult?, DBXFilesDeleteError?, DBXCallError?) -> Void ) -> Self { response(queue: nil, completionHandler: completionHandler) } @@ -3374,7 +3374,7 @@ public class DBXFilesDeleteRpcRequest: NSObject, DBXRequest { @objc @discardableResult public func response( queue: DispatchQueue?, - completionHandler: @escaping (DBXFilesMetadata?, DBXFilesDeleteError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXFilesDeleteResult?, DBXFilesDeleteError?, DBXCallError?) -> Void ) -> Self { swift.response(queue: queue) { result, error in var routeError: DBXFilesDeleteError? @@ -3388,9 +3388,9 @@ public class DBXFilesDeleteRpcRequest: NSObject, DBXRequest { callError = error?.objc } - var objc: DBXFilesMetadata? + var objc: DBXFilesDeleteResult? if let swift = result { - objc = DBXFilesMetadata.wrapPreservingSubtypes(swift: swift) + objc = DBXFilesDeleteResult(swift: swift) } completionHandler(objc, routeError, callError) } @@ -5173,16 +5173,16 @@ public class DBXFilesLockFileBatchRpcRequest: NSObject, DBXRequest { } @objc -public class DBXFilesMoveRpcRequestV2: NSObject, DBXRequest { - var swift: RpcRequest +public class DBXFilesMoveRpcRequest: NSObject, DBXRequest { + var swift: RpcRequest - init(swift: RpcRequest) { + init(swift: RpcRequest) { self.swift = swift } @objc @discardableResult public func response( - completionHandler: @escaping (DBXFilesRelocationResult?, DBXFilesRelocationError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXFilesMetadata?, DBXFilesRelocationError?, DBXCallError?) -> Void ) -> Self { response(queue: nil, completionHandler: completionHandler) } @@ -5190,7 +5190,7 @@ public class DBXFilesMoveRpcRequestV2: NSObject, DBXRequest { @objc @discardableResult public func response( queue: DispatchQueue?, - completionHandler: @escaping (DBXFilesRelocationResult?, DBXFilesRelocationError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXFilesMetadata?, DBXFilesRelocationError?, DBXCallError?) -> Void ) -> Self { swift.response(queue: queue) { result, error in var routeError: DBXFilesRelocationError? @@ -5204,9 +5204,9 @@ public class DBXFilesMoveRpcRequestV2: NSObject, DBXRequest { callError = error?.objc } - var objc: DBXFilesRelocationResult? + var objc: DBXFilesMetadata? if let swift = result { - objc = DBXFilesRelocationResult(swift: swift) + objc = DBXFilesMetadata.wrapPreservingSubtypes(swift: swift) } completionHandler(objc, routeError, callError) } @@ -5240,16 +5240,16 @@ public class DBXFilesMoveRpcRequestV2: NSObject, DBXRequest { } @objc -public class DBXFilesMoveRpcRequest: NSObject, DBXRequest { - var swift: RpcRequest +public class DBXFilesMoveRpcRequestV2: NSObject, DBXRequest { + var swift: RpcRequest - init(swift: RpcRequest) { + init(swift: RpcRequest) { self.swift = swift } @objc @discardableResult public func response( - completionHandler: @escaping (DBXFilesMetadata?, DBXFilesRelocationError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXFilesRelocationResult?, DBXFilesRelocationError?, DBXCallError?) -> Void ) -> Self { response(queue: nil, completionHandler: completionHandler) } @@ -5257,7 +5257,7 @@ public class DBXFilesMoveRpcRequest: NSObject, DBXRequest { @objc @discardableResult public func response( queue: DispatchQueue?, - completionHandler: @escaping (DBXFilesMetadata?, DBXFilesRelocationError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXFilesRelocationResult?, DBXFilesRelocationError?, DBXCallError?) -> Void ) -> Self { swift.response(queue: queue) { result, error in var routeError: DBXFilesRelocationError? @@ -5271,9 +5271,9 @@ public class DBXFilesMoveRpcRequest: NSObject, DBXRequest { callError = error?.objc } - var objc: DBXFilesMetadata? + var objc: DBXFilesRelocationResult? if let swift = result { - objc = DBXFilesMetadata.wrapPreservingSubtypes(swift: swift) + objc = DBXFilesRelocationResult(swift: swift) } completionHandler(objc, routeError, callError) } @@ -5307,16 +5307,16 @@ public class DBXFilesMoveRpcRequest: NSObject, DBXRequest { } @objc -public class DBXFilesMoveBatchRpcRequestV2: NSObject, DBXRequest { - var swift: RpcRequest +public class DBXFilesMoveBatchRpcRequest: NSObject, DBXRequest { + var swift: RpcRequest - init(swift: RpcRequest) { + init(swift: RpcRequest) { self.swift = swift } @objc @discardableResult public func response( - completionHandler: @escaping (DBXFilesRelocationBatchV2Launch?, DBXCallError?) -> Void + completionHandler: @escaping (DBXFilesRelocationBatchLaunch?, DBXCallError?) -> Void ) -> Self { response(queue: nil, completionHandler: completionHandler) } @@ -5324,12 +5324,12 @@ public class DBXFilesMoveBatchRpcRequestV2: NSObject, DBXRequest { @objc @discardableResult public func response( queue: DispatchQueue?, - completionHandler: @escaping (DBXFilesRelocationBatchV2Launch?, DBXCallError?) -> Void + completionHandler: @escaping (DBXFilesRelocationBatchLaunch?, DBXCallError?) -> Void ) -> Self { swift.response(queue: queue) { result, error in - var objc: DBXFilesRelocationBatchV2Launch? + var objc: DBXFilesRelocationBatchLaunch? if let swift = result { - objc = DBXFilesRelocationBatchV2Launch.factory(swift: swift) + objc = DBXFilesRelocationBatchLaunch.factory(swift: swift) } completionHandler(objc, error?.objc) } @@ -5363,16 +5363,16 @@ public class DBXFilesMoveBatchRpcRequestV2: NSObject, DBXRequest { } @objc -public class DBXFilesMoveBatchRpcRequest: NSObject, DBXRequest { - var swift: RpcRequest +public class DBXFilesMoveBatchRpcRequestV2: NSObject, DBXRequest { + var swift: RpcRequest - init(swift: RpcRequest) { + init(swift: RpcRequest) { self.swift = swift } @objc @discardableResult public func response( - completionHandler: @escaping (DBXFilesRelocationBatchLaunch?, DBXCallError?) -> Void + completionHandler: @escaping (DBXFilesRelocationBatchV2Launch?, DBXCallError?) -> Void ) -> Self { response(queue: nil, completionHandler: completionHandler) } @@ -5380,12 +5380,12 @@ public class DBXFilesMoveBatchRpcRequest: NSObject, DBXRequest { @objc @discardableResult public func response( queue: DispatchQueue?, - completionHandler: @escaping (DBXFilesRelocationBatchLaunch?, DBXCallError?) -> Void + completionHandler: @escaping (DBXFilesRelocationBatchV2Launch?, DBXCallError?) -> Void ) -> Self { swift.response(queue: queue) { result, error in - var objc: DBXFilesRelocationBatchLaunch? + var objc: DBXFilesRelocationBatchV2Launch? if let swift = result { - objc = DBXFilesRelocationBatchLaunch.factory(swift: swift) + objc = DBXFilesRelocationBatchV2Launch.factory(swift: swift) } completionHandler(objc, error?.objc) } @@ -5419,16 +5419,16 @@ public class DBXFilesMoveBatchRpcRequest: NSObject, DBXRequest { } @objc -public class DBXFilesMoveBatchCheckRpcRequestV2: NSObject, DBXRequest { - var swift: RpcRequest +public class DBXFilesMoveBatchCheckRpcRequest: NSObject, DBXRequest { + var swift: RpcRequest - init(swift: RpcRequest) { + init(swift: RpcRequest) { self.swift = swift } @objc @discardableResult public func response( - completionHandler: @escaping (DBXFilesRelocationBatchV2JobStatus?, DBXAsyncPollError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXFilesRelocationBatchJobStatus?, DBXAsyncPollError?, DBXCallError?) -> Void ) -> Self { response(queue: nil, completionHandler: completionHandler) } @@ -5436,7 +5436,7 @@ public class DBXFilesMoveBatchCheckRpcRequestV2: NSObject, DBXRequest { @objc @discardableResult public func response( queue: DispatchQueue?, - completionHandler: @escaping (DBXFilesRelocationBatchV2JobStatus?, DBXAsyncPollError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXFilesRelocationBatchJobStatus?, DBXAsyncPollError?, DBXCallError?) -> Void ) -> Self { swift.response(queue: queue) { result, error in var routeError: DBXAsyncPollError? @@ -5450,9 +5450,9 @@ public class DBXFilesMoveBatchCheckRpcRequestV2: NSObject, DBXRequest { callError = error?.objc } - var objc: DBXFilesRelocationBatchV2JobStatus? + var objc: DBXFilesRelocationBatchJobStatus? if let swift = result { - objc = DBXFilesRelocationBatchV2JobStatus.factory(swift: swift) + objc = DBXFilesRelocationBatchJobStatus.factory(swift: swift) } completionHandler(objc, routeError, callError) } @@ -5486,16 +5486,16 @@ public class DBXFilesMoveBatchCheckRpcRequestV2: NSObject, DBXRequest { } @objc -public class DBXFilesMoveBatchCheckRpcRequest: NSObject, DBXRequest { - var swift: RpcRequest +public class DBXFilesMoveBatchCheckRpcRequestV2: NSObject, DBXRequest { + var swift: RpcRequest - init(swift: RpcRequest) { + init(swift: RpcRequest) { self.swift = swift } @objc @discardableResult public func response( - completionHandler: @escaping (DBXFilesRelocationBatchJobStatus?, DBXAsyncPollError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXFilesRelocationBatchV2JobStatus?, DBXAsyncPollError?, DBXCallError?) -> Void ) -> Self { response(queue: nil, completionHandler: completionHandler) } @@ -5503,7 +5503,7 @@ public class DBXFilesMoveBatchCheckRpcRequest: NSObject, DBXRequest { @objc @discardableResult public func response( queue: DispatchQueue?, - completionHandler: @escaping (DBXFilesRelocationBatchJobStatus?, DBXAsyncPollError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXFilesRelocationBatchV2JobStatus?, DBXAsyncPollError?, DBXCallError?) -> Void ) -> Self { swift.response(queue: queue) { result, error in var routeError: DBXAsyncPollError? @@ -5517,9 +5517,9 @@ public class DBXFilesMoveBatchCheckRpcRequest: NSObject, DBXRequest { callError = error?.objc } - var objc: DBXFilesRelocationBatchJobStatus? + var objc: DBXFilesRelocationBatchV2JobStatus? if let swift = result { - objc = DBXFilesRelocationBatchJobStatus.factory(swift: swift) + objc = DBXFilesRelocationBatchV2JobStatus.factory(swift: swift) } completionHandler(objc, routeError, callError) } @@ -6883,7 +6883,7 @@ public class DBXFilesUploadUploadRequest: NSObject, DBXRequest { } @objc -public class DBXFilesUploadSessionAppendUploadRequestV2: NSObject, DBXRequest { +public class DBXFilesUploadSessionAppendUploadRequest: NSObject, DBXRequest { var swift: UploadRequest init(swift: UploadRequest) { @@ -6952,7 +6952,7 @@ public class DBXFilesUploadSessionAppendUploadRequestV2: NSObject, DBXRequest { } @objc -public class DBXFilesUploadSessionAppendUploadRequest: NSObject, DBXRequest { +public class DBXFilesUploadSessionAppendUploadRequestV2: NSObject, DBXRequest { var swift: UploadRequest init(swift: UploadRequest) { diff --git a/Source/SwiftyDropboxObjC/Shared/Generated/DBXTeamRoutes.swift b/Source/SwiftyDropboxObjC/Shared/Generated/DBXTeamRoutes.swift index 66c766f4..5d380c50 100644 --- a/Source/SwiftyDropboxObjC/Shared/Generated/DBXTeamRoutes.swift +++ b/Source/SwiftyDropboxObjC/Shared/Generated/DBXTeamRoutes.swift @@ -900,12 +900,12 @@ public class DBXTeamRoutes: NSObject { /// /// - parameter newMembers: Details of new members to be added to the team. /// - /// - returns: Through the response callback, the caller will receive a `Team.MembersAddLaunchV2Result` object on - /// success or a `Void` object on failure. + /// - returns: Through the response callback, the caller will receive a `Team.MembersAddLaunch` object on success or + /// a `Void` object on failure. @objc - @discardableResult public func membersAddV2(newMembers: [DBXTeamMemberAddV2Arg], forceAsync: NSNumber) -> DBXTeamMembersAddRpcRequestV2 { - let swift = swift.membersAddV2(newMembers: newMembers.map(\.subSwift), forceAsync: forceAsync.boolValue) - return DBXTeamMembersAddRpcRequestV2(swift: swift) + @discardableResult public func membersAdd(newMembers: [DBXTeamMemberAddArg], forceAsync: NSNumber) -> DBXTeamMembersAddRpcRequest { + let swift = swift.membersAdd(newMembers: newMembers.map(\.subSwift), forceAsync: forceAsync.boolValue) + return DBXTeamMembersAddRpcRequest(swift: swift) } /// Adds members to a team. Permission : Team member management A maximum of 20 members can be specified in a single @@ -918,12 +918,12 @@ public class DBXTeamRoutes: NSObject { /// /// - scope: members.write /// - /// - returns: Through the response callback, the caller will receive a `Team.MembersAddLaunchV2Result` object on - /// success or a `Void` object on failure. + /// - returns: Through the response callback, the caller will receive a `Team.MembersAddLaunch` object on success or + /// a `Void` object on failure. @objc - @discardableResult public func membersAddV2(newMembers: [DBXTeamMemberAddV2Arg]) -> DBXTeamMembersAddRpcRequestV2 { - let swift = swift.membersAddV2(newMembers: newMembers.map(\.subSwift)) - return DBXTeamMembersAddRpcRequestV2(swift: swift) + @discardableResult public func membersAdd(newMembers: [DBXTeamMemberAddArg]) -> DBXTeamMembersAddRpcRequest { + let swift = swift.membersAdd(newMembers: newMembers.map(\.subSwift)) + return DBXTeamMembersAddRpcRequest(swift: swift) } /// Adds members to a team. Permission : Team member management A maximum of 20 members can be specified in a single @@ -938,12 +938,12 @@ public class DBXTeamRoutes: NSObject { /// /// - parameter newMembers: Details of new members to be added to the team. /// - /// - returns: Through the response callback, the caller will receive a `Team.MembersAddLaunch` object on success or - /// a `Void` object on failure. + /// - returns: Through the response callback, the caller will receive a `Team.MembersAddLaunchV2Result` object on + /// success or a `Void` object on failure. @objc - @discardableResult public func membersAdd(newMembers: [DBXTeamMemberAddArg], forceAsync: NSNumber) -> DBXTeamMembersAddRpcRequest { - let swift = swift.membersAdd(newMembers: newMembers.map(\.subSwift), forceAsync: forceAsync.boolValue) - return DBXTeamMembersAddRpcRequest(swift: swift) + @discardableResult public func membersAddV2(newMembers: [DBXTeamMemberAddV2Arg], forceAsync: NSNumber) -> DBXTeamMembersAddRpcRequestV2 { + let swift = swift.membersAddV2(newMembers: newMembers.map(\.subSwift), forceAsync: forceAsync.boolValue) + return DBXTeamMembersAddRpcRequestV2(swift: swift) } /// Adds members to a team. Permission : Team member management A maximum of 20 members can be specified in a single @@ -956,15 +956,15 @@ public class DBXTeamRoutes: NSObject { /// /// - scope: members.write /// - /// - returns: Through the response callback, the caller will receive a `Team.MembersAddLaunch` object on success or - /// a `Void` object on failure. + /// - returns: Through the response callback, the caller will receive a `Team.MembersAddLaunchV2Result` object on + /// success or a `Void` object on failure. @objc - @discardableResult public func membersAdd(newMembers: [DBXTeamMemberAddArg]) -> DBXTeamMembersAddRpcRequest { - let swift = swift.membersAdd(newMembers: newMembers.map(\.subSwift)) - return DBXTeamMembersAddRpcRequest(swift: swift) + @discardableResult public func membersAddV2(newMembers: [DBXTeamMemberAddV2Arg]) -> DBXTeamMembersAddRpcRequestV2 { + let swift = swift.membersAddV2(newMembers: newMembers.map(\.subSwift)) + return DBXTeamMembersAddRpcRequestV2(swift: swift) } - /// Once an async_job_id is returned from membersAddV2 , use this to poll the status of the asynchronous request. + /// Once an async_job_id is returned from membersAdd , use this to poll the status of the asynchronous request. /// Permission : Team member management. /// /// - scope: members.write @@ -972,15 +972,15 @@ public class DBXTeamRoutes: NSObject { /// - parameter asyncJobId: Id of the asynchronous job. This is the value of a response returned from the method /// that launched the job. /// - /// - returns: Through the response callback, the caller will receive a `Team.MembersAddJobStatusV2Result` object on - /// success or a `Async.PollError` object on failure. + /// - returns: Through the response callback, the caller will receive a `Team.MembersAddJobStatus` object on success + /// or a `Async.PollError` object on failure. @objc - @discardableResult public func membersAddJobStatusGetV2(asyncJobId: String) -> DBXTeamMembersAddJobStatusGetRpcRequestV2 { - let swift = swift.membersAddJobStatusGetV2(asyncJobId: asyncJobId) - return DBXTeamMembersAddJobStatusGetRpcRequestV2(swift: swift) + @discardableResult public func membersAddJobStatusGet(asyncJobId: String) -> DBXTeamMembersAddJobStatusGetRpcRequest { + let swift = swift.membersAddJobStatusGet(asyncJobId: asyncJobId) + return DBXTeamMembersAddJobStatusGetRpcRequest(swift: swift) } - /// Once an async_job_id is returned from membersAdd , use this to poll the status of the asynchronous request. + /// Once an async_job_id is returned from membersAddV2 , use this to poll the status of the asynchronous request. /// Permission : Team member management. /// /// - scope: members.write @@ -988,12 +988,12 @@ public class DBXTeamRoutes: NSObject { /// - parameter asyncJobId: Id of the asynchronous job. This is the value of a response returned from the method /// that launched the job. /// - /// - returns: Through the response callback, the caller will receive a `Team.MembersAddJobStatus` object on success - /// or a `Async.PollError` object on failure. + /// - returns: Through the response callback, the caller will receive a `Team.MembersAddJobStatusV2Result` object on + /// success or a `Async.PollError` object on failure. @objc - @discardableResult public func membersAddJobStatusGet(asyncJobId: String) -> DBXTeamMembersAddJobStatusGetRpcRequest { - let swift = swift.membersAddJobStatusGet(asyncJobId: asyncJobId) - return DBXTeamMembersAddJobStatusGetRpcRequest(swift: swift) + @discardableResult public func membersAddJobStatusGetV2(asyncJobId: String) -> DBXTeamMembersAddJobStatusGetRpcRequestV2 { + let swift = swift.membersAddJobStatusGetV2(asyncJobId: asyncJobId) + return DBXTeamMembersAddJobStatusGetRpcRequestV2(swift: swift) } /// Deletes a team member's profile photo. Permission : Team member management. @@ -1002,12 +1002,12 @@ public class DBXTeamRoutes: NSObject { /// /// - parameter user: Identity of the user whose profile photo will be deleted. /// - /// - returns: Through the response callback, the caller will receive a `Team.TeamMemberInfoV2Result` object on - /// success or a `Team.MembersDeleteProfilePhotoError` object on failure. + /// - returns: Through the response callback, the caller will receive a `Team.TeamMemberInfo` object on success or a + /// `Team.MembersDeleteProfilePhotoError` object on failure. @objc - @discardableResult public func membersDeleteProfilePhotoV2(user: DBXTeamUserSelectorArg) -> DBXTeamMembersDeleteProfilePhotoRpcRequestV2 { - let swift = swift.membersDeleteProfilePhotoV2(user: user.swift) - return DBXTeamMembersDeleteProfilePhotoRpcRequestV2(swift: swift) + @discardableResult public func membersDeleteProfilePhoto(user: DBXTeamUserSelectorArg) -> DBXTeamMembersDeleteProfilePhotoRpcRequest { + let swift = swift.membersDeleteProfilePhoto(user: user.swift) + return DBXTeamMembersDeleteProfilePhotoRpcRequest(swift: swift) } /// Deletes a team member's profile photo. Permission : Team member management. @@ -1016,12 +1016,12 @@ public class DBXTeamRoutes: NSObject { /// /// - parameter user: Identity of the user whose profile photo will be deleted. /// - /// - returns: Through the response callback, the caller will receive a `Team.TeamMemberInfo` object on success or a - /// `Team.MembersDeleteProfilePhotoError` object on failure. + /// - returns: Through the response callback, the caller will receive a `Team.TeamMemberInfoV2Result` object on + /// success or a `Team.MembersDeleteProfilePhotoError` object on failure. @objc - @discardableResult public func membersDeleteProfilePhoto(user: DBXTeamUserSelectorArg) -> DBXTeamMembersDeleteProfilePhotoRpcRequest { - let swift = swift.membersDeleteProfilePhoto(user: user.swift) - return DBXTeamMembersDeleteProfilePhotoRpcRequest(swift: swift) + @discardableResult public func membersDeleteProfilePhotoV2(user: DBXTeamUserSelectorArg) -> DBXTeamMembersDeleteProfilePhotoRpcRequestV2 { + let swift = swift.membersDeleteProfilePhotoV2(user: user.swift) + return DBXTeamMembersDeleteProfilePhotoRpcRequestV2(swift: swift) } /// Get available TeamMemberRoles for the connected team. To be used with membersSetAdminPermissionsV2. Permission : @@ -1045,12 +1045,12 @@ public class DBXTeamRoutes: NSObject { /// /// - parameter members: List of team members. /// - /// - returns: Through the response callback, the caller will receive a `Team.MembersGetInfoV2Result` object on + /// - returns: Through the response callback, the caller will receive a `Array` object on /// success or a `Team.MembersGetInfoError` object on failure. @objc - @discardableResult public func membersGetInfoV2(members: [DBXTeamUserSelectorArg]) -> DBXTeamMembersGetInfoRpcRequestV2 { - let swift = swift.membersGetInfoV2(members: members.map(\.swift)) - return DBXTeamMembersGetInfoRpcRequestV2(swift: swift) + @discardableResult public func membersGetInfo(members: [DBXTeamUserSelectorArg]) -> DBXTeamMembersGetInfoRpcRequest { + let swift = swift.membersGetInfo(members: members.map(\.swift)) + return DBXTeamMembersGetInfoRpcRequest(swift: swift) } /// Returns information about multiple team members. Permission : Team information This endpoint will return @@ -1060,12 +1060,12 @@ public class DBXTeamRoutes: NSObject { /// /// - parameter members: List of team members. /// - /// - returns: Through the response callback, the caller will receive a `Array` object on + /// - returns: Through the response callback, the caller will receive a `Team.MembersGetInfoV2Result` object on /// success or a `Team.MembersGetInfoError` object on failure. @objc - @discardableResult public func membersGetInfo(members: [DBXTeamUserSelectorArg]) -> DBXTeamMembersGetInfoRpcRequest { - let swift = swift.membersGetInfo(members: members.map(\.swift)) - return DBXTeamMembersGetInfoRpcRequest(swift: swift) + @discardableResult public func membersGetInfoV2(members: [DBXTeamUserSelectorArg]) -> DBXTeamMembersGetInfoRpcRequestV2 { + let swift = swift.membersGetInfoV2(members: members.map(\.swift)) + return DBXTeamMembersGetInfoRpcRequestV2(swift: swift) } /// Lists members of a team. Permission : Team information. @@ -1075,24 +1075,24 @@ public class DBXTeamRoutes: NSObject { /// - parameter limit: Number of results to return per call. /// - parameter includeRemoved: Whether to return removed members. /// - /// - returns: Through the response callback, the caller will receive a `Team.MembersListV2Result` object on success + /// - returns: Through the response callback, the caller will receive a `Team.MembersListResult` object on success /// or a `Team.MembersListError` object on failure. @objc - @discardableResult public func membersListV2(limit: NSNumber, includeRemoved: NSNumber) -> DBXTeamMembersListRpcRequestV2 { - let swift = swift.membersListV2(limit: limit.uint32Value, includeRemoved: includeRemoved.boolValue) - return DBXTeamMembersListRpcRequestV2(swift: swift) + @discardableResult public func membersList(limit: NSNumber, includeRemoved: NSNumber) -> DBXTeamMembersListRpcRequest { + let swift = swift.membersList(limit: limit.uint32Value, includeRemoved: includeRemoved.boolValue) + return DBXTeamMembersListRpcRequest(swift: swift) } /// Lists members of a team. Permission : Team information. /// /// - scope: members.read /// - /// - returns: Through the response callback, the caller will receive a `Team.MembersListV2Result` object on success + /// - returns: Through the response callback, the caller will receive a `Team.MembersListResult` object on success /// or a `Team.MembersListError` object on failure. @objc - @discardableResult public func membersListV2() -> DBXTeamMembersListRpcRequestV2 { - let swift = swift.membersListV2() - return DBXTeamMembersListRpcRequestV2(swift: swift) + @discardableResult public func membersList() -> DBXTeamMembersListRpcRequest { + let swift = swift.membersList() + return DBXTeamMembersListRpcRequest(swift: swift) } /// Lists members of a team. Permission : Team information. @@ -1102,54 +1102,54 @@ public class DBXTeamRoutes: NSObject { /// - parameter limit: Number of results to return per call. /// - parameter includeRemoved: Whether to return removed members. /// - /// - returns: Through the response callback, the caller will receive a `Team.MembersListResult` object on success + /// - returns: Through the response callback, the caller will receive a `Team.MembersListV2Result` object on success /// or a `Team.MembersListError` object on failure. @objc - @discardableResult public func membersList(limit: NSNumber, includeRemoved: NSNumber) -> DBXTeamMembersListRpcRequest { - let swift = swift.membersList(limit: limit.uint32Value, includeRemoved: includeRemoved.boolValue) - return DBXTeamMembersListRpcRequest(swift: swift) + @discardableResult public func membersListV2(limit: NSNumber, includeRemoved: NSNumber) -> DBXTeamMembersListRpcRequestV2 { + let swift = swift.membersListV2(limit: limit.uint32Value, includeRemoved: includeRemoved.boolValue) + return DBXTeamMembersListRpcRequestV2(swift: swift) } /// Lists members of a team. Permission : Team information. /// /// - scope: members.read /// - /// - returns: Through the response callback, the caller will receive a `Team.MembersListResult` object on success + /// - returns: Through the response callback, the caller will receive a `Team.MembersListV2Result` object on success /// or a `Team.MembersListError` object on failure. @objc - @discardableResult public func membersList() -> DBXTeamMembersListRpcRequest { - let swift = swift.membersList() - return DBXTeamMembersListRpcRequest(swift: swift) + @discardableResult public func membersListV2() -> DBXTeamMembersListRpcRequestV2 { + let swift = swift.membersListV2() + return DBXTeamMembersListRpcRequestV2(swift: swift) } - /// Once a cursor has been retrieved from membersListV2, use this to paginate through all team members. Permission : + /// Once a cursor has been retrieved from membersList, use this to paginate through all team members. Permission : /// Team information. /// /// - scope: members.read /// /// - parameter cursor: Indicates from what point to get the next set of members. /// - /// - returns: Through the response callback, the caller will receive a `Team.MembersListV2Result` object on success + /// - returns: Through the response callback, the caller will receive a `Team.MembersListResult` object on success /// or a `Team.MembersListContinueError` object on failure. @objc - @discardableResult public func membersListContinueV2(cursor: String) -> DBXTeamMembersListContinueRpcRequestV2 { - let swift = swift.membersListContinueV2(cursor: cursor) - return DBXTeamMembersListContinueRpcRequestV2(swift: swift) + @discardableResult public func membersListContinue(cursor: String) -> DBXTeamMembersListContinueRpcRequest { + let swift = swift.membersListContinue(cursor: cursor) + return DBXTeamMembersListContinueRpcRequest(swift: swift) } - /// Once a cursor has been retrieved from membersList, use this to paginate through all team members. Permission : + /// Once a cursor has been retrieved from membersListV2, use this to paginate through all team members. Permission : /// Team information. /// /// - scope: members.read /// /// - parameter cursor: Indicates from what point to get the next set of members. /// - /// - returns: Through the response callback, the caller will receive a `Team.MembersListResult` object on success + /// - returns: Through the response callback, the caller will receive a `Team.MembersListV2Result` object on success /// or a `Team.MembersListContinueError` object on failure. @objc - @discardableResult public func membersListContinue(cursor: String) -> DBXTeamMembersListContinueRpcRequest { - let swift = swift.membersListContinue(cursor: cursor) - return DBXTeamMembersListContinueRpcRequest(swift: swift) + @discardableResult public func membersListContinueV2(cursor: String) -> DBXTeamMembersListContinueRpcRequestV2 { + let swift = swift.membersListContinueV2(cursor: cursor) + return DBXTeamMembersListContinueRpcRequestV2(swift: swift) } /// Moves removed member's files to a different member. This endpoint initiates an asynchronous job. To obtain the @@ -1347,6 +1347,24 @@ public class DBXTeamRoutes: NSObject { return DBXTeamMembersSendWelcomeEmailRpcRequest(swift: swift) } + /// Updates a team member's permissions. Permission : Team member management. + /// + /// - scope: members.write + /// + /// - parameter user: Identity of user whose role will be set. + /// - parameter newRole: The new role of the member. + /// + /// - returns: Through the response callback, the caller will receive a `Team.MembersSetPermissionsResult` object on + /// success or a `Team.MembersSetPermissionsError` object on failure. + @objc + @discardableResult public func membersSetAdminPermissions( + user: DBXTeamUserSelectorArg, + newRole: DBXTeamAdminTier + ) -> DBXTeamMembersSetAdminPermissionsRpcRequest { + let swift = swift.membersSetAdminPermissions(user: user.swift, newRole: newRole.swift) + return DBXTeamMembersSetAdminPermissionsRpcRequest(swift: swift) + } + /// Updates a team member's permissions. Permission : Team member management. /// /// - scope: members.write @@ -1378,24 +1396,6 @@ public class DBXTeamRoutes: NSObject { return DBXTeamMembersSetAdminPermissionsRpcRequestV2(swift: swift) } - /// Updates a team member's permissions. Permission : Team member management. - /// - /// - scope: members.write - /// - /// - parameter user: Identity of user whose role will be set. - /// - parameter newRole: The new role of the member. - /// - /// - returns: Through the response callback, the caller will receive a `Team.MembersSetPermissionsResult` object on - /// success or a `Team.MembersSetPermissionsError` object on failure. - @objc - @discardableResult public func membersSetAdminPermissions( - user: DBXTeamUserSelectorArg, - newRole: DBXTeamAdminTier - ) -> DBXTeamMembersSetAdminPermissionsRpcRequest { - let swift = swift.membersSetAdminPermissions(user: user.swift, newRole: newRole.swift) - return DBXTeamMembersSetAdminPermissionsRpcRequest(swift: swift) - } - /// Updates a team member's profile. Permission : Team member management. /// /// - scope: members.write @@ -1409,10 +1409,10 @@ public class DBXTeamRoutes: NSObject { /// configuration. /// - parameter newIsDirectoryRestricted: New value for whether the user is a directory restricted user. /// - /// - returns: Through the response callback, the caller will receive a `Team.TeamMemberInfoV2Result` object on - /// success or a `Team.MembersSetProfileError` object on failure. + /// - returns: Through the response callback, the caller will receive a `Team.TeamMemberInfo` object on success or a + /// `Team.MembersSetProfileError` object on failure. @objc - @discardableResult public func membersSetProfileV2( + @discardableResult public func membersSetProfile( user: DBXTeamUserSelectorArg, newEmail: String?, newExternalId: String?, @@ -1420,8 +1420,8 @@ public class DBXTeamRoutes: NSObject { newSurname: String?, newPersistentId: String?, newIsDirectoryRestricted: NSNumber? - ) -> DBXTeamMembersSetProfileRpcRequestV2 { - let swift = swift.membersSetProfileV2( + ) -> DBXTeamMembersSetProfileRpcRequest { + let swift = swift.membersSetProfile( user: user.swift, newEmail: newEmail, newExternalId: newExternalId, @@ -1430,19 +1430,19 @@ public class DBXTeamRoutes: NSObject { newPersistentId: newPersistentId, newIsDirectoryRestricted: newIsDirectoryRestricted?.boolValue ) - return DBXTeamMembersSetProfileRpcRequestV2(swift: swift) + return DBXTeamMembersSetProfileRpcRequest(swift: swift) } /// Updates a team member's profile. Permission : Team member management. /// /// - scope: members.write /// - /// - returns: Through the response callback, the caller will receive a `Team.TeamMemberInfoV2Result` object on - /// success or a `Team.MembersSetProfileError` object on failure. + /// - returns: Through the response callback, the caller will receive a `Team.TeamMemberInfo` object on success or a + /// `Team.MembersSetProfileError` object on failure. @objc - @discardableResult public func membersSetProfileV2(user: DBXTeamUserSelectorArg) -> DBXTeamMembersSetProfileRpcRequestV2 { - let swift = swift.membersSetProfileV2(user: user.swift) - return DBXTeamMembersSetProfileRpcRequestV2(swift: swift) + @discardableResult public func membersSetProfile(user: DBXTeamUserSelectorArg) -> DBXTeamMembersSetProfileRpcRequest { + let swift = swift.membersSetProfile(user: user.swift) + return DBXTeamMembersSetProfileRpcRequest(swift: swift) } /// Updates a team member's profile. Permission : Team member management. @@ -1458,10 +1458,10 @@ public class DBXTeamRoutes: NSObject { /// configuration. /// - parameter newIsDirectoryRestricted: New value for whether the user is a directory restricted user. /// - /// - returns: Through the response callback, the caller will receive a `Team.TeamMemberInfo` object on success or a - /// `Team.MembersSetProfileError` object on failure. + /// - returns: Through the response callback, the caller will receive a `Team.TeamMemberInfoV2Result` object on + /// success or a `Team.MembersSetProfileError` object on failure. @objc - @discardableResult public func membersSetProfile( + @discardableResult public func membersSetProfileV2( user: DBXTeamUserSelectorArg, newEmail: String?, newExternalId: String?, @@ -1469,8 +1469,8 @@ public class DBXTeamRoutes: NSObject { newSurname: String?, newPersistentId: String?, newIsDirectoryRestricted: NSNumber? - ) -> DBXTeamMembersSetProfileRpcRequest { - let swift = swift.membersSetProfile( + ) -> DBXTeamMembersSetProfileRpcRequestV2 { + let swift = swift.membersSetProfileV2( user: user.swift, newEmail: newEmail, newExternalId: newExternalId, @@ -1479,19 +1479,19 @@ public class DBXTeamRoutes: NSObject { newPersistentId: newPersistentId, newIsDirectoryRestricted: newIsDirectoryRestricted?.boolValue ) - return DBXTeamMembersSetProfileRpcRequest(swift: swift) + return DBXTeamMembersSetProfileRpcRequestV2(swift: swift) } /// Updates a team member's profile. Permission : Team member management. /// /// - scope: members.write /// - /// - returns: Through the response callback, the caller will receive a `Team.TeamMemberInfo` object on success or a - /// `Team.MembersSetProfileError` object on failure. + /// - returns: Through the response callback, the caller will receive a `Team.TeamMemberInfoV2Result` object on + /// success or a `Team.MembersSetProfileError` object on failure. @objc - @discardableResult public func membersSetProfile(user: DBXTeamUserSelectorArg) -> DBXTeamMembersSetProfileRpcRequest { - let swift = swift.membersSetProfile(user: user.swift) - return DBXTeamMembersSetProfileRpcRequest(swift: swift) + @discardableResult public func membersSetProfileV2(user: DBXTeamUserSelectorArg) -> DBXTeamMembersSetProfileRpcRequestV2 { + let swift = swift.membersSetProfileV2(user: user.swift) + return DBXTeamMembersSetProfileRpcRequestV2(swift: swift) } /// Updates a team member's profile photo. Permission : Team member management. @@ -1501,15 +1501,15 @@ public class DBXTeamRoutes: NSObject { /// - parameter user: Identity of the user whose profile photo will be set. /// - parameter photo: Image to set as the member's new profile photo. /// - /// - returns: Through the response callback, the caller will receive a `Team.TeamMemberInfoV2Result` object on - /// success or a `Team.MembersSetProfilePhotoError` object on failure. + /// - returns: Through the response callback, the caller will receive a `Team.TeamMemberInfo` object on success or a + /// `Team.MembersSetProfilePhotoError` object on failure. @objc - @discardableResult public func membersSetProfilePhotoV2( + @discardableResult public func membersSetProfilePhoto( user: DBXTeamUserSelectorArg, photo: DBXAccountPhotoSourceArg - ) -> DBXTeamMembersSetProfilePhotoRpcRequestV2 { - let swift = swift.membersSetProfilePhotoV2(user: user.swift, photo: photo.swift) - return DBXTeamMembersSetProfilePhotoRpcRequestV2(swift: swift) + ) -> DBXTeamMembersSetProfilePhotoRpcRequest { + let swift = swift.membersSetProfilePhoto(user: user.swift, photo: photo.swift) + return DBXTeamMembersSetProfilePhotoRpcRequest(swift: swift) } /// Updates a team member's profile photo. Permission : Team member management. @@ -1519,15 +1519,15 @@ public class DBXTeamRoutes: NSObject { /// - parameter user: Identity of the user whose profile photo will be set. /// - parameter photo: Image to set as the member's new profile photo. /// - /// - returns: Through the response callback, the caller will receive a `Team.TeamMemberInfo` object on success or a - /// `Team.MembersSetProfilePhotoError` object on failure. + /// - returns: Through the response callback, the caller will receive a `Team.TeamMemberInfoV2Result` object on + /// success or a `Team.MembersSetProfilePhotoError` object on failure. @objc - @discardableResult public func membersSetProfilePhoto( + @discardableResult public func membersSetProfilePhotoV2( user: DBXTeamUserSelectorArg, photo: DBXAccountPhotoSourceArg - ) -> DBXTeamMembersSetProfilePhotoRpcRequest { - let swift = swift.membersSetProfilePhoto(user: user.swift, photo: photo.swift) - return DBXTeamMembersSetProfilePhotoRpcRequest(swift: swift) + ) -> DBXTeamMembersSetProfilePhotoRpcRequestV2 { + let swift = swift.membersSetProfilePhotoV2(user: user.swift, photo: photo.swift) + return DBXTeamMembersSetProfilePhotoRpcRequestV2(swift: swift) } /// Suspend a member from a team. Permission : Team member management Exactly one of team_member_id, email, or @@ -4467,16 +4467,16 @@ public class DBXTeamMemberSpaceLimitsSetCustomQuotaRpcRequest: NSObject, DBXRequ } @objc -public class DBXTeamMembersAddRpcRequestV2: NSObject, DBXRequest { - var swift: RpcRequest +public class DBXTeamMembersAddRpcRequest: NSObject, DBXRequest { + var swift: RpcRequest - init(swift: RpcRequest) { + init(swift: RpcRequest) { self.swift = swift } @objc @discardableResult public func response( - completionHandler: @escaping (DBXTeamMembersAddLaunchV2Result?, DBXCallError?) -> Void + completionHandler: @escaping (DBXTeamMembersAddLaunch?, DBXCallError?) -> Void ) -> Self { response(queue: nil, completionHandler: completionHandler) } @@ -4484,12 +4484,12 @@ public class DBXTeamMembersAddRpcRequestV2: NSObject, DBXRequest { @objc @discardableResult public func response( queue: DispatchQueue?, - completionHandler: @escaping (DBXTeamMembersAddLaunchV2Result?, DBXCallError?) -> Void + completionHandler: @escaping (DBXTeamMembersAddLaunch?, DBXCallError?) -> Void ) -> Self { swift.response(queue: queue) { result, error in - var objc: DBXTeamMembersAddLaunchV2Result? + var objc: DBXTeamMembersAddLaunch? if let swift = result { - objc = DBXTeamMembersAddLaunchV2Result.factory(swift: swift) + objc = DBXTeamMembersAddLaunch.factory(swift: swift) } completionHandler(objc, error?.objc) } @@ -4523,16 +4523,16 @@ public class DBXTeamMembersAddRpcRequestV2: NSObject, DBXRequest { } @objc -public class DBXTeamMembersAddRpcRequest: NSObject, DBXRequest { - var swift: RpcRequest +public class DBXTeamMembersAddRpcRequestV2: NSObject, DBXRequest { + var swift: RpcRequest - init(swift: RpcRequest) { + init(swift: RpcRequest) { self.swift = swift } @objc @discardableResult public func response( - completionHandler: @escaping (DBXTeamMembersAddLaunch?, DBXCallError?) -> Void + completionHandler: @escaping (DBXTeamMembersAddLaunchV2Result?, DBXCallError?) -> Void ) -> Self { response(queue: nil, completionHandler: completionHandler) } @@ -4540,12 +4540,12 @@ public class DBXTeamMembersAddRpcRequest: NSObject, DBXRequest { @objc @discardableResult public func response( queue: DispatchQueue?, - completionHandler: @escaping (DBXTeamMembersAddLaunch?, DBXCallError?) -> Void + completionHandler: @escaping (DBXTeamMembersAddLaunchV2Result?, DBXCallError?) -> Void ) -> Self { swift.response(queue: queue) { result, error in - var objc: DBXTeamMembersAddLaunch? + var objc: DBXTeamMembersAddLaunchV2Result? if let swift = result { - objc = DBXTeamMembersAddLaunch.factory(swift: swift) + objc = DBXTeamMembersAddLaunchV2Result.factory(swift: swift) } completionHandler(objc, error?.objc) } @@ -4579,16 +4579,16 @@ public class DBXTeamMembersAddRpcRequest: NSObject, DBXRequest { } @objc -public class DBXTeamMembersAddJobStatusGetRpcRequestV2: NSObject, DBXRequest { - var swift: RpcRequest +public class DBXTeamMembersAddJobStatusGetRpcRequest: NSObject, DBXRequest { + var swift: RpcRequest - init(swift: RpcRequest) { + init(swift: RpcRequest) { self.swift = swift } @objc @discardableResult public func response( - completionHandler: @escaping (DBXTeamMembersAddJobStatusV2Result?, DBXAsyncPollError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXTeamMembersAddJobStatus?, DBXAsyncPollError?, DBXCallError?) -> Void ) -> Self { response(queue: nil, completionHandler: completionHandler) } @@ -4596,7 +4596,7 @@ public class DBXTeamMembersAddJobStatusGetRpcRequestV2: NSObject, DBXRequest { @objc @discardableResult public func response( queue: DispatchQueue?, - completionHandler: @escaping (DBXTeamMembersAddJobStatusV2Result?, DBXAsyncPollError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXTeamMembersAddJobStatus?, DBXAsyncPollError?, DBXCallError?) -> Void ) -> Self { swift.response(queue: queue) { result, error in var routeError: DBXAsyncPollError? @@ -4610,9 +4610,9 @@ public class DBXTeamMembersAddJobStatusGetRpcRequestV2: NSObject, DBXRequest { callError = error?.objc } - var objc: DBXTeamMembersAddJobStatusV2Result? + var objc: DBXTeamMembersAddJobStatus? if let swift = result { - objc = DBXTeamMembersAddJobStatusV2Result.factory(swift: swift) + objc = DBXTeamMembersAddJobStatus.factory(swift: swift) } completionHandler(objc, routeError, callError) } @@ -4646,16 +4646,16 @@ public class DBXTeamMembersAddJobStatusGetRpcRequestV2: NSObject, DBXRequest { } @objc -public class DBXTeamMembersAddJobStatusGetRpcRequest: NSObject, DBXRequest { - var swift: RpcRequest +public class DBXTeamMembersAddJobStatusGetRpcRequestV2: NSObject, DBXRequest { + var swift: RpcRequest - init(swift: RpcRequest) { + init(swift: RpcRequest) { self.swift = swift } @objc @discardableResult public func response( - completionHandler: @escaping (DBXTeamMembersAddJobStatus?, DBXAsyncPollError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXTeamMembersAddJobStatusV2Result?, DBXAsyncPollError?, DBXCallError?) -> Void ) -> Self { response(queue: nil, completionHandler: completionHandler) } @@ -4663,7 +4663,7 @@ public class DBXTeamMembersAddJobStatusGetRpcRequest: NSObject, DBXRequest { @objc @discardableResult public func response( queue: DispatchQueue?, - completionHandler: @escaping (DBXTeamMembersAddJobStatus?, DBXAsyncPollError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXTeamMembersAddJobStatusV2Result?, DBXAsyncPollError?, DBXCallError?) -> Void ) -> Self { swift.response(queue: queue) { result, error in var routeError: DBXAsyncPollError? @@ -4677,9 +4677,9 @@ public class DBXTeamMembersAddJobStatusGetRpcRequest: NSObject, DBXRequest { callError = error?.objc } - var objc: DBXTeamMembersAddJobStatus? + var objc: DBXTeamMembersAddJobStatusV2Result? if let swift = result { - objc = DBXTeamMembersAddJobStatus.factory(swift: swift) + objc = DBXTeamMembersAddJobStatusV2Result.factory(swift: swift) } completionHandler(objc, routeError, callError) } @@ -4713,16 +4713,16 @@ public class DBXTeamMembersAddJobStatusGetRpcRequest: NSObject, DBXRequest { } @objc -public class DBXTeamMembersDeleteProfilePhotoRpcRequestV2: NSObject, DBXRequest { - var swift: RpcRequest +public class DBXTeamMembersDeleteProfilePhotoRpcRequest: NSObject, DBXRequest { + var swift: RpcRequest - init(swift: RpcRequest) { + init(swift: RpcRequest) { self.swift = swift } @objc @discardableResult public func response( - completionHandler: @escaping (DBXTeamTeamMemberInfoV2Result?, DBXTeamMembersDeleteProfilePhotoError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXTeamTeamMemberInfo?, DBXTeamMembersDeleteProfilePhotoError?, DBXCallError?) -> Void ) -> Self { response(queue: nil, completionHandler: completionHandler) } @@ -4730,7 +4730,7 @@ public class DBXTeamMembersDeleteProfilePhotoRpcRequestV2: NSObject, DBXRequest @objc @discardableResult public func response( queue: DispatchQueue?, - completionHandler: @escaping (DBXTeamTeamMemberInfoV2Result?, DBXTeamMembersDeleteProfilePhotoError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXTeamTeamMemberInfo?, DBXTeamMembersDeleteProfilePhotoError?, DBXCallError?) -> Void ) -> Self { swift.response(queue: queue) { result, error in var routeError: DBXTeamMembersDeleteProfilePhotoError? @@ -4744,9 +4744,9 @@ public class DBXTeamMembersDeleteProfilePhotoRpcRequestV2: NSObject, DBXRequest callError = error?.objc } - var objc: DBXTeamTeamMemberInfoV2Result? + var objc: DBXTeamTeamMemberInfo? if let swift = result { - objc = DBXTeamTeamMemberInfoV2Result(swift: swift) + objc = DBXTeamTeamMemberInfo(swift: swift) } completionHandler(objc, routeError, callError) } @@ -4780,16 +4780,16 @@ public class DBXTeamMembersDeleteProfilePhotoRpcRequestV2: NSObject, DBXRequest } @objc -public class DBXTeamMembersDeleteProfilePhotoRpcRequest: NSObject, DBXRequest { - var swift: RpcRequest +public class DBXTeamMembersDeleteProfilePhotoRpcRequestV2: NSObject, DBXRequest { + var swift: RpcRequest - init(swift: RpcRequest) { + init(swift: RpcRequest) { self.swift = swift } @objc @discardableResult public func response( - completionHandler: @escaping (DBXTeamTeamMemberInfo?, DBXTeamMembersDeleteProfilePhotoError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXTeamTeamMemberInfoV2Result?, DBXTeamMembersDeleteProfilePhotoError?, DBXCallError?) -> Void ) -> Self { response(queue: nil, completionHandler: completionHandler) } @@ -4797,7 +4797,7 @@ public class DBXTeamMembersDeleteProfilePhotoRpcRequest: NSObject, DBXRequest { @objc @discardableResult public func response( queue: DispatchQueue?, - completionHandler: @escaping (DBXTeamTeamMemberInfo?, DBXTeamMembersDeleteProfilePhotoError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXTeamTeamMemberInfoV2Result?, DBXTeamMembersDeleteProfilePhotoError?, DBXCallError?) -> Void ) -> Self { swift.response(queue: queue) { result, error in var routeError: DBXTeamMembersDeleteProfilePhotoError? @@ -4811,9 +4811,9 @@ public class DBXTeamMembersDeleteProfilePhotoRpcRequest: NSObject, DBXRequest { callError = error?.objc } - var objc: DBXTeamTeamMemberInfo? + var objc: DBXTeamTeamMemberInfoV2Result? if let swift = result { - objc = DBXTeamTeamMemberInfo(swift: swift) + objc = DBXTeamTeamMemberInfoV2Result(swift: swift) } completionHandler(objc, routeError, callError) } @@ -4903,16 +4903,16 @@ public class DBXTeamMembersGetAvailableTeamMemberRolesRpcRequest: NSObject, DBXR } @objc -public class DBXTeamMembersGetInfoRpcRequestV2: NSObject, DBXRequest { - var swift: RpcRequest +public class DBXTeamMembersGetInfoRpcRequest: NSObject, DBXRequest { + var swift: RpcRequest, Team.MembersGetInfoErrorSerializer> - init(swift: RpcRequest) { + init(swift: RpcRequest, Team.MembersGetInfoErrorSerializer>) { self.swift = swift } @objc @discardableResult public func response( - completionHandler: @escaping (DBXTeamMembersGetInfoV2Result?, DBXTeamMembersGetInfoError?, DBXCallError?) -> Void + completionHandler: @escaping ([DBXTeamMembersGetInfoItem]?, DBXTeamMembersGetInfoError?, DBXCallError?) -> Void ) -> Self { response(queue: nil, completionHandler: completionHandler) } @@ -4920,7 +4920,7 @@ public class DBXTeamMembersGetInfoRpcRequestV2: NSObject, DBXRequest { @objc @discardableResult public func response( queue: DispatchQueue?, - completionHandler: @escaping (DBXTeamMembersGetInfoV2Result?, DBXTeamMembersGetInfoError?, DBXCallError?) -> Void + completionHandler: @escaping ([DBXTeamMembersGetInfoItem]?, DBXTeamMembersGetInfoError?, DBXCallError?) -> Void ) -> Self { swift.response(queue: queue) { result, error in var routeError: DBXTeamMembersGetInfoError? @@ -4934,9 +4934,9 @@ public class DBXTeamMembersGetInfoRpcRequestV2: NSObject, DBXRequest { callError = error?.objc } - var objc: DBXTeamMembersGetInfoV2Result? + var objc: [DBXTeamMembersGetInfoItem]? if let swift = result { - objc = DBXTeamMembersGetInfoV2Result(swift: swift) + objc = swift.map { DBXTeamMembersGetInfoItem.factory(swift: $0) } } completionHandler(objc, routeError, callError) } @@ -4970,16 +4970,16 @@ public class DBXTeamMembersGetInfoRpcRequestV2: NSObject, DBXRequest { } @objc -public class DBXTeamMembersGetInfoRpcRequest: NSObject, DBXRequest { - var swift: RpcRequest, Team.MembersGetInfoErrorSerializer> +public class DBXTeamMembersGetInfoRpcRequestV2: NSObject, DBXRequest { + var swift: RpcRequest - init(swift: RpcRequest, Team.MembersGetInfoErrorSerializer>) { + init(swift: RpcRequest) { self.swift = swift } @objc @discardableResult public func response( - completionHandler: @escaping ([DBXTeamMembersGetInfoItem]?, DBXTeamMembersGetInfoError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXTeamMembersGetInfoV2Result?, DBXTeamMembersGetInfoError?, DBXCallError?) -> Void ) -> Self { response(queue: nil, completionHandler: completionHandler) } @@ -4987,7 +4987,7 @@ public class DBXTeamMembersGetInfoRpcRequest: NSObject, DBXRequest { @objc @discardableResult public func response( queue: DispatchQueue?, - completionHandler: @escaping ([DBXTeamMembersGetInfoItem]?, DBXTeamMembersGetInfoError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXTeamMembersGetInfoV2Result?, DBXTeamMembersGetInfoError?, DBXCallError?) -> Void ) -> Self { swift.response(queue: queue) { result, error in var routeError: DBXTeamMembersGetInfoError? @@ -5001,9 +5001,9 @@ public class DBXTeamMembersGetInfoRpcRequest: NSObject, DBXRequest { callError = error?.objc } - var objc: [DBXTeamMembersGetInfoItem]? + var objc: DBXTeamMembersGetInfoV2Result? if let swift = result { - objc = swift.map { DBXTeamMembersGetInfoItem.factory(swift: $0) } + objc = DBXTeamMembersGetInfoV2Result(swift: swift) } completionHandler(objc, routeError, callError) } @@ -5037,16 +5037,16 @@ public class DBXTeamMembersGetInfoRpcRequest: NSObject, DBXRequest { } @objc -public class DBXTeamMembersListRpcRequestV2: NSObject, DBXRequest { - var swift: RpcRequest +public class DBXTeamMembersListRpcRequest: NSObject, DBXRequest { + var swift: RpcRequest - init(swift: RpcRequest) { + init(swift: RpcRequest) { self.swift = swift } @objc @discardableResult public func response( - completionHandler: @escaping (DBXTeamMembersListV2Result?, DBXTeamMembersListError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXTeamMembersListResult?, DBXTeamMembersListError?, DBXCallError?) -> Void ) -> Self { response(queue: nil, completionHandler: completionHandler) } @@ -5054,7 +5054,7 @@ public class DBXTeamMembersListRpcRequestV2: NSObject, DBXRequest { @objc @discardableResult public func response( queue: DispatchQueue?, - completionHandler: @escaping (DBXTeamMembersListV2Result?, DBXTeamMembersListError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXTeamMembersListResult?, DBXTeamMembersListError?, DBXCallError?) -> Void ) -> Self { swift.response(queue: queue) { result, error in var routeError: DBXTeamMembersListError? @@ -5068,9 +5068,9 @@ public class DBXTeamMembersListRpcRequestV2: NSObject, DBXRequest { callError = error?.objc } - var objc: DBXTeamMembersListV2Result? + var objc: DBXTeamMembersListResult? if let swift = result { - objc = DBXTeamMembersListV2Result(swift: swift) + objc = DBXTeamMembersListResult(swift: swift) } completionHandler(objc, routeError, callError) } @@ -5104,16 +5104,16 @@ public class DBXTeamMembersListRpcRequestV2: NSObject, DBXRequest { } @objc -public class DBXTeamMembersListRpcRequest: NSObject, DBXRequest { - var swift: RpcRequest +public class DBXTeamMembersListRpcRequestV2: NSObject, DBXRequest { + var swift: RpcRequest - init(swift: RpcRequest) { + init(swift: RpcRequest) { self.swift = swift } @objc @discardableResult public func response( - completionHandler: @escaping (DBXTeamMembersListResult?, DBXTeamMembersListError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXTeamMembersListV2Result?, DBXTeamMembersListError?, DBXCallError?) -> Void ) -> Self { response(queue: nil, completionHandler: completionHandler) } @@ -5121,7 +5121,7 @@ public class DBXTeamMembersListRpcRequest: NSObject, DBXRequest { @objc @discardableResult public func response( queue: DispatchQueue?, - completionHandler: @escaping (DBXTeamMembersListResult?, DBXTeamMembersListError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXTeamMembersListV2Result?, DBXTeamMembersListError?, DBXCallError?) -> Void ) -> Self { swift.response(queue: queue) { result, error in var routeError: DBXTeamMembersListError? @@ -5135,9 +5135,9 @@ public class DBXTeamMembersListRpcRequest: NSObject, DBXRequest { callError = error?.objc } - var objc: DBXTeamMembersListResult? + var objc: DBXTeamMembersListV2Result? if let swift = result { - objc = DBXTeamMembersListResult(swift: swift) + objc = DBXTeamMembersListV2Result(swift: swift) } completionHandler(objc, routeError, callError) } @@ -5171,16 +5171,16 @@ public class DBXTeamMembersListRpcRequest: NSObject, DBXRequest { } @objc -public class DBXTeamMembersListContinueRpcRequestV2: NSObject, DBXRequest { - var swift: RpcRequest +public class DBXTeamMembersListContinueRpcRequest: NSObject, DBXRequest { + var swift: RpcRequest - init(swift: RpcRequest) { + init(swift: RpcRequest) { self.swift = swift } @objc @discardableResult public func response( - completionHandler: @escaping (DBXTeamMembersListV2Result?, DBXTeamMembersListContinueError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXTeamMembersListResult?, DBXTeamMembersListContinueError?, DBXCallError?) -> Void ) -> Self { response(queue: nil, completionHandler: completionHandler) } @@ -5188,7 +5188,7 @@ public class DBXTeamMembersListContinueRpcRequestV2: NSObject, DBXRequest { @objc @discardableResult public func response( queue: DispatchQueue?, - completionHandler: @escaping (DBXTeamMembersListV2Result?, DBXTeamMembersListContinueError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXTeamMembersListResult?, DBXTeamMembersListContinueError?, DBXCallError?) -> Void ) -> Self { swift.response(queue: queue) { result, error in var routeError: DBXTeamMembersListContinueError? @@ -5202,9 +5202,9 @@ public class DBXTeamMembersListContinueRpcRequestV2: NSObject, DBXRequest { callError = error?.objc } - var objc: DBXTeamMembersListV2Result? + var objc: DBXTeamMembersListResult? if let swift = result { - objc = DBXTeamMembersListV2Result(swift: swift) + objc = DBXTeamMembersListResult(swift: swift) } completionHandler(objc, routeError, callError) } @@ -5238,16 +5238,16 @@ public class DBXTeamMembersListContinueRpcRequestV2: NSObject, DBXRequest { } @objc -public class DBXTeamMembersListContinueRpcRequest: NSObject, DBXRequest { - var swift: RpcRequest +public class DBXTeamMembersListContinueRpcRequestV2: NSObject, DBXRequest { + var swift: RpcRequest - init(swift: RpcRequest) { + init(swift: RpcRequest) { self.swift = swift } @objc @discardableResult public func response( - completionHandler: @escaping (DBXTeamMembersListResult?, DBXTeamMembersListContinueError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXTeamMembersListV2Result?, DBXTeamMembersListContinueError?, DBXCallError?) -> Void ) -> Self { response(queue: nil, completionHandler: completionHandler) } @@ -5255,7 +5255,7 @@ public class DBXTeamMembersListContinueRpcRequest: NSObject, DBXRequest { @objc @discardableResult public func response( queue: DispatchQueue?, - completionHandler: @escaping (DBXTeamMembersListResult?, DBXTeamMembersListContinueError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXTeamMembersListV2Result?, DBXTeamMembersListContinueError?, DBXCallError?) -> Void ) -> Self { swift.response(queue: queue) { result, error in var routeError: DBXTeamMembersListContinueError? @@ -5269,9 +5269,9 @@ public class DBXTeamMembersListContinueRpcRequest: NSObject, DBXRequest { callError = error?.objc } - var objc: DBXTeamMembersListResult? + var objc: DBXTeamMembersListV2Result? if let swift = result { - objc = DBXTeamMembersListResult(swift: swift) + objc = DBXTeamMembersListV2Result(swift: swift) } completionHandler(objc, routeError, callError) } @@ -5878,16 +5878,16 @@ public class DBXTeamMembersSendWelcomeEmailRpcRequest: NSObject, DBXRequest { } @objc -public class DBXTeamMembersSetAdminPermissionsRpcRequestV2: NSObject, DBXRequest { - var swift: RpcRequest +public class DBXTeamMembersSetAdminPermissionsRpcRequest: NSObject, DBXRequest { + var swift: RpcRequest - init(swift: RpcRequest) { + init(swift: RpcRequest) { self.swift = swift } @objc @discardableResult public func response( - completionHandler: @escaping (DBXTeamMembersSetPermissions2Result?, DBXTeamMembersSetPermissions2Error?, DBXCallError?) -> Void + completionHandler: @escaping (DBXTeamMembersSetPermissionsResult?, DBXTeamMembersSetPermissionsError?, DBXCallError?) -> Void ) -> Self { response(queue: nil, completionHandler: completionHandler) } @@ -5895,23 +5895,23 @@ public class DBXTeamMembersSetAdminPermissionsRpcRequestV2: NSObject, DBXRequest @objc @discardableResult public func response( queue: DispatchQueue?, - completionHandler: @escaping (DBXTeamMembersSetPermissions2Result?, DBXTeamMembersSetPermissions2Error?, DBXCallError?) -> Void + completionHandler: @escaping (DBXTeamMembersSetPermissionsResult?, DBXTeamMembersSetPermissionsError?, DBXCallError?) -> Void ) -> Self { swift.response(queue: queue) { result, error in - var routeError: DBXTeamMembersSetPermissions2Error? + var routeError: DBXTeamMembersSetPermissionsError? var callError: DBXCallError? switch error { case .routeError(let box, _, _, _): - routeError = DBXTeamMembersSetPermissions2Error(swift: box.unboxed) + routeError = DBXTeamMembersSetPermissionsError(swift: box.unboxed) callError = nil default: routeError = nil callError = error?.objc } - var objc: DBXTeamMembersSetPermissions2Result? + var objc: DBXTeamMembersSetPermissionsResult? if let swift = result { - objc = DBXTeamMembersSetPermissions2Result(swift: swift) + objc = DBXTeamMembersSetPermissionsResult(swift: swift) } completionHandler(objc, routeError, callError) } @@ -5945,16 +5945,16 @@ public class DBXTeamMembersSetAdminPermissionsRpcRequestV2: NSObject, DBXRequest } @objc -public class DBXTeamMembersSetAdminPermissionsRpcRequest: NSObject, DBXRequest { - var swift: RpcRequest +public class DBXTeamMembersSetAdminPermissionsRpcRequestV2: NSObject, DBXRequest { + var swift: RpcRequest - init(swift: RpcRequest) { + init(swift: RpcRequest) { self.swift = swift } @objc @discardableResult public func response( - completionHandler: @escaping (DBXTeamMembersSetPermissionsResult?, DBXTeamMembersSetPermissionsError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXTeamMembersSetPermissions2Result?, DBXTeamMembersSetPermissions2Error?, DBXCallError?) -> Void ) -> Self { response(queue: nil, completionHandler: completionHandler) } @@ -5962,23 +5962,23 @@ public class DBXTeamMembersSetAdminPermissionsRpcRequest: NSObject, DBXRequest { @objc @discardableResult public func response( queue: DispatchQueue?, - completionHandler: @escaping (DBXTeamMembersSetPermissionsResult?, DBXTeamMembersSetPermissionsError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXTeamMembersSetPermissions2Result?, DBXTeamMembersSetPermissions2Error?, DBXCallError?) -> Void ) -> Self { swift.response(queue: queue) { result, error in - var routeError: DBXTeamMembersSetPermissionsError? + var routeError: DBXTeamMembersSetPermissions2Error? var callError: DBXCallError? switch error { case .routeError(let box, _, _, _): - routeError = DBXTeamMembersSetPermissionsError(swift: box.unboxed) + routeError = DBXTeamMembersSetPermissions2Error(swift: box.unboxed) callError = nil default: routeError = nil callError = error?.objc } - var objc: DBXTeamMembersSetPermissionsResult? + var objc: DBXTeamMembersSetPermissions2Result? if let swift = result { - objc = DBXTeamMembersSetPermissionsResult(swift: swift) + objc = DBXTeamMembersSetPermissions2Result(swift: swift) } completionHandler(objc, routeError, callError) } @@ -6012,16 +6012,16 @@ public class DBXTeamMembersSetAdminPermissionsRpcRequest: NSObject, DBXRequest { } @objc -public class DBXTeamMembersSetProfileRpcRequestV2: NSObject, DBXRequest { - var swift: RpcRequest +public class DBXTeamMembersSetProfileRpcRequest: NSObject, DBXRequest { + var swift: RpcRequest - init(swift: RpcRequest) { + init(swift: RpcRequest) { self.swift = swift } @objc @discardableResult public func response( - completionHandler: @escaping (DBXTeamTeamMemberInfoV2Result?, DBXTeamMembersSetProfileError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXTeamTeamMemberInfo?, DBXTeamMembersSetProfileError?, DBXCallError?) -> Void ) -> Self { response(queue: nil, completionHandler: completionHandler) } @@ -6029,7 +6029,7 @@ public class DBXTeamMembersSetProfileRpcRequestV2: NSObject, DBXRequest { @objc @discardableResult public func response( queue: DispatchQueue?, - completionHandler: @escaping (DBXTeamTeamMemberInfoV2Result?, DBXTeamMembersSetProfileError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXTeamTeamMemberInfo?, DBXTeamMembersSetProfileError?, DBXCallError?) -> Void ) -> Self { swift.response(queue: queue) { result, error in var routeError: DBXTeamMembersSetProfileError? @@ -6043,9 +6043,9 @@ public class DBXTeamMembersSetProfileRpcRequestV2: NSObject, DBXRequest { callError = error?.objc } - var objc: DBXTeamTeamMemberInfoV2Result? + var objc: DBXTeamTeamMemberInfo? if let swift = result { - objc = DBXTeamTeamMemberInfoV2Result(swift: swift) + objc = DBXTeamTeamMemberInfo(swift: swift) } completionHandler(objc, routeError, callError) } @@ -6079,16 +6079,16 @@ public class DBXTeamMembersSetProfileRpcRequestV2: NSObject, DBXRequest { } @objc -public class DBXTeamMembersSetProfileRpcRequest: NSObject, DBXRequest { - var swift: RpcRequest +public class DBXTeamMembersSetProfileRpcRequestV2: NSObject, DBXRequest { + var swift: RpcRequest - init(swift: RpcRequest) { + init(swift: RpcRequest) { self.swift = swift } @objc @discardableResult public func response( - completionHandler: @escaping (DBXTeamTeamMemberInfo?, DBXTeamMembersSetProfileError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXTeamTeamMemberInfoV2Result?, DBXTeamMembersSetProfileError?, DBXCallError?) -> Void ) -> Self { response(queue: nil, completionHandler: completionHandler) } @@ -6096,7 +6096,7 @@ public class DBXTeamMembersSetProfileRpcRequest: NSObject, DBXRequest { @objc @discardableResult public func response( queue: DispatchQueue?, - completionHandler: @escaping (DBXTeamTeamMemberInfo?, DBXTeamMembersSetProfileError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXTeamTeamMemberInfoV2Result?, DBXTeamMembersSetProfileError?, DBXCallError?) -> Void ) -> Self { swift.response(queue: queue) { result, error in var routeError: DBXTeamMembersSetProfileError? @@ -6110,9 +6110,9 @@ public class DBXTeamMembersSetProfileRpcRequest: NSObject, DBXRequest { callError = error?.objc } - var objc: DBXTeamTeamMemberInfo? + var objc: DBXTeamTeamMemberInfoV2Result? if let swift = result { - objc = DBXTeamTeamMemberInfo(swift: swift) + objc = DBXTeamTeamMemberInfoV2Result(swift: swift) } completionHandler(objc, routeError, callError) } @@ -6146,16 +6146,16 @@ public class DBXTeamMembersSetProfileRpcRequest: NSObject, DBXRequest { } @objc -public class DBXTeamMembersSetProfilePhotoRpcRequestV2: NSObject, DBXRequest { - var swift: RpcRequest +public class DBXTeamMembersSetProfilePhotoRpcRequest: NSObject, DBXRequest { + var swift: RpcRequest - init(swift: RpcRequest) { + init(swift: RpcRequest) { self.swift = swift } @objc @discardableResult public func response( - completionHandler: @escaping (DBXTeamTeamMemberInfoV2Result?, DBXTeamMembersSetProfilePhotoError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXTeamTeamMemberInfo?, DBXTeamMembersSetProfilePhotoError?, DBXCallError?) -> Void ) -> Self { response(queue: nil, completionHandler: completionHandler) } @@ -6163,7 +6163,7 @@ public class DBXTeamMembersSetProfilePhotoRpcRequestV2: NSObject, DBXRequest { @objc @discardableResult public func response( queue: DispatchQueue?, - completionHandler: @escaping (DBXTeamTeamMemberInfoV2Result?, DBXTeamMembersSetProfilePhotoError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXTeamTeamMemberInfo?, DBXTeamMembersSetProfilePhotoError?, DBXCallError?) -> Void ) -> Self { swift.response(queue: queue) { result, error in var routeError: DBXTeamMembersSetProfilePhotoError? @@ -6177,9 +6177,9 @@ public class DBXTeamMembersSetProfilePhotoRpcRequestV2: NSObject, DBXRequest { callError = error?.objc } - var objc: DBXTeamTeamMemberInfoV2Result? + var objc: DBXTeamTeamMemberInfo? if let swift = result { - objc = DBXTeamTeamMemberInfoV2Result(swift: swift) + objc = DBXTeamTeamMemberInfo(swift: swift) } completionHandler(objc, routeError, callError) } @@ -6213,16 +6213,16 @@ public class DBXTeamMembersSetProfilePhotoRpcRequestV2: NSObject, DBXRequest { } @objc -public class DBXTeamMembersSetProfilePhotoRpcRequest: NSObject, DBXRequest { - var swift: RpcRequest +public class DBXTeamMembersSetProfilePhotoRpcRequestV2: NSObject, DBXRequest { + var swift: RpcRequest - init(swift: RpcRequest) { + init(swift: RpcRequest) { self.swift = swift } @objc @discardableResult public func response( - completionHandler: @escaping (DBXTeamTeamMemberInfo?, DBXTeamMembersSetProfilePhotoError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXTeamTeamMemberInfoV2Result?, DBXTeamMembersSetProfilePhotoError?, DBXCallError?) -> Void ) -> Self { response(queue: nil, completionHandler: completionHandler) } @@ -6230,7 +6230,7 @@ public class DBXTeamMembersSetProfilePhotoRpcRequest: NSObject, DBXRequest { @objc @discardableResult public func response( queue: DispatchQueue?, - completionHandler: @escaping (DBXTeamTeamMemberInfo?, DBXTeamMembersSetProfilePhotoError?, DBXCallError?) -> Void + completionHandler: @escaping (DBXTeamTeamMemberInfoV2Result?, DBXTeamMembersSetProfilePhotoError?, DBXCallError?) -> Void ) -> Self { swift.response(queue: queue) { result, error in var routeError: DBXTeamMembersSetProfilePhotoError? @@ -6244,9 +6244,9 @@ public class DBXTeamMembersSetProfilePhotoRpcRequest: NSObject, DBXRequest { callError = error?.objc } - var objc: DBXTeamTeamMemberInfo? + var objc: DBXTeamTeamMemberInfoV2Result? if let swift = result { - objc = DBXTeamTeamMemberInfo(swift: swift) + objc = DBXTeamTeamMemberInfoV2Result(swift: swift) } completionHandler(objc, routeError, callError) } diff --git a/stone b/stone index 2f1763c2..40bd164b 160000 --- a/stone +++ b/stone @@ -1 +1 @@ -Subproject commit 2f1763c292410aefa3bbdd208f364c5d324eb4e5 +Subproject commit 40bd164ba24162dd6c78688d90976f54f0406dc9