Skip to content
Snippets Groups Projects
Commit 8ecdb3b5 authored by Dariusz Rybicki's avatar Dariusz Rybicki
Browse files

Update GetNotificationsReport

parent 72fb2e38
No related branches found
No related tags found
2 merge requests!139Update Bindings,!102Release 1.0.0
...@@ -2,35 +2,31 @@ import Bindings ...@@ -2,35 +2,31 @@ import Bindings
import XCTestDynamicOverlay import XCTestDynamicOverlay
public struct GetNotificationsReport { public struct GetNotificationsReport {
public var run: (Int, String, Data) throws -> NotificationReport public var run: (String, MessageServiceList) throws -> NotificationReport
public func callAsFunction( public func callAsFunction(
e2eId: Int,
notificationCSV: String, notificationCSV: String,
marshaledServices: Data services: MessageServiceList
) throws -> NotificationReport { ) throws -> NotificationReport {
try run(e2eId, notificationCSV, marshaledServices) try run(notificationCSV, services)
} }
} }
extension GetNotificationsReport { extension GetNotificationsReport {
public static func live() -> GetNotificationsReport { public static let live = GetNotificationsReport { notificationCSV, services in
GetNotificationsReport { e2eId, notificationCSV, marshaledServices in var error: NSError?
var error: NSError? let result = BindingsGetNotificationsReport(
let result = BindingsGetNotificationsReport( notificationCSV,
e2eId, try services.encode(),
notificationCSV, &error
marshaledServices, )
&error if let error = error {
) throw error
if let error = error {
throw error
}
guard let result = result else {
fatalError("BindingsGetNotificationsReport returned nil without providing error")
}
return try NotificationReport.decode(result)
} }
guard let result = result else {
fatalError("BindingsGetNotificationsReport returned nil without providing error")
}
return try NotificationReport.decode(result)
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment