Cotton code
37 lines · 2.1 KB · SwiftRaw
// Cotton Health's core methods (`crates/cotton-ffi/src/phone/health.rs`): what// the HealthKit reader asks the core, and the export a door hands it.extension CottonMethod {    /// `health.types {}` — `{types: [{healthkit, kind, unit?, sends, statistics?}]}`:    /// every HealthKit type to ask READ access to, and what is sent for each.    public static let healthTypes = "health.types"    /// `health.anchor {type}` — `{type, anchor}`, this device's kept anchor    /// for the type (base64 of the archived `HKQueryAnchor`), null when none.    public static let healthAnchor = "health.anchor"    /// `health.held {type}` — `{type, from, to}`, the first and last day this    /// copy holds of the metrics the type feeds (null when none): what the    /// reader reads again when HealthKit reports a deletion.    public static let healthHeld = "health.held"    /// `health.land {source?, days, intervals, workouts, measurements, deleted, anchors?}`    /// — `{put, removed}`; refused whole as `seal_key_missing` until this    /// device holds the data key, and its anchors kept only once it landed.    public static let healthLand = "health.land"    /// `health.readExport {path}` — Apple Health's export.zip or export.xml    /// read in place: `{read, skipped, put, days, workouts, measurements}`.    public static let healthReadExport = "health.readExport"    // Cotton Health's screens (`cotton_ffi::phone::health_app`, shapes in    // `cotton_core::health::app::shapes`): every answer the app draws.    public static let healthLook = "health.look"    public static let healthPeople = "health.people"    public static let healthLabs = "health.labs"    public static let healthParameter = "health.parameter"    public static let healthReports = "health.reports"    public static let healthReport = "health.report"    public static let healthBody = "health.body"    public static let healthMetric = "health.metric"    public static let healthSettings = "health.settings"    public static let healthAddReport = "health.addReport"    public static let healthAddPerson = "health.addPerson"    public static let healthAct = "health.act"}