Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Source/SwiftyDropbox/Shared/Generated/Auth.swift
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,10 @@ public class Auth {

/// Errors occurred during authentication.
public enum AuthError: CustomStringConvertible, JSONRepresentable {
/// The access token is invalid.
/// The access token is invalid. This can happen if the access token has been revoked by Dropbox or the user. To
/// fix this, you should re-authenticate the user. Note: Access tokens that are not returned exactly as
/// provisioned will return this error. Be sure not to truncate or otherwise malform access tokens
/// provided by Dropbox.
case invalidAccessToken
/// The user specified in 'Dropbox-API-Select-User' is no longer on the team.
case invalidSelectUser
Expand Down Expand Up @@ -192,7 +195,7 @@ public class Auth {

/// The InvalidAccountTypeError union
public enum InvalidAccountTypeError: CustomStringConvertible, JSONRepresentable {
/// Current account type doesn't have permission to access this route endpoint.
/// Current account type doesn't have permission to access this endpoint.
case endpoint
/// Current account type doesn't have permission to access this feature.
case feature
Expand Down
116 changes: 85 additions & 31 deletions Source/SwiftyDropbox/Shared/Generated/Files.swift

Large diffs are not rendered by default.

32 changes: 25 additions & 7 deletions Source/SwiftyDropbox/Shared/Generated/FilesAppAuthRoutes.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@ public class FilesAppAuthRoutes: DropboxTransportClientOwning {
/// compression.
/// - parameter size: The size for the thumbnail image.
/// - parameter mode: How to resize and crop the image to achieve the desired size.
/// - parameter quality: Field is only returned for "internal" callers. Quality of the thumbnail image.
/// - parameter excludeMediaInfo: Normally, mediaInfo in FileMetadata is set for photo and video. When this flag is
/// true, mediaInfo in FileMetadata is not populated. This improves latency for use cases where `media_info` is
/// not needed.
/// - parameter preserveTransparency: Whether to preserve the original image's transparency in the thumbnail. This
/// is supported only when the output format is PNG or WebP. Requests that set this flag with JPEG output return
/// an error.
/// - parameter overwrite: A boolean to set behavior in the event of a naming conflict. `True` will overwrite
/// conflicting file at destination. `False` will take no action (but if left unhandled in destination closure,
/// an NSError will be thrown).
Expand All @@ -43,13 +45,20 @@ public class FilesAppAuthRoutes: DropboxTransportClientOwning {
format: Files.ThumbnailFormat = .jpeg,
size: Files.ThumbnailSize = .w64h64,
mode: Files.ThumbnailMode = .strict,
quality: Files.ThumbnailQuality = .quality80,
excludeMediaInfo: Bool? = nil,
preserveTransparency: Bool = false,
overwrite: Bool = false,
destination: URL
) -> DownloadRequestFile<Files.PreviewResultSerializer, Files.ThumbnailV2ErrorSerializer> {
let route = Files.getThumbnailV2
let serverArgs = Files.ThumbnailV2Arg(resource: resource, format: format, size: size, mode: mode, quality: quality, excludeMediaInfo: excludeMediaInfo)
let serverArgs = Files.ThumbnailV2Arg(
resource: resource,
format: format,
size: size,
mode: mode,
excludeMediaInfo: excludeMediaInfo,
preserveTransparency: preserveTransparency
)
return client.request(route, serverArgs: serverArgs, overwrite: overwrite, destination: destination)
}

Expand All @@ -66,10 +75,12 @@ public class FilesAppAuthRoutes: DropboxTransportClientOwning {
/// compression.
/// - parameter size: The size for the thumbnail image.
/// - parameter mode: How to resize and crop the image to achieve the desired size.
/// - parameter quality: Field is only returned for "internal" callers. Quality of the thumbnail image.
/// - parameter excludeMediaInfo: Normally, mediaInfo in FileMetadata is set for photo and video. When this flag is
/// true, mediaInfo in FileMetadata is not populated. This improves latency for use cases where `media_info` is
/// not needed.
/// - parameter preserveTransparency: Whether to preserve the original image's transparency in the thumbnail. This
/// is supported only when the output format is PNG or WebP. Requests that set this flag with JPEG output return
/// an error.
///
/// - returns: Through the response callback, the caller will receive a `Files.PreviewResult` object on success or a
/// `Files.ThumbnailV2Error` object on failure.
Expand All @@ -78,11 +89,18 @@ public class FilesAppAuthRoutes: DropboxTransportClientOwning {
format: Files.ThumbnailFormat = .jpeg,
size: Files.ThumbnailSize = .w64h64,
mode: Files.ThumbnailMode = .strict,
quality: Files.ThumbnailQuality = .quality80,
excludeMediaInfo: Bool? = nil
excludeMediaInfo: Bool? = nil,
preserveTransparency: Bool = false
) -> DownloadRequestMemory<Files.PreviewResultSerializer, Files.ThumbnailV2ErrorSerializer> {
let route = Files.getThumbnailV2
let serverArgs = Files.ThumbnailV2Arg(resource: resource, format: format, size: size, mode: mode, quality: quality, excludeMediaInfo: excludeMediaInfo)
let serverArgs = Files.ThumbnailV2Arg(
resource: resource,
format: format,
size: size,
mode: mode,
excludeMediaInfo: excludeMediaInfo,
preserveTransparency: preserveTransparency
)
return client.request(route, serverArgs: serverArgs)
}

Expand Down
Loading
Loading