mirror of
https://github.com/home-assistant/iOS.git
synced 2026-02-05 06:05:56 -06:00
Adds code coverage reports to pull requests. Enabling code coverage gathering appears to be about a 25% increase in build time, unfortunately, so just enabling it for the App/Shared targets and doing it in a separate scheme so it doesn't impact local build times.
26 lines
709 B
Swift
26 lines
709 B
Swift
import Foundation
|
|
import PromiseKit
|
|
import UserNotifications
|
|
|
|
public struct WebhookResponseIdentifier: RawRepresentable, Hashable, Codable {
|
|
public let rawValue: String
|
|
public init(rawValue: String) {
|
|
self.rawValue = rawValue
|
|
}
|
|
}
|
|
|
|
public struct WebhookResponseHandlerResult {
|
|
static var `default`: Self { .init() }
|
|
public var notification: UNNotificationRequest?
|
|
}
|
|
|
|
public protocol WebhookResponseHandler {
|
|
static func shouldReplace(request current: WebhookRequest, with proposed: WebhookRequest) -> Bool
|
|
|
|
init(api: HomeAssistantAPI)
|
|
func handle(
|
|
request: Promise<WebhookRequest>,
|
|
result: Promise<Any>
|
|
) -> Guarantee<WebhookResponseHandlerResult>
|
|
}
|