@ovok/native 1.17.0-dev.2258 → 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,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,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EAAE,UAAU,EA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AAY,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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ovok/native",
3
- "version": "1.17.0-dev.2258+acab8dd",
3
+ "version": "1.17.0-dev.2260+cb7a335",
4
4
  "description": "React native component sdk for OVOK",
5
5
  "source": "./src/index.tsx",
6
6
  "main": "./lib/commonjs/index.js",