Files
openclaw/apps/shared/OpenClawKit/Sources/OpenClawKit/HealthCommands.swift
Peter Steinberger 5e45ebe82b feat(ios): add private HealthKit summaries (#105616)
* feat(ios): add private HealthKit summaries

* fix(ios): satisfy Health settings lint

* chore(ios): sync Health localization artifacts

* chore(ios): refresh generated localization and docs

* fix(ios): reject partial Health history

* chore(ios): sync Health string catalogs

* fix(ios): bridge Health authorization dates

* fix(ios): scope Health summaries to today
2026-07-12 12:52:38 -07:00

52 lines
1.5 KiB
Swift

import Foundation
public enum OpenClawHealthCommand: String, Codable, Sendable {
case summary = "health.summary"
}
public enum OpenClawHealthSummaryPeriod: String, Codable, Sendable, CaseIterable {
case today
}
public struct OpenClawHealthSummaryParams: Codable, Sendable, Equatable {
public var period: OpenClawHealthSummaryPeriod
public init(period: OpenClawHealthSummaryPeriod) {
self.period = period
}
}
public struct OpenClawHealthSummaryPayload: Codable, Sendable, Equatable {
public var period: OpenClawHealthSummaryPeriod
public var startISO: String
public var endISO: String
public var timeZoneIdentifier: String
public var stepCount: Int?
public var sleepDurationMinutes: Int?
public var restingHeartRateBpm: Double?
public var workoutCount: Int?
public var workoutDurationMinutes: Int?
public init(
period: OpenClawHealthSummaryPeriod,
startISO: String,
endISO: String,
timeZoneIdentifier: String,
stepCount: Int?,
sleepDurationMinutes: Int?,
restingHeartRateBpm: Double?,
workoutCount: Int?,
workoutDurationMinutes: Int?)
{
self.period = period
self.startISO = startISO
self.endISO = endISO
self.timeZoneIdentifier = timeZoneIdentifier
self.stepCount = stepCount
self.sleepDurationMinutes = sleepDurationMinutes
self.restingHeartRateBpm = restingHeartRateBpm
self.workoutCount = workoutCount
self.workoutDurationMinutes = workoutDurationMinutes
}
}