@webority/mobile-core 0.175.0 → 0.177.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.
Files changed (80) hide show
  1. package/README.md +1 -1
  2. package/lib/commonjs/api/idempotencyKey.js +1 -1
  3. package/lib/commonjs/api/requestDefaults.js +1 -1
  4. package/lib/commonjs/api/tokenRefresh.js +1 -1
  5. package/lib/commonjs/api/userClient.js +1 -1
  6. package/lib/commonjs/auth/authStore.js +1 -1
  7. package/lib/commonjs/auth/index.js +1 -1
  8. package/lib/commonjs/errors/extractApiError.js +1 -1
  9. package/lib/commonjs/errors/index.js +1 -1
  10. package/lib/commonjs/formatters/currency.js +1 -1
  11. package/lib/commonjs/formatters/date.js +1 -1
  12. package/lib/commonjs/formatters/dateMath.js +1 -1
  13. package/lib/commonjs/formatters/house.js +1 -1
  14. package/lib/commonjs/formatters/index.js +1 -1
  15. package/lib/commonjs/formatters/number.js +1 -1
  16. package/lib/commonjs/index.js +1 -1
  17. package/lib/commonjs/india/gstStates.js +1 -1
  18. package/lib/commonjs/initUserAuth.js +1 -1
  19. package/lib/commonjs/storage/index.js +1 -1
  20. package/lib/commonjs/versionCheck/index.js +1 -1
  21. package/lib/module/api/idempotencyKey.js +1 -1
  22. package/lib/module/api/requestDefaults.js +1 -1
  23. package/lib/module/api/tokenRefresh.js +1 -1
  24. package/lib/module/api/userClient.js +1 -1
  25. package/lib/module/auth/authStore.js +1 -1
  26. package/lib/module/auth/index.js +1 -1
  27. package/lib/module/errors/extractApiError.js +1 -1
  28. package/lib/module/errors/index.js +1 -1
  29. package/lib/module/formatters/currency.js +1 -1
  30. package/lib/module/formatters/date.js +1 -1
  31. package/lib/module/formatters/dateMath.js +1 -1
  32. package/lib/module/formatters/house.js +1 -1
  33. package/lib/module/formatters/index.js +1 -1
  34. package/lib/module/formatters/number.js +1 -1
  35. package/lib/module/index.js +1 -1
  36. package/lib/module/india/gstStates.js +1 -1
  37. package/lib/module/initUserAuth.js +1 -1
  38. package/lib/module/storage/index.js +1 -1
  39. package/lib/module/versionCheck/index.js +1 -1
  40. package/lib/typescript/commonjs/api/requestDefaults.d.ts +6 -4
  41. package/lib/typescript/commonjs/auth/authStore.d.ts +1 -23
  42. package/lib/typescript/commonjs/auth/index.d.ts +2 -2
  43. package/lib/typescript/commonjs/errors/extractApiError.d.ts +4 -1
  44. package/lib/typescript/commonjs/errors/index.d.ts +1 -1
  45. package/lib/typescript/commonjs/formatters/date.d.ts +2 -2
  46. package/lib/typescript/commonjs/formatters/dateMath.d.ts +2 -19
  47. package/lib/typescript/commonjs/formatters/house.d.ts +2 -4
  48. package/lib/typescript/commonjs/formatters/index.d.ts +1 -1
  49. package/lib/typescript/commonjs/formatters/number.d.ts +1 -1
  50. package/lib/typescript/commonjs/formatters/phone.d.ts +3 -1
  51. package/lib/typescript/commonjs/index.d.ts +7 -7
  52. package/lib/typescript/commonjs/india/gstStates.d.ts +1 -1
  53. package/lib/typescript/commonjs/initSDK.d.ts +4 -5
  54. package/lib/typescript/commonjs/initUserAuth.d.ts +0 -7
  55. package/lib/typescript/commonjs/network/networkStatus.d.ts +3 -3
  56. package/lib/typescript/commonjs/share/index.d.ts +3 -1
  57. package/lib/typescript/commonjs/storage/index.d.ts +5 -27
  58. package/lib/typescript/commonjs/utils/imageCompression.d.ts +3 -1
  59. package/lib/typescript/commonjs/versionCheck/index.d.ts +0 -30
  60. package/lib/typescript/module/api/requestDefaults.d.ts +6 -4
  61. package/lib/typescript/module/auth/authStore.d.ts +1 -23
  62. package/lib/typescript/module/auth/index.d.ts +2 -2
  63. package/lib/typescript/module/errors/extractApiError.d.ts +4 -1
  64. package/lib/typescript/module/errors/index.d.ts +1 -1
  65. package/lib/typescript/module/formatters/date.d.ts +2 -2
  66. package/lib/typescript/module/formatters/dateMath.d.ts +2 -19
  67. package/lib/typescript/module/formatters/house.d.ts +2 -4
  68. package/lib/typescript/module/formatters/index.d.ts +1 -1
  69. package/lib/typescript/module/formatters/number.d.ts +1 -1
  70. package/lib/typescript/module/formatters/phone.d.ts +3 -1
  71. package/lib/typescript/module/index.d.ts +7 -7
  72. package/lib/typescript/module/india/gstStates.d.ts +1 -1
  73. package/lib/typescript/module/initSDK.d.ts +4 -5
  74. package/lib/typescript/module/initUserAuth.d.ts +0 -7
  75. package/lib/typescript/module/network/networkStatus.d.ts +3 -3
  76. package/lib/typescript/module/share/index.d.ts +3 -1
  77. package/lib/typescript/module/storage/index.d.ts +5 -27
  78. package/lib/typescript/module/utils/imageCompression.d.ts +3 -1
  79. package/lib/typescript/module/versionCheck/index.d.ts +0 -30
  80. package/package.json +2 -2
@@ -1,6 +1,8 @@
1
+ import type { NumberType, PhoneNumber } from "libphonenumber-js/max";
1
2
  import { type CountryCode } from "libphonenumber-js/max";
2
- export type { NumberType as PhoneNumberType, PhoneNumber } from "libphonenumber-js/max";
3
+ export type PhoneNumberType = NumberType;
3
4
  export { AsYouType, getCountries, getCountryCallingCode, isSupportedCountry, isValidPhoneNumber, parsePhoneNumber, parsePhoneNumberFromString, validatePhoneNumberLength, } from "libphonenumber-js/max";
5
+ export type { PhoneNumber };
4
6
  /**
5
7
  * Re-exported under our own name rather than importing CountryCode directly
6
8
  * everywhere, so a future need to diverge (or re-narrow) has one place to do
@@ -57,8 +57,8 @@ export { refreshAccessToken } from "./api/tokenRefresh";
57
57
  export type { RefreshableStore } from "./api/userClient";
58
58
  export { default as userClient, injectStore, injectUserAuth, RequestOfflineError, resetRefreshState, SESSION_EXPIRED_CODE, SESSION_REVOKED_CODE, } from "./api/userClient";
59
59
  export { isWorkspaceChangedError, WORKSPACE_CHANGED_CODE, WorkspaceChangedError, } from "./api/workspace";
60
- export type { KeychainLike, LegacyTokenKeys, SecureCredentials, SessionEndDetail, SessionEndedListener, SessionEndReason, StoredToken, } from "./auth/authStore";
61
- export { ACCESS_TOKEN_KEY, addSessionEndedListener, clearSession, getSessionUser, getToken, LEGACY_REFRESH_TOKEN_LIFETIME_MS, REFRESH_TOKEN_KEY, removeSessionUser, removeToken, SESSION_USER_KEY, setKeychainImplementation, setLegacyTokenKeys, storeSessionUser, storeToken, } from "./auth/authStore";
60
+ export type { KeychainLike, SecureCredentials, SessionEndDetail, SessionEndedListener, SessionEndReason, StoredToken, } from "./auth/authStore";
61
+ export { ACCESS_TOKEN_KEY, addSessionEndedListener, clearSession, getSessionUser, getToken, REFRESH_TOKEN_KEY, removeSessionUser, removeToken, SESSION_USER_KEY, setKeychainImplementation, storeSessionUser, storeToken, } from "./auth/authStore";
62
62
  export type { JwtClaims } from "./auth/jwt";
63
63
  export { decodeJWT, getJWTExpiry, isJWTExpired } from "./auth/jwt";
64
64
  export type { Config, Environment, LogLevel } from "./config";
@@ -67,9 +67,9 @@ export { ENVIRONMENT_APP_ID_SUFFIX, installedAppId } from "./config/appIdentity"
67
67
  export type { DeepLinkConfig, DeepLinkRoute, ParsedLink } from "./deepLink";
68
68
  export { DeepLink, parseDeepLink, useDeepLink } from "./deepLink";
69
69
  export type { ApiError, ResponseSchema } from "./errors";
70
- export { apiErrorMessage, CONTRACT_ERROR_CODE, extractApiError, isApiError, isNoResponse, NETWORK_CODE, OFFLINE_CODE, OFFLINE_MESSAGE, parseResponse, REQUEST_CANCELED_CODE, SERVER_FAILURE_MESSAGE, TIMEOUT_CODE, TIMEOUT_MESSAGE, toFieldPath, UNEXPECTED_MESSAGE, UNREACHABLE_MESSAGE, } from "./errors";
70
+ export { apiErrorMessage, CONTRACT_ERROR_CODE, extractApiError, isApiError, isNoResponse, NETWORK_CHECK_CODE, NETWORK_CHECK_MESSAGE, NETWORK_CODE, OFFLINE_CODE, OFFLINE_MESSAGE, parseResponse, REQUEST_CANCELED_CODE, SERVER_FAILURE_MESSAGE, TIMEOUT_CODE, TIMEOUT_MESSAGE, toFieldPath, UNEXPECTED_MESSAGE, UNREACHABLE_MESSAGE, } from "./errors";
71
71
  export type { DateInput, DateOrder, DateStyle, DateValue, FormatCurrencyOptions, FormatDateOptions, FormatDateTimeOptions, FormatMinorOptions, FormatNumberOptions, FormatPercentOptions, FormatPhoneOptions, FormatRelativeOptions, FormatTimeOptions, FormatterConfig, NumberGrouping, NumberStyle, PhoneCountry, PhoneCountryEntry, PhoneNumber, PhoneNumberType, PhoneParts, PhoneValidationKind, TimeStyle, ZoneMode, ZoneOption, } from "./formatters";
72
- export { AsYouType, addDays, clampNationalNumber, configureFormatters, countryFlagEmoji, detectPhoneCountry, diffMs, formatCompactNumber, formatCurrency, formatDate, formatDateDDMMMYYYY, formatDateISO, formatDatePattern, formatDateTime, formatMinor, formatNumber, formatPercent, formatPhone, formatPhoneAsTyped, formatRelative, formatRelativeTime, formatTime, formatTime12h, formatTimeInWindowsZone, formatTimeInZone, getCountries, getCountryCallingCode, getFormatterConfig, getInitials, getPhoneCountries, groupingForLocale, isDateAfter, isDateBefore, isSameDay, isSupportedCountry, isValidNationalNumber, isValidPhoneNumber, maxNationalNumberLength, normalizePhone, parsePhoneNumber, parsePhoneNumberFromString, splitPhoneNumber, startOfDay, validatePhoneNumberLength, } from "./formatters";
72
+ export { AsYouType, addDays, clampNationalNumber, configureFormatters, countryFlagEmoji, detectPhoneCountry, diffMs, formatCompactNumber, formatCurrency, formatDate, formatDateISO, formatDatePattern, formatDateTime, formatMinor, formatNumber, formatPercent, formatPhone, formatPhoneAsTyped, formatRelative, formatRelativeTime, formatTime, formatTime12h, formatTimeInWindowsZone, formatTimeInZone, getCountries, getCountryCallingCode, getFormatterConfig, getInitials, getPhoneCountries, groupingForLocale, isDateAfter, isDateBefore, isSameDay, isSupportedCountry, isValidNationalNumber, isValidPhoneNumber, maxNationalNumberLength, normalizePhone, parsePhoneNumber, parsePhoneNumberFromString, splitPhoneNumber, startOfDay, validatePhoneNumberLength, } from "./formatters";
73
73
  export type { IdlePhase, IdleTimeoutOptions, IdleTimeoutState, IdleTouchProps } from "./idle";
74
74
  export { IDLE_LAST_ACTIVITY_KEY, reportIdleActivity, useIdleTimeout } from "./idle";
75
75
  export type { InitConfig } from "./initSDK";
@@ -85,10 +85,10 @@ export { addNetworkStatusListener, getNetworkStatus, setNetworkStatusImplementat
85
85
  export type { PushStatus } from "./push/status";
86
86
  export { PUSH_STATUS } from "./push/status";
87
87
  export type { AsyncStorageLike, StorageApi } from "./storage";
88
- export { isStorageAvailable, Storage, setStorageImplementation } from "./storage";
88
+ export { Storage, setStorageImplementation } from "./storage";
89
89
  export { encodeBase64 } from "./utils/base64";
90
90
  export type { FieldRule, FieldRuleSet, PasswordRules } from "./validators";
91
91
  export { checkFields, FIELD_RULE_MESSAGES, fieldRules, isAlphanumeric, isBetween, isEmail, isHexColor, isInteger, isNonEmpty, isNumeric, isPhone, isStrongPassword, isUrl, maxLength, minLength, refineWith, } from "./validators";
92
- export type { DeviceInfoLike, ParsedVersion, Platform, UpdateInfo, UpdateType, VersionCheckResult, VersionCheckType, VersionComparison, VersionData, } from "./versionCheck";
93
- export { isBuildBelowMinimum, parseBuildNumber, setDeviceInfoImplementation, useVersionCheck, VersionCheck, } from "./versionCheck";
92
+ export type { DeviceInfoLike, Platform, UpdateInfo, UpdateType, VersionCheckResult, VersionCheckType, } from "./versionCheck";
93
+ export { isBuildBelowMinimum, parseBuildNumber, useVersionCheck, VersionCheck, } from "./versionCheck";
94
94
  //# sourceMappingURL=index.d.ts.map
@@ -1,7 +1,7 @@
1
1
  import { type GstState } from "./gstStates.g";
2
2
  /** The current state a valid GSTIN belongs to: a retired code resolves to its replacement, or null when the GSTIN is not valid. */
3
3
  export declare const currentStateForGstin: (value: unknown) => GstState | null;
4
- /** The state a stored place of supply names, in the printed form "Karnataka (29)" or a bare name, or null. */
4
+ /** The state a stored place of supply names in the printed form "Karnataka (29)", or null. */
5
5
  export declare const gstStateFromPlaceOfSupply: (value: unknown) => GstState | null;
6
6
  /** How the place of supply prints on a tax document, such as "Karnataka (29)". */
7
7
  export declare const placeOfSupplyLabel: (state: GstState) => string;
@@ -5,7 +5,7 @@
5
5
  import { type KeychainLike } from "./auth/authStore";
6
6
  import { type Environment, type LogLevel } from "./config";
7
7
  import { type RemoteLogger } from "./logger";
8
- import { type NetInfoLike } from "./network/networkStatus";
8
+ import { type NetworkStatusLike } from "./network/networkStatus";
9
9
  import { setStorageImplementation } from "./storage";
10
10
  export interface InitConfig {
11
11
  /** Your API base URL (required) */
@@ -56,9 +56,8 @@ export interface InitConfig {
56
56
  * The native modules that fill the seams the library does not import.
57
57
  *
58
58
  * Passing them here is strongly preferred over calling each setter, because
59
- * forgetting one is silent: storage returns falsy and network status reports
60
- * optimistic online, so an app looks like it works and simply never persists
61
- * anything. The pilot migration wired NONE of them and nothing said so.
59
+ * forgetting one is silent: network status reports optimistic online, so an
60
+ * app looks like it works while it never sees the device go offline.
62
61
  *
63
62
  * Every value is whatever that surface's package exports, or an Expo adapter
64
63
  * from its own import path. See docs/expo.md.
@@ -66,7 +65,7 @@ export interface InitConfig {
66
65
  backends?: {
67
66
  storage?: Parameters<typeof setStorageImplementation>[0] | undefined;
68
67
  keychain?: KeychainLike | null | undefined;
69
- network?: NetInfoLike | null | undefined;
68
+ network?: NetworkStatusLike | null | undefined;
70
69
  } | undefined;
71
70
  }
72
71
  /**
@@ -1,6 +1,5 @@
1
1
  import { type AccountIdProvider, type InstallationIdProvider } from "./api/clientHeaders";
2
2
  import type { RefreshableStore } from "./api/tokenRefresh";
3
- import { type LegacyTokenKeys } from "./auth/authStore";
4
3
  /** The tokens a refresh response carries, with their expiry timestamps. */
5
4
  export interface TokenRefreshResult {
6
5
  accessToken: string;
@@ -52,12 +51,6 @@ export interface UserAuthOptions {
52
51
  * and no header goes out.
53
52
  */
54
53
  installationId?: InstallationIdProvider | undefined;
55
- /**
56
- * The secure-store keys the app kept its session under before this library. The first token
57
- * read that finds the library's keys empty moves a session found there and deletes the old
58
- * keys, so the release that adopts the library signs nobody out.
59
- */
60
- legacyKeys?: LegacyTokenKeys | undefined;
61
54
  }
62
55
  /**
63
56
  * Wire the user client to the app: the Redux store it dispatches `logout` to,
@@ -15,7 +15,7 @@ interface NetInfoStateLike {
15
15
  isInternetReachable: boolean | null;
16
16
  type?: string | undefined;
17
17
  }
18
- export interface NetInfoLike {
18
+ export interface NetworkStatusLike {
19
19
  fetch: () => Promise<NetInfoStateLike>;
20
20
  addEventListener: (cb: (state: NetInfoStateLike) => void) => () => void;
21
21
  }
@@ -24,7 +24,7 @@ export interface NetInfoLike {
24
24
  * to reach error paths that a healthy device never takes; it is not the way an
25
25
  * app is meant to configure the library. Pass `null` to restore expo-network.
26
26
  */
27
- export declare const setNetworkStatusImplementation: (impl: NetInfoLike | null) => void;
27
+ export declare const setNetworkStatusImplementation: (impl: NetworkStatusLike | null) => void;
28
28
  /**
29
29
  * Imperative one-shot fetch of current network status. Resolves to the default
30
30
  * online status when NetInfo is unavailable so callers never crash.
@@ -46,5 +46,5 @@ export declare const getLastKnownNetworkStatus: () => Promise<NetworkStatus>;
46
46
  * Re-reads the status each time the app returns to the foreground.
47
47
  */
48
48
  export declare const useNetworkStatus: () => NetworkStatus;
49
- export type { NetInfoLike as NetworkStatusLike };
49
+ export {};
50
50
  //# sourceMappingURL=networkStatus.d.ts.map
@@ -12,7 +12,9 @@
12
12
  export type ShareErrorCode = "unavailable" | "failed";
13
13
  export declare class ShareError extends Error {
14
14
  readonly code: ShareErrorCode;
15
- constructor(message: string, options: ErrorOptions & {
15
+ constructor(message: string, options: {
16
+ cause?: unknown;
17
+ } & {
16
18
  code: ShareErrorCode;
17
19
  });
18
20
  }
@@ -6,34 +6,12 @@ interface AsyncStorageLike {
6
6
  getItem: (key: string) => Promise<string | null>;
7
7
  setItem: (key: string, value: string) => Promise<void>;
8
8
  removeItem: (key: string) => Promise<void>;
9
- /**
10
- * The batch API exists under TWO names, and both are live in apps today.
11
- *
12
- * `@react-native-async-storage/async-storage` 3 renamed the v1 trio and
13
- * changed their shapes: `getMany` returns a Record where `multiGet` returned
14
- * pairs, and `setMany` takes a Record where `multiSet` took pairs. The v1
15
- * names are still what `expo-sqlite/kv-store` and AsyncStorage 2 expose.
16
- *
17
- * Declaring only one set is not a compile error and not a runtime error; it
18
- * silently falls through to the per-key loop below. Apps pin
19
- * AsyncStorage 3, so recognising only the v1 names put every consumer on N
20
- * round-trips per batch with nothing to notice.
21
- */
22
- getMany?: ((keys: string[]) => Promise<Record<string, string | null>>) | undefined;
23
- setMany?: ((entries: Record<string, string>) => Promise<void>) | undefined;
24
- removeMany?: ((keys: string[]) => Promise<void>) | undefined;
25
- multiGet?: ((keys: string[]) => Promise<readonly [string, string | null][]>) | undefined;
26
- multiSet?: ((kvs: [string, string][]) => Promise<void>) | undefined;
27
- multiRemove?: ((keys: string[]) => Promise<void>) | undefined;
28
- clear?: (() => Promise<void>) | undefined;
29
- getAllKeys?: (() => Promise<readonly string[]>) | undefined;
9
+ multiGet: (keys: string[]) => Promise<readonly [string, string | null][]>;
10
+ multiSet: (kvs: [string, string][]) => Promise<void>;
11
+ multiRemove: (keys: string[]) => Promise<void>;
12
+ clear: () => Promise<void>;
13
+ getAllKeys: () => Promise<readonly string[]>;
30
14
  }
31
- /**
32
- * Always true now that the backend ships with the library. Kept because callers
33
- * whose use of storage is an OPTIMISATION branch on it, and removing it would
34
- * be a breaking change for no gain.
35
- */
36
- export declare const isStorageAvailable: () => boolean;
37
15
  /**
38
16
  * Replace the storage backend. Intended for TESTS and for the showcase; an app
39
17
  * gets expo-sqlite/kv-store without wiring anything. Pass `null` to restore it.
@@ -96,7 +96,9 @@ export interface CompressedImage {
96
96
  /** The photo was missing, empty or undecodable, or could not be prepared for upload. */
97
97
  export declare class ImageUnreadableError extends Error {
98
98
  readonly uri: string;
99
- constructor(reason: string, options: ErrorOptions & {
99
+ constructor(reason: string, options: {
100
+ cause?: unknown;
101
+ } & {
100
102
  uri: string;
101
103
  });
102
104
  }
@@ -1,11 +1,5 @@
1
1
  import { type Environment } from "../config";
2
2
  import { type DeviceInfoLike } from "./appBuild";
3
- /**
4
- * Supply the app identity from a native module instead of config.
5
- * Prefer `setConfig({ appId, appBuild })`. It needs no native dependency.
6
- * Pass `null` to clear.
7
- */
8
- export declare const setDeviceInfoImplementation: (impl: DeviceInfoLike | null) => void;
9
3
  export type Platform = "ios" | "android" | string;
10
4
  /**
11
5
  * A required update always reports `'major'`: the server states a minimum
@@ -13,29 +7,6 @@ export type Platform = "ios" | "android" | string;
13
7
  * already treat as "must update".
14
8
  */
15
9
  export type UpdateType = "major" | "minor" | "patch" | "prerelease" | null;
16
- /** @deprecated Store versions are no longer parsed; the minimum is a build number. */
17
- export interface ParsedVersion {
18
- major: number;
19
- minor: number;
20
- patch: number;
21
- prerelease: string;
22
- }
23
- /** @deprecated The store is no longer read; the minimum comes from `Min-App-Version`. */
24
- export interface VersionData {
25
- version: string | null;
26
- released?: string | null | undefined;
27
- releasedAt?: string | undefined;
28
- notes: string;
29
- url: string | null;
30
- country?: string | undefined;
31
- lastChecked: string;
32
- }
33
- /** @deprecated The store is no longer read; the minimum comes from `Min-App-Version`. */
34
- export interface VersionComparison {
35
- needsUpdate: boolean;
36
- updateType: UpdateType;
37
- notice?: string | undefined;
38
- }
39
10
  export interface VersionCheckResult {
40
11
  isNewVersionAvailable: boolean;
41
12
  updateType: UpdateType;
@@ -71,7 +42,6 @@ export declare const VersionCheck: VersionCheckType;
71
42
  * check runs in `'Production'` only
72
43
  */
73
44
  export declare const useVersionCheck: (isAppReady: boolean, environment?: Environment) => UpdateInfo;
74
- export default VersionCheck;
75
45
  export { readAppBuild } from "./appBuild";
76
46
  export { isBuildBelowMinimum, parseBuildNumber } from "./buildNumber";
77
47
  export type { DeviceInfoLike };
@@ -1,20 +1,22 @@
1
1
  import type { AxiosInstance } from "axios";
2
2
  export declare const TRACEPARENT_HEADER = "traceparent";
3
3
  /**
4
- * A fresh W3C traceparent, version 00, sampled: the header value and its 32-hex trace id. The ids
4
+ * A fresh W3C traceparent, version 00, sampled: the header value and its 32-hex trace id, or null
5
+ * where no crypto.getRandomValues exists (Hermes without a polyfill, an insecure page). The ids
5
6
  * only have to be unique enough to find one request in the logs; they are never secrets.
6
7
  */
7
8
  export declare const newTraceparent: () => {
8
9
  header: string;
9
10
  traceId: string;
10
- };
11
+ } | null;
11
12
  /**
12
13
  * Applies the configured timeout and the traceparent per request, read on every send so a
13
14
  * value set after import still applies (the same reason `applyConfiguredBaseUrl` exists).
14
15
  * - `timeoutMs`: used when the request carries no timeout of its own; a request's own axios
15
16
  * `timeout` wins. 0, either way, means no timeout (axios's own meaning).
16
- * - `traceparent`: a fresh one unless the request already carries one. A retry
17
- * resends the same config, so it keeps the value the first attempt went out with.
17
+ * - `traceparent`: a fresh one unless the request already carries one, and none where
18
+ * `newTraceparent` has no secure random source. A retry resends the same config, so it keeps
19
+ * the value the first attempt went out with.
18
20
  *
19
21
  * axios fills a missing `timeout` with its own default of 0, which would make "this request
20
22
  * set none" and "this request asked for none" look alike. The client's default is therefore
@@ -41,25 +41,6 @@ export interface SessionEndDetail {
41
41
  detail: string | null;
42
42
  }
43
43
  export type SessionEndedListener = (reason: SessionEndReason, detail: SessionEndDetail) => void;
44
- /**
45
- * The keys an app stored its session under before it adopted this library. `initUserAuth`
46
- * takes them as `legacyKeys`; the first token read that finds the library's keys empty moves a
47
- * session found there (see `getToken`). On mobile the token keys are secure-store services and
48
- * `sessionUser` is a `Storage` key. Each token may be the bare string or the library's own
49
- * `{ token, expiry }` JSON.
50
- */
51
- export interface LegacyTokenKeys {
52
- accessToken: string;
53
- refreshToken: string;
54
- /** The old key of the signed-in user's profile snapshot, if the app kept one. */
55
- sessionUser?: string | undefined;
56
- }
57
- /**
58
- * The expiry given to a migrated refresh token whose expiry the old store never kept and which
59
- * is not a JWT. The server stays the judge: a refresh token it no longer honours is refused at
60
- * the first refresh, which ends the session exactly as it would have ended before.
61
- */
62
- export declare const LEGACY_REFRESH_TOKEN_LIFETIME_MS: number;
63
44
  /**
64
45
  * The shape this module speaks to its store through. expo-secure-store is
65
46
  * adapted to it below; an app or a test can supply anything else of this shape
@@ -115,8 +96,7 @@ export declare const setKeychainImplementation: (impl: KeychainLike | null) => v
115
96
  export declare const storeToken: (key: string, token: string, expiry: string) => Promise<void>;
116
97
  /**
117
98
  * Retrieve token and check if expired. Rejects when the store cannot be read
118
- * (other than an invalidated key, which is cleared and read as no token), and
119
- * when a legacy session move fails.
99
+ * (other than an invalidated key, which is cleared and read as no token).
120
100
  */
121
101
  export declare const getToken: (key: string) => Promise<StoredToken | null>;
122
102
  /**
@@ -135,8 +115,6 @@ export declare const storeSessionUser: <T>(user: T) => Promise<void>;
135
115
  */
136
116
  export declare const getSessionUser: <T>(parse: (value: unknown) => T) => Promise<T | null>;
137
117
  export declare const removeSessionUser: () => Promise<void>;
138
- /** Set by `initUserAuth({ legacyKeys })`; `null` turns the migration off. */
139
- export declare const setLegacyTokenKeys: (keys: LegacyTokenKeys | null) => void;
140
118
  /**
141
119
  * Be told when the session ends, with the reason. Returns the unsubscribe.
142
120
  * Fires once per session end, whichever path ended it; the app reacts here
@@ -1,5 +1,5 @@
1
- export type { LegacyTokenKeys, SessionEndDetail, SessionEndedListener, SessionEndReason, StoredToken, } from "./authStore.js";
2
- export { ACCESS_TOKEN_KEY, addSessionEndedListener, clearSession, getSessionUser, getToken, LEGACY_REFRESH_TOKEN_LIFETIME_MS, REFRESH_TOKEN_KEY, removeSessionUser, removeToken, SESSION_USER_KEY, setLegacyTokenKeys, storeSessionUser, storeToken, } from "./authStore.js";
1
+ export type { SessionEndDetail, SessionEndedListener, SessionEndReason, StoredToken, } from "./authStore.js";
2
+ export { ACCESS_TOKEN_KEY, addSessionEndedListener, clearSession, getSessionUser, getToken, REFRESH_TOKEN_KEY, removeSessionUser, removeToken, SESSION_USER_KEY, storeSessionUser, storeToken, } from "./authStore.js";
3
3
  export type { JwtClaims } from "./jwt.js";
4
4
  export { decodeJWT, getJWTExpiry, isJWTExpired } from "./jwt.js";
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -26,9 +26,10 @@ export interface ApiError {
26
26
  }
27
27
  export declare const SERVER_FAILURE_MESSAGE = "Something went wrong on our side. Please try again in a moment.";
28
28
  export declare const OFFLINE_MESSAGE = "You appear to be offline. Check your connection and try again.";
29
- export declare const UNREACHABLE_MESSAGE = "We couldn't reach the server. Check your connection and try again.";
29
+ export declare const UNREACHABLE_MESSAGE = "We could not reach the server. Check your network or firewall and try again.";
30
30
  export declare const TIMEOUT_MESSAGE = "That took too long to respond. Check your connection and try again.";
31
31
  export declare const UNEXPECTED_MESSAGE = "Something went wrong. Please try again.";
32
+ export declare const NETWORK_CHECK_MESSAGE = "A network check stopped this request. Try again, or report it if it keeps happening.";
32
33
  /** `code` for a request the caller cancelled (axios `CanceledError`). Never toasted. */
33
34
  export declare const REQUEST_CANCELED_CODE = "request_canceled";
34
35
  /** `code` for a response that failed schema validation at the service boundary. */
@@ -39,6 +40,8 @@ export declare const TIMEOUT_CODE = "timeout";
39
40
  export declare const NETWORK_CODE = "network";
40
41
  /** `code` for a request refused because the device reports no connection. `offline` is true. */
41
42
  export declare const OFFLINE_CODE = "offline";
43
+ /** `code` for a 403 that Cloudflare answered with a challenge (`cf-mitigated: challenge`) instead of the server. Not a refusal of access. */
44
+ export declare const NETWORK_CHECK_CODE = "network_check";
42
45
  /** `Items[0].UnitPrice` -> `items[0].unitPrice`; `$.email` (System.Text.Json path) -> `email`. */
43
46
  export declare const toFieldPath: (key: string) => string;
44
47
  export declare const isApiError: (value: unknown) => value is ApiError;
@@ -1,5 +1,5 @@
1
1
  export type { ApiError } from "./extractApiError.js";
2
- export { apiErrorMessage, CONTRACT_ERROR_CODE, extractApiError, isApiError, isNoResponse, NETWORK_CODE, OFFLINE_CODE, OFFLINE_MESSAGE, REQUEST_CANCELED_CODE, SERVER_FAILURE_MESSAGE, TIMEOUT_CODE, TIMEOUT_MESSAGE, toFieldPath, UNEXPECTED_MESSAGE, UNREACHABLE_MESSAGE, } from "./extractApiError.js";
2
+ export { apiErrorMessage, CONTRACT_ERROR_CODE, extractApiError, isApiError, isNoResponse, NETWORK_CHECK_CODE, NETWORK_CHECK_MESSAGE, NETWORK_CODE, OFFLINE_CODE, OFFLINE_MESSAGE, REQUEST_CANCELED_CODE, SERVER_FAILURE_MESSAGE, TIMEOUT_CODE, TIMEOUT_MESSAGE, toFieldPath, UNEXPECTED_MESSAGE, UNREACHABLE_MESSAGE, } from "./extractApiError.js";
3
3
  export type { ResponseSchema } from "./parseResponse.js";
4
4
  export { parseResponse } from "./parseResponse.js";
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -8,7 +8,7 @@ export declare function formatDate(value: DateValue, options?: FormatDateOptions
8
8
  export declare function formatDate(value: DateInput, style: DateStyle, locale?: string): string;
9
9
  /** "8:05 PM" in IST, labelled in any other zone. */
10
10
  export declare function formatTime(value: DateValue, options?: FormatTimeOptions): string;
11
- /** Intl `timeStyle` output (24-hour fallback when Intl is unavailable). */
11
+ /** Intl `timeStyle` output, `'en-IN'` by default. */
12
12
  export declare function formatTime(value: DateInput, style: TimeStyle, locale?: string): string;
13
13
  /** "08-Apr-2026, 8:05 PM" in IST, labelled in any other zone. */
14
14
  export declare function formatDateTime(value: DateValue, options?: FormatDateTimeOptions): string;
@@ -16,7 +16,7 @@ export declare function formatDateTime(value: DateValue, options?: FormatDateTim
16
16
  export declare function formatDateTime(value: DateInput, dateStyle: DateStyle, timeStyle?: TimeStyle, locale?: string): string;
17
17
  /**
18
18
  * Returns a humanized relative-time string (e.g. "5 minutes ago", "in 3 days").
19
- * Uses `Intl.RelativeTimeFormat` when available; otherwise a sensible English fallback.
19
+ * Uses `Intl.RelativeTimeFormat`.
20
20
  */
21
21
  export declare const formatRelativeTime: (value: DateInput, base?: DateInput, locale?: string) => string;
22
22
  //# sourceMappingURL=date.d.ts.map
@@ -37,29 +37,12 @@ export declare const addDays: (value: DateInput | null | undefined, count: numbe
37
37
  * existing pattern (a legacy display string, an API's expected shape).
38
38
  *
39
39
  * `utc: true` reads every field from the UTC calendar/clock instead of the
40
- * device's local one. See `formatDateDDMMMYYYY`'s note on why this isn't
41
- * cosmetic.
40
+ * device's local one, for a call site that was UTC-explicit: the two disagree
41
+ * whenever local time has crossed a day boundary UTC hasn't yet.
42
42
  */
43
43
  export declare const formatDatePattern: (value: DateInput, pattern: string, options?: {
44
44
  utc?: boolean | undefined;
45
45
  }) => string;
46
- /**
47
- * `DD MMM, YYYY`: zero-padded day, short month, comma, year (e.g.
48
- * `05 Sep, 2025`). A specific legacy pattern some apps already display,
49
- * not the recommended convention: `formatDate` (the Intl `style`-based
50
- * formatter in `./date`) is the one to reach for in new code. This exists so
51
- * an app already showing this exact pattern can move off a date library
52
- * without a visible change.
53
- *
54
- * `utc: true` reads the calendar day from the UTC fields instead of the
55
- * device's local ones, matching `dayjs.utc(x).format(...)`, not
56
- * `dayjs(x).format(...)`. The two disagree whenever local time has crossed a
57
- * day boundary UTC hasn't yet (or vice versa), so this is not a cosmetic
58
- * option; pass it only to match a call site that was genuinely UTC-explicit.
59
- */
60
- export declare const formatDateDDMMMYYYY: (value: DateInput, options?: {
61
- utc?: boolean | undefined;
62
- }) => string;
63
46
  /** `YYYY-MM-DD`, in the device's local timezone. */
64
47
  export declare const formatDateISO: (value: DateInput) => string;
65
48
  /**
@@ -8,7 +8,7 @@
8
8
  * text is assembled here rather than by Intl. Engines disagree on month
9
9
  * abbreviations ("Sep" or "Sept"), on the space before AM/PM (a plain or a
10
10
  * narrow no-break space), on zone names ("IST" or "GMT+5:30") and on which
11
- * Intl options exist at all (Hermes has no RelativeTimeFormat and no
11
+ * Intl options exist at all (Hermes has no
12
12
  * trailingZeroDisplay). IST and the viewer's zone are therefore computed with
13
13
  * plain Date arithmetic; Intl is used only to read the wall clock of an
14
14
  * explicitly named IANA zone, through format() with numeric fields read as digit runs, to
@@ -68,7 +68,6 @@ export interface FormatRelativeOptions {
68
68
  * Intl's own phrasing ("yesterday", "in 2 days", "now") instead of the house phrase
69
69
  * ("1 day ago"). Always on once a locale is configured. Intl phrases count in rounded
70
70
  * years, months, days, hours, minutes and seconds, with no week unit, so 36 hours ahead reads
71
- * "in 2 days". An engine without Intl.RelativeTimeFormat (older Hermes) prints the house phrase.
72
71
  */
73
72
  intl?: boolean | undefined;
74
73
  }
@@ -118,8 +117,7 @@ export declare const formatTime: (value: DateValue, options?: FormatTimeOptions)
118
117
  /** "08-Apr-2026, 8:05 PM" in IST, "08-Apr-2026, 10:35 AM GMT-4" in the viewer's zone. */
119
118
  export declare const formatDateTime: (value: DateValue, options?: FormatDateTimeOptions) => string;
120
119
  /**
121
- * "just now", "5 minutes ago", "in 3 days". English on every engine: Hermes
122
- * has no Intl.RelativeTimeFormat. Counts are whole units, rounded down, so
120
+ * "just now", "5 minutes ago", "in 3 days". Counts are whole units, rounded down, so
123
121
  * 59 minutes never reads as "60 minutes". With a configured locale, or
124
122
  * `{ intl: true }`, the phrase is Intl's in that locale instead, with numeric
125
123
  * "auto" and rounded counts: "yesterday", "in 2 days" at 36 hours ahead, "10 days ago",
@@ -2,7 +2,7 @@ export type { FormatCurrencyOptions } from "./currency.js";
2
2
  export { formatCurrency } from "./currency.js";
3
3
  export type { DateInput, DateStyle, TimeStyle } from "./date.js";
4
4
  export { formatDate, formatDateTime, formatRelativeTime, formatTime } from "./date.js";
5
- export { addDays, diffMs, formatDateDDMMMYYYY, formatDateISO, formatDatePattern, formatTime12h, formatTimeInWindowsZone, formatTimeInZone, isDateAfter, isDateBefore, isSameDay, startOfDay, } from "./dateMath.js";
5
+ export { addDays, diffMs, formatDateISO, formatDatePattern, formatTime12h, formatTimeInWindowsZone, formatTimeInZone, isDateAfter, isDateBefore, isSameDay, startOfDay, } from "./dateMath.js";
6
6
  export type { DateOrder, FormatterConfig, NumberGrouping, NumberStyle, ZoneMode, } from "./formatConfig.js";
7
7
  export { configureFormatters, getFormatterConfig, groupingForLocale } from "./formatConfig.js";
8
8
  export type { DateValue, FormatDateOptions, FormatDateTimeOptions, FormatMinorOptions, FormatNumberOptions, FormatPercentOptions, FormatRelativeOptions, FormatTimeOptions, ZoneOption, } from "./house.js";
@@ -1,7 +1,7 @@
1
1
  import { type FormatNumberOptions, type FormatPercentOptions } from "./house.js";
2
2
  /**
3
3
  * Two forms share each name. With an options object, or nothing, the house
4
- * formatter runs (`./house`: no Intl, the configured grouping and empty
4
+ * formatter runs (`./house`: the configured grouping and empty
5
5
  * placeholder, a numeric string read as its number). With positional
6
6
  * arguments the original Intl formatter runs, unchanged, returning '' for
7
7
  * missing input; a configured `numberStyle` still sets its decimal mark and
@@ -1,6 +1,8 @@
1
+ import type { NumberType, PhoneNumber } from "libphonenumber-js/max";
1
2
  import { type CountryCode } from "libphonenumber-js/max";
2
- export type { NumberType as PhoneNumberType, PhoneNumber } from "libphonenumber-js/max";
3
+ export type PhoneNumberType = NumberType;
3
4
  export { AsYouType, getCountries, getCountryCallingCode, isSupportedCountry, isValidPhoneNumber, parsePhoneNumber, parsePhoneNumberFromString, validatePhoneNumberLength, } from "libphonenumber-js/max";
5
+ export type { PhoneNumber };
4
6
  /**
5
7
  * Re-exported under our own name rather than importing CountryCode directly
6
8
  * everywhere, so a future need to diverge (or re-narrow) has one place to do
@@ -57,8 +57,8 @@ export { refreshAccessToken } from "./api/tokenRefresh.js";
57
57
  export type { RefreshableStore } from "./api/userClient.js";
58
58
  export { default as userClient, injectStore, injectUserAuth, RequestOfflineError, resetRefreshState, SESSION_EXPIRED_CODE, SESSION_REVOKED_CODE, } from "./api/userClient.js";
59
59
  export { isWorkspaceChangedError, WORKSPACE_CHANGED_CODE, WorkspaceChangedError, } from "./api/workspace.js";
60
- export type { KeychainLike, LegacyTokenKeys, SecureCredentials, SessionEndDetail, SessionEndedListener, SessionEndReason, StoredToken, } from "./auth/authStore.js";
61
- export { ACCESS_TOKEN_KEY, addSessionEndedListener, clearSession, getSessionUser, getToken, LEGACY_REFRESH_TOKEN_LIFETIME_MS, REFRESH_TOKEN_KEY, removeSessionUser, removeToken, SESSION_USER_KEY, setKeychainImplementation, setLegacyTokenKeys, storeSessionUser, storeToken, } from "./auth/authStore.js";
60
+ export type { KeychainLike, SecureCredentials, SessionEndDetail, SessionEndedListener, SessionEndReason, StoredToken, } from "./auth/authStore.js";
61
+ export { ACCESS_TOKEN_KEY, addSessionEndedListener, clearSession, getSessionUser, getToken, REFRESH_TOKEN_KEY, removeSessionUser, removeToken, SESSION_USER_KEY, setKeychainImplementation, storeSessionUser, storeToken, } from "./auth/authStore.js";
62
62
  export type { JwtClaims } from "./auth/jwt.js";
63
63
  export { decodeJWT, getJWTExpiry, isJWTExpired } from "./auth/jwt.js";
64
64
  export type { Config, Environment, LogLevel } from "./config/index.js";
@@ -67,9 +67,9 @@ export { ENVIRONMENT_APP_ID_SUFFIX, installedAppId } from "./config/appIdentity.
67
67
  export type { DeepLinkConfig, DeepLinkRoute, ParsedLink } from "./deepLink/index.js";
68
68
  export { DeepLink, parseDeepLink, useDeepLink } from "./deepLink/index.js";
69
69
  export type { ApiError, ResponseSchema } from "./errors/index.js";
70
- export { apiErrorMessage, CONTRACT_ERROR_CODE, extractApiError, isApiError, isNoResponse, NETWORK_CODE, OFFLINE_CODE, OFFLINE_MESSAGE, parseResponse, REQUEST_CANCELED_CODE, SERVER_FAILURE_MESSAGE, TIMEOUT_CODE, TIMEOUT_MESSAGE, toFieldPath, UNEXPECTED_MESSAGE, UNREACHABLE_MESSAGE, } from "./errors/index.js";
70
+ export { apiErrorMessage, CONTRACT_ERROR_CODE, extractApiError, isApiError, isNoResponse, NETWORK_CHECK_CODE, NETWORK_CHECK_MESSAGE, NETWORK_CODE, OFFLINE_CODE, OFFLINE_MESSAGE, parseResponse, REQUEST_CANCELED_CODE, SERVER_FAILURE_MESSAGE, TIMEOUT_CODE, TIMEOUT_MESSAGE, toFieldPath, UNEXPECTED_MESSAGE, UNREACHABLE_MESSAGE, } from "./errors/index.js";
71
71
  export type { DateInput, DateOrder, DateStyle, DateValue, FormatCurrencyOptions, FormatDateOptions, FormatDateTimeOptions, FormatMinorOptions, FormatNumberOptions, FormatPercentOptions, FormatPhoneOptions, FormatRelativeOptions, FormatTimeOptions, FormatterConfig, NumberGrouping, NumberStyle, PhoneCountry, PhoneCountryEntry, PhoneNumber, PhoneNumberType, PhoneParts, PhoneValidationKind, TimeStyle, ZoneMode, ZoneOption, } from "./formatters/index.js";
72
- export { AsYouType, addDays, clampNationalNumber, configureFormatters, countryFlagEmoji, detectPhoneCountry, diffMs, formatCompactNumber, formatCurrency, formatDate, formatDateDDMMMYYYY, formatDateISO, formatDatePattern, formatDateTime, formatMinor, formatNumber, formatPercent, formatPhone, formatPhoneAsTyped, formatRelative, formatRelativeTime, formatTime, formatTime12h, formatTimeInWindowsZone, formatTimeInZone, getCountries, getCountryCallingCode, getFormatterConfig, getInitials, getPhoneCountries, groupingForLocale, isDateAfter, isDateBefore, isSameDay, isSupportedCountry, isValidNationalNumber, isValidPhoneNumber, maxNationalNumberLength, normalizePhone, parsePhoneNumber, parsePhoneNumberFromString, splitPhoneNumber, startOfDay, validatePhoneNumberLength, } from "./formatters/index.js";
72
+ export { AsYouType, addDays, clampNationalNumber, configureFormatters, countryFlagEmoji, detectPhoneCountry, diffMs, formatCompactNumber, formatCurrency, formatDate, formatDateISO, formatDatePattern, formatDateTime, formatMinor, formatNumber, formatPercent, formatPhone, formatPhoneAsTyped, formatRelative, formatRelativeTime, formatTime, formatTime12h, formatTimeInWindowsZone, formatTimeInZone, getCountries, getCountryCallingCode, getFormatterConfig, getInitials, getPhoneCountries, groupingForLocale, isDateAfter, isDateBefore, isSameDay, isSupportedCountry, isValidNationalNumber, isValidPhoneNumber, maxNationalNumberLength, normalizePhone, parsePhoneNumber, parsePhoneNumberFromString, splitPhoneNumber, startOfDay, validatePhoneNumberLength, } from "./formatters/index.js";
73
73
  export type { IdlePhase, IdleTimeoutOptions, IdleTimeoutState, IdleTouchProps } from "./idle/index.js";
74
74
  export { IDLE_LAST_ACTIVITY_KEY, reportIdleActivity, useIdleTimeout } from "./idle/index.js";
75
75
  export type { InitConfig } from "./initSDK.js";
@@ -85,10 +85,10 @@ export { addNetworkStatusListener, getNetworkStatus, setNetworkStatusImplementat
85
85
  export type { PushStatus } from "./push/status.js";
86
86
  export { PUSH_STATUS } from "./push/status.js";
87
87
  export type { AsyncStorageLike, StorageApi } from "./storage/index.js";
88
- export { isStorageAvailable, Storage, setStorageImplementation } from "./storage/index.js";
88
+ export { Storage, setStorageImplementation } from "./storage/index.js";
89
89
  export { encodeBase64 } from "./utils/base64.js";
90
90
  export type { FieldRule, FieldRuleSet, PasswordRules } from "./validators/index.js";
91
91
  export { checkFields, FIELD_RULE_MESSAGES, fieldRules, isAlphanumeric, isBetween, isEmail, isHexColor, isInteger, isNonEmpty, isNumeric, isPhone, isStrongPassword, isUrl, maxLength, minLength, refineWith, } from "./validators/index.js";
92
- export type { DeviceInfoLike, ParsedVersion, Platform, UpdateInfo, UpdateType, VersionCheckResult, VersionCheckType, VersionComparison, VersionData, } from "./versionCheck/index.js";
93
- export { isBuildBelowMinimum, parseBuildNumber, setDeviceInfoImplementation, useVersionCheck, VersionCheck, } from "./versionCheck/index.js";
92
+ export type { DeviceInfoLike, Platform, UpdateInfo, UpdateType, VersionCheckResult, VersionCheckType, } from "./versionCheck/index.js";
93
+ export { isBuildBelowMinimum, parseBuildNumber, useVersionCheck, VersionCheck, } from "./versionCheck/index.js";
94
94
  //# sourceMappingURL=index.d.ts.map
@@ -1,7 +1,7 @@
1
1
  import { type GstState } from "./gstStates.g.js";
2
2
  /** The current state a valid GSTIN belongs to: a retired code resolves to its replacement, or null when the GSTIN is not valid. */
3
3
  export declare const currentStateForGstin: (value: unknown) => GstState | null;
4
- /** The state a stored place of supply names, in the printed form "Karnataka (29)" or a bare name, or null. */
4
+ /** The state a stored place of supply names in the printed form "Karnataka (29)", or null. */
5
5
  export declare const gstStateFromPlaceOfSupply: (value: unknown) => GstState | null;
6
6
  /** How the place of supply prints on a tax document, such as "Karnataka (29)". */
7
7
  export declare const placeOfSupplyLabel: (state: GstState) => string;
@@ -5,7 +5,7 @@
5
5
  import { type KeychainLike } from "./auth/authStore.js";
6
6
  import { type Environment, type LogLevel } from "./config/index.js";
7
7
  import { type RemoteLogger } from "./logger/index.js";
8
- import { type NetInfoLike } from "./network/networkStatus.js";
8
+ import { type NetworkStatusLike } from "./network/networkStatus.js";
9
9
  import { setStorageImplementation } from "./storage/index.js";
10
10
  export interface InitConfig {
11
11
  /** Your API base URL (required) */
@@ -56,9 +56,8 @@ export interface InitConfig {
56
56
  * The native modules that fill the seams the library does not import.
57
57
  *
58
58
  * Passing them here is strongly preferred over calling each setter, because
59
- * forgetting one is silent: storage returns falsy and network status reports
60
- * optimistic online, so an app looks like it works and simply never persists
61
- * anything. The pilot migration wired NONE of them and nothing said so.
59
+ * forgetting one is silent: network status reports optimistic online, so an
60
+ * app looks like it works while it never sees the device go offline.
62
61
  *
63
62
  * Every value is whatever that surface's package exports, or an Expo adapter
64
63
  * from its own import path. See docs/expo.md.
@@ -66,7 +65,7 @@ export interface InitConfig {
66
65
  backends?: {
67
66
  storage?: Parameters<typeof setStorageImplementation>[0] | undefined;
68
67
  keychain?: KeychainLike | null | undefined;
69
- network?: NetInfoLike | null | undefined;
68
+ network?: NetworkStatusLike | null | undefined;
70
69
  } | undefined;
71
70
  }
72
71
  /**
@@ -1,6 +1,5 @@
1
1
  import { type AccountIdProvider, type InstallationIdProvider } from "./api/clientHeaders.js";
2
2
  import type { RefreshableStore } from "./api/tokenRefresh.js";
3
- import { type LegacyTokenKeys } from "./auth/authStore.js";
4
3
  /** The tokens a refresh response carries, with their expiry timestamps. */
5
4
  export interface TokenRefreshResult {
6
5
  accessToken: string;
@@ -52,12 +51,6 @@ export interface UserAuthOptions {
52
51
  * and no header goes out.
53
52
  */
54
53
  installationId?: InstallationIdProvider | undefined;
55
- /**
56
- * The secure-store keys the app kept its session under before this library. The first token
57
- * read that finds the library's keys empty moves a session found there and deletes the old
58
- * keys, so the release that adopts the library signs nobody out.
59
- */
60
- legacyKeys?: LegacyTokenKeys | undefined;
61
54
  }
62
55
  /**
63
56
  * Wire the user client to the app: the Redux store it dispatches `logout` to,
@@ -15,7 +15,7 @@ interface NetInfoStateLike {
15
15
  isInternetReachable: boolean | null;
16
16
  type?: string | undefined;
17
17
  }
18
- export interface NetInfoLike {
18
+ export interface NetworkStatusLike {
19
19
  fetch: () => Promise<NetInfoStateLike>;
20
20
  addEventListener: (cb: (state: NetInfoStateLike) => void) => () => void;
21
21
  }
@@ -24,7 +24,7 @@ export interface NetInfoLike {
24
24
  * to reach error paths that a healthy device never takes; it is not the way an
25
25
  * app is meant to configure the library. Pass `null` to restore expo-network.
26
26
  */
27
- export declare const setNetworkStatusImplementation: (impl: NetInfoLike | null) => void;
27
+ export declare const setNetworkStatusImplementation: (impl: NetworkStatusLike | null) => void;
28
28
  /**
29
29
  * Imperative one-shot fetch of current network status. Resolves to the default
30
30
  * online status when NetInfo is unavailable so callers never crash.
@@ -46,5 +46,5 @@ export declare const getLastKnownNetworkStatus: () => Promise<NetworkStatus>;
46
46
  * Re-reads the status each time the app returns to the foreground.
47
47
  */
48
48
  export declare const useNetworkStatus: () => NetworkStatus;
49
- export type { NetInfoLike as NetworkStatusLike };
49
+ export {};
50
50
  //# sourceMappingURL=networkStatus.d.ts.map