Skip to content

Commit b71c085

Browse files
author
Julian Locke
committed
Pull spec and regenerate routes
1 parent ae8eade commit b71c085

File tree

9 files changed

+167
-17
lines changed

9 files changed

+167
-17
lines changed

.jazzy.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"FilePropertiesRoutes",
2020
"FileRequestsRoutes",
2121
"FilesRoutes",
22+
"OpenidRoutes",
2223
"PaperRoutes",
2324
"SharingRoutes",
2425
"TeamRoutes",

Source/SwiftyDropbox/Shared/Generated/Base.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ open class DropboxBase {
2323
open var file_requests: FileRequestsRoutes!
2424
/// Routes within the files namespace. See FilesRoutes for details.
2525
open var files: FilesRoutes!
26+
/// Routes within the openid namespace. See OpenidRoutes for details.
27+
open var openid: OpenidRoutes!
2628
/// Routes within the paper namespace. See PaperRoutes for details.
2729
open var paper: PaperRoutes!
2830
/// Routes within the sharing namespace. See SharingRoutes for details.
@@ -40,6 +42,7 @@ open class DropboxBase {
4042
self.file_properties = FilePropertiesRoutes(client: client)
4143
self.file_requests = FileRequestsRoutes(client: client)
4244
self.files = FilesRoutes(client: client)
45+
self.openid = OpenidRoutes(client: client)
4346
self.paper = PaperRoutes(client: client)
4447
self.sharing = SharingRoutes(client: client)
4548
self.team_log = TeamLogRoutes(client: client)

Source/SwiftyDropbox/Shared/Generated/Files.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ open class Files {
1212
open class AddTagArg: CustomStringConvertible {
1313
/// Path to the item to be tagged.
1414
public let path: String
15-
/// The value of the tag to add.
15+
/// The value of the tag to add. Will be automatically converted to lowercase letters.
1616
public let tagText: String
1717
public init(path: String, tagText: String) {
1818
stringValidator(pattern: "/(.|[\\r\\n])*")(path)
@@ -6250,7 +6250,7 @@ open class Files {
62506250
open class RemoveTagArg: CustomStringConvertible {
62516251
/// Path to the item to tag.
62526252
public let path: String
6253-
/// The tag to remove.
6253+
/// The tag to remove. Will be automatically converted to lowercase letters.
62546254
public let tagText: String
62556255
public init(path: String, tagText: String) {
62566256
stringValidator(pattern: "/(.|[\\r\\n])*")(path)

Source/SwiftyDropbox/Shared/Generated/FilesRoutes.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,7 +1174,7 @@ open class FilesRoutes {
11741174
/// than 20 tags can be added to a given item.
11751175
///
11761176
/// - parameter path: Path to the item to be tagged.
1177-
/// - parameter tagText: The value of the tag to add.
1177+
/// - parameter tagText: The value of the tag to add. Will be automatically converted to lowercase letters.
11781178
///
11791179
/// - returns: Through the response callback, the caller will receive a `Void` object on success or a
11801180
/// `Files.AddTagError` object on failure.
@@ -1199,7 +1199,7 @@ open class FilesRoutes {
11991199
/// Remove a tag from an item.
12001200
///
12011201
/// - parameter path: Path to the item to tag.
1202-
/// - parameter tagText: The tag to remove.
1202+
/// - parameter tagText: The tag to remove. Will be automatically converted to lowercase letters.
12031203
///
12041204
/// - returns: Through the response callback, the caller will receive a `Void` object on success or a
12051205
/// `Files.RemoveTagError` object on failure.

Source/SwiftyDropbox/Shared/Generated/Openid.swift

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ open class Openid {
8787
open class UserInfoError: CustomStringConvertible {
8888
/// (no description)
8989
public let err: Openid.ErrUnion?
90-
/// (no description)
90+
/// Brief explanation of the error.
9191
public let errorMessage: String
9292
public init(err: Openid.ErrUnion? = nil, errorMessage: String = "") {
9393
self.err = err
@@ -121,17 +121,18 @@ open class Openid {
121121

122122
/// The UserInfoResult struct
123123
open class UserInfoResult: CustomStringConvertible {
124-
/// (no description)
124+
/// Last name of user.
125125
public let familyName: String?
126-
/// (no description)
126+
/// First name of user.
127127
public let givenName: String?
128-
/// (no description)
128+
/// Email address of user.
129129
public let email: String?
130-
/// (no description)
130+
/// If user is email verified.
131131
public let emailVerified: Bool?
132-
/// (no description)
132+
/// Issuer of token (in this case Dropbox).
133133
public let iss: String
134-
/// (no description)
134+
/// An identifier for the user. This is the Dropbox account_id, a string value such as
135+
/// dbid:AAH4f99T0taONIb-OurWxbNQ6ywGRopQngc.
135136
public let sub: String
136137
public init(familyName: String? = nil, givenName: String? = nil, email: String? = nil, emailVerified: Bool? = nil, iss: String = "", sub: String = "") {
137138
nullableValidator(stringValidator())(familyName)
@@ -223,4 +224,19 @@ open class Openid {
223224
}
224225
}
225226

227+
228+
/// Stone Route Objects
229+
230+
static let userinfo = Route(
231+
name: "userinfo",
232+
version: 1,
233+
namespace: "openid",
234+
deprecated: false,
235+
argSerializer: Openid.UserInfoArgsSerializer(),
236+
responseSerializer: Openid.UserInfoResultSerializer(),
237+
errorSerializer: Openid.UserInfoErrorSerializer(),
238+
attrs: ["auth": "user",
239+
"host": "api",
240+
"style": "rpc"]
241+
)
226242
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
///
2+
/// Copyright (c) 2016 Dropbox, Inc. All rights reserved.
3+
///
4+
/// Auto-generated by Stone, do not modify.
5+
///
6+
7+
import Foundation
8+
9+
/// Routes for the openid namespace
10+
open class OpenidRoutes {
11+
public let client: DropboxTransportClient
12+
init(client: DropboxTransportClient) {
13+
self.client = client
14+
}
15+
16+
/// This route is used for refreshing the info that is found in the id_token during the OIDC flow. This route
17+
/// doesn't require any arguments and will use the scopes approved for the given access token.
18+
///
19+
///
20+
/// - returns: Through the response callback, the caller will receive a `Openid.UserInfoResult` object on success
21+
/// or a `Openid.UserInfoError` object on failure.
22+
@discardableResult open func userinfo() -> RpcRequest<Openid.UserInfoResultSerializer, Openid.UserInfoErrorSerializer> {
23+
let route = Openid.userinfo
24+
let serverArgs = Openid.UserInfoArgs()
25+
return client.request(route, serverArgs: serverArgs)
26+
}
27+
28+
}

Source/SwiftyDropbox/Shared/Generated/Sharing.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1793,8 +1793,10 @@ open class Sharing {
17931793

17941794
/// The FileMemberActionIndividualResult union
17951795
public enum FileMemberActionIndividualResult: CustomStringConvertible {
1796-
/// Member was successfully removed from this file. If AccessLevel is given, the member still has access via a
1797-
/// parent shared folder.
1796+
/// Part of the response for both add_file_member and remove_file_member_v1 (deprecated). For add_file_member,
1797+
/// indicates giving access was successful and at what AccessLevel. For remove_file_member_v1, indicates member
1798+
/// was successfully removed from the file. If AccessLevel is given, the member still has access via a parent
1799+
/// shared folder.
17981800
case success(Sharing.AccessLevel?)
17991801
/// User was not able to perform this action.
18001802
case memberError(Sharing.FileMemberActionError)

Source/SwiftyDropbox/Shared/Generated/TeamLog.swift

Lines changed: 103 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1622,7 +1622,7 @@ open class TeamLog {
16221622
}
16231623
}
16241624

1625-
/// Changed admin email reminder policy for team requests to join.
1625+
/// Changed admin reminder settings for requests to join the team.
16261626
open class AdminEmailRemindersChangedDetails: CustomStringConvertible {
16271627
/// To.
16281628
public let newValue: TeamLog.AdminEmailRemindersPolicy
@@ -9506,6 +9506,8 @@ open class TeamLog {
95069506
/// An unspecified error.
95079507
case fileLockingPolicyChangedDetails(TeamLog.FileLockingPolicyChangedDetails)
95089508
/// An unspecified error.
9509+
case fileProviderMigrationPolicyChangedDetails(TeamLog.FileProviderMigrationPolicyChangedDetails)
9510+
/// An unspecified error.
95099511
case fileRequestsChangePolicyDetails(TeamLog.FileRequestsChangePolicyDetails)
95109512
/// An unspecified error.
95119513
case fileRequestsEmailsEnabledDetails(TeamLog.FileRequestsEmailsEnabledDetails)
@@ -11244,6 +11246,10 @@ open class TeamLog {
1124411246
var d = Serialization.getFields(TeamLog.FileLockingPolicyChangedDetailsSerializer().serialize(arg))
1124511247
d[".tag"] = .str("file_locking_policy_changed_details")
1124611248
return .dictionary(d)
11249+
case .fileProviderMigrationPolicyChangedDetails(let arg):
11250+
var d = Serialization.getFields(TeamLog.FileProviderMigrationPolicyChangedDetailsSerializer().serialize(arg))
11251+
d[".tag"] = .str("file_provider_migration_policy_changed_details")
11252+
return .dictionary(d)
1124711253
case .fileRequestsChangePolicyDetails(let arg):
1124811254
var d = Serialization.getFields(TeamLog.FileRequestsChangePolicyDetailsSerializer().serialize(arg))
1124911255
d[".tag"] = .str("file_requests_change_policy_details")
@@ -12806,6 +12812,9 @@ open class TeamLog {
1280612812
case "file_locking_policy_changed_details":
1280712813
let v = TeamLog.FileLockingPolicyChangedDetailsSerializer().deserialize(json)
1280812814
return EventDetails.fileLockingPolicyChangedDetails(v)
12815+
case "file_provider_migration_policy_changed_details":
12816+
let v = TeamLog.FileProviderMigrationPolicyChangedDetailsSerializer().deserialize(json)
12817+
return EventDetails.fileProviderMigrationPolicyChangedDetails(v)
1280912818
case "file_requests_change_policy_details":
1281012819
let v = TeamLog.FileRequestsChangePolicyDetailsSerializer().deserialize(json)
1281112820
return EventDetails.fileRequestsChangePolicyDetails(v)
@@ -13833,7 +13842,7 @@ open class TeamLog {
1383313842
case teamSelectiveSyncSettingsChanged(TeamLog.TeamSelectiveSyncSettingsChangedType)
1383413843
/// (team_policies) Changed account capture setting on team domain
1383513844
case accountCaptureChangePolicy(TeamLog.AccountCaptureChangePolicyType)
13836-
/// (team_policies) Changed admin email reminder policy for team requests to join
13845+
/// (team_policies) Changed admin reminder settings for requests to join the team
1383713846
case adminEmailRemindersChanged(TeamLog.AdminEmailRemindersChangedType)
1383813847
/// (team_policies) Disabled downloads (deprecated, no longer logged)
1383913848
case allowDownloadDisabled(TeamLog.AllowDownloadDisabledType)
@@ -13889,6 +13898,8 @@ open class TeamLog {
1388913898
case fileCommentsChangePolicy(TeamLog.FileCommentsChangePolicyType)
1389013899
/// (team_policies) Changed file locking policy for team
1389113900
case fileLockingPolicyChanged(TeamLog.FileLockingPolicyChangedType)
13901+
/// (team_policies) Changed File Provider Migration policy for team
13902+
case fileProviderMigrationPolicyChanged(TeamLog.FileProviderMigrationPolicyChangedType)
1389213903
/// (team_policies) Enabled/disabled file requests
1389313904
case fileRequestsChangePolicy(TeamLog.FileRequestsChangePolicyType)
1389413905
/// (team_policies) Enabled file request emails for everyone (deprecated, no longer logged)
@@ -15633,6 +15644,10 @@ open class TeamLog {
1563315644
var d = Serialization.getFields(TeamLog.FileLockingPolicyChangedTypeSerializer().serialize(arg))
1563415645
d[".tag"] = .str("file_locking_policy_changed")
1563515646
return .dictionary(d)
15647+
case .fileProviderMigrationPolicyChanged(let arg):
15648+
var d = Serialization.getFields(TeamLog.FileProviderMigrationPolicyChangedTypeSerializer().serialize(arg))
15649+
d[".tag"] = .str("file_provider_migration_policy_changed")
15650+
return .dictionary(d)
1563615651
case .fileRequestsChangePolicy(let arg):
1563715652
var d = Serialization.getFields(TeamLog.FileRequestsChangePolicyTypeSerializer().serialize(arg))
1563815653
d[".tag"] = .str("file_requests_change_policy")
@@ -17191,6 +17206,9 @@ open class TeamLog {
1719117206
case "file_locking_policy_changed":
1719217207
let v = TeamLog.FileLockingPolicyChangedTypeSerializer().deserialize(json)
1719317208
return EventType.fileLockingPolicyChanged(v)
17209+
case "file_provider_migration_policy_changed":
17210+
let v = TeamLog.FileProviderMigrationPolicyChangedTypeSerializer().deserialize(json)
17211+
return EventType.fileProviderMigrationPolicyChanged(v)
1719417212
case "file_requests_change_policy":
1719517213
let v = TeamLog.FileRequestsChangePolicyTypeSerializer().deserialize(json)
1719617214
return EventType.fileRequestsChangePolicy(v)
@@ -18215,7 +18233,7 @@ open class TeamLog {
1821518233
case teamSelectiveSyncSettingsChanged
1821618234
/// (team_policies) Changed account capture setting on team domain
1821718235
case accountCaptureChangePolicy
18218-
/// (team_policies) Changed admin email reminder policy for team requests to join
18236+
/// (team_policies) Changed admin reminder settings for requests to join the team
1821918237
case adminEmailRemindersChanged
1822018238
/// (team_policies) Disabled downloads (deprecated, no longer logged)
1822118239
case allowDownloadDisabled
@@ -18271,6 +18289,8 @@ open class TeamLog {
1827118289
case fileCommentsChangePolicy
1827218290
/// (team_policies) Changed file locking policy for team
1827318291
case fileLockingPolicyChanged
18292+
/// (team_policies) Changed File Provider Migration policy for team
18293+
case fileProviderMigrationPolicyChanged
1827418294
/// (team_policies) Enabled/disabled file requests
1827518295
case fileRequestsChangePolicy
1827618296
/// (team_policies) Enabled file request emails for everyone (deprecated, no longer logged)
@@ -20015,6 +20035,10 @@ open class TeamLog {
2001520035
var d = [String: JSON]()
2001620036
d[".tag"] = .str("file_locking_policy_changed")
2001720037
return .dictionary(d)
20038+
case .fileProviderMigrationPolicyChanged:
20039+
var d = [String: JSON]()
20040+
d[".tag"] = .str("file_provider_migration_policy_changed")
20041+
return .dictionary(d)
2001820042
case .fileRequestsChangePolicy:
2001920043
var d = [String: JSON]()
2002020044
d[".tag"] = .str("file_requests_change_policy")
@@ -21192,6 +21216,8 @@ open class TeamLog {
2119221216
return EventTypeArg.fileCommentsChangePolicy
2119321217
case "file_locking_policy_changed":
2119421218
return EventTypeArg.fileLockingPolicyChanged
21219+
case "file_provider_migration_policy_changed":
21220+
return EventTypeArg.fileProviderMigrationPolicyChanged
2119521221
case "file_requests_change_policy":
2119621222
return EventTypeArg.fileRequestsChangePolicy
2119721223
case "file_requests_emails_enabled":
@@ -23700,6 +23726,72 @@ open class TeamLog {
2370023726
}
2370123727
}
2370223728

23729+
/// Changed File Provider Migration policy for team.
23730+
open class FileProviderMigrationPolicyChangedDetails: CustomStringConvertible {
23731+
/// To.
23732+
public let newValue: TeamPolicies.FileProviderMigrationPolicyState
23733+
/// From.
23734+
public let previousValue: TeamPolicies.FileProviderMigrationPolicyState
23735+
public init(newValue: TeamPolicies.FileProviderMigrationPolicyState, previousValue: TeamPolicies.FileProviderMigrationPolicyState) {
23736+
self.newValue = newValue
23737+
self.previousValue = previousValue
23738+
}
23739+
open var description: String {
23740+
return "\(SerializeUtil.prepareJSONForSerialization(FileProviderMigrationPolicyChangedDetailsSerializer().serialize(self)))"
23741+
}
23742+
}
23743+
open class FileProviderMigrationPolicyChangedDetailsSerializer: JSONSerializer {
23744+
public init() { }
23745+
open func serialize(_ value: FileProviderMigrationPolicyChangedDetails) -> JSON {
23746+
let output = [
23747+
"new_value": TeamPolicies.FileProviderMigrationPolicyStateSerializer().serialize(value.newValue),
23748+
"previous_value": TeamPolicies.FileProviderMigrationPolicyStateSerializer().serialize(value.previousValue),
23749+
]
23750+
return .dictionary(output)
23751+
}
23752+
open func deserialize(_ json: JSON) -> FileProviderMigrationPolicyChangedDetails {
23753+
switch json {
23754+
case .dictionary(let dict):
23755+
let newValue = TeamPolicies.FileProviderMigrationPolicyStateSerializer().deserialize(dict["new_value"] ?? .null)
23756+
let previousValue = TeamPolicies.FileProviderMigrationPolicyStateSerializer().deserialize(dict["previous_value"] ?? .null)
23757+
return FileProviderMigrationPolicyChangedDetails(newValue: newValue, previousValue: previousValue)
23758+
default:
23759+
fatalError("Type error deserializing")
23760+
}
23761+
}
23762+
}
23763+
23764+
/// The FileProviderMigrationPolicyChangedType struct
23765+
open class FileProviderMigrationPolicyChangedType: CustomStringConvertible {
23766+
/// (no description)
23767+
public let description_: String
23768+
public init(description_: String) {
23769+
stringValidator()(description_)
23770+
self.description_ = description_
23771+
}
23772+
open var description: String {
23773+
return "\(SerializeUtil.prepareJSONForSerialization(FileProviderMigrationPolicyChangedTypeSerializer().serialize(self)))"
23774+
}
23775+
}
23776+
open class FileProviderMigrationPolicyChangedTypeSerializer: JSONSerializer {
23777+
public init() { }
23778+
open func serialize(_ value: FileProviderMigrationPolicyChangedType) -> JSON {
23779+
let output = [
23780+
"description": Serialization._StringSerializer.serialize(value.description_),
23781+
]
23782+
return .dictionary(output)
23783+
}
23784+
open func deserialize(_ json: JSON) -> FileProviderMigrationPolicyChangedType {
23785+
switch json {
23786+
case .dictionary(let dict):
23787+
let description_ = Serialization._StringSerializer.deserialize(dict["description"] ?? .null)
23788+
return FileProviderMigrationPolicyChangedType(description_: description_)
23789+
default:
23790+
fatalError("Type error deserializing")
23791+
}
23792+
}
23793+
}
23794+
2370323795
/// Renamed files and/or folders.
2370423796
open class FileRenameDetails: CustomStringConvertible {
2370523797
/// Relocate action details.
@@ -48903,6 +48995,8 @@ open class TeamLog {
4890348995
/// An unspecified error.
4890448996
case full
4890548997
/// An unspecified error.
48998+
case guest
48999+
/// An unspecified error.
4890649000
case other
4890749001

4890849002
public var description: String {
@@ -48921,6 +49015,10 @@ open class TeamLog {
4892149015
var d = [String: JSON]()
4892249016
d[".tag"] = .str("full")
4892349017
return .dictionary(d)
49018+
case .guest:
49019+
var d = [String: JSON]()
49020+
d[".tag"] = .str("guest")
49021+
return .dictionary(d)
4892449022
case .other:
4892549023
var d = [String: JSON]()
4892649024
d[".tag"] = .str("other")
@@ -48936,6 +49034,8 @@ open class TeamLog {
4893649034
return TeamMembershipType.free
4893749035
case "full":
4893849036
return TeamMembershipType.full
49037+
case "guest":
49038+
return TeamMembershipType.guest
4893949039
case "other":
4894049040
return TeamMembershipType.other
4894149041
default:

0 commit comments

Comments
 (0)