@webority/mobile-core 0.146.2 → 0.148.0
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/lib/commonjs/api/fetchRetry.js +1 -1
- package/lib/commonjs/api/idempotencyKey.js +1 -1
- package/lib/commonjs/api/retry.js +1 -1
- package/lib/commonjs/api/tokenRefresh.js +1 -1
- package/lib/commonjs/api/userClient.js +1 -1
- package/lib/commonjs/auth/authStore.js +1 -1
- package/lib/commonjs/auth/jwt.js +1 -1
- package/lib/commonjs/download/adapters/expoFs.js +1 -1
- package/lib/commonjs/errors/extractApiError.js +1 -1
- package/lib/commonjs/formatters/formatConfig.js +1 -1
- package/lib/commonjs/india/aadhaar.js +1 -1
- package/lib/commonjs/india/financialYear.js +1 -1
- package/lib/commonjs/push/broadcasts.js +1 -1
- package/lib/commonjs/push/push.js +1 -1
- package/lib/commonjs/secureScreen/index.js +1 -1
- package/lib/commonjs/smsRetriever/index.js +1 -1
- package/lib/commonjs/sqlite/index.js +1 -1
- package/lib/commonjs/updates/updates.js +1 -1
- package/lib/module/api/fetchRetry.js +1 -1
- package/lib/module/api/idempotencyKey.js +1 -1
- package/lib/module/api/retry.js +1 -1
- package/lib/module/api/tokenRefresh.js +1 -1
- package/lib/module/api/userClient.js +1 -1
- package/lib/module/auth/authStore.js +1 -1
- package/lib/module/auth/jwt.js +1 -1
- package/lib/module/download/adapters/expoFs.js +1 -1
- package/lib/module/errors/extractApiError.js +1 -1
- package/lib/module/formatters/formatConfig.js +1 -1
- package/lib/module/india/aadhaar.js +1 -1
- package/lib/module/india/financialYear.js +1 -1
- package/lib/module/push/broadcasts.js +1 -1
- package/lib/module/push/push.js +1 -1
- package/lib/module/secureScreen/index.js +1 -1
- package/lib/module/smsRetriever/index.js +1 -1
- package/lib/module/sqlite/index.js +1 -1
- package/lib/module/updates/updates.js +1 -1
- package/lib/typescript/commonjs/api/fetchRetry.d.ts +5 -0
- package/lib/typescript/commonjs/api/retry.d.ts +13 -0
- package/lib/typescript/commonjs/api/tokenRefresh.d.ts +7 -1
- package/lib/typescript/commonjs/download/adapters/expoFs.d.ts +1 -1
- package/lib/typescript/commonjs/formatters/currency.d.ts +1 -0
- package/lib/typescript/commonjs/push/broadcasts.d.ts +3 -1
- package/lib/typescript/commonjs/push/push.d.ts +3 -0
- package/lib/typescript/commonjs/secureScreen/index.d.ts +4 -1
- package/lib/typescript/commonjs/smsRetriever/index.d.ts +1 -0
- package/lib/typescript/module/api/fetchRetry.d.ts +5 -0
- package/lib/typescript/module/api/retry.d.ts +13 -0
- package/lib/typescript/module/api/tokenRefresh.d.ts +7 -1
- package/lib/typescript/module/download/adapters/expoFs.d.ts +1 -1
- package/lib/typescript/module/formatters/currency.d.ts +1 -0
- package/lib/typescript/module/push/broadcasts.d.ts +3 -1
- package/lib/typescript/module/push/push.d.ts +3 -0
- package/lib/typescript/module/secureScreen/index.d.ts +4 -1
- package/lib/typescript/module/smsRetriever/index.d.ts +1 -0
- package/package.json +45 -45
|
@@ -20,6 +20,7 @@ export declare const BROADCAST_OPT_OUT_ACTION = "broadcast-opt-out";
|
|
|
20
20
|
* Wires the broadcast opt-out for this app. Call it at module scope in the entry
|
|
21
21
|
* file, before definePushActionTask from `/push/task`: a tap on a killed Android
|
|
22
22
|
* app runs that background task without the UI, so the config must already exist.
|
|
23
|
+
* It also sends again any opt-out a failed send left stored.
|
|
23
24
|
*/
|
|
24
25
|
export declare const initPushBroadcasts: (config: PushBroadcastsConfig) => void;
|
|
25
26
|
export declare const getBroadcastConsent: () => Promise<BroadcastConsent>;
|
|
@@ -28,7 +29,8 @@ export declare const withdrawBroadcastConsent: () => Promise<BroadcastConsent>;
|
|
|
28
29
|
/**
|
|
29
30
|
* Handles the opt-out button. Call it from the action handler of definePushActionTask,
|
|
30
31
|
* then run the app's own actions. Never throws: a background task has no screen to
|
|
31
|
-
* show a failure on.
|
|
32
|
+
* show a failure on. A send that fails is kept in storage and sent again at the next
|
|
33
|
+
* launch and the next opt-out. Logs never carry the token.
|
|
32
34
|
*/
|
|
33
35
|
export declare const handleBroadcastAction: PushActionHandler;
|
|
34
36
|
/**
|
|
@@ -95,6 +95,8 @@ export interface PushState {
|
|
|
95
95
|
status: PushStatus;
|
|
96
96
|
/** True once this process has registered the device, false after `disablePush` or `resetPush`. */
|
|
97
97
|
enabled: boolean;
|
|
98
|
+
/** The error from the last failed re-registration of a rotated device token, or null. Cleared when a registration succeeds and by `disablePush` and `resetPush`. `enablePush` registers on every run, so calling it again retries. */
|
|
99
|
+
registrationError: Error | null;
|
|
98
100
|
}
|
|
99
101
|
interface PermissionResponseLike {
|
|
100
102
|
status: "granted" | "denied" | "undetermined";
|
|
@@ -225,6 +227,7 @@ export declare const initPush: (next: PushConfig) => void;
|
|
|
225
227
|
* already granted registers, and any other resolves with its status
|
|
226
228
|
* (`undetermined` when the person has not been asked yet, `denied` when refused
|
|
227
229
|
* and the prompt can still show, `blocked` when only Settings can turn it on).
|
|
230
|
+
* A failed re-registration of a rotated token is logged and shown as `usePush().registrationError`.
|
|
228
231
|
*/
|
|
229
232
|
export declare const enablePush: ({ prompt }?: EnablePushOptions) => Promise<PushStatus>;
|
|
230
233
|
/** Null when push is unavailable in this build or permission is not granted. Never prompts or registers. */
|
|
@@ -9,7 +9,10 @@ export interface SecureScreenOptions {
|
|
|
9
9
|
/**
|
|
10
10
|
* Blocks capture while the calling screen is focused and releases it on blur
|
|
11
11
|
* or unmount. Each call holds its own claim, so two secure screens on the stack
|
|
12
|
-
* never release each other's protection.
|
|
12
|
+
* never release each other's protection. When blocking capture or hiding the app
|
|
13
|
+
* switcher snapshot fails, the failure is logged and the screen throws on its next
|
|
14
|
+
* render, so an error boundary shows instead of an unprotected screen. A failure
|
|
15
|
+
* to release is only logged.
|
|
13
16
|
*
|
|
14
17
|
* ```tsx
|
|
15
18
|
* import { useIsFocused } from '@react-navigation/native';
|
|
@@ -17,6 +17,7 @@ export declare const setSmsRetrieverImplementation: (impl: SmsRetrieverBackend |
|
|
|
17
17
|
* (`getAppHash`) the backend appends to the message. Android only; every
|
|
18
18
|
* method is safe to call on iOS and resolves/reports unavailable rather than
|
|
19
19
|
* throwing, so a caller doesn't need a platform check at every call site.
|
|
20
|
+
* A native listener that fails to start is reported through `onError` as `UNKNOWN_ERROR`; without an `onError` it throws.
|
|
20
21
|
*
|
|
21
22
|
* OTP extraction is left to the caller — `onMessage` receives the raw SMS
|
|
22
23
|
* text, since the expected OTP format (digit count, prefix) is a backend
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webority/mobile-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.148.0",
|
|
4
4
|
"description": "Platform layer for Webority React Native apps: HTTP clients, auth/token storage, config, logging, formatters, validators, network status, permissions, storage, version checks and over-the-air updates. No UI.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|
|
@@ -394,31 +394,31 @@
|
|
|
394
394
|
},
|
|
395
395
|
"peerDependencies": {
|
|
396
396
|
"@reduxjs/toolkit": "^2.12.0",
|
|
397
|
-
"expo": ">=
|
|
398
|
-
"expo-application": ">=
|
|
399
|
-
"expo-calendar": ">=
|
|
400
|
-
"expo-camera": ">=
|
|
401
|
-
"expo-clipboard": ">=
|
|
402
|
-
"expo-contacts": ">=
|
|
403
|
-
"expo-crypto": ">=
|
|
404
|
-
"expo-document-picker": ">=
|
|
405
|
-
"expo-file-system": ">=
|
|
406
|
-
"expo-image-manipulator": ">=
|
|
407
|
-
"expo-image-picker": ">=
|
|
408
|
-
"expo-local-authentication": ">=
|
|
409
|
-
"expo-location": ">=
|
|
410
|
-
"expo-media-library": ">=
|
|
411
|
-
"expo-network": ">=
|
|
412
|
-
"expo-notifications": ">=
|
|
413
|
-
"expo-screen-capture": ">=
|
|
414
|
-
"expo-secure-store": ">=
|
|
415
|
-
"expo-sharing": ">=
|
|
416
|
-
"expo-sqlite": ">=
|
|
417
|
-
"expo-store-review": ">=
|
|
418
|
-
"expo-task-manager": ">=
|
|
419
|
-
"expo-updates": ">=
|
|
420
|
-
"react": "^19.
|
|
421
|
-
"react-native": ">=0.
|
|
397
|
+
"expo": ">=58.0.0",
|
|
398
|
+
"expo-application": ">=58.0.0",
|
|
399
|
+
"expo-calendar": ">=58.0.0",
|
|
400
|
+
"expo-camera": ">=58.0.0",
|
|
401
|
+
"expo-clipboard": ">=58.0.0",
|
|
402
|
+
"expo-contacts": ">=58.0.0",
|
|
403
|
+
"expo-crypto": ">=58.0.0",
|
|
404
|
+
"expo-document-picker": ">=58.0.0",
|
|
405
|
+
"expo-file-system": ">=58.0.0",
|
|
406
|
+
"expo-image-manipulator": ">=58.0.0",
|
|
407
|
+
"expo-image-picker": ">=58.0.0",
|
|
408
|
+
"expo-local-authentication": ">=58.0.0",
|
|
409
|
+
"expo-location": ">=58.0.0",
|
|
410
|
+
"expo-media-library": ">=58.0.0",
|
|
411
|
+
"expo-network": ">=58.0.0",
|
|
412
|
+
"expo-notifications": ">=58.0.0",
|
|
413
|
+
"expo-screen-capture": ">=58.0.0",
|
|
414
|
+
"expo-secure-store": ">=58.0.0",
|
|
415
|
+
"expo-sharing": ">=58.0.0",
|
|
416
|
+
"expo-sqlite": ">=58.0.0",
|
|
417
|
+
"expo-store-review": ">=58.0.0",
|
|
418
|
+
"expo-task-manager": ">=58.0.0",
|
|
419
|
+
"expo-updates": ">=58.0.0",
|
|
420
|
+
"react": "^19.3.0",
|
|
421
|
+
"react-native": ">=0.88.0",
|
|
422
422
|
"react-redux": "^9.3.0"
|
|
423
423
|
},
|
|
424
424
|
"peerDependenciesMeta": {
|
|
@@ -511,32 +511,32 @@
|
|
|
511
511
|
]
|
|
512
512
|
},
|
|
513
513
|
"devDependencies": {
|
|
514
|
-
"@react-native/metro-config": "0.
|
|
514
|
+
"@react-native/metro-config": "0.88.1",
|
|
515
515
|
"@reduxjs/toolkit": "2.12.0",
|
|
516
516
|
"@testing-library/react-native": "12.9.0",
|
|
517
517
|
"@types/node": "25.6.0",
|
|
518
|
-
"@types/react": "19.
|
|
518
|
+
"@types/react": "19.3.0",
|
|
519
519
|
"@webority/mobile-dev": "0.0.0",
|
|
520
|
-
"expo": "
|
|
521
|
-
"expo-application": "
|
|
522
|
-
"expo-clipboard": "
|
|
523
|
-
"expo-crypto": "
|
|
524
|
-
"expo-document-picker": "
|
|
525
|
-
"expo-file-system": "
|
|
526
|
-
"expo-image-manipulator": "
|
|
527
|
-
"expo-local-authentication": "
|
|
528
|
-
"expo-location": "
|
|
529
|
-
"expo-network": "
|
|
530
|
-
"expo-screen-capture": "
|
|
531
|
-
"expo-secure-store": "
|
|
532
|
-
"expo-sqlite": "
|
|
533
|
-
"expo-store-review": "
|
|
520
|
+
"expo": "58.0.23",
|
|
521
|
+
"expo-application": "58.1.2",
|
|
522
|
+
"expo-clipboard": "58.0.4",
|
|
523
|
+
"expo-crypto": "58.0.7",
|
|
524
|
+
"expo-document-picker": "58.0.4",
|
|
525
|
+
"expo-file-system": "58.0.13",
|
|
526
|
+
"expo-image-manipulator": "58.0.16",
|
|
527
|
+
"expo-local-authentication": "58.0.2",
|
|
528
|
+
"expo-location": "58.0.20",
|
|
529
|
+
"expo-network": "58.0.4",
|
|
530
|
+
"expo-screen-capture": "58.0.6",
|
|
531
|
+
"expo-secure-store": "58.0.2",
|
|
532
|
+
"expo-sqlite": "58.0.15",
|
|
533
|
+
"expo-store-review": "58.0.2",
|
|
534
534
|
"jest": "29.7.0",
|
|
535
|
-
"react": "19.
|
|
536
|
-
"react-native": "0.
|
|
535
|
+
"react": "19.3.0",
|
|
536
|
+
"react-native": "0.88.1",
|
|
537
537
|
"react-native-builder-bob": "0.43.0",
|
|
538
538
|
"react-redux": "9.3.0",
|
|
539
|
-
"react-test-renderer": "19.
|
|
539
|
+
"react-test-renderer": "19.3.0",
|
|
540
540
|
"typescript": "5.9.3"
|
|
541
541
|
},
|
|
542
542
|
"scripts": {
|