@ovok/native 1.17.0-dev.2211 → 1.17.0-dev.2215

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 (145) hide show
  1. package/lib/commonjs/modules/next/bluetooth/adapters/ble-plx-central.js +45 -24
  2. package/lib/commonjs/modules/next/bluetooth/adapters/ble-plx-central.js.map +1 -1
  3. package/lib/commonjs/modules/next/bluetooth/adapters/web-bluetooth-central.js +9 -1
  4. package/lib/commonjs/modules/next/bluetooth/adapters/web-bluetooth-central.js.map +1 -1
  5. package/lib/commonjs/modules/next/bluetooth/core/device-link.js +2 -1
  6. package/lib/commonjs/modules/next/bluetooth/core/device-link.js.map +1 -1
  7. package/lib/commonjs/modules/next/bluetooth/families/built-in.js +3 -2
  8. package/lib/commonjs/modules/next/bluetooth/families/built-in.js.map +1 -1
  9. package/lib/commonjs/modules/next/bluetooth/families/ihealth-band/am5.js +32 -0
  10. package/lib/commonjs/modules/next/bluetooth/families/ihealth-band/am5.js.map +1 -0
  11. package/lib/commonjs/modules/next/bluetooth/families/ihealth-band/bind.js +67 -0
  12. package/lib/commonjs/modules/next/bluetooth/families/ihealth-band/bind.js.map +1 -0
  13. package/lib/commonjs/modules/next/bluetooth/families/ihealth-band/block-reader.js +48 -0
  14. package/lib/commonjs/modules/next/bluetooth/families/ihealth-band/block-reader.js.map +1 -0
  15. package/lib/commonjs/modules/next/bluetooth/families/ihealth-band/block.js +57 -0
  16. package/lib/commonjs/modules/next/bluetooth/families/ihealth-band/block.js.map +1 -0
  17. package/lib/commonjs/modules/next/bluetooth/families/ihealth-band/commands.js +105 -0
  18. package/lib/commonjs/modules/next/bluetooth/families/ihealth-band/commands.js.map +1 -0
  19. package/lib/commonjs/modules/next/bluetooth/families/ihealth-band/connection.js +27 -0
  20. package/lib/commonjs/modules/next/bluetooth/families/ihealth-band/connection.js.map +1 -0
  21. package/lib/commonjs/modules/next/bluetooth/families/ihealth-band/device-info.js +39 -0
  22. package/lib/commonjs/modules/next/bluetooth/families/ihealth-band/device-info.js.map +1 -0
  23. package/lib/commonjs/modules/next/bluetooth/families/ihealth-band/frame.js +71 -0
  24. package/lib/commonjs/modules/next/bluetooth/families/ihealth-band/frame.js.map +1 -0
  25. package/lib/commonjs/modules/next/bluetooth/families/ihealth-band/history.js +69 -0
  26. package/lib/commonjs/modules/next/bluetooth/families/ihealth-band/history.js.map +1 -0
  27. package/lib/commonjs/modules/next/bluetooth/families/ihealth-band/ihealth-band.js +17 -0
  28. package/lib/commonjs/modules/next/bluetooth/families/ihealth-band/ihealth-band.js.map +1 -0
  29. package/lib/commonjs/modules/next/bluetooth/families/ihealth-band/live.js +42 -0
  30. package/lib/commonjs/modules/next/bluetooth/families/ihealth-band/live.js.map +1 -0
  31. package/lib/commonjs/modules/next/bluetooth/families/ihealth-band/models.js +18 -0
  32. package/lib/commonjs/modules/next/bluetooth/families/ihealth-band/models.js.map +1 -0
  33. package/lib/commonjs/modules/next/bluetooth/families/ihealth-band/records.js +99 -0
  34. package/lib/commonjs/modules/next/bluetooth/families/ihealth-band/records.js.map +1 -0
  35. package/lib/commonjs/modules/next/bluetooth/families/ihealth-band/replies.js +94 -0
  36. package/lib/commonjs/modules/next/bluetooth/families/ihealth-band/replies.js.map +1 -0
  37. package/lib/commonjs/modules/next/bluetooth/families/ihealth-band/session.js +71 -0
  38. package/lib/commonjs/modules/next/bluetooth/families/ihealth-band/session.js.map +1 -0
  39. package/lib/module/modules/next/bluetooth/adapters/ble-plx-central.js +45 -24
  40. package/lib/module/modules/next/bluetooth/adapters/ble-plx-central.js.map +1 -1
  41. package/lib/module/modules/next/bluetooth/adapters/web-bluetooth-central.js +9 -1
  42. package/lib/module/modules/next/bluetooth/adapters/web-bluetooth-central.js.map +1 -1
  43. package/lib/module/modules/next/bluetooth/core/device-link.js +2 -1
  44. package/lib/module/modules/next/bluetooth/core/device-link.js.map +1 -1
  45. package/lib/module/modules/next/bluetooth/families/built-in.js +3 -2
  46. package/lib/module/modules/next/bluetooth/families/built-in.js.map +1 -1
  47. package/lib/module/modules/next/bluetooth/families/ihealth-band/am5.js +30 -0
  48. package/lib/module/modules/next/bluetooth/families/ihealth-band/am5.js.map +1 -0
  49. package/lib/module/modules/next/bluetooth/families/ihealth-band/bind.js +63 -0
  50. package/lib/module/modules/next/bluetooth/families/ihealth-band/bind.js.map +1 -0
  51. package/lib/module/modules/next/bluetooth/families/ihealth-band/block-reader.js +44 -0
  52. package/lib/module/modules/next/bluetooth/families/ihealth-band/block-reader.js.map +1 -0
  53. package/lib/module/modules/next/bluetooth/families/ihealth-band/block.js +52 -0
  54. package/lib/module/modules/next/bluetooth/families/ihealth-band/block.js.map +1 -0
  55. package/lib/module/modules/next/bluetooth/families/ihealth-band/commands.js +92 -0
  56. package/lib/module/modules/next/bluetooth/families/ihealth-band/commands.js.map +1 -0
  57. package/lib/module/modules/next/bluetooth/families/ihealth-band/connection.js +24 -0
  58. package/lib/module/modules/next/bluetooth/families/ihealth-band/connection.js.map +1 -0
  59. package/lib/module/modules/next/bluetooth/families/ihealth-band/device-info.js +33 -0
  60. package/lib/module/modules/next/bluetooth/families/ihealth-band/device-info.js.map +1 -0
  61. package/lib/module/modules/next/bluetooth/families/ihealth-band/frame.js +64 -0
  62. package/lib/module/modules/next/bluetooth/families/ihealth-band/frame.js.map +1 -0
  63. package/lib/module/modules/next/bluetooth/families/ihealth-band/history.js +67 -0
  64. package/lib/module/modules/next/bluetooth/families/ihealth-band/history.js.map +1 -0
  65. package/lib/module/modules/next/bluetooth/families/ihealth-band/ihealth-band.js +9 -0
  66. package/lib/module/modules/next/bluetooth/families/ihealth-band/ihealth-band.js.map +1 -0
  67. package/lib/module/modules/next/bluetooth/families/ihealth-band/live.js +39 -0
  68. package/lib/module/modules/next/bluetooth/families/ihealth-band/live.js.map +1 -0
  69. package/lib/module/modules/next/bluetooth/families/ihealth-band/models.js +16 -0
  70. package/lib/module/modules/next/bluetooth/families/ihealth-band/models.js.map +1 -0
  71. package/lib/module/modules/next/bluetooth/families/ihealth-band/records.js +94 -0
  72. package/lib/module/modules/next/bluetooth/families/ihealth-band/records.js.map +1 -0
  73. package/lib/module/modules/next/bluetooth/families/ihealth-band/replies.js +85 -0
  74. package/lib/module/modules/next/bluetooth/families/ihealth-band/replies.js.map +1 -0
  75. package/lib/module/modules/next/bluetooth/families/ihealth-band/session.js +68 -0
  76. package/lib/module/modules/next/bluetooth/families/ihealth-band/session.js.map +1 -0
  77. package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/ble-plx-central.d.ts.map +1 -1
  78. package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/web-bluetooth-central.d.ts +4 -0
  79. package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/web-bluetooth-central.d.ts.map +1 -1
  80. package/lib/typescript/commonjs/src/modules/next/bluetooth/families/built-in.d.ts.map +1 -1
  81. package/lib/typescript/commonjs/src/modules/next/bluetooth/families/ihealth-band/am5.d.ts +6 -0
  82. package/lib/typescript/commonjs/src/modules/next/bluetooth/families/ihealth-band/am5.d.ts.map +1 -0
  83. package/lib/typescript/commonjs/src/modules/next/bluetooth/families/ihealth-band/bind.d.ts +6 -0
  84. package/lib/typescript/commonjs/src/modules/next/bluetooth/families/ihealth-band/bind.d.ts.map +1 -0
  85. package/lib/typescript/commonjs/src/modules/next/bluetooth/families/ihealth-band/block-reader.d.ts +6 -0
  86. package/lib/typescript/commonjs/src/modules/next/bluetooth/families/ihealth-band/block-reader.d.ts.map +1 -0
  87. package/lib/typescript/commonjs/src/modules/next/bluetooth/families/ihealth-band/block.d.ts +18 -0
  88. package/lib/typescript/commonjs/src/modules/next/bluetooth/families/ihealth-band/block.d.ts.map +1 -0
  89. package/lib/typescript/commonjs/src/modules/next/bluetooth/families/ihealth-band/commands.d.ts +43 -0
  90. package/lib/typescript/commonjs/src/modules/next/bluetooth/families/ihealth-band/commands.d.ts.map +1 -0
  91. package/lib/typescript/commonjs/src/modules/next/bluetooth/families/ihealth-band/connection.d.ts +15 -0
  92. package/lib/typescript/commonjs/src/modules/next/bluetooth/families/ihealth-band/connection.d.ts.map +1 -0
  93. package/lib/typescript/commonjs/src/modules/next/bluetooth/families/ihealth-band/device-info.d.ts +10 -0
  94. package/lib/typescript/commonjs/src/modules/next/bluetooth/families/ihealth-band/device-info.d.ts.map +1 -0
  95. package/lib/typescript/commonjs/src/modules/next/bluetooth/families/ihealth-band/frame.d.ts +31 -0
  96. package/lib/typescript/commonjs/src/modules/next/bluetooth/families/ihealth-band/frame.d.ts.map +1 -0
  97. package/lib/typescript/commonjs/src/modules/next/bluetooth/families/ihealth-band/history.d.ts +6 -0
  98. package/lib/typescript/commonjs/src/modules/next/bluetooth/families/ihealth-band/history.d.ts.map +1 -0
  99. package/lib/typescript/commonjs/src/modules/next/bluetooth/families/ihealth-band/ihealth-band.d.ts +6 -0
  100. package/lib/typescript/commonjs/src/modules/next/bluetooth/families/ihealth-band/ihealth-band.d.ts.map +1 -0
  101. package/lib/typescript/commonjs/src/modules/next/bluetooth/families/ihealth-band/live.d.ts +6 -0
  102. package/lib/typescript/commonjs/src/modules/next/bluetooth/families/ihealth-band/live.d.ts.map +1 -0
  103. package/lib/typescript/commonjs/src/modules/next/bluetooth/families/ihealth-band/models.d.ts +5 -0
  104. package/lib/typescript/commonjs/src/modules/next/bluetooth/families/ihealth-band/models.d.ts.map +1 -0
  105. package/lib/typescript/commonjs/src/modules/next/bluetooth/families/ihealth-band/records.d.ts +8 -0
  106. package/lib/typescript/commonjs/src/modules/next/bluetooth/families/ihealth-band/records.d.ts.map +1 -0
  107. package/lib/typescript/commonjs/src/modules/next/bluetooth/families/ihealth-band/replies.d.ts +29 -0
  108. package/lib/typescript/commonjs/src/modules/next/bluetooth/families/ihealth-band/replies.d.ts.map +1 -0
  109. package/lib/typescript/commonjs/src/modules/next/bluetooth/families/ihealth-band/session.d.ts +21 -0
  110. package/lib/typescript/commonjs/src/modules/next/bluetooth/families/ihealth-band/session.d.ts.map +1 -0
  111. package/lib/typescript/module/src/modules/next/bluetooth/adapters/ble-plx-central.d.ts.map +1 -1
  112. package/lib/typescript/module/src/modules/next/bluetooth/adapters/web-bluetooth-central.d.ts +4 -0
  113. package/lib/typescript/module/src/modules/next/bluetooth/adapters/web-bluetooth-central.d.ts.map +1 -1
  114. package/lib/typescript/module/src/modules/next/bluetooth/families/built-in.d.ts.map +1 -1
  115. package/lib/typescript/module/src/modules/next/bluetooth/families/ihealth-band/am5.d.ts +6 -0
  116. package/lib/typescript/module/src/modules/next/bluetooth/families/ihealth-band/am5.d.ts.map +1 -0
  117. package/lib/typescript/module/src/modules/next/bluetooth/families/ihealth-band/bind.d.ts +6 -0
  118. package/lib/typescript/module/src/modules/next/bluetooth/families/ihealth-band/bind.d.ts.map +1 -0
  119. package/lib/typescript/module/src/modules/next/bluetooth/families/ihealth-band/block-reader.d.ts +6 -0
  120. package/lib/typescript/module/src/modules/next/bluetooth/families/ihealth-band/block-reader.d.ts.map +1 -0
  121. package/lib/typescript/module/src/modules/next/bluetooth/families/ihealth-band/block.d.ts +18 -0
  122. package/lib/typescript/module/src/modules/next/bluetooth/families/ihealth-band/block.d.ts.map +1 -0
  123. package/lib/typescript/module/src/modules/next/bluetooth/families/ihealth-band/commands.d.ts +43 -0
  124. package/lib/typescript/module/src/modules/next/bluetooth/families/ihealth-band/commands.d.ts.map +1 -0
  125. package/lib/typescript/module/src/modules/next/bluetooth/families/ihealth-band/connection.d.ts +15 -0
  126. package/lib/typescript/module/src/modules/next/bluetooth/families/ihealth-band/connection.d.ts.map +1 -0
  127. package/lib/typescript/module/src/modules/next/bluetooth/families/ihealth-band/device-info.d.ts +10 -0
  128. package/lib/typescript/module/src/modules/next/bluetooth/families/ihealth-band/device-info.d.ts.map +1 -0
  129. package/lib/typescript/module/src/modules/next/bluetooth/families/ihealth-band/frame.d.ts +31 -0
  130. package/lib/typescript/module/src/modules/next/bluetooth/families/ihealth-band/frame.d.ts.map +1 -0
  131. package/lib/typescript/module/src/modules/next/bluetooth/families/ihealth-band/history.d.ts +6 -0
  132. package/lib/typescript/module/src/modules/next/bluetooth/families/ihealth-band/history.d.ts.map +1 -0
  133. package/lib/typescript/module/src/modules/next/bluetooth/families/ihealth-band/ihealth-band.d.ts +6 -0
  134. package/lib/typescript/module/src/modules/next/bluetooth/families/ihealth-band/ihealth-band.d.ts.map +1 -0
  135. package/lib/typescript/module/src/modules/next/bluetooth/families/ihealth-band/live.d.ts +6 -0
  136. package/lib/typescript/module/src/modules/next/bluetooth/families/ihealth-band/live.d.ts.map +1 -0
  137. package/lib/typescript/module/src/modules/next/bluetooth/families/ihealth-band/models.d.ts +5 -0
  138. package/lib/typescript/module/src/modules/next/bluetooth/families/ihealth-band/models.d.ts.map +1 -0
  139. package/lib/typescript/module/src/modules/next/bluetooth/families/ihealth-band/records.d.ts +8 -0
  140. package/lib/typescript/module/src/modules/next/bluetooth/families/ihealth-band/records.d.ts.map +1 -0
  141. package/lib/typescript/module/src/modules/next/bluetooth/families/ihealth-band/replies.d.ts +29 -0
  142. package/lib/typescript/module/src/modules/next/bluetooth/families/ihealth-band/replies.d.ts.map +1 -0
  143. package/lib/typescript/module/src/modules/next/bluetooth/families/ihealth-band/session.d.ts +21 -0
  144. package/lib/typescript/module/src/modules/next/bluetooth/families/ihealth-band/session.d.ts.map +1 -0
  145. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"device-info.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/next/bluetooth/families/ihealth-band/device-info.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAInE,OAAO,EAAE,SAAS,EAAe,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,wCAAwC;AACxC,QAAA,MAAM,aAAa,GAAU,aAAa,OAAO,KAAG,OAAO,CAAC,SAAS,CAIpE,CAAC;AAEF,0FAA0F;AAC1F,QAAA,MAAM,QAAQ,GAAU,SAAS,OAAO,KAAG,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,CAM3E,CAAC;AAEH,QAAA,MAAM,OAAO,GAAU,SAAS,OAAO,KAAG,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAIpE,CAAC;AAEF,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC"}
@@ -0,0 +1,31 @@
1
+ /** The service every frame travels on. */
2
+ declare const BAND_SERVICE: string;
3
+ /** The characteristics the band notifies on, in the order it wants them enabled. */
4
+ declare const NOTIFY_CHARACTERISTICS: readonly string[];
5
+ /** The first byte of a frame: what kind of exchange it belongs to. */
6
+ declare const COMMAND_CLASS: {
7
+ readonly read: 2;
8
+ readonly setting: 3;
9
+ readonly bind: 4;
10
+ readonly health: 8;
11
+ readonly workout: 9;
12
+ };
13
+ /** One packet: its command class, its key, and the payload after them; payload offsets count from there. */
14
+ type Frame = {
15
+ commandClass: number;
16
+ key: number;
17
+ payload: Uint8Array;
18
+ };
19
+ /** A frame to send, from the bytes after its key. */
20
+ declare const command: (commandClass: number, key: number, payload?: readonly number[]) => Frame;
21
+ /** The bytes to write; fails for a frame the band would refuse as too long. */
22
+ declare const frameBytes: ({ commandClass, key, payload }: Frame) => Uint8Array;
23
+ /** The frame a notification carries; `null` when it is too short or too long to be one. */
24
+ declare const frameOf: (bytes: Uint8Array) => Frame | null;
25
+ /** Where a frame is written: health and workout data have a characteristic of their own. */
26
+ declare const characteristicOf: ({ commandClass }: Frame) => string;
27
+ /** Accepts the reply that echoes the class and key of `request`, which is how the band acknowledges it. */
28
+ declare const isEchoOf: (request: Frame) => (reply: Frame) => boolean;
29
+ export { BAND_SERVICE, characteristicOf, COMMAND_CLASS, command, frameBytes, frameOf, isEchoOf, NOTIFY_CHARACTERISTICS };
30
+ export type { Frame };
31
+ //# sourceMappingURL=frame.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"frame.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/next/bluetooth/families/ihealth-band/frame.ts"],"names":[],"mappings":"AAGA,0CAA0C;AAC1C,QAAA,MAAM,YAAY,QAAmB,CAAC;AAKtC,oFAAoF;AACpF,QAAA,MAAM,sBAAsB,EAAE,SAAS,MAAM,EAAyC,CAAC;AAMvF,sEAAsE;AACtE,QAAA,MAAM,aAAa;;;;;;CAAkF,CAAC;AAItG,4GAA4G;AAC5G,KAAK,KAAK,GAAG;IACX,YAAY,EAAE,MAAM,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,UAAU,CAAC;CACrB,CAAC;AAEF,qDAAqD;AACrD,QAAA,MAAM,OAAO,GAAI,cAAc,MAAM,EAAE,KAAK,MAAM,EAAE,UAAS,SAAS,MAAM,EAAO,KAAG,KAIpF,CAAC;AAEH,+EAA+E;AAC/E,QAAA,MAAM,UAAU,GAAI,gCAAgC,KAAK,KAAG,UAQ3D,CAAC;AAEF,2FAA2F;AAC3F,QAAA,MAAM,OAAO,GAAI,OAAO,UAAU,KAAG,KAAK,GAAG,IAGmD,CAAC;AAEjG,4FAA4F;AAC5F,QAAA,MAAM,gBAAgB,GAAI,kBAAkB,KAAK,KAAG,MACgD,CAAC;AAErG,2GAA2G;AAC3G,QAAA,MAAM,QAAQ,GACX,SAAS,KAAK,MACd,OAAO,KAAK,KAAG,OAC0D,CAAC;AAE7E,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,sBAAsB,EAAE,CAAC;AACzH,YAAY,EAAE,KAAK,EAAE,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { HistoryRecord } from "../../core/protocol";
2
+ import { BandConnection } from "./connection";
3
+ /** The steps of each 15-minute slot and each heart-rate sample the band stores, as the band's blocks come. */
4
+ declare function storedRecords(connection: BandConnection): AsyncGenerator<HistoryRecord>;
5
+ export { storedRecords };
6
+ //# sourceMappingURL=history.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"history.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/next/bluetooth/families/ihealth-band/history.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAKpD,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAoD9C,8GAA8G;AAC9G,iBAAgB,aAAa,CAAC,UAAU,EAAE,cAAc,GAAG,cAAc,CAAC,aAAa,CAAC,CAevF;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { DeviceProtocol } from "../../core/protocol";
2
+ import { IHEALTH_BAND_MODELS } from "./models";
3
+ /** The protocols of the iHealth fitness bands: the AM5. */
4
+ declare const IHEALTH_BAND_PROTOCOLS: readonly DeviceProtocol[];
5
+ export { IHEALTH_BAND_MODELS, IHEALTH_BAND_PROTOCOLS };
6
+ //# sourceMappingURL=ihealth-band.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ihealth-band.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/next/bluetooth/families/ihealth-band/ihealth-band.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAGrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAE/C,2DAA2D;AAC3D,QAAA,MAAM,sBAAsB,EAAE,SAAS,cAAc,EAAU,CAAC;AAEhE,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { LiveFrame } from "../../core/reading";
2
+ import { BandConnection } from "./connection";
3
+ /** Asks for the heart rate once a second until `signal` aborts; a reading of 0 is left out. */
4
+ declare const pollHeartRate: ({ request, now }: BandConnection, onFrame: (frame: LiveFrame) => void, signal: AbortSignal) => Promise<void>;
5
+ export { pollHeartRate };
6
+ //# sourceMappingURL=live.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"live.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/next/bluetooth/families/ihealth-band/live.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAI/C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAa9C,+FAA+F;AAC/F,QAAA,MAAM,aAAa,GAAU,kBAAkB,cAAc,EAAE,SAAS,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,EAAE,QAAQ,WAAW,KAAG,OAAO,CAAC,IAAI,CAWrI,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { DeviceModel } from "../../core/catalog";
2
+ /** The one band; it has no advertised name, so the service it advertises is what finds it. */
3
+ declare const IHEALTH_BAND_MODELS: readonly DeviceModel[];
4
+ export { IHEALTH_BAND_MODELS };
5
+ //# sourceMappingURL=models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/next/bluetooth/families/ihealth-band/models.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAMjD,8FAA8F;AAC9F,QAAA,MAAM,mBAAmB,EAAE,SAAS,WAAW,EAK9C,CAAC;AAEF,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { HistoryRecord } from "../../core/protocol";
2
+ import { Block } from "./block";
3
+ /** The steps of each 15-minute slot of the day that has ended by `now` and holds steps; a slot still counting would come back under another id. */
4
+ declare const stepsRecords: ({ day, data }: Block, now: Date) => HistoryRecord[];
5
+ /** The samples of a heart-rate day: each item gives the minutes since the one before, which add up from local midnight. */
6
+ declare const heartRateRecords: ({ day, data }: Block) => HistoryRecord[];
7
+ export { heartRateRecords, stepsRecords };
8
+ //# sourceMappingURL=records.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"records.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/next/bluetooth/families/ihealth-band/records.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,KAAK,EAAa,MAAM,SAAS,CAAC;AA8B3C,mJAAmJ;AACnJ,QAAA,MAAM,YAAY,GAAI,eAAe,KAAK,EAAE,KAAK,IAAI,KAAG,aAAa,EAWpE,CAAC;AAYF,2HAA2H;AAC3H,QAAA,MAAM,gBAAgB,GAAI,eAAe,KAAK,KAAG,aAAa,EAe7D,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,CAAC"}
@@ -0,0 +1,29 @@
1
+ import { Frame } from "./frame";
2
+ /** The basic info reply: the firmware number, the charge, and whether the band is bound to a phone. */
3
+ type BasicInfo = {
4
+ firmware: number;
5
+ percent: number;
6
+ charging: boolean | null;
7
+ bound: boolean;
8
+ };
9
+ /** How many days of each kind the sync reads; the band holds more kinds, which this does not read. */
10
+ type StoredDays = {
11
+ sport: number;
12
+ heartRate: number;
13
+ };
14
+ /** The bind reply: its result code, and how many digits of pairing code the band wants, none when 0. */
15
+ declare const bindAnswerOf: (reply: Frame) => {
16
+ result: number;
17
+ codeLength: number;
18
+ };
19
+ /** The result code of the reply to the pairing code. */
20
+ declare const authResultOf: (reply: Frame) => number;
21
+ declare const basicInfoOf: (reply: Frame) => BasicInfo;
22
+ /** Whether the band says it measures heart rate; without it the band has no heart-rate blocks. */
23
+ declare const measuresHeartRate: (reply: Frame) => boolean;
24
+ declare const storedDaysOf: (reply: Frame) => StoredDays;
25
+ /** The heart rate of a live data reply, in beats per minute. */
26
+ declare const liveHeartRateOf: (reply: Frame) => number;
27
+ export { authResultOf, basicInfoOf, bindAnswerOf, liveHeartRateOf, measuresHeartRate, storedDaysOf };
28
+ export type { BasicInfo, StoredDays };
29
+ //# sourceMappingURL=replies.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"replies.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/next/bluetooth/families/ihealth-band/replies.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAwBhC,uGAAuG;AACvG,KAAK,SAAS,GAAG;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,OAAO,GAAG,IAAI,CAAC;IACzB,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,sGAAsG;AACtG,KAAK,UAAU,GAAG;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAUF,wGAAwG;AACxG,QAAA,MAAM,YAAY,GAAI,OAAO,KAAK,KAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAIxE,CAAC;AAEF,wDAAwD;AACxD,QAAA,MAAM,YAAY,GAAI,OAAO,KAAK,KAAG,MAAqC,CAAC;AAE3E,QAAA,MAAM,WAAW,GAAI,OAAO,KAAK,KAAG,SASnC,CAAC;AAEF,kGAAkG;AAClG,QAAA,MAAM,iBAAiB,GAAI,OAAO,KAAK,KAAG,OAAkF,CAAC;AAE7H,QAAA,MAAM,YAAY,GAAI,OAAO,KAAK,KAAG,UAOpC,CAAC;AAEF,gEAAgE;AAChE,QAAA,MAAM,eAAe,GAAI,OAAO,KAAK,KAAG,MAA2E,CAAC;AAEpH,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,eAAe,EAAE,iBAAiB,EAAE,YAAY,EAAE,CAAC;AACrG,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { DeviceError } from "../../core/errors";
2
+ import { ProtocolContext } from "../../core/protocol";
3
+ import { Inbox } from "../sig/waiting";
4
+ import { Frame } from "./frame";
5
+ type Accepts = (reply: Frame) => boolean;
6
+ /** One open link: requests that wait for the band's reply, and the health packets the band sends on its own. */
7
+ type Session = {
8
+ /** Sends a frame and resolves with the reply `accepts`, resending when the band is silent. */
9
+ request: (frame: Frame, accepts: Accepts) => Promise<Frame>;
10
+ /** Like `request`, with the longer wait the band gets to answer a bind. */
11
+ bindRequest: (frame: Frame, accepts: Accepts) => Promise<Frame>;
12
+ /** Every health packet, or the error that ended the link, in the order they came. */
13
+ packets: Inbox<Frame | DeviceError>;
14
+ /** Stops listening. */
15
+ stop: () => void;
16
+ };
17
+ /** Enables both notify characteristics, and routes what the band sends to whoever waits for it. */
18
+ declare const openSession: ({ link }: ProtocolContext) => Promise<Session>;
19
+ export { openSession };
20
+ export type { Session };
21
+ //# sourceMappingURL=session.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/next/bluetooth/families/ihealth-band/session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,OAAO,EAAiD,KAAK,EAA+C,MAAM,SAAS,CAAC;AAQ5H,KAAK,OAAO,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK,OAAO,CAAC;AAEzC,gHAAgH;AAChH,KAAK,OAAO,GAAG;IAEb,8FAA8F;IAC9F,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,KAAK,CAAC,CAAC;IAE5D,2EAA2E;IAC3E,WAAW,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,KAAK,CAAC,CAAC;IAEhE,qFAAqF;IACrF,OAAO,EAAE,KAAK,CAAC,KAAK,GAAG,WAAW,CAAC,CAAC;IAEpC,uBAAuB;IACvB,IAAI,EAAE,MAAM,IAAI,CAAC;CAClB,CAAC;AAEF,mGAAmG;AACnG,QAAA,MAAM,WAAW,GAAU,UAAU,eAAe,KAAG,OAAO,CAAC,OAAO,CAiDrE,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,CAAC;AACvB,YAAY,EAAE,OAAO,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ovok/native",
3
- "version": "1.17.0-dev.2211+48b2d23",
3
+ "version": "1.17.0-dev.2215+6d3e08a",
4
4
  "description": "React native component sdk for OVOK",
5
5
  "source": "./src/index.tsx",
6
6
  "main": "./lib/commonjs/index.js",