@tryterra/react-native 0.0.0-stage → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +142 -2
- package/TerraReactNative.podspec +48 -0
- package/android/build.gradle +87 -0
- package/android/src/bridgeCore/kotlin/README.md +1 -0
- package/android/src/bridgeCore/kotlin/co/tryterra/sdk/bridge/BridgeBootstrap.kt +133 -0
- package/android/src/bridgeCore/kotlin/co/tryterra/sdk/bridge/BridgeHost.kt +32 -0
- package/android/src/bridgeCore/kotlin/co/tryterra/sdk/bridge/Conversions.kt +557 -0
- package/android/src/bridgeCore/kotlin/co/tryterra/sdk/bridge/LauncherSlots.kt +41 -0
- package/android/src/bridgeCore/kotlin/co/tryterra/sdk/bridge/ReadConversions.kt +250 -0
- package/android/src/bridgeCore/kotlin/co/tryterra/sdk/bridge/Rejections.kt +150 -0
- package/android/src/bridgeCore/kotlin/co/tryterra/sdk/bridge/StreamRegistry.kt +77 -0
- package/android/src/bridgeCore/kotlin/co/tryterra/sdk/bridge/TerraBridge.kt +86 -0
- package/android/src/bridgeCore/kotlin/co/tryterra/sdk/bridge/TerraBridgeOpsImpl.kt +300 -0
- package/android/src/bridgeCore/kotlin/co/tryterra/sdk/bridge/TerraBridgeStreamsImpl.kt +50 -0
- package/android/src/bridgeCore/kotlin/co/tryterra/sdk/bridge/TokenBroker.kt +198 -0
- package/android/src/bridgeCore/kotlin/co/tryterra/sdk/bridge/generated/BridgeErrors.kt +217 -0
- package/android/src/bridgeCore/kotlin/co/tryterra/sdk/bridge/generated/BridgeOps.kt +582 -0
- package/android/src/bridgeCore/kotlin/co/tryterra/sdk/bridge/generated/BridgeTypes.kt +1569 -0
- package/android/src/healthConnectOnly/kotlin/co/tryterra/sdk/reactnative/TerraStores.kt +11 -0
- package/android/src/main/AndroidManifest.xml +24 -0
- package/android/src/main/java/co/tryterra/sdk/reactnative/TerraBridgeModule.kt +96 -0
- package/android/src/main/java/co/tryterra/sdk/reactnative/TerraReactNativePackage.kt +26 -0
- package/android/src/main/java/co/tryterra/sdk/reactnative/TerraStartup.kt +46 -0
- package/android/src/samsung/kotlin/co/tryterra/sdk/reactnative/TerraStores.kt +13 -0
- package/docs/availability.md +396 -0
- package/frameworks/TerraSDK.xcframework/Info.plist +48 -0
- package/frameworks/TerraSDK.xcframework/ios-arm64/TerraSDK.framework/Info.plist +0 -0
- package/frameworks/TerraSDK.xcframework/ios-arm64/TerraSDK.framework/Modules/TerraSDK.swiftmodule/arm64-apple-ios.abi.json +82672 -0
- package/frameworks/TerraSDK.xcframework/ios-arm64/TerraSDK.framework/Modules/TerraSDK.swiftmodule/arm64-apple-ios.package.swiftinterface +2186 -0
- package/frameworks/TerraSDK.xcframework/ios-arm64/TerraSDK.framework/Modules/TerraSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +2186 -0
- package/frameworks/TerraSDK.xcframework/ios-arm64/TerraSDK.framework/Modules/TerraSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/frameworks/TerraSDK.xcframework/ios-arm64/TerraSDK.framework/Modules/TerraSDK.swiftmodule/arm64-apple-ios.swiftinterface +2163 -0
- package/frameworks/TerraSDK.xcframework/ios-arm64/TerraSDK.framework/PrivacyInfo.xcprivacy +96 -0
- package/frameworks/TerraSDK.xcframework/ios-arm64/TerraSDK.framework/TerraSDK +0 -0
- package/frameworks/TerraSDK.xcframework/ios-arm64/dSYMs/TerraSDK.framework.dSYM/Contents/Info.plist +20 -0
- package/frameworks/TerraSDK.xcframework/ios-arm64/dSYMs/TerraSDK.framework.dSYM/Contents/Resources/DWARF/TerraSDK +0 -0
- package/frameworks/TerraSDK.xcframework/ios-arm64/dSYMs/TerraSDK.framework.dSYM/Contents/Resources/Relocations/aarch64/TerraSDK.yml +6594 -0
- package/frameworks/TerraSDK.xcframework/ios-arm64_x86_64-simulator/TerraSDK.framework/Info.plist +0 -0
- package/frameworks/TerraSDK.xcframework/ios-arm64_x86_64-simulator/TerraSDK.framework/Modules/TerraSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +82672 -0
- package/frameworks/TerraSDK.xcframework/ios-arm64_x86_64-simulator/TerraSDK.framework/Modules/TerraSDK.swiftmodule/arm64-apple-ios-simulator.package.swiftinterface +2186 -0
- package/frameworks/TerraSDK.xcframework/ios-arm64_x86_64-simulator/TerraSDK.framework/Modules/TerraSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +2186 -0
- package/frameworks/TerraSDK.xcframework/ios-arm64_x86_64-simulator/TerraSDK.framework/Modules/TerraSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/frameworks/TerraSDK.xcframework/ios-arm64_x86_64-simulator/TerraSDK.framework/Modules/TerraSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +2163 -0
- package/frameworks/TerraSDK.xcframework/ios-arm64_x86_64-simulator/TerraSDK.framework/Modules/TerraSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +82672 -0
- package/frameworks/TerraSDK.xcframework/ios-arm64_x86_64-simulator/TerraSDK.framework/Modules/TerraSDK.swiftmodule/x86_64-apple-ios-simulator.package.swiftinterface +2186 -0
- package/frameworks/TerraSDK.xcframework/ios-arm64_x86_64-simulator/TerraSDK.framework/Modules/TerraSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +2186 -0
- package/frameworks/TerraSDK.xcframework/ios-arm64_x86_64-simulator/TerraSDK.framework/Modules/TerraSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/frameworks/TerraSDK.xcframework/ios-arm64_x86_64-simulator/TerraSDK.framework/Modules/TerraSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +2163 -0
- package/frameworks/TerraSDK.xcframework/ios-arm64_x86_64-simulator/TerraSDK.framework/PrivacyInfo.xcprivacy +96 -0
- package/frameworks/TerraSDK.xcframework/ios-arm64_x86_64-simulator/TerraSDK.framework/TerraSDK +0 -0
- package/frameworks/TerraSDK.xcframework/ios-arm64_x86_64-simulator/TerraSDK.framework/_CodeSignature/CodeResources +223 -0
- package/frameworks/TerraSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/TerraSDK.framework.dSYM/Contents/Info.plist +20 -0
- package/frameworks/TerraSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/TerraSDK.framework.dSYM/Contents/Resources/DWARF/TerraSDK +0 -0
- package/frameworks/TerraSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/TerraSDK.framework.dSYM/Contents/Resources/Relocations/aarch64/TerraSDK.yml +6595 -0
- package/frameworks/TerraSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/TerraSDK.framework.dSYM/Contents/Resources/Relocations/x86_64/TerraSDK.yml +6513 -0
- package/ios/TerraBridgeCore/BridgeBootstrap.swift +89 -0
- package/ios/TerraBridgeCore/BridgeHost.swift +13 -0
- package/ios/TerraBridgeCore/Conversions+Reads.swift +259 -0
- package/ios/TerraBridgeCore/Conversions.swift +594 -0
- package/ios/TerraBridgeCore/Generated/BridgeErrors.swift +179 -0
- package/ios/TerraBridgeCore/Generated/BridgeOps.swift +967 -0
- package/ios/TerraBridgeCore/Generated/BridgeTypes.swift +2050 -0
- package/ios/TerraBridgeCore/Locked.swift +15 -0
- package/ios/TerraBridgeCore/README.md +1 -0
- package/ios/TerraBridgeCore/Rejections.swift +130 -0
- package/ios/TerraBridgeCore/RuntimeAttachment.swift +60 -0
- package/ios/TerraBridgeCore/StreamRegistry.swift +59 -0
- package/ios/TerraBridgeCore/TerraBridge.swift +122 -0
- package/ios/TerraBridgeCore/TerraBridgeOpsImpl.swift +318 -0
- package/ios/TerraBridgeCore/TerraBridgeStreamsImpl.swift +60 -0
- package/ios/TerraBridgeCore/TokenBroker.swift +147 -0
- package/ios/TerraBridgeModule.mm +79 -0
- package/ios/TerraBridgeModuleImpl.swift +49 -0
- package/ios/TerraReactNative.swift +19 -0
- package/lib/EndUser.d.ts +12 -0
- package/lib/EndUser.js +13 -0
- package/lib/NativeTerraBridge.d.ts +23 -0
- package/lib/NativeTerraBridge.js +13 -0
- package/lib/Terra.d.ts +223 -0
- package/lib/Terra.js +336 -0
- package/lib/TerraError.d.ts +42 -0
- package/lib/TerraError.js +95 -0
- package/lib/createTerra.d.ts +8 -0
- package/lib/createTerra.js +19 -0
- package/lib/generated/client.d.ts +128 -0
- package/lib/generated/client.js +256 -0
- package/lib/generated/codecs.d.ts +219 -0
- package/lib/generated/codecs.js +2066 -0
- package/lib/generated/errors.d.ts +13 -0
- package/lib/generated/errors.js +68 -0
- package/lib/generated/ops.d.ts +13 -0
- package/lib/generated/ops.js +161 -0
- package/lib/generated/streams.d.ts +23 -0
- package/lib/generated/streams.js +58 -0
- package/lib/generated/types.d.ts +794 -0
- package/lib/generated/types.js +224 -0
- package/lib/index.d.ts +29 -0
- package/lib/index.js +55 -0
- package/package.json +71 -4
- package/src/EndUser.ts +15 -0
- package/src/NativeTerraBridge.ts +27 -0
- package/src/Terra.ts +592 -0
- package/src/TerraError.ts +116 -0
- package/src/createTerra.ts +18 -0
- package/src/generated/client.ts +315 -0
- package/src/generated/codecs.ts +1989 -0
- package/src/generated/errors.ts +113 -0
- package/src/generated/ops.ts +233 -0
- package/src/generated/streams.ts +74 -0
- package/src/generated/types.ts +1222 -0
- package/src/index.ts +54 -0
|
@@ -0,0 +1,2186 @@
|
|
|
1
|
+
// swift-interface-format-version: 1.0
|
|
2
|
+
// swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101)
|
|
3
|
+
// swift-module-flags: -target arm64-apple-ios15.0 -enable-objc-interop -enable-library-evolution -swift-version 6 -O -enable-experimental-feature DebugDescriptionMacro -module-name TerraSDK -package-name ios
|
|
4
|
+
// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3
|
|
5
|
+
import BackgroundTasks
|
|
6
|
+
import Compression
|
|
7
|
+
import CoreLocation
|
|
8
|
+
import CryptoKit
|
|
9
|
+
import Foundation
|
|
10
|
+
import Foundation/*.Bundle*/
|
|
11
|
+
import Foundation/*.ProcessInfo*/
|
|
12
|
+
import Foundation/*.URL*/
|
|
13
|
+
import HealthKit
|
|
14
|
+
import Security
|
|
15
|
+
import Swift
|
|
16
|
+
import UIKit
|
|
17
|
+
import WorkoutKit
|
|
18
|
+
import _Concurrency
|
|
19
|
+
import _StringProcessing
|
|
20
|
+
import _SwiftConcurrencyShims
|
|
21
|
+
public struct AthleteProfile : Swift.Sendable, Swift.Equatable {
|
|
22
|
+
public enum BiologicalSex : Swift.String, Swift.Sendable, Swift.Hashable, Swift.CaseIterable {
|
|
23
|
+
case female
|
|
24
|
+
case male
|
|
25
|
+
case other
|
|
26
|
+
case notSet
|
|
27
|
+
public init?(rawValue: Swift.String)
|
|
28
|
+
public typealias AllCases = [TerraSDK.AthleteProfile.BiologicalSex]
|
|
29
|
+
public typealias RawValue = Swift.String
|
|
30
|
+
nonisolated public static var allCases: [TerraSDK.AthleteProfile.BiologicalSex] {
|
|
31
|
+
get
|
|
32
|
+
}
|
|
33
|
+
public var rawValue: Swift.String {
|
|
34
|
+
get
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
public enum ActivityMoveMode : Swift.String, Swift.Sendable, Swift.Hashable, Swift.CaseIterable {
|
|
38
|
+
case activeEnergy
|
|
39
|
+
case appleMoveTime
|
|
40
|
+
public init?(rawValue: Swift.String)
|
|
41
|
+
public typealias AllCases = [TerraSDK.AthleteProfile.ActivityMoveMode]
|
|
42
|
+
public typealias RawValue = Swift.String
|
|
43
|
+
nonisolated public static var allCases: [TerraSDK.AthleteProfile.ActivityMoveMode] {
|
|
44
|
+
get
|
|
45
|
+
}
|
|
46
|
+
public var rawValue: Swift.String {
|
|
47
|
+
get
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
public let biologicalSex: TerraSDK.AthleteProfile.BiologicalSex
|
|
51
|
+
public let dateOfBirth: Foundation.Date?
|
|
52
|
+
public let wheelchairUse: Swift.Bool?
|
|
53
|
+
public let activityMoveMode: TerraSDK.AthleteProfile.ActivityMoveMode?
|
|
54
|
+
public init(biologicalSex: TerraSDK.AthleteProfile.BiologicalSex, dateOfBirth: Foundation.Date? = nil, wheelchairUse: Swift.Bool? = nil, activityMoveMode: TerraSDK.AthleteProfile.ActivityMoveMode? = nil)
|
|
55
|
+
public static func == (a: TerraSDK.AthleteProfile, b: TerraSDK.AthleteProfile) -> Swift.Bool
|
|
56
|
+
}
|
|
57
|
+
public struct LinkRequest : Swift.Sendable, Swift.Equatable {
|
|
58
|
+
public let token: Swift.String
|
|
59
|
+
public let source: TerraSDK.Source
|
|
60
|
+
public let devID: Swift.String
|
|
61
|
+
public let providerUserID: Swift.String
|
|
62
|
+
public let appIdentifier: Swift.String?
|
|
63
|
+
public let devicePublicKey: Swift.String
|
|
64
|
+
public init(token: Swift.String, source: TerraSDK.Source, devID: Swift.String, providerUserID: Swift.String, devicePublicKey: Swift.String, appIdentifier: Swift.String? = nil)
|
|
65
|
+
public static func == (a: TerraSDK.LinkRequest, b: TerraSDK.LinkRequest) -> Swift.Bool
|
|
66
|
+
}
|
|
67
|
+
public enum UploadContentEncoding : Swift.String, Swift.Sendable, Swift.Equatable {
|
|
68
|
+
case gzip
|
|
69
|
+
public init?(rawValue: Swift.String)
|
|
70
|
+
public typealias RawValue = Swift.String
|
|
71
|
+
public var rawValue: Swift.String {
|
|
72
|
+
get
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
public struct UploadRequest : Swift.Sendable, Swift.Equatable {
|
|
76
|
+
public let source: TerraSDK.Source
|
|
77
|
+
public let dataType: TerraSDK.UploadDataType
|
|
78
|
+
public let providerUserID: Swift.String
|
|
79
|
+
public let timestampMilliseconds: Swift.Int64
|
|
80
|
+
public let body: Foundation.Data
|
|
81
|
+
public let contentEncoding: TerraSDK.UploadContentEncoding?
|
|
82
|
+
public let signature: Swift.String
|
|
83
|
+
public init(source: TerraSDK.Source, dataType: TerraSDK.UploadDataType, providerUserID: Swift.String, timestampMilliseconds: Swift.Int64, body: Foundation.Data, signature: Swift.String, contentEncoding: TerraSDK.UploadContentEncoding? = nil)
|
|
84
|
+
public static func == (a: TerraSDK.UploadRequest, b: TerraSDK.UploadRequest) -> Swift.Bool
|
|
85
|
+
}
|
|
86
|
+
public struct LinkGrant : Swift.Sendable, Swift.Equatable {
|
|
87
|
+
public let userID: Swift.String
|
|
88
|
+
public init(userID: Swift.String)
|
|
89
|
+
public static func == (a: TerraSDK.LinkGrant, b: TerraSDK.LinkGrant) -> Swift.Bool
|
|
90
|
+
}
|
|
91
|
+
public struct PlannedWorkoutRequest : Swift.Sendable, Swift.Equatable {
|
|
92
|
+
public let source: TerraSDK.Source
|
|
93
|
+
public let providerUserID: Swift.String
|
|
94
|
+
public let signature: Swift.String
|
|
95
|
+
public let timestampMilliseconds: Swift.Int64
|
|
96
|
+
public init(source: TerraSDK.Source, providerUserID: Swift.String, signature: Swift.String, timestampMilliseconds: Swift.Int64)
|
|
97
|
+
public static func == (a: TerraSDK.PlannedWorkoutRequest, b: TerraSDK.PlannedWorkoutRequest) -> Swift.Bool
|
|
98
|
+
}
|
|
99
|
+
public struct PlannedWorkoutUpdate : Swift.Sendable, Swift.Equatable {
|
|
100
|
+
public enum Change : Swift.Sendable, Swift.Equatable {
|
|
101
|
+
case completed(at: Foundation.Date)
|
|
102
|
+
case deleted
|
|
103
|
+
public static func == (a: TerraSDK.PlannedWorkoutUpdate.Change, b: TerraSDK.PlannedWorkoutUpdate.Change) -> Swift.Bool
|
|
104
|
+
}
|
|
105
|
+
public let id: Swift.String
|
|
106
|
+
public let change: TerraSDK.PlannedWorkoutUpdate.Change
|
|
107
|
+
public let source: TerraSDK.Source
|
|
108
|
+
public let providerUserID: Swift.String
|
|
109
|
+
public let signature: Swift.String
|
|
110
|
+
public let timestampMilliseconds: Swift.Int64
|
|
111
|
+
public let body: Foundation.Data
|
|
112
|
+
public init(id: Swift.String, change: TerraSDK.PlannedWorkoutUpdate.Change, source: TerraSDK.Source, providerUserID: Swift.String, signature: Swift.String, timestampMilliseconds: Swift.Int64, body: Foundation.Data)
|
|
113
|
+
public static func encodedBody(id: Swift.String, change: TerraSDK.PlannedWorkoutUpdate.Change) throws -> Foundation.Data
|
|
114
|
+
public static func == (a: TerraSDK.PlannedWorkoutUpdate, b: TerraSDK.PlannedWorkoutUpdate) -> Swift.Bool
|
|
115
|
+
}
|
|
116
|
+
public protocol TerraBackend : Swift.Sendable {
|
|
117
|
+
func link(_ request: TerraSDK.LinkRequest) async throws -> TerraSDK.LinkGrant
|
|
118
|
+
func upload(_ request: TerraSDK.UploadRequest) async throws
|
|
119
|
+
func backfillRequests(_ request: TerraSDK.BackfillPollRequest) async throws -> [TerraSDK.BackfillDirective]
|
|
120
|
+
func acknowledgeBackfills(_ request: TerraSDK.BackfillAckRequest) async throws
|
|
121
|
+
func sendDiagnostics(_ request: TerraSDK.DiagnosticsRequest) async throws
|
|
122
|
+
func revokeDeviceKey(_ request: TerraSDK.RevokeDeviceKeyRequest) async throws
|
|
123
|
+
func plannedWorkouts(_ request: TerraSDK.PlannedWorkoutRequest) async throws -> [TerraSDK.PlannedWorkout]
|
|
124
|
+
func updatePlannedWorkout(_ request: TerraSDK.PlannedWorkoutUpdate) async throws
|
|
125
|
+
func pendingPlanActions(_ request: TerraSDK.PlanQueueRequest) async throws -> [TerraSDK.PendingPlanAction]
|
|
126
|
+
func acknowledgePlanActions(_ request: TerraSDK.PlanAckRequest) async throws
|
|
127
|
+
func reportScheduledWorkouts(_ request: TerraSDK.ScheduledWorkoutReportRequest) async throws
|
|
128
|
+
}
|
|
129
|
+
extension TerraSDK.TerraBackend {
|
|
130
|
+
public func pendingPlanActions(_ request: TerraSDK.PlanQueueRequest) async throws -> [TerraSDK.PendingPlanAction]
|
|
131
|
+
public func acknowledgePlanActions(_ request: TerraSDK.PlanAckRequest) async throws
|
|
132
|
+
public func reportScheduledWorkouts(_ request: TerraSDK.ScheduledWorkoutReportRequest) async throws
|
|
133
|
+
}
|
|
134
|
+
public protocol SignedRoute : Swift.Sendable {
|
|
135
|
+
static var label: Swift.String { get }
|
|
136
|
+
}
|
|
137
|
+
public enum DiagnosticsRoute : TerraSDK.SignedRoute {
|
|
138
|
+
public static let label: Swift.String
|
|
139
|
+
}
|
|
140
|
+
public enum BackfillAckRoute : TerraSDK.SignedRoute {
|
|
141
|
+
public static let label: Swift.String
|
|
142
|
+
}
|
|
143
|
+
public enum DeviceKeyRevokeRoute : TerraSDK.SignedRoute {
|
|
144
|
+
public static let label: Swift.String
|
|
145
|
+
}
|
|
146
|
+
public enum PlanQueueRoute : TerraSDK.SignedRoute {
|
|
147
|
+
public static let label: Swift.String
|
|
148
|
+
}
|
|
149
|
+
public enum PlanAckRoute : TerraSDK.SignedRoute {
|
|
150
|
+
public static let label: Swift.String
|
|
151
|
+
}
|
|
152
|
+
public enum ScheduledWorkoutReportRoute : TerraSDK.SignedRoute {
|
|
153
|
+
public static let label: Swift.String
|
|
154
|
+
}
|
|
155
|
+
public struct SignedRequest<Route> : Swift.Sendable, Swift.Equatable where Route : TerraSDK.SignedRoute {
|
|
156
|
+
public static var signedLabel: Swift.String {
|
|
157
|
+
get
|
|
158
|
+
}
|
|
159
|
+
public let source: TerraSDK.Source
|
|
160
|
+
public let providerUserID: Swift.String
|
|
161
|
+
public let timestampMilliseconds: Swift.Int64
|
|
162
|
+
public let body: Foundation.Data
|
|
163
|
+
public let signature: Swift.String
|
|
164
|
+
public init(source: TerraSDK.Source, providerUserID: Swift.String, timestampMilliseconds: Swift.Int64, body: Foundation.Data, signature: Swift.String)
|
|
165
|
+
public static func == (a: TerraSDK.SignedRequest<Route>, b: TerraSDK.SignedRequest<Route>) -> Swift.Bool
|
|
166
|
+
}
|
|
167
|
+
public typealias DiagnosticsRequest = TerraSDK.SignedRequest<TerraSDK.DiagnosticsRoute>
|
|
168
|
+
public typealias BackfillAckRequest = TerraSDK.SignedRequest<TerraSDK.BackfillAckRoute>
|
|
169
|
+
public typealias RevokeDeviceKeyRequest = TerraSDK.SignedRequest<TerraSDK.DeviceKeyRevokeRoute>
|
|
170
|
+
public typealias PlanQueueRequest = TerraSDK.SignedRequest<TerraSDK.PlanQueueRoute>
|
|
171
|
+
public typealias PlanAckRequest = TerraSDK.SignedRequest<TerraSDK.PlanAckRoute>
|
|
172
|
+
public typealias ScheduledWorkoutReportRequest = TerraSDK.SignedRequest<TerraSDK.ScheduledWorkoutReportRoute>
|
|
173
|
+
public struct PendingPlanAction : Swift.Sendable, Swift.Equatable, Swift.Decodable {
|
|
174
|
+
public enum Kind : Swift.Sendable, Swift.Equatable {
|
|
175
|
+
case create, update, delete
|
|
176
|
+
case unknown(Swift.String)
|
|
177
|
+
public static func == (a: TerraSDK.PendingPlanAction.Kind, b: TerraSDK.PendingPlanAction.Kind) -> Swift.Bool
|
|
178
|
+
}
|
|
179
|
+
public let actionID: Swift.String
|
|
180
|
+
public let kind: TerraSDK.PendingPlanAction.Kind
|
|
181
|
+
public let plannedWorkoutID: Swift.String
|
|
182
|
+
public let plannedOn: Foundation.DateComponents?
|
|
183
|
+
public let workoutKitID: Swift.String?
|
|
184
|
+
public let completedAt: Foundation.Date?
|
|
185
|
+
public let workout: TerraSDK.WorkoutComposition?
|
|
186
|
+
public let workoutUnreadable: Swift.Bool
|
|
187
|
+
public let unreadable: Swift.Bool
|
|
188
|
+
public init(actionID: Swift.String, kind: TerraSDK.PendingPlanAction.Kind, plannedWorkoutID: Swift.String, plannedOn: Foundation.DateComponents? = nil, workoutKitID: Swift.String? = nil, completedAt: Foundation.Date? = nil, workout: TerraSDK.WorkoutComposition? = nil, workoutUnreadable: Swift.Bool = false, unreadable: Swift.Bool = false)
|
|
189
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
190
|
+
public static func == (a: TerraSDK.PendingPlanAction, b: TerraSDK.PendingPlanAction) -> Swift.Bool
|
|
191
|
+
}
|
|
192
|
+
public struct PlanActionAck : Swift.Sendable, Swift.Equatable {
|
|
193
|
+
public enum Outcome : Swift.Sendable, Swift.Equatable {
|
|
194
|
+
case applied(workoutKitID: Foundation.UUID?)
|
|
195
|
+
case refused(TerraSDK.WorkoutScheduleRefusal)
|
|
196
|
+
public static func == (a: TerraSDK.PlanActionAck.Outcome, b: TerraSDK.PlanActionAck.Outcome) -> Swift.Bool
|
|
197
|
+
}
|
|
198
|
+
public let actionID: Swift.String
|
|
199
|
+
public let outcome: TerraSDK.PlanActionAck.Outcome
|
|
200
|
+
public init(actionID: Swift.String, outcome: TerraSDK.PlanActionAck.Outcome)
|
|
201
|
+
public static func == (a: TerraSDK.PlanActionAck, b: TerraSDK.PlanActionAck) -> Swift.Bool
|
|
202
|
+
}
|
|
203
|
+
public struct LocallyScheduledWorkout : Swift.Sendable, Swift.Equatable {
|
|
204
|
+
public let workoutKitID: Foundation.UUID
|
|
205
|
+
public let plannedOn: Foundation.DateComponents
|
|
206
|
+
public init(workoutKitID: Foundation.UUID, plannedOn: Foundation.DateComponents)
|
|
207
|
+
public static func == (a: TerraSDK.LocallyScheduledWorkout, b: TerraSDK.LocallyScheduledWorkout) -> Swift.Bool
|
|
208
|
+
}
|
|
209
|
+
extension TerraSDK.SignedRequest where Route == TerraSDK.PlanAckRoute {
|
|
210
|
+
public static func encodedBody(acks: [TerraSDK.PlanActionAck]) throws -> Foundation.Data
|
|
211
|
+
}
|
|
212
|
+
extension TerraSDK.SignedRequest where Route == TerraSDK.ScheduledWorkoutReportRoute {
|
|
213
|
+
public static func encodedBody(workouts: [TerraSDK.LocallyScheduledWorkout]) throws -> Foundation.Data
|
|
214
|
+
}
|
|
215
|
+
extension TerraSDK.SignedRequest where Route == TerraSDK.DeviceKeyRevokeRoute {
|
|
216
|
+
public static func encodedBody(publicKeyBase64DER: Swift.String) throws -> Foundation.Data
|
|
217
|
+
}
|
|
218
|
+
public struct BackfillPollRequest : Swift.Sendable, Swift.Equatable {
|
|
219
|
+
public static let signedLabel: Swift.String
|
|
220
|
+
public let source: TerraSDK.Source
|
|
221
|
+
public let providerUserID: Swift.String
|
|
222
|
+
public let timestampMilliseconds: Swift.Int64
|
|
223
|
+
public let signature: Swift.String
|
|
224
|
+
public init(source: TerraSDK.Source, providerUserID: Swift.String, timestampMilliseconds: Swift.Int64, signature: Swift.String)
|
|
225
|
+
public static func == (a: TerraSDK.BackfillPollRequest, b: TerraSDK.BackfillPollRequest) -> Swift.Bool
|
|
226
|
+
}
|
|
227
|
+
public struct BackfillDirective : Swift.Sendable, Swift.Equatable {
|
|
228
|
+
public let dataType: Swift.String
|
|
229
|
+
public let start: Foundation.Date
|
|
230
|
+
public let end: Foundation.Date
|
|
231
|
+
public let reference: Swift.String?
|
|
232
|
+
public init(dataType: Swift.String, start: Foundation.Date, end: Foundation.Date, reference: Swift.String?)
|
|
233
|
+
public static func == (a: TerraSDK.BackfillDirective, b: TerraSDK.BackfillDirective) -> Swift.Bool
|
|
234
|
+
}
|
|
235
|
+
public enum BackgroundSync {
|
|
236
|
+
public static func registerForHostTask(terra: TerraSDK.Terra, source: TerraSDK.Source = .health)
|
|
237
|
+
public static func run(terra: TerraSDK.Terra, source: TerraSDK.Source = .health, within budget: Foundation.TimeInterval = 18) async -> Swift.Bool
|
|
238
|
+
}
|
|
239
|
+
extension TerraSDK.BackgroundSync {
|
|
240
|
+
@discardableResult
|
|
241
|
+
public static func register(terra: TerraSDK.Terra, source: TerraSDK.Source = .health, earliestInterval: Foundation.TimeInterval = 3600) -> Swift.Bool
|
|
242
|
+
}
|
|
243
|
+
public struct BodyReading : Swift.Sendable, Swift.Equatable, Swift.Identifiable {
|
|
244
|
+
public enum Kind : Swift.Sendable, Swift.Equatable, Swift.Hashable {
|
|
245
|
+
case measurement(TerraSDK.BodyMetric, Swift.Double)
|
|
246
|
+
case bloodPressure(systolic: Swift.Double, diastolic: Swift.Double)
|
|
247
|
+
case bloodGlucose(Swift.Double, unit: TerraSDK.BloodGlucoseUnit, mealTime: TerraSDK.GlucoseMealTime? = nil, specimen: TerraSDK.GlucoseSpecimen? = nil)
|
|
248
|
+
case oxygenSaturation(fraction: Swift.Double)
|
|
249
|
+
case temperature(TerraSDK.BodyTemperatureMetric, celsius: Swift.Double)
|
|
250
|
+
case heartRateVariability(TerraSDK.HeartRateVariabilityMetric, milliseconds: Swift.Double)
|
|
251
|
+
case respiratoryRate(breathsPerMinute: Swift.Double)
|
|
252
|
+
case vo2Max(millilitresPerKilogramMinute: Swift.Double, testType: TerraSDK.VO2MaxTestType? = nil)
|
|
253
|
+
case insulinDelivery(internationalUnits: Swift.Double, reason: TerraSDK.InsulinDeliveryReason)
|
|
254
|
+
case electrocardiogram(TerraSDK.Electrocardiogram)
|
|
255
|
+
case heartbeatSeries(beats: [TerraSDK.Heartbeat])
|
|
256
|
+
public var recordType: Swift.String {
|
|
257
|
+
get
|
|
258
|
+
}
|
|
259
|
+
public static func == (a: TerraSDK.BodyReading.Kind, b: TerraSDK.BodyReading.Kind) -> Swift.Bool
|
|
260
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
261
|
+
public var hashValue: Swift.Int {
|
|
262
|
+
get
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
public let id: Foundation.UUID
|
|
266
|
+
public let kind: TerraSDK.BodyReading.Kind
|
|
267
|
+
public let interval: Foundation.DateInterval
|
|
268
|
+
public let source: TerraSDK.SampleSource
|
|
269
|
+
public let userEntered: Swift.Bool
|
|
270
|
+
public let timeZone: Foundation.TimeZone?
|
|
271
|
+
public init(id: Foundation.UUID, kind: TerraSDK.BodyReading.Kind, interval: Foundation.DateInterval, source: TerraSDK.SampleSource, userEntered: Swift.Bool = false, timeZone: Foundation.TimeZone? = nil)
|
|
272
|
+
public static func == (a: TerraSDK.BodyReading, b: TerraSDK.BodyReading) -> Swift.Bool
|
|
273
|
+
public typealias ID = Foundation.UUID
|
|
274
|
+
}
|
|
275
|
+
public enum BodyMetric : Swift.String, Swift.Sendable, Swift.Hashable, Swift.CaseIterable {
|
|
276
|
+
case weight
|
|
277
|
+
case height
|
|
278
|
+
case bodyFatPercentage
|
|
279
|
+
case leanBodyMass
|
|
280
|
+
case bmi
|
|
281
|
+
case waistCircumference
|
|
282
|
+
public var unit: Swift.String {
|
|
283
|
+
get
|
|
284
|
+
}
|
|
285
|
+
public init?(rawValue: Swift.String)
|
|
286
|
+
public typealias AllCases = [TerraSDK.BodyMetric]
|
|
287
|
+
public typealias RawValue = Swift.String
|
|
288
|
+
nonisolated public static var allCases: [TerraSDK.BodyMetric] {
|
|
289
|
+
get
|
|
290
|
+
}
|
|
291
|
+
public var rawValue: Swift.String {
|
|
292
|
+
get
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
public enum BloodGlucoseUnit : Swift.String, Swift.Sendable, Swift.Hashable, Swift.CaseIterable {
|
|
296
|
+
case milligramsPerDecilitre
|
|
297
|
+
case millimolesPerLitre
|
|
298
|
+
public init?(rawValue: Swift.String)
|
|
299
|
+
public typealias AllCases = [TerraSDK.BloodGlucoseUnit]
|
|
300
|
+
public typealias RawValue = Swift.String
|
|
301
|
+
nonisolated public static var allCases: [TerraSDK.BloodGlucoseUnit] {
|
|
302
|
+
get
|
|
303
|
+
}
|
|
304
|
+
public var rawValue: Swift.String {
|
|
305
|
+
get
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
public enum GlucoseMealTime : Swift.String, Swift.Sendable, Swift.Hashable, Swift.CaseIterable {
|
|
309
|
+
case preprandial
|
|
310
|
+
case postprandial
|
|
311
|
+
case unknown
|
|
312
|
+
public init?(rawValue: Swift.String)
|
|
313
|
+
public typealias AllCases = [TerraSDK.GlucoseMealTime]
|
|
314
|
+
public typealias RawValue = Swift.String
|
|
315
|
+
nonisolated public static var allCases: [TerraSDK.GlucoseMealTime] {
|
|
316
|
+
get
|
|
317
|
+
}
|
|
318
|
+
public var rawValue: Swift.String {
|
|
319
|
+
get
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
public enum GlucoseSpecimen : Swift.String, Swift.Sendable, Swift.Hashable, Swift.CaseIterable {
|
|
323
|
+
case capillary
|
|
324
|
+
case interstitial
|
|
325
|
+
case plasma
|
|
326
|
+
case serum
|
|
327
|
+
case tears
|
|
328
|
+
case wholeBlood
|
|
329
|
+
case unknown
|
|
330
|
+
public init?(rawValue: Swift.String)
|
|
331
|
+
public typealias AllCases = [TerraSDK.GlucoseSpecimen]
|
|
332
|
+
public typealias RawValue = Swift.String
|
|
333
|
+
nonisolated public static var allCases: [TerraSDK.GlucoseSpecimen] {
|
|
334
|
+
get
|
|
335
|
+
}
|
|
336
|
+
public var rawValue: Swift.String {
|
|
337
|
+
get
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
public enum BodyTemperatureMetric : Swift.String, Swift.Sendable, Swift.Hashable, Swift.CaseIterable {
|
|
341
|
+
case body
|
|
342
|
+
case basal
|
|
343
|
+
case wrist
|
|
344
|
+
case skin
|
|
345
|
+
public init?(rawValue: Swift.String)
|
|
346
|
+
public typealias AllCases = [TerraSDK.BodyTemperatureMetric]
|
|
347
|
+
public typealias RawValue = Swift.String
|
|
348
|
+
nonisolated public static var allCases: [TerraSDK.BodyTemperatureMetric] {
|
|
349
|
+
get
|
|
350
|
+
}
|
|
351
|
+
public var rawValue: Swift.String {
|
|
352
|
+
get
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
public enum HeartRateVariabilityMetric : Swift.String, Swift.Sendable, Swift.Hashable, Swift.CaseIterable {
|
|
356
|
+
case sdnn
|
|
357
|
+
case rmssd
|
|
358
|
+
public init?(rawValue: Swift.String)
|
|
359
|
+
public typealias AllCases = [TerraSDK.HeartRateVariabilityMetric]
|
|
360
|
+
public typealias RawValue = Swift.String
|
|
361
|
+
nonisolated public static var allCases: [TerraSDK.HeartRateVariabilityMetric] {
|
|
362
|
+
get
|
|
363
|
+
}
|
|
364
|
+
public var rawValue: Swift.String {
|
|
365
|
+
get
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
public enum VO2MaxTestType : Swift.String, Swift.Sendable, Swift.Hashable, Swift.CaseIterable {
|
|
369
|
+
case maxExercise
|
|
370
|
+
case predictedSubMaxExercise
|
|
371
|
+
case predictedNonExercise
|
|
372
|
+
public init?(rawValue: Swift.String)
|
|
373
|
+
public typealias AllCases = [TerraSDK.VO2MaxTestType]
|
|
374
|
+
public typealias RawValue = Swift.String
|
|
375
|
+
nonisolated public static var allCases: [TerraSDK.VO2MaxTestType] {
|
|
376
|
+
get
|
|
377
|
+
}
|
|
378
|
+
public var rawValue: Swift.String {
|
|
379
|
+
get
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
public enum InsulinDeliveryReason : Swift.String, Swift.Sendable, Swift.Hashable, Swift.CaseIterable {
|
|
383
|
+
case basal
|
|
384
|
+
case bolus
|
|
385
|
+
public init?(rawValue: Swift.String)
|
|
386
|
+
public typealias AllCases = [TerraSDK.InsulinDeliveryReason]
|
|
387
|
+
public typealias RawValue = Swift.String
|
|
388
|
+
nonisolated public static var allCases: [TerraSDK.InsulinDeliveryReason] {
|
|
389
|
+
get
|
|
390
|
+
}
|
|
391
|
+
public var rawValue: Swift.String {
|
|
392
|
+
get
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
public struct Electrocardiogram : Swift.Sendable, Swift.Equatable, Swift.Hashable {
|
|
396
|
+
public enum Classification : Swift.String, Swift.Sendable, Swift.CaseIterable {
|
|
397
|
+
case sinusRhythm
|
|
398
|
+
case atrialFibrillation
|
|
399
|
+
case inconclusiveLowHeartRate
|
|
400
|
+
case inconclusiveHighHeartRate
|
|
401
|
+
case inconclusivePoorReading
|
|
402
|
+
case inconclusiveOther
|
|
403
|
+
case notSet
|
|
404
|
+
public init?(rawValue: Swift.String)
|
|
405
|
+
public typealias AllCases = [TerraSDK.Electrocardiogram.Classification]
|
|
406
|
+
public typealias RawValue = Swift.String
|
|
407
|
+
nonisolated public static var allCases: [TerraSDK.Electrocardiogram.Classification] {
|
|
408
|
+
get
|
|
409
|
+
}
|
|
410
|
+
public var rawValue: Swift.String {
|
|
411
|
+
get
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
public enum SymptomsStatus : Swift.String, Swift.Sendable, Swift.CaseIterable {
|
|
415
|
+
case present
|
|
416
|
+
case notPresent
|
|
417
|
+
case notSet
|
|
418
|
+
public init?(rawValue: Swift.String)
|
|
419
|
+
public typealias AllCases = [TerraSDK.Electrocardiogram.SymptomsStatus]
|
|
420
|
+
public typealias RawValue = Swift.String
|
|
421
|
+
nonisolated public static var allCases: [TerraSDK.Electrocardiogram.SymptomsStatus] {
|
|
422
|
+
get
|
|
423
|
+
}
|
|
424
|
+
public var rawValue: Swift.String {
|
|
425
|
+
get
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
public let classification: TerraSDK.Electrocardiogram.Classification
|
|
429
|
+
public let averageHeartRate: Swift.Double?
|
|
430
|
+
public let samplingFrequencyHz: Swift.Double?
|
|
431
|
+
public let symptomsStatus: TerraSDK.Electrocardiogram.SymptomsStatus?
|
|
432
|
+
public init(classification: TerraSDK.Electrocardiogram.Classification, averageHeartRate: Swift.Double? = nil, samplingFrequencyHz: Swift.Double? = nil, symptomsStatus: TerraSDK.Electrocardiogram.SymptomsStatus? = nil)
|
|
433
|
+
public static func == (a: TerraSDK.Electrocardiogram, b: TerraSDK.Electrocardiogram) -> Swift.Bool
|
|
434
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
435
|
+
public var hashValue: Swift.Int {
|
|
436
|
+
get
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
public struct Heartbeat : Swift.Sendable, Swift.Equatable, Swift.Hashable {
|
|
440
|
+
public let millisecondsFromStart: Swift.Int64
|
|
441
|
+
public let precededByGap: Swift.Bool
|
|
442
|
+
public init(millisecondsFromStart: Swift.Int64, precededByGap: Swift.Bool)
|
|
443
|
+
public static func == (a: TerraSDK.Heartbeat, b: TerraSDK.Heartbeat) -> Swift.Bool
|
|
444
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
445
|
+
public var hashValue: Swift.Int {
|
|
446
|
+
get
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
public enum ObservedChange : Swift.Sendable, Swift.Equatable {
|
|
450
|
+
case days(Swift.Set<Foundation.Date>)
|
|
451
|
+
case deferred
|
|
452
|
+
public static func == (a: TerraSDK.ObservedChange, b: TerraSDK.ObservedChange) -> Swift.Bool
|
|
453
|
+
}
|
|
454
|
+
public struct HealthChange : Swift.Sendable, Swift.Equatable, Swift.Hashable {
|
|
455
|
+
public let category: TerraSDK.DataCategory
|
|
456
|
+
public let day: Foundation.Date
|
|
457
|
+
public init(category: TerraSDK.DataCategory, day: Foundation.Date)
|
|
458
|
+
public static func == (a: TerraSDK.HealthChange, b: TerraSDK.HealthChange) -> Swift.Bool
|
|
459
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
460
|
+
public var hashValue: Swift.Int {
|
|
461
|
+
get
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
public struct ObservedWake : Swift.Sendable {
|
|
465
|
+
public let change: TerraSDK.ObservedChange
|
|
466
|
+
public init(_ change: TerraSDK.ObservedChange, acknowledging handler: @escaping @Sendable () -> Swift.Void = {})
|
|
467
|
+
public func acknowledge()
|
|
468
|
+
}
|
|
469
|
+
@_hasMissingDesignatedInitializers final public class Acknowledgement : @unchecked Swift.Sendable {
|
|
470
|
+
public init(_ handler: @escaping @Sendable () -> Swift.Void)
|
|
471
|
+
@objc deinit
|
|
472
|
+
final public func fire()
|
|
473
|
+
}
|
|
474
|
+
public struct DeferredWake : Swift.Sendable, Swift.Equatable {
|
|
475
|
+
public let generation: Swift.Int
|
|
476
|
+
public let version: Swift.Int
|
|
477
|
+
public init(generation: Swift.Int, version: Swift.Int)
|
|
478
|
+
public static func == (a: TerraSDK.DeferredWake, b: TerraSDK.DeferredWake) -> Swift.Bool
|
|
479
|
+
}
|
|
480
|
+
public struct Connection : Swift.Sendable {
|
|
481
|
+
public let source: TerraSDK.Source
|
|
482
|
+
public let userID: Swift.String
|
|
483
|
+
public var workouts: TerraSDK.PlannedWorkouts {
|
|
484
|
+
get
|
|
485
|
+
}
|
|
486
|
+
public static let firstSyncDays: Swift.Int
|
|
487
|
+
@_spi(Testing) @discardableResult
|
|
488
|
+
public func sync(_ dataType: TerraSDK.UploadDataType, backfillDays: Swift.Int = Connection.firstSyncDays) async throws -> TerraSDK.SyncOutcome
|
|
489
|
+
@_spi(Testing) @discardableResult
|
|
490
|
+
public func syncAll(backfillDays: Swift.Int = Connection.firstSyncDays) async -> TerraSDK.BackgroundSyncResult
|
|
491
|
+
public func disconnect() async throws
|
|
492
|
+
}
|
|
493
|
+
public struct BackgroundSyncResult : Swift.Sendable {
|
|
494
|
+
public let outcomes: [TerraSDK.UploadDataType : TerraSDK.SyncOutcome]
|
|
495
|
+
public let failures: [TerraSDK.UploadDataType : TerraSDK.TerraError]
|
|
496
|
+
public let skipped: [TerraSDK.UploadDataType : TerraSDK.BackgroundSyncResult.Skip]
|
|
497
|
+
public enum Skip : Swift.Sendable, Swift.Equatable {
|
|
498
|
+
case alreadyRunning
|
|
499
|
+
case notAuthorized(TerraSDK.TerraError)
|
|
500
|
+
case awaitingConverter
|
|
501
|
+
public static func == (a: TerraSDK.BackgroundSyncResult.Skip, b: TerraSDK.BackgroundSyncResult.Skip) -> Swift.Bool
|
|
502
|
+
}
|
|
503
|
+
public var recordsUploaded: Swift.Int {
|
|
504
|
+
get
|
|
505
|
+
}
|
|
506
|
+
public var windowsSkipped: Swift.Int {
|
|
507
|
+
get
|
|
508
|
+
}
|
|
509
|
+
public var uploadedSomething: Swift.Bool {
|
|
510
|
+
get
|
|
511
|
+
}
|
|
512
|
+
public var hadFailure: Swift.Bool {
|
|
513
|
+
get
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
public struct SyncOutcome : Swift.Sendable, Swift.Equatable {
|
|
517
|
+
public let recordsUploaded: Swift.Int
|
|
518
|
+
public let windowsUploaded: Swift.Int
|
|
519
|
+
public let windowsSkipped: Swift.Int
|
|
520
|
+
public let syncedThrough: Foundation.Date
|
|
521
|
+
public static func == (a: TerraSDK.SyncOutcome, b: TerraSDK.SyncOutcome) -> Swift.Bool
|
|
522
|
+
}
|
|
523
|
+
public protocol DeviceKeyStore : Swift.Sendable {
|
|
524
|
+
func createKey(for source: TerraSDK.Source, generation: Swift.Int) throws -> TerraSDK.DeviceKey
|
|
525
|
+
func existingKey(for source: TerraSDK.Source, generation: Swift.Int) throws -> TerraSDK.DeviceKey?
|
|
526
|
+
func deleteKey(for source: TerraSDK.Source, generation: Swift.Int) throws
|
|
527
|
+
}
|
|
528
|
+
public struct DeviceKey : Swift.Sendable {
|
|
529
|
+
public let publicKeyBase64DER: Swift.String
|
|
530
|
+
public init(publicKeyBase64DER: Swift.String, sign: @escaping @Sendable (Foundation.Data) throws -> Foundation.Data)
|
|
531
|
+
public func signature(over message: Foundation.Data) throws -> Swift.String
|
|
532
|
+
}
|
|
533
|
+
public struct KeychainDeviceKeyStore : TerraSDK.DeviceKeyStore {
|
|
534
|
+
public init(service: Swift.String = "co.tryterra.sdk.devicekey")
|
|
535
|
+
public func createKey(for source: TerraSDK.Source, generation: Swift.Int) throws -> TerraSDK.DeviceKey
|
|
536
|
+
public func existingKey(for source: TerraSDK.Source, generation: Swift.Int) throws -> TerraSDK.DeviceKey?
|
|
537
|
+
public func deleteKey(for source: TerraSDK.Source, generation: Swift.Int) throws
|
|
538
|
+
}
|
|
539
|
+
public struct TerraEvent : Swift.Sendable, Swift.Equatable {
|
|
540
|
+
public let at: Foundation.Date
|
|
541
|
+
public let kind: TerraSDK.TerraEvent.Kind
|
|
542
|
+
public init(at: Foundation.Date, kind: TerraSDK.TerraEvent.Kind)
|
|
543
|
+
public enum Kind : Swift.Sendable, Swift.Equatable {
|
|
544
|
+
case connected(TerraSDK.Source)
|
|
545
|
+
case disconnected(TerraSDK.Source)
|
|
546
|
+
case linkRevoked(TerraSDK.Source)
|
|
547
|
+
case permissionResult(asked: Swift.Set<TerraSDK.DataCategory>, covered: Swift.Set<TerraSDK.DataCategory>)
|
|
548
|
+
case backgroundWake(TerraSDK.Source)
|
|
549
|
+
case backgroundWakeRefused(TerraSDK.Source, code: TerraSDK.TerraEvent.FailureCode)
|
|
550
|
+
case backgroundRefreshUnscheduled(identifier: Swift.String, source: TerraSDK.Source)
|
|
551
|
+
case uploadBatch(TerraSDK.UploadDataType, source: TerraSDK.Source, records: Swift.Int, bytes: Swift.Int)
|
|
552
|
+
case uploadFailed(TerraSDK.UploadDataType, source: TerraSDK.Source, code: TerraSDK.TerraEvent.FailureCode)
|
|
553
|
+
case retryScheduled(TerraSDK.UploadDataType, source: TerraSDK.Source, afterSeconds: Foundation.TimeInterval, attempt: Swift.Int)
|
|
554
|
+
case backfillProgress(TerraSDK.UploadDataType, source: TerraSDK.Source, uploaded: Swift.Int, skipped: Swift.Int)
|
|
555
|
+
case dailyDayTooLarge(source: TerraSDK.Source, day: Foundation.Date, bytes: Swift.Int)
|
|
556
|
+
case sleepWakeDateTooLarge(source: TerraSDK.Source, wakeDate: Foundation.Date, bytes: Swift.Int)
|
|
557
|
+
case serverBackfillQueued(TerraSDK.UploadDataType, source: TerraSDK.Source)
|
|
558
|
+
case serverBackfillCompleted(TerraSDK.UploadDataType, source: TerraSDK.Source, uploaded: Swift.Int)
|
|
559
|
+
case serverBackfillAbandoned(TerraSDK.UploadDataType, source: TerraSDK.Source, code: TerraSDK.TerraEvent.FailureCode)
|
|
560
|
+
case serverBackfillRefused(source: TerraSDK.Source)
|
|
561
|
+
case serverBackfillUnsupported(source: TerraSDK.Source)
|
|
562
|
+
case serverBackfillPollFailed(source: TerraSDK.Source, code: TerraSDK.TerraEvent.FailureCode)
|
|
563
|
+
case backgroundObservationUnavailable(TerraSDK.DataCategory, source: TerraSDK.Source)
|
|
564
|
+
case observationDropped(TerraSDK.DataCategory, source: TerraSDK.Source)
|
|
565
|
+
case samplesLogged(TerraSDK.DataCategory, count: Swift.Int, source: TerraSDK.Source)
|
|
566
|
+
case sampleDeleted(TerraSDK.DataCategory, source: TerraSDK.Source)
|
|
567
|
+
case plannedWorkoutUpdated(TerraSDK.Source)
|
|
568
|
+
case plannedWorkoutsScheduled(TerraSDK.Source, scheduled: Swift.Int, removed: Swift.Int, refused: Swift.Int)
|
|
569
|
+
case plannedWorkoutScheduleFailed(source: TerraSDK.Source, code: TerraSDK.TerraEvent.FailureCode)
|
|
570
|
+
case tokenRefreshed
|
|
571
|
+
case deviceKeyRevokeAnswered(TerraSDK.Source, outcome: TerraSDK.DeviceKeyRevokeOutcome)
|
|
572
|
+
case deviceKeyRevokeFailed(TerraSDK.Source, code: TerraSDK.TerraEvent.FailureCode, attempt: Swift.Int, owed: Swift.Bool)
|
|
573
|
+
case diagnosticsReported(TerraSDK.DiagnosticsReason, source: TerraSDK.Source)
|
|
574
|
+
public static func == (a: TerraSDK.TerraEvent.Kind, b: TerraSDK.TerraEvent.Kind) -> Swift.Bool
|
|
575
|
+
}
|
|
576
|
+
public enum FailureCode : Swift.String, Swift.Sendable, Swift.Equatable, Swift.Encodable {
|
|
577
|
+
case healthDataUnavailable, notConnected, tokenUnavailable, tokenRejected
|
|
578
|
+
case tokenProviderFailed, offline, timedOut, serverError, transport, malformedResponse
|
|
579
|
+
case userLimitReached, upgradeRequired, platform, deviceKeyUnavailable
|
|
580
|
+
case signatureRejected, linkRevoked, linkConflict, clockSkewed, devIDMismatch
|
|
581
|
+
case syncAlreadyRunning, linkAlreadyRunning, storeLocked, storeUnreadable
|
|
582
|
+
case deadlineExceeded, permissionDenied, authorizationNotDetermined
|
|
583
|
+
case sampleNotFound, rollbackIncomplete, distanceNotAttributable, bloodPressureIncomplete
|
|
584
|
+
case authorizationUnavailableInExtension, plannedWorkoutUnnamed
|
|
585
|
+
case routeAwaitingConverter
|
|
586
|
+
public init?(rawValue: Swift.String)
|
|
587
|
+
public typealias RawValue = Swift.String
|
|
588
|
+
public var rawValue: Swift.String {
|
|
589
|
+
get
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
public static func == (a: TerraSDK.TerraEvent, b: TerraSDK.TerraEvent) -> Swift.Bool
|
|
593
|
+
}
|
|
594
|
+
public enum DeviceKeyRevokeOutcome : Swift.String, Swift.Sendable, Swift.Equatable, Swift.Encodable {
|
|
595
|
+
case revoked
|
|
596
|
+
case alreadyRevoked
|
|
597
|
+
case routeAbsent
|
|
598
|
+
public init?(rawValue: Swift.String)
|
|
599
|
+
public typealias RawValue = Swift.String
|
|
600
|
+
public var rawValue: Swift.String {
|
|
601
|
+
get
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
public enum DiagnosticsState : Swift.Sendable, Swift.Equatable {
|
|
605
|
+
case healthy
|
|
606
|
+
case quiet(since: Foundation.Date)
|
|
607
|
+
case backgroundRestricted
|
|
608
|
+
case backgroundRefreshUnscheduled
|
|
609
|
+
case pendingRetry
|
|
610
|
+
case linkRevoked
|
|
611
|
+
case devIDMismatch
|
|
612
|
+
public static func == (a: TerraSDK.DiagnosticsState, b: TerraSDK.DiagnosticsState) -> Swift.Bool
|
|
613
|
+
}
|
|
614
|
+
public enum DiagnosticsReason : Swift.String, Swift.Sendable, Swift.Equatable, Swift.Encodable, Swift.CaseIterable {
|
|
615
|
+
case uploadFailed
|
|
616
|
+
case backfillAbandoned
|
|
617
|
+
case backgroundObservationUnavailable
|
|
618
|
+
case backgroundRestricted
|
|
619
|
+
case backgroundRefreshUnscheduled
|
|
620
|
+
case quiet
|
|
621
|
+
case requested
|
|
622
|
+
public init?(rawValue: Swift.String)
|
|
623
|
+
public typealias AllCases = [TerraSDK.DiagnosticsReason]
|
|
624
|
+
public typealias RawValue = Swift.String
|
|
625
|
+
nonisolated public static var allCases: [TerraSDK.DiagnosticsReason] {
|
|
626
|
+
get
|
|
627
|
+
}
|
|
628
|
+
public var rawValue: Swift.String {
|
|
629
|
+
get
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
public enum DiagnosticsPolicy {
|
|
633
|
+
public static let automaticPerDay: Swift.Int
|
|
634
|
+
public static func admits(_ send: TerraSDK.DiagnosticsSend, into ledger: [TerraSDK.DiagnosticsSend], notWithin interval: Foundation.TimeInterval, automaticLimit limit: Swift.Int?) -> Swift.Bool
|
|
635
|
+
public static let day: Swift.Double
|
|
636
|
+
public static let week: Swift.Double
|
|
637
|
+
public static let requestedInterval: Swift.Double
|
|
638
|
+
public struct Rule : Swift.Sendable, Swift.Equatable {
|
|
639
|
+
public let rate: Swift.Double
|
|
640
|
+
public let interval: Foundation.TimeInterval
|
|
641
|
+
public static func == (a: TerraSDK.DiagnosticsPolicy.Rule, b: TerraSDK.DiagnosticsPolicy.Rule) -> Swift.Bool
|
|
642
|
+
}
|
|
643
|
+
public static func rule(for reason: TerraSDK.DiagnosticsReason, code: TerraSDK.TerraEvent.FailureCode? = nil) -> TerraSDK.DiagnosticsPolicy.Rule?
|
|
644
|
+
public static func sampled(identity: Swift.String, rate: Swift.Double) -> Swift.Bool
|
|
645
|
+
}
|
|
646
|
+
public struct DiagnosticsSend : Swift.Sendable, Swift.Equatable, Swift.Codable {
|
|
647
|
+
public let key: Swift.String
|
|
648
|
+
public let at: Foundation.Date
|
|
649
|
+
public static let ledgerLimit: Swift.Int
|
|
650
|
+
public static func trimmed(_ ledger: [TerraSDK.DiagnosticsSend], now: Foundation.Date) -> [TerraSDK.DiagnosticsSend]
|
|
651
|
+
public init(key: Swift.String, at: Foundation.Date)
|
|
652
|
+
public static func == (a: TerraSDK.DiagnosticsSend, b: TerraSDK.DiagnosticsSend) -> Swift.Bool
|
|
653
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
654
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
655
|
+
}
|
|
656
|
+
public struct SupportReport : Swift.Sendable, Swift.Equatable, Swift.Encodable {
|
|
657
|
+
public let sdkVersion: Swift.String
|
|
658
|
+
public let generatedAt: Foundation.Date
|
|
659
|
+
public let state: TerraSDK.DiagnosticsState
|
|
660
|
+
public let lastDelivery: Foundation.Date?
|
|
661
|
+
public let isConnected: Swift.Bool
|
|
662
|
+
public let requestedCategories: [Swift.String]
|
|
663
|
+
public let requestedWrites: [Swift.String]
|
|
664
|
+
public let requestedWorkouts: [Swift.String]
|
|
665
|
+
public let recentEvents: [TerraSDK.TerraEvent]
|
|
666
|
+
public func json() throws -> Foundation.Data
|
|
667
|
+
public static func == (a: TerraSDK.SupportReport, b: TerraSDK.SupportReport) -> Swift.Bool
|
|
668
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
669
|
+
}
|
|
670
|
+
extension TerraSDK.DiagnosticsState : Swift.Encodable {
|
|
671
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
672
|
+
}
|
|
673
|
+
extension TerraSDK.TerraEvent : Swift.Encodable {
|
|
674
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
675
|
+
}
|
|
676
|
+
public enum EndUser : Swift.Sendable, Swift.Hashable {
|
|
677
|
+
case reference(Swift.String)
|
|
678
|
+
case anonymous
|
|
679
|
+
public static func == (a: TerraSDK.EndUser, b: TerraSDK.EndUser) -> Swift.Bool
|
|
680
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
681
|
+
public var hashValue: Swift.Int {
|
|
682
|
+
get
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
public enum TerraError : Swift.Error, Swift.Sendable {
|
|
686
|
+
case healthDataUnavailable
|
|
687
|
+
case notConnected(TerraSDK.Source)
|
|
688
|
+
case routeAwaitingConverter(TerraSDK.UploadDataType)
|
|
689
|
+
case tokenUnavailable
|
|
690
|
+
case tokenRejected
|
|
691
|
+
case tokenProviderFailed(any Swift.Error)
|
|
692
|
+
case network(TerraSDK.TerraError.Network)
|
|
693
|
+
case userLimitReached
|
|
694
|
+
case upgradeRequired
|
|
695
|
+
case platform(any Swift.Error)
|
|
696
|
+
case deviceKeyUnavailable
|
|
697
|
+
case signatureRejected
|
|
698
|
+
case clockSkewed
|
|
699
|
+
case linkRevoked(TerraSDK.Source)
|
|
700
|
+
case devIDMismatch(TerraSDK.Source)
|
|
701
|
+
case linkConflict
|
|
702
|
+
case syncAlreadyRunning(TerraSDK.UploadDataType)
|
|
703
|
+
case linkAlreadyRunning(TerraSDK.Source)
|
|
704
|
+
case storeLocked
|
|
705
|
+
case storeUnreadable
|
|
706
|
+
case deadlineExceeded
|
|
707
|
+
case permissionDenied(TerraSDK.DataCategory)
|
|
708
|
+
case authorizationNotDetermined
|
|
709
|
+
case sampleNotFound(Foundation.UUID)
|
|
710
|
+
indirect case rollbackIncomplete(remaining: [Foundation.UUID], cause: TerraSDK.TerraError)
|
|
711
|
+
case distanceNotAttributable(TerraSDK.WorkoutActivity)
|
|
712
|
+
case bloodPressureIncomplete
|
|
713
|
+
case plannedWorkoutUnnamed
|
|
714
|
+
case authorizationUnavailableInExtension
|
|
715
|
+
public enum Network : Swift.Sendable, Swift.Equatable {
|
|
716
|
+
case offline
|
|
717
|
+
case timedOut
|
|
718
|
+
case serverError(status: Swift.Int)
|
|
719
|
+
case throttled(retryAfter: Foundation.TimeInterval?)
|
|
720
|
+
case transport(code: Swift.Int)
|
|
721
|
+
case malformedResponse
|
|
722
|
+
public var code: Swift.String {
|
|
723
|
+
get
|
|
724
|
+
}
|
|
725
|
+
public static func == (a: TerraSDK.TerraError.Network, b: TerraSDK.TerraError.Network) -> Swift.Bool
|
|
726
|
+
}
|
|
727
|
+
public var code: Swift.String {
|
|
728
|
+
get
|
|
729
|
+
}
|
|
730
|
+
public var isRetryable: Swift.Bool {
|
|
731
|
+
get
|
|
732
|
+
}
|
|
733
|
+
public var isAuthorizationRefusal: Swift.Bool {
|
|
734
|
+
get
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
extension TerraSDK.TerraError : Foundation.LocalizedError {
|
|
738
|
+
public var errorDescription: Swift.String? {
|
|
739
|
+
get
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
extension TerraSDK.TerraError : Swift.Equatable {
|
|
743
|
+
public static func == (lhs: TerraSDK.TerraError, rhs: TerraSDK.TerraError) -> Swift.Bool
|
|
744
|
+
}
|
|
745
|
+
public struct HTTPBackend : TerraSDK.TerraBackend {
|
|
746
|
+
public static let defaultTimeout: Swift.Double
|
|
747
|
+
public init(baseURL: Foundation.URL, session: Foundation.URLSession? = nil)
|
|
748
|
+
public func link(_ request: TerraSDK.LinkRequest) async throws -> TerraSDK.LinkGrant
|
|
749
|
+
public func upload(_ request: TerraSDK.UploadRequest) async throws
|
|
750
|
+
public func plannedWorkouts(_ request: TerraSDK.PlannedWorkoutRequest) async throws -> [TerraSDK.PlannedWorkout]
|
|
751
|
+
public func updatePlannedWorkout(_ request: TerraSDK.PlannedWorkoutUpdate) async throws
|
|
752
|
+
public func pendingPlanActions(_ request: TerraSDK.PlanQueueRequest) async throws -> [TerraSDK.PendingPlanAction]
|
|
753
|
+
public func acknowledgePlanActions(_ request: TerraSDK.PlanAckRequest) async throws
|
|
754
|
+
public func reportScheduledWorkouts(_ request: TerraSDK.ScheduledWorkoutReportRequest) async throws
|
|
755
|
+
public func backfillRequests(_ request: TerraSDK.BackfillPollRequest) async throws -> [TerraSDK.BackfillDirective]
|
|
756
|
+
public func acknowledgeBackfills(_ request: TerraSDK.BackfillAckRequest) async throws
|
|
757
|
+
public func sendDiagnostics(_ request: TerraSDK.DiagnosticsRequest) async throws
|
|
758
|
+
public func revokeDeviceKey(_ request: TerraSDK.RevokeDeviceKeyRequest) async throws
|
|
759
|
+
}
|
|
760
|
+
public struct HealthAccess : Swift.Sendable, Swift.Equatable {
|
|
761
|
+
public var read: Swift.Set<TerraSDK.DataCategory>
|
|
762
|
+
public var write: Swift.Set<TerraSDK.DataCategory>
|
|
763
|
+
public var workouts: Swift.Set<TerraSDK.WorkoutScope>
|
|
764
|
+
public init(read: Swift.Set<TerraSDK.DataCategory> = [], write: Swift.Set<TerraSDK.DataCategory> = [], workouts: Swift.Set<TerraSDK.WorkoutScope> = [])
|
|
765
|
+
public var isEmpty: Swift.Bool {
|
|
766
|
+
get
|
|
767
|
+
}
|
|
768
|
+
public func union(_ other: TerraSDK.HealthAccess) -> TerraSDK.HealthAccess
|
|
769
|
+
public func intersection(_ other: TerraSDK.HealthAccess) -> TerraSDK.HealthAccess
|
|
770
|
+
public static func == (a: TerraSDK.HealthAccess, b: TerraSDK.HealthAccess) -> Swift.Bool
|
|
771
|
+
}
|
|
772
|
+
extension TerraSDK.HealthKitStore {
|
|
773
|
+
public func bodyReadings(in interval: Foundation.DateInterval) async throws -> [TerraSDK.BodyReading]
|
|
774
|
+
public func bodyReadings(in interval: Foundation.DateInterval, recordTypes: Swift.Set<Swift.String>) async throws -> [TerraSDK.BodyReading]
|
|
775
|
+
public func dietaryQuantities(in interval: Foundation.DateInterval) async throws -> [TerraSDK.DietaryQuantity]
|
|
776
|
+
public func hydration(in interval: Foundation.DateInterval) async throws -> [TerraSDK.HydrationSample]
|
|
777
|
+
public func menstrualEvents(in interval: Foundation.DateInterval) async throws -> [TerraSDK.MenstrualEvent]
|
|
778
|
+
public func menstruationFlow(in interval: Foundation.DateInterval) async throws -> [TerraSDK.MenstruationFlowDay]
|
|
779
|
+
public func healthObservations(in interval: Foundation.DateInterval) async throws -> [TerraSDK.HealthObservation]
|
|
780
|
+
public func athleteProfile() async throws -> TerraSDK.AthleteProfile?
|
|
781
|
+
public func workoutIntensity(inside workouts: [TerraSDK.Workout]) async throws -> [TerraSDK.WorkoutIntensitySample]
|
|
782
|
+
public func workoutRoutes(of workouts: [TerraSDK.Workout]) async throws -> [TerraSDK.WorkoutRoute]
|
|
783
|
+
}
|
|
784
|
+
@_hasMissingDesignatedInitializers public actor HealthKitStore : TerraSDK.HealthStore {
|
|
785
|
+
nonisolated final public let isAvailable: Swift.Bool
|
|
786
|
+
public init(anchors: any TerraSDK.DeviceStore = KeychainDeviceStore())
|
|
787
|
+
public func readStatus(for category: TerraSDK.DataCategory) async -> TerraSDK.PermissionStatus
|
|
788
|
+
nonisolated public var canPresentAuthorization: Swift.Bool {
|
|
789
|
+
get
|
|
790
|
+
}
|
|
791
|
+
public func servable(_ access: TerraSDK.HealthAccess) async throws -> TerraSDK.HealthAccess
|
|
792
|
+
public func requestAccess(_ access: TerraSDK.HealthAccess) async throws
|
|
793
|
+
public func writeStatus(for category: TerraSDK.DataCategory) async -> TerraSDK.PermissionStatus
|
|
794
|
+
public func save(_ entries: [TerraSDK.HeartRateEntry]) async throws -> [Foundation.UUID]
|
|
795
|
+
public func save(_ entries: [TerraSDK.StepEntry]) async throws -> [Foundation.UUID]
|
|
796
|
+
public func save(_ entries: [TerraSDK.SleepEntry]) async throws -> [Foundation.UUID]
|
|
797
|
+
public func writeAccess(for entries: [TerraSDK.WorkoutEntry]) async throws -> TerraSDK.HealthAccess
|
|
798
|
+
public func requireWritable(_ entries: [TerraSDK.WorkoutEntry]) async throws
|
|
799
|
+
public func save(_ entry: TerraSDK.WorkoutEntry) async throws -> Foundation.UUID
|
|
800
|
+
public func delete(_ id: Foundation.UUID, in category: TerraSDK.DataCategory) async throws
|
|
801
|
+
public func changes(for dataType: TerraSDK.UploadDataType, since anchor: Foundation.Data?, limit: Swift.Int) async throws -> TerraSDK.HealthChanges
|
|
802
|
+
public func changes(for dataType: TerraSDK.UploadDataType, since anchor: Foundation.Data?, limit: Swift.Int, attachingContents: Swift.Bool) async throws -> TerraSDK.HealthChanges
|
|
803
|
+
public func heartRate(in interval: Foundation.DateInterval) async throws -> [TerraSDK.HeartRateSample]
|
|
804
|
+
public func restingHeartRate(in interval: Foundation.DateInterval) async throws -> [TerraSDK.RestingHeartRateSample]
|
|
805
|
+
public func stepSamples(in interval: Foundation.DateInterval) async throws -> [TerraSDK.StepCount]
|
|
806
|
+
public func intradaySamples(in interval: Foundation.DateInterval) async throws -> [TerraSDK.IntradaySample]
|
|
807
|
+
public func sleep(in interval: Foundation.DateInterval) async throws -> [TerraSDK.SleepSegment]
|
|
808
|
+
public func workouts(in interval: Foundation.DateInterval) async throws -> [TerraSDK.Workout]
|
|
809
|
+
nonisolated public func observe(_ category: TerraSDK.DataCategory, source: TerraSDK.Source) -> _Concurrency.AsyncStream<TerraSDK.ObservedWake>
|
|
810
|
+
public func enableBackgroundObservation(_ category: TerraSDK.DataCategory, source: TerraSDK.Source) async -> Swift.Bool
|
|
811
|
+
public func replayObservation(_ category: TerraSDK.DataCategory, source: TerraSDK.Source) async -> TerraSDK.ObservedChange
|
|
812
|
+
@objc deinit
|
|
813
|
+
@available(iOS 13.0, tvOS 13.0, watchOS 6.0, macOS 10.15, *)
|
|
814
|
+
@_semantics("defaultActor") nonisolated final public var unownedExecutor: _Concurrency.UnownedSerialExecutor {
|
|
815
|
+
get
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
extension TerraSDK.HealthKitStore {
|
|
819
|
+
public func dayTotals(in interval: Foundation.DateInterval) async throws -> [TerraSDK.DayTotal]
|
|
820
|
+
public func dayTotals(in interval: Foundation.DateInterval, zone: Foundation.TimeZone) async throws -> [TerraSDK.DayTotal]
|
|
821
|
+
nonisolated public var appliesDayTotalPolicy: Swift.Bool {
|
|
822
|
+
get
|
|
823
|
+
}
|
|
824
|
+
public func dayTotals(in interval: Foundation.DateInterval, zone: Foundation.TimeZone, policy: TerraSDK.DayTotalPolicy) async throws -> [TerraSDK.DayTotal]
|
|
825
|
+
}
|
|
826
|
+
extension TerraSDK.HealthKitStore {
|
|
827
|
+
public func save(_ entries: [TerraSDK.BodyEntry]) async throws -> [Foundation.UUID]
|
|
828
|
+
public func save(_ entries: [TerraSDK.NutritionEntry]) async throws -> [Foundation.UUID]
|
|
829
|
+
}
|
|
830
|
+
public struct HealthObservation : Swift.Sendable, Swift.Equatable, Swift.Identifiable {
|
|
831
|
+
public enum Category : Swift.String, Swift.Sendable, Swift.Hashable, Swift.CaseIterable {
|
|
832
|
+
case symptom
|
|
833
|
+
case selfCare
|
|
834
|
+
case lab
|
|
835
|
+
public init?(rawValue: Swift.String)
|
|
836
|
+
public typealias AllCases = [TerraSDK.HealthObservation.Category]
|
|
837
|
+
public typealias RawValue = Swift.String
|
|
838
|
+
nonisolated public static var allCases: [TerraSDK.HealthObservation.Category] {
|
|
839
|
+
get
|
|
840
|
+
}
|
|
841
|
+
public var rawValue: Swift.String {
|
|
842
|
+
get
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
public enum Severity : Swift.String, Swift.Sendable, Swift.Hashable, Swift.CaseIterable {
|
|
846
|
+
case unspecified
|
|
847
|
+
case notPresent
|
|
848
|
+
case mild
|
|
849
|
+
case moderate
|
|
850
|
+
case severe
|
|
851
|
+
public init?(rawValue: Swift.String)
|
|
852
|
+
public typealias AllCases = [TerraSDK.HealthObservation.Severity]
|
|
853
|
+
public typealias RawValue = Swift.String
|
|
854
|
+
nonisolated public static var allCases: [TerraSDK.HealthObservation.Severity] {
|
|
855
|
+
get
|
|
856
|
+
}
|
|
857
|
+
public var rawValue: Swift.String {
|
|
858
|
+
get
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
public enum Value : Swift.Sendable, Swift.Equatable {
|
|
862
|
+
case quantity(Swift.Double, unit: Swift.String)
|
|
863
|
+
public static func == (a: TerraSDK.HealthObservation.Value, b: TerraSDK.HealthObservation.Value) -> Swift.Bool
|
|
864
|
+
}
|
|
865
|
+
public let id: Foundation.UUID
|
|
866
|
+
public let storeIdentifier: Swift.String
|
|
867
|
+
public let category: TerraSDK.HealthObservation.Category
|
|
868
|
+
public let interval: Foundation.DateInterval
|
|
869
|
+
public let severity: TerraSDK.HealthObservation.Severity?
|
|
870
|
+
public let value: TerraSDK.HealthObservation.Value?
|
|
871
|
+
public let source: TerraSDK.SampleSource
|
|
872
|
+
public let userEntered: Swift.Bool
|
|
873
|
+
public let timeZone: Foundation.TimeZone?
|
|
874
|
+
public init(id: Foundation.UUID, storeIdentifier: Swift.String, category: TerraSDK.HealthObservation.Category, interval: Foundation.DateInterval, severity: TerraSDK.HealthObservation.Severity? = nil, value: TerraSDK.HealthObservation.Value? = nil, source: TerraSDK.SampleSource, userEntered: Swift.Bool = false, timeZone: Foundation.TimeZone? = nil)
|
|
875
|
+
public static func == (a: TerraSDK.HealthObservation, b: TerraSDK.HealthObservation) -> Swift.Bool
|
|
876
|
+
public typealias ID = Foundation.UUID
|
|
877
|
+
}
|
|
878
|
+
public struct HealthChanges : Swift.Sendable {
|
|
879
|
+
public var heartRate: [TerraSDK.HeartRateSample]
|
|
880
|
+
public var steps: [TerraSDK.StepCount]
|
|
881
|
+
public var restingHeartRate: [TerraSDK.RestingHeartRateSample]
|
|
882
|
+
public var sleep: [TerraSDK.SleepSegment]
|
|
883
|
+
public var workouts: [TerraSDK.Workout]
|
|
884
|
+
public var workoutIntensity: [TerraSDK.WorkoutIntensitySample]
|
|
885
|
+
public var workoutRoutes: [TerraSDK.WorkoutRoute]
|
|
886
|
+
public var intensityArrivals: [TerraSDK.WorkoutIntensityArrival]
|
|
887
|
+
public var routeArrivals: [TerraSDK.WorkoutRouteArrival]
|
|
888
|
+
public var body: [TerraSDK.BodyReading]
|
|
889
|
+
public var nutrients: [TerraSDK.DietaryQuantity]
|
|
890
|
+
public var hydration: [TerraSDK.HydrationSample]
|
|
891
|
+
public var menstruation: [TerraSDK.MenstruationFlowDay]
|
|
892
|
+
public var menstrualEvents: [TerraSDK.MenstrualEvent]
|
|
893
|
+
public var healthObservations: [TerraSDK.HealthObservation]
|
|
894
|
+
public var athlete: TerraSDK.AthleteProfile?
|
|
895
|
+
public var dayTotals: [TerraSDK.DayTotal]
|
|
896
|
+
public var intraday: [TerraSDK.IntradaySample]
|
|
897
|
+
public var readAt: Foundation.Date?
|
|
898
|
+
public var bodySeriesArrivals: [TerraSDK.BodySeriesArrival]
|
|
899
|
+
public var totalRelevantInstants: [Foundation.Date]
|
|
900
|
+
public var anchor: Foundation.Data?
|
|
901
|
+
public var more: Swift.Bool
|
|
902
|
+
public var isEmpty: Swift.Bool {
|
|
903
|
+
get
|
|
904
|
+
}
|
|
905
|
+
public init(heartRate: [TerraSDK.HeartRateSample] = [], steps: [TerraSDK.StepCount] = [], restingHeartRate: [TerraSDK.RestingHeartRateSample] = [], sleep: [TerraSDK.SleepSegment] = [], workouts: [TerraSDK.Workout] = [], anchor: Foundation.Data? = nil, more: Swift.Bool = false)
|
|
906
|
+
}
|
|
907
|
+
public struct BodySeriesArrival : Swift.Sendable, Swift.Equatable, Swift.Hashable {
|
|
908
|
+
public let id: Foundation.UUID
|
|
909
|
+
public let instant: Foundation.Date
|
|
910
|
+
public init(id: Foundation.UUID, instant: Foundation.Date)
|
|
911
|
+
public static func == (a: TerraSDK.BodySeriesArrival, b: TerraSDK.BodySeriesArrival) -> Swift.Bool
|
|
912
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
913
|
+
public var hashValue: Swift.Int {
|
|
914
|
+
get
|
|
915
|
+
}
|
|
916
|
+
}
|
|
917
|
+
public struct WorkoutIntensityArrival : Swift.Sendable, Swift.Equatable, Swift.Hashable {
|
|
918
|
+
public let id: Foundation.UUID
|
|
919
|
+
public let instant: Foundation.Date
|
|
920
|
+
public init(id: Foundation.UUID, instant: Foundation.Date)
|
|
921
|
+
public static func == (a: TerraSDK.WorkoutIntensityArrival, b: TerraSDK.WorkoutIntensityArrival) -> Swift.Bool
|
|
922
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
923
|
+
public var hashValue: Swift.Int {
|
|
924
|
+
get
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
public struct WorkoutRouteArrival : Swift.Sendable, Swift.Equatable, Swift.Hashable {
|
|
928
|
+
public let id: Foundation.UUID
|
|
929
|
+
public let instant: Foundation.Date
|
|
930
|
+
public init(id: Foundation.UUID, instant: Foundation.Date)
|
|
931
|
+
public static func == (a: TerraSDK.WorkoutRouteArrival, b: TerraSDK.WorkoutRouteArrival) -> Swift.Bool
|
|
932
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
933
|
+
public var hashValue: Swift.Int {
|
|
934
|
+
get
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
@_spi(TestRig) public protocol WorkoutAssociatedRecord : Swift.Sendable {
|
|
938
|
+
@_spi(TestRig) var id: Foundation.UUID { get }
|
|
939
|
+
@_spi(TestRig) var workoutId: Foundation.UUID { get }
|
|
940
|
+
}
|
|
941
|
+
@_spi(TestRig) extension TerraSDK.WorkoutIntensitySample : TerraSDK.WorkoutAssociatedRecord {
|
|
942
|
+
}
|
|
943
|
+
@_spi(TestRig) extension TerraSDK.WorkoutRoute : TerraSDK.WorkoutAssociatedRecord {
|
|
944
|
+
}
|
|
945
|
+
@_spi(TestRig) public enum WorkoutContentsDelivery {
|
|
946
|
+
@_spi(TestRig) public static func selected<Record>(_ read: [Record], pagedSessions: Swift.Set<Foundation.UUID>, arrivedRecords: Swift.Set<Foundation.UUID>) -> [Record] where Record : TerraSDK.WorkoutAssociatedRecord
|
|
947
|
+
}
|
|
948
|
+
public protocol HealthStore : Swift.Sendable {
|
|
949
|
+
var isAvailable: Swift.Bool { get }
|
|
950
|
+
var canPresentAuthorization: Swift.Bool { get }
|
|
951
|
+
func readStatus(for category: TerraSDK.DataCategory) async -> TerraSDK.PermissionStatus
|
|
952
|
+
func requestAccess(_ access: TerraSDK.HealthAccess) async throws
|
|
953
|
+
func servable(_ access: TerraSDK.HealthAccess) async throws -> TerraSDK.HealthAccess
|
|
954
|
+
func dayTotals(in interval: Foundation.DateInterval, zone: Foundation.TimeZone) async throws -> [TerraSDK.DayTotal]
|
|
955
|
+
func dayTotals(in interval: Foundation.DateInterval) async throws -> [TerraSDK.DayTotal]
|
|
956
|
+
func dayTotals(in interval: Foundation.DateInterval, zone: Foundation.TimeZone, policy: TerraSDK.DayTotalPolicy) async throws -> [TerraSDK.DayTotal]
|
|
957
|
+
var appliesDayTotalPolicy: Swift.Bool { get }
|
|
958
|
+
func changes(for dataType: TerraSDK.UploadDataType, since anchor: Foundation.Data?, limit: Swift.Int) async throws -> TerraSDK.HealthChanges
|
|
959
|
+
func changes(for dataType: TerraSDK.UploadDataType, since anchor: Foundation.Data?, limit: Swift.Int, attachingContents: Swift.Bool) async throws -> TerraSDK.HealthChanges
|
|
960
|
+
func observe(_ category: TerraSDK.DataCategory, source: TerraSDK.Source) -> _Concurrency.AsyncStream<TerraSDK.ObservedWake>
|
|
961
|
+
func enableBackgroundObservation(_ category: TerraSDK.DataCategory, source: TerraSDK.Source) async -> Swift.Bool
|
|
962
|
+
func replayObservation(_ category: TerraSDK.DataCategory, source: TerraSDK.Source) async -> TerraSDK.ObservedChange
|
|
963
|
+
func writeStatus(for category: TerraSDK.DataCategory) async -> TerraSDK.PermissionStatus
|
|
964
|
+
func save(_ entries: [TerraSDK.HeartRateEntry]) async throws -> [Foundation.UUID]
|
|
965
|
+
func save(_ entries: [TerraSDK.StepEntry]) async throws -> [Foundation.UUID]
|
|
966
|
+
func save(_ entries: [TerraSDK.SleepEntry]) async throws -> [Foundation.UUID]
|
|
967
|
+
func save(_ entries: [TerraSDK.BodyEntry]) async throws -> [Foundation.UUID]
|
|
968
|
+
func save(_ entries: [TerraSDK.NutritionEntry]) async throws -> [Foundation.UUID]
|
|
969
|
+
func save(_ entry: TerraSDK.WorkoutEntry) async throws -> Foundation.UUID
|
|
970
|
+
func writeAccess(for entries: [TerraSDK.WorkoutEntry]) async throws -> TerraSDK.HealthAccess
|
|
971
|
+
func requireWritable(_ entries: [TerraSDK.WorkoutEntry]) async throws
|
|
972
|
+
func delete(_ id: Foundation.UUID, in category: TerraSDK.DataCategory) async throws
|
|
973
|
+
func heartRate(in interval: Foundation.DateInterval) async throws -> [TerraSDK.HeartRateSample]
|
|
974
|
+
func restingHeartRate(in interval: Foundation.DateInterval) async throws -> [TerraSDK.RestingHeartRateSample]
|
|
975
|
+
func stepSamples(in interval: Foundation.DateInterval) async throws -> [TerraSDK.StepCount]
|
|
976
|
+
func intradaySamples(in interval: Foundation.DateInterval) async throws -> [TerraSDK.IntradaySample]
|
|
977
|
+
func sleep(in interval: Foundation.DateInterval) async throws -> [TerraSDK.SleepSegment]
|
|
978
|
+
func workouts(in interval: Foundation.DateInterval) async throws -> [TerraSDK.Workout]
|
|
979
|
+
func workoutIntensity(inside workouts: [TerraSDK.Workout]) async throws -> [TerraSDK.WorkoutIntensitySample]
|
|
980
|
+
func workoutRoutes(of workouts: [TerraSDK.Workout]) async throws -> [TerraSDK.WorkoutRoute]
|
|
981
|
+
func bodyReadings(in interval: Foundation.DateInterval) async throws -> [TerraSDK.BodyReading]
|
|
982
|
+
func bodyReadings(in interval: Foundation.DateInterval, recordTypes: Swift.Set<Swift.String>) async throws -> [TerraSDK.BodyReading]
|
|
983
|
+
func dietaryQuantities(in interval: Foundation.DateInterval) async throws -> [TerraSDK.DietaryQuantity]
|
|
984
|
+
func hydration(in interval: Foundation.DateInterval) async throws -> [TerraSDK.HydrationSample]
|
|
985
|
+
func menstruationFlow(in interval: Foundation.DateInterval) async throws -> [TerraSDK.MenstruationFlowDay]
|
|
986
|
+
func menstrualEvents(in interval: Foundation.DateInterval) async throws -> [TerraSDK.MenstrualEvent]
|
|
987
|
+
func healthObservations(in interval: Foundation.DateInterval) async throws -> [TerraSDK.HealthObservation]
|
|
988
|
+
func athleteProfile() async throws -> TerraSDK.AthleteProfile?
|
|
989
|
+
}
|
|
990
|
+
extension TerraSDK.HealthStore {
|
|
991
|
+
public func dayTotals(in interval: Foundation.DateInterval, zone: Foundation.TimeZone) async throws -> [TerraSDK.DayTotal]
|
|
992
|
+
public func dayTotals(in interval: Foundation.DateInterval) async throws -> [TerraSDK.DayTotal]
|
|
993
|
+
public func dayTotals(in interval: Foundation.DateInterval, zone: Foundation.TimeZone, policy: TerraSDK.DayTotalPolicy) async throws -> [TerraSDK.DayTotal]
|
|
994
|
+
public var appliesDayTotalPolicy: Swift.Bool {
|
|
995
|
+
get
|
|
996
|
+
}
|
|
997
|
+
public func changes(for dataType: TerraSDK.UploadDataType, since anchor: Foundation.Data?, limit: Swift.Int, attachingContents: Swift.Bool) async throws -> TerraSDK.HealthChanges
|
|
998
|
+
public var canPresentAuthorization: Swift.Bool {
|
|
999
|
+
get
|
|
1000
|
+
}
|
|
1001
|
+
public func servable(_ access: TerraSDK.HealthAccess) async throws -> TerraSDK.HealthAccess
|
|
1002
|
+
public func save(_ entries: [TerraSDK.BodyEntry]) async throws -> [Foundation.UUID]
|
|
1003
|
+
public func save(_ entries: [TerraSDK.NutritionEntry]) async throws -> [Foundation.UUID]
|
|
1004
|
+
public func bodyReadings(in interval: Foundation.DateInterval) async throws -> [TerraSDK.BodyReading]
|
|
1005
|
+
public func bodyReadings(in interval: Foundation.DateInterval, recordTypes: Swift.Set<Swift.String>) async throws -> [TerraSDK.BodyReading]
|
|
1006
|
+
public func dietaryQuantities(in interval: Foundation.DateInterval) async throws -> [TerraSDK.DietaryQuantity]
|
|
1007
|
+
public func hydration(in interval: Foundation.DateInterval) async throws -> [TerraSDK.HydrationSample]
|
|
1008
|
+
public func menstruationFlow(in interval: Foundation.DateInterval) async throws -> [TerraSDK.MenstruationFlowDay]
|
|
1009
|
+
public func athleteProfile() async throws -> TerraSDK.AthleteProfile?
|
|
1010
|
+
public func intradaySamples(in interval: Foundation.DateInterval) async throws -> [TerraSDK.IntradaySample]
|
|
1011
|
+
public func menstrualEvents(in interval: Foundation.DateInterval) async throws -> [TerraSDK.MenstrualEvent]
|
|
1012
|
+
public func healthObservations(in interval: Foundation.DateInterval) async throws -> [TerraSDK.HealthObservation]
|
|
1013
|
+
public func workoutIntensity(inside workouts: [TerraSDK.Workout]) async throws -> [TerraSDK.WorkoutIntensitySample]
|
|
1014
|
+
public func workoutRoutes(of workouts: [TerraSDK.Workout]) async throws -> [TerraSDK.WorkoutRoute]
|
|
1015
|
+
}
|
|
1016
|
+
public struct KeychainDeviceStore : TerraSDK.DeviceStore {
|
|
1017
|
+
public var storageDomain: Swift.String {
|
|
1018
|
+
get
|
|
1019
|
+
}
|
|
1020
|
+
@_spi(Testing) public static func keychainReads(for domain: Swift.String) -> Swift.Int
|
|
1021
|
+
public func linkDiagnostics(source: TerraSDK.Source) throws -> TerraSDK.LinkDiagnostics?
|
|
1022
|
+
public func saveLastDelivery(_ date: Foundation.Date, source: TerraSDK.Source, ifGeneration generation: Swift.Int) throws
|
|
1023
|
+
public func loadDiagnosticsSends() throws -> [TerraSDK.DiagnosticsSend]
|
|
1024
|
+
public func reserveDiagnosticsSend(_ send: TerraSDK.DiagnosticsSend, notWithin interval: Foundation.TimeInterval, automaticLimit limit: Swift.Int?) throws -> Swift.Bool
|
|
1025
|
+
public func releaseDiagnosticsSend(_ send: TerraSDK.DiagnosticsSend) throws
|
|
1026
|
+
public func loadObservationAnchor(key: Swift.String) throws -> Foundation.Data?
|
|
1027
|
+
public func saveObservationAnchor(_ anchor: Foundation.Data, key: Swift.String) throws
|
|
1028
|
+
public func linkGeneration(source: TerraSDK.Source) -> Swift.Int
|
|
1029
|
+
public func loadDeferredObservations(source: TerraSDK.Source) throws -> [TerraSDK.DataCategory : TerraSDK.DeferredWake]
|
|
1030
|
+
@discardableResult
|
|
1031
|
+
public func deferObservation(_ category: TerraSDK.DataCategory, source: TerraSDK.Source, generation: Swift.Int) throws -> TerraSDK.DeferredWake
|
|
1032
|
+
public func retireObservation(_ category: TerraSDK.DataCategory, source: TerraSDK.Source, ifStillAt wake: TerraSDK.DeferredWake) throws
|
|
1033
|
+
public func claimWakeSync(_ category: TerraSDK.DataCategory, source: TerraSDK.Source, dataType: TerraSDK.UploadDataType, generation: Swift.Int) -> Swift.Bool
|
|
1034
|
+
public func takeWakesOwed(source: TerraSDK.Source, dataType: TerraSDK.UploadDataType, generation: Swift.Int) -> Swift.Set<TerraSDK.DataCategory>
|
|
1035
|
+
public func releaseWakeSync(source: TerraSDK.Source, dataType: TerraSDK.UploadDataType, generation: Swift.Int) -> Swift.Set<TerraSDK.DataCategory>
|
|
1036
|
+
public func claimSync(source: TerraSDK.Source, dataType: TerraSDK.UploadDataType, generation: Swift.Int) -> Swift.Bool
|
|
1037
|
+
public func releaseSync(source: TerraSDK.Source, dataType: TerraSDK.UploadDataType, generation: Swift.Int)
|
|
1038
|
+
public func beginRetry(source: TerraSDK.Source, dataType: TerraSDK.UploadDataType, generation: Swift.Int)
|
|
1039
|
+
public func endRetry(source: TerraSDK.Source, dataType: TerraSDK.UploadDataType, generation: Swift.Int)
|
|
1040
|
+
public func lastWakeSync(source: TerraSDK.Source, dataType: TerraSDK.UploadDataType) -> Foundation.Date?
|
|
1041
|
+
public func noteWakeSync(source: TerraSDK.Source, dataType: TerraSDK.UploadDataType, at time: Foundation.Date)
|
|
1042
|
+
public func pausedUntil(source: TerraSDK.Source) -> Foundation.Date?
|
|
1043
|
+
public func pause(source: TerraSDK.Source, until: Foundation.Date)
|
|
1044
|
+
public func claimLink(source: TerraSDK.Source) -> Swift.Bool
|
|
1045
|
+
public func releaseLink(source: TerraSDK.Source)
|
|
1046
|
+
public init(domain: Swift.String = "co.tryterra.sdk")
|
|
1047
|
+
public func loadConnection(source: TerraSDK.Source) throws -> TerraSDK.StoredConnection?
|
|
1048
|
+
public func completeLink(_ connection: TerraSDK.StoredConnection) throws
|
|
1049
|
+
@discardableResult
|
|
1050
|
+
public func updateConnection(_ connection: TerraSDK.StoredConnection, ifGeneration generation: Swift.Int) throws -> Swift.Bool
|
|
1051
|
+
@discardableResult
|
|
1052
|
+
public func endLink(source: TerraSDK.Source, ifGeneration generation: Swift.Int?, owing revocation: TerraSDK.PendingRevocation?) throws -> Swift.Int?
|
|
1053
|
+
public func loadProviderUserID() throws -> Swift.String?
|
|
1054
|
+
public func saveProviderUserID(_ id: Swift.String) throws
|
|
1055
|
+
public func activeDevID() throws -> Swift.String?
|
|
1056
|
+
@discardableResult
|
|
1057
|
+
public func claimDevID(_ devID: Swift.String) throws -> Swift.Bool
|
|
1058
|
+
public func loadRequestedAccess() throws -> TerraSDK.HealthAccess
|
|
1059
|
+
@discardableResult
|
|
1060
|
+
public func recordRequestedAccess(_ access: TerraSDK.HealthAccess) throws -> TerraSDK.HealthAccess
|
|
1061
|
+
public func loadSyncedThrough(source: TerraSDK.Source, dataType: TerraSDK.UploadDataType) throws -> Foundation.Date?
|
|
1062
|
+
public func saveSyncedThrough(_ date: Foundation.Date, source: TerraSDK.Source, dataType: TerraSDK.UploadDataType, ifGeneration generation: Swift.Int) throws
|
|
1063
|
+
public func loadSyncedFrom(source: TerraSDK.Source, dataType: TerraSDK.UploadDataType) throws -> Foundation.Date?
|
|
1064
|
+
public func saveSyncedFrom(_ date: Foundation.Date, source: TerraSDK.Source, dataType: TerraSDK.UploadDataType, ifGeneration generation: Swift.Int) throws
|
|
1065
|
+
public func loadServerBackfills(source: TerraSDK.Source) throws -> [TerraSDK.StoredBackfillRequest]
|
|
1066
|
+
@discardableResult
|
|
1067
|
+
public func upsertServerBackfill(_ request: TerraSDK.StoredBackfillRequest, source: TerraSDK.Source, ifGeneration generation: Swift.Int) throws -> Swift.Bool
|
|
1068
|
+
public func removeServerBackfill(reference: Swift.String, source: TerraSDK.Source, ifGeneration generation: Swift.Int) throws
|
|
1069
|
+
public func loadPendingRevocations(source: TerraSDK.Source) throws -> [TerraSDK.PendingRevocation]
|
|
1070
|
+
public func claimRevocations(source: TerraSDK.Source) -> Swift.Bool
|
|
1071
|
+
@discardableResult
|
|
1072
|
+
public func releaseRevocations(source: TerraSDK.Source) -> Swift.Bool
|
|
1073
|
+
public func savePendingRevocation(_ revocation: TerraSDK.PendingRevocation) throws
|
|
1074
|
+
public func removePendingRevocation(source: TerraSDK.Source, generation: Swift.Int) throws
|
|
1075
|
+
public func beginLink(source: TerraSDK.Source, owing revocation: TerraSDK.PendingRevocation?) throws -> TerraSDK.LinkTransition
|
|
1076
|
+
public func loadSyncAnchor(source: TerraSDK.Source, dataType: TerraSDK.UploadDataType) throws -> Foundation.Data?
|
|
1077
|
+
public func saveSyncAnchor(_ anchor: Foundation.Data, source: TerraSDK.Source, dataType: TerraSDK.UploadDataType, ifGeneration generation: Swift.Int) throws
|
|
1078
|
+
@_spi(Testing) public func forgetSyncState(source: TerraSDK.Source) throws
|
|
1079
|
+
}
|
|
1080
|
+
public struct MenstruationFlowDay : Swift.Sendable, Swift.Equatable, Swift.Identifiable {
|
|
1081
|
+
public enum Flow : Swift.String, Swift.Sendable, Swift.Hashable, Swift.CaseIterable {
|
|
1082
|
+
case unspecified
|
|
1083
|
+
case light
|
|
1084
|
+
case medium
|
|
1085
|
+
case heavy
|
|
1086
|
+
case noFlow
|
|
1087
|
+
public init?(rawValue: Swift.String)
|
|
1088
|
+
public typealias AllCases = [TerraSDK.MenstruationFlowDay.Flow]
|
|
1089
|
+
public typealias RawValue = Swift.String
|
|
1090
|
+
nonisolated public static var allCases: [TerraSDK.MenstruationFlowDay.Flow] {
|
|
1091
|
+
get
|
|
1092
|
+
}
|
|
1093
|
+
public var rawValue: Swift.String {
|
|
1094
|
+
get
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
public let id: Foundation.UUID
|
|
1098
|
+
public let interval: Foundation.DateInterval
|
|
1099
|
+
public let flow: TerraSDK.MenstruationFlowDay.Flow
|
|
1100
|
+
public let cycleStart: Swift.Bool
|
|
1101
|
+
public let source: TerraSDK.SampleSource
|
|
1102
|
+
public let userEntered: Swift.Bool
|
|
1103
|
+
public let timeZone: Foundation.TimeZone?
|
|
1104
|
+
public init(id: Foundation.UUID, interval: Foundation.DateInterval, flow: TerraSDK.MenstruationFlowDay.Flow, cycleStart: Swift.Bool, source: TerraSDK.SampleSource, userEntered: Swift.Bool = false, timeZone: Foundation.TimeZone? = nil)
|
|
1105
|
+
public static func == (a: TerraSDK.MenstruationFlowDay, b: TerraSDK.MenstruationFlowDay) -> Swift.Bool
|
|
1106
|
+
public typealias ID = Foundation.UUID
|
|
1107
|
+
}
|
|
1108
|
+
public struct MenstrualEvent : Swift.Sendable, Swift.Equatable, Swift.Identifiable {
|
|
1109
|
+
public enum Kind : Swift.String, Swift.Sendable, Swift.Hashable, Swift.CaseIterable {
|
|
1110
|
+
case intermenstrualBleeding
|
|
1111
|
+
case ovulationTest
|
|
1112
|
+
case cervicalMucus
|
|
1113
|
+
case sexualActivity
|
|
1114
|
+
case pregnancyTest
|
|
1115
|
+
case progesteroneTest
|
|
1116
|
+
case pregnancy
|
|
1117
|
+
case lactation
|
|
1118
|
+
case contraceptive
|
|
1119
|
+
case persistentIntermenstrualBleeding
|
|
1120
|
+
case infrequentCycles
|
|
1121
|
+
case irregularCycles
|
|
1122
|
+
case prolongedPeriods
|
|
1123
|
+
case bleedingDuringPregnancy
|
|
1124
|
+
case bleedingAfterPregnancy
|
|
1125
|
+
public var values: [Swift.String] {
|
|
1126
|
+
get
|
|
1127
|
+
}
|
|
1128
|
+
public init?(rawValue: Swift.String)
|
|
1129
|
+
public typealias AllCases = [TerraSDK.MenstrualEvent.Kind]
|
|
1130
|
+
public typealias RawValue = Swift.String
|
|
1131
|
+
nonisolated public static var allCases: [TerraSDK.MenstrualEvent.Kind] {
|
|
1132
|
+
get
|
|
1133
|
+
}
|
|
1134
|
+
public var rawValue: Swift.String {
|
|
1135
|
+
get
|
|
1136
|
+
}
|
|
1137
|
+
}
|
|
1138
|
+
public let id: Foundation.UUID
|
|
1139
|
+
public let kind: TerraSDK.MenstrualEvent.Kind
|
|
1140
|
+
public let instant: Foundation.Date
|
|
1141
|
+
public let value: Swift.String?
|
|
1142
|
+
public let source: TerraSDK.SampleSource
|
|
1143
|
+
public let userEntered: Swift.Bool
|
|
1144
|
+
public let timeZone: Foundation.TimeZone?
|
|
1145
|
+
public let storeIdentifier: Swift.String
|
|
1146
|
+
public init(id: Foundation.UUID, kind: TerraSDK.MenstrualEvent.Kind, storeIdentifier: Swift.String, instant: Foundation.Date, value: Swift.String? = nil, source: TerraSDK.SampleSource, userEntered: Swift.Bool = false, timeZone: Foundation.TimeZone? = nil)
|
|
1147
|
+
public static func == (a: TerraSDK.MenstrualEvent, b: TerraSDK.MenstrualEvent) -> Swift.Bool
|
|
1148
|
+
public typealias ID = Foundation.UUID
|
|
1149
|
+
}
|
|
1150
|
+
public struct DietaryQuantity : Swift.Sendable, Swift.Equatable, Swift.Identifiable {
|
|
1151
|
+
public let id: Foundation.UUID
|
|
1152
|
+
public let nutrient: TerraSDK.Nutrient
|
|
1153
|
+
public let value: Swift.Double
|
|
1154
|
+
public let interval: Foundation.DateInterval
|
|
1155
|
+
public let mealType: TerraSDK.MealType
|
|
1156
|
+
public let name: Swift.String?
|
|
1157
|
+
public let foodCorrelationID: Foundation.UUID?
|
|
1158
|
+
public let source: TerraSDK.SampleSource
|
|
1159
|
+
public let userEntered: Swift.Bool
|
|
1160
|
+
public let timeZone: Foundation.TimeZone?
|
|
1161
|
+
public init(id: Foundation.UUID, nutrient: TerraSDK.Nutrient, value: Swift.Double, interval: Foundation.DateInterval, mealType: TerraSDK.MealType = .unknown, name: Swift.String? = nil, foodCorrelationID: Foundation.UUID? = nil, source: TerraSDK.SampleSource, userEntered: Swift.Bool = false, timeZone: Foundation.TimeZone? = nil)
|
|
1162
|
+
public static func == (a: TerraSDK.DietaryQuantity, b: TerraSDK.DietaryQuantity) -> Swift.Bool
|
|
1163
|
+
public typealias ID = Foundation.UUID
|
|
1164
|
+
}
|
|
1165
|
+
public enum MealType : Swift.String, Swift.Sendable, Swift.Hashable, Swift.CaseIterable {
|
|
1166
|
+
case breakfast
|
|
1167
|
+
case lunch
|
|
1168
|
+
case dinner
|
|
1169
|
+
case snack
|
|
1170
|
+
case unknown
|
|
1171
|
+
public init?(rawValue: Swift.String)
|
|
1172
|
+
public typealias AllCases = [TerraSDK.MealType]
|
|
1173
|
+
public typealias RawValue = Swift.String
|
|
1174
|
+
nonisolated public static var allCases: [TerraSDK.MealType] {
|
|
1175
|
+
get
|
|
1176
|
+
}
|
|
1177
|
+
public var rawValue: Swift.String {
|
|
1178
|
+
get
|
|
1179
|
+
}
|
|
1180
|
+
}
|
|
1181
|
+
public enum Nutrient : Swift.String, Swift.Sendable, Swift.Hashable, Swift.CaseIterable {
|
|
1182
|
+
case energyConsumed
|
|
1183
|
+
case protein
|
|
1184
|
+
case carbohydrates
|
|
1185
|
+
case fatTotal
|
|
1186
|
+
case fatSaturated
|
|
1187
|
+
case fatMonounsaturated
|
|
1188
|
+
case fatPolyunsaturated
|
|
1189
|
+
case sugar
|
|
1190
|
+
case fiber
|
|
1191
|
+
case cholesterol
|
|
1192
|
+
case sodium
|
|
1193
|
+
case potassium
|
|
1194
|
+
case calcium
|
|
1195
|
+
case iron
|
|
1196
|
+
case magnesium
|
|
1197
|
+
case zinc
|
|
1198
|
+
case phosphorus
|
|
1199
|
+
case iodine
|
|
1200
|
+
case manganese
|
|
1201
|
+
case molybdenum
|
|
1202
|
+
case selenium
|
|
1203
|
+
case copper
|
|
1204
|
+
case chromium
|
|
1205
|
+
case chloride
|
|
1206
|
+
case caffeine
|
|
1207
|
+
case vitaminA
|
|
1208
|
+
case vitaminC
|
|
1209
|
+
case vitaminD
|
|
1210
|
+
case vitaminE
|
|
1211
|
+
case vitaminK
|
|
1212
|
+
case vitaminB6
|
|
1213
|
+
case vitaminB12
|
|
1214
|
+
case thiamin
|
|
1215
|
+
case riboflavin
|
|
1216
|
+
case niacin
|
|
1217
|
+
case folate
|
|
1218
|
+
case biotin
|
|
1219
|
+
case pantothenicAcid
|
|
1220
|
+
public var unit: Swift.String {
|
|
1221
|
+
get
|
|
1222
|
+
}
|
|
1223
|
+
public init?(rawValue: Swift.String)
|
|
1224
|
+
public typealias AllCases = [TerraSDK.Nutrient]
|
|
1225
|
+
public typealias RawValue = Swift.String
|
|
1226
|
+
nonisolated public static var allCases: [TerraSDK.Nutrient] {
|
|
1227
|
+
get
|
|
1228
|
+
}
|
|
1229
|
+
public var rawValue: Swift.String {
|
|
1230
|
+
get
|
|
1231
|
+
}
|
|
1232
|
+
}
|
|
1233
|
+
public struct HydrationSample : Swift.Sendable, Swift.Equatable, Swift.Identifiable {
|
|
1234
|
+
public let id: Foundation.UUID
|
|
1235
|
+
public let interval: Foundation.DateInterval
|
|
1236
|
+
public let millilitres: Swift.Double
|
|
1237
|
+
public let source: TerraSDK.SampleSource
|
|
1238
|
+
public let userEntered: Swift.Bool
|
|
1239
|
+
public let timeZone: Foundation.TimeZone?
|
|
1240
|
+
public init(id: Foundation.UUID, interval: Foundation.DateInterval, millilitres: Swift.Double, source: TerraSDK.SampleSource, userEntered: Swift.Bool = false, timeZone: Foundation.TimeZone? = nil)
|
|
1241
|
+
public static func == (a: TerraSDK.HydrationSample, b: TerraSDK.HydrationSample) -> Swift.Bool
|
|
1242
|
+
public typealias ID = Foundation.UUID
|
|
1243
|
+
}
|
|
1244
|
+
public struct PlannedWorkout : Swift.Sendable, Swift.Equatable, Swift.Identifiable, Swift.Decodable {
|
|
1245
|
+
public let id: Swift.String
|
|
1246
|
+
public let plannedOn: Foundation.DateComponents
|
|
1247
|
+
public let activity: TerraSDK.WorkoutActivity
|
|
1248
|
+
public let title: Swift.String?
|
|
1249
|
+
public let completedAt: Foundation.Date?
|
|
1250
|
+
public init(id: Swift.String, plannedOn: Foundation.DateComponents, activity: TerraSDK.WorkoutActivity, title: Swift.String? = nil, completedAt: Foundation.Date? = nil)
|
|
1251
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
1252
|
+
public static func == (a: TerraSDK.PlannedWorkout, b: TerraSDK.PlannedWorkout) -> Swift.Bool
|
|
1253
|
+
public typealias ID = Swift.String
|
|
1254
|
+
}
|
|
1255
|
+
public struct SampleSource : Swift.Sendable, Swift.Equatable, Swift.Hashable {
|
|
1256
|
+
public let name: Swift.String
|
|
1257
|
+
public let bundleID: Swift.String
|
|
1258
|
+
public let productType: Swift.String?
|
|
1259
|
+
public let deviceType: TerraSDK.DeviceType?
|
|
1260
|
+
public init(name: Swift.String, bundleID: Swift.String, productType: Swift.String? = nil, deviceType: TerraSDK.DeviceType? = nil)
|
|
1261
|
+
public static func == (a: TerraSDK.SampleSource, b: TerraSDK.SampleSource) -> Swift.Bool
|
|
1262
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
1263
|
+
public var hashValue: Swift.Int {
|
|
1264
|
+
get
|
|
1265
|
+
}
|
|
1266
|
+
}
|
|
1267
|
+
public enum DeviceType : Swift.String, Swift.Sendable, Swift.Hashable, Swift.CaseIterable {
|
|
1268
|
+
case phone
|
|
1269
|
+
case scale
|
|
1270
|
+
case sensor
|
|
1271
|
+
public init?(rawValue: Swift.String)
|
|
1272
|
+
public typealias AllCases = [TerraSDK.DeviceType]
|
|
1273
|
+
public typealias RawValue = Swift.String
|
|
1274
|
+
nonisolated public static var allCases: [TerraSDK.DeviceType] {
|
|
1275
|
+
get
|
|
1276
|
+
}
|
|
1277
|
+
public var rawValue: Swift.String {
|
|
1278
|
+
get
|
|
1279
|
+
}
|
|
1280
|
+
}
|
|
1281
|
+
public enum MotionContext : Swift.String, Swift.Sendable, Swift.Equatable {
|
|
1282
|
+
case unknown
|
|
1283
|
+
case sedentary
|
|
1284
|
+
case active
|
|
1285
|
+
public init?(rawValue: Swift.String)
|
|
1286
|
+
public typealias RawValue = Swift.String
|
|
1287
|
+
public var rawValue: Swift.String {
|
|
1288
|
+
get
|
|
1289
|
+
}
|
|
1290
|
+
}
|
|
1291
|
+
public struct HeartRateSample : Swift.Sendable, Swift.Equatable, Swift.Identifiable {
|
|
1292
|
+
public let id: Foundation.UUID
|
|
1293
|
+
public let time: Foundation.Date
|
|
1294
|
+
public let beatsPerMinute: Swift.Double
|
|
1295
|
+
public let source: TerraSDK.SampleSource
|
|
1296
|
+
public let motionContext: TerraSDK.MotionContext?
|
|
1297
|
+
public let userEntered: Swift.Bool
|
|
1298
|
+
public let timeZone: Foundation.TimeZone?
|
|
1299
|
+
public init(id: Foundation.UUID, time: Foundation.Date, beatsPerMinute: Swift.Double, source: TerraSDK.SampleSource, motionContext: TerraSDK.MotionContext? = nil, userEntered: Swift.Bool = false, timeZone: Foundation.TimeZone? = nil)
|
|
1300
|
+
public static func == (a: TerraSDK.HeartRateSample, b: TerraSDK.HeartRateSample) -> Swift.Bool
|
|
1301
|
+
public typealias ID = Foundation.UUID
|
|
1302
|
+
}
|
|
1303
|
+
public struct StepCount : Swift.Sendable, Swift.Equatable, Swift.Identifiable {
|
|
1304
|
+
public let interval: Foundation.DateInterval
|
|
1305
|
+
public let steps: Swift.Int
|
|
1306
|
+
public let source: TerraSDK.SampleSource
|
|
1307
|
+
public let userEntered: Swift.Bool
|
|
1308
|
+
public let uuid: Foundation.UUID?
|
|
1309
|
+
public let timeZone: Foundation.TimeZone?
|
|
1310
|
+
public var id: Swift.String {
|
|
1311
|
+
get
|
|
1312
|
+
}
|
|
1313
|
+
public init(interval: Foundation.DateInterval, steps: Swift.Int, source: TerraSDK.SampleSource, userEntered: Swift.Bool = false, timeZone: Foundation.TimeZone? = nil, uuid: Foundation.UUID? = nil)
|
|
1314
|
+
public static func == (a: TerraSDK.StepCount, b: TerraSDK.StepCount) -> Swift.Bool
|
|
1315
|
+
public typealias ID = Swift.String
|
|
1316
|
+
}
|
|
1317
|
+
public struct RestingHeartRateSample : Swift.Sendable, Swift.Equatable, Swift.Identifiable {
|
|
1318
|
+
public let id: Foundation.UUID
|
|
1319
|
+
public let interval: Foundation.DateInterval
|
|
1320
|
+
public let beatsPerMinute: Swift.Double
|
|
1321
|
+
public let source: TerraSDK.SampleSource
|
|
1322
|
+
public let userEntered: Swift.Bool
|
|
1323
|
+
public let timeZone: Foundation.TimeZone?
|
|
1324
|
+
public init(id: Foundation.UUID, interval: Foundation.DateInterval, beatsPerMinute: Swift.Double, source: TerraSDK.SampleSource, userEntered: Swift.Bool = false, timeZone: Foundation.TimeZone? = nil)
|
|
1325
|
+
public static func == (a: TerraSDK.RestingHeartRateSample, b: TerraSDK.RestingHeartRateSample) -> Swift.Bool
|
|
1326
|
+
public typealias ID = Foundation.UUID
|
|
1327
|
+
}
|
|
1328
|
+
public struct SleepSegment : Swift.Sendable, Swift.Equatable, Swift.Identifiable {
|
|
1329
|
+
public let id: Foundation.UUID
|
|
1330
|
+
public let interval: Foundation.DateInterval
|
|
1331
|
+
public let stage: TerraSDK.SleepStage
|
|
1332
|
+
public let source: TerraSDK.SampleSource
|
|
1333
|
+
public let userEntered: Swift.Bool
|
|
1334
|
+
public let timeZone: Foundation.TimeZone?
|
|
1335
|
+
public init(id: Foundation.UUID, interval: Foundation.DateInterval, stage: TerraSDK.SleepStage, source: TerraSDK.SampleSource, userEntered: Swift.Bool = false, timeZone: Foundation.TimeZone? = nil)
|
|
1336
|
+
public static func == (a: TerraSDK.SleepSegment, b: TerraSDK.SleepSegment) -> Swift.Bool
|
|
1337
|
+
public typealias ID = Foundation.UUID
|
|
1338
|
+
}
|
|
1339
|
+
public enum SleepStage : Swift.Sendable, Swift.Equatable {
|
|
1340
|
+
case inBed
|
|
1341
|
+
case awake
|
|
1342
|
+
case asleep
|
|
1343
|
+
case light
|
|
1344
|
+
case deep
|
|
1345
|
+
case rem
|
|
1346
|
+
case unknown(Swift.String)
|
|
1347
|
+
public static func == (a: TerraSDK.SleepStage, b: TerraSDK.SleepStage) -> Swift.Bool
|
|
1348
|
+
}
|
|
1349
|
+
public struct Workout : Swift.Sendable, Swift.Equatable, Swift.Identifiable {
|
|
1350
|
+
public let id: Foundation.UUID
|
|
1351
|
+
public let interval: Foundation.DateInterval
|
|
1352
|
+
public let activity: TerraSDK.WorkoutActivity
|
|
1353
|
+
public let activityTypeCode: Swift.Int
|
|
1354
|
+
public let indoor: Swift.Bool
|
|
1355
|
+
public let activeEnergyKilocalories: Swift.Double?
|
|
1356
|
+
public let distanceMeters: Swift.Double?
|
|
1357
|
+
public let source: TerraSDK.SampleSource
|
|
1358
|
+
public let userEntered: Swift.Bool
|
|
1359
|
+
public let timeZone: Foundation.TimeZone?
|
|
1360
|
+
public let stats: TerraSDK.WorkoutStats?
|
|
1361
|
+
public let events: [TerraSDK.WorkoutEvent]
|
|
1362
|
+
public let title: Swift.String?
|
|
1363
|
+
public init(id: Foundation.UUID, interval: Foundation.DateInterval, activity: TerraSDK.WorkoutActivity, activityTypeCode: Swift.Int, indoor: Swift.Bool = false, activeEnergyKilocalories: Swift.Double? = nil, distanceMeters: Swift.Double? = nil, source: TerraSDK.SampleSource, userEntered: Swift.Bool = false, timeZone: Foundation.TimeZone? = nil, stats: TerraSDK.WorkoutStats? = nil, events: [TerraSDK.WorkoutEvent] = [], title: Swift.String? = nil)
|
|
1364
|
+
public static func == (a: TerraSDK.Workout, b: TerraSDK.Workout) -> Swift.Bool
|
|
1365
|
+
public typealias ID = Foundation.UUID
|
|
1366
|
+
}
|
|
1367
|
+
public struct WorkoutStats : Swift.Sendable, Swift.Equatable {
|
|
1368
|
+
public let steps: Swift.Int?
|
|
1369
|
+
public let basalEnergyKilocalories: Swift.Double?
|
|
1370
|
+
public let swimmingStrokes: Swift.Int?
|
|
1371
|
+
public let swimmingLaps: Swift.Int?
|
|
1372
|
+
public let elevationGainMeters: Swift.Double?
|
|
1373
|
+
public var isEmpty: Swift.Bool {
|
|
1374
|
+
get
|
|
1375
|
+
}
|
|
1376
|
+
public init(steps: Swift.Int? = nil, basalEnergyKilocalories: Swift.Double? = nil, swimmingStrokes: Swift.Int? = nil, swimmingLaps: Swift.Int? = nil, elevationGainMeters: Swift.Double? = nil)
|
|
1377
|
+
public static func == (a: TerraSDK.WorkoutStats, b: TerraSDK.WorkoutStats) -> Swift.Bool
|
|
1378
|
+
}
|
|
1379
|
+
public struct WorkoutEvent : Swift.Sendable, Swift.Equatable {
|
|
1380
|
+
public enum Kind : Swift.String, Swift.Sendable, Swift.CaseIterable {
|
|
1381
|
+
case lap
|
|
1382
|
+
case segment
|
|
1383
|
+
case pause
|
|
1384
|
+
case resume
|
|
1385
|
+
case marker
|
|
1386
|
+
public init?(rawValue: Swift.String)
|
|
1387
|
+
public typealias AllCases = [TerraSDK.WorkoutEvent.Kind]
|
|
1388
|
+
public typealias RawValue = Swift.String
|
|
1389
|
+
nonisolated public static var allCases: [TerraSDK.WorkoutEvent.Kind] {
|
|
1390
|
+
get
|
|
1391
|
+
}
|
|
1392
|
+
public var rawValue: Swift.String {
|
|
1393
|
+
get
|
|
1394
|
+
}
|
|
1395
|
+
}
|
|
1396
|
+
public let kind: TerraSDK.WorkoutEvent.Kind
|
|
1397
|
+
public let interval: Foundation.DateInterval
|
|
1398
|
+
public init(kind: TerraSDK.WorkoutEvent.Kind, interval: Foundation.DateInterval)
|
|
1399
|
+
public static func == (a: TerraSDK.WorkoutEvent, b: TerraSDK.WorkoutEvent) -> Swift.Bool
|
|
1400
|
+
}
|
|
1401
|
+
public struct WorkoutIntensitySample : Swift.Sendable, Swift.Equatable, Swift.Identifiable {
|
|
1402
|
+
public enum Kind : Swift.String, Swift.Sendable, Swift.CaseIterable {
|
|
1403
|
+
case speed
|
|
1404
|
+
case power
|
|
1405
|
+
case cadence
|
|
1406
|
+
public var unit: Swift.String {
|
|
1407
|
+
get
|
|
1408
|
+
}
|
|
1409
|
+
public init?(rawValue: Swift.String)
|
|
1410
|
+
public typealias AllCases = [TerraSDK.WorkoutIntensitySample.Kind]
|
|
1411
|
+
public typealias RawValue = Swift.String
|
|
1412
|
+
nonisolated public static var allCases: [TerraSDK.WorkoutIntensitySample.Kind] {
|
|
1413
|
+
get
|
|
1414
|
+
}
|
|
1415
|
+
public var rawValue: Swift.String {
|
|
1416
|
+
get
|
|
1417
|
+
}
|
|
1418
|
+
}
|
|
1419
|
+
public let id: Foundation.UUID
|
|
1420
|
+
public let kind: TerraSDK.WorkoutIntensitySample.Kind
|
|
1421
|
+
public let workoutId: Foundation.UUID
|
|
1422
|
+
public let interval: Foundation.DateInterval
|
|
1423
|
+
public let value: Swift.Double
|
|
1424
|
+
public let source: TerraSDK.SampleSource
|
|
1425
|
+
public let userEntered: Swift.Bool
|
|
1426
|
+
public let timeZone: Foundation.TimeZone?
|
|
1427
|
+
public init(id: Foundation.UUID, kind: TerraSDK.WorkoutIntensitySample.Kind, workoutId: Foundation.UUID, interval: Foundation.DateInterval, value: Swift.Double, source: TerraSDK.SampleSource, userEntered: Swift.Bool = false, timeZone: Foundation.TimeZone? = nil)
|
|
1428
|
+
public static func == (a: TerraSDK.WorkoutIntensitySample, b: TerraSDK.WorkoutIntensitySample) -> Swift.Bool
|
|
1429
|
+
public typealias ID = Foundation.UUID
|
|
1430
|
+
}
|
|
1431
|
+
public enum WorkoutActivity : Swift.Sendable, Swift.Hashable {
|
|
1432
|
+
case running
|
|
1433
|
+
case walking
|
|
1434
|
+
case cycling
|
|
1435
|
+
case swimming
|
|
1436
|
+
case strengthTraining
|
|
1437
|
+
case other(Swift.String)
|
|
1438
|
+
public static func == (a: TerraSDK.WorkoutActivity, b: TerraSDK.WorkoutActivity) -> Swift.Bool
|
|
1439
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
1440
|
+
public var hashValue: Swift.Int {
|
|
1441
|
+
get
|
|
1442
|
+
}
|
|
1443
|
+
}
|
|
1444
|
+
public struct DayTotal : Swift.Sendable, Swift.Equatable {
|
|
1445
|
+
public enum Metric : Swift.String, Swift.Sendable, Swift.CaseIterable {
|
|
1446
|
+
case steps
|
|
1447
|
+
case distanceWalkingRunning
|
|
1448
|
+
case distanceCycling
|
|
1449
|
+
case distanceSwimming
|
|
1450
|
+
case distanceWheelchair
|
|
1451
|
+
case activeEnergyBurned
|
|
1452
|
+
case basalEnergyBurned
|
|
1453
|
+
case flightsClimbed
|
|
1454
|
+
case swimmingStrokeCount
|
|
1455
|
+
case appleExerciseTime
|
|
1456
|
+
case appleMoveTime
|
|
1457
|
+
case appleStandTime
|
|
1458
|
+
case appleStandHours
|
|
1459
|
+
public var intradayKind: TerraSDK.IntradaySample.Kind? {
|
|
1460
|
+
get
|
|
1461
|
+
}
|
|
1462
|
+
public var unit: Swift.String {
|
|
1463
|
+
get
|
|
1464
|
+
}
|
|
1465
|
+
public init?(rawValue: Swift.String)
|
|
1466
|
+
public typealias AllCases = [TerraSDK.DayTotal.Metric]
|
|
1467
|
+
public typealias RawValue = Swift.String
|
|
1468
|
+
nonisolated public static var allCases: [TerraSDK.DayTotal.Metric] {
|
|
1469
|
+
get
|
|
1470
|
+
}
|
|
1471
|
+
public var rawValue: Swift.String {
|
|
1472
|
+
get
|
|
1473
|
+
}
|
|
1474
|
+
}
|
|
1475
|
+
public let metric: TerraSDK.DayTotal.Metric
|
|
1476
|
+
public let interval: Foundation.DateInterval
|
|
1477
|
+
public let value: Swift.Double
|
|
1478
|
+
public let unit: Swift.String
|
|
1479
|
+
public let timeZone: Foundation.TimeZone?
|
|
1480
|
+
public init(metric: TerraSDK.DayTotal.Metric, interval: Foundation.DateInterval, value: Swift.Double, unit: Swift.String, timeZone: Foundation.TimeZone? = nil)
|
|
1481
|
+
public static func == (a: TerraSDK.DayTotal, b: TerraSDK.DayTotal) -> Swift.Bool
|
|
1482
|
+
}
|
|
1483
|
+
public struct DayTotalPolicy : Swift.Sendable, Swift.Equatable {
|
|
1484
|
+
public var excludeUserEntered: Swift.Bool
|
|
1485
|
+
public init(excludeUserEntered: Swift.Bool = false)
|
|
1486
|
+
public static let `default`: TerraSDK.DayTotalPolicy
|
|
1487
|
+
public static func == (a: TerraSDK.DayTotalPolicy, b: TerraSDK.DayTotalPolicy) -> Swift.Bool
|
|
1488
|
+
}
|
|
1489
|
+
public struct IntradaySample : Swift.Sendable, Swift.Equatable, Swift.Identifiable {
|
|
1490
|
+
public enum Kind : Swift.String, Swift.Sendable, Swift.CaseIterable {
|
|
1491
|
+
case activeEnergy
|
|
1492
|
+
case basalEnergy
|
|
1493
|
+
case distance
|
|
1494
|
+
case floorsClimbed
|
|
1495
|
+
public var unit: Swift.String {
|
|
1496
|
+
get
|
|
1497
|
+
}
|
|
1498
|
+
public init?(rawValue: Swift.String)
|
|
1499
|
+
public typealias AllCases = [TerraSDK.IntradaySample.Kind]
|
|
1500
|
+
public typealias RawValue = Swift.String
|
|
1501
|
+
nonisolated public static var allCases: [TerraSDK.IntradaySample.Kind] {
|
|
1502
|
+
get
|
|
1503
|
+
}
|
|
1504
|
+
public var rawValue: Swift.String {
|
|
1505
|
+
get
|
|
1506
|
+
}
|
|
1507
|
+
}
|
|
1508
|
+
public let id: Foundation.UUID
|
|
1509
|
+
public let kind: TerraSDK.IntradaySample.Kind
|
|
1510
|
+
public let interval: Foundation.DateInterval
|
|
1511
|
+
public let value: Swift.Double
|
|
1512
|
+
public let source: TerraSDK.SampleSource
|
|
1513
|
+
public let userEntered: Swift.Bool
|
|
1514
|
+
public let timeZone: Foundation.TimeZone?
|
|
1515
|
+
public init(id: Foundation.UUID, kind: TerraSDK.IntradaySample.Kind, interval: Foundation.DateInterval, value: Swift.Double, source: TerraSDK.SampleSource, userEntered: Swift.Bool = false, timeZone: Foundation.TimeZone? = nil)
|
|
1516
|
+
public static func == (a: TerraSDK.IntradaySample, b: TerraSDK.IntradaySample) -> Swift.Bool
|
|
1517
|
+
public typealias ID = Foundation.UUID
|
|
1518
|
+
}
|
|
1519
|
+
public struct WorkoutRoute : Swift.Sendable, Swift.Equatable, Swift.Identifiable {
|
|
1520
|
+
public let id: Foundation.UUID
|
|
1521
|
+
public let workoutId: Foundation.UUID
|
|
1522
|
+
public let interval: Foundation.DateInterval
|
|
1523
|
+
public let points: [TerraSDK.RoutePoint]
|
|
1524
|
+
public let source: TerraSDK.SampleSource
|
|
1525
|
+
public let timeZone: Foundation.TimeZone?
|
|
1526
|
+
public init(id: Foundation.UUID, workoutId: Foundation.UUID, interval: Foundation.DateInterval, points: [TerraSDK.RoutePoint], source: TerraSDK.SampleSource, timeZone: Foundation.TimeZone? = nil)
|
|
1527
|
+
public static let minimumSecondsBetweenPoints: Swift.Double
|
|
1528
|
+
public static let maximumPoints: Swift.Int
|
|
1529
|
+
public static func withinCaps(_ points: [TerraSDK.RoutePoint]) -> [TerraSDK.RoutePoint]
|
|
1530
|
+
public static func == (a: TerraSDK.WorkoutRoute, b: TerraSDK.WorkoutRoute) -> Swift.Bool
|
|
1531
|
+
public typealias ID = Foundation.UUID
|
|
1532
|
+
}
|
|
1533
|
+
public struct RoutePoint : Swift.Sendable, Swift.Equatable, Swift.Hashable {
|
|
1534
|
+
public let time: Foundation.Date
|
|
1535
|
+
public let latitude: Swift.Double
|
|
1536
|
+
public let longitude: Swift.Double
|
|
1537
|
+
public init(time: Foundation.Date, latitude: Swift.Double, longitude: Swift.Double)
|
|
1538
|
+
public static func == (a: TerraSDK.RoutePoint, b: TerraSDK.RoutePoint) -> Swift.Bool
|
|
1539
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
1540
|
+
public var hashValue: Swift.Int {
|
|
1541
|
+
get
|
|
1542
|
+
}
|
|
1543
|
+
}
|
|
1544
|
+
public struct LinkTransition : Swift.Sendable, Swift.Hashable {
|
|
1545
|
+
public let opened: Swift.Int
|
|
1546
|
+
public let ended: Swift.Int?
|
|
1547
|
+
public init(opened: Swift.Int, ended: Swift.Int?)
|
|
1548
|
+
public static func == (a: TerraSDK.LinkTransition, b: TerraSDK.LinkTransition) -> Swift.Bool
|
|
1549
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
1550
|
+
public var hashValue: Swift.Int {
|
|
1551
|
+
get
|
|
1552
|
+
}
|
|
1553
|
+
}
|
|
1554
|
+
public struct StoredConnection : Swift.Sendable, Swift.Equatable, Swift.Codable {
|
|
1555
|
+
public let source: TerraSDK.Source
|
|
1556
|
+
public let userID: Swift.String
|
|
1557
|
+
public var providerUserID: Swift.String
|
|
1558
|
+
public var generation: Swift.Int
|
|
1559
|
+
public var devID: Swift.String
|
|
1560
|
+
public var revokedAt: Foundation.Date?
|
|
1561
|
+
public var dayZones: [TerraSDK.DayZoneStretch]
|
|
1562
|
+
public var endUser: Swift.String?
|
|
1563
|
+
public init(source: TerraSDK.Source, userID: Swift.String, providerUserID: Swift.String = "", generation: Swift.Int = 0, devID: Swift.String = "", revokedAt: Foundation.Date? = nil, dayZones: [TerraSDK.DayZoneStretch] = [], endUser: Swift.String? = nil)
|
|
1564
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
1565
|
+
public static func == (a: TerraSDK.StoredConnection, b: TerraSDK.StoredConnection) -> Swift.Bool
|
|
1566
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
1567
|
+
}
|
|
1568
|
+
public struct DayZoneStretch : Swift.Sendable, Swift.Equatable, Swift.Codable {
|
|
1569
|
+
public let start: Foundation.Date
|
|
1570
|
+
public let end: Foundation.Date
|
|
1571
|
+
public let zone: Swift.String
|
|
1572
|
+
public init(start: Foundation.Date, end: Foundation.Date, zone: Swift.String)
|
|
1573
|
+
public static let limit: Swift.Int
|
|
1574
|
+
public static func == (a: TerraSDK.DayZoneStretch, b: TerraSDK.DayZoneStretch) -> Swift.Bool
|
|
1575
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
1576
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
1577
|
+
}
|
|
1578
|
+
public struct StoredBackfillRequest : Swift.Sendable, Swift.Equatable, Swift.Codable {
|
|
1579
|
+
public let reference: Swift.String
|
|
1580
|
+
public let dataType: TerraSDK.UploadDataType
|
|
1581
|
+
public let start: Foundation.Date
|
|
1582
|
+
public let end: Foundation.Date
|
|
1583
|
+
public var servedThrough: Foundation.Date
|
|
1584
|
+
public var failedRuns: Swift.Int
|
|
1585
|
+
public let receivedAt: Foundation.Date
|
|
1586
|
+
public static let queueLimit: Swift.Int
|
|
1587
|
+
public init(reference: Swift.String, dataType: TerraSDK.UploadDataType, start: Foundation.Date, end: Foundation.Date, servedThrough: Foundation.Date? = nil, failedRuns: Swift.Int = 0, receivedAt: Foundation.Date)
|
|
1588
|
+
public static func == (a: TerraSDK.StoredBackfillRequest, b: TerraSDK.StoredBackfillRequest) -> Swift.Bool
|
|
1589
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
1590
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
1591
|
+
}
|
|
1592
|
+
public struct PendingRevocation : Swift.Sendable, Swift.Equatable, Swift.Codable {
|
|
1593
|
+
public let source: TerraSDK.Source
|
|
1594
|
+
public let providerUserID: Swift.String
|
|
1595
|
+
public let generation: Swift.Int
|
|
1596
|
+
public var attempts: Swift.Int
|
|
1597
|
+
public let deferredAt: Foundation.Date
|
|
1598
|
+
public var isDeliverable: Swift.Bool {
|
|
1599
|
+
get
|
|
1600
|
+
}
|
|
1601
|
+
public init(source: TerraSDK.Source, providerUserID: Swift.String, generation: Swift.Int, attempts: Swift.Int = 0, deferredAt: Foundation.Date)
|
|
1602
|
+
public static func == (a: TerraSDK.PendingRevocation, b: TerraSDK.PendingRevocation) -> Swift.Bool
|
|
1603
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
1604
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
1605
|
+
}
|
|
1606
|
+
public struct LinkDiagnostics : Swift.Sendable, Swift.Equatable {
|
|
1607
|
+
public let generation: Swift.Int
|
|
1608
|
+
public let lastDelivery: Foundation.Date?
|
|
1609
|
+
public let isRetrying: Swift.Bool
|
|
1610
|
+
public let isRevoked: Swift.Bool
|
|
1611
|
+
public init(generation: Swift.Int, lastDelivery: Foundation.Date?, isRetrying: Swift.Bool, isRevoked: Swift.Bool)
|
|
1612
|
+
public static func == (a: TerraSDK.LinkDiagnostics, b: TerraSDK.LinkDiagnostics) -> Swift.Bool
|
|
1613
|
+
}
|
|
1614
|
+
public protocol DeviceStore : Swift.Sendable {
|
|
1615
|
+
func loadConnection(source: TerraSDK.Source) throws -> TerraSDK.StoredConnection?
|
|
1616
|
+
var storageDomain: Swift.String { get }
|
|
1617
|
+
func activeDevID() throws -> Swift.String?
|
|
1618
|
+
@discardableResult
|
|
1619
|
+
func claimDevID(_ devID: Swift.String) throws -> Swift.Bool
|
|
1620
|
+
func loadRequestedAccess() throws -> TerraSDK.HealthAccess
|
|
1621
|
+
@discardableResult
|
|
1622
|
+
func recordRequestedAccess(_ access: TerraSDK.HealthAccess) throws -> TerraSDK.HealthAccess
|
|
1623
|
+
func loadProviderUserID() throws -> Swift.String?
|
|
1624
|
+
func saveProviderUserID(_ id: Swift.String) throws
|
|
1625
|
+
func loadSyncedThrough(source: TerraSDK.Source, dataType: TerraSDK.UploadDataType) throws -> Foundation.Date?
|
|
1626
|
+
func saveSyncedThrough(_ date: Foundation.Date, source: TerraSDK.Source, dataType: TerraSDK.UploadDataType, ifGeneration generation: Swift.Int) throws
|
|
1627
|
+
func loadSyncedFrom(source: TerraSDK.Source, dataType: TerraSDK.UploadDataType) throws -> Foundation.Date?
|
|
1628
|
+
func saveSyncedFrom(_ date: Foundation.Date, source: TerraSDK.Source, dataType: TerraSDK.UploadDataType, ifGeneration generation: Swift.Int) throws
|
|
1629
|
+
func loadServerBackfills(source: TerraSDK.Source) throws -> [TerraSDK.StoredBackfillRequest]
|
|
1630
|
+
@discardableResult
|
|
1631
|
+
func upsertServerBackfill(_ request: TerraSDK.StoredBackfillRequest, source: TerraSDK.Source, ifGeneration generation: Swift.Int) throws -> Swift.Bool
|
|
1632
|
+
func removeServerBackfill(reference: Swift.String, source: TerraSDK.Source, ifGeneration generation: Swift.Int) throws
|
|
1633
|
+
func beginLink(source: TerraSDK.Source, owing revocation: TerraSDK.PendingRevocation?) throws -> TerraSDK.LinkTransition
|
|
1634
|
+
func completeLink(_ connection: TerraSDK.StoredConnection) throws
|
|
1635
|
+
@discardableResult
|
|
1636
|
+
func updateConnection(_ connection: TerraSDK.StoredConnection, ifGeneration generation: Swift.Int) throws -> Swift.Bool
|
|
1637
|
+
@discardableResult
|
|
1638
|
+
func endLink(source: TerraSDK.Source, ifGeneration generation: Swift.Int?, owing revocation: TerraSDK.PendingRevocation?) throws -> Swift.Int?
|
|
1639
|
+
func claimSync(source: TerraSDK.Source, dataType: TerraSDK.UploadDataType, generation: Swift.Int) -> Swift.Bool
|
|
1640
|
+
func releaseSync(source: TerraSDK.Source, dataType: TerraSDK.UploadDataType, generation: Swift.Int)
|
|
1641
|
+
func beginRetry(source: TerraSDK.Source, dataType: TerraSDK.UploadDataType, generation: Swift.Int)
|
|
1642
|
+
func endRetry(source: TerraSDK.Source, dataType: TerraSDK.UploadDataType, generation: Swift.Int)
|
|
1643
|
+
func lastWakeSync(source: TerraSDK.Source, dataType: TerraSDK.UploadDataType) -> Foundation.Date?
|
|
1644
|
+
func noteWakeSync(source: TerraSDK.Source, dataType: TerraSDK.UploadDataType, at time: Foundation.Date)
|
|
1645
|
+
func pausedUntil(source: TerraSDK.Source) -> Foundation.Date?
|
|
1646
|
+
func pause(source: TerraSDK.Source, until: Foundation.Date)
|
|
1647
|
+
func linkDiagnostics(source: TerraSDK.Source) throws -> TerraSDK.LinkDiagnostics?
|
|
1648
|
+
func saveLastDelivery(_ date: Foundation.Date, source: TerraSDK.Source, ifGeneration generation: Swift.Int) throws
|
|
1649
|
+
func loadDiagnosticsSends() throws -> [TerraSDK.DiagnosticsSend]
|
|
1650
|
+
func reserveDiagnosticsSend(_ send: TerraSDK.DiagnosticsSend, notWithin interval: Foundation.TimeInterval, automaticLimit limit: Swift.Int?) throws -> Swift.Bool
|
|
1651
|
+
func releaseDiagnosticsSend(_ send: TerraSDK.DiagnosticsSend) throws
|
|
1652
|
+
func loadObservationAnchor(key: Swift.String) throws -> Foundation.Data?
|
|
1653
|
+
func saveObservationAnchor(_ anchor: Foundation.Data, key: Swift.String) throws
|
|
1654
|
+
func linkGeneration(source: TerraSDK.Source) -> Swift.Int
|
|
1655
|
+
func claimWakeSync(_ category: TerraSDK.DataCategory, source: TerraSDK.Source, dataType: TerraSDK.UploadDataType, generation: Swift.Int) -> Swift.Bool
|
|
1656
|
+
func takeWakesOwed(source: TerraSDK.Source, dataType: TerraSDK.UploadDataType, generation: Swift.Int) -> Swift.Set<TerraSDK.DataCategory>
|
|
1657
|
+
func releaseWakeSync(source: TerraSDK.Source, dataType: TerraSDK.UploadDataType, generation: Swift.Int) -> Swift.Set<TerraSDK.DataCategory>
|
|
1658
|
+
func loadDeferredObservations(source: TerraSDK.Source) throws -> [TerraSDK.DataCategory : TerraSDK.DeferredWake]
|
|
1659
|
+
@discardableResult
|
|
1660
|
+
func deferObservation(_ category: TerraSDK.DataCategory, source: TerraSDK.Source, generation: Swift.Int) throws -> TerraSDK.DeferredWake
|
|
1661
|
+
func retireObservation(_ category: TerraSDK.DataCategory, source: TerraSDK.Source, ifStillAt wake: TerraSDK.DeferredWake) throws
|
|
1662
|
+
func loadPendingRevocations(source: TerraSDK.Source) throws -> [TerraSDK.PendingRevocation]
|
|
1663
|
+
func savePendingRevocation(_ revocation: TerraSDK.PendingRevocation) throws
|
|
1664
|
+
func removePendingRevocation(source: TerraSDK.Source, generation: Swift.Int) throws
|
|
1665
|
+
func claimRevocations(source: TerraSDK.Source) -> Swift.Bool
|
|
1666
|
+
@discardableResult
|
|
1667
|
+
func releaseRevocations(source: TerraSDK.Source) -> Swift.Bool
|
|
1668
|
+
func claimLink(source: TerraSDK.Source) -> Swift.Bool
|
|
1669
|
+
func releaseLink(source: TerraSDK.Source)
|
|
1670
|
+
func loadSyncAnchor(source: TerraSDK.Source, dataType: TerraSDK.UploadDataType) throws -> Foundation.Data?
|
|
1671
|
+
func saveSyncAnchor(_ anchor: Foundation.Data, source: TerraSDK.Source, dataType: TerraSDK.UploadDataType, ifGeneration generation: Swift.Int) throws
|
|
1672
|
+
}
|
|
1673
|
+
@_hasMissingDesignatedInitializers final public class Terra : Swift.Sendable {
|
|
1674
|
+
@_spi(Testing) convenience public init(devID: Swift.String, health: any TerraSDK.HealthStore, backend: any TerraSDK.TerraBackend, store: any TerraSDK.DeviceStore, keys: any TerraSDK.DeviceKeyStore, tokenProvider: (@Sendable () async throws -> Swift.String)? = nil, backgroundRestricted: @escaping @Sendable () async -> Swift.Bool = { false }, backgroundRefreshScheduled: @escaping @Sendable (Swift.String) async -> Swift.Bool? = { _ in nil }, inBackground: @escaping @Sendable () async -> Swift.Bool = { false }, unlocks: @escaping @Sendable () -> _Concurrency.AsyncStream<Swift.Void> = { AsyncStream { _ in } }, vendorIdentity: @escaping @Sendable () async -> Swift.String? = { nil }, appIdentifier: Swift.String? = nil, deviceZone: @escaping @Sendable () -> Foundation.TimeZone = { .current }, syncsAutomatically: Swift.Bool = false, foregrounds: @escaping @Sendable () -> _Concurrency.AsyncStream<Swift.Void> = { AsyncStream { _ in } }, dayTotals: TerraSDK.DayTotalPolicy = .default, workoutSchedule: any TerraSDK.WorkoutSchedule = UnavailableWorkoutSchedule())
|
|
1675
|
+
@_spi(Testing) public static func appIdentifier(bundle: Swift.String?, storageDomain: Swift.String) -> Swift.String
|
|
1676
|
+
@available(iOSApplicationExtension, unavailable)
|
|
1677
|
+
convenience public init(devID: Swift.String, tokenProvider: (@Sendable () async throws -> Swift.String)? = nil, dayTotals: TerraSDK.DayTotalPolicy = .default)
|
|
1678
|
+
convenience public init(devID: Swift.String, tokenProvider: (@Sendable () async throws -> Swift.String)? = nil, backgroundRestricted: @escaping @Sendable () async -> Swift.Bool, inBackground: @escaping @Sendable () async -> Swift.Bool = { false }, unlocks: (@Sendable () -> _Concurrency.AsyncStream<Swift.Void>)? = nil, dayTotals: TerraSDK.DayTotalPolicy = .default)
|
|
1679
|
+
@_spi(Testing) @available(iOSApplicationExtension, unavailable)
|
|
1680
|
+
@Sendable public static func systemForegrounds() -> _Concurrency.AsyncStream<Swift.Void>
|
|
1681
|
+
@_spi(Testing) @Sendable public static func systemVendorIdentity() async -> Swift.String?
|
|
1682
|
+
@discardableResult
|
|
1683
|
+
final public func connect(_ source: TerraSDK.Source, for endUser: TerraSDK.EndUser) async throws -> TerraSDK.Connection
|
|
1684
|
+
@discardableResult
|
|
1685
|
+
final public func connect(_ source: TerraSDK.Source, for endUser: TerraSDK.EndUser, using token: Swift.String) async throws -> TerraSDK.Connection
|
|
1686
|
+
final public var connections: [TerraSDK.Connection] {
|
|
1687
|
+
get async throws
|
|
1688
|
+
}
|
|
1689
|
+
@_spi(Bridge) final public func needsTokenForRevokedLink(_ source: TerraSDK.Source, for endUser: TerraSDK.EndUser) async -> Swift.Bool
|
|
1690
|
+
final public var permissions: TerraSDK.Permissions {
|
|
1691
|
+
get
|
|
1692
|
+
}
|
|
1693
|
+
final public var diagnostics: TerraSDK.Diagnostics {
|
|
1694
|
+
get
|
|
1695
|
+
}
|
|
1696
|
+
final public var body: TerraSDK.BodyMetrics {
|
|
1697
|
+
get
|
|
1698
|
+
}
|
|
1699
|
+
final public var nutrition: TerraSDK.NutritionMetrics {
|
|
1700
|
+
get
|
|
1701
|
+
}
|
|
1702
|
+
final public var daily: TerraSDK.DailyMetrics {
|
|
1703
|
+
get
|
|
1704
|
+
}
|
|
1705
|
+
final public var sleep: TerraSDK.SleepMetrics {
|
|
1706
|
+
get
|
|
1707
|
+
}
|
|
1708
|
+
final public var activity: TerraSDK.ActivityMetrics {
|
|
1709
|
+
get
|
|
1710
|
+
}
|
|
1711
|
+
final public var menstruation: TerraSDK.MenstruationMetrics {
|
|
1712
|
+
get
|
|
1713
|
+
}
|
|
1714
|
+
final public var athlete: TerraSDK.AthleteMetrics {
|
|
1715
|
+
get
|
|
1716
|
+
}
|
|
1717
|
+
final public func availability(for source: TerraSDK.Source = .health) async -> TerraSDK.StoreAvailability
|
|
1718
|
+
@objc deinit
|
|
1719
|
+
}
|
|
1720
|
+
public enum StoreAvailability : Swift.Sendable, Swift.Equatable {
|
|
1721
|
+
case available
|
|
1722
|
+
case unsupportedDevice
|
|
1723
|
+
public static func == (a: TerraSDK.StoreAvailability, b: TerraSDK.StoreAvailability) -> Swift.Bool
|
|
1724
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
1725
|
+
public var hashValue: Swift.Int {
|
|
1726
|
+
get
|
|
1727
|
+
}
|
|
1728
|
+
}
|
|
1729
|
+
public struct Diagnostics : Swift.Sendable {
|
|
1730
|
+
public func events() -> _Concurrency.AsyncStream<TerraSDK.TerraEvent>
|
|
1731
|
+
public func lastDelivery(for source: TerraSDK.Source = .health) async -> Foundation.Date?
|
|
1732
|
+
public func state(for source: TerraSDK.Source = .health) async -> TerraSDK.DiagnosticsState
|
|
1733
|
+
public func report(for source: TerraSDK.Source = .health) async -> TerraSDK.SupportReport
|
|
1734
|
+
public func send(for source: TerraSDK.Source = .health) async throws
|
|
1735
|
+
}
|
|
1736
|
+
public struct PlannedWorkouts : Swift.Sendable {
|
|
1737
|
+
public func planned() async throws -> [TerraSDK.PlannedWorkout]
|
|
1738
|
+
public func markComplete(id: Swift.String, at time: Foundation.Date = Date()) async throws
|
|
1739
|
+
public func delete(id: Swift.String) async throws
|
|
1740
|
+
public func schedulingStatus() async -> TerraSDK.WorkoutSchedulingStatus
|
|
1741
|
+
@discardableResult
|
|
1742
|
+
public func requestScheduling() async -> TerraSDK.WorkoutSchedulingStatus
|
|
1743
|
+
}
|
|
1744
|
+
public struct Permissions : Swift.Sendable {
|
|
1745
|
+
public func request(read: [TerraSDK.DataCategory] = [], write: [TerraSDK.DataCategory] = [], workouts: [TerraSDK.WorkoutScope] = []) async throws
|
|
1746
|
+
public func writeStatus(for category: TerraSDK.DataCategory) async -> TerraSDK.PermissionStatus
|
|
1747
|
+
public func status(for category: TerraSDK.DataCategory) async -> TerraSDK.PermissionStatus
|
|
1748
|
+
public var requested: TerraSDK.HealthAccess {
|
|
1749
|
+
get async
|
|
1750
|
+
}
|
|
1751
|
+
}
|
|
1752
|
+
public struct NutritionMetrics : Swift.Sendable {
|
|
1753
|
+
@discardableResult
|
|
1754
|
+
public func log(_ entries: [TerraSDK.NutritionEntry]) async throws -> [Foundation.UUID]
|
|
1755
|
+
public func delete(id: Foundation.UUID) async throws
|
|
1756
|
+
public func quantities(in range: TerraSDK.TimeRange) async throws -> [TerraSDK.DietaryQuantity]
|
|
1757
|
+
public func hydration(in range: TerraSDK.TimeRange) async throws -> [TerraSDK.HydrationSample]
|
|
1758
|
+
}
|
|
1759
|
+
public struct MenstruationMetrics : Swift.Sendable {
|
|
1760
|
+
public func flow(in range: TerraSDK.TimeRange) async throws -> [TerraSDK.MenstruationFlowDay]
|
|
1761
|
+
public func events(in range: TerraSDK.TimeRange) async throws -> [TerraSDK.MenstrualEvent]
|
|
1762
|
+
}
|
|
1763
|
+
public struct AthleteMetrics : Swift.Sendable {
|
|
1764
|
+
public func profile() async throws -> TerraSDK.AthleteProfile?
|
|
1765
|
+
}
|
|
1766
|
+
public struct BodyMetrics : Swift.Sendable {
|
|
1767
|
+
@discardableResult
|
|
1768
|
+
public func log(_ entries: [TerraSDK.HeartRateEntry]) async throws -> [Foundation.UUID]
|
|
1769
|
+
@discardableResult
|
|
1770
|
+
public func log(_ entries: [TerraSDK.BodyEntry]) async throws -> [Foundation.UUID]
|
|
1771
|
+
@available(*, deprecated, message: "use terra.nutrition.log(_:) - meals moved to their own namespace")
|
|
1772
|
+
@discardableResult
|
|
1773
|
+
public func log(_ entries: [TerraSDK.NutritionEntry]) async throws -> [Foundation.UUID]
|
|
1774
|
+
public func delete(id: Foundation.UUID) async throws
|
|
1775
|
+
public func changes() async -> _Concurrency.AsyncStream<TerraSDK.HealthChange>
|
|
1776
|
+
public func heartRate(in range: TerraSDK.TimeRange) async throws -> [TerraSDK.HeartRateSample]
|
|
1777
|
+
public func restingHeartRate(in range: TerraSDK.TimeRange) async throws -> [TerraSDK.RestingHeartRateSample]
|
|
1778
|
+
public func readings(in range: TerraSDK.TimeRange) async throws -> [TerraSDK.BodyReading]
|
|
1779
|
+
}
|
|
1780
|
+
public struct DailyMetrics : Swift.Sendable {
|
|
1781
|
+
@discardableResult
|
|
1782
|
+
public func log(_ entries: [TerraSDK.StepEntry]) async throws -> [Foundation.UUID]
|
|
1783
|
+
public func delete(id: Foundation.UUID) async throws
|
|
1784
|
+
public func changes() async -> _Concurrency.AsyncStream<TerraSDK.HealthChange>
|
|
1785
|
+
public func steps(in range: TerraSDK.TimeRange) async throws -> [TerraSDK.StepCount]
|
|
1786
|
+
public func totals(in range: TerraSDK.TimeRange) async throws -> [TerraSDK.DayTotal]
|
|
1787
|
+
public func intraday(in range: TerraSDK.TimeRange) async throws -> [TerraSDK.IntradaySample]
|
|
1788
|
+
}
|
|
1789
|
+
public struct SleepMetrics : Swift.Sendable {
|
|
1790
|
+
@discardableResult
|
|
1791
|
+
public func log(_ entries: [TerraSDK.SleepEntry]) async throws -> [Foundation.UUID]
|
|
1792
|
+
public func delete(id: Foundation.UUID) async throws
|
|
1793
|
+
public func changes() async -> _Concurrency.AsyncStream<TerraSDK.HealthChange>
|
|
1794
|
+
public func segments(in range: TerraSDK.TimeRange) async throws -> [TerraSDK.SleepSegment]
|
|
1795
|
+
}
|
|
1796
|
+
public struct ActivityMetrics : Swift.Sendable {
|
|
1797
|
+
@discardableResult
|
|
1798
|
+
public func log(_ entries: [TerraSDK.WorkoutEntry]) async throws -> [Foundation.UUID]
|
|
1799
|
+
public func delete(id: Foundation.UUID) async throws
|
|
1800
|
+
public func changes() async -> _Concurrency.AsyncStream<TerraSDK.HealthChange>
|
|
1801
|
+
public func workouts(in range: TerraSDK.TimeRange) async throws -> [TerraSDK.Workout]
|
|
1802
|
+
public func routes(in range: TerraSDK.TimeRange) async throws -> [TerraSDK.WorkoutRoute]
|
|
1803
|
+
public func intensity(in range: TerraSDK.TimeRange) async throws -> [TerraSDK.WorkoutIntensitySample]
|
|
1804
|
+
}
|
|
1805
|
+
public enum Source : Swift.String, Swift.Sendable, Swift.Hashable, Swift.CaseIterable, Swift.Codable {
|
|
1806
|
+
case health
|
|
1807
|
+
public init?(rawValue: Swift.String)
|
|
1808
|
+
public typealias AllCases = [TerraSDK.Source]
|
|
1809
|
+
public typealias RawValue = Swift.String
|
|
1810
|
+
nonisolated public static var allCases: [TerraSDK.Source] {
|
|
1811
|
+
get
|
|
1812
|
+
}
|
|
1813
|
+
public var rawValue: Swift.String {
|
|
1814
|
+
get
|
|
1815
|
+
}
|
|
1816
|
+
}
|
|
1817
|
+
public enum DataCategory : Swift.String, Swift.Sendable, Swift.Hashable, Swift.CaseIterable, Swift.Codable {
|
|
1818
|
+
case activity
|
|
1819
|
+
case body
|
|
1820
|
+
case daily
|
|
1821
|
+
case sleep
|
|
1822
|
+
case nutrition
|
|
1823
|
+
case menstruation
|
|
1824
|
+
case athlete
|
|
1825
|
+
case healthObservation
|
|
1826
|
+
public init?(rawValue: Swift.String)
|
|
1827
|
+
public typealias AllCases = [TerraSDK.DataCategory]
|
|
1828
|
+
public typealias RawValue = Swift.String
|
|
1829
|
+
nonisolated public static var allCases: [TerraSDK.DataCategory] {
|
|
1830
|
+
get
|
|
1831
|
+
}
|
|
1832
|
+
public var rawValue: Swift.String {
|
|
1833
|
+
get
|
|
1834
|
+
}
|
|
1835
|
+
}
|
|
1836
|
+
public enum PermissionStatus : Swift.Sendable, Swift.Equatable {
|
|
1837
|
+
case granted
|
|
1838
|
+
case denied
|
|
1839
|
+
case notDetermined
|
|
1840
|
+
case notDisclosed
|
|
1841
|
+
case unavailable
|
|
1842
|
+
case unsupported
|
|
1843
|
+
public static func == (a: TerraSDK.PermissionStatus, b: TerraSDK.PermissionStatus) -> Swift.Bool
|
|
1844
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
1845
|
+
public var hashValue: Swift.Int {
|
|
1846
|
+
get
|
|
1847
|
+
}
|
|
1848
|
+
}
|
|
1849
|
+
public enum TimeRange : Swift.Sendable, Swift.Equatable {
|
|
1850
|
+
case lastHours(Swift.Int)
|
|
1851
|
+
case lastDays(Swift.Int)
|
|
1852
|
+
case today
|
|
1853
|
+
case between(Foundation.Date, Foundation.Date)
|
|
1854
|
+
public func resolve(now: Foundation.Date = Date(), calendar: Foundation.Calendar = .current) -> Foundation.DateInterval
|
|
1855
|
+
public static func == (a: TerraSDK.TimeRange, b: TerraSDK.TimeRange) -> Swift.Bool
|
|
1856
|
+
}
|
|
1857
|
+
public enum UploadDataType : Swift.String, Swift.Sendable, Swift.CaseIterable, Swift.Codable {
|
|
1858
|
+
case daily
|
|
1859
|
+
case sleep
|
|
1860
|
+
case activity
|
|
1861
|
+
case body
|
|
1862
|
+
case nutrition
|
|
1863
|
+
case menstruation
|
|
1864
|
+
case athlete
|
|
1865
|
+
case healthObservation
|
|
1866
|
+
public static var routable: [TerraSDK.UploadDataType] {
|
|
1867
|
+
get
|
|
1868
|
+
}
|
|
1869
|
+
public init?(rawValue: Swift.String)
|
|
1870
|
+
public typealias AllCases = [TerraSDK.UploadDataType]
|
|
1871
|
+
public typealias RawValue = Swift.String
|
|
1872
|
+
nonisolated public static var allCases: [TerraSDK.UploadDataType] {
|
|
1873
|
+
get
|
|
1874
|
+
}
|
|
1875
|
+
public var rawValue: Swift.String {
|
|
1876
|
+
get
|
|
1877
|
+
}
|
|
1878
|
+
}
|
|
1879
|
+
public let sdkVersion: Swift.String
|
|
1880
|
+
@available(iOS 17.0, macOS 15.0, *)
|
|
1881
|
+
public struct WorkoutKitSchedule : TerraSDK.WorkoutSchedule {
|
|
1882
|
+
public init()
|
|
1883
|
+
public func status() async -> TerraSDK.WorkoutSchedulingStatus
|
|
1884
|
+
public func requestAuthorization() async -> TerraSDK.WorkoutSchedulingStatus
|
|
1885
|
+
public var capacity: Swift.Int {
|
|
1886
|
+
get
|
|
1887
|
+
}
|
|
1888
|
+
public func scheduled() async -> [TerraSDK.ScheduledWorkout]
|
|
1889
|
+
public func schedule(_ workout: TerraSDK.WorkoutComposition, id: Foundation.UUID, at date: Foundation.DateComponents) async throws
|
|
1890
|
+
public func move(_ id: Foundation.UUID, to date: Foundation.DateComponents) async throws -> Swift.Bool
|
|
1891
|
+
public func remove(_ id: Foundation.UUID) async
|
|
1892
|
+
}
|
|
1893
|
+
public enum WorkoutSchedulingStatus : Swift.String, Swift.Sendable, Swift.Equatable, Swift.CaseIterable {
|
|
1894
|
+
case unsupported
|
|
1895
|
+
case notDetermined
|
|
1896
|
+
case denied
|
|
1897
|
+
case authorized
|
|
1898
|
+
public init?(rawValue: Swift.String)
|
|
1899
|
+
public typealias AllCases = [TerraSDK.WorkoutSchedulingStatus]
|
|
1900
|
+
public typealias RawValue = Swift.String
|
|
1901
|
+
nonisolated public static var allCases: [TerraSDK.WorkoutSchedulingStatus] {
|
|
1902
|
+
get
|
|
1903
|
+
}
|
|
1904
|
+
public var rawValue: Swift.String {
|
|
1905
|
+
get
|
|
1906
|
+
}
|
|
1907
|
+
}
|
|
1908
|
+
public struct ScheduledWorkout : Swift.Sendable, Swift.Equatable {
|
|
1909
|
+
public let id: Foundation.UUID
|
|
1910
|
+
public let date: Foundation.DateComponents
|
|
1911
|
+
public let isComplete: Swift.Bool
|
|
1912
|
+
public init(id: Foundation.UUID, date: Foundation.DateComponents, isComplete: Swift.Bool = false)
|
|
1913
|
+
public static func == (a: TerraSDK.ScheduledWorkout, b: TerraSDK.ScheduledWorkout) -> Swift.Bool
|
|
1914
|
+
}
|
|
1915
|
+
public enum WorkoutScheduleRefusal : Swift.String, Swift.Error, Swift.Sendable, Swift.Equatable {
|
|
1916
|
+
case activityUnsupported
|
|
1917
|
+
case goalUnsupported
|
|
1918
|
+
case malformed
|
|
1919
|
+
case noWorkout
|
|
1920
|
+
case past
|
|
1921
|
+
case completed
|
|
1922
|
+
public init?(rawValue: Swift.String)
|
|
1923
|
+
public typealias RawValue = Swift.String
|
|
1924
|
+
public var rawValue: Swift.String {
|
|
1925
|
+
get
|
|
1926
|
+
}
|
|
1927
|
+
}
|
|
1928
|
+
public struct WorkoutComposition : Swift.Sendable, Swift.Equatable, Swift.Codable {
|
|
1929
|
+
public var displayName: Swift.String?
|
|
1930
|
+
public var activity: Swift.String
|
|
1931
|
+
public var location: Swift.String
|
|
1932
|
+
public var warmup: TerraSDK.WorkoutComposition.Step?
|
|
1933
|
+
public var blocks: [TerraSDK.WorkoutComposition.Block]
|
|
1934
|
+
public var cooldown: TerraSDK.WorkoutComposition.Step?
|
|
1935
|
+
public init(displayName: Swift.String? = nil, activity: Swift.String, location: Swift.String = "outdoor", warmup: TerraSDK.WorkoutComposition.Step? = nil, blocks: [TerraSDK.WorkoutComposition.Block] = [], cooldown: TerraSDK.WorkoutComposition.Step? = nil)
|
|
1936
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
1937
|
+
public struct Block : Swift.Sendable, Swift.Equatable, Swift.Codable {
|
|
1938
|
+
public var steps: [TerraSDK.WorkoutComposition.IntervalStep]
|
|
1939
|
+
public var iterations: Swift.Int
|
|
1940
|
+
public init(steps: [TerraSDK.WorkoutComposition.IntervalStep], iterations: Swift.Int = 1)
|
|
1941
|
+
public static func == (a: TerraSDK.WorkoutComposition.Block, b: TerraSDK.WorkoutComposition.Block) -> Swift.Bool
|
|
1942
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
1943
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
1944
|
+
}
|
|
1945
|
+
public struct IntervalStep : Swift.Sendable, Swift.Equatable, Swift.Codable {
|
|
1946
|
+
public var purpose: Swift.String
|
|
1947
|
+
public var step: TerraSDK.WorkoutComposition.Step
|
|
1948
|
+
public init(purpose: Swift.String, step: TerraSDK.WorkoutComposition.Step)
|
|
1949
|
+
public static func == (a: TerraSDK.WorkoutComposition.IntervalStep, b: TerraSDK.WorkoutComposition.IntervalStep) -> Swift.Bool
|
|
1950
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
1951
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
1952
|
+
}
|
|
1953
|
+
public struct Step : Swift.Sendable, Swift.Equatable, Swift.Codable {
|
|
1954
|
+
public var goal: TerraSDK.WorkoutComposition.Goal
|
|
1955
|
+
public var alert: TerraSDK.WorkoutComposition.Alert?
|
|
1956
|
+
public init(goal: TerraSDK.WorkoutComposition.Goal, alert: TerraSDK.WorkoutComposition.Alert? = nil)
|
|
1957
|
+
public static func == (a: TerraSDK.WorkoutComposition.Step, b: TerraSDK.WorkoutComposition.Step) -> Swift.Bool
|
|
1958
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
1959
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
1960
|
+
}
|
|
1961
|
+
public struct Goal : Swift.Sendable, Swift.Equatable, Swift.Codable {
|
|
1962
|
+
public var type: Swift.String
|
|
1963
|
+
public var value: Swift.Double?
|
|
1964
|
+
public var unit: Swift.String?
|
|
1965
|
+
public init(type: Swift.String, value: Swift.Double? = nil, unit: Swift.String? = nil)
|
|
1966
|
+
public static func == (a: TerraSDK.WorkoutComposition.Goal, b: TerraSDK.WorkoutComposition.Goal) -> Swift.Bool
|
|
1967
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
1968
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
1969
|
+
}
|
|
1970
|
+
public struct Alert : Swift.Sendable, Swift.Equatable, Swift.Codable {
|
|
1971
|
+
public var type: Swift.String
|
|
1972
|
+
public var zone: Swift.Int?
|
|
1973
|
+
public var target: TerraSDK.WorkoutComposition.Target?
|
|
1974
|
+
public var metric: Swift.String?
|
|
1975
|
+
public init(type: Swift.String, zone: Swift.Int? = nil, target: TerraSDK.WorkoutComposition.Target? = nil, metric: Swift.String? = nil)
|
|
1976
|
+
public static func == (a: TerraSDK.WorkoutComposition.Alert, b: TerraSDK.WorkoutComposition.Alert) -> Swift.Bool
|
|
1977
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
1978
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
1979
|
+
}
|
|
1980
|
+
public struct Target : Swift.Sendable, Swift.Equatable, Swift.Codable {
|
|
1981
|
+
public var lowerBound: Swift.Double?
|
|
1982
|
+
public var upperBound: Swift.Double?
|
|
1983
|
+
public var unit: Swift.String?
|
|
1984
|
+
public init(lowerBound: Swift.Double? = nil, upperBound: Swift.Double? = nil, unit: Swift.String? = nil)
|
|
1985
|
+
public static func == (a: TerraSDK.WorkoutComposition.Target, b: TerraSDK.WorkoutComposition.Target) -> Swift.Bool
|
|
1986
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
1987
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
1988
|
+
}
|
|
1989
|
+
public static func == (a: TerraSDK.WorkoutComposition, b: TerraSDK.WorkoutComposition) -> Swift.Bool
|
|
1990
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
1991
|
+
}
|
|
1992
|
+
public protocol WorkoutSchedule : Swift.Sendable {
|
|
1993
|
+
func status() async -> TerraSDK.WorkoutSchedulingStatus
|
|
1994
|
+
func requestAuthorization() async -> TerraSDK.WorkoutSchedulingStatus
|
|
1995
|
+
var capacity: Swift.Int { get }
|
|
1996
|
+
func scheduled() async -> [TerraSDK.ScheduledWorkout]
|
|
1997
|
+
func schedule(_ workout: TerraSDK.WorkoutComposition, id: Foundation.UUID, at date: Foundation.DateComponents) async throws
|
|
1998
|
+
func move(_ id: Foundation.UUID, to date: Foundation.DateComponents) async throws -> Swift.Bool
|
|
1999
|
+
func remove(_ id: Foundation.UUID) async
|
|
2000
|
+
}
|
|
2001
|
+
public struct WorkoutScheduleUnconfirmed : Swift.Error, Swift.Sendable, Swift.Equatable {
|
|
2002
|
+
public init()
|
|
2003
|
+
public static func == (a: TerraSDK.WorkoutScheduleUnconfirmed, b: TerraSDK.WorkoutScheduleUnconfirmed) -> Swift.Bool
|
|
2004
|
+
}
|
|
2005
|
+
public struct UnavailableWorkoutSchedule : TerraSDK.WorkoutSchedule {
|
|
2006
|
+
public init()
|
|
2007
|
+
public func status() async -> TerraSDK.WorkoutSchedulingStatus
|
|
2008
|
+
public func requestAuthorization() async -> TerraSDK.WorkoutSchedulingStatus
|
|
2009
|
+
public var capacity: Swift.Int {
|
|
2010
|
+
get
|
|
2011
|
+
}
|
|
2012
|
+
public func scheduled() async -> [TerraSDK.ScheduledWorkout]
|
|
2013
|
+
public func schedule(_ workout: TerraSDK.WorkoutComposition, id: Foundation.UUID, at date: Foundation.DateComponents) async throws
|
|
2014
|
+
public func move(_ id: Foundation.UUID, to date: Foundation.DateComponents) async throws -> Swift.Bool
|
|
2015
|
+
public func remove(_ id: Foundation.UUID) async
|
|
2016
|
+
}
|
|
2017
|
+
public struct HeartRateEntry : Swift.Sendable, Swift.Equatable {
|
|
2018
|
+
public let time: Foundation.Date
|
|
2019
|
+
public let beatsPerMinute: Swift.Double
|
|
2020
|
+
public let recordID: Foundation.UUID
|
|
2021
|
+
public init(time: Foundation.Date, beatsPerMinute: Swift.Double, recordID: Foundation.UUID = UUID())
|
|
2022
|
+
public static func == (a: TerraSDK.HeartRateEntry, b: TerraSDK.HeartRateEntry) -> Swift.Bool
|
|
2023
|
+
}
|
|
2024
|
+
public struct StepEntry : Swift.Sendable, Swift.Equatable {
|
|
2025
|
+
public let interval: Foundation.DateInterval
|
|
2026
|
+
public let steps: Swift.Int
|
|
2027
|
+
public let recordID: Foundation.UUID
|
|
2028
|
+
public init(interval: Foundation.DateInterval, steps: Swift.Int, recordID: Foundation.UUID = UUID())
|
|
2029
|
+
public static func == (a: TerraSDK.StepEntry, b: TerraSDK.StepEntry) -> Swift.Bool
|
|
2030
|
+
}
|
|
2031
|
+
public struct SleepEntry : Swift.Sendable, Swift.Equatable {
|
|
2032
|
+
public let interval: Foundation.DateInterval
|
|
2033
|
+
public let stage: TerraSDK.SleepStage
|
|
2034
|
+
public let recordID: Foundation.UUID
|
|
2035
|
+
public init(interval: Foundation.DateInterval, stage: TerraSDK.SleepStage, recordID: Foundation.UUID = UUID())
|
|
2036
|
+
public static func == (a: TerraSDK.SleepEntry, b: TerraSDK.SleepEntry) -> Swift.Bool
|
|
2037
|
+
}
|
|
2038
|
+
public struct WorkoutEntry : Swift.Sendable, Swift.Equatable {
|
|
2039
|
+
public let interval: Foundation.DateInterval
|
|
2040
|
+
public let activity: TerraSDK.WorkoutActivity
|
|
2041
|
+
public let totalEnergyKilocalories: Swift.Double?
|
|
2042
|
+
public let totalDistanceMeters: Swift.Double?
|
|
2043
|
+
public let recordID: Foundation.UUID
|
|
2044
|
+
public init(interval: Foundation.DateInterval, activity: TerraSDK.WorkoutActivity, totalEnergyKilocalories: Swift.Double? = nil, totalDistanceMeters: Swift.Double? = nil, recordID: Foundation.UUID = UUID())
|
|
2045
|
+
public static func == (a: TerraSDK.WorkoutEntry, b: TerraSDK.WorkoutEntry) -> Swift.Bool
|
|
2046
|
+
}
|
|
2047
|
+
public struct WorkoutScope : Swift.Sendable, Swift.Hashable {
|
|
2048
|
+
public var activity: TerraSDK.WorkoutActivity
|
|
2049
|
+
public var energy: Swift.Bool
|
|
2050
|
+
public var distance: Swift.Bool
|
|
2051
|
+
public init(activity: TerraSDK.WorkoutActivity, energy: Swift.Bool = false, distance: Swift.Bool = false)
|
|
2052
|
+
public static func == (a: TerraSDK.WorkoutScope, b: TerraSDK.WorkoutScope) -> Swift.Bool
|
|
2053
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
2054
|
+
public var hashValue: Swift.Int {
|
|
2055
|
+
get
|
|
2056
|
+
}
|
|
2057
|
+
}
|
|
2058
|
+
public struct BodyEntry : Swift.Sendable, Swift.Equatable {
|
|
2059
|
+
public let time: Foundation.Date
|
|
2060
|
+
public var bodyMassKilograms: Swift.Double?
|
|
2061
|
+
public var bodyFatPercent: Swift.Double?
|
|
2062
|
+
public var bodyMassIndex: Swift.Double?
|
|
2063
|
+
public var heightMeters: Swift.Double?
|
|
2064
|
+
public var leanBodyMassKilograms: Swift.Double?
|
|
2065
|
+
public var bodyTemperatureCelsius: Swift.Double?
|
|
2066
|
+
public var oxygenSaturationPercent: Swift.Double?
|
|
2067
|
+
public var bloodGlucoseMilligramsPerDeciliter: Swift.Double?
|
|
2068
|
+
public var bloodPressureSystolicMillimetersOfMercury: Swift.Double?
|
|
2069
|
+
public var bloodPressureDiastolicMillimetersOfMercury: Swift.Double?
|
|
2070
|
+
public let recordID: Foundation.UUID
|
|
2071
|
+
public init(time: Foundation.Date, bodyMassKilograms: Swift.Double? = nil, bodyFatPercent: Swift.Double? = nil, bodyMassIndex: Swift.Double? = nil, heightMeters: Swift.Double? = nil, leanBodyMassKilograms: Swift.Double? = nil, bodyTemperatureCelsius: Swift.Double? = nil, oxygenSaturationPercent: Swift.Double? = nil, bloodGlucoseMilligramsPerDeciliter: Swift.Double? = nil, bloodPressureSystolicMillimetersOfMercury: Swift.Double? = nil, bloodPressureDiastolicMillimetersOfMercury: Swift.Double? = nil, recordID: Foundation.UUID = UUID())
|
|
2072
|
+
public var isEmpty: Swift.Bool {
|
|
2073
|
+
get
|
|
2074
|
+
}
|
|
2075
|
+
public static func == (a: TerraSDK.BodyEntry, b: TerraSDK.BodyEntry) -> Swift.Bool
|
|
2076
|
+
}
|
|
2077
|
+
public struct NutritionEntry : Swift.Sendable, Swift.Equatable {
|
|
2078
|
+
public let interval: Foundation.DateInterval
|
|
2079
|
+
public var name: Swift.String?
|
|
2080
|
+
public var nutrients: TerraSDK.NutritionEntry.Nutrients
|
|
2081
|
+
public let recordID: Foundation.UUID
|
|
2082
|
+
public init(interval: Foundation.DateInterval, name: Swift.String? = nil, nutrients: TerraSDK.NutritionEntry.Nutrients, recordID: Foundation.UUID = UUID())
|
|
2083
|
+
public var isEmpty: Swift.Bool {
|
|
2084
|
+
get
|
|
2085
|
+
}
|
|
2086
|
+
public struct Nutrients : Swift.Sendable, Swift.Equatable {
|
|
2087
|
+
public var energyKilocalories: Swift.Double?
|
|
2088
|
+
public var proteinGrams: Swift.Double?
|
|
2089
|
+
public var carbohydratesGrams: Swift.Double?
|
|
2090
|
+
public var fiberGrams: Swift.Double?
|
|
2091
|
+
public var sugarGrams: Swift.Double?
|
|
2092
|
+
public var fatTotalGrams: Swift.Double?
|
|
2093
|
+
public var fatSaturatedGrams: Swift.Double?
|
|
2094
|
+
public var fatMonounsaturatedGrams: Swift.Double?
|
|
2095
|
+
public var fatPolyunsaturatedGrams: Swift.Double?
|
|
2096
|
+
public var cholesterolMilligrams: Swift.Double?
|
|
2097
|
+
public var sodiumMilligrams: Swift.Double?
|
|
2098
|
+
public var potassiumMilligrams: Swift.Double?
|
|
2099
|
+
public var calciumMilligrams: Swift.Double?
|
|
2100
|
+
public var ironMilligrams: Swift.Double?
|
|
2101
|
+
public var magnesiumMilligrams: Swift.Double?
|
|
2102
|
+
public var zincMilligrams: Swift.Double?
|
|
2103
|
+
public var waterLiters: Swift.Double?
|
|
2104
|
+
public var caffeineMilligrams: Swift.Double?
|
|
2105
|
+
public var vitaminAMicrograms: Swift.Double?
|
|
2106
|
+
public var vitaminCMilligrams: Swift.Double?
|
|
2107
|
+
public var vitaminDMicrograms: Swift.Double?
|
|
2108
|
+
public var vitaminEMilligrams: Swift.Double?
|
|
2109
|
+
public var vitaminKMicrograms: Swift.Double?
|
|
2110
|
+
public var vitaminB6Milligrams: Swift.Double?
|
|
2111
|
+
public var vitaminB12Micrograms: Swift.Double?
|
|
2112
|
+
public var folateMicrograms: Swift.Double?
|
|
2113
|
+
public var thiaminMilligrams: Swift.Double?
|
|
2114
|
+
public var riboflavinMilligrams: Swift.Double?
|
|
2115
|
+
public var niacinMilligrams: Swift.Double?
|
|
2116
|
+
public var biotinMicrograms: Swift.Double?
|
|
2117
|
+
public var pantothenicAcidMilligrams: Swift.Double?
|
|
2118
|
+
public var phosphorusMilligrams: Swift.Double?
|
|
2119
|
+
public var iodineMicrograms: Swift.Double?
|
|
2120
|
+
public var chromiumMicrograms: Swift.Double?
|
|
2121
|
+
public var copperMilligrams: Swift.Double?
|
|
2122
|
+
public var manganeseMilligrams: Swift.Double?
|
|
2123
|
+
public var molybdenumMicrograms: Swift.Double?
|
|
2124
|
+
public var seleniumMicrograms: Swift.Double?
|
|
2125
|
+
public var chlorideMilligrams: Swift.Double?
|
|
2126
|
+
public init(energyKilocalories: Swift.Double? = nil, proteinGrams: Swift.Double? = nil, carbohydratesGrams: Swift.Double? = nil, fiberGrams: Swift.Double? = nil, sugarGrams: Swift.Double? = nil, fatTotalGrams: Swift.Double? = nil, fatSaturatedGrams: Swift.Double? = nil, fatMonounsaturatedGrams: Swift.Double? = nil, fatPolyunsaturatedGrams: Swift.Double? = nil, cholesterolMilligrams: Swift.Double? = nil, sodiumMilligrams: Swift.Double? = nil, potassiumMilligrams: Swift.Double? = nil, calciumMilligrams: Swift.Double? = nil, ironMilligrams: Swift.Double? = nil, magnesiumMilligrams: Swift.Double? = nil, zincMilligrams: Swift.Double? = nil, waterLiters: Swift.Double? = nil, caffeineMilligrams: Swift.Double? = nil, vitaminAMicrograms: Swift.Double? = nil, vitaminCMilligrams: Swift.Double? = nil, vitaminDMicrograms: Swift.Double? = nil, vitaminEMilligrams: Swift.Double? = nil, vitaminKMicrograms: Swift.Double? = nil, vitaminB6Milligrams: Swift.Double? = nil, vitaminB12Micrograms: Swift.Double? = nil, folateMicrograms: Swift.Double? = nil, thiaminMilligrams: Swift.Double? = nil, riboflavinMilligrams: Swift.Double? = nil, niacinMilligrams: Swift.Double? = nil, biotinMicrograms: Swift.Double? = nil, pantothenicAcidMilligrams: Swift.Double? = nil, phosphorusMilligrams: Swift.Double? = nil, iodineMicrograms: Swift.Double? = nil, chromiumMicrograms: Swift.Double? = nil, copperMilligrams: Swift.Double? = nil, manganeseMilligrams: Swift.Double? = nil, molybdenumMicrograms: Swift.Double? = nil, seleniumMicrograms: Swift.Double? = nil, chlorideMilligrams: Swift.Double? = nil)
|
|
2127
|
+
public static func == (a: TerraSDK.NutritionEntry.Nutrients, b: TerraSDK.NutritionEntry.Nutrients) -> Swift.Bool
|
|
2128
|
+
}
|
|
2129
|
+
public static func == (a: TerraSDK.NutritionEntry, b: TerraSDK.NutritionEntry) -> Swift.Bool
|
|
2130
|
+
}
|
|
2131
|
+
extension TerraSDK.AthleteProfile.BiologicalSex : Swift.RawRepresentable {}
|
|
2132
|
+
extension TerraSDK.AthleteProfile.ActivityMoveMode : Swift.RawRepresentable {}
|
|
2133
|
+
extension TerraSDK.UploadContentEncoding : Swift.Hashable {}
|
|
2134
|
+
extension TerraSDK.UploadContentEncoding : Swift.RawRepresentable {}
|
|
2135
|
+
extension TerraSDK.BodyMetric : Swift.RawRepresentable {}
|
|
2136
|
+
extension TerraSDK.BloodGlucoseUnit : Swift.RawRepresentable {}
|
|
2137
|
+
extension TerraSDK.GlucoseMealTime : Swift.RawRepresentable {}
|
|
2138
|
+
extension TerraSDK.GlucoseSpecimen : Swift.RawRepresentable {}
|
|
2139
|
+
extension TerraSDK.BodyTemperatureMetric : Swift.RawRepresentable {}
|
|
2140
|
+
extension TerraSDK.HeartRateVariabilityMetric : Swift.RawRepresentable {}
|
|
2141
|
+
extension TerraSDK.VO2MaxTestType : Swift.RawRepresentable {}
|
|
2142
|
+
extension TerraSDK.InsulinDeliveryReason : Swift.RawRepresentable {}
|
|
2143
|
+
extension TerraSDK.Electrocardiogram.Classification : Swift.Equatable {}
|
|
2144
|
+
extension TerraSDK.Electrocardiogram.Classification : Swift.Hashable {}
|
|
2145
|
+
extension TerraSDK.Electrocardiogram.Classification : Swift.RawRepresentable {}
|
|
2146
|
+
extension TerraSDK.Electrocardiogram.SymptomsStatus : Swift.Equatable {}
|
|
2147
|
+
extension TerraSDK.Electrocardiogram.SymptomsStatus : Swift.Hashable {}
|
|
2148
|
+
extension TerraSDK.Electrocardiogram.SymptomsStatus : Swift.RawRepresentable {}
|
|
2149
|
+
extension TerraSDK.DataCategory : Swift.RawRepresentable {}
|
|
2150
|
+
extension TerraSDK.TerraEvent.FailureCode : Swift.Hashable {}
|
|
2151
|
+
extension TerraSDK.TerraEvent.FailureCode : Swift.RawRepresentable {}
|
|
2152
|
+
extension TerraSDK.DeviceKeyRevokeOutcome : Swift.Hashable {}
|
|
2153
|
+
extension TerraSDK.DeviceKeyRevokeOutcome : Swift.RawRepresentable {}
|
|
2154
|
+
extension TerraSDK.DiagnosticsReason : Swift.Hashable {}
|
|
2155
|
+
extension TerraSDK.DiagnosticsReason : Swift.RawRepresentable {}
|
|
2156
|
+
extension TerraSDK.HealthObservation.Category : Swift.RawRepresentable {}
|
|
2157
|
+
extension TerraSDK.HealthObservation.Severity : Swift.RawRepresentable {}
|
|
2158
|
+
extension TerraSDK.MenstruationFlowDay.Flow : Swift.RawRepresentable {}
|
|
2159
|
+
extension TerraSDK.MenstrualEvent.Kind : Swift.RawRepresentable {}
|
|
2160
|
+
extension TerraSDK.MealType : Swift.RawRepresentable {}
|
|
2161
|
+
extension TerraSDK.Nutrient : Swift.RawRepresentable {}
|
|
2162
|
+
extension TerraSDK.DeviceType : Swift.RawRepresentable {}
|
|
2163
|
+
extension TerraSDK.MotionContext : Swift.Hashable {}
|
|
2164
|
+
extension TerraSDK.MotionContext : Swift.RawRepresentable {}
|
|
2165
|
+
extension TerraSDK.WorkoutEvent.Kind : Swift.Equatable {}
|
|
2166
|
+
extension TerraSDK.WorkoutEvent.Kind : Swift.Hashable {}
|
|
2167
|
+
extension TerraSDK.WorkoutEvent.Kind : Swift.RawRepresentable {}
|
|
2168
|
+
extension TerraSDK.WorkoutIntensitySample.Kind : Swift.Equatable {}
|
|
2169
|
+
extension TerraSDK.WorkoutIntensitySample.Kind : Swift.Hashable {}
|
|
2170
|
+
extension TerraSDK.WorkoutIntensitySample.Kind : Swift.RawRepresentable {}
|
|
2171
|
+
extension TerraSDK.DayTotal.Metric : Swift.Equatable {}
|
|
2172
|
+
extension TerraSDK.DayTotal.Metric : Swift.Hashable {}
|
|
2173
|
+
extension TerraSDK.DayTotal.Metric : Swift.RawRepresentable {}
|
|
2174
|
+
extension TerraSDK.IntradaySample.Kind : Swift.Equatable {}
|
|
2175
|
+
extension TerraSDK.IntradaySample.Kind : Swift.Hashable {}
|
|
2176
|
+
extension TerraSDK.IntradaySample.Kind : Swift.RawRepresentable {}
|
|
2177
|
+
extension TerraSDK.StoreAvailability : Swift.Hashable {}
|
|
2178
|
+
extension TerraSDK.Source : Swift.RawRepresentable {}
|
|
2179
|
+
extension TerraSDK.PermissionStatus : Swift.Hashable {}
|
|
2180
|
+
extension TerraSDK.UploadDataType : Swift.Equatable {}
|
|
2181
|
+
extension TerraSDK.UploadDataType : Swift.Hashable {}
|
|
2182
|
+
extension TerraSDK.UploadDataType : Swift.RawRepresentable {}
|
|
2183
|
+
extension TerraSDK.WorkoutSchedulingStatus : Swift.Hashable {}
|
|
2184
|
+
extension TerraSDK.WorkoutSchedulingStatus : Swift.RawRepresentable {}
|
|
2185
|
+
extension TerraSDK.WorkoutScheduleRefusal : Swift.Hashable {}
|
|
2186
|
+
extension TerraSDK.WorkoutScheduleRefusal : Swift.RawRepresentable {}
|