@webority-technologies/mobile-core 0.0.6 → 0.0.8
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.
- package/android/build.gradle +65 -0
- package/android/src/newarch/java/com/webority/mobilecore/smsretriever/AppSignatureHelper.kt +57 -0
- package/android/src/newarch/java/com/webority/mobilecore/smsretriever/SmsRetrieverModule.kt +20 -0
- package/android/src/newarch/java/com/webority/mobilecore/smsretriever/SmsRetrieverModuleImpl.kt +146 -0
- package/android/src/newarch/java/com/webority/mobilecore/smsretriever/SmsRetrieverPackage.kt +33 -0
- package/lib/commonjs/formatters/dateMath.js +4 -4
- package/lib/commonjs/formatters/windowsToIanaTable.js +164 -0
- package/lib/commonjs/geolocation/index.js +9 -1
- package/lib/commonjs/permissions/calendar.js +14 -0
- package/lib/commonjs/permissions/camera.js +14 -0
- package/lib/commonjs/permissions/contacts.js +10 -0
- package/lib/commonjs/permissions/index.js +60 -150
- package/lib/commonjs/permissions/location.js +14 -0
- package/lib/commonjs/permissions/mediaLibrary.js +10 -0
- package/lib/commonjs/permissions/notifications.js +10 -0
- package/lib/commonjs/permissions/photos.js +14 -0
- package/lib/commonjs/smsRetriever/index.js +91 -0
- package/lib/commonjs/specs/NativeSmsRetriever.js +15 -0
- package/lib/commonjs/sqlite/index.js +12 -30
- package/lib/module/formatters/dateMath.js +4 -4
- package/lib/module/formatters/windowsToIanaTable.js +160 -0
- package/lib/module/geolocation/index.js +8 -1
- package/lib/module/index.js +3 -2
- package/lib/module/permissions/calendar.js +15 -0
- package/lib/module/permissions/camera.js +15 -0
- package/lib/module/permissions/contacts.js +11 -0
- package/lib/module/permissions/index.js +59 -150
- package/lib/module/permissions/location.js +15 -0
- package/lib/module/permissions/mediaLibrary.js +11 -0
- package/lib/module/permissions/notifications.js +11 -0
- package/lib/module/permissions/photos.js +15 -0
- package/lib/module/smsRetriever/index.js +86 -0
- package/lib/module/specs/NativeSmsRetriever.js +13 -0
- package/lib/module/sqlite/index.js +12 -30
- package/lib/typescript/commonjs/formatters/windowsToIanaTable.d.ts +18 -0
- package/lib/typescript/commonjs/geolocation/index.d.ts +1 -0
- package/lib/typescript/commonjs/index.d.ts +3 -2
- package/lib/typescript/commonjs/permissions/calendar.d.ts +2 -0
- package/lib/typescript/commonjs/permissions/camera.d.ts +2 -0
- package/lib/typescript/commonjs/permissions/contacts.d.ts +2 -0
- package/lib/typescript/commonjs/permissions/index.d.ts +29 -36
- package/lib/typescript/commonjs/permissions/location.d.ts +2 -0
- package/lib/typescript/commonjs/permissions/mediaLibrary.d.ts +2 -0
- package/lib/typescript/commonjs/permissions/notifications.d.ts +2 -0
- package/lib/typescript/commonjs/permissions/photos.d.ts +2 -0
- package/lib/typescript/commonjs/smsRetriever/index.d.ts +30 -0
- package/lib/typescript/commonjs/specs/NativeSmsRetriever.d.ts +15 -0
- package/lib/typescript/commonjs/sqlite/index.d.ts +10 -18
- package/lib/typescript/module/formatters/windowsToIanaTable.d.ts +18 -0
- package/lib/typescript/module/geolocation/index.d.ts +1 -0
- package/lib/typescript/module/index.d.ts +3 -2
- package/lib/typescript/module/permissions/calendar.d.ts +2 -0
- package/lib/typescript/module/permissions/camera.d.ts +2 -0
- package/lib/typescript/module/permissions/contacts.d.ts +2 -0
- package/lib/typescript/module/permissions/index.d.ts +29 -36
- package/lib/typescript/module/permissions/location.d.ts +2 -0
- package/lib/typescript/module/permissions/mediaLibrary.d.ts +2 -0
- package/lib/typescript/module/permissions/notifications.d.ts +2 -0
- package/lib/typescript/module/permissions/photos.d.ts +2 -0
- package/lib/typescript/module/smsRetriever/index.d.ts +30 -0
- package/lib/typescript/module/specs/NativeSmsRetriever.d.ts +15 -0
- package/lib/typescript/module/sqlite/index.d.ts +10 -18
- package/package.json +101 -49
- package/lib/commonjs/sqlite/adapters/op.js +0 -43
- package/lib/commonjs/sqlite/adapters/rows.js +0 -33
- package/lib/commonjs/sqlite/adapters/storage.js +0 -50
- package/lib/commonjs/sqlite/adapters/sync.js +0 -45
- package/lib/commonjs/sqlite/nitro.js +0 -17
- package/lib/commonjs/sqlite/op.js +0 -18
- package/lib/commonjs/sqlite/quick.js +0 -14
- package/lib/commonjs/sqlite/storage.js +0 -14
- package/lib/module/sqlite/adapters/op.js +0 -38
- package/lib/module/sqlite/adapters/rows.js +0 -28
- package/lib/module/sqlite/adapters/storage.js +0 -46
- package/lib/module/sqlite/adapters/sync.js +0 -41
- package/lib/module/sqlite/nitro.js +0 -12
- package/lib/module/sqlite/op.js +0 -13
- package/lib/module/sqlite/quick.js +0 -9
- package/lib/module/sqlite/storage.js +0 -9
- package/lib/typescript/commonjs/sqlite/adapters/op.d.ts +0 -27
- package/lib/typescript/commonjs/sqlite/adapters/rows.d.ts +0 -7
- package/lib/typescript/commonjs/sqlite/adapters/storage.d.ts +0 -30
- package/lib/typescript/commonjs/sqlite/adapters/sync.d.ts +0 -31
- package/lib/typescript/commonjs/sqlite/nitro.d.ts +0 -7
- package/lib/typescript/commonjs/sqlite/op.d.ts +0 -8
- package/lib/typescript/commonjs/sqlite/quick.d.ts +0 -4
- package/lib/typescript/commonjs/sqlite/storage.d.ts +0 -4
- package/lib/typescript/module/sqlite/adapters/op.d.ts +0 -27
- package/lib/typescript/module/sqlite/adapters/rows.d.ts +0 -7
- package/lib/typescript/module/sqlite/adapters/storage.d.ts +0 -30
- package/lib/typescript/module/sqlite/adapters/sync.d.ts +0 -31
- package/lib/typescript/module/sqlite/nitro.d.ts +0 -7
- package/lib/typescript/module/sqlite/op.d.ts +0 -8
- package/lib/typescript/module/sqlite/quick.d.ts +0 -4
- package/lib/typescript/module/sqlite/storage.d.ts +0 -4
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { adaptSyncSqlite } from "./adapters/sync.js";
|
|
4
|
-
/** The one place `react-native-quick-sqlite` is named. */
|
|
5
|
-
export const quickSqliteDriver = () => {
|
|
6
|
-
const mod = require('react-native-quick-sqlite');
|
|
7
|
-
return adaptSyncSqlite(mod.default ?? mod);
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=quick.js.map
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { adaptSqliteStorage } from "./adapters/storage.js";
|
|
4
|
-
/** The one place `react-native-sqlite-storage` is named. */
|
|
5
|
-
export const sqliteStorageDriver = () => {
|
|
6
|
-
const mod = require('react-native-sqlite-storage');
|
|
7
|
-
return adaptSqliteStorage(mod.default ?? mod);
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=storage.js.map
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { SqliteDriver } from '../index';
|
|
2
|
-
/**
|
|
3
|
-
* @op-engineering/op-sqlite. Shape verified against 18.1.4 rather than assumed:
|
|
4
|
-
* `open({ name, location })` is synchronous and returns a DB whose `execute` is
|
|
5
|
-
* ASYNC, and whose `rows` is already a plain array of objects rather than the
|
|
6
|
-
* `{ _array, item() }` shape the older drivers use. Both differences are why it
|
|
7
|
-
* cannot share the sync adapter.
|
|
8
|
-
*
|
|
9
|
-
* The REQUIRE lives in the driver entry point beside this file, never here.
|
|
10
|
-
*/
|
|
11
|
-
export interface OpSqliteQueryResult {
|
|
12
|
-
rows?: Record<string, unknown>[];
|
|
13
|
-
rowsAffected?: number;
|
|
14
|
-
insertId?: number;
|
|
15
|
-
}
|
|
16
|
-
export interface OpSqliteModuleLike {
|
|
17
|
-
open: (options: {
|
|
18
|
-
name: string;
|
|
19
|
-
location?: string;
|
|
20
|
-
}) => {
|
|
21
|
-
execute: (sql: string, params?: unknown[]) => Promise<OpSqliteQueryResult>;
|
|
22
|
-
close: () => void;
|
|
23
|
-
closeAsync?: () => Promise<void>;
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
export declare const adaptOpSqlite: (mod: OpSqliteModuleLike) => SqliteDriver;
|
|
27
|
-
//# sourceMappingURL=op.d.ts.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Row shapes differ per driver: a plain array, `{ _array, length, item() }`, or
|
|
3
|
-
* `{ length, item() }` alone. Every adapter normalises to a plain array here so
|
|
4
|
-
* nothing driver-specific escapes into the Db layer.
|
|
5
|
-
*/
|
|
6
|
-
export declare const rowsToArray: (rows: unknown) => Record<string, unknown>[];
|
|
7
|
-
//# sourceMappingURL=rows.d.ts.map
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { SqliteDriver } from '../index';
|
|
2
|
-
interface SqliteStorageResultSet {
|
|
3
|
-
rows: {
|
|
4
|
-
length: number;
|
|
5
|
-
item: (i: number) => Record<string, unknown>;
|
|
6
|
-
};
|
|
7
|
-
rowsAffected: number;
|
|
8
|
-
insertId?: number;
|
|
9
|
-
}
|
|
10
|
-
/** react-native-sqlite-storage: callback-based by default, promise-based once
|
|
11
|
-
* `enablePromise(true)` is called; `executeSql` resolves an array whose first
|
|
12
|
-
* element is the result set. */
|
|
13
|
-
interface SqliteStorageModuleLike {
|
|
14
|
-
enablePromise: (enabled: boolean) => void;
|
|
15
|
-
openDatabase: (options: {
|
|
16
|
-
name: string;
|
|
17
|
-
location?: string;
|
|
18
|
-
}) => Promise<{
|
|
19
|
-
executeSql: (sql: string, params?: unknown[]) => Promise<[SqliteStorageResultSet]>;
|
|
20
|
-
close: () => Promise<void>;
|
|
21
|
-
}>;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Adapt an already-required `react-native-sqlite-storage` module. Exported for
|
|
25
|
-
* the same reason as the filesystem adapters: the library cannot name a package
|
|
26
|
-
* the app did not install without breaking the app's bundle.
|
|
27
|
-
*/
|
|
28
|
-
export declare const adaptSqliteStorage: (mod: SqliteStorageModuleLike) => SqliteDriver;
|
|
29
|
-
export {};
|
|
30
|
-
//# sourceMappingURL=storage.d.ts.map
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { SqliteDriver } from '../index';
|
|
2
|
-
/**
|
|
3
|
-
* nitro-sqlite and quick-sqlite share one synchronous shape, so one adapter
|
|
4
|
-
* serves both. The REQUIRE lives in the driver entry points beside this file,
|
|
5
|
-
* never here and never in the core: Metro resolves requires statically, so a
|
|
6
|
-
* package named anywhere reachable becomes mandatory for every consumer.
|
|
7
|
-
*/
|
|
8
|
-
interface SyncQueryResult {
|
|
9
|
-
rows?: unknown;
|
|
10
|
-
rowsAffected?: number;
|
|
11
|
-
insertId?: number;
|
|
12
|
-
}
|
|
13
|
-
/** Shape shared by react-native-nitro-sqlite and react-native-quick-sqlite: a
|
|
14
|
-
* synchronous `open({ name, location })` whose `db.execute()` and `db.close()`
|
|
15
|
-
* are also synchronous. Both are wrapped in Promise.resolve to fit SqliteDriver. */
|
|
16
|
-
interface SyncSqliteModuleLike {
|
|
17
|
-
open: (options: {
|
|
18
|
-
name: string;
|
|
19
|
-
location?: string;
|
|
20
|
-
}) => {
|
|
21
|
-
execute: (sql: string, params?: unknown[]) => SyncQueryResult;
|
|
22
|
-
close: () => void;
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Adapt an already-required nitro-sqlite or quick-sqlite module. Both expose the
|
|
27
|
-
* same synchronous shape. Exported so an app on quick-sqlite can inject it.
|
|
28
|
-
*/
|
|
29
|
-
export declare const adaptSyncSqlite: (mod: SyncSqliteModuleLike) => SqliteDriver;
|
|
30
|
-
export {};
|
|
31
|
-
//# sourceMappingURL=sync.d.ts.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { SqliteDriver } from './index';
|
|
2
|
-
/**
|
|
3
|
-
* The one place `react-native-nitro-sqlite` is named. Import this module only if
|
|
4
|
-
* you installed it; nothing else in the library reaches it.
|
|
5
|
-
*/
|
|
6
|
-
export declare const nitroSqliteDriver: () => SqliteDriver;
|
|
7
|
-
//# sourceMappingURL=nitro.d.ts.map
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { SqliteDriver } from './index';
|
|
2
|
-
/**
|
|
3
|
-
* The one place `@op-engineering/op-sqlite` is named. It is the driver we
|
|
4
|
-
* recommend: the most actively maintained of the four, and the only one already
|
|
5
|
-
* proven in one of our apps. Import this module only if you installed it.
|
|
6
|
-
*/
|
|
7
|
-
export declare const opSqliteDriver: () => SqliteDriver;
|
|
8
|
-
//# sourceMappingURL=op.d.ts.map
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { SqliteDriver } from '../index.js';
|
|
2
|
-
/**
|
|
3
|
-
* @op-engineering/op-sqlite. Shape verified against 18.1.4 rather than assumed:
|
|
4
|
-
* `open({ name, location })` is synchronous and returns a DB whose `execute` is
|
|
5
|
-
* ASYNC, and whose `rows` is already a plain array of objects rather than the
|
|
6
|
-
* `{ _array, item() }` shape the older drivers use. Both differences are why it
|
|
7
|
-
* cannot share the sync adapter.
|
|
8
|
-
*
|
|
9
|
-
* The REQUIRE lives in the driver entry point beside this file, never here.
|
|
10
|
-
*/
|
|
11
|
-
export interface OpSqliteQueryResult {
|
|
12
|
-
rows?: Record<string, unknown>[];
|
|
13
|
-
rowsAffected?: number;
|
|
14
|
-
insertId?: number;
|
|
15
|
-
}
|
|
16
|
-
export interface OpSqliteModuleLike {
|
|
17
|
-
open: (options: {
|
|
18
|
-
name: string;
|
|
19
|
-
location?: string;
|
|
20
|
-
}) => {
|
|
21
|
-
execute: (sql: string, params?: unknown[]) => Promise<OpSqliteQueryResult>;
|
|
22
|
-
close: () => void;
|
|
23
|
-
closeAsync?: () => Promise<void>;
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
export declare const adaptOpSqlite: (mod: OpSqliteModuleLike) => SqliteDriver;
|
|
27
|
-
//# sourceMappingURL=op.d.ts.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Row shapes differ per driver: a plain array, `{ _array, length, item() }`, or
|
|
3
|
-
* `{ length, item() }` alone. Every adapter normalises to a plain array here so
|
|
4
|
-
* nothing driver-specific escapes into the Db layer.
|
|
5
|
-
*/
|
|
6
|
-
export declare const rowsToArray: (rows: unknown) => Record<string, unknown>[];
|
|
7
|
-
//# sourceMappingURL=rows.d.ts.map
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { SqliteDriver } from '../index.js';
|
|
2
|
-
interface SqliteStorageResultSet {
|
|
3
|
-
rows: {
|
|
4
|
-
length: number;
|
|
5
|
-
item: (i: number) => Record<string, unknown>;
|
|
6
|
-
};
|
|
7
|
-
rowsAffected: number;
|
|
8
|
-
insertId?: number;
|
|
9
|
-
}
|
|
10
|
-
/** react-native-sqlite-storage: callback-based by default, promise-based once
|
|
11
|
-
* `enablePromise(true)` is called; `executeSql` resolves an array whose first
|
|
12
|
-
* element is the result set. */
|
|
13
|
-
interface SqliteStorageModuleLike {
|
|
14
|
-
enablePromise: (enabled: boolean) => void;
|
|
15
|
-
openDatabase: (options: {
|
|
16
|
-
name: string;
|
|
17
|
-
location?: string;
|
|
18
|
-
}) => Promise<{
|
|
19
|
-
executeSql: (sql: string, params?: unknown[]) => Promise<[SqliteStorageResultSet]>;
|
|
20
|
-
close: () => Promise<void>;
|
|
21
|
-
}>;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Adapt an already-required `react-native-sqlite-storage` module. Exported for
|
|
25
|
-
* the same reason as the filesystem adapters: the library cannot name a package
|
|
26
|
-
* the app did not install without breaking the app's bundle.
|
|
27
|
-
*/
|
|
28
|
-
export declare const adaptSqliteStorage: (mod: SqliteStorageModuleLike) => SqliteDriver;
|
|
29
|
-
export {};
|
|
30
|
-
//# sourceMappingURL=storage.d.ts.map
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { SqliteDriver } from '../index.js';
|
|
2
|
-
/**
|
|
3
|
-
* nitro-sqlite and quick-sqlite share one synchronous shape, so one adapter
|
|
4
|
-
* serves both. The REQUIRE lives in the driver entry points beside this file,
|
|
5
|
-
* never here and never in the core: Metro resolves requires statically, so a
|
|
6
|
-
* package named anywhere reachable becomes mandatory for every consumer.
|
|
7
|
-
*/
|
|
8
|
-
interface SyncQueryResult {
|
|
9
|
-
rows?: unknown;
|
|
10
|
-
rowsAffected?: number;
|
|
11
|
-
insertId?: number;
|
|
12
|
-
}
|
|
13
|
-
/** Shape shared by react-native-nitro-sqlite and react-native-quick-sqlite: a
|
|
14
|
-
* synchronous `open({ name, location })` whose `db.execute()` and `db.close()`
|
|
15
|
-
* are also synchronous. Both are wrapped in Promise.resolve to fit SqliteDriver. */
|
|
16
|
-
interface SyncSqliteModuleLike {
|
|
17
|
-
open: (options: {
|
|
18
|
-
name: string;
|
|
19
|
-
location?: string;
|
|
20
|
-
}) => {
|
|
21
|
-
execute: (sql: string, params?: unknown[]) => SyncQueryResult;
|
|
22
|
-
close: () => void;
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Adapt an already-required nitro-sqlite or quick-sqlite module. Both expose the
|
|
27
|
-
* same synchronous shape. Exported so an app on quick-sqlite can inject it.
|
|
28
|
-
*/
|
|
29
|
-
export declare const adaptSyncSqlite: (mod: SyncSqliteModuleLike) => SqliteDriver;
|
|
30
|
-
export {};
|
|
31
|
-
//# sourceMappingURL=sync.d.ts.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { SqliteDriver } from './index.js';
|
|
2
|
-
/**
|
|
3
|
-
* The one place `react-native-nitro-sqlite` is named. Import this module only if
|
|
4
|
-
* you installed it; nothing else in the library reaches it.
|
|
5
|
-
*/
|
|
6
|
-
export declare const nitroSqliteDriver: () => SqliteDriver;
|
|
7
|
-
//# sourceMappingURL=nitro.d.ts.map
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { SqliteDriver } from './index.js';
|
|
2
|
-
/**
|
|
3
|
-
* The one place `@op-engineering/op-sqlite` is named. It is the driver we
|
|
4
|
-
* recommend: the most actively maintained of the four, and the only one already
|
|
5
|
-
* proven in one of our apps. Import this module only if you installed it.
|
|
6
|
-
*/
|
|
7
|
-
export declare const opSqliteDriver: () => SqliteDriver;
|
|
8
|
-
//# sourceMappingURL=op.d.ts.map
|