@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.
Files changed (64) hide show
  1. package/README.md +68 -0
  2. package/android/src/bridgeCore/kotlin/co/tryterra/sdk/bridge/BridgeBootstrap.kt +14 -1
  3. package/android/src/bridgeCore/kotlin/co/tryterra/sdk/bridge/Conversions.kt +35 -2
  4. package/android/src/bridgeCore/kotlin/co/tryterra/sdk/bridge/Rejections.kt +3 -0
  5. package/android/src/bridgeCore/kotlin/co/tryterra/sdk/bridge/TerraBridgeOpsImpl.kt +33 -0
  6. package/android/src/bridgeCore/kotlin/co/tryterra/sdk/bridge/generated/BridgeErrors.kt +12 -0
  7. package/android/src/bridgeCore/kotlin/co/tryterra/sdk/bridge/generated/BridgeOps.kt +47 -0
  8. package/android/src/bridgeCore/kotlin/co/tryterra/sdk/bridge/generated/BridgeTypes.kt +348 -0
  9. package/docs/availability.md +111 -1
  10. package/frameworks/TerraSDK.xcframework/ios-arm64/TerraSDK.framework/Info.plist +0 -0
  11. package/frameworks/TerraSDK.xcframework/ios-arm64/TerraSDK.framework/Modules/TerraSDK.swiftmodule/arm64-apple-ios.abi.json +21646 -9224
  12. package/frameworks/TerraSDK.xcframework/ios-arm64/TerraSDK.framework/Modules/TerraSDK.swiftmodule/arm64-apple-ios.package.swiftinterface +351 -14
  13. package/frameworks/TerraSDK.xcframework/ios-arm64/TerraSDK.framework/Modules/TerraSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +351 -14
  14. package/frameworks/TerraSDK.xcframework/ios-arm64/TerraSDK.framework/Modules/TerraSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  15. package/frameworks/TerraSDK.xcframework/ios-arm64/TerraSDK.framework/Modules/TerraSDK.swiftmodule/arm64-apple-ios.swiftinterface +339 -13
  16. package/frameworks/TerraSDK.xcframework/ios-arm64/TerraSDK.framework/TerraSDK +0 -0
  17. package/frameworks/TerraSDK.xcframework/ios-arm64/dSYMs/TerraSDK.framework.dSYM/Contents/Info.plist +2 -2
  18. package/frameworks/TerraSDK.xcframework/ios-arm64/dSYMs/TerraSDK.framework.dSYM/Contents/Resources/DWARF/TerraSDK +0 -0
  19. package/frameworks/TerraSDK.xcframework/ios-arm64/dSYMs/TerraSDK.framework.dSYM/Contents/Resources/Relocations/aarch64/TerraSDK.yml +7449 -6589
  20. package/frameworks/TerraSDK.xcframework/ios-arm64_x86_64-simulator/TerraSDK.framework/Info.plist +0 -0
  21. package/frameworks/TerraSDK.xcframework/ios-arm64_x86_64-simulator/TerraSDK.framework/Modules/TerraSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +21646 -9224
  22. package/frameworks/TerraSDK.xcframework/ios-arm64_x86_64-simulator/TerraSDK.framework/Modules/TerraSDK.swiftmodule/arm64-apple-ios-simulator.package.swiftinterface +351 -14
  23. package/frameworks/TerraSDK.xcframework/ios-arm64_x86_64-simulator/TerraSDK.framework/Modules/TerraSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +351 -14
  24. package/frameworks/TerraSDK.xcframework/ios-arm64_x86_64-simulator/TerraSDK.framework/Modules/TerraSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  25. package/frameworks/TerraSDK.xcframework/ios-arm64_x86_64-simulator/TerraSDK.framework/Modules/TerraSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +339 -13
  26. package/frameworks/TerraSDK.xcframework/ios-arm64_x86_64-simulator/TerraSDK.framework/Modules/TerraSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +21646 -9224
  27. package/frameworks/TerraSDK.xcframework/ios-arm64_x86_64-simulator/TerraSDK.framework/Modules/TerraSDK.swiftmodule/x86_64-apple-ios-simulator.package.swiftinterface +351 -14
  28. package/frameworks/TerraSDK.xcframework/ios-arm64_x86_64-simulator/TerraSDK.framework/Modules/TerraSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +351 -14
  29. package/frameworks/TerraSDK.xcframework/ios-arm64_x86_64-simulator/TerraSDK.framework/Modules/TerraSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  30. package/frameworks/TerraSDK.xcframework/ios-arm64_x86_64-simulator/TerraSDK.framework/Modules/TerraSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +339 -13
  31. package/frameworks/TerraSDK.xcframework/ios-arm64_x86_64-simulator/TerraSDK.framework/TerraSDK +0 -0
  32. package/frameworks/TerraSDK.xcframework/ios-arm64_x86_64-simulator/TerraSDK.framework/_CodeSignature/CodeResources +21 -21
  33. package/frameworks/TerraSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/TerraSDK.framework.dSYM/Contents/Info.plist +2 -2
  34. package/frameworks/TerraSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/TerraSDK.framework.dSYM/Contents/Resources/DWARF/TerraSDK +0 -0
  35. package/frameworks/TerraSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/TerraSDK.framework.dSYM/Contents/Resources/Relocations/aarch64/TerraSDK.yml +7450 -6590
  36. package/frameworks/TerraSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/TerraSDK.framework.dSYM/Contents/Resources/Relocations/x86_64/TerraSDK.yml +7359 -6508
  37. package/ios/TerraBridgeCore/BridgeBootstrap.swift +13 -3
  38. package/ios/TerraBridgeCore/Conversions.swift +36 -1
  39. package/ios/TerraBridgeCore/Generated/BridgeErrors.swift +15 -0
  40. package/ios/TerraBridgeCore/Generated/BridgeOps.swift +82 -0
  41. package/ios/TerraBridgeCore/Generated/BridgeTypes.swift +252 -3
  42. package/ios/TerraBridgeCore/Rejections.swift +5 -1
  43. package/ios/TerraBridgeCore/TerraBridgeOpsImpl.swift +32 -1
  44. package/lib/Terra.d.ts +47 -1
  45. package/lib/Terra.js +16 -0
  46. package/lib/generated/client.d.ts +33 -1
  47. package/lib/generated/client.js +42 -0
  48. package/lib/generated/codecs.d.ts +15 -1
  49. package/lib/generated/codecs.js +119 -5
  50. package/lib/generated/errors.d.ts +1 -1
  51. package/lib/generated/errors.js +6 -1
  52. package/lib/generated/ops.d.ts +1 -1
  53. package/lib/generated/ops.js +12 -0
  54. package/lib/generated/types.d.ts +70 -2
  55. package/lib/generated/types.js +101 -1
  56. package/lib/index.d.ts +1 -1
  57. package/package.json +3 -3
  58. package/src/Terra.ts +64 -0
  59. package/src/generated/client.ts +49 -2
  60. package/src/generated/codecs.ts +112 -6
  61. package/src/generated/errors.ts +11 -1
  62. package/src/generated/ops.ts +17 -0
  63. package/src/generated/types.ts +274 -1
  64. package/src/index.ts +1 -0
@@ -81,6 +81,269 @@ public enum class DataCategory {
81
81
  */
82
82
  @SerialName("athlete")
83
83
  ATHLETE,
84
+ /**
85
+ * Apple Health Records. Opt-in: asked for only by permissions.requestClinicalRecords, on
86
+ * HealthKit's own sheet, and never part of a default request. Health Connect has no
87
+ * counterpart.
88
+ *
89
+ * Available on ios only.
90
+ */
91
+ @SerialName("clinicalRecord")
92
+ CLINICAL_RECORD,
93
+ }
94
+
95
+ /**
96
+ * One kind of health data, at the granularity a permission sheet can ask for it: the
97
+ * type-level twin of DataCategory. permissions.request with readTypes asks for exactly these,
98
+ * and from then on the SDK reads and uploads nothing else. Each dietary type is HealthKit's
99
+ * HKQuantityTypeIdentifierDietary identifier less its prefix; on Health Connect they all read
100
+ * NutritionRecord, and the store keeps only the requested nutrients of each meal.
101
+ * healthObservation and clinicalRecord have no types. docs/sdk-reference.md lists the
102
+ * HealthKit and Health Connect types behind each and the route it feeds.
103
+ */
104
+ @Serializable
105
+ public enum class HealthDataType {
106
+ @SerialName("steps")
107
+ STEPS,
108
+ @SerialName("activeEnergy")
109
+ ACTIVE_ENERGY,
110
+ /**
111
+ * HealthKit's basalEnergyBurned; Health Connect's BasalMetabolicRateRecord, which the daily
112
+ * route totals into basal energy.
113
+ */
114
+ @SerialName("basalEnergy")
115
+ BASAL_ENERGY,
116
+ /**
117
+ * Every distance the store records. HealthKit splits it by activity; Health Connect holds one
118
+ * undifferentiated DistanceRecord.
119
+ */
120
+ @SerialName("distance")
121
+ DISTANCE,
122
+ @SerialName("floorsClimbed")
123
+ FLOORS_CLIMBED,
124
+ /** Available on ios only. */
125
+ @SerialName("swimmingStrokes")
126
+ SWIMMING_STROKES,
127
+ /** Available on ios only. */
128
+ @SerialName("exerciseTime")
129
+ EXERCISE_TIME,
130
+ /** Available on ios only. */
131
+ @SerialName("moveTime")
132
+ MOVE_TIME,
133
+ /**
134
+ * Apple's stand minutes, and the stand hours HealthKit's activity summary counts.
135
+ *
136
+ * Available on ios only.
137
+ */
138
+ @SerialName("standTime")
139
+ STAND_TIME,
140
+ @SerialName("heartRate")
141
+ HEART_RATE,
142
+ @SerialName("restingHeartRate")
143
+ RESTING_HEART_RATE,
144
+ @SerialName("sleepAnalysis")
145
+ SLEEP_ANALYSIS,
146
+ /**
147
+ * The sessions themselves. A session's energy, distance and steps travel only where
148
+ * activeEnergy, distance and steps are requested too.
149
+ */
150
+ @SerialName("workouts")
151
+ WORKOUTS,
152
+ /**
153
+ * A workout's GPS track. iOS needs a location usage string; Health Connect asks about each
154
+ * session's track itself.
155
+ */
156
+ @SerialName("workoutRoute")
157
+ WORKOUT_ROUTE,
158
+ @SerialName("speed")
159
+ SPEED,
160
+ @SerialName("power")
161
+ POWER,
162
+ /** On Health Connect granted under READ_EXERCISE, the sessions' own permission. */
163
+ @SerialName("cyclingCadence")
164
+ CYCLING_CADENCE,
165
+ @SerialName("weight")
166
+ WEIGHT,
167
+ @SerialName("height")
168
+ HEIGHT,
169
+ /** Available on ios only. */
170
+ @SerialName("bmi")
171
+ BMI,
172
+ @SerialName("bodyFat")
173
+ BODY_FAT,
174
+ @SerialName("leanBodyMass")
175
+ LEAN_BODY_MASS,
176
+ /** Available on ios only. */
177
+ @SerialName("waistCircumference")
178
+ WAIST_CIRCUMFERENCE,
179
+ @SerialName("bloodPressure")
180
+ BLOOD_PRESSURE,
181
+ @SerialName("bloodGlucose")
182
+ BLOOD_GLUCOSE,
183
+ @SerialName("oxygenSaturation")
184
+ OXYGEN_SATURATION,
185
+ /**
186
+ * Body and basal temperature, plus the sleeping wrist temperature (iOS) or skin temperature
187
+ * (Android) where the OS has it.
188
+ */
189
+ @SerialName("bodyTemperature")
190
+ BODY_TEMPERATURE,
191
+ /** SDNN on iOS, RMSSD on Android: different statistics, never one series. */
192
+ @SerialName("heartRateVariability")
193
+ HEART_RATE_VARIABILITY,
194
+ @SerialName("respiratoryRate")
195
+ RESPIRATORY_RATE,
196
+ @SerialName("vo2Max")
197
+ VO2_MAX,
198
+ /** Available on ios only. */
199
+ @SerialName("insulinDelivery")
200
+ INSULIN_DELIVERY,
201
+ /** Available on ios only. */
202
+ @SerialName("heartbeatSeries")
203
+ HEARTBEAT_SERIES,
204
+ /** Available on ios only. */
205
+ @SerialName("electrocardiogram")
206
+ ELECTROCARDIOGRAM,
207
+ @SerialName("dietaryEnergyConsumed")
208
+ DIETARY_ENERGY_CONSUMED,
209
+ @SerialName("dietaryProtein")
210
+ DIETARY_PROTEIN,
211
+ @SerialName("dietaryCarbohydrates")
212
+ DIETARY_CARBOHYDRATES,
213
+ @SerialName("dietaryFatTotal")
214
+ DIETARY_FAT_TOTAL,
215
+ @SerialName("dietaryFatSaturated")
216
+ DIETARY_FAT_SATURATED,
217
+ @SerialName("dietaryFatMonounsaturated")
218
+ DIETARY_FAT_MONOUNSATURATED,
219
+ @SerialName("dietaryFatPolyunsaturated")
220
+ DIETARY_FAT_POLYUNSATURATED,
221
+ @SerialName("dietarySugar")
222
+ DIETARY_SUGAR,
223
+ @SerialName("dietaryFiber")
224
+ DIETARY_FIBER,
225
+ @SerialName("dietaryCholesterol")
226
+ DIETARY_CHOLESTEROL,
227
+ @SerialName("dietarySodium")
228
+ DIETARY_SODIUM,
229
+ @SerialName("dietaryPotassium")
230
+ DIETARY_POTASSIUM,
231
+ @SerialName("dietaryCalcium")
232
+ DIETARY_CALCIUM,
233
+ @SerialName("dietaryIron")
234
+ DIETARY_IRON,
235
+ @SerialName("dietaryMagnesium")
236
+ DIETARY_MAGNESIUM,
237
+ @SerialName("dietaryZinc")
238
+ DIETARY_ZINC,
239
+ @SerialName("dietaryPhosphorus")
240
+ DIETARY_PHOSPHORUS,
241
+ @SerialName("dietaryIodine")
242
+ DIETARY_IODINE,
243
+ @SerialName("dietaryManganese")
244
+ DIETARY_MANGANESE,
245
+ @SerialName("dietaryMolybdenum")
246
+ DIETARY_MOLYBDENUM,
247
+ @SerialName("dietarySelenium")
248
+ DIETARY_SELENIUM,
249
+ @SerialName("dietaryCopper")
250
+ DIETARY_COPPER,
251
+ @SerialName("dietaryChromium")
252
+ DIETARY_CHROMIUM,
253
+ @SerialName("dietaryChloride")
254
+ DIETARY_CHLORIDE,
255
+ @SerialName("dietaryCaffeine")
256
+ DIETARY_CAFFEINE,
257
+ @SerialName("dietaryVitaminA")
258
+ DIETARY_VITAMIN_A,
259
+ @SerialName("dietaryVitaminC")
260
+ DIETARY_VITAMIN_C,
261
+ @SerialName("dietaryVitaminD")
262
+ DIETARY_VITAMIN_D,
263
+ @SerialName("dietaryVitaminE")
264
+ DIETARY_VITAMIN_E,
265
+ @SerialName("dietaryVitaminK")
266
+ DIETARY_VITAMIN_K,
267
+ @SerialName("dietaryVitaminB6")
268
+ DIETARY_VITAMIN_B6,
269
+ @SerialName("dietaryVitaminB12")
270
+ DIETARY_VITAMIN_B12,
271
+ @SerialName("dietaryThiamin")
272
+ DIETARY_THIAMIN,
273
+ @SerialName("dietaryRiboflavin")
274
+ DIETARY_RIBOFLAVIN,
275
+ @SerialName("dietaryNiacin")
276
+ DIETARY_NIACIN,
277
+ @SerialName("dietaryFolate")
278
+ DIETARY_FOLATE,
279
+ @SerialName("dietaryBiotin")
280
+ DIETARY_BIOTIN,
281
+ @SerialName("dietaryPantothenicAcid")
282
+ DIETARY_PANTOTHENIC_ACID,
283
+ /** Water, which travels as hydration rather than as a nutrient. */
284
+ @SerialName("dietaryWater")
285
+ DIETARY_WATER,
286
+ @SerialName("menstrualFlow")
287
+ MENSTRUAL_FLOW,
288
+ @SerialName("intermenstrualBleeding")
289
+ INTERMENSTRUAL_BLEEDING,
290
+ @SerialName("ovulationTest")
291
+ OVULATION_TEST,
292
+ @SerialName("cervicalMucus")
293
+ CERVICAL_MUCUS,
294
+ @SerialName("sexualActivity")
295
+ SEXUAL_ACTIVITY,
296
+ /** Available on ios only. */
297
+ @SerialName("pregnancyTest")
298
+ PREGNANCY_TEST,
299
+ /** Available on ios only. */
300
+ @SerialName("progesteroneTest")
301
+ PROGESTERONE_TEST,
302
+ /** Available on ios only. */
303
+ @SerialName("pregnancy")
304
+ PREGNANCY,
305
+ /** Available on ios only. */
306
+ @SerialName("lactation")
307
+ LACTATION,
308
+ /** Available on ios only. */
309
+ @SerialName("contraceptive")
310
+ CONTRACEPTIVE,
311
+ /** Available on ios only. */
312
+ @SerialName("persistentIntermenstrualBleeding")
313
+ PERSISTENT_INTERMENSTRUAL_BLEEDING,
314
+ /** Available on ios only. */
315
+ @SerialName("infrequentCycles")
316
+ INFREQUENT_CYCLES,
317
+ /** Available on ios only. */
318
+ @SerialName("irregularCycles")
319
+ IRREGULAR_CYCLES,
320
+ /** Available on ios only. */
321
+ @SerialName("prolongedPeriods")
322
+ PROLONGED_PERIODS,
323
+ /** Available on ios only. */
324
+ @SerialName("bleedingDuringPregnancy")
325
+ BLEEDING_DURING_PREGNANCY,
326
+ /** Available on ios only. */
327
+ @SerialName("bleedingAfterPregnancy")
328
+ BLEEDING_AFTER_PREGNANCY,
329
+ /** Available on ios only. */
330
+ @SerialName("biologicalSex")
331
+ BIOLOGICAL_SEX,
332
+ /** Available on ios only. */
333
+ @SerialName("dateOfBirth")
334
+ DATE_OF_BIRTH,
335
+ /** Available on ios only. */
336
+ @SerialName("wheelchairUse")
337
+ WHEELCHAIR_USE,
338
+ /** Available on ios only. */
339
+ @SerialName("activityMoveMode")
340
+ ACTIVITY_MOVE_MODE,
341
+ /** Available on android only. */
342
+ @SerialName("boneMass")
343
+ BONE_MASS,
344
+ /** Available on android only. */
345
+ @SerialName("bodyWaterMass")
346
+ BODY_WATER_MASS,
84
347
  }
85
348
 
86
349
  @Serializable
@@ -383,12 +646,28 @@ public enum class FailureCode {
383
646
  ROLLBACK_INCOMPLETE,
384
647
  @SerialName("distanceNotAttributable")
385
648
  DISTANCE_NOT_ATTRIBUTABLE,
649
+ @SerialName("workoutsRequired")
650
+ WORKOUTS_REQUIRED,
386
651
  @SerialName("bloodPressureIncomplete")
387
652
  BLOOD_PRESSURE_INCOMPLETE,
388
653
  @SerialName("authorizationUnavailableInExtension")
389
654
  AUTHORIZATION_UNAVAILABLE_IN_EXTENSION,
390
655
  @SerialName("routeAwaitingConverter")
391
656
  ROUTE_AWAITING_CONVERTER,
657
+ /**
658
+ * Terra answered 409 data_type_not_enabled: the client has not enabled the data type. Only
659
+ * clinicalRecord needs enabling, and Android has no clinicalRecord route.
660
+ *
661
+ * Available on ios only.
662
+ */
663
+ @SerialName("dataTypeNotEnabled")
664
+ DATA_TYPE_NOT_ENABLED,
665
+ /**
666
+ * Terra refused, permanently, to share this device's key with a customer. Only multi-dev-id
667
+ * mode shares a key.
668
+ */
669
+ @SerialName("linkRefused")
670
+ LINK_REFUSED,
392
671
  /** Available on android only. */
393
672
  @SerialName("readQuotaExceeded")
394
673
  READ_QUOTA_EXCEEDED,
@@ -1005,6 +1284,12 @@ public data class HealthAccess(
1005
1284
  @Serializable(with = DataCategorySetSerializer::class) public val read: List<DataCategory>,
1006
1285
  @Serializable(with = DataCategorySetSerializer::class) public val write: List<DataCategory>,
1007
1286
  public val workouts: List<WorkoutScope>,
1287
+ /**
1288
+ * The types asked for individually, sorted by wire name; absent for an install that asked only
1289
+ * by category. Optional rather than a set so every earlier payload still decodes. Once present
1290
+ * the install reads and uploads only these types and the types of the categories in read.
1291
+ */
1292
+ public val readTypes: List<HealthDataType>? = null,
1008
1293
  )
1009
1294
 
1010
1295
  @Serializable
@@ -1172,6 +1457,12 @@ public data class BootstrapState(
1172
1457
  public val platform: String,
1173
1458
  public val sdkVersion: String,
1174
1459
  public val backgroundRegistered: Boolean,
1460
+ /**
1461
+ * single or multiple, as the native bootstrap configured the client (Info.plist TerraDevIDMode
1462
+ * on iOS, manifest meta-data co.tryterra.sdk.DEV_ID_MODE on Android). Lets the app detect a
1463
+ * missing key before linkDevId refuses with dev_id_mismatch.
1464
+ */
1465
+ public val devIdMode: String? = null,
1175
1466
  )
1176
1467
 
1177
1468
  /**
@@ -1203,6 +1494,12 @@ public data class CategoryRequest(
1203
1494
  public val source: Source? = null,
1204
1495
  )
1205
1496
 
1497
+ @Serializable
1498
+ public data class DataTypeRequest(
1499
+ public val type: HealthDataType,
1500
+ public val source: Source? = null,
1501
+ )
1502
+
1206
1503
  @Serializable
1207
1504
  public data class RecordIdRequest(
1208
1505
  public val id: String,
@@ -1225,6 +1522,12 @@ public data class PermissionRequest(
1225
1522
  @Serializable(with = DataCategorySetSerializer::class) public val write: List<DataCategory>,
1226
1523
  public val workouts: List<WorkoutScope>,
1227
1524
  public val source: Source? = null,
1525
+ /**
1526
+ * Individual types to read, for a host that discloses specific data rather than whole
1527
+ * categories. Optional, so a payload from a wrapper that predates types still decodes. A type
1528
+ * this platform has no store type for rejects with bridge.unsupported_on_platform.
1529
+ */
1530
+ public val readTypes: List<HealthDataType>? = null,
1228
1531
  )
1229
1532
 
1230
1533
  /**
@@ -1262,6 +1565,51 @@ public data class MarkCompleteRequest(
1262
1565
  public val at: String? = null,
1263
1566
  )
1264
1567
 
1568
+ /** One customer linking a multi-dev-id installation, with a link token that customer minted. */
1569
+ @Serializable
1570
+ public data class LinkDevIdRequest(
1571
+ public val devId: String,
1572
+ public val token: String,
1573
+ public val source: Source? = null,
1574
+ )
1575
+
1576
+ @Serializable
1577
+ public data class DevIdRequest(
1578
+ public val devId: String,
1579
+ public val source: Source? = null,
1580
+ )
1581
+
1582
+ /** One customer's connection to a multi-dev-id installation's shared device link. */
1583
+ @Serializable
1584
+ public data class DevIdBinding(
1585
+ public val devId: String,
1586
+ /** Terra's id for this customer's connection. */
1587
+ public val userId: String,
1588
+ /**
1589
+ * The upload routes the customer selected, as Terra answered at link. Absent when Terra did
1590
+ * not say, which syncs the app's requested access for this customer.
1591
+ */
1592
+ public val dataTypes: List<String>? = null,
1593
+ public val linkedAt: String,
1594
+ /**
1595
+ * False once Terra's init no longer lists this connection: the customer removed it or stopped
1596
+ * accepting the key. Nothing is read or backfilled for it until the customer links again.
1597
+ */
1598
+ public val active: Boolean,
1599
+ )
1600
+
1601
+ @Serializable
1602
+ public data class LinkedDevIdsRequest(
1603
+ public val source: Source? = null,
1604
+ /** Ask Terra's init first, so active is as of now. */
1605
+ public val refresh: Boolean? = null,
1606
+ )
1607
+
1608
+ @Serializable
1609
+ public data class DevIdBindingList(
1610
+ public val bindings: List<DevIdBinding>,
1611
+ )
1612
+
1265
1613
  @Serializable
1266
1614
  public data class BoolResult(
1267
1615
  public val value: Boolean,
@@ -20,13 +20,18 @@ at runtime, and becomes available without a breaking change when the SDK catches
20
20
  | `client.connections` | yes | yes |
21
21
  | `client.availability` | yes | yes |
22
22
  | `client.disconnect` | yes | yes |
23
+ | `client.linkDevId` | yes | yes |
24
+ | `client.unlinkDevId` | yes | yes |
25
+ | `client.linkedDevIds` | yes | yes |
23
26
  | `token.setProviderPresent` | yes | yes |
24
27
  | `token.resolve` | yes | yes |
25
28
  | `token.reject` | yes | yes |
26
29
  | `permissions.request` | yes | yes |
27
30
  | `permissions.status` | yes | yes |
31
+ | `permissions.typeStatus` | yes | yes |
28
32
  | `permissions.writeStatus` | yes | yes |
29
33
  | `permissions.requested` | yes | yes |
34
+ | `permissions.requestClinicalRecords` | yes | - |
30
35
  | `permissions.statuses` | - | yes |
31
36
  | `permissions.backgroundReadStatus` | - | yes |
32
37
  | `permissions.historyReadStatus` | - | yes |
@@ -93,6 +98,101 @@ at runtime, and becomes available without a breaking change when the SDK catches
93
98
  | `DataCategory` | `menstruation` | yes | yes | supported |
94
99
  | `DataCategory` | `athlete` | yes | - | supported |
95
100
  | `DataCategory` | `healthObservation` | yes | - | excluded |
101
+ | `DataCategory` | `clinicalRecord` | yes | - | supported |
102
+ | `HealthDataType` | `steps` | yes | yes | supported |
103
+ | `HealthDataType` | `activeEnergy` | yes | yes | supported |
104
+ | `HealthDataType` | `basalEnergy` | yes | yes | supported |
105
+ | `HealthDataType` | `distance` | yes | yes | supported |
106
+ | `HealthDataType` | `floorsClimbed` | yes | yes | supported |
107
+ | `HealthDataType` | `swimmingStrokes` | yes | - | supported |
108
+ | `HealthDataType` | `exerciseTime` | yes | - | supported |
109
+ | `HealthDataType` | `moveTime` | yes | - | supported |
110
+ | `HealthDataType` | `standTime` | yes | - | supported |
111
+ | `HealthDataType` | `heartRate` | yes | yes | supported |
112
+ | `HealthDataType` | `restingHeartRate` | yes | yes | supported |
113
+ | `HealthDataType` | `sleepAnalysis` | yes | yes | supported |
114
+ | `HealthDataType` | `workouts` | yes | yes | supported |
115
+ | `HealthDataType` | `workoutRoute` | yes | yes | supported |
116
+ | `HealthDataType` | `speed` | yes | yes | supported |
117
+ | `HealthDataType` | `power` | yes | yes | supported |
118
+ | `HealthDataType` | `cyclingCadence` | yes | yes | supported |
119
+ | `HealthDataType` | `weight` | yes | yes | supported |
120
+ | `HealthDataType` | `height` | yes | yes | supported |
121
+ | `HealthDataType` | `bmi` | yes | - | supported |
122
+ | `HealthDataType` | `bodyFat` | yes | yes | supported |
123
+ | `HealthDataType` | `leanBodyMass` | yes | yes | supported |
124
+ | `HealthDataType` | `waistCircumference` | yes | - | supported |
125
+ | `HealthDataType` | `bloodPressure` | yes | yes | supported |
126
+ | `HealthDataType` | `bloodGlucose` | yes | yes | supported |
127
+ | `HealthDataType` | `oxygenSaturation` | yes | yes | supported |
128
+ | `HealthDataType` | `bodyTemperature` | yes | yes | supported |
129
+ | `HealthDataType` | `heartRateVariability` | yes | yes | supported |
130
+ | `HealthDataType` | `respiratoryRate` | yes | yes | supported |
131
+ | `HealthDataType` | `vo2Max` | yes | yes | supported |
132
+ | `HealthDataType` | `insulinDelivery` | yes | - | supported |
133
+ | `HealthDataType` | `heartbeatSeries` | yes | - | supported |
134
+ | `HealthDataType` | `electrocardiogram` | yes | - | supported |
135
+ | `HealthDataType` | `dietaryEnergyConsumed` | yes | yes | supported |
136
+ | `HealthDataType` | `dietaryProtein` | yes | yes | supported |
137
+ | `HealthDataType` | `dietaryCarbohydrates` | yes | yes | supported |
138
+ | `HealthDataType` | `dietaryFatTotal` | yes | yes | supported |
139
+ | `HealthDataType` | `dietaryFatSaturated` | yes | yes | supported |
140
+ | `HealthDataType` | `dietaryFatMonounsaturated` | yes | yes | supported |
141
+ | `HealthDataType` | `dietaryFatPolyunsaturated` | yes | yes | supported |
142
+ | `HealthDataType` | `dietarySugar` | yes | yes | supported |
143
+ | `HealthDataType` | `dietaryFiber` | yes | yes | supported |
144
+ | `HealthDataType` | `dietaryCholesterol` | yes | yes | supported |
145
+ | `HealthDataType` | `dietarySodium` | yes | yes | supported |
146
+ | `HealthDataType` | `dietaryPotassium` | yes | yes | supported |
147
+ | `HealthDataType` | `dietaryCalcium` | yes | yes | supported |
148
+ | `HealthDataType` | `dietaryIron` | yes | yes | supported |
149
+ | `HealthDataType` | `dietaryMagnesium` | yes | yes | supported |
150
+ | `HealthDataType` | `dietaryZinc` | yes | yes | supported |
151
+ | `HealthDataType` | `dietaryPhosphorus` | yes | yes | supported |
152
+ | `HealthDataType` | `dietaryIodine` | yes | yes | supported |
153
+ | `HealthDataType` | `dietaryManganese` | yes | yes | supported |
154
+ | `HealthDataType` | `dietaryMolybdenum` | yes | yes | supported |
155
+ | `HealthDataType` | `dietarySelenium` | yes | yes | supported |
156
+ | `HealthDataType` | `dietaryCopper` | yes | yes | supported |
157
+ | `HealthDataType` | `dietaryChromium` | yes | yes | supported |
158
+ | `HealthDataType` | `dietaryChloride` | yes | yes | supported |
159
+ | `HealthDataType` | `dietaryCaffeine` | yes | yes | supported |
160
+ | `HealthDataType` | `dietaryVitaminA` | yes | yes | supported |
161
+ | `HealthDataType` | `dietaryVitaminC` | yes | yes | supported |
162
+ | `HealthDataType` | `dietaryVitaminD` | yes | yes | supported |
163
+ | `HealthDataType` | `dietaryVitaminE` | yes | yes | supported |
164
+ | `HealthDataType` | `dietaryVitaminK` | yes | yes | supported |
165
+ | `HealthDataType` | `dietaryVitaminB6` | yes | yes | supported |
166
+ | `HealthDataType` | `dietaryVitaminB12` | yes | yes | supported |
167
+ | `HealthDataType` | `dietaryThiamin` | yes | yes | supported |
168
+ | `HealthDataType` | `dietaryRiboflavin` | yes | yes | supported |
169
+ | `HealthDataType` | `dietaryNiacin` | yes | yes | supported |
170
+ | `HealthDataType` | `dietaryFolate` | yes | yes | supported |
171
+ | `HealthDataType` | `dietaryBiotin` | yes | yes | supported |
172
+ | `HealthDataType` | `dietaryPantothenicAcid` | yes | yes | supported |
173
+ | `HealthDataType` | `dietaryWater` | yes | yes | supported |
174
+ | `HealthDataType` | `menstrualFlow` | yes | yes | supported |
175
+ | `HealthDataType` | `intermenstrualBleeding` | yes | yes | supported |
176
+ | `HealthDataType` | `ovulationTest` | yes | yes | supported |
177
+ | `HealthDataType` | `cervicalMucus` | yes | yes | supported |
178
+ | `HealthDataType` | `sexualActivity` | yes | yes | supported |
179
+ | `HealthDataType` | `pregnancyTest` | yes | - | supported |
180
+ | `HealthDataType` | `progesteroneTest` | yes | - | supported |
181
+ | `HealthDataType` | `pregnancy` | yes | - | supported |
182
+ | `HealthDataType` | `lactation` | yes | - | supported |
183
+ | `HealthDataType` | `contraceptive` | yes | - | supported |
184
+ | `HealthDataType` | `persistentIntermenstrualBleeding` | yes | - | supported |
185
+ | `HealthDataType` | `infrequentCycles` | yes | - | supported |
186
+ | `HealthDataType` | `irregularCycles` | yes | - | supported |
187
+ | `HealthDataType` | `prolongedPeriods` | yes | - | supported |
188
+ | `HealthDataType` | `bleedingDuringPregnancy` | yes | - | supported |
189
+ | `HealthDataType` | `bleedingAfterPregnancy` | yes | - | supported |
190
+ | `HealthDataType` | `biologicalSex` | yes | - | supported |
191
+ | `HealthDataType` | `dateOfBirth` | yes | - | supported |
192
+ | `HealthDataType` | `wheelchairUse` | yes | - | supported |
193
+ | `HealthDataType` | `activityMoveMode` | yes | - | supported |
194
+ | `HealthDataType` | `boneMass` | - | yes | supported |
195
+ | `HealthDataType` | `bodyWaterMass` | - | yes | supported |
96
196
  | `PermissionStatus` | `granted` | yes | yes | supported |
97
197
  | `PermissionStatus` | `denied` | yes | yes | supported |
98
198
  | `PermissionStatus` | `notDetermined` | yes | yes | supported |
@@ -200,9 +300,12 @@ at runtime, and becomes available without a breaking change when the SDK catches
200
300
  | `FailureCode` | `sampleNotFound` | yes | yes | supported |
201
301
  | `FailureCode` | `rollbackIncomplete` | yes | yes | supported |
202
302
  | `FailureCode` | `distanceNotAttributable` | yes | yes | supported |
303
+ | `FailureCode` | `workoutsRequired` | yes | yes | supported |
203
304
  | `FailureCode` | `bloodPressureIncomplete` | yes | yes | supported |
204
305
  | `FailureCode` | `authorizationUnavailableInExtension` | yes | yes | supported |
205
306
  | `FailureCode` | `routeAwaitingConverter` | yes | yes | supported |
307
+ | `FailureCode` | `dataTypeNotEnabled` | yes | - | supported |
308
+ | `FailureCode` | `linkRefused` | yes | yes | supported |
206
309
  | `FailureCode` | `readQuotaExceeded` | - | yes | supported |
207
310
  | `FailureCode` | `plannedWorkoutUnnamed` | yes | - | supported |
208
311
  | `WorkoutSchedulingStatus` | `unsupported` | yes | - | supported |
@@ -280,7 +383,7 @@ at runtime, and becomes available without a breaking change when the SDK catches
280
383
  Each one exists in at least one native SDK. They are listed rather than dropped, because a
281
384
  case that simply went unmentioned is the bug this whole schema exists to prevent.
282
385
 
283
- - `DataCategory.healthObservation` (excluded): docs/sdk-reference.md records it as carrying no HealthKit types yet.
386
+ - `DataCategory.healthObservation` (excluded): The iOS SDK reads these types and uploads them on the healthObservation route, but has no local accessor for them, so a wrapper has nothing to expose.
284
387
  - `DayTotalMetric.steps` (excluded): daily.steps answers steps, split by writer. A merged total beside it would be two step figures for one day.
285
388
  - `DayTotalMetric.swimmingStrokeCount` (excluded): Uploaded, and never part of the 1.x daily read this op replaces.
286
389
  - `DayTotalMetric.appleMoveTime` (excluded): A ring figure the 1.x daily read never returned. Uploaded.
@@ -337,6 +440,8 @@ case that simply went unmentioned is the bug this whole schema exists to prevent
337
440
  | `plannedWorkoutsScheduled` | yes | - |
338
441
  | `plannedWorkoutScheduleFailed` | yes | - |
339
442
  | `sleepWakeDateTooLarge` | yes | - |
443
+ | `clinicalRecordTooLarge` | yes | - |
444
+ | `devIDBindingChanged` | yes | yes |
340
445
  | `backgroundWorkGap` | - | yes |
341
446
  | `backgroundWorkReset` | - | yes |
342
447
  | `changeTokenExpired` | - | yes |
@@ -352,6 +457,7 @@ case that simply went unmentioned is the bug this whole schema exists to prevent
352
457
  | `health_data_unavailable` | false | yes | yes | sdk |
353
458
  | `not_connected` | false | yes | yes | sdk |
354
459
  | `route_awaiting_converter` | false | yes | yes | sdk |
460
+ | `data_type_not_enabled` | false | yes | - | sdk |
355
461
  | `token_unavailable` | false | yes | yes | sdk |
356
462
  | `token_rejected` | false | yes | yes | sdk |
357
463
  | `token_provider_failed` | false | yes | yes | sdk |
@@ -364,6 +470,7 @@ case that simply went unmentioned is the bug this whole schema exists to prevent
364
470
  | `link_revoked` | false | yes | yes | sdk |
365
471
  | `dev_id_mismatch` | false | yes | yes | sdk |
366
472
  | `link_conflict` | true | yes | yes | sdk |
473
+ | `link_refused` | false | yes | yes | sdk |
367
474
  | `sync_already_running` | false | yes | yes | sdk |
368
475
  | `link_already_running` | false | yes | yes | sdk |
369
476
  | `store_locked` | true | yes | yes | sdk |
@@ -375,8 +482,11 @@ case that simply went unmentioned is the bug this whole schema exists to prevent
375
482
  | `sample_not_found` | false | yes | yes | sdk |
376
483
  | `rollback_incomplete` | false | yes | yes | sdk |
377
484
  | `distance_not_attributable` | false | yes | yes | sdk |
485
+ | `workouts_required` | false | yes | yes | sdk |
378
486
  | `blood_pressure_incomplete` | false | yes | yes | sdk |
379
487
  | `authorization_unavailable_in_extension` | false | yes | yes | sdk |
488
+ | `health_records_unavailable` | false | yes | - | sdk |
489
+ | `health_records_usage_description_missing` | false | yes | - | sdk |
380
490
  | `planned_workout_unnamed` | false | yes | - | sdk |
381
491
  | `network.transport` | true | yes | yes | sdk |
382
492
  | `network.throttled` | true | yes | yes | sdk |