@ovok/native 1.17.0-dev.2287 → 1.17.0-dev.2295

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 (163) hide show
  1. package/lib/commonjs/modules/data-sync/components/android/android-health-connect-authorization-provider.js +14 -5
  2. package/lib/commonjs/modules/data-sync/components/android/android-health-connect-authorization-provider.js.map +1 -1
  3. package/lib/commonjs/modules/data-sync/services/base-health-sync-service.js +4 -7
  4. package/lib/commonjs/modules/data-sync/services/base-health-sync-service.js.map +1 -1
  5. package/lib/commonjs/modules/data-sync/services/managers/data-processor.js +22 -9
  6. package/lib/commonjs/modules/data-sync/services/managers/data-processor.js.map +1 -1
  7. package/lib/commonjs/modules/data-sync/utils/get-health-record-sync-id.js +21 -2
  8. package/lib/commonjs/modules/data-sync/utils/get-health-record-sync-id.js.map +1 -1
  9. package/lib/commonjs/modules/data-sync/utils/get-records-from-health-connect.js +2 -1
  10. package/lib/commonjs/modules/data-sync/utils/get-records-from-health-connect.js.map +1 -1
  11. package/lib/commonjs/modules/data-sync/utils/get-samples-from-health.js +2 -1
  12. package/lib/commonjs/modules/data-sync/utils/get-samples-from-health.js.map +1 -1
  13. package/lib/commonjs/modules/data-sync/utils/get-total-records-count.js +4 -0
  14. package/lib/commonjs/modules/data-sync/utils/get-total-records-count.js.map +1 -1
  15. package/lib/commonjs/modules/data-sync/utils/get-total-samples-count.js +4 -0
  16. package/lib/commonjs/modules/data-sync/utils/get-total-samples-count.js.map +1 -1
  17. package/lib/commonjs/modules/data-sync/utils/health-connect-series.js +4 -7
  18. package/lib/commonjs/modules/data-sync/utils/health-connect-series.js.map +1 -1
  19. package/lib/commonjs/modules/data-sync/utils/healthkit-series.js +5 -8
  20. package/lib/commonjs/modules/data-sync/utils/healthkit-series.js.map +1 -1
  21. package/lib/commonjs/modules/data-sync/utils/hourly-series.js +42 -2
  22. package/lib/commonjs/modules/data-sync/utils/hourly-series.js.map +1 -1
  23. package/lib/commonjs/modules/data-sync/utils/identify-imported-observations.js +9 -1
  24. package/lib/commonjs/modules/data-sync/utils/identify-imported-observations.js.map +1 -1
  25. package/lib/commonjs/modules/next/bluetooth/{families/finicare/crc.js → codec/crc8-maxim.js} +1 -1
  26. package/lib/commonjs/modules/next/bluetooth/codec/crc8-maxim.js.map +1 -0
  27. package/lib/commonjs/modules/next/bluetooth/families/built-in.js +3 -2
  28. package/lib/commonjs/modules/next/bluetooth/families/built-in.js.map +1 -1
  29. package/lib/commonjs/modules/next/bluetooth/families/famidoc-hearing-aid/famidoc-hearing-aid.js +17 -0
  30. package/lib/commonjs/modules/next/bluetooth/families/famidoc-hearing-aid/famidoc-hearing-aid.js.map +1 -0
  31. package/lib/commonjs/modules/next/bluetooth/families/famidoc-hearing-aid/frame.js +89 -0
  32. package/lib/commonjs/modules/next/bluetooth/families/famidoc-hearing-aid/frame.js.map +1 -0
  33. package/lib/commonjs/modules/next/bluetooth/families/famidoc-hearing-aid/models.js +14 -0
  34. package/lib/commonjs/modules/next/bluetooth/families/famidoc-hearing-aid/models.js.map +1 -0
  35. package/lib/commonjs/modules/next/bluetooth/families/famidoc-hearing-aid/protocol.js +30 -0
  36. package/lib/commonjs/modules/next/bluetooth/families/famidoc-hearing-aid/protocol.js.map +1 -0
  37. package/lib/commonjs/modules/next/bluetooth/families/famidoc-hearing-aid/replies.js +104 -0
  38. package/lib/commonjs/modules/next/bluetooth/families/famidoc-hearing-aid/replies.js.map +1 -0
  39. package/lib/commonjs/modules/next/bluetooth/families/famidoc-hearing-aid/session.js +79 -0
  40. package/lib/commonjs/modules/next/bluetooth/families/famidoc-hearing-aid/session.js.map +1 -0
  41. package/lib/commonjs/modules/next/bluetooth/families/finicare/frame.js +3 -3
  42. package/lib/commonjs/modules/next/bluetooth/families/finicare/frame.js.map +1 -1
  43. package/lib/module/modules/data-sync/components/android/android-health-connect-authorization-provider.js +15 -6
  44. package/lib/module/modules/data-sync/components/android/android-health-connect-authorization-provider.js.map +1 -1
  45. package/lib/module/modules/data-sync/services/base-health-sync-service.js +4 -7
  46. package/lib/module/modules/data-sync/services/base-health-sync-service.js.map +1 -1
  47. package/lib/module/modules/data-sync/services/managers/data-processor.js +23 -10
  48. package/lib/module/modules/data-sync/services/managers/data-processor.js.map +1 -1
  49. package/lib/module/modules/data-sync/utils/get-health-record-sync-id.js +19 -1
  50. package/lib/module/modules/data-sync/utils/get-health-record-sync-id.js.map +1 -1
  51. package/lib/module/modules/data-sync/utils/get-records-from-health-connect.js +2 -1
  52. package/lib/module/modules/data-sync/utils/get-records-from-health-connect.js.map +1 -1
  53. package/lib/module/modules/data-sync/utils/get-samples-from-health.js +2 -1
  54. package/lib/module/modules/data-sync/utils/get-samples-from-health.js.map +1 -1
  55. package/lib/module/modules/data-sync/utils/get-total-records-count.js +4 -0
  56. package/lib/module/modules/data-sync/utils/get-total-records-count.js.map +1 -1
  57. package/lib/module/modules/data-sync/utils/get-total-samples-count.js +4 -0
  58. package/lib/module/modules/data-sync/utils/get-total-samples-count.js.map +1 -1
  59. package/lib/module/modules/data-sync/utils/health-connect-series.js +5 -8
  60. package/lib/module/modules/data-sync/utils/health-connect-series.js.map +1 -1
  61. package/lib/module/modules/data-sync/utils/healthkit-series.js +6 -9
  62. package/lib/module/modules/data-sync/utils/healthkit-series.js.map +1 -1
  63. package/lib/module/modules/data-sync/utils/hourly-series.js +41 -3
  64. package/lib/module/modules/data-sync/utils/hourly-series.js.map +1 -1
  65. package/lib/module/modules/data-sync/utils/identify-imported-observations.js +9 -1
  66. package/lib/module/modules/data-sync/utils/identify-imported-observations.js.map +1 -1
  67. package/lib/module/modules/next/bluetooth/{families/finicare/crc.js → codec/crc8-maxim.js} +1 -1
  68. package/lib/module/modules/next/bluetooth/codec/crc8-maxim.js.map +1 -0
  69. package/lib/module/modules/next/bluetooth/families/built-in.js +3 -2
  70. package/lib/module/modules/next/bluetooth/families/built-in.js.map +1 -1
  71. package/lib/module/modules/next/bluetooth/families/famidoc-hearing-aid/famidoc-hearing-aid.js +9 -0
  72. package/lib/module/modules/next/bluetooth/families/famidoc-hearing-aid/famidoc-hearing-aid.js.map +1 -0
  73. package/lib/module/modules/next/bluetooth/families/famidoc-hearing-aid/frame.js +83 -0
  74. package/lib/module/modules/next/bluetooth/families/famidoc-hearing-aid/frame.js.map +1 -0
  75. package/lib/module/modules/next/bluetooth/families/famidoc-hearing-aid/models.js +12 -0
  76. package/lib/module/modules/next/bluetooth/families/famidoc-hearing-aid/models.js.map +1 -0
  77. package/lib/module/modules/next/bluetooth/families/famidoc-hearing-aid/protocol.js +28 -0
  78. package/lib/module/modules/next/bluetooth/families/famidoc-hearing-aid/protocol.js.map +1 -0
  79. package/lib/module/modules/next/bluetooth/families/famidoc-hearing-aid/replies.js +96 -0
  80. package/lib/module/modules/next/bluetooth/families/famidoc-hearing-aid/replies.js.map +1 -0
  81. package/lib/module/modules/next/bluetooth/families/famidoc-hearing-aid/session.js +76 -0
  82. package/lib/module/modules/next/bluetooth/families/famidoc-hearing-aid/session.js.map +1 -0
  83. package/lib/module/modules/next/bluetooth/families/finicare/frame.js +1 -1
  84. package/lib/module/modules/next/bluetooth/families/finicare/frame.js.map +1 -1
  85. package/lib/typescript/commonjs/src/modules/data-sync/components/android/android-health-connect-authorization-provider.d.ts.map +1 -1
  86. package/lib/typescript/commonjs/src/modules/data-sync/services/base-health-sync-service.d.ts.map +1 -1
  87. package/lib/typescript/commonjs/src/modules/data-sync/services/managers/data-processor.d.ts +19 -16
  88. package/lib/typescript/commonjs/src/modules/data-sync/services/managers/data-processor.d.ts.map +1 -1
  89. package/lib/typescript/commonjs/src/modules/data-sync/types/health-authorization-status.d.ts +8 -1
  90. package/lib/typescript/commonjs/src/modules/data-sync/types/health-authorization-status.d.ts.map +1 -1
  91. package/lib/typescript/commonjs/src/modules/data-sync/utils/get-health-record-sync-id.d.ts +6 -1
  92. package/lib/typescript/commonjs/src/modules/data-sync/utils/get-health-record-sync-id.d.ts.map +1 -1
  93. package/lib/typescript/commonjs/src/modules/data-sync/utils/get-records-from-health-connect.d.ts.map +1 -1
  94. package/lib/typescript/commonjs/src/modules/data-sync/utils/get-samples-from-health.d.ts +5 -1
  95. package/lib/typescript/commonjs/src/modules/data-sync/utils/get-samples-from-health.d.ts.map +1 -1
  96. package/lib/typescript/commonjs/src/modules/data-sync/utils/get-total-records-count.d.ts.map +1 -1
  97. package/lib/typescript/commonjs/src/modules/data-sync/utils/get-total-samples-count.d.ts.map +1 -1
  98. package/lib/typescript/commonjs/src/modules/data-sync/utils/health-connect-series.d.ts +9 -5
  99. package/lib/typescript/commonjs/src/modules/data-sync/utils/health-connect-series.d.ts.map +1 -1
  100. package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-series.d.ts +10 -6
  101. package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-series.d.ts.map +1 -1
  102. package/lib/typescript/commonjs/src/modules/data-sync/utils/hourly-series.d.ts +24 -4
  103. package/lib/typescript/commonjs/src/modules/data-sync/utils/hourly-series.d.ts.map +1 -1
  104. package/lib/typescript/commonjs/src/modules/data-sync/utils/identify-imported-observations.d.ts +3 -1
  105. package/lib/typescript/commonjs/src/modules/data-sync/utils/identify-imported-observations.d.ts.map +1 -1
  106. package/lib/typescript/commonjs/src/modules/next/bluetooth/{families/finicare/crc.d.ts → codec/crc8-maxim.d.ts} +1 -1
  107. package/lib/typescript/commonjs/src/modules/next/bluetooth/codec/crc8-maxim.d.ts.map +1 -0
  108. package/lib/typescript/commonjs/src/modules/next/bluetooth/families/built-in.d.ts.map +1 -1
  109. package/lib/typescript/commonjs/src/modules/next/bluetooth/families/famidoc-hearing-aid/famidoc-hearing-aid.d.ts +6 -0
  110. package/lib/typescript/commonjs/src/modules/next/bluetooth/families/famidoc-hearing-aid/famidoc-hearing-aid.d.ts.map +1 -0
  111. package/lib/typescript/commonjs/src/modules/next/bluetooth/families/famidoc-hearing-aid/frame.d.ts +38 -0
  112. package/lib/typescript/commonjs/src/modules/next/bluetooth/families/famidoc-hearing-aid/frame.d.ts.map +1 -0
  113. package/lib/typescript/commonjs/src/modules/next/bluetooth/families/famidoc-hearing-aid/models.d.ts +5 -0
  114. package/lib/typescript/commonjs/src/modules/next/bluetooth/families/famidoc-hearing-aid/models.d.ts.map +1 -0
  115. package/lib/typescript/commonjs/src/modules/next/bluetooth/families/famidoc-hearing-aid/protocol.d.ts +6 -0
  116. package/lib/typescript/commonjs/src/modules/next/bluetooth/families/famidoc-hearing-aid/protocol.d.ts.map +1 -0
  117. package/lib/typescript/commonjs/src/modules/next/bluetooth/families/famidoc-hearing-aid/replies.d.ts +20 -0
  118. package/lib/typescript/commonjs/src/modules/next/bluetooth/families/famidoc-hearing-aid/replies.d.ts.map +1 -0
  119. package/lib/typescript/commonjs/src/modules/next/bluetooth/families/famidoc-hearing-aid/session.d.ts +19 -0
  120. package/lib/typescript/commonjs/src/modules/next/bluetooth/families/famidoc-hearing-aid/session.d.ts.map +1 -0
  121. package/lib/typescript/commonjs/src/modules/next/bluetooth/families/finicare/frame.d.ts.map +1 -1
  122. package/lib/typescript/module/src/modules/data-sync/components/android/android-health-connect-authorization-provider.d.ts.map +1 -1
  123. package/lib/typescript/module/src/modules/data-sync/services/base-health-sync-service.d.ts.map +1 -1
  124. package/lib/typescript/module/src/modules/data-sync/services/managers/data-processor.d.ts +19 -16
  125. package/lib/typescript/module/src/modules/data-sync/services/managers/data-processor.d.ts.map +1 -1
  126. package/lib/typescript/module/src/modules/data-sync/types/health-authorization-status.d.ts +8 -1
  127. package/lib/typescript/module/src/modules/data-sync/types/health-authorization-status.d.ts.map +1 -1
  128. package/lib/typescript/module/src/modules/data-sync/utils/get-health-record-sync-id.d.ts +6 -1
  129. package/lib/typescript/module/src/modules/data-sync/utils/get-health-record-sync-id.d.ts.map +1 -1
  130. package/lib/typescript/module/src/modules/data-sync/utils/get-records-from-health-connect.d.ts.map +1 -1
  131. package/lib/typescript/module/src/modules/data-sync/utils/get-samples-from-health.d.ts +5 -1
  132. package/lib/typescript/module/src/modules/data-sync/utils/get-samples-from-health.d.ts.map +1 -1
  133. package/lib/typescript/module/src/modules/data-sync/utils/get-total-records-count.d.ts.map +1 -1
  134. package/lib/typescript/module/src/modules/data-sync/utils/get-total-samples-count.d.ts.map +1 -1
  135. package/lib/typescript/module/src/modules/data-sync/utils/health-connect-series.d.ts +9 -5
  136. package/lib/typescript/module/src/modules/data-sync/utils/health-connect-series.d.ts.map +1 -1
  137. package/lib/typescript/module/src/modules/data-sync/utils/healthkit-series.d.ts +10 -6
  138. package/lib/typescript/module/src/modules/data-sync/utils/healthkit-series.d.ts.map +1 -1
  139. package/lib/typescript/module/src/modules/data-sync/utils/hourly-series.d.ts +24 -4
  140. package/lib/typescript/module/src/modules/data-sync/utils/hourly-series.d.ts.map +1 -1
  141. package/lib/typescript/module/src/modules/data-sync/utils/identify-imported-observations.d.ts +3 -1
  142. package/lib/typescript/module/src/modules/data-sync/utils/identify-imported-observations.d.ts.map +1 -1
  143. package/lib/typescript/module/src/modules/next/bluetooth/{families/finicare/crc.d.ts → codec/crc8-maxim.d.ts} +1 -1
  144. package/lib/typescript/module/src/modules/next/bluetooth/codec/crc8-maxim.d.ts.map +1 -0
  145. package/lib/typescript/module/src/modules/next/bluetooth/families/built-in.d.ts.map +1 -1
  146. package/lib/typescript/module/src/modules/next/bluetooth/families/famidoc-hearing-aid/famidoc-hearing-aid.d.ts +6 -0
  147. package/lib/typescript/module/src/modules/next/bluetooth/families/famidoc-hearing-aid/famidoc-hearing-aid.d.ts.map +1 -0
  148. package/lib/typescript/module/src/modules/next/bluetooth/families/famidoc-hearing-aid/frame.d.ts +38 -0
  149. package/lib/typescript/module/src/modules/next/bluetooth/families/famidoc-hearing-aid/frame.d.ts.map +1 -0
  150. package/lib/typescript/module/src/modules/next/bluetooth/families/famidoc-hearing-aid/models.d.ts +5 -0
  151. package/lib/typescript/module/src/modules/next/bluetooth/families/famidoc-hearing-aid/models.d.ts.map +1 -0
  152. package/lib/typescript/module/src/modules/next/bluetooth/families/famidoc-hearing-aid/protocol.d.ts +6 -0
  153. package/lib/typescript/module/src/modules/next/bluetooth/families/famidoc-hearing-aid/protocol.d.ts.map +1 -0
  154. package/lib/typescript/module/src/modules/next/bluetooth/families/famidoc-hearing-aid/replies.d.ts +20 -0
  155. package/lib/typescript/module/src/modules/next/bluetooth/families/famidoc-hearing-aid/replies.d.ts.map +1 -0
  156. package/lib/typescript/module/src/modules/next/bluetooth/families/famidoc-hearing-aid/session.d.ts +19 -0
  157. package/lib/typescript/module/src/modules/next/bluetooth/families/famidoc-hearing-aid/session.d.ts.map +1 -0
  158. package/lib/typescript/module/src/modules/next/bluetooth/families/finicare/frame.d.ts.map +1 -1
  159. package/package.json +1 -1
  160. package/lib/commonjs/modules/next/bluetooth/families/finicare/crc.js.map +0 -1
  161. package/lib/module/modules/next/bluetooth/families/finicare/crc.js.map +0 -1
  162. package/lib/typescript/commonjs/src/modules/next/bluetooth/families/finicare/crc.d.ts.map +0 -1
  163. package/lib/typescript/module/src/modules/next/bluetooth/families/finicare/crc.d.ts.map +0 -1
@@ -13,10 +13,30 @@ declare const toHourlySeries: (typeIdentifier: string, unit: string, minutes: re
13
13
  * The finished hours from `start`'s hour up to the current one, in windows of a day at most: one health-store query
14
14
  * each, so a first import of months doesn't ask for everything at once.
15
15
  */
16
- declare const finishedHourWindows: (start: Date, now?: Date) => Array<{
16
+ declare const finishedHourWindows: (start: Date, now?: Date) => HourWindow[];
17
+ type HourWindow = {
17
18
  from: Date;
18
19
  to: Date;
19
- }>;
20
- export { finishedHourWindows, toHourlySeries };
21
- export type { MinuteValue };
20
+ };
21
+ /** The day windows one read of a series takes, and where it got to. */
22
+ type SeriesPage = {
23
+ windows: HourWindow[];
24
+ readUpTo?: Date;
25
+ hasMore: boolean;
26
+ };
27
+ /** The next days of a series to read, at most `chunkSize` hours: what one save sends. */
28
+ declare const seriesPage: (startDate: Date, readUpTo: string | undefined, chunkSize: number) => SeriesPage;
29
+ /** The finished hours a series has left to read, for progress, without reading them. */
30
+ declare const seriesHoursLeft: (startDate: Date, readUpTo?: string) => number;
31
+ /** A page of a series as a provider result: its hours, the hour it was read up to as the anchor, and whether more is left. */
32
+ declare const toSeriesResult: <TTypeIdentifier>(typeIdentifier: TTypeIdentifier, page: SeriesPage, data: SeriesHealthData[]) => {
33
+ data: SeriesHealthData[];
34
+ hasMore: boolean;
35
+ anchor: {
36
+ typeIdentifier: TTypeIdentifier;
37
+ anchor: string;
38
+ } | undefined;
39
+ };
40
+ export { finishedHourWindows, seriesHoursLeft, seriesPage, toHourlySeries, toSeriesResult };
41
+ export type { MinuteValue, SeriesPage };
22
42
  //# sourceMappingURL=hourly-series.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hourly-series.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/hourly-series.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAKxD,gEAAgE;AAChE,KAAK,WAAW,GAAG;IAAE,KAAK,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAElD;;;GAGG;AACH,QAAA,MAAM,cAAc,GAClB,gBAAgB,MAAM,EACtB,MAAM,MAAM,EACZ,SAAS,SAAS,WAAW,EAAE,KAC9B,gBAAgB,EAuBlB,CAAC;AAEF;;;GAGG;AACH,QAAA,MAAM,mBAAmB,GAAI,OAAO,IAAI,EAAE,UAAgB,KAAG,KAAK,CAAC;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,EAAE,EAAE,IAAI,CAAA;CAAE,CAS1F,CAAC;AAEF,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,CAAC;AAC/C,YAAY,EAAE,WAAW,EAAE,CAAC"}
1
+ {"version":3,"file":"hourly-series.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/hourly-series.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAMxD,gEAAgE;AAChE,KAAK,WAAW,GAAG;IAAE,KAAK,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAElD;;;GAGG;AACH,QAAA,MAAM,cAAc,GAClB,gBAAgB,MAAM,EACtB,MAAM,MAAM,EACZ,SAAS,SAAS,WAAW,EAAE,KAC9B,gBAAgB,EAuBlB,CAAC;AAEF;;;GAGG;AACH,QAAA,MAAM,mBAAmB,GAAI,OAAO,IAAI,EAAE,UAAgB,KAAG,UAAU,EAStE,CAAC;AAEF,KAAK,UAAU,GAAG;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,EAAE,EAAE,IAAI,CAAA;CAAE,CAAC;AAE3C,uEAAuE;AACvE,KAAK,UAAU,GAAG;IAAE,OAAO,EAAE,UAAU,EAAE,CAAC;IAAC,QAAQ,CAAC,EAAE,IAAI,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC;AAY/E,yFAAyF;AACzF,QAAA,MAAM,UAAU,GAAI,WAAW,IAAI,EAAE,UAAU,MAAM,GAAG,SAAS,EAAE,WAAW,MAAM,KAAG,UAKtF,CAAC;AAEF,wFAAwF;AACxF,QAAA,MAAM,eAAe,GAAI,WAAW,IAAI,EAAE,WAAW,MAAM,KAAG,MAI3D,CAAC;AAEJ,8HAA8H;AAC9H,QAAA,MAAM,cAAc,GAAI,eAAe,EACrC,gBAAgB,eAAe,EAC/B,MAAM,UAAU,EAChB,MAAM,gBAAgB,EAAE;;;;;;;CAKxB,CAAC;AAEH,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,UAAU,EAAE,cAAc,EAAE,cAAc,EAAE,CAAC;AAC5F,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC"}
@@ -7,6 +7,8 @@ type IdentifyImportedObservationsProps = {
7
7
  groupedObservationSyncIds?: Array<string | undefined>;
8
8
  /** Each group's source record, which a deletion of that record finds it by. */
9
9
  groupedRecordIds?: Array<string | undefined>;
10
+ /** The sync id each group was saved under before, which the save also finds it by. */
11
+ groupedFormerSyncIds?: Array<string | undefined>;
10
12
  mode?: HealthDataMode;
11
13
  };
12
14
  declare const getStableObservationId: ({ observation, provider, sourceId, bodyIndex, }: {
@@ -20,6 +22,6 @@ declare const getStableObservationId: ({ observation, provider, sourceId, bodyIn
20
22
  * changes, and by the record it came from. Core's `saveObservationGroups` finds an earlier import by the sync id, so a
21
23
  * read of the same source again saves nothing new, or writes over a total that grew.
22
24
  */
23
- declare const identifyImportedObservations: ({ groupedObservationBodies, provider, groupedObservationSyncIds, groupedRecordIds, mode, }: IdentifyImportedObservationsProps) => Observation[][];
25
+ declare const identifyImportedObservations: ({ groupedObservationBodies, provider, groupedObservationSyncIds, groupedRecordIds, groupedFormerSyncIds, mode, }: IdentifyImportedObservationsProps) => Observation[][];
24
26
  export { getStableObservationId, identifyImportedObservations };
25
27
  //# sourceMappingURL=identify-imported-observations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"identify-imported-observations.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/identify-imported-observations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAE7D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAM3D,KAAK,iCAAiC,GAAG;IACvC,wBAAwB,EAAE,WAAW,EAAE,EAAE,CAAC;IAC1C,QAAQ,EAAE,cAAc,CAAC;IACzB,yBAAyB,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAEtD,+EAA+E;IAC/E,gBAAgB,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC7C,IAAI,CAAC,EAAE,cAAc,CAAC;CACvB,CAAC;AAiBF,QAAA,MAAM,sBAAsB,GAAI,iDAK7B;IACD,WAAW,EAAE,WAAW,CAAC;IACzB,QAAQ,EAAE,cAAc,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB,KAAG,MAQa,CAAC;AAOlB;;;;GAIG;AACH,QAAA,MAAM,4BAA4B,GAAI,4FAMnC,iCAAiC,KAAG,WAAW,EAAE,EAqChD,CAAC;AAEL,OAAO,EAAE,sBAAsB,EAAE,4BAA4B,EAAE,CAAC"}
1
+ {"version":3,"file":"identify-imported-observations.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/identify-imported-observations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAE7D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAM3D,KAAK,iCAAiC,GAAG;IACvC,wBAAwB,EAAE,WAAW,EAAE,EAAE,CAAC;IAC1C,QAAQ,EAAE,cAAc,CAAC;IACzB,yBAAyB,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAEtD,+EAA+E;IAC/E,gBAAgB,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAE7C,sFAAsF;IACtF,oBAAoB,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACjD,IAAI,CAAC,EAAE,cAAc,CAAC;CACvB,CAAC;AAiBF,QAAA,MAAM,sBAAsB,GAAI,iDAK7B;IACD,WAAW,EAAE,WAAW,CAAC;IACzB,QAAQ,EAAE,cAAc,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB,KAAG,MAQa,CAAC;AAOlB;;;;GAIG;AACH,QAAA,MAAM,4BAA4B,GAAI,kHAOnC,iCAAiC,KAAG,WAAW,EAAE,EA4ChD,CAAC;AAEL,OAAO,EAAE,sBAAsB,EAAE,4BAA4B,EAAE,CAAC"}
@@ -1,4 +1,4 @@
1
1
  /** CRC-8/MAXIM: polynomial 0x31 reflected, init 0, no final xor, bit by bit. */
2
2
  declare const crc8Maxim: (bytes: ArrayLike<number>) => number;
3
3
  export { crc8Maxim };
4
- //# sourceMappingURL=crc.d.ts.map
4
+ //# sourceMappingURL=crc8-maxim.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crc8-maxim.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/codec/crc8-maxim.ts"],"names":[],"mappings":"AAGA,gFAAgF;AAChF,QAAA,MAAM,SAAS,GAAI,OAAO,SAAS,CAAC,MAAM,CAAC,KAAG,MASvC,CAAC;AAER,OAAO,EAAE,SAAS,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"built-in.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/families/built-in.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAqFlD,6FAA6F;AAC7F,QAAA,MAAM,eAAe,EAAE,SAAS,WAAW,EAkFzC,CAAC;AAEH,6CAA6C;AAC7C,QAAA,MAAM,kBAAkB,EAAE,SAAS,cAAc,EAkFhD,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,CAAC"}
1
+ {"version":3,"file":"built-in.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/families/built-in.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAsFlD,6FAA6F;AAC7F,QAAA,MAAM,eAAe,EAAE,SAAS,WAAW,EAmFzC,CAAC;AAEH,6CAA6C;AAC7C,QAAA,MAAM,kBAAkB,EAAE,SAAS,cAAc,EAmFhD,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { DeviceProtocol } from "../../core/protocol";
2
+ import { FAMIDOC_HEARING_AID_MODELS } from "./models";
3
+ /** The protocols of the Famidoc hearing aids. */
4
+ declare const FAMIDOC_HEARING_AID_PROTOCOLS: readonly DeviceProtocol[];
5
+ export { FAMIDOC_HEARING_AID_MODELS, FAMIDOC_HEARING_AID_PROTOCOLS };
6
+ //# sourceMappingURL=famidoc-hearing-aid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"famidoc-hearing-aid.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/next/bluetooth/families/famidoc-hearing-aid/famidoc-hearing-aid.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAC;AAGtD,iDAAiD;AACjD,QAAA,MAAM,6BAA6B,EAAE,SAAS,cAAc,EAA0B,CAAC;AAEvF,OAAO,EAAE,0BAA0B,EAAE,6BAA6B,EAAE,CAAC"}
@@ -0,0 +1,38 @@
1
+ import { Framing } from "../frame-tools/frame-stream";
2
+ /** The ear a frame talks to sits in the type byte's top two bits; the protocol version below them is 0. */
3
+ declare const EAR: {
4
+ readonly main: 128;
5
+ readonly left: 64;
6
+ readonly right: 0;
7
+ };
8
+ /** Which ear a frame talks to. */
9
+ type Ear = (typeof EAR)[keyof typeof EAR];
10
+ /** The number byte's six low bits count requests, so a reply names the request it answers. */
11
+ declare const COUNT_MASK = 63;
12
+ /** The reads the phone sends; the aid answers each with the same command. */
13
+ declare const COMMAND: {
14
+ readonly connection: 129;
15
+ readonly deviceInformation: 193;
16
+ readonly battery: 194;
17
+ };
18
+ /** One frame from the aid. */
19
+ type HearingAidFrame = {
20
+ /** The ear it came from. */
21
+ ear: number;
22
+ /** The count of the request it answers, 0 for a report. */
23
+ count: number;
24
+ /** The command it answers or reports. */
25
+ command: number;
26
+ /** What follows the command, without the checksum. */
27
+ data: Uint8Array;
28
+ };
29
+ /** A read: `ab`, the length big endian, the ear, the count, the command, and the CRC-8/MAXIM of all of it. */
30
+ declare const encodeRead: (ear: Ear, count: number, command: number) => Uint8Array;
31
+ /** Cuts the aid's notifications into frames that start with `ab` and hold their checksum. */
32
+ declare const AID_FRAMING: Framing;
33
+ /** Reads a whole frame the framing accepted. */
34
+ declare const decodeFrame: (frame: Uint8Array) => HearingAidFrame;
35
+ declare const isReply: ({ command }: HearingAidFrame) => boolean;
36
+ export { AID_FRAMING, COMMAND, COUNT_MASK, decodeFrame, EAR, encodeRead, isReply };
37
+ export type { Ear, HearingAidFrame };
38
+ //# sourceMappingURL=frame.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"frame.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/next/bluetooth/families/famidoc-hearing-aid/frame.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAa,MAAM,6BAA6B,CAAC;AAoBjE,2GAA2G;AAC3G,QAAA,MAAM,GAAG;;;;CAAmD,CAAC;AAG7D,kCAAkC;AAClC,KAAK,GAAG,GAAG,CAAC,OAAO,GAAG,CAAC,CAAC,MAAM,OAAO,GAAG,CAAC,CAAC;AAE1C,8FAA8F;AAC9F,QAAA,MAAM,UAAU,KAAO,CAAC;AAKxB,6EAA6E;AAC7E,QAAA,MAAM,OAAO;;;;CAAwE,CAAC;AAEtF,8BAA8B;AAC9B,KAAK,eAAe,GAAG;IAErB,4BAA4B;IAC5B,GAAG,EAAE,MAAM,CAAC;IAEZ,2DAA2D;IAC3D,KAAK,EAAE,MAAM,CAAC;IAEd,yCAAyC;IACzC,OAAO,EAAE,MAAM,CAAC;IAEhB,sDAAsD;IACtD,IAAI,EAAE,UAAU,CAAC;CAClB,CAAC;AAEF,8GAA8G;AAC9G,QAAA,MAAM,UAAU,GAAI,KAAK,GAAG,EAAE,OAAO,MAAM,EAAE,SAAS,MAAM,KAAG,UAI9D,CAAC;AAiBF,6FAA6F;AAC7F,QAAA,MAAM,WAAW,EAAE,OAAkF,CAAC;AAEtG,gDAAgD;AAChD,QAAA,MAAM,WAAW,GAAI,OAAO,UAAU,KAAG,eAKvC,CAAC;AAEH,QAAA,MAAM,OAAO,GAAI,aAAa,eAAe,KAAG,OAAsC,CAAC;AAEvF,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC;AACnF,YAAY,EAAE,GAAG,EAAE,eAAe,EAAE,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { DeviceModel } from "../../core/catalog";
2
+ /** The Famidoc hearing aids, found by the name they advertise. */
3
+ declare const FAMIDOC_HEARING_AID_MODELS: readonly DeviceModel[];
4
+ export { FAMIDOC_HEARING_AID_MODELS };
5
+ //# sourceMappingURL=models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/next/bluetooth/families/famidoc-hearing-aid/models.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAQjD,kEAAkE;AAClE,QAAA,MAAM,0BAA0B,EAAE,SAAS,WAAW,EAAsD,CAAC;AAE7G,OAAO,EAAE,0BAA0B,EAAE,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { DeviceProtocol } from "../../core/protocol";
2
+ import { HearingAidConnection } from "./session";
3
+ /** The Famidoc hearing aids: the pair's identity and battery; they keep no readings to sync. */
4
+ declare const FAMIDOC_HEARING_AID: DeviceProtocol<HearingAidConnection>;
5
+ export { FAMIDOC_HEARING_AID };
6
+ //# sourceMappingURL=protocol.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/next/bluetooth/families/famidoc-hearing-aid/protocol.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAIrD,OAAO,EAAe,oBAAoB,EAAe,MAAM,WAAW,CAAC;AAE3E,gGAAgG;AAChG,QAAA,MAAM,mBAAmB,EAAE,cAAc,CAAC,oBAAoB,CAW7D,CAAC;AAEF,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { Battery, DeviceIdentity } from "../../core/paired-device";
2
+ import { Ear } from "./frame";
3
+ /** The linked ears: the one that speaks for the pair, and the other when both are linked. */
4
+ type Ears = {
5
+ main: Ear;
6
+ other: Ear | null;
7
+ };
8
+ /** The connection reply: bit 1 says the main ear is the right one, bit 0 that both ears are linked. */
9
+ declare const earsOf: (data: Uint8Array) => Ears;
10
+ /** The ears to read a per-ear value from. */
11
+ declare const linkedEars: ({ main, other }: Ears) => Ear[];
12
+ /** The battery reply: bit 7 says it charges, the seven low bits are the percentage. */
13
+ declare const batteryOf: (data: Uint8Array) => Omit<Battery, "at">;
14
+ /** The pair runs as long as its emptiest ear, so that ear's battery stands for the pair. */
15
+ declare const emptiestOf: (batteries: readonly Omit<Battery, "at">[]) => Omit<Battery, "at">;
16
+ /** The device information reply: hardware revision, software version and serial; the aid names no maker or model. */
17
+ declare const identityOf: (data: Uint8Array) => Omit<DeviceIdentity, "at">;
18
+ export { batteryOf, earsOf, emptiestOf, identityOf, linkedEars };
19
+ export type { Ears };
20
+ //# sourceMappingURL=replies.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"replies.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/next/bluetooth/families/famidoc-hearing-aid/replies.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAEnE,OAAO,EAAE,GAAG,EAAO,MAAM,SAAS,CAAC;AAoBnC,6FAA6F;AAC7F,KAAK,IAAI,GAAG;IAAE,IAAI,EAAE,GAAG,CAAC;IAAC,KAAK,EAAE,GAAG,GAAG,IAAI,CAAA;CAAE,CAAC;AAE7C,uGAAuG;AACvG,QAAA,MAAM,MAAM,GAAI,MAAM,UAAU,KAAG,IAKlC,CAAC;AAEF,6CAA6C;AAC7C,QAAA,MAAM,UAAU,GAAI,iBAAiB,IAAI,KAAG,GAAG,EAA+C,CAAC;AAE/F,uFAAuF;AACvF,QAAA,MAAM,SAAS,GAAI,MAAM,UAAU,KAAG,IAAI,CAAC,OAAO,EAAE,IAAI,CAIvD,CAAC;AAEF,4FAA4F;AAC5F,QAAA,MAAM,UAAU,GAAI,WAAW,SAAS,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,KAAG,IAAI,CAAC,OAAO,EAAE,IAAI,CACkB,CAAC;AA+BrG,qHAAqH;AACrH,QAAA,MAAM,UAAU,GAAI,MAAM,UAAU,KAAG,IAAI,CAAC,cAAc,EAAE,IAAI,CAM9D,CAAC;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC;AACjE,YAAY,EAAE,IAAI,EAAE,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { ProtocolContext } from "../../core/protocol";
2
+ import { Ear } from "./frame";
3
+ import { Ears } from "./replies";
4
+ /** The service the phone talks to the aid through; the OTA and audio services are left alone. */
5
+ declare const AID_SERVICE: string;
6
+ /** One open link: which ears are linked, and how to read from one. */
7
+ type HearingAidConnection = {
8
+ /** The ears the connection reply named. */
9
+ ears: Ears;
10
+ /** Sends a read to one ear and resolves with the data of its reply. */
11
+ read: (ear: Ear, command: number) => Promise<Uint8Array>;
12
+ /** Stops listening to the aid. */
13
+ stop: () => void;
14
+ };
15
+ /** Listens to the aid, then asks which ears are linked. */
16
+ declare const openSession: ({ link, logger }: ProtocolContext) => Promise<HearingAidConnection>;
17
+ export { AID_SERVICE, openSession };
18
+ export type { HearingAidConnection };
19
+ //# sourceMappingURL=session.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/next/bluetooth/families/famidoc-hearing-aid/session.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGtD,OAAO,EAAsD,GAAG,EAAwC,MAAM,SAAS,CAAC;AACxH,OAAO,EAAE,IAAI,EAAU,MAAM,WAAW,CAAC;AAEzC,iGAAiG;AACjG,QAAA,MAAM,WAAW,QAAmB,CAAC;AAOrC,sEAAsE;AACtE,KAAK,oBAAoB,GAAG;IAE1B,2CAA2C;IAC3C,IAAI,EAAE,IAAI,CAAC;IAEX,uEAAuE;IACvE,IAAI,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;IAEzD,kCAAkC;IAClC,IAAI,EAAE,MAAM,IAAI,CAAC;CAClB,CAAC;AAaF,2DAA2D;AAC3D,QAAA,MAAM,WAAW,GAAU,kBAAkB,eAAe,KAAG,OAAO,CAAC,oBAAoB,CA+B1F,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC;AACpC,YAAY,EAAE,oBAAoB,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"frame.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/next/bluetooth/families/finicare/frame.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAa,MAAM,6BAA6B,CAAC;AAgBjE,uDAAuD;AACvD,QAAA,MAAM,OAAO;;;;CAA6D,CAAC;AAE3E,4EAA4E;AAC5E,QAAA,MAAM,MAAM;;;CAAwC,CAAC;AAErD,kDAAkD;AAClD,QAAA,MAAM,kBAAkB,MAAO,CAAC;AAEhC,4HAA4H;AAC5H,QAAA,MAAM,WAAW,GAAI,SAAS,MAAM,EAAE,UAAS,SAAS,MAAM,EAAO,KAAG,UAIvE,CAAC;AAIF,oGAAoG;AACpG,QAAA,MAAM,eAAe,EAAE,OAIrB,CAAC;AAEH,sEAAsE;AACtE,QAAA,MAAM,MAAM,GAAI,OAAO,UAAU,KAAG,UAAoE,CAAC;AAEzG,6FAA6F;AAC7F,QAAA,MAAM,QAAQ,GAAI,MAAM,UAAU,KAAG,MAAM,GAAG,SAAwE,CAAC;AAEvH,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC"}
1
+ {"version":3,"file":"frame.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/next/bluetooth/families/finicare/frame.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAa,MAAM,6BAA6B,CAAC;AAejE,uDAAuD;AACvD,QAAA,MAAM,OAAO;;;;CAA6D,CAAC;AAE3E,4EAA4E;AAC5E,QAAA,MAAM,MAAM;;;CAAwC,CAAC;AAErD,kDAAkD;AAClD,QAAA,MAAM,kBAAkB,MAAO,CAAC;AAEhC,4HAA4H;AAC5H,QAAA,MAAM,WAAW,GAAI,SAAS,MAAM,EAAE,UAAS,SAAS,MAAM,EAAO,KAAG,UAIvE,CAAC;AAIF,oGAAoG;AACpG,QAAA,MAAM,eAAe,EAAE,OAIrB,CAAC;AAEH,sEAAsE;AACtE,QAAA,MAAM,MAAM,GAAI,OAAO,UAAU,KAAG,UAAoE,CAAC;AAEzG,6FAA6F;AAC7F,QAAA,MAAM,QAAQ,GAAI,MAAM,UAAU,KAAG,MAAM,GAAG,SAAwE,CAAC;AAEvH,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"android-health-connect-authorization-provider.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/data-sync/components/android/android-health-connect-authorization-provider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgB/B,OAAO,EAAE,8CAA8C,EAAE,MAAM,iEAAiE,CAAC;AAyLjI,eAAO,MAAM,yCAAyC,4KAUjD,KAAK,CAAC,iBAAiB,CAAC,8CAA8C,CAAC,uBAqE3E,CAAC"}
1
+ {"version":3,"file":"android-health-connect-authorization-provider.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/data-sync/components/android/android-health-connect-authorization-provider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAkB/B,OAAO,EAAE,8CAA8C,EAAE,MAAM,iEAAiE,CAAC;AA4MjI,eAAO,MAAM,yCAAyC,4KAUjD,KAAK,CAAC,iBAAiB,CAAC,8CAA8C,CAAC,uBAqE3E,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"base-health-sync-service.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/services/base-health-sync-service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAU,WAAW,EAAE,MAAM,oBAAoB,CAAC;AASzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAG1D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAWzD,2DAA2D;AAC3D,MAAM,MAAM,iBAAiB,CAAC,eAAe,SAAS,MAAM,EAAE,iBAAiB,IAAI;IACjF,QAAQ,EAAE,cAA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GAAG,OAAO,CAAC,IAAI,CAAC;YAKjD,cAAc;YAUd,oBAAoB;YA0BpB,mBAAmB;YA4BnB,cAAc;IAuG5B;;;OAGG;YACW,YAAY;IA+B1B,OAAO,CAAC,WAAW;IAgCnB,OAAO,CAAC,QAAQ;IAKhB,OAAO,CAAC,yBAAyB;CAGlC"}
1
+ {"version":3,"file":"base-health-sync-service.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/services/base-health-sync-service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAU,WAAW,EAAE,MAAM,oBAAoB,CAAC;AASzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAG1D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAWzD,2DAA2D;AAC3D,MAAM,MAAM,iBAAiB,CAAC,eAAe,SAAS,MAAM,EAAE,iBAAiB,IAAI;IACjF,QAAQ,EAAE,cAAc,CAAC;IACzB,aAAa,EAAE,CAAC,KAAK,EAAE,kBAAkB,CAAC,eAAe,CAAC,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAC/E,OAAO,EAAE,CACP,KAAK,EAAE,wBAAwB,CAAC,eAAe,CAAC,KAC7C,OAAO,CAAC,sBAAsB,CAAC,iBAAiB,EAAE,eAAe,CAAC,CAAC,CAAC;IACzE,OAAO,EAAE,CAAC,KAAK,EAAE,gBAAg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from "../../types/get-data-from-provider-props";
8
8
  import { GetTotalCountProps } from "../../types/get-total-count-props";
9
9
  import { HealthProvider } from "../../types/health-provider";
10
- import { HealthSyncKey } from "../../types/health-sync-keys";
10
+ import { HealthDataMode, HealthSyncKey } from "../../types/health-sync-keys";
11
11
  import { getLatestValidStartDate } from "../../utils/get-latest-valid-start-date";
12
- import { identifyImportedObservations } from "../../utils/identify-imported-observations";
13
12
  import { StorageManager } from "./storage-manager";
13
+ /** One page of a data type's readings, as observations, with what names them. */
14
+ export type ObservationPage<TRecord = unknown> = {
15
+ observationBodies: Observation[][];
16
+ observationSyncIds: Array<string | undefined>;
17
+ observationRecordIds: Array<string | undefined>;
18
+ /** The sync id each reading was saved under before, for a day's total its bounds; undefined when none changed. */
19
+ observationFormerSyncIds?: Array<string | undefined>;
20
+ deletedRecordIds: string[];
21
+ hasMore: boolean;
22
+ anchors: Array<{
23
+ typeIdentifier: string;
24
+ anchor: string;
25
+ }>;
26
+ /** Records of readings the next page may add to, kept for it; undefined for a type whose records stand alone. */
27
+ carriedRecords: TRecord[] | undefined;
28
+ };
14
29
  export declare class DataProcessor<TDataToSync extends AndroidHealthSyncProps["dataToSync"] | AppleHealthSyncProps["dataToSync"], TTypeIdentifier extends string, TDataFromProvider> {
15
30
  private client;
16
31
  private patientId;
@@ -27,20 +42,8 @@ export declare class DataProcessor<TDataToSync extends AndroidHealthSyncProps["d
27
42
  date: string | undefined;
28
43
  }>>;
29
44
  getTotalRecordsCountForType(measurementTypeKey: HealthSyncKey, data: NonNullable<TDataToSync[HealthSyncKey]>, latestValidStartDate: Date | undefined): Promise<number>;
30
- getObservationBodiesForType(measurementTypeKey: HealthSyncKey, data: NonNullable<TDataToSync[HealthSyncKey]>, latestValidStartDate: Date | undefined): Promise<{
31
- observationBodies: Observation[][];
32
- observationSyncIds: Array<string | undefined>;
33
- observationRecordIds: Array<string | undefined>;
34
- deletedRecordIds: string[];
35
- hasMore: boolean;
36
- anchors: Array<{
37
- typeIdentifier: string;
38
- anchor: string;
39
- }>;
40
- /** Records of readings the next page may add to, kept for it; undefined for a type whose records stand alone. */
41
- carriedRecords: TDataFromProvider[] | undefined;
42
- }>;
43
- identifyObservations(observationBodies: Observation[][], observationSyncIds?: Array<string | undefined>, observationRecordIds?: Array<string | undefined>, mode?: Parameters<typeof identifyImportedObservations>[0]["mode"]): Observation[][];
45
+ getObservationBodiesForType(measurementTypeKey: HealthSyncKey, data: NonNullable<TDataToSync[HealthSyncKey]>, latestValidStartDate: Date | undefined): Promise<ObservationPage<TDataFromProvider>>;
46
+ identifyObservations(page: ObservationPage, mode?: HealthDataMode): Observation[][];
44
47
  getLatestValidStartDate(latestObservationDates: Array<{
45
48
  code: string | undefined;
46
49
  date: string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"data-processor.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/data-sync/services/managers/data-processor.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AACpF,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAGL,aAAa,EACd,MAAM,8BAA8B,CAAC;AAQtC,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAClF,OAAO,EAAE,4BAA4B,EAAE,MAAM,4CAA4C,CAAC;AAK1F,OAAO,EAAE,cAAc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file":"data-processor.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/data-sync/services/managers/data-processor.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AACpF,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAEL,cAAc,EACd,aAAa,EACd,MAAM,8BAA8B,CAAC;AAStC,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAOlF,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAanD,iFAAiF;AACjF,MAAM,MAAM,eAAe,CAAC,OAAO,GAAG,OAAO,IAAI;IAC/C,iBAAiB,EAAE,WAAW,EAAE,EAAE,CAAC;IACnC,kBAAkB,EAAE,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC9C,oBAAoB,EAAE,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAEhD,kHAAkH;IAClH,wBAAwB,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACrD,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,KAAK,CAAC;QAAE,cAAc,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC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,GAAG,SAAS,GACrC,OAAO,CAAC,MAAM,CAAC;IAmBZ,2BAA2B,CAC/B,kBAAkB,EAAE,aAAa,EACjC,IAAI,EAAE,WAAW,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,EAC7C,oBAAoB,EAAE,IAAI,GAAG,SAAS,GACrC,OAAO,CAAC,eAAe,CAAC,iBAAiB,CAAC,CAAC;IA4J9C,oBAAoB,CAAC,IAAI,EAAE,eAAe,EAAE,IAAI,CAAC,EAAE,cAAc;IAWjE,uBAAuB,CACrB,sBAAsB,EAAE,KAAK,CAAC;QAC5B,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;QACzB,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;KAC1B,CAAC,EACF,IAAI,EAAE,WAAW,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,EAC7C,kBAAkB,EAAE,aAAa,EACjC,IAAI,CAAC,EAAE,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,GAC3D,IAAI,GAAG,SAAS;CAyBpB"}
@@ -24,6 +24,13 @@ type AndroidHealthConnectAuthorizationStatus = {
24
24
  missingTypes?: readonly string[];
25
25
  /** Background access is reported independently; it never blocks foreground import. */
26
26
  backgroundAccess?: "authorized" | "shouldRequest" | "refused" | "unsupported";
27
+ /**
28
+ * Whether Health Connect can be used on the device. `updateRequired` means it is installed but too old: offer the
29
+ * update from the Play Store. Set once checked.
30
+ */
31
+ availability?: HealthConnectAvailability;
27
32
  };
28
- export type { AndroidHealthConnectAuthorizationStatus, AppleHealthAuthorizationStatus, };
33
+ /** Health Connect on the device: ready, missing, or installed but needing an update. */
34
+ type HealthConnectAvailability = "available" | "notInstalled" | "updateRequired";
35
+ export type { AndroidHealthConnectAuthorizationStatus, AppleHealthAuthorizationStatus, HealthConnectAvailability, };
29
36
  //# sourceMappingURL=health-authorization-status.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"health-authorization-status.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/types/health-authorization-status.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AAExF,OAAO,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,wCAAwC;AACxC,KAAK,8BAA8B,GAAG;IAEpC,mCAAmC;IACnC,KAAK,EAAE,SAAS,GAAG,eAAe,GAAG,YAAY,GAAG,OAAO,GAAG,OAAO,CAAC;IAEtE,kEAAkE;IAClE,2BAA2B,EAAE,6BAA6B,EAAE,CAAC;IAE7D,wEAAwE;IACxE,4BAA4B,EAAE,6BAA6B,EAAE,CAAC;IAE9D,iFAAiF;IACjF,4BAA4B,EAAE,aAAa,EAAE,CAAC;IAE9C,+CAA+C;IAC/C,KAAK,CAAC,EAAE,KAAK,CAAC;CACf,CAAC;AAEF,0CAA0C;AAC1C,KAAK,uCAAuC,GAAG;IAE7C,mCAAmC;IACnC,KAAK,EACD,SAAS,GACT,eAAe,GACf,YAAY,GACZ,YAAY,GACZ,SAAS,GACT,OAAO,CAAC;IAEZ,+CAA+C;IAC/C,KAAK,CAAC,EAAE,KAAK,CAAC;IAEd,kDAAkD;IAClD,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAEjC,sFAAsF;IACtF,gBAAgB,CAAC,EAAE,YAAY,GAAG,eAAe,GAAG,SAAS,GAAG,aAAa,CAAC;CAC/E,CAAC;AAEF,YAAY,EACV,uCAAuC,EACvC,8BAA8B,GAC/B,CAAC"}
1
+ {"version":3,"file":"health-authorization-status.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/types/health-authorization-status.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AAExF,OAAO,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,wCAAwC;AACxC,KAAK,8BAA8B,GAAG;IAEpC,mCAAmC;IACnC,KAAK,EAAE,SAAS,GAAG,eAAe,GAAG,YAAY,GAAG,OAAO,GAAG,OAAO,CAAC;IAEtE,kEAAkE;IAClE,2BAA2B,EAAE,6BAA6B,EAAE,CAAC;IAE7D,wEAAwE;IACxE,4BAA4B,EAAE,6BAA6B,EAAE,CAAC;IAE9D,iFAAiF;IACjF,4BAA4B,EAAE,aAAa,EAAE,CAAC;IAE9C,+CAA+C;IAC/C,KAAK,CAAC,EAAE,KAAK,CAAC;CACf,CAAC;AAEF,0CAA0C;AAC1C,KAAK,uCAAuC,GAAG;IAE7C,mCAAmC;IACnC,KAAK,EACD,SAAS,GACT,eAAe,GACf,YAAY,GACZ,YAAY,GACZ,SAAS,GACT,OAAO,CAAC;IAEZ,+CAA+C;IAC/C,KAAK,CAAC,EAAE,KAAK,CAAC;IAEd,kDAAkD;IAClD,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAEjC,sFAAsF;IACtF,gBAAgB,CAAC,EAAE,YAAY,GAAG,eAAe,GAAG,SAAS,GAAG,aAAa,CAAC;IAE9E;;;OAGG;IACH,YAAY,CAAC,EAAE,yBAAyB,CAAC;CAC1C,CAAC;AAEF,wFAAwF;AACxF,KAAK,yBAAyB,GAAG,WAAW,GAAG,cAAc,GAAG,gBAAgB,CAAC;AAEjF,YAAY,EACV,uCAAuC,EACvC,8BAA8B,EAC9B,yBAAyB,GAC1B,CAAC"}
@@ -10,11 +10,16 @@ declare const getHealthRecordType: (record: unknown) => string | undefined;
10
10
  * previous total instead of creating a second observation.
11
11
  */
12
12
  declare const getHealthRecordSyncId: (record: unknown, measurementTypeKey: string) => string | undefined;
13
+ /**
14
+ * Names a day's total by its calendar date where it was read. A re-read after a time zone change bounds the day at
15
+ * other instants, and this keeps it the same total instead of a second one.
16
+ */
17
+ declare const getHealthDaySyncId: (record: unknown, measurementTypeKey: string) => string | undefined;
13
18
  /**
14
19
  * The identifier of every observation imported from a source record. A deletion
15
20
  * reports only the record's id, so the import marks its observations with this
16
21
  * and the deletion looks them up by it.
17
22
  */
18
23
  declare const getHealthRecordIdentifier: (provider: HealthProvider, recordId: string) => Identifier;
19
- export { getHealthRecordIdentifier, getHealthRecordSourceId, getHealthRecordSyncId, getHealthRecordType, };
24
+ export { getHealthDaySyncId, getHealthRecordIdentifier, getHealthRecordSourceId, getHealthRecordSyncId, getHealthRecordType, };
20
25
  //# sourceMappingURL=get-health-record-sync-id.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-health-record-sync-id.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/get-health-record-sync-id.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AA4B1D,oFAAoF;AACpF,QAAA,MAAM,uBAAuB,GAAI,QAAQ,OAAO,KAAG,MAAM,GAAG,SAI3D,CAAC;AAEF,2FAA2F;AAC3F,QAAA,MAAM,mBAAmB,GAAI,QAAQ,OAAO,KAAG,MAAM,GAAG,SASvD,CAAC;AAEF;;;;GAIG;AACH,QAAA,MAAM,qBAAqB,GACzB,QAAQ,OAAO,EACf,oBAAoB,MAAM,KACzB,MAAM,GAAG,SAwBX,CAAC;AAEF;;;;GAIG;AACH,QAAA,MAAM,yBAAyB,GAC7B,UAAU,cAAc,EACxB,UAAU,MAAM,KACf,UAGD,CAAC;AAEH,OAAO,EACL,yBAAyB,EACzB,uBAAuB,EACvB,qBAAqB,EACrB,mBAAmB,GACpB,CAAC"}
1
+ {"version":3,"file":"get-health-record-sync-id.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/get-health-record-sync-id.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGhD,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AA4B1D,oFAAoF;AACpF,QAAA,MAAM,uBAAuB,GAAI,QAAQ,OAAO,KAAG,MAAM,GAAG,SAI3D,CAAC;AAEF,2FAA2F;AAC3F,QAAA,MAAM,mBAAmB,GAAI,QAAQ,OAAO,KAAG,MAAM,GAAG,SASvD,CAAC;AAEF;;;;GAIG;AACH,QAAA,MAAM,qBAAqB,GACzB,QAAQ,OAAO,EACf,oBAAoB,MAAM,KACzB,MAAM,GAAG,SAwBX,CAAC;AAEF;;;GAGG;AACH,QAAA,MAAM,kBAAkB,GACtB,QAAQ,OAAO,EACf,oBAAoB,MAAM,KACzB,MAAM,GAAG,SAWX,CAAC;AAEF;;;;GAIG;AACH,QAAA,MAAM,yBAAyB,GAC7B,UAAU,cAAc,EACxB,UAAU,MAAM,KACf,UAGD,CAAC;AAEH,OAAO,EACL,kBAAkB,EAClB,yBAAyB,EACzB,uBAAuB,EACvB,qBAAqB,EACrB,mBAAmB,GACpB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"get-records-from-health-connect.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/get-records-from-health-connect.ts"],"names":[],"mappings":"AAGA,OAAO,EAKL,YAAY,EACZ,UAAU,EACX,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAO9E,KAAK,iBAAiB,GAAG,YAAY,CAAC,UAAU,CAAC,GAAG,oBAAoB,GAAG,gBAAgB,CAAC;AAO5F,eAAO,MAAM,2BAA2B,GAAU,0EAO/C,wBAAwB,CAAC,UAAU,CAAC,KAAG,OAAO,CAC/C,sBAAsB,CAAC,iBAAiB,EAAE,UAAU,CAAC,CAiFtD,CAAC"}
1
+ {"version":3,"file":"get-records-from-health-connect.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/get-records-from-health-connect.ts"],"names":[],"mappings":"AAGA,OAAO,EAKL,YAAY,EACZ,UAAU,EACX,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAQ9E,KAAK,iBAAiB,GAAG,YAAY,CAAC,UAAU,CAAC,GAAG,oBAAoB,GAAG,gBAAgB,CAAC;AAO5F,eAAO,MAAM,2BAA2B,GAAU,0EAO/C,wBAAwB,CAAC,UAAU,CAAC,KAAG,OAAO,CAC/C,sBAAsB,CAAC,iBAAiB,EAAE,UAAU,CAAC,CAoFtD,CAAC"}
@@ -5,7 +5,11 @@ declare const getSamplesFromHealth: ({ startDate: _startDate, typeIdentifier, an
5
5
  anchor: undefined;
6
6
  } | {
7
7
  data: import("../types/health-data").SeriesHealthData[];
8
- anchor: undefined;
8
+ hasMore: boolean;
9
+ anchor: {
10
+ typeIdentifier: import("@kingstinct/react-native-healthkit").QuantityTypeIdentifier;
11
+ anchor: string;
12
+ } | undefined;
9
13
  } | {
10
14
  anchor: {
11
15
  typeIdentifier: import("@kingstinct/react-native-healthkit").SampleTypeIdentifier;
@@ -1 +1 @@
1
- {"version":3,"file":"get-samples-from-health.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/get-samples-from-health.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AA2BjF,QAAA,MAAM,oBAAoB,GAAU,qEAMjC,wBAAwB,CAAC,6BAA6B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8GzD,CAAC;AAmBF,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
1
+ {"version":3,"file":"get-samples-from-health.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/get-samples-from-health.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AA4BjF,QAAA,MAAM,oBAAoB,GAAU,qEAMjC,wBAAwB,CAAC,6BAA6B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8GzD,CAAC;AAmBF,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"get-total-records-count.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/get-total-records-count.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EAEX,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAKpE,sHAAsH;AACtH,eAAO,MAAM,oBAAoB,GAC/B,OAAO,kBAAkB,CAAC,UAAU,CAAC,KACpC,OAAO,CAAC,MAAM,CAAuC,CAAC"}
1
+ {"version":3,"file":"get-total-records-count.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/get-total-records-count.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EAEX,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAMpE,sHAAsH;AACtH,eAAO,MAAM,oBAAoB,GAC/B,OAAO,kBAAkB,CAAC,UAAU,CAAC,KACpC,OAAO,CAAC,MAAM,CAAuC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"get-total-samples-count.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/get-total-samples-count.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAQpE,eAAO,MAAM,oBAAoB,GAC/B,OAAO,kBAAkB,CAAC,6BAA6B,CAAC,KACvD,OAAO,CAAC,MAAM,CA4BhB,CAAC"}
1
+ {"version":3,"file":"get-total-samples-count.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/get-total-samples-count.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AASpE,eAAO,MAAM,oBAAoB,GAC/B,OAAO,kBAAkB,CAAC,6BAA6B,CAAC,KACvD,OAAO,CAAC,MAAM,CAgChB,CAAC"}
@@ -1,9 +1,13 @@
1
1
  import { RecordType } from "react-native-health-connect";
2
- import { SeriesHealthData } from "../types/health-data";
3
- /** The finished hours from `startDate`, one `series` item an hour, read a day at a time. */
4
- declare const getHealthConnectSeries: (typeIdentifier: RecordType, startDate: Date) => Promise<{
5
- data: SeriesHealthData[];
6
- anchor: undefined;
2
+ import { SeriesPage } from "./hourly-series";
3
+ /** A page of finished hours, one `series` item an hour, read a day at a time. */
4
+ declare const getHealthConnectSeries: (typeIdentifier: RecordType, page: SeriesPage) => Promise<{
5
+ data: import("../types/health-data").SeriesHealthData[];
6
+ hasMore: boolean;
7
+ anchor: {
8
+ typeIdentifier: "ActiveCaloriesBurned" | "BasalBodyTemperature" | "BasalMetabolicRate" | "BloodGlucose" | "BloodPressure" | "BodyFat" | "BodyTemperature" | "BodyWaterMass" | "BoneMass" | "CervicalMucus" | "CyclingPedalingCadence" | "ElevationGained" | "ExerciseSession" | "FloorsClimbed" | "HeartRate" | "RestingHeartRate" | "Steps" | "StepsCadence" | "Distance" | "Height" | "Hydration" | "HeartRateVariabilityRmssd" | "SexualActivity" | "Weight" | "Nutrition" | "LeanBodyMass" | "IntermenstrualBleeding" | "Speed" | "MenstruationFlow" | "MenstruationPeriod" | "SleepSession" | "RespiratoryRate" | "WheelchairPushes" | "Vo2Max" | "OvulationTest" | "TotalCaloriesBurned" | "OxygenSaturation" | "Power";
9
+ anchor: string;
10
+ } | undefined;
7
11
  }>;
8
12
  export { getHealthConnectSeries };
9
13
  //# sourceMappingURL=health-connect-series.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"health-connect-series.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/health-connect-series.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyC,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAGhG,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAmExD,4FAA4F;AAC5F,QAAA,MAAM,sBAAsB,GAC1B,gBAAgB,UAAU,EAC1B,WAAW,IAAI,KACd,OAAO,CAAC;IAAE,IAAI,EAAE,gBAAgB,EAAE,CAAC;IAAC,MAAM,EAAE,SAAS,CAAA;CAAE,CAgBzD,CAAC;AAEF,OAAO,EAAE,sBAAsB,EAAE,CAAC"}
1
+ {"version":3,"file":"health-connect-series.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/health-connect-series.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyC,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAKhG,OAAO,EAAe,UAAU,EAAkC,MAAM,iBAAiB,CAAC;AAgE1F,iFAAiF;AACjF,QAAA,MAAM,sBAAsB,GAAU,gBAAgB,UAAU,EAAE,MAAM,UAAU;;;;;;;EAgBjF,CAAC;AAEF,OAAO,EAAE,sBAAsB,EAAE,CAAC"}
@@ -1,12 +1,16 @@
1
1
  import { QuantityTypeIdentifier } from "@kingstinct/react-native-healthkit";
2
- import { SeriesHealthData } from "../types/health-data";
2
+ import { SeriesPage } from "./hourly-series";
3
3
  /**
4
- * The finished hours from `startDate`, one `series` item an hour, from HealthKit's own average a minute: it follows
5
- * the user's source priority where a watch and another app both recorded. Read a day at a time.
4
+ * A page of finished hours, one `series` item an hour, from HealthKit's own average a minute: it follows the user's
5
+ * source priority where a watch and another app both recorded. Read a day at a time.
6
6
  */
7
- declare const getHealthKitSeries: (typeIdentifier: QuantityTypeIdentifier, startDate: Date) => Promise<{
8
- data: SeriesHealthData[];
9
- anchor: undefined;
7
+ declare const getHealthKitSeries: (typeIdentifier: QuantityTypeIdentifier, page: SeriesPage) => Promise<{
8
+ data: import("../types/health-data").SeriesHealthData[];
9
+ hasMore: boolean;
10
+ anchor: {
11
+ typeIdentifier: QuantityTypeIdentifier;
12
+ anchor: string;
13
+ } | undefined;
10
14
  }>;
11
15
  export { getHealthKitSeries };
12
16
  //# sourceMappingURL=healthkit-series.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"healthkit-series.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/healthkit-series.ts"],"names":[],"mappings":"AAAA,OAAkB,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAEvF,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAKxD;;;GAGG;AACH,QAAA,MAAM,kBAAkB,GACtB,gBAAgB,sBAAsB,EACtC,WAAW,IAAI,KACd,OAAO,CAAC;IAAE,IAAI,EAAE,gBAAgB,EAAE,CAAC;IAAC,MAAM,EAAE,SAAS,CAAA;CAAE,CAyBzD,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
1
+ {"version":3,"file":"healthkit-series.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/healthkit-series.ts"],"names":[],"mappings":"AAAA,OAAkB,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAGvF,OAAO,EAAe,UAAU,EAAkC,MAAM,iBAAiB,CAAC;AAE1F;;;GAGG;AACH,QAAA,MAAM,kBAAkB,GAAU,gBAAgB,sBAAsB,EAAE,MAAM,UAAU;;;;;;;EAyBzF,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
@@ -13,10 +13,30 @@ declare const toHourlySeries: (typeIdentifier: string, unit: string, minutes: re
13
13
  * The finished hours from `start`'s hour up to the current one, in windows of a day at most: one health-store query
14
14
  * each, so a first import of months doesn't ask for everything at once.
15
15
  */
16
- declare const finishedHourWindows: (start: Date, now?: Date) => Array<{
16
+ declare const finishedHourWindows: (start: Date, now?: Date) => HourWindow[];
17
+ type HourWindow = {
17
18
  from: Date;
18
19
  to: Date;
19
- }>;
20
- export { finishedHourWindows, toHourlySeries };
21
- export type { MinuteValue };
20
+ };
21
+ /** The day windows one read of a series takes, and where it got to. */
22
+ type SeriesPage = {
23
+ windows: HourWindow[];
24
+ readUpTo?: Date;
25
+ hasMore: boolean;
26
+ };
27
+ /** The next days of a series to read, at most `chunkSize` hours: what one save sends. */
28
+ declare const seriesPage: (startDate: Date, readUpTo: string | undefined, chunkSize: number) => SeriesPage;
29
+ /** The finished hours a series has left to read, for progress, without reading them. */
30
+ declare const seriesHoursLeft: (startDate: Date, readUpTo?: string) => number;
31
+ /** A page of a series as a provider result: its hours, the hour it was read up to as the anchor, and whether more is left. */
32
+ declare const toSeriesResult: <TTypeIdentifier>(typeIdentifier: TTypeIdentifier, page: SeriesPage, data: SeriesHealthData[]) => {
33
+ data: SeriesHealthData[];
34
+ hasMore: boolean;
35
+ anchor: {
36
+ typeIdentifier: TTypeIdentifier;
37
+ anchor: string;
38
+ } | undefined;
39
+ };
40
+ export { finishedHourWindows, seriesHoursLeft, seriesPage, toHourlySeries, toSeriesResult };
41
+ export type { MinuteValue, SeriesPage };
22
42
  //# sourceMappingURL=hourly-series.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hourly-series.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/hourly-series.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAKxD,gEAAgE;AAChE,KAAK,WAAW,GAAG;IAAE,KA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M,UAAU,GAAI,WAAW,IAAI,EAAE,UAAU,MAAM,GAAG,SAAS,EAAE,WAAW,MAAM,KAAG,UAKtF,CAAC;AAEF,wFAAwF;AACxF,QAAA,MAAM,eAAe,GAAI,WAAW,IAAI,EAAE,WAAW,MAAM,KAAG,MAI3D,CAAC;AAEJ,8HAA8H;AAC9H,QAAA,MAAM,cAAc,GAAI,eAAe,EACrC,gBAAgB,eAAe,EAC/B,MAAM,UAAU,EAChB,MAAM,gBAAgB,EAAE;;;;;;;CAKxB,CAAC;AAEH,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,UAAU,EAAE,cAAc,EAAE,cAAc,EAAE,CAAC;AAC5F,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC"}
@@ -7,6 +7,8 @@ type IdentifyImportedObservationsProps = {
7
7
  groupedObservationSyncIds?: Array<string | undefined>;
8
8
  /** Each group's source record, which a deletion of that record finds it by. */
9
9
  groupedRecordIds?: Array<string | undefined>;
10
+ /** The sync id each group was saved under before, which the save also finds it by. */
11
+ groupedFormerSyncIds?: Array<string | undefined>;
10
12
  mode?: HealthDataMode;
11
13
  };
12
14
  declare const getStableObservationId: ({ observation, provider, sourceId, bodyIndex, }: {
@@ -20,6 +22,6 @@ declare const getStableObservationId: ({ observation, provider, sourceId, bodyIn
20
22
  * changes, and by the record it came from. Core's `saveObservationGroups` finds an earlier import by the sync id, so a
21
23
  * read of the same source again saves nothing new, or writes over a total that grew.
22
24
  */
23
- declare const identifyImportedObservations: ({ groupedObservationBodies, provider, groupedObservationSyncIds, groupedRecordIds, mode, }: IdentifyImportedObservationsProps) => Observation[][];
25
+ declare const identifyImportedObservations: ({ groupedObservationBodies, provider, groupedObservationSyncIds, groupedRecordIds, groupedFormerSyncIds, mode, }: IdentifyImportedObservationsProps) => Observation[][];
24
26
  export { getStableObservationId, identifyImportedObservations };
25
27
  //# sourceMappingURL=identify-imported-observations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"identify-imported-observations.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/identify-imported-observations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAE7D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAM3D,KAAK,iCAAiC,GAAG;IACvC,wBAAwB,EAAE,WAAW,EAAE,EAAE,CAAC;IAC1C,QAAQ,EAAE,cAAc,CAAC;IACzB,yBAAyB,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAEtD,+EAA+E;IAC/E,gBAAgB,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC7C,IAAI,CAAC,EAAE,cAAc,CAAC;CACvB,CAAC;AAiBF,QAAA,MAAM,sBAAsB,GAAI,iDAK7B;IACD,WAAW,EAAE,WAAW,CAAC;IACzB,QAAQ,EAAE,cAAc,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB,KAAG,MAQa,CAAC;AAOlB;;;;GAIG;AACH,QAAA,MAAM,4BAA4B,GAAI,4FAMnC,iCAAiC,KAAG,WAAW,EAAE,EAqChD,CAAC;AAEL,OAAO,EAAE,sBAAsB,EAAE,4BAA4B,EAAE,CAAC"}
1
+ {"version":3,"file":"identify-imported-observations.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/identify-imported-observations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAE7D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAM3D,KAAK,iCAAiC,GAAG;IACvC,wBAAwB,EAAE,WAAW,EAAE,EAAE,CAAC;IAC1C,QAAQ,EAAE,cAAc,CAAC;IACzB,yBAAyB,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAEtD,+EAA+E;IAC/E,gBAAgB,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAE7C,sFAAsF;IACtF,oBAAoB,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACjD,IAAI,CAAC,EAAE,cAAc,CAAC;CACvB,CAAC;AAiBF,QAAA,MAAM,sBAAsB,GAAI,iDAK7B;IACD,WAAW,EAAE,WAAW,CAAC;IACzB,QAAQ,EAAE,cAAc,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB,KAAG,MAQa,CAAC;AAOlB;;;;GAIG;AACH,QAAA,MAAM,4BAA4B,GAAI,kHAOnC,iCAAiC,KAAG,WAAW,EAAE,EA4ChD,CAAC;AAEL,OAAO,EAAE,sBAAsB,EAAE,4BAA4B,EAAE,CAAC"}
@@ -1,4 +1,4 @@
1
1
  /** CRC-8/MAXIM: polynomial 0x31 reflected, init 0, no final xor, bit by bit. */
2
2
  declare const crc8Maxim: (bytes: ArrayLike<number>) => number;
3
3
  export { crc8Maxim };
4
- //# sourceMappingURL=crc.d.ts.map
4
+ //# sourceMappingURL=crc8-maxim.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crc8-maxim.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/codec/crc8-maxim.ts"],"names":[],"mappings":"AAGA,gFAAgF;AAChF,QAAA,MAAM,SAAS,GAAI,OAAO,SAAS,CAAC,MAAM,CAAC,KAAG,MASvC,CAAC;AAER,OAAO,EAAE,SAAS,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"built-in.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/families/built-in.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAqFlD,6FAA6F;AAC7F,QAAA,MAAM,eAAe,EAAE,SAAS,WAAW,EAkFzC,CAAC;AAEH,6CAA6C;AAC7C,QAAA,MAAM,kBAAkB,EAAE,SAAS,cAAc,EAkFhD,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,CAAC"}
1
+ {"version":3,"file":"built-in.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/families/built-in.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAsFlD,6FAA6F;AAC7F,QAAA,MAAM,eAAe,EAAE,SAAS,WAAW,EAmFzC,CAAC;AAEH,6CAA6C;AAC7C,QAAA,MAAM,kBAAkB,EAAE,SAAS,cAAc,EAmFhD,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { DeviceProtocol } from "../../core/protocol";
2
+ import { FAMIDOC_HEARING_AID_MODELS } from "./models";
3
+ /** The protocols of the Famidoc hearing aids. */
4
+ declare const FAMIDOC_HEARING_AID_PROTOCOLS: readonly DeviceProtocol[];
5
+ export { FAMIDOC_HEARING_AID_MODELS, FAMIDOC_HEARING_AID_PROTOCOLS };
6
+ //# sourceMappingURL=famidoc-hearing-aid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"famidoc-hearing-aid.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/next/bluetooth/families/famidoc-hearing-aid/famidoc-hearing-aid.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAC;AAGtD,iDAAiD;AACjD,QAAA,MAAM,6BAA6B,EAAE,SAAS,cAAc,EAA0B,CAAC;AAEvF,OAAO,EAAE,0BAA0B,EAAE,6BAA6B,EAAE,CAAC"}