summaryrefslogtreecommitdiffhomepage
path: root/ios/MullvadREST/MullvadAPI/APIHandlers/MullvadAPIProxy.swift
diff options
context:
space:
mode:
authorJon Petersson <jon.petersson@mullvad.net>2025-04-08 16:51:28 +0200
committerJon Petersson <jon.petersson@mullvad.net>2025-04-08 16:51:28 +0200
commit9a6938a4a32ecc162cc5afcf15fa636de2f9b9fe (patch)
treeb19fdb5f1a4b299de54d323965be32a3756270d6 /ios/MullvadREST/MullvadAPI/APIHandlers/MullvadAPIProxy.swift
parent5a53a0479d33d9cdab1f3859706fb2ff776ee56a (diff)
parent4ae7d50075a6e82a0d1edabf26ce13d9357479cb (diff)
downloadmullvadvpn-9a6938a4a32ecc162cc5afcf15fa636de2f9b9fe.tar.xz
mullvadvpn-9a6938a4a32ecc162cc5afcf15fa636de2f9b9fe.zip
Merge branch 'use-mullvad-api-instead-of-urlsession-in-accounts-proxy-ios-982'
Diffstat (limited to 'ios/MullvadREST/MullvadAPI/APIHandlers/MullvadAPIProxy.swift')
-rw-r--r--ios/MullvadREST/MullvadAPI/APIHandlers/MullvadAPIProxy.swift31
1 files changed, 31 insertions, 0 deletions
diff --git a/ios/MullvadREST/MullvadAPI/APIHandlers/MullvadAPIProxy.swift b/ios/MullvadREST/MullvadAPI/APIHandlers/MullvadAPIProxy.swift
index be478ecb59..5d2555f07f 100644
--- a/ios/MullvadREST/MullvadAPI/APIHandlers/MullvadAPIProxy.swift
+++ b/ios/MullvadREST/MullvadAPI/APIHandlers/MullvadAPIProxy.swift
@@ -11,6 +11,37 @@ import MullvadTypes
import Operations
import WireGuardKitTypes
+public protocol APIQuerying: Sendable {
+ func getAddressList(
+ retryStrategy: REST.RetryStrategy,
+ completionHandler: @escaping @Sendable ProxyCompletionHandler<[AnyIPEndpoint]>
+ ) -> Cancellable
+
+ func getRelays(
+ etag: String?,
+ retryStrategy: REST.RetryStrategy,
+ completionHandler: @escaping @Sendable ProxyCompletionHandler<REST.ServerRelaysCacheResponse>
+ ) -> Cancellable
+
+ func createApplePayment(
+ accountNumber: String,
+ receiptString: Data
+ ) -> any RESTRequestExecutor<REST.CreateApplePaymentResponse>
+
+ func sendProblemReport(
+ _ body: REST.ProblemReportRequest,
+ retryStrategy: REST.RetryStrategy,
+ completionHandler: @escaping @Sendable ProxyCompletionHandler<Void>
+ ) -> Cancellable
+
+ func submitVoucher(
+ voucherCode: String,
+ accountNumber: String,
+ retryStrategy: REST.RetryStrategy,
+ completionHandler: @escaping @Sendable ProxyCompletionHandler<REST.SubmitVoucherResponse>
+ ) -> Cancellable
+}
+
extension REST {
public final class MullvadAPIProxy: APIQuerying, @unchecked Sendable {
let transportProvider: APITransportProviderProtocol