Type Aliases
The following type aliases are available globally.
-
Closure to return any generic type or an BoxSDKError Used to simplify interfaces
Declaration
Swift
public typealias Callback<T> = (Result<T, BoxSDKError>) -> Void
-
The color type used natively on the target platform.
Declaration
Swift
public typealias PlatformColor = UIColor
-
The color type used natively on the target platform.
-
Closure returning either standard TokenInfo object or error. Used for closures of token-related API calls.
Declaration
Swift
public typealias TokenInfoClosure = (Result<TokenInfo, BoxSDKError>) -> Void
-
Represents API request query parameters.
Declaration
Swift
public typealias QueryParameters = [String : QueryParameterConvertible?]
-
Represents HTTP headers for API requests.
Declaration
Swift
public typealias BoxHTTPHeaders = [String : String]
-
Contains access token and its expiration date.
Declaration
Swift
public typealias AccessTokenTuple = (accessToken: String, expiresIn: TimeInterval)
-
Contains unique ID as an identifier for JWT token provider and completion returning either valid access token information or an error.
Declaration
Swift
public typealias DelegatedAuthClosure = (_ uniqueID: String, _ completion: @escaping (Result<AccessTokenTuple, Error>) -> Void) -> Void
-
Closure returning either access token string or error. Used for closures of access token - related API calls.
Declaration
Swift
public typealias AccessTokenClosure = (Result<String, BoxSDKError>) -> Void