@webority/mobile-core 0.19.1 → 0.88.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/userClient.js +1 -1
- package/lib/commonjs/auth/authStore.js +1 -1
- package/lib/commonjs/download/index.js +1 -1
- package/lib/commonjs/geolocation/index.js +1 -1
- package/lib/commonjs/index.js +1 -1
- package/lib/commonjs/network/networkStatus.js +1 -1
- package/lib/commonjs/sqlite/index.js +1 -1
- package/lib/commonjs/versionCheck/appBuild.js +1 -1
- package/lib/typescript/commonjs/api/baseUrl.d.ts +1 -1
- package/lib/typescript/commonjs/api/clientHeaders.d.ts +2 -2
- package/lib/typescript/commonjs/api/curl.d.ts +1 -1
- package/lib/typescript/commonjs/api/minAppVersion.d.ts +1 -1
- package/lib/typescript/commonjs/api/multipart.d.ts +1 -1
- package/lib/typescript/commonjs/api/publicClient.d.ts +2 -2
- package/lib/typescript/commonjs/api/requestDefaults.d.ts +1 -1
- package/lib/typescript/commonjs/api/retry.d.ts +2 -2
- package/lib/typescript/commonjs/api/tokenRefresh.d.ts +2 -2
- package/lib/typescript/commonjs/api/userClient.d.ts +4 -4
- package/lib/typescript/commonjs/api/workspace.d.ts +1 -1
- package/lib/typescript/commonjs/auth/authStore.d.ts +1 -1
- package/lib/typescript/commonjs/auth/index.d.ts +4 -4
- package/lib/typescript/commonjs/config/index.d.ts +2 -2
- package/lib/typescript/commonjs/download/adapters/expoFs.d.ts +1 -1
- package/lib/typescript/commonjs/download/index.d.ts +3 -3
- package/lib/typescript/commonjs/errors/extractApiError.d.ts +1 -1
- package/lib/typescript/commonjs/errors/index.d.ts +2 -2
- package/lib/typescript/commonjs/formatters/currency.d.ts +1 -1
- package/lib/typescript/commonjs/formatters/date.d.ts +3 -3
- package/lib/typescript/commonjs/formatters/dateMath.d.ts +3 -3
- package/lib/typescript/commonjs/formatters/formatConfig.d.ts +4 -4
- package/lib/typescript/commonjs/formatters/house.d.ts +3 -3
- package/lib/typescript/commonjs/formatters/index.d.ts +13 -13
- package/lib/typescript/commonjs/formatters/number.d.ts +1 -1
- package/lib/typescript/commonjs/formatters/phone.d.ts +4 -4
- package/lib/typescript/commonjs/geolocation/adapters/expoLocation.d.ts +1 -1
- package/lib/typescript/commonjs/geolocation/index.d.ts +3 -3
- package/lib/typescript/commonjs/index.d.ts +44 -44
- package/lib/typescript/commonjs/initSDK.d.ts +5 -5
- package/lib/typescript/commonjs/initUserAuth.d.ts +2 -2
- package/lib/typescript/commonjs/logger/crashlytics.d.ts +1 -1
- package/lib/typescript/commonjs/logger/index.d.ts +1 -1
- package/lib/typescript/commonjs/network/index.d.ts +2 -2
- package/lib/typescript/commonjs/network/networkStatus.d.ts +1 -1
- package/lib/typescript/commonjs/permissions/index.d.ts +4 -4
- package/lib/typescript/commonjs/push/index.d.ts +4 -4
- package/lib/typescript/commonjs/push/push.d.ts +6 -6
- package/lib/typescript/commonjs/push/task.d.ts +2 -2
- package/lib/typescript/commonjs/query/apiBaseQuery.d.ts +5 -5
- package/lib/typescript/commonjs/query/createAppApi.d.ts +3 -3
- package/lib/typescript/commonjs/query/index.d.ts +10 -10
- package/lib/typescript/commonjs/query/listeners.d.ts +1 -1
- package/lib/typescript/commonjs/query/paging.d.ts +2 -2
- package/lib/typescript/commonjs/query/persistedQueries.d.ts +2 -2
- package/lib/typescript/commonjs/query/tags.d.ts +2 -2
- package/lib/typescript/commonjs/redux/errorToastMiddleware.d.ts +3 -3
- package/lib/typescript/commonjs/redux/index.d.ts +5 -5
- package/lib/typescript/commonjs/redux/rootReducer.d.ts +1 -1
- package/lib/typescript/commonjs/review/index.d.ts +3 -3
- package/lib/typescript/commonjs/share/index.d.ts +1 -1
- package/lib/typescript/commonjs/smsRetriever/index.d.ts +1 -1
- package/lib/typescript/commonjs/specs/NativeSmsRetriever.d.ts +1 -1
- package/lib/typescript/commonjs/sqlite/adapters/expo.d.ts +1 -1
- package/lib/typescript/commonjs/sqlite/index.d.ts +4 -5
- package/lib/typescript/commonjs/storage/index.d.ts +2 -2
- package/lib/typescript/commonjs/types/axios.d.ts +2 -2
- package/lib/typescript/commonjs/updates/index.d.ts +2 -2
- package/lib/typescript/commonjs/updates/updates.d.ts +1 -1
- package/lib/typescript/commonjs/utils/imageCompression.d.ts +4 -4
- package/lib/typescript/commonjs/utils/index.d.ts +2 -2
- package/lib/typescript/commonjs/versionCheck/index.d.ts +6 -6
- package/lib/typescript/module/api/baseUrl.d.ts +1 -1
- package/lib/typescript/module/api/clientHeaders.d.ts +2 -2
- package/lib/typescript/module/api/curl.d.ts +1 -1
- package/lib/typescript/module/api/minAppVersion.d.ts +1 -1
- package/lib/typescript/module/api/multipart.d.ts +1 -1
- package/lib/typescript/module/api/publicClient.d.ts +2 -2
- package/lib/typescript/module/api/requestDefaults.d.ts +1 -1
- package/lib/typescript/module/api/retry.d.ts +2 -2
- package/lib/typescript/module/api/tokenRefresh.d.ts +2 -2
- package/lib/typescript/module/api/userClient.d.ts +4 -4
- package/lib/typescript/module/api/workspace.d.ts +1 -1
- package/lib/typescript/module/auth/authStore.d.ts +1 -1
- package/lib/typescript/module/auth/index.d.ts +4 -4
- package/lib/typescript/module/config/index.d.ts +2 -2
- package/lib/typescript/module/download/adapters/expoFs.d.ts +1 -1
- package/lib/typescript/module/download/index.d.ts +3 -3
- package/lib/typescript/module/errors/extractApiError.d.ts +1 -1
- package/lib/typescript/module/errors/index.d.ts +2 -2
- package/lib/typescript/module/formatters/currency.d.ts +1 -1
- package/lib/typescript/module/formatters/date.d.ts +3 -3
- package/lib/typescript/module/formatters/dateMath.d.ts +3 -3
- package/lib/typescript/module/formatters/formatConfig.d.ts +4 -4
- package/lib/typescript/module/formatters/house.d.ts +3 -3
- package/lib/typescript/module/formatters/index.d.ts +13 -13
- package/lib/typescript/module/formatters/number.d.ts +1 -1
- package/lib/typescript/module/formatters/phone.d.ts +4 -4
- package/lib/typescript/module/geolocation/adapters/expoLocation.d.ts +1 -1
- package/lib/typescript/module/geolocation/index.d.ts +3 -3
- package/lib/typescript/module/index.d.ts +44 -44
- package/lib/typescript/module/initSDK.d.ts +5 -5
- package/lib/typescript/module/initUserAuth.d.ts +2 -2
- package/lib/typescript/module/logger/crashlytics.d.ts +1 -1
- package/lib/typescript/module/logger/index.d.ts +1 -1
- package/lib/typescript/module/network/index.d.ts +2 -2
- package/lib/typescript/module/network/networkStatus.d.ts +1 -1
- package/lib/typescript/module/permissions/index.d.ts +4 -4
- package/lib/typescript/module/push/index.d.ts +4 -4
- package/lib/typescript/module/push/push.d.ts +6 -6
- package/lib/typescript/module/push/task.d.ts +2 -2
- package/lib/typescript/module/query/apiBaseQuery.d.ts +5 -5
- package/lib/typescript/module/query/createAppApi.d.ts +3 -3
- package/lib/typescript/module/query/index.d.ts +10 -10
- package/lib/typescript/module/query/listeners.d.ts +1 -1
- package/lib/typescript/module/query/paging.d.ts +2 -2
- package/lib/typescript/module/query/persistedQueries.d.ts +2 -2
- package/lib/typescript/module/query/tags.d.ts +2 -2
- package/lib/typescript/module/redux/errorToastMiddleware.d.ts +3 -3
- package/lib/typescript/module/redux/index.d.ts +5 -5
- package/lib/typescript/module/redux/rootReducer.d.ts +1 -1
- package/lib/typescript/module/review/index.d.ts +3 -3
- package/lib/typescript/module/share/index.d.ts +1 -1
- package/lib/typescript/module/smsRetriever/index.d.ts +1 -1
- package/lib/typescript/module/specs/NativeSmsRetriever.d.ts +1 -1
- package/lib/typescript/module/sqlite/adapters/expo.d.ts +1 -1
- package/lib/typescript/module/sqlite/index.d.ts +4 -5
- package/lib/typescript/module/storage/index.d.ts +2 -2
- package/lib/typescript/module/types/axios.d.ts +2 -2
- package/lib/typescript/module/updates/index.d.ts +2 -2
- package/lib/typescript/module/updates/updates.d.ts +1 -1
- package/lib/typescript/module/utils/imageCompression.d.ts +4 -4
- package/lib/typescript/module/utils/index.d.ts +2 -2
- package/lib/typescript/module/versionCheck/index.d.ts +6 -6
- package/package.json +28 -2
- package/src/specs/NativeSmsRetriever.ts +6 -6
|
@@ -30,48 +30,48 @@
|
|
|
30
30
|
* client reads the bearer token. It needs no optional peer: the backend is
|
|
31
31
|
* expo-secure-store, and `expo` is required anyway.
|
|
32
32
|
*/
|
|
33
|
-
export type { AccountIdProvider, ClientKind } from
|
|
34
|
-
export { ACCOUNT_ID_HEADER, CLIENT_BUILD_HEADER, CLIENT_KIND, CLIENT_KIND_HEADER, getClientBuild } from
|
|
35
|
-
export { buildCurl, logCurl } from
|
|
36
|
-
export type { MinAppVersionListener } from
|
|
37
|
-
export { addMinAppVersionListener, getMinAppVersion, MIN_APP_VERSION_HEADER } from
|
|
38
|
-
export { default as publicClient } from
|
|
39
|
-
export { applyRequestDefaults, newCorrelationId } from
|
|
40
|
-
export type { RetryPolicy } from
|
|
41
|
-
export { attachRetry, IDEMPOTENCY_KEY_HEADER, isNeverSentError, isRetryableFailure, isRetryableStatus, retryAfterMs } from
|
|
42
|
-
export { refreshAccessToken } from
|
|
43
|
-
export type { RefreshableStore, SessionTerminationCode } from
|
|
44
|
-
export { default as userClient, injectStore, injectUserAuth, RequestOfflineError, resetRefreshState, SESSION_TERMINATION_CODES, SIGN_OUT_REASON_HEADER } from
|
|
45
|
-
export { isWorkspaceChangedError, WORKSPACE_CHANGED_CODE, WorkspaceChangedError } from
|
|
46
|
-
export type { KeychainLike, LegacyTokenKeys, SecureCredentials, SessionEndDetail, SessionEndedListener, SessionEndReason, StoredToken } from
|
|
47
|
-
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
|
|
48
|
-
export type { JwtClaims } from
|
|
49
|
-
export { decodeJWT, getJWTExpiry, isJWTExpired } from
|
|
50
|
-
export type { Config, Environment, LogLevel } from
|
|
51
|
-
export { getConfig, getConfigValue, resetConfig, setConfig } from
|
|
52
|
-
export type { DeepLinkConfig, DeepLinkRoute, ParsedLink } from
|
|
53
|
-
export { DeepLink, parseDeepLink, useDeepLink } from
|
|
54
|
-
export type { ApiError } from
|
|
55
|
-
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
|
|
56
|
-
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
|
|
57
|
-
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, isDateAfter, isDateBefore, isSameDay, isSupportedCountry, isValidNationalNumber, isValidPhoneNumber, maxNationalNumberLength, normalizePhone, parsePhoneNumber, parsePhoneNumberFromString, splitPhoneNumber, startOfDay, validatePhoneNumberLength } from
|
|
58
|
-
export type { InitConfig } from
|
|
59
|
-
export { initWebority } from
|
|
60
|
-
export type { TokenRefreshConfig, TokenRefreshResult, UserAuthOptions } from
|
|
61
|
-
export { initUserAuth } from
|
|
62
|
-
export type { DeviceContext, LoggerBreadcrumb, LoggerOptions, LoggerType, RemoteLogger, RequestFailedContext } from
|
|
63
|
-
export { configureLogger, getDeviceContext, Logger, setDeviceContext } from
|
|
64
|
-
export type { CrashlyticsModule } from
|
|
65
|
-
export { crashlyticsRemoteLogger } from
|
|
66
|
-
export type { NetworkConnectionType, NetworkStatus, NetworkStatusLike, NetworkStatusListener } from
|
|
67
|
-
export { addNetworkStatusListener, getNetworkStatus, setNetworkStatusImplementation, useNetworkStatus } from
|
|
68
|
-
export type { PushStatus } from
|
|
69
|
-
export { PUSH_STATUS } from
|
|
70
|
-
export type { AsyncStorageLike, StorageApi } from
|
|
71
|
-
export { isStorageAvailable, Storage, setStorageImplementation } from
|
|
72
|
-
export { encodeBase64 } from
|
|
73
|
-
export type { PasswordRules } from
|
|
74
|
-
export { isAadhaar, isAlphanumeric, isBetween, isEmail, isGstin, isHexColor, isIfsc, isIndianMobile, isIndianPincode, isInteger, isNonEmpty, isNumeric, isPan, isPhone, isStrongPassword, isUrl, maxLength, minLength } from
|
|
75
|
-
export type { DeviceInfoLike, ParsedVersion, Platform, UpdateInfo, UpdateType, VersionCheckResult, VersionCheckType, VersionComparison, VersionData } from
|
|
76
|
-
export { isBuildBelowMinimum, parseBuildNumber, setDeviceInfoImplementation, useVersionCheck, VersionCheck } from
|
|
33
|
+
export type { AccountIdProvider, ClientKind } from "./api/clientHeaders.js";
|
|
34
|
+
export { ACCOUNT_ID_HEADER, CLIENT_BUILD_HEADER, CLIENT_KIND, CLIENT_KIND_HEADER, getClientBuild, } from "./api/clientHeaders.js";
|
|
35
|
+
export { buildCurl, logCurl } from "./api/curl.js";
|
|
36
|
+
export type { MinAppVersionListener } from "./api/minAppVersion.js";
|
|
37
|
+
export { addMinAppVersionListener, getMinAppVersion, MIN_APP_VERSION_HEADER, } from "./api/minAppVersion.js";
|
|
38
|
+
export { default as publicClient } from "./api/publicClient.js";
|
|
39
|
+
export { applyRequestDefaults, newCorrelationId } from "./api/requestDefaults.js";
|
|
40
|
+
export type { RetryPolicy } from "./api/retry.js";
|
|
41
|
+
export { attachRetry, IDEMPOTENCY_KEY_HEADER, isNeverSentError, isRetryableFailure, isRetryableStatus, retryAfterMs, } from "./api/retry.js";
|
|
42
|
+
export { refreshAccessToken } from "./api/tokenRefresh.js";
|
|
43
|
+
export type { RefreshableStore, SessionTerminationCode } from "./api/userClient.js";
|
|
44
|
+
export { default as userClient, injectStore, injectUserAuth, RequestOfflineError, resetRefreshState, SESSION_TERMINATION_CODES, SIGN_OUT_REASON_HEADER, } from "./api/userClient.js";
|
|
45
|
+
export { isWorkspaceChangedError, WORKSPACE_CHANGED_CODE, WorkspaceChangedError, } from "./api/workspace.js";
|
|
46
|
+
export type { KeychainLike, LegacyTokenKeys, SecureCredentials, SessionEndDetail, SessionEndedListener, SessionEndReason, StoredToken, } from "./auth/authStore.js";
|
|
47
|
+
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";
|
|
48
|
+
export type { JwtClaims } from "./auth/jwt.js";
|
|
49
|
+
export { decodeJWT, getJWTExpiry, isJWTExpired } from "./auth/jwt.js";
|
|
50
|
+
export type { Config, Environment, LogLevel } from "./config/index.js";
|
|
51
|
+
export { getConfig, getConfigValue, resetConfig, setConfig } from "./config/index.js";
|
|
52
|
+
export type { DeepLinkConfig, DeepLinkRoute, ParsedLink } from "./deepLink/index.js";
|
|
53
|
+
export { DeepLink, parseDeepLink, useDeepLink } from "./deepLink/index.js";
|
|
54
|
+
export type { ApiError } from "./errors/index.js";
|
|
55
|
+
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 "./errors/index.js";
|
|
56
|
+
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";
|
|
57
|
+
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, isDateAfter, isDateBefore, isSameDay, isSupportedCountry, isValidNationalNumber, isValidPhoneNumber, maxNationalNumberLength, normalizePhone, parsePhoneNumber, parsePhoneNumberFromString, splitPhoneNumber, startOfDay, validatePhoneNumberLength, } from "./formatters/index.js";
|
|
58
|
+
export type { InitConfig } from "./initSDK.js";
|
|
59
|
+
export { initWebority } from "./initSDK.js";
|
|
60
|
+
export type { TokenRefreshConfig, TokenRefreshResult, UserAuthOptions } from "./initUserAuth.js";
|
|
61
|
+
export { initUserAuth } from "./initUserAuth.js";
|
|
62
|
+
export type { DeviceContext, LoggerBreadcrumb, LoggerOptions, LoggerType, RemoteLogger, RequestFailedContext, } from "./logger/index.js";
|
|
63
|
+
export { configureLogger, getDeviceContext, Logger, setDeviceContext } from "./logger/index.js";
|
|
64
|
+
export type { CrashlyticsModule } from "./logger/crashlytics.js";
|
|
65
|
+
export { crashlyticsRemoteLogger } from "./logger/crashlytics.js";
|
|
66
|
+
export type { NetworkConnectionType, NetworkStatus, NetworkStatusLike, NetworkStatusListener, } from "./network/index.js";
|
|
67
|
+
export { addNetworkStatusListener, getNetworkStatus, setNetworkStatusImplementation, useNetworkStatus, } from "./network/index.js";
|
|
68
|
+
export type { PushStatus } from "./push/status.js";
|
|
69
|
+
export { PUSH_STATUS } from "./push/status.js";
|
|
70
|
+
export type { AsyncStorageLike, StorageApi } from "./storage/index.js";
|
|
71
|
+
export { isStorageAvailable, Storage, setStorageImplementation } from "./storage/index.js";
|
|
72
|
+
export { encodeBase64 } from "./utils/base64.js";
|
|
73
|
+
export type { PasswordRules } from "./validators/index.js";
|
|
74
|
+
export { isAadhaar, isAlphanumeric, isBetween, isEmail, isGstin, isHexColor, isIfsc, isIndianMobile, isIndianPincode, isInteger, isNonEmpty, isNumeric, isPan, isPhone, isStrongPassword, isUrl, maxLength, minLength, } from "./validators/index.js";
|
|
75
|
+
export type { DeviceInfoLike, ParsedVersion, Platform, UpdateInfo, UpdateType, VersionCheckResult, VersionCheckType, VersionComparison, VersionData, } from "./versionCheck/index.js";
|
|
76
|
+
export { isBuildBelowMinimum, parseBuildNumber, setDeviceInfoImplementation, useVersionCheck, VersionCheck, } from "./versionCheck/index.js";
|
|
77
77
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* Simple initialization API for Webority packages
|
|
3
3
|
* One function to configure everything needed
|
|
4
4
|
*/
|
|
5
|
-
import { type KeychainLike } from
|
|
6
|
-
import { type Environment, type LogLevel } from
|
|
7
|
-
import { type RemoteLogger } from
|
|
8
|
-
import { type NetInfoLike } from
|
|
9
|
-
import { setStorageImplementation } from
|
|
5
|
+
import { type KeychainLike } from "./auth/authStore.js";
|
|
6
|
+
import { type Environment, type LogLevel } from "./config/index.js";
|
|
7
|
+
import { type RemoteLogger } from "./logger/index.js";
|
|
8
|
+
import { type NetInfoLike } from "./network/networkStatus.js";
|
|
9
|
+
import { setStorageImplementation } from "./storage/index.js";
|
|
10
10
|
export interface InitConfig {
|
|
11
11
|
/** Your API base URL (required) */
|
|
12
12
|
baseUrl: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { AccountIdProvider } from
|
|
2
|
-
import { type LegacyTokenKeys } from
|
|
1
|
+
import type { AccountIdProvider } from "./api/clientHeaders.js";
|
|
2
|
+
import { type LegacyTokenKeys } from "./auth/authStore.js";
|
|
3
3
|
/** The tokens a refresh response carries, with their expiry timestamps. */
|
|
4
4
|
export interface TokenRefreshResult {
|
|
5
5
|
accessToken: string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export type { NetworkConnectionType, NetworkStatus, NetworkStatusLike, NetworkStatusListener } from
|
|
2
|
-
export { addNetworkStatusListener, getNetworkStatus, setNetworkStatusImplementation, useNetworkStatus } from
|
|
1
|
+
export type { NetworkConnectionType, NetworkStatus, NetworkStatusLike, NetworkStatusListener, } from "./networkStatus.js";
|
|
2
|
+
export { addNetworkStatusListener, getNetworkStatus, setNetworkStatusImplementation, useNetworkStatus, } from "./networkStatus.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type NetworkConnectionType =
|
|
1
|
+
export type NetworkConnectionType = "unknown" | "none" | "wifi" | "cellular" | "bluetooth" | "ethernet" | "wimax" | "vpn" | "other";
|
|
2
2
|
export interface NetworkStatus {
|
|
3
3
|
/** True when the device has any network connection. */
|
|
4
4
|
isConnected: boolean;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
export type PermissionKind =
|
|
1
|
+
export type PermissionKind = "camera" | "microphone" | "photos" | "photosAdd" | "mediaLibrary" | "location" | "locationAlways" | "contacts" | "calendar" | "reminders" | "notifications" | "bluetooth" | "storage";
|
|
2
2
|
/**
|
|
3
3
|
* `undetermined`: never asked, so a request shows the system prompt. `denied`: refused,
|
|
4
4
|
* and a request can still show the prompt (Android after one refusal). `blocked`: the
|
|
5
5
|
* system will not show the prompt again; only Settings can change it.
|
|
6
6
|
*/
|
|
7
|
-
export type PermissionStatus =
|
|
7
|
+
export type PermissionStatus = "unavailable" | "undetermined" | "denied" | "limited" | "granted" | "blocked";
|
|
8
8
|
/** The shared response shape every Expo permission function returns. */
|
|
9
9
|
interface ExpoPermissionResponse {
|
|
10
|
-
status:
|
|
10
|
+
status: "granted" | "denied" | "undetermined";
|
|
11
11
|
granted: boolean;
|
|
12
12
|
canAskAgain: boolean;
|
|
13
13
|
/** iOS partial photo access, from expo-image-picker's MediaLibraryPermissionResponse. */
|
|
14
|
-
accessPrivileges?:
|
|
14
|
+
accessPrivileges?: "all" | "limited" | "none";
|
|
15
15
|
}
|
|
16
16
|
interface ExpoPermissionFns {
|
|
17
17
|
check: () => Promise<ExpoPermissionResponse>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export type { EnablePushOptions, PushAction, PushActionHandler, PushAndroidChannel, PushApnsEnvironment, PushCategory, PushCategoryAction, PushConfig, PushDevice, PushLocalNotification, PushModules, PushNotificationsLike, PushPlatform, PushReceived, PushReceiveHandler, PushState } from
|
|
2
|
-
export { disablePush, dismissAllNotifications, enablePush, initPush, notifyLocal, onAction, onReceive, resetPush, setBadgeCount, setCategories, setPushImplementation, usePush } from
|
|
3
|
-
export type { PushStatus } from
|
|
4
|
-
export { PUSH_STATUS } from
|
|
1
|
+
export type { EnablePushOptions, PushAction, PushActionHandler, PushAndroidChannel, PushApnsEnvironment, PushCategory, PushCategoryAction, PushConfig, PushDevice, PushLocalNotification, PushModules, PushNotificationsLike, PushPlatform, PushReceived, PushReceiveHandler, PushState, } from "./push.js";
|
|
2
|
+
export { disablePush, dismissAllNotifications, enablePush, initPush, notifyLocal, onAction, onReceive, resetPush, setBadgeCount, setCategories, setPushImplementation, usePush, } from "./push.js";
|
|
3
|
+
export type { PushStatus } from "./status.js";
|
|
4
|
+
export { PUSH_STATUS } from "./status.js";
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { PushStatus } from
|
|
2
|
-
export type PushPlatform =
|
|
1
|
+
import type { PushStatus } from "./status.js";
|
|
2
|
+
export type PushPlatform = "Fcm" | "Apns";
|
|
3
3
|
/** Which APNs gateway accepts this build's token: the sandbox for development signing, else production. */
|
|
4
|
-
export type PushApnsEnvironment =
|
|
4
|
+
export type PushApnsEnvironment = "Development" | "Production";
|
|
5
5
|
export interface PushDevice {
|
|
6
6
|
installationId: string;
|
|
7
7
|
platform: PushPlatform;
|
|
@@ -38,7 +38,7 @@ export interface EnablePushOptions {
|
|
|
38
38
|
export interface PushAndroidChannel {
|
|
39
39
|
id: string;
|
|
40
40
|
name: string;
|
|
41
|
-
importance?:
|
|
41
|
+
importance?: "default" | "high";
|
|
42
42
|
}
|
|
43
43
|
export interface PushConfig {
|
|
44
44
|
getInstallationId: () => Promise<string> | string;
|
|
@@ -97,7 +97,7 @@ export interface PushState {
|
|
|
97
97
|
enabled: boolean;
|
|
98
98
|
}
|
|
99
99
|
interface PermissionResponseLike {
|
|
100
|
-
status:
|
|
100
|
+
status: "granted" | "denied" | "undetermined";
|
|
101
101
|
granted: boolean;
|
|
102
102
|
canAskAgain: boolean;
|
|
103
103
|
}
|
|
@@ -193,7 +193,7 @@ export interface PushModules {
|
|
|
193
193
|
/** The bundle id, from expo-application. */
|
|
194
194
|
applicationId: string | null;
|
|
195
195
|
/** expo-application's `getIosPushNotificationServiceEnvironmentAsync`; iOS only. */
|
|
196
|
-
getApnsEnvironment: () => Promise<
|
|
196
|
+
getApnsEnvironment: () => Promise<"development" | "production" | null>;
|
|
197
197
|
}
|
|
198
198
|
/**
|
|
199
199
|
* Replace the native modules. For tests and the showcase, to reach paths a
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type PushActionHandler } from
|
|
2
|
-
export type { PushAction, PushActionHandler } from
|
|
1
|
+
import { type PushActionHandler } from "./push.js";
|
|
2
|
+
export type { PushAction, PushActionHandler } from "./push.js";
|
|
3
3
|
/**
|
|
4
4
|
* Handles notification button taps in every app state, the killed app
|
|
5
5
|
* included. Call it once at module scope in the app's entry file (index.js),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { BaseQueryFn } from
|
|
2
|
-
import { type AxiosInstance, type Method, type ResponseType } from
|
|
3
|
-
import { type ApiError } from
|
|
1
|
+
import type { BaseQueryFn } from "@reduxjs/toolkit/query";
|
|
2
|
+
import { type AxiosInstance, type Method, type ResponseType } from "axios";
|
|
3
|
+
import { type ApiError } from "../errors/index.js";
|
|
4
4
|
/**
|
|
5
5
|
* What an endpoint's `query` returns. A bare string is a GET of that URL.
|
|
6
6
|
*
|
|
@@ -18,7 +18,7 @@ export interface ApiRequest {
|
|
|
18
18
|
params?: Record<string, unknown>;
|
|
19
19
|
headers?: Record<string, string>;
|
|
20
20
|
/** Only JSON-safe types belong in the store; a blob download stays a service call. */
|
|
21
|
-
responseType?: Extract<ResponseType,
|
|
21
|
+
responseType?: Extract<ResponseType, "json" | "text">;
|
|
22
22
|
timeout?: number;
|
|
23
23
|
silent?: boolean;
|
|
24
24
|
public?: boolean;
|
|
@@ -47,7 +47,7 @@ export interface ApiBaseQueryOptions {
|
|
|
47
47
|
}
|
|
48
48
|
export type ApiBaseQuery = BaseQueryFn<ApiQueryArgs, unknown, ApiError, ApiExtraOptions, ApiBaseQueryMeta>;
|
|
49
49
|
/**
|
|
50
|
-
* The
|
|
50
|
+
* The shared RTK Query base query: every call goes through our axios clients,
|
|
51
51
|
* so refresh, retry, the offline check and logging stay in one place, and a
|
|
52
52
|
* failure comes back as the same `ApiError` a thunk rejects with.
|
|
53
53
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { createApi } from
|
|
1
|
+
import { createApi } from "@reduxjs/toolkit/query/react";
|
|
2
2
|
/**
|
|
3
|
-
* The
|
|
3
|
+
* The shared `createApi` defaults. Unused data is kept a minute, and active
|
|
4
4
|
* queries refetch when the connection returns and when the user comes back to
|
|
5
5
|
* the app. Both flags only act once the app calls `setupApiListeners` on its
|
|
6
6
|
* store: window focus and online events on the web, `AppState` and the
|
|
@@ -12,7 +12,7 @@ export declare const APP_API_DEFAULTS: {
|
|
|
12
12
|
readonly refetchOnFocus: true;
|
|
13
13
|
};
|
|
14
14
|
/**
|
|
15
|
-
* `createApi` with the
|
|
15
|
+
* `createApi` with the shared defaults; anything the app passes wins. One per
|
|
16
16
|
* app, in `services/api/apiSlice`, with `baseQuery: createApiBaseQuery(...)`
|
|
17
17
|
* and the app's `tagTypes`. Imported from the React entry so endpoints get
|
|
18
18
|
* their hooks; that entry needs `react-redux`, which every app has.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export type { ApiBaseQuery, ApiBaseQueryMeta, ApiBaseQueryOptions, ApiExtraOptions, ApiQueryArgs, ApiRequest } from
|
|
2
|
-
export { createApiBaseQuery } from
|
|
3
|
-
export { APP_API_DEFAULTS, createAppApi } from
|
|
4
|
-
export { setupApiListeners } from
|
|
5
|
-
export type { ListFilterValue, ListQuery, PagedDataObject, PagedListRequest, SortOrder } from
|
|
6
|
-
export { buildListQuery, getNextPageParam, getPreviousPageParam, hasNextPage, hasPreviousPage } from
|
|
7
|
-
export type { PersistedQueries, PersistedQueriesOptions } from
|
|
8
|
-
export { createPersistedQueries, PERSISTED_QUERIES_RESTORED } from
|
|
9
|
-
export type { ApiTag, TagId } from
|
|
10
|
-
export { itemTag, LIST_TAG_ID, listTag, providesList, providesPagedList } from
|
|
1
|
+
export type { ApiBaseQuery, ApiBaseQueryMeta, ApiBaseQueryOptions, ApiExtraOptions, ApiQueryArgs, ApiRequest, } from "./apiBaseQuery.js";
|
|
2
|
+
export { createApiBaseQuery } from "./apiBaseQuery.js";
|
|
3
|
+
export { APP_API_DEFAULTS, createAppApi } from "./createAppApi.js";
|
|
4
|
+
export { setupApiListeners } from "./listeners.js";
|
|
5
|
+
export type { ListFilterValue, ListQuery, PagedDataObject, PagedListRequest, SortOrder, } from "./paging.js";
|
|
6
|
+
export { buildListQuery, getNextPageParam, getPreviousPageParam, hasNextPage, hasPreviousPage, } from "./paging.js";
|
|
7
|
+
export type { PersistedQueries, PersistedQueriesOptions } from "./persistedQueries.js";
|
|
8
|
+
export { createPersistedQueries, PERSISTED_QUERIES_RESTORED } from "./persistedQueries.js";
|
|
9
|
+
export type { ApiTag, TagId } from "./tags.js";
|
|
10
|
+
export { itemTag, LIST_TAG_ID, listTag, providesList, providesPagedList } from "./tags.js";
|
|
11
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ThunkDispatch, UnknownAction } from
|
|
1
|
+
import type { ThunkDispatch, UnknownAction } from "@reduxjs/toolkit";
|
|
2
2
|
/**
|
|
3
3
|
* Wires `refetchOnFocus` and `refetchOnReconnect` to the device. RTK's default
|
|
4
4
|
* handlers listen to `window` focus and online events, which never fire in
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The
|
|
2
|
+
* The list contract, matching Webority.Delivery: the request is
|
|
3
3
|
* `PagedListRequest` (`page` 1-based, `pageSize`, `sortBy`, `sortOrder`) plus the
|
|
4
4
|
* endpoint's filters, and the response is `PagedDataObject<T>`. The server
|
|
5
5
|
* defaults a missing page to 1 and a missing size to 20, and cuts a size over
|
|
@@ -12,7 +12,7 @@ export interface PagedDataObject<T> {
|
|
|
12
12
|
totalCount: number;
|
|
13
13
|
totalPages: number;
|
|
14
14
|
}
|
|
15
|
-
export type SortOrder =
|
|
15
|
+
export type SortOrder = "asc" | "desc";
|
|
16
16
|
export interface PagedListRequest {
|
|
17
17
|
page?: number;
|
|
18
18
|
pageSize?: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Dispatch, Middleware, UnknownAction } from
|
|
2
|
-
import type { CombinedState } from
|
|
1
|
+
import type { Dispatch, Middleware, UnknownAction } from "@reduxjs/toolkit";
|
|
2
|
+
import type { CombinedState } from "@reduxjs/toolkit/query";
|
|
3
3
|
export declare const PERSISTED_QUERIES_RESTORED = "@webority/mobile-core/query/persistedQueriesRestored";
|
|
4
4
|
export interface PersistedQueriesOptions {
|
|
5
5
|
storageKey: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { PagedDataObject } from
|
|
1
|
+
import type { PagedDataObject } from "./paging.js";
|
|
2
2
|
/**
|
|
3
|
-
* The
|
|
3
|
+
* The tag convention. A list read provides `{ type, id: 'LIST' }` plus one
|
|
4
4
|
* tag per row; a create invalidates `LIST`, an update or delete invalidates the
|
|
5
5
|
* row's tag (and `LIST` when it changes membership or order). Row ids are the
|
|
6
6
|
* public ids the API returns (D-039), never an internal key.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Middleware, MiddlewareAPI, UnknownAction } from
|
|
2
|
-
import { type ApiError } from
|
|
1
|
+
import type { Middleware, MiddlewareAPI, UnknownAction } from "@reduxjs/toolkit";
|
|
2
|
+
import { type ApiError } from "../errors/extractApiError.js";
|
|
3
3
|
/**
|
|
4
4
|
* Toasts every rejected thunk and every failed RTK Query call, so no screen has to remember
|
|
5
5
|
* to surface a failure and none words it differently. Identical source in web-core and
|
|
@@ -27,7 +27,7 @@ import { type ApiError } from '../errors/extractApiError.js';
|
|
|
27
27
|
*/
|
|
28
28
|
export type ShowErrorToast = (message: string, error: ApiError) => void;
|
|
29
29
|
/** What `onRejected` decides for one rejection: `'toast'`, `'silent'`, or nothing for the default rules. */
|
|
30
|
-
export type RejectionDecision =
|
|
30
|
+
export type RejectionDecision = "toast" | "silent" | undefined;
|
|
31
31
|
/**
|
|
32
32
|
* The product's hook into every rejection the middleware sees. `api` is the store's
|
|
33
33
|
* `dispatch` and `getState`, for a side effect that reads or updates state.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export type { ErrorToastOptions, OnRejected, RejectionDecision, ShowErrorToast } from
|
|
2
|
-
export { errorToastMiddleware, isSilentRejection } from
|
|
3
|
-
export type { RootReducerOptions } from
|
|
4
|
-
export { createRootReducer, resetState } from
|
|
5
|
-
export { SERIALIZABLE_IGNORED_ACTION_PATHS } from
|
|
1
|
+
export type { ErrorToastOptions, OnRejected, RejectionDecision, ShowErrorToast, } from "./errorToastMiddleware.js";
|
|
2
|
+
export { errorToastMiddleware, isSilentRejection } from "./errorToastMiddleware.js";
|
|
3
|
+
export type { RootReducerOptions } from "./rootReducer.js";
|
|
4
|
+
export { createRootReducer, resetState } from "./rootReducer.js";
|
|
5
|
+
export { SERIALIZABLE_IGNORED_ACTION_PATHS } from "./serializableCheck.js";
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ActionFromReducersMapObject, type Reducer, type ReducersMapObject, type StateFromReducersMapObject } from
|
|
1
|
+
import { type ActionFromReducersMapObject, type Reducer, type ReducersMapObject, type StateFromReducersMapObject } from "@reduxjs/toolkit";
|
|
2
2
|
/**
|
|
3
3
|
* Clears every slice, the RTK Query cache included, in one dispatch. Dispatch it on logout
|
|
4
4
|
* (decision 22). Not a tidy-up: a slice left behind paints the previous user's data on the
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/** The
|
|
1
|
+
/** The minimum: no more than one prompt in 90 days per user. */
|
|
2
2
|
export declare const DEFAULT_REVIEW_COOL_DOWN_DAYS = 90;
|
|
3
3
|
/** Where the last prompt is remembered, through mobile-core's `Storage`. */
|
|
4
4
|
export declare const REVIEW_PROMPT_STORAGE_KEY = "@webority/review-prompt";
|
|
5
5
|
export interface ReviewPromptOptions {
|
|
6
|
-
/** Days to wait after a prompt before the next one. Defaults to 90, the
|
|
6
|
+
/** Days to wait after a prompt before the next one. Defaults to 90, the minimum. */
|
|
7
7
|
coolDownDays?: number;
|
|
8
8
|
}
|
|
9
9
|
/** What was stored when the prompt last showed. */
|
|
@@ -13,7 +13,7 @@ export interface ReviewPromptRecord {
|
|
|
13
13
|
/** The success moment that asked. */
|
|
14
14
|
moment: string;
|
|
15
15
|
}
|
|
16
|
-
export type ReviewPromptResult =
|
|
16
|
+
export type ReviewPromptResult = "shown" | "skipped-cooldown" | "skipped-unavailable";
|
|
17
17
|
/**
|
|
18
18
|
* Sets the cool-down between prompts. Each call replaces the previous options, so
|
|
19
19
|
* `configureReviewPrompt({})` restores the default. Throws on a negative or
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* `file://` link, and a `content://` link sent through Linking carries no read
|
|
10
10
|
* grant, so the OS-open route never reached a viewer there.
|
|
11
11
|
*/
|
|
12
|
-
export type ShareErrorCode =
|
|
12
|
+
export type ShareErrorCode = "unavailable" | "failed";
|
|
13
13
|
export declare class ShareError extends Error {
|
|
14
14
|
readonly code: ShareErrorCode;
|
|
15
15
|
constructor(code: ShareErrorCode, message: string);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* expo-sqlite is the
|
|
3
|
-
*
|
|
4
|
-
* ever") — this module resolves it automatically, with no app-side wiring.
|
|
2
|
+
* expo-sqlite is the only supported SQLite driver, and this module resolves
|
|
3
|
+
* it automatically, with no app-side wiring.
|
|
5
4
|
* `setSqliteImplementation` still exists, narrowed to tests and the showcase:
|
|
6
5
|
* it injects a denying/failing backend to reach error paths a healthy device
|
|
7
6
|
* never takes, the same pattern every other injectable surface in this
|
|
@@ -65,7 +64,7 @@ export interface FindOptions {
|
|
|
65
64
|
export interface Migration {
|
|
66
65
|
version: number;
|
|
67
66
|
name?: string;
|
|
68
|
-
up: string | string[] | ((tx: Pick<Db,
|
|
67
|
+
up: string | string[] | ((tx: Pick<Db, "execute">) => Promise<void>);
|
|
69
68
|
}
|
|
70
69
|
export interface MigrateOptions {
|
|
71
70
|
/**
|
|
@@ -92,7 +91,7 @@ export interface Db {
|
|
|
92
91
|
* waits until it commits or rolls back. Inside `work` use only `tx`; a call
|
|
93
92
|
* on the database itself would wait for this transaction and never finish.
|
|
94
93
|
*/
|
|
95
|
-
transaction: <T>(work: (tx: Pick<Db,
|
|
94
|
+
transaction: <T>(work: (tx: Pick<Db, "execute" | "select" | "selectOne">) => Promise<T>) => Promise<T>;
|
|
96
95
|
insert: (table: string, row: Record<string, unknown>) => Promise<number | undefined>;
|
|
97
96
|
insertMany: (table: string, rows: Record<string, unknown>[]) => Promise<number>;
|
|
98
97
|
update: (table: string, values: Record<string, unknown>, where: Where) => Promise<number>;
|
|
@@ -7,7 +7,7 @@ interface AsyncStorageLike {
|
|
|
7
7
|
setItem: (key: string, value: string) => Promise<void>;
|
|
8
8
|
removeItem: (key: string) => Promise<void>;
|
|
9
9
|
/**
|
|
10
|
-
* The batch API exists under TWO names, and both are live in
|
|
10
|
+
* The batch API exists under TWO names, and both are live in apps today.
|
|
11
11
|
*
|
|
12
12
|
* `@react-native-async-storage/async-storage` 3 renamed the v1 trio and
|
|
13
13
|
* changed their shapes: `getMany` returns a Record where `multiGet` returned
|
|
@@ -15,7 +15,7 @@ interface AsyncStorageLike {
|
|
|
15
15
|
* names are still what `expo-sqlite/kv-store` and AsyncStorage 2 expose.
|
|
16
16
|
*
|
|
17
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.
|
|
18
|
+
* silently falls through to the per-key loop below. Apps pin
|
|
19
19
|
* AsyncStorage 3, so recognising only the v1 names put every consumer on N
|
|
20
20
|
* round-trips per batch with nothing to notice.
|
|
21
21
|
*/
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
* point because it names expo-updates, an optional peer: Metro resolves every require reachable
|
|
4
4
|
* from an import, so keeping it off the main barrel lets an app without OTA skip the package.
|
|
5
5
|
*/
|
|
6
|
-
export type { OtaUpdatesConfig, OtaUpdatesState, OtaUpdatesStatus, UpdatesModuleLike } from
|
|
7
|
-
export { applyOtaUpdate, checkForOtaUpdate, DEFAULT_MIN_CHECK_INTERVAL_MS, initOtaUpdates, normalizeAppIdentity, setOtaUpdatesImplementation, stopOtaUpdates, useOtaUpdates } from
|
|
6
|
+
export type { OtaUpdatesConfig, OtaUpdatesState, OtaUpdatesStatus, UpdatesModuleLike, } from "./updates.js";
|
|
7
|
+
export { applyOtaUpdate, checkForOtaUpdate, DEFAULT_MIN_CHECK_INTERVAL_MS, initOtaUpdates, normalizeAppIdentity, setOtaUpdatesImplementation, stopOtaUpdates, useOtaUpdates, } from "./updates.js";
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -60,7 +60,7 @@ export interface OtaUpdatesConfig {
|
|
|
60
60
|
* `unavailable`: OTA is off in this build (a debug build, or expo-updates not installed).
|
|
61
61
|
* `ready`: an update is downloaded and applies on the next cold start, or at `applyOtaUpdate()`.
|
|
62
62
|
*/
|
|
63
|
-
export type OtaUpdatesStatus =
|
|
63
|
+
export type OtaUpdatesStatus = "unavailable" | "idle" | "checking" | "downloading" | "ready" | "error";
|
|
64
64
|
export interface OtaUpdatesState {
|
|
65
65
|
status: OtaUpdatesStatus;
|
|
66
66
|
/** The update now running; null for the bundle embedded in the store build. */
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* capture and a delayed save, and uploading the empty result is a certain
|
|
10
10
|
* server rejection that can wedge an outbox.
|
|
11
11
|
* 2. Decodes the photo ONCE and reads its size. The longer side is brought
|
|
12
|
-
* down to `maxSize` (1500 by default
|
|
12
|
+
* down to `maxSize` (1500 by default); a photo already
|
|
13
13
|
* within it is never enlarged.
|
|
14
14
|
* 3. Re-encodes at a quality picked from the source's real byte size (bigger
|
|
15
15
|
* files are compressed harder), or at the `quality` given. The re-encode
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
* nothing. Tests and the showcase inject a backend through
|
|
32
32
|
* `setImageCompressorImplementation`.
|
|
33
33
|
*/
|
|
34
|
-
export type ImageOutputFormat =
|
|
34
|
+
export type ImageOutputFormat = "jpg" | "png" | "webp";
|
|
35
35
|
export interface CompressImageOptions {
|
|
36
36
|
/** Bound on the LONGER side in pixels; never enlarges. Defaults to 1500. */
|
|
37
37
|
maxSize?: number;
|
|
@@ -107,7 +107,7 @@ export interface EncodeOptions {
|
|
|
107
107
|
width?: number;
|
|
108
108
|
height?: number;
|
|
109
109
|
quality: number;
|
|
110
|
-
format:
|
|
110
|
+
format: "jpeg" | "png" | "webp";
|
|
111
111
|
}
|
|
112
112
|
export interface EncodedImage {
|
|
113
113
|
uri: string;
|
|
@@ -142,7 +142,7 @@ export declare const setImageCompressorImplementation: (impl: ImageCompressorLik
|
|
|
142
142
|
* Bigger source files get compressed harder: a fixed quality either
|
|
143
143
|
* over-compresses small photos or leaves large ones too heavy to upload
|
|
144
144
|
* quickly. Unknown size falls back to the middle rung rather than assuming
|
|
145
|
-
* either extreme.
|
|
145
|
+
* either extreme.
|
|
146
146
|
*/
|
|
147
147
|
export declare const qualityForFileSize: (fileSize?: number | null) => number;
|
|
148
148
|
/**
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export type { CompressImageOptions, ImageCompressorLike } from
|
|
2
|
-
export { compressImage, ImageUnreadableError, setImageCompressorImplementation } from
|
|
1
|
+
export type { CompressImageOptions, ImageCompressorLike } from "./imageCompression.js";
|
|
2
|
+
export { compressImage, ImageUnreadableError, setImageCompressorImplementation, } from "./imageCompression.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|