Skip to content

Commit a49c91f

Browse files
author
Pranay Sowdaboina
committed
4.6.0 release.
1 parent 8fe5d3e commit a49c91f

File tree

19 files changed

+1210
-334
lines changed

19 files changed

+1210
-334
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ To install the Dropbox Swift SDK via Carthage, you need to create a `Cartfile` i
131131

132132
```
133133
# SwiftyDropbox
134-
github "https://github.com/dropbox/SwiftyDropbox" ~> 4.5.0
134+
github "https://github.com/dropbox/SwiftyDropbox" ~> 4.6.0
135135
```
136136

137137
Then, run the following command to install the dependency to checkout and build the Dropbox Swift SDK repository:

Source/SwiftyDropbox/Platform/SwiftyDropbox_iOS/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>4.5.0</string>
18+
<string>4.6.0</string>
1919
<key>CFBundleVersion</key>
2020
<string>$(CURRENT_PROJECT_VERSION)</string>
2121
<key>NSPrincipalClass</key>

Source/SwiftyDropbox/Platform/SwiftyDropbox_macOS/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>4.5.0</string>
18+
<string>4.6.0</string>
1919
<key>CFBundleVersion</key>
2020
<string>$(CURRENT_PROJECT_VERSION)</string>
2121
<key>NSHumanReadableCopyright</key>

Source/SwiftyDropbox/Shared/Generated/Files.swift

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5077,7 +5077,7 @@ open class Files {
50775077
public enum UploadError: CustomStringConvertible {
50785078
/// Unable to save the uploaded contents to a file.
50795079
case path(Files.UploadWriteFailed)
5080-
/// The supplied property group is invalid.
5080+
/// The supplied property group is invalid. The file has uploaded without property groups.
50815081
case propertiesError(FileProperties.InvalidPropertyGroupError)
50825082
/// An unspecified error.
50835083
case other
@@ -5130,7 +5130,7 @@ open class Files {
51305130
public enum UploadErrorWithProperties: CustomStringConvertible {
51315131
/// Unable to save the uploaded contents to a file.
51325132
case path(Files.UploadWriteFailed)
5133-
/// The supplied property group is invalid.
5133+
/// The supplied property group is invalid. The file has uploaded without property groups.
51345134
case propertiesError(FileProperties.InvalidPropertyGroupError)
51355135
/// An unspecified error.
51365136
case other
@@ -5496,8 +5496,11 @@ open class Files {
54965496
public enum UploadSessionFinishError: CustomStringConvertible {
54975497
/// The session arguments are incorrect; the value explains the reason.
54985498
case lookupFailed(Files.UploadSessionLookupError)
5499-
/// Unable to save the uploaded contents to a file.
5499+
/// Unable to save the uploaded contents to a file. Data has already been appended to the upload session. Please
5500+
/// retry with empty data body and updated offset.
55005501
case path(Files.WriteError)
5502+
/// The supplied property group is invalid. The file has uploaded without property groups.
5503+
case propertiesError(FileProperties.InvalidPropertyGroupError)
55015504
/// The batch request commits files into too many different shared folders. Please limit your batch request to
55025505
/// files contained in a single shared folder.
55035506
case tooManySharedFolderTargets
@@ -5522,6 +5525,10 @@ open class Files {
55225525
var d = ["path": Files.WriteErrorSerializer().serialize(arg)]
55235526
d[".tag"] = .str("path")
55245527
return .dictionary(d)
5528+
case .propertiesError(let arg):
5529+
var d = ["properties_error": FileProperties.InvalidPropertyGroupErrorSerializer().serialize(arg)]
5530+
d[".tag"] = .str("properties_error")
5531+
return .dictionary(d)
55255532
case .tooManySharedFolderTargets:
55265533
var d = [String: JSON]()
55275534
d[".tag"] = .str("too_many_shared_folder_targets")
@@ -5547,6 +5554,9 @@ open class Files {
55475554
case "path":
55485555
let v = Files.WriteErrorSerializer().deserialize(d["path"] ?? .null)
55495556
return UploadSessionFinishError.path(v)
5557+
case "properties_error":
5558+
let v = FileProperties.InvalidPropertyGroupErrorSerializer().deserialize(d["properties_error"] ?? .null)
5559+
return UploadSessionFinishError.propertiesError(v)
55505560
case "too_many_shared_folder_targets":
55515561
return UploadSessionFinishError.tooManySharedFolderTargets
55525562
case "too_many_write_operations":
@@ -5574,6 +5584,9 @@ open class Files {
55745584
case closed
55755585
/// The session must be closed before calling upload_session/finish_batch.
55765586
case notClosed
5587+
/// You can not append to the upload session because the size of a file should not reach the max file size limit
5588+
/// (i.e. 350GB).
5589+
case tooLarge
55775590
/// An unspecified error.
55785591
case other
55795592

@@ -5601,6 +5614,10 @@ open class Files {
56015614
var d = [String: JSON]()
56025615
d[".tag"] = .str("not_closed")
56035616
return .dictionary(d)
5617+
case .tooLarge:
5618+
var d = [String: JSON]()
5619+
d[".tag"] = .str("too_large")
5620+
return .dictionary(d)
56045621
case .other:
56055622
var d = [String: JSON]()
56065623
d[".tag"] = .str("other")
@@ -5621,6 +5638,8 @@ open class Files {
56215638
return UploadSessionLookupError.closed
56225639
case "not_closed":
56235640
return UploadSessionLookupError.notClosed
5641+
case "too_large":
5642+
return UploadSessionLookupError.tooLarge
56245643
case "other":
56255644
return UploadSessionLookupError.other
56265645
default:
@@ -5729,7 +5748,8 @@ open class Files {
57295748
open class UploadWriteFailed: CustomStringConvertible {
57305749
/// The reason why the file couldn't be saved.
57315750
open let reason: Files.WriteError
5732-
/// The upload session ID; this may be used to retry the commit.
5751+
/// The upload session ID; data has already been uploaded to the corresponding upload session and this ID may be
5752+
/// used to retry the commit with uploadSessionFinish.
57335753
open let uploadSessionId: String
57345754
public init(reason: Files.WriteError, uploadSessionId: String) {
57355755
self.reason = reason

Source/SwiftyDropbox/Shared/Generated/FilesRoutes.swift

Lines changed: 32 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,8 @@ open class FilesRoutes {
900900
return client.request(route, serverArgs: serverArgs, input: .stream(input))
901901
}
902902

903-
/// Append more data to an upload session. A single request should not upload more than 150 MB.
903+
/// Append more data to an upload session. A single request should not upload more than 150 MB. The maximum size of
904+
/// a file one can upload to an upload session is 350 GB.
904905
///
905906
/// - parameter sessionId: The upload session ID (returned by uploadSessionStart).
906907
/// - parameter offset: The amount of data that has been uploaded so far. We use this to make sure upload data isn't
@@ -916,7 +917,8 @@ open class FilesRoutes {
916917
return client.request(route, serverArgs: serverArgs, input: .data(input))
917918
}
918919

919-
/// Append more data to an upload session. A single request should not upload more than 150 MB.
920+
/// Append more data to an upload session. A single request should not upload more than 150 MB. The maximum size of
921+
/// a file one can upload to an upload session is 350 GB.
920922
///
921923
/// - parameter sessionId: The upload session ID (returned by uploadSessionStart).
922924
/// - parameter offset: The amount of data that has been uploaded so far. We use this to make sure upload data isn't
@@ -932,7 +934,8 @@ open class FilesRoutes {
932934
return client.request(route, serverArgs: serverArgs, input: .file(input))
933935
}
934936

935-
/// Append more data to an upload session. A single request should not upload more than 150 MB.
937+
/// Append more data to an upload session. A single request should not upload more than 150 MB. The maximum size of
938+
/// a file one can upload to an upload session is 350 GB.
936939
///
937940
/// - parameter sessionId: The upload session ID (returned by uploadSessionStart).
938941
/// - parameter offset: The amount of data that has been uploaded so far. We use this to make sure upload data isn't
@@ -949,7 +952,8 @@ open class FilesRoutes {
949952
}
950953

951954
/// Append more data to an upload session. When the parameter close is set, this call will close the session. A
952-
/// single request should not upload more than 150 MB.
955+
/// single request should not upload more than 150 MB. The maximum size of a file one can upload to an upload
956+
/// session is 350 GB.
953957
///
954958
/// - parameter cursor: Contains the upload session ID and the offset.
955959
/// - parameter close: If true, the current session will be closed, at which point you won't be able to call
@@ -965,7 +969,8 @@ open class FilesRoutes {
965969
}
966970

967971
/// Append more data to an upload session. When the parameter close is set, this call will close the session. A
968-
/// single request should not upload more than 150 MB.
972+
/// single request should not upload more than 150 MB. The maximum size of a file one can upload to an upload
973+
/// session is 350 GB.
969974
///
970975
/// - parameter cursor: Contains the upload session ID and the offset.
971976
/// - parameter close: If true, the current session will be closed, at which point you won't be able to call
@@ -981,7 +986,8 @@ open class FilesRoutes {
981986
}
982987

983988
/// Append more data to an upload session. When the parameter close is set, this call will close the session. A
984-
/// single request should not upload more than 150 MB.
989+
/// single request should not upload more than 150 MB. The maximum size of a file one can upload to an upload
990+
/// session is 350 GB.
985991
///
986992
/// - parameter cursor: Contains the upload session ID and the offset.
987993
/// - parameter close: If true, the current session will be closed, at which point you won't be able to call
@@ -997,7 +1003,7 @@ open class FilesRoutes {
9971003
}
9981004

9991005
/// Finish an upload session and save the uploaded data to the given file path. A single request should not upload
1000-
/// more than 150 MB.
1006+
/// more than 150 MB. The maximum size of a file one can upload to an upload session is 350 GB.
10011007
///
10021008
/// - parameter cursor: Contains the upload session ID and the offset.
10031009
/// - parameter commit: Contains the path and other optional modifiers for the commit.
@@ -1012,7 +1018,7 @@ open class FilesRoutes {
10121018
}
10131019

10141020
/// Finish an upload session and save the uploaded data to the given file path. A single request should not upload
1015-
/// more than 150 MB.
1021+
/// more than 150 MB. The maximum size of a file one can upload to an upload session is 350 GB.
10161022
///
10171023
/// - parameter cursor: Contains the upload session ID and the offset.
10181024
/// - parameter commit: Contains the path and other optional modifiers for the commit.
@@ -1027,7 +1033,7 @@ open class FilesRoutes {
10271033
}
10281034

10291035
/// Finish an upload session and save the uploaded data to the given file path. A single request should not upload
1030-
/// more than 150 MB.
1036+
/// more than 150 MB. The maximum size of a file one can upload to an upload session is 350 GB.
10311037
///
10321038
/// - parameter cursor: Contains the upload session ID and the offset.
10331039
/// - parameter commit: Contains the path and other optional modifiers for the commit.
@@ -1045,11 +1051,11 @@ open class FilesRoutes {
10451051
/// uploadSessionAppendV2 to upload file contents. We recommend uploading many files in parallel to increase
10461052
/// throughput. Once the file contents have been uploaded, rather than calling uploadSessionFinish, use this route
10471053
/// to finish all your upload sessions in a single request. close in UploadSessionStartArg or close in
1048-
/// UploadSessionAppendArg needs to be true for the last uploadSessionStart or uploadSessionAppendV2 call. This
1049-
/// route will return a job_id immediately and do the async commit job in background. Use
1050-
/// uploadSessionFinishBatchCheck to check the job status. For the same account, this route should be executed
1051-
/// serially. That means you should not start the next job before current job finishes. We allow up to 1000 entries
1052-
/// in a single request.
1054+
/// UploadSessionAppendArg needs to be true for the last uploadSessionStart or uploadSessionAppendV2 call. The
1055+
/// maximum size of a file one can upload to an upload session is 350 GB. This route will return a job_id
1056+
/// immediately and do the async commit job in background. Use uploadSessionFinishBatchCheck to check the job
1057+
/// status. For the same account, this route should be executed serially. That means you should not start the next
1058+
/// job before current job finishes. We allow up to 1000 entries in a single request.
10531059
///
10541060
/// - parameter entries: Commit information for each file in the batch.
10551061
///
@@ -1078,9 +1084,10 @@ open class FilesRoutes {
10781084
/// Upload sessions allow you to upload a single file in one or more requests, for example where the size of the
10791085
/// file is greater than 150 MB. This call starts a new upload session with the given data. You can then use
10801086
/// uploadSessionAppendV2 to add more data and uploadSessionFinish to save all the data to a file in Dropbox. A
1081-
/// single request should not upload more than 150 MB. An upload session can be used for a maximum of 48 hours.
1082-
/// Attempting to use an sessionId in UploadSessionStartResult with uploadSessionAppendV2 or uploadSessionFinish
1083-
/// more than 48 hours after its creation will return a notFound in UploadSessionLookupError.
1087+
/// single request should not upload more than 150 MB. The maximum size of a file one can upload to an upload
1088+
/// session is 350 GB. An upload session can be used for a maximum of 48 hours. Attempting to use an sessionId in
1089+
/// UploadSessionStartResult with uploadSessionAppendV2 or uploadSessionFinish more than 48 hours after its creation
1090+
/// will return a notFound in UploadSessionLookupError.
10841091
///
10851092
/// - parameter close: If true, the current session will be closed, at which point you won't be able to call
10861093
/// uploadSessionAppendV2 anymore with the current session.
@@ -1097,9 +1104,10 @@ open class FilesRoutes {
10971104
/// Upload sessions allow you to upload a single file in one or more requests, for example where the size of the
10981105
/// file is greater than 150 MB. This call starts a new upload session with the given data. You can then use
10991106
/// uploadSessionAppendV2 to add more data and uploadSessionFinish to save all the data to a file in Dropbox. A
1100-
/// single request should not upload more than 150 MB. An upload session can be used for a maximum of 48 hours.
1101-
/// Attempting to use an sessionId in UploadSessionStartResult with uploadSessionAppendV2 or uploadSessionFinish
1102-
/// more than 48 hours after its creation will return a notFound in UploadSessionLookupError.
1107+
/// single request should not upload more than 150 MB. The maximum size of a file one can upload to an upload
1108+
/// session is 350 GB. An upload session can be used for a maximum of 48 hours. Attempting to use an sessionId in
1109+
/// UploadSessionStartResult with uploadSessionAppendV2 or uploadSessionFinish more than 48 hours after its creation
1110+
/// will return a notFound in UploadSessionLookupError.
11031111
///
11041112
/// - parameter close: If true, the current session will be closed, at which point you won't be able to call
11051113
/// uploadSessionAppendV2 anymore with the current session.
@@ -1116,9 +1124,10 @@ open class FilesRoutes {
11161124
/// Upload sessions allow you to upload a single file in one or more requests, for example where the size of the
11171125
/// file is greater than 150 MB. This call starts a new upload session with the given data. You can then use
11181126
/// uploadSessionAppendV2 to add more data and uploadSessionFinish to save all the data to a file in Dropbox. A
1119-
/// single request should not upload more than 150 MB. An upload session can be used for a maximum of 48 hours.
1120-
/// Attempting to use an sessionId in UploadSessionStartResult with uploadSessionAppendV2 or uploadSessionFinish
1121-
/// more than 48 hours after its creation will return a notFound in UploadSessionLookupError.
1127+
/// single request should not upload more than 150 MB. The maximum size of a file one can upload to an upload
1128+
/// session is 350 GB. An upload session can be used for a maximum of 48 hours. Attempting to use an sessionId in
1129+
/// UploadSessionStartResult with uploadSessionAppendV2 or uploadSessionFinish more than 48 hours after its creation
1130+
/// will return a notFound in UploadSessionLookupError.
11221131
///
11231132
/// - parameter close: If true, the current session will be closed, at which point you won't be able to call
11241133
/// uploadSessionAppendV2 anymore with the current session.

Source/SwiftyDropbox/Shared/Generated/PaperRoutes.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ open class PaperRoutes {
127127

128128
/// Retrieves folder information for the given Paper doc. This includes: - folder sharing policy; permissions for
129129
/// subfolders are set by the top-level folder. - full 'filepath', i.e. the list of folders (both folderId and
130-
/// folderName) from the root folder to the folder directly containing the Paper doc. Note: If the Paper doc is not
131-
/// in any folder (aka unfiled) the response will be empty.
130+
/// folderName) from the root folder to the folder directly containing the Paper doc. Note: If the Paper doc is
131+
/// not in any folder (aka unfiled) the response will be empty.
132132
///
133133
/// - parameter docId: The Paper doc ID.
134134
///

0 commit comments

Comments
 (0)