59 lines
1.9 KiB
Swift
Generated
59 lines
1.9 KiB
Swift
Generated
///
|
|
/// HybridHaptikaHealthKitSpec.swift
|
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
/// https://github.com/mrousavy/nitro
|
|
/// Copyright © Marc Rousavy @ Margelo
|
|
///
|
|
|
|
import NitroModules
|
|
|
|
/// See ``HybridHaptikaHealthKitSpec``
|
|
public protocol HybridHaptikaHealthKitSpec_protocol: HybridObject {
|
|
// Properties
|
|
|
|
|
|
// Methods
|
|
func isAvailable() throws -> Bool
|
|
func requestReadAuthorization() throws -> Promise<Bool>
|
|
func fetchContext(lookbackDays: Double) throws -> Promise<NativeHealthKitContext>
|
|
func fetchLatestHeartbeatSeries() throws -> Promise<NativeHeartbeatSeriesSummary?>
|
|
}
|
|
|
|
public extension HybridHaptikaHealthKitSpec_protocol {
|
|
/// Default implementation of ``HybridObject.toString``
|
|
func toString() -> String {
|
|
return "[HybridObject HaptikaHealthKit]"
|
|
}
|
|
}
|
|
|
|
/// See ``HybridHaptikaHealthKitSpec``
|
|
open class HybridHaptikaHealthKitSpec_base {
|
|
private weak var cxxWrapper: HybridHaptikaHealthKitSpec_cxx? = nil
|
|
public init() { }
|
|
public func getCxxWrapper() -> HybridHaptikaHealthKitSpec_cxx {
|
|
#if DEBUG
|
|
guard self is any HybridHaptikaHealthKitSpec else {
|
|
fatalError("`self` is not a `HybridHaptikaHealthKitSpec`! Did you accidentally inherit from `HybridHaptikaHealthKitSpec_base` instead of `HybridHaptikaHealthKitSpec`?")
|
|
}
|
|
#endif
|
|
if let cxxWrapper = self.cxxWrapper {
|
|
return cxxWrapper
|
|
} else {
|
|
let cxxWrapper = HybridHaptikaHealthKitSpec_cxx(self as! any HybridHaptikaHealthKitSpec)
|
|
self.cxxWrapper = cxxWrapper
|
|
return cxxWrapper
|
|
}
|
|
}
|
|
}
|
|
|
|
/**
|
|
* A Swift base-protocol representing the HaptikaHealthKit HybridObject.
|
|
* Implement this protocol to create Swift-based instances of HaptikaHealthKit.
|
|
* ```swift
|
|
* class HybridHaptikaHealthKit : HybridHaptikaHealthKitSpec {
|
|
* // ...
|
|
* }
|
|
* ```
|
|
*/
|
|
public typealias HybridHaptikaHealthKitSpec = HybridHaptikaHealthKitSpec_protocol & HybridHaptikaHealthKitSpec_base
|