Skip to content

Commit

Permalink
Merge pull request #46 from tink-ab/release-changes-2.0.0
Browse files Browse the repository at this point in the history
Tink Core 2.0.0 release
  • Loading branch information
belous committed Jun 20, 2023
2 parents 22429d2 + 8d8e42b commit 038b766
Show file tree
Hide file tree
Showing 54 changed files with 2,845 additions and 24,874 deletions.
6 changes: 3 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import PackageDescription
let package = Package(
name: "TinkCore",
platforms: [
.iOS(.v11),
.macOS(.v10_13)
.iOS(.v13),
.macOS(.v11)
],
products: [
.library(
Expand All @@ -18,7 +18,7 @@ let package = Package(
targets: [
.binaryTarget(
name: "TinkCore",
url: "https://github.com/tink-ab/tink-core-ios/releases/download/1.11.1/TinkCore.xcframework.zip", checksum: "014b351b4a0263cb05baf93cf332f2b471f940e270fa7e2337fbe5d6502dc20e"
url: "https://github.com/tink-ab/tink-core-ios/releases/download/2.0.0/TinkCore.xcframework.zip", checksum: "b6f61c67ed2dac2fcca3a75253dd642285d002eb88cd5d7986d789f818814be7"
),
]
)

This file was deleted.

33 changes: 0 additions & 33 deletions Sources/TinkCore/AIS/Deprecations/Provider+Deprecations.swift

This file was deleted.

33 changes: 0 additions & 33 deletions Sources/TinkCore/AIS/REST/Services/RESTCredentialService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -74,30 +74,6 @@ final class RESTCredentialsService: CredentialsService {
return client.performRequest(request)
}

@available(*, deprecated, message: "Use refresh(id:authenticate:refreshableItems:appURI:callbackURI:optIn:completion:) method instead.")
@discardableResult
func refresh(id: Credentials.ID, authenticate: Bool, refreshableItems: RefreshableItems, optIn: Bool, completion: @escaping (Result<Void, Error>) -> Void) -> RetryCancellable? {
var parameters: [URLQueryItem]
if refreshableItems != .all {
parameters = refreshableItems.strings.map { .init(name: "items", value: $0) }
} else {
parameters = []
}

if authenticate {
parameters.append(.init(name: "authenticate", value: "true"))
}

if optIn {
parameters.append(.init(name: "optIn", value: "true"))
}

let request = RESTSimpleRequest(path: "/api/v1/credentials/\(id.value)/refresh", method: .post, contentType: .json, parameters: parameters) { result in
completion(result.map { _ in })
}
return client.performRequest(request)
}

@discardableResult
func refresh(id: Credentials.ID, authenticate: Bool, refreshableItems: RefreshableItems, appURI: URL?, callbackURI: URL?, optIn: Bool, completion: @escaping (Result<Void, Error>) -> Void) -> RetryCancellable? {
refresh(id: id, authenticate: authenticate, refreshableItems: refreshableItems, appURI: appURI, callbackURI: callbackURI, optIn: optIn, products: [], completion: completion)
Expand Down Expand Up @@ -171,15 +147,6 @@ final class RESTCredentialsService: CredentialsService {
return client.performRequest(request)
}

@available(*, deprecated, message: "Use authenticate(id:appURI:callbackURI:completion:) method instead.")
@discardableResult
func authenticate(id: Credentials.ID, completion: @escaping (Result<Void, Error>) -> Void) -> RetryCancellable? {
let request = RESTSimpleRequest(path: "/api/v1/credentials/\(id.value)/authenticate", method: .post, contentType: .json) { result in
completion(result.map { _ in })
}
return client.performRequest(request)
}

@discardableResult
func authenticate(id: Credentials.ID, appURI: URL?, callbackURI: URL?, completion: @escaping (Result<Void, Error>) -> Void) -> RetryCancellable? {
authenticate(id: id, appURI: appURI, callbackURI: callbackURI, products: [], completion: completion)
Expand Down
4 changes: 0 additions & 4 deletions Sources/TinkCore/AIS/Services/CredentialsService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,13 @@ public protocol CredentialsService {
func delete(id: Credentials.ID, completion: @escaping (Result<Void, Error>) -> Void) -> RetryCancellable?
func update(id: Credentials.ID, providerName: Provider.Name, appURI: URL?, callbackURI: URL?, fields: [String: String], completion: @escaping (Result<Credentials, Error>) -> Void) -> RetryCancellable?
func update(id: Credentials.ID, providerName: Provider.Name, appURI: URL?, callbackURI: URL?, fields: [String: String], products: [Product], completion: @escaping (Result<Credentials, Error>) -> Void) -> RetryCancellable?
@available(*, deprecated)
func refresh(id: Credentials.ID, authenticate: Bool, refreshableItems: RefreshableItems, optIn: Bool, completion: @escaping (Result<Void, Error>) -> Void) -> RetryCancellable?
func refresh(id: Credentials.ID, authenticate: Bool, refreshableItems: RefreshableItems, appURI: URL?, callbackURI: URL?, optIn: Bool, completion: @escaping (Result<Void, Error>) -> Void) -> RetryCancellable?
func refresh(id: Credentials.ID, authenticate: Bool, refreshableItems: RefreshableItems, appURI: URL?, callbackURI: URL?, optIn: Bool, products: [Product], completion: @escaping (Result<Void, Error>) -> Void) -> RetryCancellable?
func addSupplementalInformation(id: Credentials.ID, fields: [String: String], completion: @escaping (Result<Void, Error>) -> Void) -> RetryCancellable?
func cancelSupplementalInformation(id: Credentials.ID, completion: @escaping (Result<Void, Error>) -> Void) -> RetryCancellable?
func enable(id: Credentials.ID, completion: @escaping (Result<Void, Error>) -> Void) -> RetryCancellable?
func disable(id: Credentials.ID, completion: @escaping (Result<Void, Error>) -> Void) -> RetryCancellable?
func thirdPartyCallback(state: String, parameters: [String: String], completion: @escaping (Result<Void, Error>) -> Void) -> RetryCancellable?
@available(*, deprecated)
func authenticate(id: Credentials.ID, completion: @escaping (Result<Void, Error>) -> Void) -> RetryCancellable?
func authenticate(id: Credentials.ID, appURI: URL?, callbackURI: URL?, completion: @escaping (Result<Void, Error>) -> Void) -> RetryCancellable?
func authenticate(id: Credentials.ID, appURI: URL?, callbackURI: URL?, products: [Product], completion: @escaping (Result<Void, Error>) -> Void) -> RetryCancellable?
func qrCode(id: Credentials.ID, completion: @escaping (Result<Data, Error>) -> Void) -> RetryCancellable?
Expand Down

0 comments on commit 038b766

Please sign in to comment.