@tryterra/react-native 2.2.1 → 2.3.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/README.md +68 -0
- package/android/src/bridgeCore/kotlin/co/tryterra/sdk/bridge/BridgeBootstrap.kt +14 -1
- package/android/src/bridgeCore/kotlin/co/tryterra/sdk/bridge/Conversions.kt +35 -2
- package/android/src/bridgeCore/kotlin/co/tryterra/sdk/bridge/Rejections.kt +3 -0
- package/android/src/bridgeCore/kotlin/co/tryterra/sdk/bridge/TerraBridgeOpsImpl.kt +33 -0
- package/android/src/bridgeCore/kotlin/co/tryterra/sdk/bridge/generated/BridgeErrors.kt +12 -0
- package/android/src/bridgeCore/kotlin/co/tryterra/sdk/bridge/generated/BridgeOps.kt +47 -0
- package/android/src/bridgeCore/kotlin/co/tryterra/sdk/bridge/generated/BridgeTypes.kt +348 -0
- package/docs/availability.md +111 -1
- 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 +21646 -9224
- package/frameworks/TerraSDK.xcframework/ios-arm64/TerraSDK.framework/Modules/TerraSDK.swiftmodule/arm64-apple-ios.package.swiftinterface +351 -14
- package/frameworks/TerraSDK.xcframework/ios-arm64/TerraSDK.framework/Modules/TerraSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +351 -14
- 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 +339 -13
- package/frameworks/TerraSDK.xcframework/ios-arm64/TerraSDK.framework/TerraSDK +0 -0
- package/frameworks/TerraSDK.xcframework/ios-arm64/dSYMs/TerraSDK.framework.dSYM/Contents/Info.plist +2 -2
- 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 +7449 -6589
- 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 +21646 -9224
- package/frameworks/TerraSDK.xcframework/ios-arm64_x86_64-simulator/TerraSDK.framework/Modules/TerraSDK.swiftmodule/arm64-apple-ios-simulator.package.swiftinterface +351 -14
- package/frameworks/TerraSDK.xcframework/ios-arm64_x86_64-simulator/TerraSDK.framework/Modules/TerraSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +351 -14
- 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 +339 -13
- package/frameworks/TerraSDK.xcframework/ios-arm64_x86_64-simulator/TerraSDK.framework/Modules/TerraSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +21646 -9224
- package/frameworks/TerraSDK.xcframework/ios-arm64_x86_64-simulator/TerraSDK.framework/Modules/TerraSDK.swiftmodule/x86_64-apple-ios-simulator.package.swiftinterface +351 -14
- package/frameworks/TerraSDK.xcframework/ios-arm64_x86_64-simulator/TerraSDK.framework/Modules/TerraSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +351 -14
- 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 +339 -13
- 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 +21 -21
- package/frameworks/TerraSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/TerraSDK.framework.dSYM/Contents/Info.plist +2 -2
- 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 +7450 -6590
- package/frameworks/TerraSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/TerraSDK.framework.dSYM/Contents/Resources/Relocations/x86_64/TerraSDK.yml +7359 -6508
- package/ios/TerraBridgeCore/BridgeBootstrap.swift +13 -3
- package/ios/TerraBridgeCore/Conversions.swift +36 -1
- package/ios/TerraBridgeCore/Generated/BridgeErrors.swift +15 -0
- package/ios/TerraBridgeCore/Generated/BridgeOps.swift +82 -0
- package/ios/TerraBridgeCore/Generated/BridgeTypes.swift +252 -3
- package/ios/TerraBridgeCore/Rejections.swift +5 -1
- package/ios/TerraBridgeCore/TerraBridgeOpsImpl.swift +32 -1
- package/lib/Terra.d.ts +47 -1
- package/lib/Terra.js +16 -0
- package/lib/generated/client.d.ts +33 -1
- package/lib/generated/client.js +42 -0
- package/lib/generated/codecs.d.ts +15 -1
- package/lib/generated/codecs.js +119 -5
- package/lib/generated/errors.d.ts +1 -1
- package/lib/generated/errors.js +6 -1
- package/lib/generated/ops.d.ts +1 -1
- package/lib/generated/ops.js +12 -0
- package/lib/generated/types.d.ts +70 -2
- package/lib/generated/types.js +101 -1
- package/lib/index.d.ts +1 -1
- package/package.json +3 -3
- package/src/Terra.ts +64 -0
- package/src/generated/client.ts +49 -2
- package/src/generated/codecs.ts +112 -6
- package/src/generated/errors.ts +11 -1
- package/src/generated/ops.ts +17 -0
- package/src/generated/types.ts +274 -1
- package/src/index.ts +1 -0
|
Binary file
|
|
@@ -61,9 +61,17 @@ public struct LinkRequest : Swift.Sendable, Swift.Equatable {
|
|
|
61
61
|
public let providerUserID: Swift.String
|
|
62
62
|
public let appIdentifier: Swift.String?
|
|
63
63
|
public let devicePublicKey: Swift.String
|
|
64
|
-
public
|
|
64
|
+
public let possession: TerraSDK.KeyPossession?
|
|
65
|
+
public init(token: Swift.String, source: TerraSDK.Source, devID: Swift.String, providerUserID: Swift.String, devicePublicKey: Swift.String, appIdentifier: Swift.String? = nil, possession: TerraSDK.KeyPossession? = nil)
|
|
66
|
+
public static let possessionLabel: Swift.String
|
|
65
67
|
public static func == (a: TerraSDK.LinkRequest, b: TerraSDK.LinkRequest) -> Swift.Bool
|
|
66
68
|
}
|
|
69
|
+
public struct KeyPossession : Swift.Sendable, Swift.Equatable {
|
|
70
|
+
public let timestampMilliseconds: Swift.Int64
|
|
71
|
+
public let signature: Swift.String
|
|
72
|
+
public init(timestampMilliseconds: Swift.Int64, signature: Swift.String)
|
|
73
|
+
public static func == (a: TerraSDK.KeyPossession, b: TerraSDK.KeyPossession) -> Swift.Bool
|
|
74
|
+
}
|
|
67
75
|
public enum UploadContentEncoding : Swift.String, Swift.Sendable, Swift.Equatable {
|
|
68
76
|
case gzip
|
|
69
77
|
public init?(rawValue: Swift.String)
|
|
@@ -80,12 +88,14 @@ public struct UploadRequest : Swift.Sendable, Swift.Equatable {
|
|
|
80
88
|
public let body: Foundation.Data
|
|
81
89
|
public let contentEncoding: TerraSDK.UploadContentEncoding?
|
|
82
90
|
public let signature: Swift.String
|
|
83
|
-
public
|
|
91
|
+
public let target: Swift.String?
|
|
92
|
+
public init(source: TerraSDK.Source, dataType: TerraSDK.UploadDataType, providerUserID: Swift.String, timestampMilliseconds: Swift.Int64, body: Foundation.Data, signature: Swift.String, contentEncoding: TerraSDK.UploadContentEncoding? = nil, target: Swift.String? = nil)
|
|
84
93
|
public static func == (a: TerraSDK.UploadRequest, b: TerraSDK.UploadRequest) -> Swift.Bool
|
|
85
94
|
}
|
|
86
95
|
public struct LinkGrant : Swift.Sendable, Swift.Equatable {
|
|
87
96
|
public let userID: Swift.String
|
|
88
|
-
public
|
|
97
|
+
public let dataTypes: [TerraSDK.UploadDataType]?
|
|
98
|
+
public init(userID: Swift.String, dataTypes: [TerraSDK.UploadDataType]? = nil)
|
|
89
99
|
public static func == (a: TerraSDK.LinkGrant, b: TerraSDK.LinkGrant) -> Swift.Bool
|
|
90
100
|
}
|
|
91
101
|
public struct PlannedWorkoutRequest : Swift.Sendable, Swift.Equatable {
|
|
@@ -93,7 +103,8 @@ public struct PlannedWorkoutRequest : Swift.Sendable, Swift.Equatable {
|
|
|
93
103
|
public let providerUserID: Swift.String
|
|
94
104
|
public let signature: Swift.String
|
|
95
105
|
public let timestampMilliseconds: Swift.Int64
|
|
96
|
-
public
|
|
106
|
+
public let target: Swift.String?
|
|
107
|
+
public init(source: TerraSDK.Source, providerUserID: Swift.String, signature: Swift.String, timestampMilliseconds: Swift.Int64, target: Swift.String? = nil)
|
|
97
108
|
public static func == (a: TerraSDK.PlannedWorkoutRequest, b: TerraSDK.PlannedWorkoutRequest) -> Swift.Bool
|
|
98
109
|
}
|
|
99
110
|
public struct PlannedWorkoutUpdate : Swift.Sendable, Swift.Equatable {
|
|
@@ -109,7 +120,8 @@ public struct PlannedWorkoutUpdate : Swift.Sendable, Swift.Equatable {
|
|
|
109
120
|
public let signature: Swift.String
|
|
110
121
|
public let timestampMilliseconds: Swift.Int64
|
|
111
122
|
public let body: Foundation.Data
|
|
112
|
-
public
|
|
123
|
+
public let target: Swift.String?
|
|
124
|
+
public init(id: Swift.String, change: TerraSDK.PlannedWorkoutUpdate.Change, source: TerraSDK.Source, providerUserID: Swift.String, signature: Swift.String, timestampMilliseconds: Swift.Int64, body: Foundation.Data, target: Swift.String? = nil)
|
|
113
125
|
public static func encodedBody(id: Swift.String, change: TerraSDK.PlannedWorkoutUpdate.Change) throws -> Foundation.Data
|
|
114
126
|
public static func == (a: TerraSDK.PlannedWorkoutUpdate, b: TerraSDK.PlannedWorkoutUpdate) -> Swift.Bool
|
|
115
127
|
}
|
|
@@ -121,12 +133,14 @@ public protocol TerraBackend : Swift.Sendable {
|
|
|
121
133
|
func sendDiagnostics(_ request: TerraSDK.DiagnosticsRequest) async throws
|
|
122
134
|
func revokeDeviceKey(_ request: TerraSDK.RevokeDeviceKeyRequest) async throws
|
|
123
135
|
func plannedWorkouts(_ request: TerraSDK.PlannedWorkoutRequest) async throws -> [TerraSDK.PlannedWorkout]
|
|
136
|
+
func sdkInit(_ request: TerraSDK.SDKInitRequest) async throws -> TerraSDK.SDKInitGrant
|
|
124
137
|
func updatePlannedWorkout(_ request: TerraSDK.PlannedWorkoutUpdate) async throws
|
|
125
138
|
func pendingPlanActions(_ request: TerraSDK.PlanQueueRequest) async throws -> [TerraSDK.PendingPlanAction]
|
|
126
139
|
func acknowledgePlanActions(_ request: TerraSDK.PlanAckRequest) async throws
|
|
127
140
|
func reportScheduledWorkouts(_ request: TerraSDK.ScheduledWorkoutReportRequest) async throws
|
|
128
141
|
}
|
|
129
142
|
extension TerraSDK.TerraBackend {
|
|
143
|
+
public func sdkInit(_ request: TerraSDK.SDKInitRequest) async throws -> TerraSDK.SDKInitGrant
|
|
130
144
|
public func pendingPlanActions(_ request: TerraSDK.PlanQueueRequest) async throws -> [TerraSDK.PendingPlanAction]
|
|
131
145
|
public func acknowledgePlanActions(_ request: TerraSDK.PlanAckRequest) async throws
|
|
132
146
|
public func reportScheduledWorkouts(_ request: TerraSDK.ScheduledWorkoutReportRequest) async throws
|
|
@@ -140,6 +154,20 @@ public enum DiagnosticsRoute : TerraSDK.SignedRoute {
|
|
|
140
154
|
public enum BackfillAckRoute : TerraSDK.SignedRoute {
|
|
141
155
|
public static let label: Swift.String
|
|
142
156
|
}
|
|
157
|
+
public enum SDKInitRoute : TerraSDK.SignedRoute {
|
|
158
|
+
public static let label: Swift.String
|
|
159
|
+
}
|
|
160
|
+
public struct PartialDeliveryFailure : Swift.Error, Swift.Sendable, Swift.Equatable {
|
|
161
|
+
public let failedUserIDs: [Swift.String]
|
|
162
|
+
public init(failedUserIDs: [Swift.String])
|
|
163
|
+
public static func == (a: TerraSDK.PartialDeliveryFailure, b: TerraSDK.PartialDeliveryFailure) -> Swift.Bool
|
|
164
|
+
}
|
|
165
|
+
public struct SDKInitGrant : Swift.Sendable, Swift.Equatable {
|
|
166
|
+
public let userIDs: [Swift.String]
|
|
167
|
+
public let dataTypes: [TerraSDK.UploadDataType]
|
|
168
|
+
public init(userIDs: [Swift.String], dataTypes: [TerraSDK.UploadDataType])
|
|
169
|
+
public static func == (a: TerraSDK.SDKInitGrant, b: TerraSDK.SDKInitGrant) -> Swift.Bool
|
|
170
|
+
}
|
|
143
171
|
public enum DeviceKeyRevokeRoute : TerraSDK.SignedRoute {
|
|
144
172
|
public static let label: Swift.String
|
|
145
173
|
}
|
|
@@ -161,11 +189,13 @@ public struct SignedRequest<Route> : Swift.Sendable, Swift.Equatable where Route
|
|
|
161
189
|
public let timestampMilliseconds: Swift.Int64
|
|
162
190
|
public let body: Foundation.Data
|
|
163
191
|
public let signature: Swift.String
|
|
164
|
-
public
|
|
192
|
+
public let target: Swift.String?
|
|
193
|
+
public init(source: TerraSDK.Source, providerUserID: Swift.String, timestampMilliseconds: Swift.Int64, body: Foundation.Data, signature: Swift.String, target: Swift.String? = nil)
|
|
165
194
|
public static func == (a: TerraSDK.SignedRequest<Route>, b: TerraSDK.SignedRequest<Route>) -> Swift.Bool
|
|
166
195
|
}
|
|
167
196
|
public typealias DiagnosticsRequest = TerraSDK.SignedRequest<TerraSDK.DiagnosticsRoute>
|
|
168
197
|
public typealias BackfillAckRequest = TerraSDK.SignedRequest<TerraSDK.BackfillAckRoute>
|
|
198
|
+
public typealias SDKInitRequest = TerraSDK.SignedRequest<TerraSDK.SDKInitRoute>
|
|
169
199
|
public typealias RevokeDeviceKeyRequest = TerraSDK.SignedRequest<TerraSDK.DeviceKeyRevokeRoute>
|
|
170
200
|
public typealias PlanQueueRequest = TerraSDK.SignedRequest<TerraSDK.PlanQueueRoute>
|
|
171
201
|
public typealias PlanAckRequest = TerraSDK.SignedRequest<TerraSDK.PlanAckRoute>
|
|
@@ -213,7 +243,7 @@ extension TerraSDK.SignedRequest where Route == TerraSDK.ScheduledWorkoutReportR
|
|
|
213
243
|
public static func encodedBody(workouts: [TerraSDK.LocallyScheduledWorkout]) throws -> Foundation.Data
|
|
214
244
|
}
|
|
215
245
|
extension TerraSDK.SignedRequest where Route == TerraSDK.DeviceKeyRevokeRoute {
|
|
216
|
-
public static func encodedBody(publicKeyBase64DER: Swift.String) throws -> Foundation.Data
|
|
246
|
+
public static func encodedBody(publicKeyBase64DER: Swift.String, userID: Swift.String? = nil) throws -> Foundation.Data
|
|
217
247
|
}
|
|
218
248
|
public struct BackfillPollRequest : Swift.Sendable, Swift.Equatable {
|
|
219
249
|
public static let signedLabel: Swift.String
|
|
@@ -221,7 +251,8 @@ public struct BackfillPollRequest : Swift.Sendable, Swift.Equatable {
|
|
|
221
251
|
public let providerUserID: Swift.String
|
|
222
252
|
public let timestampMilliseconds: Swift.Int64
|
|
223
253
|
public let signature: Swift.String
|
|
224
|
-
public
|
|
254
|
+
public let target: Swift.String?
|
|
255
|
+
public init(source: TerraSDK.Source, providerUserID: Swift.String, timestampMilliseconds: Swift.Int64, signature: Swift.String, target: Swift.String? = nil)
|
|
225
256
|
public static func == (a: TerraSDK.BackfillPollRequest, b: TerraSDK.BackfillPollRequest) -> Swift.Bool
|
|
226
257
|
}
|
|
227
258
|
public struct BackfillDirective : Swift.Sendable, Swift.Equatable {
|
|
@@ -477,6 +508,60 @@ public struct DeferredWake : Swift.Sendable, Swift.Equatable {
|
|
|
477
508
|
public init(generation: Swift.Int, version: Swift.Int)
|
|
478
509
|
public static func == (a: TerraSDK.DeferredWake, b: TerraSDK.DeferredWake) -> Swift.Bool
|
|
479
510
|
}
|
|
511
|
+
public struct ClinicalRecord : Swift.Sendable, Swift.Equatable, Swift.Identifiable {
|
|
512
|
+
public enum ClinicalType : Swift.String, Swift.Sendable, Swift.Hashable, Swift.CaseIterable {
|
|
513
|
+
case allergy
|
|
514
|
+
case condition
|
|
515
|
+
case immunization
|
|
516
|
+
case labResult
|
|
517
|
+
case medication
|
|
518
|
+
case procedure
|
|
519
|
+
case vitalSign
|
|
520
|
+
case coverage
|
|
521
|
+
case clinicalNote
|
|
522
|
+
public init?(rawValue: Swift.String)
|
|
523
|
+
public typealias AllCases = [TerraSDK.ClinicalRecord.ClinicalType]
|
|
524
|
+
public typealias RawValue = Swift.String
|
|
525
|
+
nonisolated public static var allCases: [TerraSDK.ClinicalRecord.ClinicalType] {
|
|
526
|
+
get
|
|
527
|
+
}
|
|
528
|
+
public var rawValue: Swift.String {
|
|
529
|
+
get
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
public enum FHIRRelease : Swift.String, Swift.Sendable, Swift.Hashable, Swift.CaseIterable {
|
|
533
|
+
case r4
|
|
534
|
+
case dstu2
|
|
535
|
+
public init?(rawValue: Swift.String)
|
|
536
|
+
public typealias AllCases = [TerraSDK.ClinicalRecord.FHIRRelease]
|
|
537
|
+
public typealias RawValue = Swift.String
|
|
538
|
+
nonisolated public static var allCases: [TerraSDK.ClinicalRecord.FHIRRelease] {
|
|
539
|
+
get
|
|
540
|
+
}
|
|
541
|
+
public var rawValue: Swift.String {
|
|
542
|
+
get
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
public struct FHIRResource : Swift.Sendable, Swift.Equatable {
|
|
546
|
+
public let resourceType: Swift.String
|
|
547
|
+
public let identifier: Swift.String
|
|
548
|
+
public let release: TerraSDK.ClinicalRecord.FHIRRelease?
|
|
549
|
+
public let sourceURL: Foundation.URL?
|
|
550
|
+
public let data: Foundation.Data
|
|
551
|
+
public init(resourceType: Swift.String, identifier: Swift.String, release: TerraSDK.ClinicalRecord.FHIRRelease?, sourceURL: Foundation.URL? = nil, data: Foundation.Data)
|
|
552
|
+
public static func == (a: TerraSDK.ClinicalRecord.FHIRResource, b: TerraSDK.ClinicalRecord.FHIRResource) -> Swift.Bool
|
|
553
|
+
}
|
|
554
|
+
public let id: Foundation.UUID
|
|
555
|
+
public let clinicalType: TerraSDK.ClinicalRecord.ClinicalType
|
|
556
|
+
public let displayName: Swift.String
|
|
557
|
+
public let interval: Foundation.DateInterval
|
|
558
|
+
public let fhir: TerraSDK.ClinicalRecord.FHIRResource
|
|
559
|
+
public let source: TerraSDK.SampleSource
|
|
560
|
+
public let timeZone: Foundation.TimeZone?
|
|
561
|
+
public init(id: Foundation.UUID, clinicalType: TerraSDK.ClinicalRecord.ClinicalType, displayName: Swift.String, interval: Foundation.DateInterval, fhir: TerraSDK.ClinicalRecord.FHIRResource, source: TerraSDK.SampleSource, timeZone: Foundation.TimeZone? = nil)
|
|
562
|
+
public static func == (a: TerraSDK.ClinicalRecord, b: TerraSDK.ClinicalRecord) -> Swift.Bool
|
|
563
|
+
public typealias ID = Foundation.UUID
|
|
564
|
+
}
|
|
480
565
|
public struct Connection : Swift.Sendable {
|
|
481
566
|
public let source: TerraSDK.Source
|
|
482
567
|
public let userID: Swift.String
|
|
@@ -494,6 +579,7 @@ public struct BackgroundSyncResult : Swift.Sendable {
|
|
|
494
579
|
case alreadyRunning
|
|
495
580
|
case notAuthorized(TerraSDK.TerraError)
|
|
496
581
|
case awaitingConverter
|
|
582
|
+
case notEnabled
|
|
497
583
|
public static func == (a: TerraSDK.BackgroundSyncResult.Skip, b: TerraSDK.BackgroundSyncResult.Skip) -> Swift.Bool
|
|
498
584
|
}
|
|
499
585
|
public var recordsUploaded: Swift.Int {
|
|
@@ -516,6 +602,42 @@ public struct SyncOutcome : Swift.Sendable, Swift.Equatable {
|
|
|
516
602
|
public let syncedThrough: Foundation.Date
|
|
517
603
|
public static func == (a: TerraSDK.SyncOutcome, b: TerraSDK.SyncOutcome) -> Swift.Bool
|
|
518
604
|
}
|
|
605
|
+
public enum DevIDMode : Swift.Sendable, Swift.Equatable {
|
|
606
|
+
case single
|
|
607
|
+
case multiple
|
|
608
|
+
public static func == (a: TerraSDK.DevIDMode, b: TerraSDK.DevIDMode) -> Swift.Bool
|
|
609
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
610
|
+
public var hashValue: Swift.Int {
|
|
611
|
+
get
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
public struct DevIDBinding : Swift.Sendable, Swift.Equatable, Swift.Codable {
|
|
615
|
+
public let devID: Swift.String
|
|
616
|
+
public let userID: Swift.String
|
|
617
|
+
public let dataTypes: [TerraSDK.UploadDataType]?
|
|
618
|
+
public let linkedAt: Foundation.Date
|
|
619
|
+
public var unlinkOwedSince: Foundation.Date? {
|
|
620
|
+
get
|
|
621
|
+
}
|
|
622
|
+
public var goneSince: Foundation.Date? {
|
|
623
|
+
get
|
|
624
|
+
}
|
|
625
|
+
public init(devID: Swift.String, userID: Swift.String, dataTypes: [TerraSDK.UploadDataType]?, linkedAt: Foundation.Date, unlinkOwedSince: Foundation.Date? = nil, goneSince: Foundation.Date? = nil)
|
|
626
|
+
public var isActive: Swift.Bool {
|
|
627
|
+
get
|
|
628
|
+
}
|
|
629
|
+
public static func == (a: TerraSDK.DevIDBinding, b: TerraSDK.DevIDBinding) -> Swift.Bool
|
|
630
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
631
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
632
|
+
}
|
|
633
|
+
public struct PendingDevIDLink : Swift.Sendable, Swift.Equatable, Swift.Codable {
|
|
634
|
+
public let devID: Swift.String
|
|
635
|
+
public let startedAt: Foundation.Date
|
|
636
|
+
public init(devID: Swift.String, startedAt: Foundation.Date)
|
|
637
|
+
public static func == (a: TerraSDK.PendingDevIDLink, b: TerraSDK.PendingDevIDLink) -> Swift.Bool
|
|
638
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
639
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
640
|
+
}
|
|
519
641
|
public protocol DeviceKeyStore : Swift.Sendable {
|
|
520
642
|
func createKey(for source: TerraSDK.Source, generation: Swift.Int) throws -> TerraSDK.DeviceKey
|
|
521
643
|
func existingKey(for source: TerraSDK.Source, generation: Swift.Int) throws -> TerraSDK.DeviceKey?
|
|
@@ -550,6 +672,8 @@ public struct TerraEvent : Swift.Sendable, Swift.Equatable {
|
|
|
550
672
|
case backfillProgress(TerraSDK.UploadDataType, source: TerraSDK.Source, uploaded: Swift.Int, skipped: Swift.Int)
|
|
551
673
|
case dailyDayTooLarge(source: TerraSDK.Source, day: Foundation.Date, bytes: Swift.Int)
|
|
552
674
|
case sleepWakeDateTooLarge(source: TerraSDK.Source, wakeDate: Foundation.Date, bytes: Swift.Int)
|
|
675
|
+
case clinicalRecordTooLarge(source: TerraSDK.Source, id: Foundation.UUID, clinicalType: TerraSDK.ClinicalRecord.ClinicalType, bytes: Swift.Int)
|
|
676
|
+
case devIDBindingChanged(source: TerraSDK.Source, devID: Swift.String, active: Swift.Bool)
|
|
553
677
|
case serverBackfillQueued(TerraSDK.UploadDataType, source: TerraSDK.Source)
|
|
554
678
|
case serverBackfillCompleted(TerraSDK.UploadDataType, source: TerraSDK.Source, uploaded: Swift.Int)
|
|
555
679
|
case serverBackfillAbandoned(TerraSDK.UploadDataType, source: TerraSDK.Source, code: TerraSDK.TerraEvent.FailureCode)
|
|
@@ -577,8 +701,11 @@ public struct TerraEvent : Swift.Sendable, Swift.Equatable {
|
|
|
577
701
|
case syncAlreadyRunning, linkAlreadyRunning, storeLocked, storeUnreadable
|
|
578
702
|
case deadlineExceeded, permissionDenied, authorizationNotDetermined
|
|
579
703
|
case sampleNotFound, rollbackIncomplete, distanceNotAttributable, bloodPressureIncomplete
|
|
704
|
+
case workoutsRequired
|
|
580
705
|
case authorizationUnavailableInExtension, plannedWorkoutUnnamed
|
|
581
706
|
case routeAwaitingConverter
|
|
707
|
+
case dataTypeNotEnabled
|
|
708
|
+
case linkRefused
|
|
582
709
|
public init?(rawValue: Swift.String)
|
|
583
710
|
public typealias RawValue = Swift.String
|
|
584
711
|
public var rawValue: Swift.String {
|
|
@@ -682,6 +809,7 @@ public enum TerraError : Swift.Error, Swift.Sendable {
|
|
|
682
809
|
case healthDataUnavailable
|
|
683
810
|
case notConnected(TerraSDK.Source)
|
|
684
811
|
case routeAwaitingConverter(TerraSDK.UploadDataType)
|
|
812
|
+
case dataTypeNotEnabled(TerraSDK.UploadDataType)
|
|
685
813
|
case tokenUnavailable
|
|
686
814
|
case tokenRejected
|
|
687
815
|
case tokenProviderFailed(any Swift.Error)
|
|
@@ -695,6 +823,7 @@ public enum TerraError : Swift.Error, Swift.Sendable {
|
|
|
695
823
|
case linkRevoked(TerraSDK.Source)
|
|
696
824
|
case devIDMismatch(TerraSDK.Source)
|
|
697
825
|
case linkConflict
|
|
826
|
+
case linkRefused(TerraSDK.LinkRefusal)
|
|
698
827
|
case syncAlreadyRunning(TerraSDK.UploadDataType)
|
|
699
828
|
case linkAlreadyRunning(TerraSDK.Source)
|
|
700
829
|
case storeLocked
|
|
@@ -705,9 +834,12 @@ public enum TerraError : Swift.Error, Swift.Sendable {
|
|
|
705
834
|
case sampleNotFound(Foundation.UUID)
|
|
706
835
|
indirect case rollbackIncomplete(remaining: [Foundation.UUID], cause: TerraSDK.TerraError)
|
|
707
836
|
case distanceNotAttributable(TerraSDK.WorkoutActivity)
|
|
837
|
+
case workoutsRequired(TerraSDK.HealthDataType)
|
|
708
838
|
case bloodPressureIncomplete
|
|
709
839
|
case plannedWorkoutUnnamed
|
|
710
840
|
case authorizationUnavailableInExtension
|
|
841
|
+
case healthRecordsUnavailable
|
|
842
|
+
case healthRecordsUsageDescriptionMissing
|
|
711
843
|
public enum Network : Swift.Sendable, Swift.Equatable {
|
|
712
844
|
case offline
|
|
713
845
|
case timedOut
|
|
@@ -738,6 +870,21 @@ extension TerraSDK.TerraError : Foundation.LocalizedError {
|
|
|
738
870
|
extension TerraSDK.TerraError : Swift.Equatable {
|
|
739
871
|
public static func == (lhs: TerraSDK.TerraError, rhs: TerraSDK.TerraError) -> Swift.Bool
|
|
740
872
|
}
|
|
873
|
+
public enum LinkRefusal : Swift.String, Swift.Sendable, Swift.Hashable, Swift.CaseIterable {
|
|
874
|
+
case sharingDisabled
|
|
875
|
+
case possessionRequired
|
|
876
|
+
case heldByTenant
|
|
877
|
+
case revoked
|
|
878
|
+
public init?(rawValue: Swift.String)
|
|
879
|
+
public typealias AllCases = [TerraSDK.LinkRefusal]
|
|
880
|
+
public typealias RawValue = Swift.String
|
|
881
|
+
nonisolated public static var allCases: [TerraSDK.LinkRefusal] {
|
|
882
|
+
get
|
|
883
|
+
}
|
|
884
|
+
public var rawValue: Swift.String {
|
|
885
|
+
get
|
|
886
|
+
}
|
|
887
|
+
}
|
|
741
888
|
public struct HTTPBackend : TerraSDK.TerraBackend {
|
|
742
889
|
public static let defaultTimeout: Swift.Double
|
|
743
890
|
public init(baseURL: Foundation.URL, session: Foundation.URLSession? = nil)
|
|
@@ -749,15 +896,17 @@ public struct HTTPBackend : TerraSDK.TerraBackend {
|
|
|
749
896
|
public func acknowledgePlanActions(_ request: TerraSDK.PlanAckRequest) async throws
|
|
750
897
|
public func reportScheduledWorkouts(_ request: TerraSDK.ScheduledWorkoutReportRequest) async throws
|
|
751
898
|
public func backfillRequests(_ request: TerraSDK.BackfillPollRequest) async throws -> [TerraSDK.BackfillDirective]
|
|
899
|
+
public func sdkInit(_ request: TerraSDK.SDKInitRequest) async throws -> TerraSDK.SDKInitGrant
|
|
752
900
|
public func acknowledgeBackfills(_ request: TerraSDK.BackfillAckRequest) async throws
|
|
753
901
|
public func sendDiagnostics(_ request: TerraSDK.DiagnosticsRequest) async throws
|
|
754
902
|
public func revokeDeviceKey(_ request: TerraSDK.RevokeDeviceKeyRequest) async throws
|
|
755
903
|
}
|
|
756
904
|
public struct HealthAccess : Swift.Sendable, Swift.Equatable {
|
|
757
905
|
public var read: Swift.Set<TerraSDK.DataCategory>
|
|
906
|
+
public var readTypes: Swift.Set<TerraSDK.HealthDataType>
|
|
758
907
|
public var write: Swift.Set<TerraSDK.DataCategory>
|
|
759
908
|
public var workouts: Swift.Set<TerraSDK.WorkoutScope>
|
|
760
|
-
public init(read: Swift.Set<TerraSDK.DataCategory> = [], write: Swift.Set<TerraSDK.DataCategory> = [], workouts: Swift.Set<TerraSDK.WorkoutScope> = [])
|
|
909
|
+
public init(read: Swift.Set<TerraSDK.DataCategory> = [], readTypes: Swift.Set<TerraSDK.HealthDataType> = [], write: Swift.Set<TerraSDK.DataCategory> = [], workouts: Swift.Set<TerraSDK.WorkoutScope> = [])
|
|
761
910
|
public var isEmpty: Swift.Bool {
|
|
762
911
|
get
|
|
763
912
|
}
|
|
@@ -765,6 +914,126 @@ public struct HealthAccess : Swift.Sendable, Swift.Equatable {
|
|
|
765
914
|
public func intersection(_ other: TerraSDK.HealthAccess) -> TerraSDK.HealthAccess
|
|
766
915
|
public static func == (a: TerraSDK.HealthAccess, b: TerraSDK.HealthAccess) -> Swift.Bool
|
|
767
916
|
}
|
|
917
|
+
public enum HealthDataType : Swift.String, Swift.Sendable, Swift.Hashable, Swift.CaseIterable, Swift.Codable {
|
|
918
|
+
case steps
|
|
919
|
+
case activeEnergy
|
|
920
|
+
case basalEnergy
|
|
921
|
+
case distance
|
|
922
|
+
case floorsClimbed
|
|
923
|
+
case swimmingStrokes
|
|
924
|
+
case exerciseTime
|
|
925
|
+
case moveTime
|
|
926
|
+
case standTime
|
|
927
|
+
case heartRate
|
|
928
|
+
case restingHeartRate
|
|
929
|
+
case sleepAnalysis
|
|
930
|
+
case workouts
|
|
931
|
+
case workoutRoute
|
|
932
|
+
case speed
|
|
933
|
+
case power
|
|
934
|
+
case cyclingCadence
|
|
935
|
+
case weight
|
|
936
|
+
case height
|
|
937
|
+
case bmi
|
|
938
|
+
case bodyFat
|
|
939
|
+
case leanBodyMass
|
|
940
|
+
case waistCircumference
|
|
941
|
+
case bloodPressure
|
|
942
|
+
case bloodGlucose
|
|
943
|
+
case oxygenSaturation
|
|
944
|
+
case bodyTemperature
|
|
945
|
+
case heartRateVariability
|
|
946
|
+
case respiratoryRate
|
|
947
|
+
case vo2Max
|
|
948
|
+
case insulinDelivery
|
|
949
|
+
case heartbeatSeries
|
|
950
|
+
case electrocardiogram
|
|
951
|
+
case dietaryEnergyConsumed
|
|
952
|
+
case dietaryProtein
|
|
953
|
+
case dietaryCarbohydrates
|
|
954
|
+
case dietaryFatTotal
|
|
955
|
+
case dietaryFatSaturated
|
|
956
|
+
case dietaryFatMonounsaturated
|
|
957
|
+
case dietaryFatPolyunsaturated
|
|
958
|
+
case dietarySugar
|
|
959
|
+
case dietaryFiber
|
|
960
|
+
case dietaryCholesterol
|
|
961
|
+
case dietarySodium
|
|
962
|
+
case dietaryPotassium
|
|
963
|
+
case dietaryCalcium
|
|
964
|
+
case dietaryIron
|
|
965
|
+
case dietaryMagnesium
|
|
966
|
+
case dietaryZinc
|
|
967
|
+
case dietaryPhosphorus
|
|
968
|
+
case dietaryIodine
|
|
969
|
+
case dietaryManganese
|
|
970
|
+
case dietaryMolybdenum
|
|
971
|
+
case dietarySelenium
|
|
972
|
+
case dietaryCopper
|
|
973
|
+
case dietaryChromium
|
|
974
|
+
case dietaryChloride
|
|
975
|
+
case dietaryCaffeine
|
|
976
|
+
case dietaryVitaminA
|
|
977
|
+
case dietaryVitaminC
|
|
978
|
+
case dietaryVitaminD
|
|
979
|
+
case dietaryVitaminE
|
|
980
|
+
case dietaryVitaminK
|
|
981
|
+
case dietaryVitaminB6
|
|
982
|
+
case dietaryVitaminB12
|
|
983
|
+
case dietaryThiamin
|
|
984
|
+
case dietaryRiboflavin
|
|
985
|
+
case dietaryNiacin
|
|
986
|
+
case dietaryFolate
|
|
987
|
+
case dietaryBiotin
|
|
988
|
+
case dietaryPantothenicAcid
|
|
989
|
+
case dietaryWater
|
|
990
|
+
case menstrualFlow
|
|
991
|
+
case intermenstrualBleeding
|
|
992
|
+
case ovulationTest
|
|
993
|
+
case cervicalMucus
|
|
994
|
+
case sexualActivity
|
|
995
|
+
case pregnancyTest
|
|
996
|
+
case progesteroneTest
|
|
997
|
+
case pregnancy
|
|
998
|
+
case lactation
|
|
999
|
+
case contraceptive
|
|
1000
|
+
case persistentIntermenstrualBleeding
|
|
1001
|
+
case infrequentCycles
|
|
1002
|
+
case irregularCycles
|
|
1003
|
+
case prolongedPeriods
|
|
1004
|
+
case bleedingDuringPregnancy
|
|
1005
|
+
case bleedingAfterPregnancy
|
|
1006
|
+
case biologicalSex
|
|
1007
|
+
case dateOfBirth
|
|
1008
|
+
case wheelchairUse
|
|
1009
|
+
case activityMoveMode
|
|
1010
|
+
public var categories: Swift.Set<TerraSDK.DataCategory> {
|
|
1011
|
+
get
|
|
1012
|
+
}
|
|
1013
|
+
public static func types(in category: TerraSDK.DataCategory) -> [TerraSDK.HealthDataType]
|
|
1014
|
+
public var nutrient: TerraSDK.Nutrient? {
|
|
1015
|
+
get
|
|
1016
|
+
}
|
|
1017
|
+
public init(nutrient: TerraSDK.Nutrient)
|
|
1018
|
+
public var menstrualEvent: TerraSDK.MenstrualEvent.Kind? {
|
|
1019
|
+
get
|
|
1020
|
+
}
|
|
1021
|
+
public init?(rawValue: Swift.String)
|
|
1022
|
+
public typealias AllCases = [TerraSDK.HealthDataType]
|
|
1023
|
+
public typealias RawValue = Swift.String
|
|
1024
|
+
nonisolated public static var allCases: [TerraSDK.HealthDataType] {
|
|
1025
|
+
get
|
|
1026
|
+
}
|
|
1027
|
+
public var rawValue: Swift.String {
|
|
1028
|
+
get
|
|
1029
|
+
}
|
|
1030
|
+
}
|
|
1031
|
+
extension TerraSDK.HealthKitStore {
|
|
1032
|
+
nonisolated public var supportsHealthRecords: Swift.Bool {
|
|
1033
|
+
get
|
|
1034
|
+
}
|
|
1035
|
+
public func requestClinicalAccess() async throws
|
|
1036
|
+
}
|
|
768
1037
|
extension TerraSDK.HealthKitStore {
|
|
769
1038
|
public func bodyReadings(in interval: Foundation.DateInterval) async throws -> [TerraSDK.BodyReading]
|
|
770
1039
|
public func bodyReadings(in interval: Foundation.DateInterval, recordTypes: Swift.Set<Swift.String>) async throws -> [TerraSDK.BodyReading]
|
|
@@ -777,6 +1046,9 @@ extension TerraSDK.HealthKitStore {
|
|
|
777
1046
|
public func workoutIntensity(inside workouts: [TerraSDK.Workout]) async throws -> [TerraSDK.WorkoutIntensitySample]
|
|
778
1047
|
public func workoutRoutes(of workouts: [TerraSDK.Workout]) async throws -> [TerraSDK.WorkoutRoute]
|
|
779
1048
|
}
|
|
1049
|
+
extension TerraSDK.HealthKitStore {
|
|
1050
|
+
public func readStatus(for type: TerraSDK.HealthDataType) async -> TerraSDK.PermissionStatus
|
|
1051
|
+
}
|
|
780
1052
|
@_hasMissingDesignatedInitializers public actor HealthKitStore : TerraSDK.HealthStore {
|
|
781
1053
|
nonisolated final public let isAvailable: Swift.Bool
|
|
782
1054
|
public init(anchors: any TerraSDK.DeviceStore = KeychainDeviceStore())
|
|
@@ -796,6 +1068,7 @@ extension TerraSDK.HealthKitStore {
|
|
|
796
1068
|
public func delete(_ id: Foundation.UUID, in category: TerraSDK.DataCategory) async throws
|
|
797
1069
|
public func changes(for dataType: TerraSDK.UploadDataType, since anchor: Foundation.Data?, limit: Swift.Int) async throws -> TerraSDK.HealthChanges
|
|
798
1070
|
public func changes(for dataType: TerraSDK.UploadDataType, since anchor: Foundation.Data?, limit: Swift.Int, attachingContents: Swift.Bool) async throws -> TerraSDK.HealthChanges
|
|
1071
|
+
public func changes(for dataType: TerraSDK.UploadDataType, since anchor: Foundation.Data?, limit: Swift.Int, attachingContents: Swift.Bool, readingAs access: TerraSDK.HealthAccess) async throws -> TerraSDK.HealthChanges
|
|
799
1072
|
public func heartRate(in interval: Foundation.DateInterval) async throws -> [TerraSDK.HeartRateSample]
|
|
800
1073
|
public func restingHeartRate(in interval: Foundation.DateInterval) async throws -> [TerraSDK.RestingHeartRateSample]
|
|
801
1074
|
public func stepSamples(in interval: Foundation.DateInterval) async throws -> [TerraSDK.StepCount]
|
|
@@ -887,6 +1160,7 @@ public struct HealthChanges : Swift.Sendable {
|
|
|
887
1160
|
public var menstruation: [TerraSDK.MenstruationFlowDay]
|
|
888
1161
|
public var menstrualEvents: [TerraSDK.MenstrualEvent]
|
|
889
1162
|
public var healthObservations: [TerraSDK.HealthObservation]
|
|
1163
|
+
public var clinicalRecords: [TerraSDK.ClinicalRecord]
|
|
890
1164
|
public var athlete: TerraSDK.AthleteProfile?
|
|
891
1165
|
public var dayTotals: [TerraSDK.DayTotal]
|
|
892
1166
|
public var intraday: [TerraSDK.IntradaySample]
|
|
@@ -934,6 +1208,7 @@ public protocol HealthStore : Swift.Sendable {
|
|
|
934
1208
|
var isAvailable: Swift.Bool { get }
|
|
935
1209
|
var canPresentAuthorization: Swift.Bool { get }
|
|
936
1210
|
func readStatus(for category: TerraSDK.DataCategory) async -> TerraSDK.PermissionStatus
|
|
1211
|
+
func readStatus(for type: TerraSDK.HealthDataType) async -> TerraSDK.PermissionStatus
|
|
937
1212
|
func requestAccess(_ access: TerraSDK.HealthAccess) async throws
|
|
938
1213
|
func servable(_ access: TerraSDK.HealthAccess) async throws -> TerraSDK.HealthAccess
|
|
939
1214
|
func dayTotals(in interval: Foundation.DateInterval, zone: Foundation.TimeZone) async throws -> [TerraSDK.DayTotal]
|
|
@@ -942,6 +1217,7 @@ public protocol HealthStore : Swift.Sendable {
|
|
|
942
1217
|
var appliesDayTotalPolicy: Swift.Bool { get }
|
|
943
1218
|
func changes(for dataType: TerraSDK.UploadDataType, since anchor: Foundation.Data?, limit: Swift.Int) async throws -> TerraSDK.HealthChanges
|
|
944
1219
|
func changes(for dataType: TerraSDK.UploadDataType, since anchor: Foundation.Data?, limit: Swift.Int, attachingContents: Swift.Bool) async throws -> TerraSDK.HealthChanges
|
|
1220
|
+
func changes(for dataType: TerraSDK.UploadDataType, since anchor: Foundation.Data?, limit: Swift.Int, attachingContents: Swift.Bool, readingAs access: TerraSDK.HealthAccess) async throws -> TerraSDK.HealthChanges
|
|
945
1221
|
func observe(_ category: TerraSDK.DataCategory, source: TerraSDK.Source) -> _Concurrency.AsyncStream<TerraSDK.ObservedWake>
|
|
946
1222
|
func enableBackgroundObservation(_ category: TerraSDK.DataCategory, source: TerraSDK.Source) async -> Swift.Bool
|
|
947
1223
|
func replayObservation(_ category: TerraSDK.DataCategory, source: TerraSDK.Source) async -> TerraSDK.ObservedChange
|
|
@@ -970,6 +1246,8 @@ public protocol HealthStore : Swift.Sendable {
|
|
|
970
1246
|
func menstruationFlow(in interval: Foundation.DateInterval) async throws -> [TerraSDK.MenstruationFlowDay]
|
|
971
1247
|
func menstrualEvents(in interval: Foundation.DateInterval) async throws -> [TerraSDK.MenstrualEvent]
|
|
972
1248
|
func healthObservations(in interval: Foundation.DateInterval) async throws -> [TerraSDK.HealthObservation]
|
|
1249
|
+
var supportsHealthRecords: Swift.Bool { get }
|
|
1250
|
+
func requestClinicalAccess() async throws
|
|
973
1251
|
func athleteProfile() async throws -> TerraSDK.AthleteProfile?
|
|
974
1252
|
}
|
|
975
1253
|
extension TerraSDK.HealthStore {
|
|
@@ -980,9 +1258,11 @@ extension TerraSDK.HealthStore {
|
|
|
980
1258
|
get
|
|
981
1259
|
}
|
|
982
1260
|
public func changes(for dataType: TerraSDK.UploadDataType, since anchor: Foundation.Data?, limit: Swift.Int, attachingContents: Swift.Bool) async throws -> TerraSDK.HealthChanges
|
|
1261
|
+
public func changes(for dataType: TerraSDK.UploadDataType, since anchor: Foundation.Data?, limit: Swift.Int, attachingContents: Swift.Bool, readingAs access: TerraSDK.HealthAccess) async throws -> TerraSDK.HealthChanges
|
|
983
1262
|
public var canPresentAuthorization: Swift.Bool {
|
|
984
1263
|
get
|
|
985
1264
|
}
|
|
1265
|
+
public func readStatus(for type: TerraSDK.HealthDataType) async -> TerraSDK.PermissionStatus
|
|
986
1266
|
public func servable(_ access: TerraSDK.HealthAccess) async throws -> TerraSDK.HealthAccess
|
|
987
1267
|
public func save(_ entries: [TerraSDK.BodyEntry]) async throws -> [Foundation.UUID]
|
|
988
1268
|
public func save(_ entries: [TerraSDK.NutritionEntry]) async throws -> [Foundation.UUID]
|
|
@@ -995,6 +1275,10 @@ extension TerraSDK.HealthStore {
|
|
|
995
1275
|
public func intradaySamples(in interval: Foundation.DateInterval) async throws -> [TerraSDK.IntradaySample]
|
|
996
1276
|
public func menstrualEvents(in interval: Foundation.DateInterval) async throws -> [TerraSDK.MenstrualEvent]
|
|
997
1277
|
public func healthObservations(in interval: Foundation.DateInterval) async throws -> [TerraSDK.HealthObservation]
|
|
1278
|
+
public var supportsHealthRecords: Swift.Bool {
|
|
1279
|
+
get
|
|
1280
|
+
}
|
|
1281
|
+
public func requestClinicalAccess() async throws
|
|
998
1282
|
public func workoutIntensity(inside workouts: [TerraSDK.Workout]) async throws -> [TerraSDK.WorkoutIntensitySample]
|
|
999
1283
|
public func workoutRoutes(of workouts: [TerraSDK.Workout]) async throws -> [TerraSDK.WorkoutRoute]
|
|
1000
1284
|
}
|
|
@@ -1040,6 +1324,7 @@ public struct KeychainDeviceStore : TerraSDK.DeviceStore {
|
|
|
1040
1324
|
@discardableResult
|
|
1041
1325
|
public func claimDevID(_ devID: Swift.String) throws -> Swift.Bool
|
|
1042
1326
|
public func loadRequestedAccess() throws -> TerraSDK.HealthAccess
|
|
1327
|
+
public func loadCategoryReadsBeforeTypes() throws -> Swift.Set<TerraSDK.DataCategory>?
|
|
1043
1328
|
@discardableResult
|
|
1044
1329
|
public func recordRequestedAccess(_ access: TerraSDK.HealthAccess) throws -> TerraSDK.HealthAccess
|
|
1045
1330
|
public func loadSyncedThrough(source: TerraSDK.Source, dataType: TerraSDK.UploadDataType) throws -> Foundation.Date?
|
|
@@ -1543,11 +1828,26 @@ public struct StoredConnection : Swift.Sendable, Swift.Equatable, Swift.Codable
|
|
|
1543
1828
|
public var revokedAt: Foundation.Date?
|
|
1544
1829
|
public var dayZones: [TerraSDK.DayZoneStretch]
|
|
1545
1830
|
public var endUser: Swift.String?
|
|
1546
|
-
public
|
|
1831
|
+
public var devIDBindings: [TerraSDK.DevIDBinding]
|
|
1832
|
+
public var sharedDataTypes: [TerraSDK.UploadDataType]?
|
|
1833
|
+
public var sharedDataTypesAt: Foundation.Date?
|
|
1834
|
+
public var primaryDevID: Swift.String?
|
|
1835
|
+
public var pendingLinks: [TerraSDK.PendingDevIDLink]
|
|
1836
|
+
public var notEnabledRoutes: [TerraSDK.NotEnabledRoute]
|
|
1837
|
+
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, devIDBindings: [TerraSDK.DevIDBinding] = [])
|
|
1547
1838
|
public init(from decoder: any Swift.Decoder) throws
|
|
1548
1839
|
public static func == (a: TerraSDK.StoredConnection, b: TerraSDK.StoredConnection) -> Swift.Bool
|
|
1549
1840
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
1550
1841
|
}
|
|
1842
|
+
public struct NotEnabledRoute : Swift.Sendable, Swift.Equatable, Swift.Codable {
|
|
1843
|
+
public let dataType: TerraSDK.UploadDataType
|
|
1844
|
+
public let target: Swift.String?
|
|
1845
|
+
public let since: Foundation.Date
|
|
1846
|
+
public init(dataType: TerraSDK.UploadDataType, target: Swift.String?, since: Foundation.Date)
|
|
1847
|
+
public static func == (a: TerraSDK.NotEnabledRoute, b: TerraSDK.NotEnabledRoute) -> Swift.Bool
|
|
1848
|
+
public func encode(to encoder: any Swift.Encoder) throws
|
|
1849
|
+
public init(from decoder: any Swift.Decoder) throws
|
|
1850
|
+
}
|
|
1551
1851
|
public struct DayZoneStretch : Swift.Sendable, Swift.Equatable, Swift.Codable {
|
|
1552
1852
|
public let start: Foundation.Date
|
|
1553
1853
|
public let end: Foundation.Date
|
|
@@ -1566,8 +1866,9 @@ public struct StoredBackfillRequest : Swift.Sendable, Swift.Equatable, Swift.Cod
|
|
|
1566
1866
|
public var servedThrough: Foundation.Date
|
|
1567
1867
|
public var failedRuns: Swift.Int
|
|
1568
1868
|
public let receivedAt: Foundation.Date
|
|
1869
|
+
public var target: Swift.String?
|
|
1569
1870
|
public static let queueLimit: Swift.Int
|
|
1570
|
-
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)
|
|
1871
|
+
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, target: Swift.String? = nil)
|
|
1571
1872
|
public static func == (a: TerraSDK.StoredBackfillRequest, b: TerraSDK.StoredBackfillRequest) -> Swift.Bool
|
|
1572
1873
|
public func encode(to encoder: any Swift.Encoder) throws
|
|
1573
1874
|
public init(from decoder: any Swift.Decoder) throws
|
|
@@ -1594,6 +1895,9 @@ public struct LinkDiagnostics : Swift.Sendable, Swift.Equatable {
|
|
|
1594
1895
|
public init(generation: Swift.Int, lastDelivery: Foundation.Date?, isRetrying: Swift.Bool, isRevoked: Swift.Bool)
|
|
1595
1896
|
public static func == (a: TerraSDK.LinkDiagnostics, b: TerraSDK.LinkDiagnostics) -> Swift.Bool
|
|
1596
1897
|
}
|
|
1898
|
+
extension TerraSDK.DeviceStore {
|
|
1899
|
+
public func loadCategoryReadsBeforeTypes() throws -> Swift.Set<TerraSDK.DataCategory>?
|
|
1900
|
+
}
|
|
1597
1901
|
public protocol DeviceStore : Swift.Sendable {
|
|
1598
1902
|
func loadConnection(source: TerraSDK.Source) throws -> TerraSDK.StoredConnection?
|
|
1599
1903
|
var storageDomain: Swift.String { get }
|
|
@@ -1603,6 +1907,7 @@ public protocol DeviceStore : Swift.Sendable {
|
|
|
1603
1907
|
func loadRequestedAccess() throws -> TerraSDK.HealthAccess
|
|
1604
1908
|
@discardableResult
|
|
1605
1909
|
func recordRequestedAccess(_ access: TerraSDK.HealthAccess) throws -> TerraSDK.HealthAccess
|
|
1910
|
+
func loadCategoryReadsBeforeTypes() throws -> Swift.Set<TerraSDK.DataCategory>?
|
|
1606
1911
|
func loadProviderUserID() throws -> Swift.String?
|
|
1607
1912
|
func saveProviderUserID(_ id: Swift.String) throws
|
|
1608
1913
|
func loadSyncedThrough(source: TerraSDK.Source, dataType: TerraSDK.UploadDataType) throws -> Foundation.Date?
|
|
@@ -1655,7 +1960,7 @@ public protocol DeviceStore : Swift.Sendable {
|
|
|
1655
1960
|
}
|
|
1656
1961
|
@_hasMissingDesignatedInitializers final public class Terra : Swift.Sendable {
|
|
1657
1962
|
@available(iOSApplicationExtension, unavailable)
|
|
1658
|
-
convenience public init(devID: Swift.String, tokenProvider: (@Sendable () async throws -> Swift.String)? = nil, dayTotals: TerraSDK.DayTotalPolicy = .default)
|
|
1963
|
+
convenience public init(devID: Swift.String, tokenProvider: (@Sendable () async throws -> Swift.String)? = nil, dayTotals: TerraSDK.DayTotalPolicy = .default, devIDMode: TerraSDK.DevIDMode = .single)
|
|
1659
1964
|
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)
|
|
1660
1965
|
@discardableResult
|
|
1661
1966
|
final public func connect(_ source: TerraSDK.Source, for endUser: TerraSDK.EndUser) async throws -> TerraSDK.Connection
|
|
@@ -1667,6 +1972,12 @@ public protocol DeviceStore : Swift.Sendable {
|
|
|
1667
1972
|
final public var permissions: TerraSDK.Permissions {
|
|
1668
1973
|
get
|
|
1669
1974
|
}
|
|
1975
|
+
final public var linkedDevIDs: TerraSDK.LinkedDevIDs {
|
|
1976
|
+
get
|
|
1977
|
+
}
|
|
1978
|
+
final public var devIDMode: TerraSDK.DevIDMode {
|
|
1979
|
+
get
|
|
1980
|
+
}
|
|
1670
1981
|
final public var diagnostics: TerraSDK.Diagnostics {
|
|
1671
1982
|
get
|
|
1672
1983
|
}
|
|
@@ -1703,6 +2014,12 @@ public enum StoreAvailability : Swift.Sendable, Swift.Equatable {
|
|
|
1703
2014
|
get
|
|
1704
2015
|
}
|
|
1705
2016
|
}
|
|
2017
|
+
public struct LinkedDevIDs : Swift.Sendable {
|
|
2018
|
+
@discardableResult
|
|
2019
|
+
public func link(_ devID: Swift.String, using token: Swift.String, source: TerraSDK.Source = .health) async throws -> TerraSDK.DevIDBinding
|
|
2020
|
+
public func unlink(_ devID: Swift.String, source: TerraSDK.Source = .health) async throws
|
|
2021
|
+
public func all(source: TerraSDK.Source = .health, refresh: Swift.Bool = false) async throws -> [TerraSDK.DevIDBinding]
|
|
2022
|
+
}
|
|
1706
2023
|
public struct Diagnostics : Swift.Sendable {
|
|
1707
2024
|
public func events() -> _Concurrency.AsyncStream<TerraSDK.TerraEvent>
|
|
1708
2025
|
public func lastDelivery(for source: TerraSDK.Source = .health) async -> Foundation.Date?
|
|
@@ -1719,9 +2036,11 @@ public struct PlannedWorkouts : Swift.Sendable {
|
|
|
1719
2036
|
public func requestScheduling() async -> TerraSDK.WorkoutSchedulingStatus
|
|
1720
2037
|
}
|
|
1721
2038
|
public struct Permissions : Swift.Sendable {
|
|
1722
|
-
public func request(read: [TerraSDK.DataCategory] = [], write: [TerraSDK.DataCategory] = [], workouts: [TerraSDK.WorkoutScope] = []) async throws
|
|
2039
|
+
public func request(read: [TerraSDK.DataCategory] = [], readTypes: [TerraSDK.HealthDataType] = [], write: [TerraSDK.DataCategory] = [], workouts: [TerraSDK.WorkoutScope] = []) async throws
|
|
2040
|
+
public func requestClinicalRecords() async throws
|
|
1723
2041
|
public func writeStatus(for category: TerraSDK.DataCategory) async -> TerraSDK.PermissionStatus
|
|
1724
2042
|
public func status(for category: TerraSDK.DataCategory) async -> TerraSDK.PermissionStatus
|
|
2043
|
+
public func status(for type: TerraSDK.HealthDataType) async -> TerraSDK.PermissionStatus
|
|
1725
2044
|
public var requested: TerraSDK.HealthAccess {
|
|
1726
2045
|
get async
|
|
1727
2046
|
}
|
|
@@ -1800,6 +2119,7 @@ public enum DataCategory : Swift.String, Swift.Sendable, Swift.Hashable, Swift.C
|
|
|
1800
2119
|
case menstruation
|
|
1801
2120
|
case athlete
|
|
1802
2121
|
case healthObservation
|
|
2122
|
+
case clinicalRecord
|
|
1803
2123
|
public init?(rawValue: Swift.String)
|
|
1804
2124
|
public typealias AllCases = [TerraSDK.DataCategory]
|
|
1805
2125
|
public typealias RawValue = Swift.String
|
|
@@ -1840,6 +2160,7 @@ public enum UploadDataType : Swift.String, Swift.Sendable, Swift.CaseIterable, S
|
|
|
1840
2160
|
case menstruation
|
|
1841
2161
|
case athlete
|
|
1842
2162
|
case healthObservation
|
|
2163
|
+
case clinicalRecord
|
|
1843
2164
|
public static var routable: [TerraSDK.UploadDataType] {
|
|
1844
2165
|
get
|
|
1845
2166
|
}
|
|
@@ -2123,13 +2444,18 @@ extension TerraSDK.Electrocardiogram.Classification : Swift.RawRepresentable {}
|
|
|
2123
2444
|
extension TerraSDK.Electrocardiogram.SymptomsStatus : Swift.Equatable {}
|
|
2124
2445
|
extension TerraSDK.Electrocardiogram.SymptomsStatus : Swift.Hashable {}
|
|
2125
2446
|
extension TerraSDK.Electrocardiogram.SymptomsStatus : Swift.RawRepresentable {}
|
|
2447
|
+
extension TerraSDK.ClinicalRecord.ClinicalType : Swift.RawRepresentable {}
|
|
2448
|
+
extension TerraSDK.ClinicalRecord.FHIRRelease : Swift.RawRepresentable {}
|
|
2126
2449
|
extension TerraSDK.DataCategory : Swift.RawRepresentable {}
|
|
2450
|
+
extension TerraSDK.DevIDMode : Swift.Hashable {}
|
|
2127
2451
|
extension TerraSDK.TerraEvent.FailureCode : Swift.Hashable {}
|
|
2128
2452
|
extension TerraSDK.TerraEvent.FailureCode : Swift.RawRepresentable {}
|
|
2129
2453
|
extension TerraSDK.DeviceKeyRevokeOutcome : Swift.Hashable {}
|
|
2130
2454
|
extension TerraSDK.DeviceKeyRevokeOutcome : Swift.RawRepresentable {}
|
|
2131
2455
|
extension TerraSDK.DiagnosticsReason : Swift.Hashable {}
|
|
2132
2456
|
extension TerraSDK.DiagnosticsReason : Swift.RawRepresentable {}
|
|
2457
|
+
extension TerraSDK.LinkRefusal : Swift.RawRepresentable {}
|
|
2458
|
+
extension TerraSDK.HealthDataType : Swift.RawRepresentable {}
|
|
2133
2459
|
extension TerraSDK.HealthObservation.Category : Swift.RawRepresentable {}
|
|
2134
2460
|
extension TerraSDK.HealthObservation.Severity : Swift.RawRepresentable {}
|
|
2135
2461
|
extension TerraSDK.MenstruationFlowDay.Flow : Swift.RawRepresentable {}
|