@ovok/native 1.17.0-dev.2256 → 1.17.0-dev.2260

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 (67) hide show
  1. package/lib/commonjs/modules/next/bluetooth/adapters/sqlite-database-outbox-store.js +80 -0
  2. package/lib/commonjs/modules/next/bluetooth/adapters/sqlite-database-outbox-store.js.map +1 -0
  3. package/lib/commonjs/modules/next/bluetooth/adapters/sqlite-database.js +0 -22
  4. package/lib/commonjs/modules/next/bluetooth/adapters/sqlite-database.js.map +1 -1
  5. package/lib/commonjs/modules/next/bluetooth/adapters/sqlite-outbox-schema.js +1 -1
  6. package/lib/commonjs/modules/next/bluetooth/adapters/sqlite-outbox-schema.js.map +1 -1
  7. package/lib/commonjs/modules/next/bluetooth/adapters/sqlite-outbox-store.js +16 -67
  8. package/lib/commonjs/modules/next/bluetooth/adapters/sqlite-outbox-store.js.map +1 -1
  9. package/lib/commonjs/modules/next/bluetooth/sqlite/index.js.map +1 -1
  10. package/lib/commonjs/modules/next/index.js.map +1 -1
  11. package/lib/commonjs/modules/next/ovok.js +25 -2
  12. package/lib/commonjs/modules/next/ovok.js.map +1 -1
  13. package/lib/commonjs/modules/next/react-native-outbox-triggers.js +40 -0
  14. package/lib/commonjs/modules/next/react-native-outbox-triggers.js.map +1 -0
  15. package/lib/module/modules/next/bluetooth/adapters/sqlite-database-outbox-store.js +77 -0
  16. package/lib/module/modules/next/bluetooth/adapters/sqlite-database-outbox-store.js.map +1 -0
  17. package/lib/module/modules/next/bluetooth/adapters/sqlite-database.js +0 -18
  18. package/lib/module/modules/next/bluetooth/adapters/sqlite-database.js.map +1 -1
  19. package/lib/module/modules/next/bluetooth/adapters/sqlite-outbox-schema.js +1 -1
  20. package/lib/module/modules/next/bluetooth/adapters/sqlite-outbox-schema.js.map +1 -1
  21. package/lib/module/modules/next/bluetooth/adapters/sqlite-outbox-store.js +16 -67
  22. package/lib/module/modules/next/bluetooth/adapters/sqlite-outbox-store.js.map +1 -1
  23. package/lib/module/modules/next/bluetooth/sqlite/index.js +3 -2
  24. package/lib/module/modules/next/bluetooth/sqlite/index.js.map +1 -1
  25. package/lib/module/modules/next/index.js +1 -1
  26. package/lib/module/modules/next/index.js.map +1 -1
  27. package/lib/module/modules/next/ovok.js +25 -2
  28. package/lib/module/modules/next/ovok.js.map +1 -1
  29. package/lib/module/modules/next/react-native-outbox-triggers.js +37 -0
  30. package/lib/module/modules/next/react-native-outbox-triggers.js.map +1 -0
  31. package/lib/typescript/commonjs/src/modules/data-sync/services/managers/sync-progress-manager.d.ts +1 -1
  32. package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/sqlite-database-outbox-store.d.ts +38 -0
  33. package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/sqlite-database-outbox-store.d.ts.map +1 -0
  34. package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/sqlite-database.d.ts +9 -7
  35. package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/sqlite-database.d.ts.map +1 -1
  36. package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/sqlite-outbox-store.d.ts +5 -33
  37. package/lib/typescript/commonjs/src/modules/next/bluetooth/adapters/sqlite-outbox-store.d.ts.map +1 -1
  38. package/lib/typescript/commonjs/src/modules/next/bluetooth/core/device-snapshot.d.ts +1 -1
  39. package/lib/typescript/commonjs/src/modules/next/bluetooth/sqlite/index.d.ts +5 -3
  40. package/lib/typescript/commonjs/src/modules/next/bluetooth/sqlite/index.d.ts.map +1 -1
  41. package/lib/typescript/commonjs/src/modules/next/index.d.ts +2 -1
  42. package/lib/typescript/commonjs/src/modules/next/index.d.ts.map +1 -1
  43. package/lib/typescript/commonjs/src/modules/next/ovok.d.ts +11 -3
  44. package/lib/typescript/commonjs/src/modules/next/ovok.d.ts.map +1 -1
  45. package/lib/typescript/commonjs/src/modules/next/react-native-outbox-triggers.d.ts +7 -0
  46. package/lib/typescript/commonjs/src/modules/next/react-native-outbox-triggers.d.ts.map +1 -0
  47. package/lib/typescript/commonjs/src/modules/theme/hooks/use-app-theme.d.ts +1 -1
  48. package/lib/typescript/commonjs/src/modules/theme/utils/generate-theme.d.ts +1 -1
  49. package/lib/typescript/module/src/modules/data-sync/services/managers/sync-progress-manager.d.ts +1 -1
  50. package/lib/typescript/module/src/modules/next/bluetooth/adapters/sqlite-database-outbox-store.d.ts +38 -0
  51. package/lib/typescript/module/src/modules/next/bluetooth/adapters/sqlite-database-outbox-store.d.ts.map +1 -0
  52. package/lib/typescript/module/src/modules/next/bluetooth/adapters/sqlite-database.d.ts +9 -7
  53. package/lib/typescript/module/src/modules/next/bluetooth/adapters/sqlite-database.d.ts.map +1 -1
  54. package/lib/typescript/module/src/modules/next/bluetooth/adapters/sqlite-outbox-store.d.ts +5 -33
  55. package/lib/typescript/module/src/modules/next/bluetooth/adapters/sqlite-outbox-store.d.ts.map +1 -1
  56. package/lib/typescript/module/src/modules/next/bluetooth/core/device-snapshot.d.ts +1 -1
  57. package/lib/typescript/module/src/modules/next/bluetooth/sqlite/index.d.ts +5 -3
  58. package/lib/typescript/module/src/modules/next/bluetooth/sqlite/index.d.ts.map +1 -1
  59. package/lib/typescript/module/src/modules/next/index.d.ts +2 -1
  60. package/lib/typescript/module/src/modules/next/index.d.ts.map +1 -1
  61. package/lib/typescript/module/src/modules/next/ovok.d.ts +11 -3
  62. package/lib/typescript/module/src/modules/next/ovok.d.ts.map +1 -1
  63. package/lib/typescript/module/src/modules/next/react-native-outbox-triggers.d.ts +7 -0
  64. package/lib/typescript/module/src/modules/next/react-native-outbox-triggers.d.ts.map +1 -0
  65. package/lib/typescript/module/src/modules/theme/hooks/use-app-theme.d.ts +1 -1
  66. package/lib/typescript/module/src/modules/theme/utils/generate-theme.d.ts +1 -1
  67. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"names":["SqliteOutboxStore"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/sqlite/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,iBAAiB,QAAQ,oCAAiC","ignoreList":[]}
1
+ {"version":3,"names":["SqliteOutboxStore"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/sqlite/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,iBAAiB,QAAQ,oCAAiC","ignoreList":[]}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  /**
4
- * The native `Ovok` client built on `@ovok/core/next`, with secure-store token storage.
4
+ * The native `Ovok` client built on `@ovok/core/next`, with secure-store token storage and a SQLite outbox.
5
5
  *
6
6
  * Import from `@ovok/native/next`.
7
7
  *
@@ -1 +1 @@
1
- {"version":3,"names":["Ovok","SecureStoreStorage"],"sourceRoot":"../../../../src","sources":["modules/next/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iBAAiB;AAC/B,SAASA,IAAI,QAAQ,WAAQ;AAG7B,SAASC,kBAAkB,QAAQ,2BAAwB","ignoreList":[]}
1
+ {"version":3,"names":["Ovok","SecureStoreStorage"],"sourceRoot":"../../../../src","sources":["modules/next/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iBAAiB;AAC/B,SAASA,IAAI,QAAQ,WAAQ;AAI7B,SAASC,kBAAkB,QAAQ,2BAAwB","ignoreList":[]}
@@ -1,12 +1,32 @@
1
1
  "use strict";
2
2
 
3
3
  import { Ovok as CoreOvok } from "@ovok/core/next";
4
+ import { SqliteDatabaseOutboxStore } from "./bluetooth/adapters/sqlite-database-outbox-store.js";
4
5
  import { installRandomValues } from "./random-values.js";
6
+ import { appStateLifecycle, netInfoConnectivity } from "./react-native-outbox-triggers.js";
5
7
  import { SecureStoreStorage } from "./secure-store-storage.js";
6
8
 
7
9
  /** No clientSecret: anything shipped inside an app can be extracted from it. */
8
10
 
9
- /** The @ovok/core/next client with the session kept in the device's secure store. */
11
+ const outboxStoreOf = ({
12
+ outboxStore,
13
+ sqlite
14
+ }) => {
15
+ if (outboxStore) {
16
+ return outboxStore;
17
+ }
18
+ if (!sqlite) {
19
+ throw new TypeError("Pass the Ovok client sqlite (the expo-sqlite module) or an outboxStore for unsent measurements.");
20
+ }
21
+ return new SqliteDatabaseOutboxStore({
22
+ open: name => sqlite.openDatabaseAsync(name)
23
+ });
24
+ };
25
+
26
+ /**
27
+ * The @ovok/core/next client with the session kept in the device's secure store and unsent measurements in SQLite,
28
+ * sent when the network returns and when the app comes to the foreground.
29
+ */
10
30
  class Ovok extends CoreOvok {
11
31
  /** Base URL of the Ovok API, with a trailing slash. */
12
32
 
@@ -26,7 +46,10 @@ class Ovok extends CoreOvok {
26
46
  super({
27
47
  ...shared,
28
48
  clientSecret: undefined,
29
- storage
49
+ storage,
50
+ outboxStore: outboxStoreOf(config),
51
+ connectivity: shared.connectivity ?? netInfoConnectivity,
52
+ lifecycle: shared.lifecycle ?? appStateLifecycle
30
53
  });
31
54
  this.baseUrl = shared.baseUrl.endsWith("/") ? shared.baseUrl : `${shared.baseUrl}/`;
32
55
  this.tenantCode = shared.tenantCode;
@@ -1 +1 @@
1
- {"version":3,"names":["Ovok","CoreOvok","installRandomValues","SecureStoreStorage","constructor","config","secureStore","secureStoreOptions","getRandomValues","shared","storage","clientSecret","undefined","baseUrl","endsWith","tenantCode"],"sourceRoot":"../../../../src","sources":["modules/next/ovok.ts"],"mappings":";;AAAA,SAASA,IAAI,IAAIC,QAAQ,QAAQ,iBAAiB;AAMlD,SAASC,mBAAmB,QAAQ,oBAAiB;AACrD,SAASC,kBAAkB,QAAQ,2BAAwB;;AAI3D;;AAaA;AACA,MAAMH,IAAI,SAASC,QAAQ,CAAC;EAC1B;;EAGA;;EAGA;;EAGAG,WAAWA,CAACC,MAAwB,EAAE;IACpC,MAAM;MAAEC,WAAW;MAAEC,kBAAkB;MAAEC,eAAe;MAAE,GAAGC;IAAO,CAAC,GAAGJ,MAAM;IAC9E,MAAMK,OAAO,GAAG,IAAIP,kBAAkB,CAACG,WAAW,EAAEC,kBAAkB,CAAC;IAEvEL,mBAAmB,CAACM,eAAe,CAAC;IACpC,KAAK,CAAC;MACJ,GAAGC,MAAM;MACTE,YAAY,EAAEC,SAAS;MACvBF;IACF,CAAC,CAAC;IACF,IAAI,CAACG,OAAO,GAAGJ,MAAM,CAACI,OAAO,CAACC,QAAQ,CAAC,GAAG,CAAC,GAAGL,MAAM,CAACI,OAAO,GAAG,GAAGJ,MAAM,CAACI,OAAO,GAAG;IACnF,IAAI,CAACE,UAAU,GAAGN,MAAM,CAACM,UAAU;IACnC,IAAI,CAACL,OAAO,GAAGA,OAAO;EACxB;AACF;AAEA,SAASV,IAAI","ignoreList":[]}
1
+ {"version":3,"names":["Ovok","CoreOvok","SqliteDatabaseOutboxStore","installRandomValues","appStateLifecycle","netInfoConnectivity","SecureStoreStorage","outboxStoreOf","outboxStore","sqlite","TypeError","open","name","openDatabaseAsync","constructor","config","secureStore","secureStoreOptions","getRandomValues","shared","storage","clientSecret","undefined","connectivity","lifecycle","baseUrl","endsWith","tenantCode"],"sourceRoot":"../../../../src","sources":["modules/next/ovok.ts"],"mappings":";;AAAA,SAASA,IAAI,IAAIC,QAAQ,QAAQ,iBAAiB;AAOlD,SAASC,yBAAyB,QAAQ,sDAAmD;AAC7F,SAASC,mBAAmB,QAAQ,oBAAiB;AACrD,SAASC,iBAAiB,EAAEC,mBAAmB,QAAQ,mCAAgC;AACvF,SAASC,kBAAkB,QAAQ,2BAAwB;;AAI3D;;AAmBA,MAAMC,aAAa,GAAGA,CAAC;EAAEC,WAAW;EAAEC;AAAyD,CAAC,KAAkB;EAChH,IAAID,WAAW,EAAE;IACf,OAAOA,WAAW;EACpB;EAEA,IAAI,CAACC,MAAM,EAAE;IACX,MAAM,IAAIC,SAAS,CAAC,iGAAiG,CAAC;EACxH;EAEA,OAAO,IAAIR,yBAAyB,CAAC;IAAES,IAAI,EAAGC,IAAI,IAAKH,MAAM,CAACI,iBAAiB,CAACD,IAAI;EAAE,CAAC,CAAC;AAC1F,CAAC;;AAED;AACA;AACA;AACA;AACA,MAAMZ,IAAI,SAASC,QAAQ,CAAC;EAC1B;;EAGA;;EAGA;;EAGAa,WAAWA,CAACC,MAAwB,EAAE;IACpC,MAAM;MAAEC,WAAW;MAAEC,kBAAkB;MAAEC,eAAe;MAAE,GAAGC;IAAO,CAAC,GAAGJ,MAAM;IAC9E,MAAMK,OAAO,GAAG,IAAId,kBAAkB,CAACU,WAAW,EAAEC,kBAAkB,CAAC;IAEvEd,mBAAmB,CAACe,eAAe,CAAC;IACpC,KAAK,CAAC;MACJ,GAAGC,MAAM;MACTE,YAAY,EAAEC,SAAS;MACvBF,OAAO;MACPZ,WAAW,EAAED,aAAa,CAACQ,MAAM,CAAC;MAClCQ,YAAY,EAAEJ,MAAM,CAACI,YAAY,IAAIlB,mBAAmB;MACxDmB,SAAS,EAAEL,MAAM,CAACK,SAAS,IAAIpB;IACjC,CAAC,CAAC;IACF,IAAI,CAACqB,OAAO,GAAGN,MAAM,CAACM,OAAO,CAACC,QAAQ,CAAC,GAAG,CAAC,GAAGP,MAAM,CAACM,OAAO,GAAG,GAAGN,MAAM,CAACM,OAAO,GAAG;IACnF,IAAI,CAACE,UAAU,GAAGR,MAAM,CAACQ,UAAU;IACnC,IAAI,CAACP,OAAO,GAAGA,OAAO;EACxB;AACF;AAEA,SAASpB,IAAI","ignoreList":[]}
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+
3
+ import { addEventListener as addNetworkListener } from "@react-native-community/netinfo";
4
+ import { AppState } from "react-native";
5
+ /** An unknown internet reachability counts as online, as on the first report after launch. */
6
+ const isOnline = ({
7
+ isConnected,
8
+ isInternetReachable
9
+ }) => isConnected === true && isInternetReachable !== false;
10
+
11
+ /** The device's connection through NetInfo: the outbox hears each time it comes back after going offline. */
12
+ const netInfoConnectivity = {
13
+ subscribe: onOnline => {
14
+ let wasOnline = true;
15
+ return addNetworkListener(state => {
16
+ const online = isOnline(state);
17
+ if (online && !wasOnline) {
18
+ onOnline();
19
+ }
20
+ wasOnline = online;
21
+ });
22
+ }
23
+ };
24
+
25
+ /** The app's foreground through React Native's `AppState`. */
26
+ const appStateLifecycle = {
27
+ subscribe: onForeground => {
28
+ const subscription = AppState.addEventListener("change", state => {
29
+ if (state === "active") {
30
+ onForeground();
31
+ }
32
+ });
33
+ return () => subscription.remove();
34
+ }
35
+ };
36
+ export { appStateLifecycle, netInfoConnectivity };
37
+ //# sourceMappingURL=react-native-outbox-triggers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["addEventListener","addNetworkListener","AppState","isOnline","isConnected","isInternetReachable","netInfoConnectivity","subscribe","onOnline","wasOnline","state","online","appStateLifecycle","onForeground","subscription","remove"],"sourceRoot":"../../../../src","sources":["modules/next/react-native-outbox-triggers.ts"],"mappings":";;AAAA,SAASA,gBAAgB,IAAIC,kBAAkB,QAAQ,iCAAiC;AACxF,SAASC,QAAQ,QAAQ,cAAc;AAKvC;AACA,MAAMC,QAAQ,GAAGA,CAAC;EAAEC,WAAW;EAAEC;AAAkC,CAAC,KAClED,WAAW,KAAK,IAAI,IAAIC,mBAAmB,KAAK,KAAK;;AAEvD;AACA,MAAMC,mBAAuC,GAAG;EAC9CC,SAAS,EAAGC,QAAQ,IAAK;IACvB,IAAIC,SAAS,GAAG,IAAI;IAEpB,OAAOR,kBAAkB,CAAES,KAAK,IAAK;MACnC,MAAMC,MAAM,GAAGR,QAAQ,CAACO,KAAK,CAAC;MAE9B,IAAIC,MAAM,IAAI,CAACF,SAAS,EAAE;QACxBD,QAAQ,CAAC,CAAC;MACZ;MACAC,SAAS,GAAGE,MAAM;IACpB,CAAC,CAAC;EACJ;AACF,CAAC;;AAED;AACA,MAAMC,iBAAkC,GAAG;EACzCL,SAAS,EAAGM,YAAY,IAAK;IAC3B,MAAMC,YAAY,GAAGZ,QAAQ,CAACF,gBAAgB,CAAC,QAAQ,EAAGU,KAAK,IAAK;MAClE,IAAIA,KAAK,KAAK,QAAQ,EAAE;QACtBG,YAAY,CAAC,CAAC;MAChB;IACF,CAAC,CAAC;IAEF,OAAO,MAAMC,YAAY,CAACC,MAAM,CAAC,CAAC;EACpC;AACF,CAAC;AAED,SAASH,iBAAiB,EAAEN,mBAAmB","ignoreList":[]}
@@ -16,7 +16,7 @@ export declare class SyncProgressManager<TDataToSync extends AndroidHealthSyncPr
16
16
  setTotalObservations(measurementTypeKey: HealthSyncKey, total: number): void;
17
17
  incrementSyncedObservations(measurementTypeKey: HealthSyncKey, count: number, createdCount?: number): void;
18
18
  setStatus(measurementTypeKey: HealthSyncKey, status: SyncProgress["status"], reason?: SyncPauseReason): void;
19
- getStatus(measurementTypeKey: HealthSyncKey): "started" | "completed" | "failed" | "idle" | "syncing" | "paused";
19
+ getStatus(measurementTypeKey: HealthSyncKey): "failed" | "started" | "completed" | "idle" | "syncing" | "paused";
20
20
  resetAll(): void;
21
21
  private notifyProgress;
22
22
  }
@@ -0,0 +1,38 @@
1
+ import type { OutboxItem, OutboxItemSummary, OutboxState, OutboxStore } from "@ovok/core/next";
2
+ import { Logger } from "../core/ports";
3
+ import { SqliteDatabase } from "./sqlite-database";
4
+ /** How `SqliteDatabaseOutboxStore` opens its database. */
5
+ type SqliteDatabaseOutboxOptions = {
6
+ /** The database file name; `ovok-outbox.db` by default. */
7
+ name?: string;
8
+ /** Opens the named database, such as `expo-sqlite`'s `openDatabaseAsync`. */
9
+ open: (name: string) => Promise<SqliteDatabase>;
10
+ /** Where structured events go; silent by default. */
11
+ logger?: Logger;
12
+ };
13
+ /**
14
+ * An `OutboxStore` on a SQLite database it is given a way to open: one row per item in `outbox_items`, the entries as
15
+ * one JSON text column, so listing and counting never read them. The database opens on first use.
16
+ */
17
+ declare class SqliteDatabaseOutboxStore implements OutboxStore {
18
+ private readonly options;
19
+ private database;
20
+ constructor(options: SqliteDatabaseOutboxOptions);
21
+ /** Stores an item, replacing the one with the same id. */
22
+ put(item: OutboxItem): Promise<void>;
23
+ /** Returns an item, or `null` when there is none. */
24
+ get(id: string): Promise<OutboxItem | null>;
25
+ /** Deletes an item; an unknown id is not an error. */
26
+ remove(id: string): Promise<void>;
27
+ /** The owner's pending items that are due, newest recorded first, then by position in the recording. */
28
+ due(ownerKey: string, now: number, limit: number): Promise<OutboxItem[]>;
29
+ /** Every item of the owner in any state, newest recorded first, without its entries. */
30
+ summaries(ownerKey: string): Promise<OutboxItemSummary[]>;
31
+ /** How many of the owner's items are in `state`. */
32
+ count(ownerKey: string, state: OutboxState): Promise<number>;
33
+ private open;
34
+ private connect;
35
+ }
36
+ export { SqliteDatabaseOutboxStore };
37
+ export type { SqliteDatabaseOutboxOptions };
38
+ //# sourceMappingURL=sqlite-database-outbox-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sqlite-database-outbox-store.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/adapters/sqlite-database-outbox-store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE/F,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAanD,0DAA0D;AAC1D,KAAK,2BAA2B,GAAG;IAEjC,2DAA2D;IAC3D,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,6EAA6E;IAC7E,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;IAEhD,qDAAqD;IACrD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAiBF;;;GAGG;AACH,cAAM,yBAA0B,YAAW,WAAW;IAGjC,OAAO,CAAC,QAAQ,CAAC,OAAO;IAF3C,OAAO,CAAC,QAAQ,CAAwC;gBAEpB,OAAO,EAAE,2BAA2B;IAExE,0DAA0D;IAC7C,GAAG,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAIjD,qDAAqD;IACxC,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;IAMxD,sDAAsD;IACzC,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI9C,wGAAwG;IAC3F,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAMrF,wFAAwF;IAC3E,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAMtE,oDAAoD;IACvC,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC;IAMzE,OAAO,CAAC,IAAI;YASE,OAAO;CAOtB;AAED,OAAO,EAAE,yBAAyB,EAAE,CAAC;AACrC,YAAY,EAAE,2BAA2B,EAAE,CAAC"}
@@ -5,19 +5,21 @@ interface SqliteTransaction {
5
5
  /** Runs statements that take no parameters. */
6
6
  execAsync(source: string): Promise<void>;
7
7
  /** Runs one statement that writes. */
8
- runAsync(source: string, params?: SqliteBindValue[]): Promise<unknown>;
8
+ runAsync(source: string, params: SqliteBindValue[]): Promise<unknown>;
9
9
  /** Returns the first row a query finds, or `null`. */
10
- getFirstAsync<Row>(source: string, params?: SqliteBindValue[]): Promise<Row | null>;
10
+ getFirstAsync<Row>(source: string, params: SqliteBindValue[]): Promise<Row | null>;
11
11
  }
12
12
  /** The part of an `expo-sqlite` database the outbox store uses. */
13
13
  interface SqliteDatabase extends SqliteTransaction {
14
14
  /** Returns every row a query finds. */
15
- getAllAsync<Row>(source: string, params?: SqliteBindValue[]): Promise<Row[]>;
15
+ getAllAsync<Row>(source: string, params: SqliteBindValue[]): Promise<Row[]>;
16
16
  /** Runs `task` in one exclusive transaction: it commits when `task` resolves and rolls back when it throws. */
17
17
  withExclusiveTransactionAsync(task: (transaction: SqliteTransaction) => Promise<void>): Promise<void>;
18
18
  }
19
- /** Opens the named database with `expo-sqlite`, which an app without the package never loads. */
20
- declare const openExpoSqlite: (name: string) => Promise<SqliteDatabase>;
21
- export { openExpoSqlite };
22
- export type { SqliteBindValue, SqliteDatabase, SqliteTransaction };
19
+ /** The `expo-sqlite` module, or anything that opens a database the same way. */
20
+ interface OvokSqlite {
21
+ /** Opens the named database, creating it when it does not exist. */
22
+ openDatabaseAsync(name: string): Promise<SqliteDatabase>;
23
+ }
24
+ export type { OvokSqlite, SqliteBindValue, SqliteDatabase, SqliteTransaction };
23
25
  //# sourceMappingURL=sqlite-database.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sqlite-database.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/adapters/sqlite-database.ts"],"names":[],"mappings":"AAAA,iDAAiD;AACjD,KAAK,eAAe,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;AAE9C,sEAAsE;AACtE,UAAU,iBAAiB;IAEzB,+CAA+C;IAC/C,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEzC,sCAAsC;IACtC,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEvE,sDAAsD;IACtD,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC;CACrF;AAED,mEAAmE;AACnE,UAAU,cAAe,SAAQ,iBAAiB;IAEhD,uCAAuC;IACvC,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC,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G,OAAO,CAAC,IAAI,CAAC,CAAC;CACvG;AAED,gFAAgF;AAChF,UAAU,UAAU;IAElB,oEAAoE;IACpE,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;CAC1D;AAED,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,cAAc,EAAE,iBAAiB,EAAE,CAAC"}
@@ -1,37 +1,9 @@
1
- import type { OutboxItem, OutboxItemSummary, OutboxState, OutboxStore } from "@ovok/core/next";
2
- import { Logger } from "../core/ports";
3
- import { SqliteDatabase } from "./sqlite-database";
4
- /** How `SqliteOutboxStore` finds its database; every field has a default for a phone app. */
5
- type SqliteOutboxOptions = {
6
- /** The database file name; `ovok-outbox.db` by default. */
7
- name?: string;
8
- /** Opens the named database; `expo-sqlite`'s `openDatabaseAsync` by default, swapped in tests. */
9
- open?: (name: string) => Promise<SqliteDatabase>;
10
- /** Where structured events go; silent by default. */
11
- logger?: Logger;
12
- };
13
- /**
14
- * An `OutboxStore` on `expo-sqlite`, for phones: one row per item in `outbox_items`, the entries as one JSON text
15
- * column, so listing and counting never read them. `expo-sqlite` is an optional peer dependency, loaded on first use.
16
- */
17
- declare class SqliteOutboxStore implements OutboxStore {
18
- private readonly options;
19
- private database;
1
+ import { SqliteDatabaseOutboxOptions, SqliteDatabaseOutboxStore } from "./sqlite-database-outbox-store";
2
+ /** Every field has a default for a phone app; `open` defaults to `expo-sqlite`'s `openDatabaseAsync`. */
3
+ type SqliteOutboxOptions = Partial<SqliteDatabaseOutboxOptions>;
4
+ /** The outbox store on `expo-sqlite`, for phones; `expo-sqlite` is an optional peer dependency, loaded on first use. */
5
+ declare class SqliteOutboxStore extends SqliteDatabaseOutboxStore {
20
6
  constructor(options?: SqliteOutboxOptions);
21
- /** Stores an item, replacing the one with the same id. */
22
- put(item: OutboxItem): Promise<void>;
23
- /** Returns an item, or `null` when there is none. */
24
- get(id: string): Promise<OutboxItem | null>;
25
- /** Deletes an item; an unknown id is not an error. */
26
- remove(id: string): Promise<void>;
27
- /** The owner's pending items that are due, newest recorded first, then by position in the recording. */
28
- due(ownerKey: string, now: number, limit: number): Promise<OutboxItem[]>;
29
- /** Every item of the owner in any state, newest recorded first, without its entries. */
30
- summaries(ownerKey: string): Promise<OutboxItemSummary[]>;
31
- /** How many of the owner's items are in `state`. */
32
- count(ownerKey: string, state: OutboxState): Promise<number>;
33
- private open;
34
- private connect;
35
7
  }
36
8
  export { SqliteOutboxStore };
37
9
  export type { SqliteOutboxOptions };
@@ -1 +1 @@
1
- {"version":3,"file":"sqlite-outbox-store.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/adapters/sqlite-outbox-store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE/F,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAkB,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAanE,6FAA6F;AAC7F,KAAK,mBAAmB,GAAG;IAEzB,2DAA2D;IAC3D,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,kGAAkG;IAClG,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;IAEjD,qDAAqD;IACrD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAiBF;;;GAGG;AACH,cAAM,iBAAkB,YAAW,WAAW;IAGzB,OAAO,CAAC,QAAQ,CAAC,OAAO;IAF3C,OAAO,CAAC,QAAQ,CAAwC;gBAEpB,OAAO,GAAE,mBAAwB;IAErE,0DAA0D;IAC7C,GAAG,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAIjD,qDAAqD;IACxC,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;IAMxD,sDAAsD;IACzC,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI9C,wGAAwG;IAC3F,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAMrF,wFAAwF;IAC3E,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAMtE,oDAAoD;IACvC,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC;IAMzE,OAAO,CAAC,IAAI;YASE,OAAO;CAQtB;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAC7B,YAAY,EAAE,mBAAmB,EAAE,CAAC"}
1
+ {"version":3,"file":"sqlite-outbox-store.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/adapters/sqlite-outbox-store.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,2BAA2B,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAGxG,yGAAyG;AACzG,KAAK,mBAAmB,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAC;AAahE,wHAAwH;AACxH,cAAM,iBAAkB,SAAQ,yBAAyB;gBACpC,OAAO,GAAE,mBAAwB;CAGrD;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAC7B,YAAY,EAAE,mBAAmB,EAAE,CAAC"}
@@ -120,7 +120,7 @@ declare const storedFields: (record: PairedDevice, model: DeviceModel) => {
120
120
  name: string;
121
121
  lastConnectedAt: Date | null;
122
122
  lastSyncedAt: Date | null;
123
- lastSyncOutcome: "failed" | "success" | null;
123
+ lastSyncOutcome: "success" | "failed" | null;
124
124
  lastReadingAt: Date | null;
125
125
  battery: Battery | null;
126
126
  identity: DeviceIdentity | null;
@@ -1,10 +1,12 @@
1
1
  /**
2
- * The outbox store on `expo-sqlite` for phones. Import from `@ovok/native/next/bluetooth/sqlite`.
3
- * It has its own subpath so apps without `expo-sqlite`, and browser bundles, never load it.
2
+ * The outbox store on `expo-sqlite`, for an app that builds its own instead of passing `sqlite` to the `Ovok` client.
3
+ * Import from `@ovok/native/next/bluetooth/sqlite`. It has its own subpath so apps without `expo-sqlite`, and browser
4
+ * bundles, never load it.
4
5
  *
5
6
  * @module next/bluetooth/sqlite
6
7
  */
7
8
  export { SqliteOutboxStore } from "../adapters/sqlite-outbox-store";
8
- export type { SqliteBindValue, SqliteDatabase, SqliteTransaction } from "../adapters/sqlite-database";
9
+ export type { OvokSqlite, SqliteBindValue, SqliteDatabase, SqliteTransaction } from "../adapters/sqlite-database";
10
+ export type { SqliteDatabaseOutboxOptions } from "../adapters/sqlite-database-outbox-store";
9
11
  export type { SqliteOutboxOptions } from "../adapters/sqlite-outbox-store";
10
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/sqlite/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACtG,YAAY,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/sqlite/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAClH,YAAY,EAAE,2BAA2B,EAAE,MAAM,0CAA0C,CAAC;AAC5F,YAAY,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * The native `Ovok` client built on `@ovok/core/next`, with secure-store token storage.
2
+ * The native `Ovok` client built on `@ovok/core/next`, with secure-store token storage and a SQLite outbox.
3
3
  *
4
4
  * Import from `@ovok/native/next`.
5
5
  *
@@ -7,6 +7,7 @@
7
7
  */
8
8
  export * from "@ovok/core/next";
9
9
  export { Ovok } from "./ovok";
10
+ export type { OvokSqlite } from "./bluetooth/adapters/sqlite-database";
10
11
  export type { OvokNativeConfig } from "./ovok";
11
12
  export type { RandomValuesSource } from "./random-values";
12
13
  export { SecureStoreStorage } from "./secure-store-storage";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/next/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,YAAY,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAC/C,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,YAAY,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/next/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,YAAY,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AACvE,YAAY,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAC/C,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,YAAY,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC"}
@@ -1,20 +1,28 @@
1
1
  import { Ovok as CoreOvok } from "@ovok/core/next";
2
+ import type { OvokSqlite } from "./bluetooth/adapters/sqlite-database";
2
3
  import type { RandomValuesSource } from "./random-values";
3
4
  import type { OvokSecureStore } from "./secure-store-storage";
4
- import type { OvokConfig, OvokStorage } from "@ovok/core/next";
5
+ import type { OutboxStore, OvokConfig, OvokStorage } from "@ovok/core/next";
5
6
  type UserClientConfig = Extract<OvokConfig, {
6
7
  clientSecret?: undefined;
7
8
  }>;
8
9
  /** No clientSecret: anything shipped inside an app can be extracted from it. */
9
- type OvokNativeConfig = Omit<UserClientConfig, "storage" | "clientSecret"> & {
10
+ type OvokNativeConfig = Omit<UserClientConfig, "storage" | "clientSecret" | "outboxStore"> & {
10
11
  /** The expo-secure-store module (or a compatible store) that holds the session. */
11
12
  secureStore: OvokSecureStore;
12
13
  /** Options passed to every secure store call, such as keychain accessibility. */
13
14
  secureStoreOptions?: Record<string, unknown>;
15
+ /** The expo-sqlite module (or a compatible one) for unsent measurements; required without `outboxStore`. */
16
+ sqlite?: OvokSqlite;
17
+ /** Where unsent measurements wait, instead of the SQLite database `sqlite` opens. */
18
+ outboxStore?: OutboxStore;
14
19
  /** Fills a byte array with random values; used when the runtime has no `crypto.getRandomValues`. */
15
20
  getRandomValues?: RandomValuesSource;
16
21
  };
17
- /** The @ovok/core/next client with the session kept in the device's secure store. */
22
+ /**
23
+ * The @ovok/core/next client with the session kept in the device's secure store and unsent measurements in SQLite,
24
+ * sent when the network returns and when the app comes to the foreground.
25
+ */
18
26
  declare class Ovok extends CoreOvok {
19
27
  /** Base URL of the Ovok API, with a trailing slash. */
20
28
  readonly baseUrl: string;
@@ -1 +1 @@
1
- {"version":3,"file":"ovok.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/next/ovok.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEnD,OAAO,KAAK,EAAE,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AAK,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAO5E,KAAK,gBAAgB,GAAG,OAAO,CAAC,UAAU,EAAE;IAAE,YAAY,CAAC,EAAE,SAAS,CAAA;CAAE,CAAC,CAAC;AAE1E,gFAAgF;AAChF,KAAK,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,EAAE,SAAS,GAAG,cAAc,GAAG,aAAa,CAAC,GAAG;IAE3F,mFAAmF;IACnF,WAAW,EAAE,eAAe,CAAC;IAE7B,iFAAiF;IACjF,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAE7C,4GAA4G;IAC5G,MAAM,CAAC,EAAE,UAAU,CAAC;IAEpB,qFAAqF;IACrF,WAAW,CAAC,EAAE,WAAW,CAAC;IAE1B,oGAAoG;IACpG,eAAe,CAAC,EAAE,kBAAkB,CAAC;CACtC,CAAC;AAcF;;;GAGG;AACH,cAAM,IAAK,SAAQ,QAAQ;IACzB,uDAAuD;IACvD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB,kDAAkD;IAClD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAE5B,2CAA2C;IAC3C,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;gBAElB,MAAM,EAAE,gBAAgB;CAiBrC;AAED,OAAO,EAAE,IAAI,EAAE,CAAC;AAChB,YAAY,EAAE,gBAAgB,EAAE,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { OutboxConnectivity, OutboxLifecycle } from "@ovok/core/next";
2
+ /** The device's connection through NetInfo: the outbox hears each time it comes back after going offline. */
3
+ declare const netInfoConnectivity: OutboxConnectivity;
4
+ /** The app's foreground through React Native's `AppState`. */
5
+ declare const appStateLifecycle: OutboxLifecycle;
6
+ export { appStateLifecycle, netInfoConnectivity };
7
+ //# sourceMappingURL=react-native-outbox-triggers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react-native-outbox-triggers.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/next/react-native-outbox-triggers.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAO3E,6GAA6G;AAC7G,QAAA,MAAM,mBAAmB,EAAE,kBAa1B,CAAC;AAEF,8DAA8D;AAC9D,QAAA,MAAM,iBAAiB,EAAE,eAUxB,CAAC;AAEF,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,CAAC"}
@@ -182,7 +182,7 @@ export declare const useAppTheme: () => {
182
182
  spacingScale: Record<string, number> | undefined;
183
183
  borderRadiusScale: Record<string, number> | undefined;
184
184
  dark: boolean;
185
- mode?: "adaptive" | "exact";
185
+ mode?: "exact" | "adaptive";
186
186
  animation: {
187
187
  scale: number;
188
188
  defaultAnimationDuration?: number;
@@ -187,7 +187,7 @@ export declare const generateTheme: (theme: ThemeProviderProps["theme"]) => {
187
187
  borderRadiusScale: Record<string, number> | undefined;
188
188
  /** Whether the dark variant is used. */
189
189
  dark: boolean;
190
- mode?: "adaptive" | "exact";
190
+ mode?: "exact" | "adaptive";
191
191
  animation: {
192
192
  scale: number;
193
193
  defaultAnimationDuration?: number;
@@ -16,7 +16,7 @@ export declare class SyncProgressManager<TDataToSync extends AndroidHealthSyncPr
16
16
  setTotalObservations(measurementTypeKey: HealthSyncKey, total: number): void;
17
17
  incrementSyncedObservations(measurementTypeKey: HealthSyncKey, count: number, createdCount?: number): void;
18
18
  setStatus(measurementTypeKey: HealthSyncKey, status: SyncProgress["status"], reason?: SyncPauseReason): void;
19
- getStatus(measurementTypeKey: HealthSyncKey): "started" | "completed" | "failed" | "idle" | "syncing" | "paused";
19
+ getStatus(measurementTypeKey: HealthSyncKey): "failed" | "started" | "completed" | "idle" | "syncing" | "paused";
20
20
  resetAll(): void;
21
21
  private notifyProgress;
22
22
  }
@@ -0,0 +1,38 @@
1
+ import type { OutboxItem, OutboxItemSummary, OutboxState, OutboxStore } from "@ovok/core/next";
2
+ import { Logger } from "../core/ports";
3
+ import { SqliteDatabase } from "./sqlite-database";
4
+ /** How `SqliteDatabaseOutboxStore` opens its database. */
5
+ type SqliteDatabaseOutboxOptions = {
6
+ /** The database file name; `ovok-outbox.db` by default. */
7
+ name?: string;
8
+ /** Opens the named database, such as `expo-sqlite`'s `openDatabaseAsync`. */
9
+ open: (name: string) => Promise<SqliteDatabase>;
10
+ /** Where structured events go; silent by default. */
11
+ logger?: Logger;
12
+ };
13
+ /**
14
+ * An `OutboxStore` on a SQLite database it is given a way to open: one row per item in `outbox_items`, the entries as
15
+ * one JSON text column, so listing and counting never read them. The database opens on first use.
16
+ */
17
+ declare class SqliteDatabaseOutboxStore implements OutboxStore {
18
+ private readonly options;
19
+ private database;
20
+ constructor(options: SqliteDatabaseOutboxOptions);
21
+ /** Stores an item, replacing the one with the same id. */
22
+ put(item: OutboxItem): Promise<void>;
23
+ /** Returns an item, or `null` when there is none. */
24
+ get(id: string): Promise<OutboxItem | null>;
25
+ /** Deletes an item; an unknown id is not an error. */
26
+ remove(id: string): Promise<void>;
27
+ /** The owner's pending items that are due, newest recorded first, then by position in the recording. */
28
+ due(ownerKey: string, now: number, limit: number): Promise<OutboxItem[]>;
29
+ /** Every item of the owner in any state, newest recorded first, without its entries. */
30
+ summaries(ownerKey: string): Promise<OutboxItemSummary[]>;
31
+ /** How many of the owner's items are in `state`. */
32
+ count(ownerKey: string, state: OutboxState): Promise<number>;
33
+ private open;
34
+ private connect;
35
+ }
36
+ export { SqliteDatabaseOutboxStore };
37
+ export type { SqliteDatabaseOutboxOptions };
38
+ //# sourceMappingURL=sqlite-database-outbox-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sqlite-database-outbox-store.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/adapters/sqlite-database-outbox-store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE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AY,EAAE,2BAA2B,EAAE,CAAC"}
@@ -5,19 +5,21 @@ interface SqliteTransaction {
5
5
  /** Runs statements that take no parameters. */
6
6
  execAsync(source: string): Promise<void>;
7
7
  /** Runs one statement that writes. */
8
- runAsync(source: string, params?: SqliteBindValue[]): Promise<unknown>;
8
+ runAsync(source: string, params: SqliteBindValue[]): Promise<unknown>;
9
9
  /** Returns the first row a query finds, or `null`. */
10
- getFirstAsync<Row>(source: string, params?: SqliteBindValue[]): Promise<Row | null>;
10
+ getFirstAsync<Row>(source: string, params: SqliteBindValue[]): Promise<Row | null>;
11
11
  }
12
12
  /** The part of an `expo-sqlite` database the outbox store uses. */
13
13
  interface SqliteDatabase extends SqliteTransaction {
14
14
  /** Returns every row a query finds. */
15
- getAllAsync<Row>(source: string, params?: SqliteBindValue[]): Promise<Row[]>;
15
+ getAllAsync<Row>(source: string, params: SqliteBindValue[]): Promise<Row[]>;
16
16
  /** Runs `task` in one exclusive transaction: it commits when `task` resolves and rolls back when it throws. */
17
17
  withExclusiveTransactionAsync(task: (transaction: SqliteTransaction) => Promise<void>): Promise<void>;
18
18
  }
19
- /** Opens the named database with `expo-sqlite`, which an app without the package never loads. */
20
- declare const openExpoSqlite: (name: string) => Promise<SqliteDatabase>;
21
- export { openExpoSqlite };
22
- export type { SqliteBindValue, SqliteDatabase, SqliteTransaction };
19
+ /** The `expo-sqlite` module, or anything that opens a database the same way. */
20
+ interface OvokSqlite {
21
+ /** Opens the named database, creating it when it does not exist. */
22
+ openDatabaseAsync(name: string): Promise<SqliteDatabase>;
23
+ }
24
+ export type { OvokSqlite, SqliteBindValue, SqliteDatabase, SqliteTransaction };
23
25
  //# sourceMappingURL=sqlite-database.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sqlite-database.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/adapters/sqlite-database.ts"],"names":[],"mappings":"AAAA,iDAAiD;AACjD,KAAK,eAAe,GAAG,MAAM,GAAG,MAAM,GA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,CAAC,IAAI,CAAC,CAAC;IAEzC,sCAAsC;IACtC,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEtE,sDAAsD;IACtD,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC;CACpF;AAED,mEAAmE;AACnE,UAAU,cAAe,SAAQ,iBAAiB;IAEhD,uCAAuC;IACvC,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IAE5E,+GAA+G;IAC/G,6BAA6B,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,iBAAiB,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACvG;AAED,gFAAgF;AAChF,UAAU,UAAU;IAElB,oEAAoE;IACpE,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;CAC1D;AAED,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,cAAc,EAAE,iBAAiB,EAAE,CAAC"}
@@ -1,37 +1,9 @@
1
- import type { OutboxItem, OutboxItemSummary, OutboxState, OutboxStore } from "@ovok/core/next";
2
- import { Logger } from "../core/ports";
3
- import { SqliteDatabase } from "./sqlite-database";
4
- /** How `SqliteOutboxStore` finds its database; every field has a default for a phone app. */
5
- type SqliteOutboxOptions = {
6
- /** The database file name; `ovok-outbox.db` by default. */
7
- name?: string;
8
- /** Opens the named database; `expo-sqlite`'s `openDatabaseAsync` by default, swapped in tests. */
9
- open?: (name: string) => Promise<SqliteDatabase>;
10
- /** Where structured events go; silent by default. */
11
- logger?: Logger;
12
- };
13
- /**
14
- * An `OutboxStore` on `expo-sqlite`, for phones: one row per item in `outbox_items`, the entries as one JSON text
15
- * column, so listing and counting never read them. `expo-sqlite` is an optional peer dependency, loaded on first use.
16
- */
17
- declare class SqliteOutboxStore implements OutboxStore {
18
- private readonly options;
19
- private database;
1
+ import { SqliteDatabaseOutboxOptions, SqliteDatabaseOutboxStore } from "./sqlite-database-outbox-store";
2
+ /** Every field has a default for a phone app; `open` defaults to `expo-sqlite`'s `openDatabaseAsync`. */
3
+ type SqliteOutboxOptions = Partial<SqliteDatabaseOutboxOptions>;
4
+ /** The outbox store on `expo-sqlite`, for phones; `expo-sqlite` is an optional peer dependency, loaded on first use. */
5
+ declare class SqliteOutboxStore extends SqliteDatabaseOutboxStore {
20
6
  constructor(options?: SqliteOutboxOptions);
21
- /** Stores an item, replacing the one with the same id. */
22
- put(item: OutboxItem): Promise<void>;
23
- /** Returns an item, or `null` when there is none. */
24
- get(id: string): Promise<OutboxItem | null>;
25
- /** Deletes an item; an unknown id is not an error. */
26
- remove(id: string): Promise<void>;
27
- /** The owner's pending items that are due, newest recorded first, then by position in the recording. */
28
- due(ownerKey: string, now: number, limit: number): Promise<OutboxItem[]>;
29
- /** Every item of the owner in any state, newest recorded first, without its entries. */
30
- summaries(ownerKey: string): Promise<OutboxItemSummary[]>;
31
- /** How many of the owner's items are in `state`. */
32
- count(ownerKey: string, state: OutboxState): Promise<number>;
33
- private open;
34
- private connect;
35
7
  }
36
8
  export { SqliteOutboxStore };
37
9
  export type { SqliteOutboxOptions };
@@ -1 +1 @@
1
- {"version":3,"file":"sqlite-outbox-store.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/adapters/sqlite-outbox-store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE/F,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAkB,cAAc,EAAE,MAAM,mBAAmB,CAAC;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appings":"AAEA,OAAO,EAAE,2BAA2B,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAGxG,yGAAyG;AACzG,KAAK,mBAAmB,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAC;AAahE,wHAAwH;AACxH,cAAM,iBAAkB,SAAQ,yBAAyB;gBACpC,OAAO,GAAE,mBAAwB;CAGrD;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAC7B,YAAY,EAAE,mBAAmB,EAAE,CAAC"}
@@ -120,7 +120,7 @@ declare const storedFields: (record: PairedDevice, model: DeviceModel) => {
120
120
  name: string;
121
121
  lastConnectedAt: Date | null;
122
122
  lastSyncedAt: Date | null;
123
- lastSyncOutcome: "failed" | "success" | null;
123
+ lastSyncOutcome: "success" | "failed" | null;
124
124
  lastReadingAt: Date | null;
125
125
  battery: Battery | null;
126
126
  identity: DeviceIdentity | null;
@@ -1,10 +1,12 @@
1
1
  /**
2
- * The outbox store on `expo-sqlite` for phones. Import from `@ovok/native/next/bluetooth/sqlite`.
3
- * It has its own subpath so apps without `expo-sqlite`, and browser bundles, never load it.
2
+ * The outbox store on `expo-sqlite`, for an app that builds its own instead of passing `sqlite` to the `Ovok` client.
3
+ * Import from `@ovok/native/next/bluetooth/sqlite`. It has its own subpath so apps without `expo-sqlite`, and browser
4
+ * bundles, never load it.
4
5
  *
5
6
  * @module next/bluetooth/sqlite
6
7
  */
7
8
  export { SqliteOutboxStore } from "../adapters/sqlite-outbox-store";
8
- export type { SqliteBindValue, SqliteDatabase, SqliteTransaction } from "../adapters/sqlite-database";
9
+ export type { OvokSqlite, SqliteBindValue, SqliteDatabase, SqliteTransaction } from "../adapters/sqlite-database";
10
+ export type { SqliteDatabaseOutboxOptions } from "../adapters/sqlite-database-outbox-store";
9
11
  export type { SqliteOutboxOptions } from "../adapters/sqlite-outbox-store";
10
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/sqlite/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACtG,YAAY,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/next/bluetooth/sqlite/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAClH,YAAY,EAAE,2BAA2B,EAAE,MAAM,0CAA0C,CAAC;AAC5F,YAAY,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * The native `Ovok` client built on `@ovok/core/next`, with secure-store token storage.
2
+ * The native `Ovok` client built on `@ovok/core/next`, with secure-store token storage and a SQLite outbox.
3
3
  *
4
4
  * Import from `@ovok/native/next`.
5
5
  *
@@ -7,6 +7,7 @@
7
7
  */
8
8
  export * from "@ovok/core/next";
9
9
  export { Ovok } from "./ovok";
10
+ export type { OvokSqlite } from "./bluetooth/adapters/sqlite-database";
10
11
  export type { OvokNativeConfig } from "./ovok";
11
12
  export type { RandomValuesSource } from "./random-values";
12
13
  export { SecureStoreStorage } from "./secure-store-storage";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/next/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,YAAY,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAC/C,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,YAAY,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/next/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,YAAY,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AACvE,YAAY,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAC/C,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,YAAY,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC"}