mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-19 09:38:39 +00:00
iOS: add Apple Watch companion message MVP (#20054)
Merged via /review-pr -> /prepare-pr -> /merge-pr.
Prepared head SHA: 720791ae6b
Co-authored-by: mbelinky <132747814+mbelinky@users.noreply.github.com>
Co-authored-by: mbelinky <132747814+mbelinky@users.noreply.github.com>
Reviewed-by: @mbelinky
This commit is contained in:
@@ -7,6 +7,7 @@ public enum OpenClawCapability: String, Codable, Sendable {
|
||||
case voiceWake
|
||||
case location
|
||||
case device
|
||||
case watch
|
||||
case photos
|
||||
case contacts
|
||||
case calendar
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
import Foundation
|
||||
|
||||
public enum OpenClawWatchCommand: String, Codable, Sendable {
|
||||
case status = "watch.status"
|
||||
case notify = "watch.notify"
|
||||
}
|
||||
|
||||
public struct OpenClawWatchStatusPayload: Codable, Sendable, Equatable {
|
||||
public var supported: Bool
|
||||
public var paired: Bool
|
||||
public var appInstalled: Bool
|
||||
public var reachable: Bool
|
||||
public var activationState: String
|
||||
|
||||
public init(
|
||||
supported: Bool,
|
||||
paired: Bool,
|
||||
appInstalled: Bool,
|
||||
reachable: Bool,
|
||||
activationState: String)
|
||||
{
|
||||
self.supported = supported
|
||||
self.paired = paired
|
||||
self.appInstalled = appInstalled
|
||||
self.reachable = reachable
|
||||
self.activationState = activationState
|
||||
}
|
||||
}
|
||||
|
||||
public struct OpenClawWatchNotifyParams: Codable, Sendable, Equatable {
|
||||
public var title: String
|
||||
public var body: String
|
||||
public var priority: OpenClawNotificationPriority?
|
||||
|
||||
public init(title: String, body: String, priority: OpenClawNotificationPriority? = nil) {
|
||||
self.title = title
|
||||
self.body = body
|
||||
self.priority = priority
|
||||
}
|
||||
}
|
||||
|
||||
public struct OpenClawWatchNotifyPayload: Codable, Sendable, Equatable {
|
||||
public var deliveredImmediately: Bool
|
||||
public var queuedForDelivery: Bool
|
||||
public var transport: String
|
||||
|
||||
public init(deliveredImmediately: Bool, queuedForDelivery: Bool, transport: String) {
|
||||
self.deliveredImmediately = deliveredImmediately
|
||||
self.queuedForDelivery = queuedForDelivery
|
||||
self.transport = transport
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user