@webority/mobile-core 0.149.0 → 0.152.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/README.md +47 -0
- package/lib/commonjs/api/baseUrl.js +1 -1
- package/lib/commonjs/api/contractCaller.js +1 -0
- package/lib/commonjs/api/curl.js +1 -1
- package/lib/commonjs/api/minAppVersion.js +1 -1
- package/lib/commonjs/api/requestDefaults.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/api/workspace.js +1 -1
- package/lib/commonjs/auth/authStore.js +1 -1
- package/lib/commonjs/auth/jwt.js +1 -1
- package/lib/commonjs/deepLink/index.js +1 -1
- package/lib/commonjs/download/adapters/expoFs.js +1 -1
- package/lib/commonjs/download/index.js +1 -1
- package/lib/commonjs/errors/extractApiError.js +1 -1
- package/lib/commonjs/errors/index.js +1 -1
- package/lib/commonjs/errors/parseResponse.js +1 -0
- package/lib/commonjs/errors/requestPlatform.js +1 -0
- package/lib/commonjs/formatters/currency.js +1 -1
- package/lib/commonjs/formatters/date.js +1 -1
- package/lib/commonjs/formatters/dateMath.js +1 -1
- package/lib/commonjs/formatters/formatConfig.js +1 -1
- package/lib/commonjs/formatters/house.js +1 -1
- package/lib/commonjs/formatters/number.js +1 -1
- package/lib/commonjs/formatters/phone.js +1 -1
- package/lib/commonjs/geolocation/index.js +1 -1
- package/lib/commonjs/index.js +1 -1
- package/lib/commonjs/india/gstStates.js +1 -0
- package/lib/commonjs/india/index.js +1 -1
- package/lib/commonjs/jest/setup.js +1 -0
- package/lib/commonjs/logger/crashlytics.js +1 -1
- package/lib/commonjs/logger/index.js +1 -1
- package/lib/commonjs/logger/redact.js +1 -1
- package/lib/commonjs/network/networkStatus.js +1 -1
- package/lib/commonjs/outbox/outbox.js +1 -1
- package/lib/commonjs/outbox/types.js +1 -1
- package/lib/commonjs/push/broadcasts.js +1 -1
- package/lib/commonjs/push/push.js +1 -1
- package/lib/commonjs/query/apiBaseQuery.js +1 -1
- package/lib/commonjs/query/dataState.js +1 -0
- package/lib/commonjs/query/entityVersion.js +1 -0
- package/lib/commonjs/query/index.js +1 -1
- package/lib/commonjs/query/paging.js +1 -1
- package/lib/commonjs/query/persistedQueries.js +1 -1
- package/lib/commonjs/query/tags.js +1 -1
- package/lib/commonjs/query/usePagedList.js +1 -1
- package/lib/commonjs/redux/errorToastMiddleware.js +1 -1
- package/lib/commonjs/redux/rootReducer.js +1 -1
- package/lib/commonjs/redux/sessionMiddleware.js +1 -1
- package/lib/commonjs/review/index.js +1 -1
- package/lib/commonjs/secureScreen/index.js +1 -1
- package/lib/commonjs/sqlite/index.js +1 -1
- package/lib/commonjs/storage/index.js +1 -1
- package/lib/commonjs/types/complete.js +1 -0
- package/lib/commonjs/types/formData.d.js +1 -0
- package/lib/commonjs/updates/updates.js +1 -1
- package/lib/commonjs/utils/base64.js +1 -1
- package/lib/commonjs/utils/guards.js +1 -0
- package/lib/commonjs/utils/imageCompression.js +1 -1
- package/lib/module/api/baseUrl.js +1 -1
- package/lib/module/api/contractCaller.js +1 -0
- package/lib/module/api/curl.js +1 -1
- package/lib/module/api/minAppVersion.js +1 -1
- package/lib/module/api/requestDefaults.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/api/workspace.js +1 -1
- package/lib/module/auth/authStore.js +1 -1
- package/lib/module/auth/jwt.js +1 -1
- package/lib/module/deepLink/index.js +1 -1
- package/lib/module/download/adapters/expoFs.js +1 -1
- package/lib/module/download/index.js +1 -1
- package/lib/module/errors/extractApiError.js +1 -1
- package/lib/module/errors/index.js +1 -1
- package/lib/module/errors/parseResponse.js +1 -0
- package/lib/module/errors/requestPlatform.js +1 -0
- package/lib/module/formatters/currency.js +1 -1
- package/lib/module/formatters/date.js +1 -1
- package/lib/module/formatters/dateMath.js +1 -1
- package/lib/module/formatters/formatConfig.js +1 -1
- package/lib/module/formatters/house.js +1 -1
- package/lib/module/formatters/number.js +1 -1
- package/lib/module/formatters/phone.js +1 -1
- package/lib/module/geolocation/index.js +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/india/gstStates.js +1 -0
- package/lib/module/india/index.js +1 -1
- package/lib/module/jest/setup.js +1 -0
- package/lib/module/logger/crashlytics.js +1 -1
- package/lib/module/logger/index.js +1 -1
- package/lib/module/logger/redact.js +1 -1
- package/lib/module/network/networkStatus.js +1 -1
- package/lib/module/outbox/outbox.js +1 -1
- package/lib/module/outbox/types.js +1 -1
- package/lib/module/push/broadcasts.js +1 -1
- package/lib/module/push/push.js +1 -1
- package/lib/module/query/apiBaseQuery.js +1 -1
- package/lib/module/query/dataState.js +1 -0
- package/lib/module/query/entityVersion.js +1 -0
- package/lib/module/query/index.js +1 -1
- package/lib/module/query/paging.js +1 -1
- package/lib/module/query/persistedQueries.js +1 -1
- package/lib/module/query/tags.js +1 -1
- package/lib/module/query/usePagedList.js +1 -1
- package/lib/module/redux/errorToastMiddleware.js +1 -1
- package/lib/module/redux/rootReducer.js +1 -1
- package/lib/module/redux/sessionMiddleware.js +1 -1
- package/lib/module/review/index.js +1 -1
- package/lib/module/secureScreen/index.js +1 -1
- package/lib/module/sqlite/index.js +1 -1
- package/lib/module/storage/index.js +1 -1
- package/lib/module/types/complete.js +1 -0
- package/lib/module/types/formData.d.js +1 -0
- package/lib/module/updates/updates.js +1 -1
- package/lib/module/utils/base64.js +1 -1
- package/lib/module/utils/guards.js +1 -0
- package/lib/module/utils/imageCompression.js +1 -1
- package/lib/typescript/commonjs/api/clientHeaders.d.ts +1 -1
- package/lib/typescript/commonjs/api/contractCaller.d.ts +7 -0
- package/lib/typescript/commonjs/api/fetchRetry.d.ts +3 -3
- package/lib/typescript/commonjs/api/minAppVersion.d.ts +1 -1
- package/lib/typescript/commonjs/api/retry.d.ts +11 -5
- package/lib/typescript/commonjs/api/tokenRefresh.d.ts +2 -1
- package/lib/typescript/commonjs/api/userClient.d.ts +11 -0
- package/lib/typescript/commonjs/api/workspace.d.ts +3 -3
- package/lib/typescript/commonjs/appLock/index.d.ts +1 -1
- package/lib/typescript/commonjs/attachments/index.d.ts +5 -5
- package/lib/typescript/commonjs/auth/authStore.d.ts +8 -6
- package/lib/typescript/commonjs/auth/jwt.d.ts +11 -8
- package/lib/typescript/commonjs/deepLink/index.d.ts +18 -11
- package/lib/typescript/commonjs/download/adapters/expoFs.d.ts +4 -4
- package/lib/typescript/commonjs/download/index.d.ts +16 -12
- package/lib/typescript/commonjs/errors/extractApiError.d.ts +9 -17
- package/lib/typescript/commonjs/errors/index.d.ts +2 -0
- package/lib/typescript/commonjs/errors/parseResponse.d.ts +20 -0
- package/lib/typescript/commonjs/errors/requestPlatform.d.ts +8 -0
- package/lib/typescript/commonjs/formatters/currency.d.ts +5 -5
- package/lib/typescript/commonjs/formatters/dateMath.d.ts +2 -2
- package/lib/typescript/commonjs/formatters/formatConfig.d.ts +8 -6
- package/lib/typescript/commonjs/formatters/house.d.ts +19 -20
- package/lib/typescript/commonjs/formatters/intlCache.d.ts +1 -3
- package/lib/typescript/commonjs/formatters/phone.d.ts +3 -3
- package/lib/typescript/commonjs/geolocation/adapters/expoLocation.d.ts +11 -11
- package/lib/typescript/commonjs/geolocation/index.d.ts +29 -26
- package/lib/typescript/commonjs/index.d.ts +5 -2
- package/lib/typescript/commonjs/india/gstStates.d.ts +8 -0
- package/lib/typescript/commonjs/india/gstStates.g.d.ts +1 -1
- package/lib/typescript/commonjs/india/index.d.ts +1 -0
- package/lib/typescript/commonjs/initSDK.d.ts +14 -14
- package/lib/typescript/commonjs/initUserAuth.d.ts +9 -8
- package/lib/typescript/commonjs/jest/setup.d.ts +9 -0
- package/lib/typescript/commonjs/logger/crashlytics.d.ts +5 -4
- package/lib/typescript/commonjs/logger/index.d.ts +19 -19
- package/lib/typescript/commonjs/logger/redact.d.ts +3 -1
- package/lib/typescript/commonjs/metro/types.d.ts +4 -4
- package/lib/typescript/commonjs/network/networkStatus.d.ts +1 -1
- package/lib/typescript/commonjs/outbox/types.d.ts +6 -17
- package/lib/typescript/commonjs/permissions/index.d.ts +7 -4
- package/lib/typescript/commonjs/pickers/index.d.ts +18 -18
- package/lib/typescript/commonjs/push/push.d.ts +23 -23
- package/lib/typescript/commonjs/query/apiBaseQuery.d.ts +23 -14
- package/lib/typescript/commonjs/query/dataState.d.ts +76 -0
- package/lib/typescript/commonjs/query/entityVersion.d.ts +47 -0
- package/lib/typescript/commonjs/query/index.d.ts +5 -1
- package/lib/typescript/commonjs/query/paging.d.ts +6 -5
- package/lib/typescript/commonjs/query/persistedQueries.d.ts +12 -7
- package/lib/typescript/commonjs/query/usePagedList.d.ts +11 -18
- package/lib/typescript/commonjs/redux/errorToastMiddleware.d.ts +4 -4
- package/lib/typescript/commonjs/redux/rootReducer.d.ts +1 -1
- package/lib/typescript/commonjs/review/index.d.ts +1 -1
- package/lib/typescript/commonjs/secureScreen/index.d.ts +1 -1
- package/lib/typescript/commonjs/share/index.d.ts +2 -2
- package/lib/typescript/commonjs/sqlite/index.d.ts +21 -16
- package/lib/typescript/commonjs/storage/index.d.ts +9 -9
- package/lib/typescript/commonjs/types/axios.d.ts +10 -2
- package/lib/typescript/commonjs/types/complete.d.ts +5 -0
- package/lib/typescript/commonjs/updates/updates.d.ts +20 -20
- package/lib/typescript/commonjs/utils/guards.d.ts +9 -0
- package/lib/typescript/commonjs/utils/imageCompression.d.ts +9 -9
- package/lib/typescript/commonjs/validators/index.d.ts +5 -5
- package/lib/typescript/commonjs/versionCheck/appBuild.d.ts +3 -2
- package/lib/typescript/commonjs/versionCheck/index.d.ts +4 -4
- package/lib/typescript/module/api/clientHeaders.d.ts +1 -1
- package/lib/typescript/module/api/contractCaller.d.ts +7 -0
- package/lib/typescript/module/api/fetchRetry.d.ts +3 -3
- package/lib/typescript/module/api/minAppVersion.d.ts +1 -1
- package/lib/typescript/module/api/retry.d.ts +11 -5
- package/lib/typescript/module/api/tokenRefresh.d.ts +2 -1
- package/lib/typescript/module/api/userClient.d.ts +11 -0
- package/lib/typescript/module/api/workspace.d.ts +3 -3
- package/lib/typescript/module/appLock/index.d.ts +1 -1
- package/lib/typescript/module/attachments/index.d.ts +5 -5
- package/lib/typescript/module/auth/authStore.d.ts +8 -6
- package/lib/typescript/module/auth/jwt.d.ts +11 -8
- package/lib/typescript/module/deepLink/index.d.ts +18 -11
- package/lib/typescript/module/download/adapters/expoFs.d.ts +4 -4
- package/lib/typescript/module/download/index.d.ts +16 -12
- package/lib/typescript/module/errors/extractApiError.d.ts +9 -17
- package/lib/typescript/module/errors/index.d.ts +2 -0
- package/lib/typescript/module/errors/parseResponse.d.ts +20 -0
- package/lib/typescript/module/errors/requestPlatform.d.ts +8 -0
- package/lib/typescript/module/formatters/currency.d.ts +5 -5
- package/lib/typescript/module/formatters/dateMath.d.ts +2 -2
- package/lib/typescript/module/formatters/formatConfig.d.ts +8 -6
- package/lib/typescript/module/formatters/house.d.ts +19 -20
- package/lib/typescript/module/formatters/intlCache.d.ts +1 -3
- package/lib/typescript/module/formatters/phone.d.ts +3 -3
- package/lib/typescript/module/geolocation/adapters/expoLocation.d.ts +11 -11
- package/lib/typescript/module/geolocation/index.d.ts +29 -26
- package/lib/typescript/module/index.d.ts +5 -2
- package/lib/typescript/module/india/gstStates.d.ts +8 -0
- package/lib/typescript/module/india/gstStates.g.d.ts +1 -1
- package/lib/typescript/module/india/index.d.ts +1 -0
- package/lib/typescript/module/initSDK.d.ts +14 -14
- package/lib/typescript/module/initUserAuth.d.ts +9 -8
- package/lib/typescript/module/jest/setup.d.ts +9 -0
- package/lib/typescript/module/logger/crashlytics.d.ts +5 -4
- package/lib/typescript/module/logger/index.d.ts +19 -19
- package/lib/typescript/module/logger/redact.d.ts +3 -1
- package/lib/typescript/module/metro/types.d.ts +4 -4
- package/lib/typescript/module/network/networkStatus.d.ts +1 -1
- package/lib/typescript/module/outbox/types.d.ts +6 -17
- package/lib/typescript/module/permissions/index.d.ts +7 -4
- package/lib/typescript/module/pickers/index.d.ts +18 -18
- package/lib/typescript/module/push/push.d.ts +23 -23
- package/lib/typescript/module/query/apiBaseQuery.d.ts +23 -14
- package/lib/typescript/module/query/dataState.d.ts +76 -0
- package/lib/typescript/module/query/entityVersion.d.ts +47 -0
- package/lib/typescript/module/query/index.d.ts +5 -1
- package/lib/typescript/module/query/paging.d.ts +6 -5
- package/lib/typescript/module/query/persistedQueries.d.ts +12 -7
- package/lib/typescript/module/query/usePagedList.d.ts +11 -18
- package/lib/typescript/module/redux/errorToastMiddleware.d.ts +4 -4
- package/lib/typescript/module/redux/rootReducer.d.ts +1 -1
- package/lib/typescript/module/review/index.d.ts +1 -1
- package/lib/typescript/module/secureScreen/index.d.ts +1 -1
- package/lib/typescript/module/share/index.d.ts +2 -2
- package/lib/typescript/module/sqlite/index.d.ts +21 -16
- package/lib/typescript/module/storage/index.d.ts +9 -9
- package/lib/typescript/module/types/axios.d.ts +10 -2
- package/lib/typescript/module/types/complete.d.ts +5 -0
- package/lib/typescript/module/updates/updates.d.ts +20 -20
- package/lib/typescript/module/utils/guards.d.ts +9 -0
- package/lib/typescript/module/utils/imageCompression.d.ts +9 -9
- package/lib/typescript/module/validators/index.d.ts +5 -5
- package/lib/typescript/module/versionCheck/appBuild.d.ts +3 -2
- package/lib/typescript/module/versionCheck/index.d.ts +4 -4
- package/package.json +14 -2
- package/src/specs/NativeSmsRetriever.ts +1 -1
|
@@ -18,46 +18,46 @@ export declare class GeolocationError extends Error {
|
|
|
18
18
|
}
|
|
19
19
|
export interface GeoOptions {
|
|
20
20
|
/** `fine` maps to the platform's high-accuracy (GPS) provider. Default `fine`. */
|
|
21
|
-
accuracy?: "fine" | "coarse";
|
|
22
|
-
timeoutMs?: number;
|
|
23
|
-
maximumAgeMs?: number;
|
|
21
|
+
accuracy?: "fine" | "coarse" | undefined;
|
|
22
|
+
timeoutMs?: number | undefined;
|
|
23
|
+
maximumAgeMs?: number | undefined;
|
|
24
24
|
/** Extra attempts after the first, used only for `timeout` / `position-unavailable`. */
|
|
25
|
-
retries?: number;
|
|
25
|
+
retries?: number | undefined;
|
|
26
26
|
/** A fix with a worse (larger) accuracy radius counts as `position-unavailable`. */
|
|
27
|
-
minimumAccuracyM?: number;
|
|
27
|
+
minimumAccuracyM?: number | undefined;
|
|
28
28
|
/**
|
|
29
29
|
* Pause between retries. Android's fused provider is frequently not ready on
|
|
30
30
|
* the first request after the permission grant or after location is switched
|
|
31
31
|
* on, and retrying immediately just re-collects the same failure.
|
|
32
32
|
*/
|
|
33
|
-
retryDelayMs?: number;
|
|
33
|
+
retryDelayMs?: number | undefined;
|
|
34
34
|
}
|
|
35
35
|
export interface GeoWatchOptions extends GeoOptions {
|
|
36
36
|
/** Metres the device must move before the listener fires again. */
|
|
37
|
-
distanceFilterM?: number;
|
|
38
|
-
onError?: (error: GeolocationError) => void;
|
|
37
|
+
distanceFilterM?: number | undefined;
|
|
38
|
+
onError?: ((error: GeolocationError) => void) | undefined;
|
|
39
39
|
}
|
|
40
40
|
interface NativeGeoCoords {
|
|
41
|
-
latitude?: number | null;
|
|
42
|
-
longitude?: number | null;
|
|
43
|
-
accuracy?: number | null;
|
|
44
|
-
altitude?: number | null;
|
|
45
|
-
heading?: number | null;
|
|
46
|
-
speed?: number | null;
|
|
41
|
+
latitude?: number | null | undefined;
|
|
42
|
+
longitude?: number | null | undefined;
|
|
43
|
+
accuracy?: number | null | undefined;
|
|
44
|
+
altitude?: number | null | undefined;
|
|
45
|
+
heading?: number | null | undefined;
|
|
46
|
+
speed?: number | null | undefined;
|
|
47
47
|
}
|
|
48
48
|
interface NativeGeoPosition {
|
|
49
|
-
coords?: NativeGeoCoords | null;
|
|
50
|
-
timestamp?: number | null;
|
|
49
|
+
coords?: NativeGeoCoords | null | undefined;
|
|
50
|
+
timestamp?: number | null | undefined;
|
|
51
51
|
}
|
|
52
52
|
interface NativeGeoError {
|
|
53
|
-
code?: number;
|
|
54
|
-
message?: string;
|
|
53
|
+
code?: number | undefined;
|
|
54
|
+
message?: string | undefined;
|
|
55
55
|
}
|
|
56
56
|
interface NativeGeoOptions {
|
|
57
|
-
enableHighAccuracy?: boolean;
|
|
58
|
-
timeout?: number;
|
|
59
|
-
maximumAge?: number;
|
|
60
|
-
distanceFilter?: number;
|
|
57
|
+
enableHighAccuracy?: boolean | undefined;
|
|
58
|
+
timeout?: number | undefined;
|
|
59
|
+
maximumAge?: number | undefined;
|
|
60
|
+
distanceFilter?: number | undefined;
|
|
61
61
|
}
|
|
62
62
|
/** Minimal shape of the native geolocation module we depend on. */
|
|
63
63
|
export interface GeolocationLike {
|
|
@@ -72,10 +72,13 @@ export interface GeolocationLike {
|
|
|
72
72
|
* restore it.
|
|
73
73
|
*/
|
|
74
74
|
export declare const setGeolocationImplementation: (impl: GeolocationLike | null) => void;
|
|
75
|
+
declare const getCurrentPosition: (options?: GeoOptions) => Promise<GeoPosition>;
|
|
76
|
+
declare const watchPosition: (listener: (position: GeoPosition) => void, options?: GeoWatchOptions) => (() => void);
|
|
77
|
+
declare const isAvailable: () => boolean;
|
|
75
78
|
export declare const Geolocation: {
|
|
76
|
-
getCurrentPosition:
|
|
77
|
-
watchPosition:
|
|
78
|
-
isAvailable:
|
|
79
|
+
getCurrentPosition: typeof getCurrentPosition;
|
|
80
|
+
watchPosition: typeof watchPosition;
|
|
81
|
+
isAvailable: typeof isAvailable;
|
|
79
82
|
};
|
|
80
83
|
export interface UseCurrentPositionResult {
|
|
81
84
|
position: GeoPosition | null;
|
|
@@ -84,7 +87,7 @@ export interface UseCurrentPositionResult {
|
|
|
84
87
|
refresh: () => void;
|
|
85
88
|
}
|
|
86
89
|
export declare const useCurrentPosition: (options?: GeoOptions & {
|
|
87
|
-
enabled?: boolean;
|
|
90
|
+
enabled?: boolean | undefined;
|
|
88
91
|
}) => UseCurrentPositionResult;
|
|
89
92
|
export {};
|
|
90
93
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -36,8 +36,11 @@
|
|
|
36
36
|
* client reads the bearer token. It needs no optional peer: the backend is
|
|
37
37
|
* expo-secure-store, and `expo` is required anyway.
|
|
38
38
|
*/
|
|
39
|
+
export type { AxiosError, AxiosInstance, AxiosRequestConfig, AxiosResponse } from "axios";
|
|
39
40
|
export type { AccountIdProvider, ClientKind } from "./api/clientHeaders.js";
|
|
40
41
|
export { ACCOUNT_ID_HEADER, CLIENT_BUILD_HEADER, CLIENT_KIND, CLIENT_KIND_HEADER, getClientBuild, } from "./api/clientHeaders.js";
|
|
42
|
+
export type { ContractCaller } from "./api/contractCaller.js";
|
|
43
|
+
export { createContractCaller } from "./api/contractCaller.js";
|
|
41
44
|
export { buildCurl, logCurl } from "./api/curl.js";
|
|
42
45
|
export type { FetchRetryPolicy } from "./api/fetchRetry.js";
|
|
43
46
|
export { fetchWithRetry } from "./api/fetchRetry.js";
|
|
@@ -61,8 +64,8 @@ export { getConfig, getConfigValue, resetConfig, setConfig } from "./config/inde
|
|
|
61
64
|
export { ENVIRONMENT_APP_ID_SUFFIX, installedAppId } from "./config/appIdentity.js";
|
|
62
65
|
export type { DeepLinkConfig, DeepLinkRoute, ParsedLink } from "./deepLink/index.js";
|
|
63
66
|
export { DeepLink, parseDeepLink, useDeepLink } from "./deepLink/index.js";
|
|
64
|
-
export type { ApiError } from "./errors/index.js";
|
|
65
|
-
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";
|
|
67
|
+
export type { ApiError, ResponseSchema } from "./errors/index.js";
|
|
68
|
+
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";
|
|
66
69
|
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";
|
|
67
70
|
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";
|
|
68
71
|
export type { InitConfig } from "./initSDK.js";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type GstState } from "./gstStates.g.js";
|
|
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
|
+
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. */
|
|
5
|
+
export declare const gstStateFromPlaceOfSupply: (value: unknown) => GstState | null;
|
|
6
|
+
/** How the place of supply prints on a tax document, such as "Karnataka (29)". */
|
|
7
|
+
export declare const placeOfSupplyLabel: (state: GstState) => string;
|
|
8
|
+
//# sourceMappingURL=gstStates.d.ts.map
|
|
@@ -3,6 +3,7 @@ export type { FinancialYear } from "./financialYear.js";
|
|
|
3
3
|
export { currentFinancialYear, financialYearLabel, financialYearOf, parseFinancialYear, recentFinancialYears } from "./financialYear.js";
|
|
4
4
|
export type { GstinProblem } from "./gstin.js";
|
|
5
5
|
export { gstinHolderPan, gstinProblem, gstinState, gstinStateCode, isGstin, normalizeGstin, sanitizeGstinInput } from "./gstin.js";
|
|
6
|
+
export { currentStateForGstin, gstStateFromPlaceOfSupply, placeOfSupplyLabel } from "./gstStates.js";
|
|
6
7
|
export type { GstState, GstStateStatus } from "./gstStates.g.js";
|
|
7
8
|
export { isIfsc, normalizeIfsc } from "./ifsc.js";
|
|
8
9
|
export { formatIndianMobile, isIndianMobile, normalizeIndianMobile } from "./indianMobile.js";
|
|
@@ -16,16 +16,16 @@ export interface InitConfig {
|
|
|
16
16
|
*/
|
|
17
17
|
remoteLogger: RemoteLogger | null;
|
|
18
18
|
/** Enable/disable logging. Defaults to `true`. */
|
|
19
|
-
loggingEnabled?: boolean;
|
|
19
|
+
loggingEnabled?: boolean | undefined;
|
|
20
20
|
/** Log level. Defaults to `'info'` in development and `'warn'` in a release build. */
|
|
21
|
-
logLevel?: LogLevel;
|
|
21
|
+
logLevel?: LogLevel | undefined;
|
|
22
22
|
/** The environment the bundle was compiled for (`ENVIRONMENT`). Required: the installed-app check adds its id suffix. */
|
|
23
23
|
environment: Environment;
|
|
24
24
|
/**
|
|
25
25
|
* ISO 3166-1 alpha-2 country code (lowercase) used in the App Store / Play
|
|
26
26
|
* Store link of the update prompt. Defaults to `'in'`.
|
|
27
27
|
*/
|
|
28
|
-
country?: string;
|
|
28
|
+
country?: string | undefined;
|
|
29
29
|
/**
|
|
30
30
|
* The app's store identifier, `APP_ID` from appsettings.json, with no environment suffix.
|
|
31
31
|
* initWebority refuses to start when `installedAppId(appId, environment)` differs from the installed app's id.
|
|
@@ -37,21 +37,21 @@ export interface InitConfig {
|
|
|
37
37
|
* is why they come from config rather than across the native bridge. The
|
|
38
38
|
* version check compares `appBuild` with the API's `Min-App-Version`.
|
|
39
39
|
*/
|
|
40
|
-
appVersion?: string;
|
|
41
|
-
appBuild?: number;
|
|
40
|
+
appVersion?: string | undefined;
|
|
41
|
+
appBuild?: number | undefined;
|
|
42
42
|
/** The numeric Apple App Store id; the iOS update button needs it. */
|
|
43
|
-
appStoreId?: string;
|
|
43
|
+
appStoreId?: string | undefined;
|
|
44
44
|
/** The build's short git sha (`COMMIT` in appsettings); sent as `Client-Build: <appVersion>+<commit>`. */
|
|
45
|
-
commit?: string;
|
|
45
|
+
commit?: string | undefined;
|
|
46
46
|
/**
|
|
47
47
|
* Log a redacted curl line per request. Off by default; it is a debugging
|
|
48
48
|
* aid, not something to leave on.
|
|
49
49
|
*/
|
|
50
|
-
logCurl?: boolean;
|
|
50
|
+
logCurl?: boolean | undefined;
|
|
51
51
|
/** Request timeout in milliseconds. Defaults to 30000; a request's own `timeout` wins. */
|
|
52
|
-
timeoutMs?: number;
|
|
52
|
+
timeoutMs?: number | undefined;
|
|
53
53
|
/** Retries under the retry rule. Defaults to 3; 0 turns retrying off. */
|
|
54
|
-
retries?: number;
|
|
54
|
+
retries?: number | undefined;
|
|
55
55
|
/**
|
|
56
56
|
* The native modules that fill the seams the library does not import.
|
|
57
57
|
*
|
|
@@ -64,10 +64,10 @@ export interface InitConfig {
|
|
|
64
64
|
* from its own import path. See docs/expo.md.
|
|
65
65
|
*/
|
|
66
66
|
backends?: {
|
|
67
|
-
storage?: Parameters<typeof setStorageImplementation>[0];
|
|
68
|
-
keychain?: KeychainLike | null;
|
|
69
|
-
network?: NetInfoLike | null;
|
|
70
|
-
};
|
|
67
|
+
storage?: Parameters<typeof setStorageImplementation>[0] | undefined;
|
|
68
|
+
keychain?: KeychainLike | null | undefined;
|
|
69
|
+
network?: NetInfoLike | null | undefined;
|
|
70
|
+
} | undefined;
|
|
71
71
|
}
|
|
72
72
|
/**
|
|
73
73
|
* Initialize Webority packages with your project configuration.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type AccountIdProvider, type InstallationIdProvider } from "./api/clientHeaders.js";
|
|
2
|
+
import type { RefreshableStore } from "./api/tokenRefresh.js";
|
|
2
3
|
import { type LegacyTokenKeys } from "./auth/authStore.js";
|
|
3
4
|
/** The tokens a refresh response carries, with their expiry timestamps. */
|
|
4
5
|
export interface TokenRefreshResult {
|
|
@@ -15,21 +16,21 @@ export interface TokenRefreshConfig {
|
|
|
15
16
|
/** The refresh endpoint, relative to the configured baseUrl, e.g. `/Account/RefreshToken`. */
|
|
16
17
|
path: string;
|
|
17
18
|
/** The request body; may return a promise. Defaults to `{ accessToken, refreshToken }`. */
|
|
18
|
-
body?: (tokens: {
|
|
19
|
+
body?: ((tokens: {
|
|
19
20
|
accessToken: string | null;
|
|
20
21
|
refreshToken: string;
|
|
21
|
-
}) => unknown;
|
|
22
|
+
}) => unknown) | undefined;
|
|
22
23
|
/**
|
|
23
24
|
* Extra headers for the refresh call, read on every refresh; may return a promise. For a
|
|
24
25
|
* value the API must see as a header, such as `X-Installation-Id` for a rate limiter that
|
|
25
26
|
* cannot read the body.
|
|
26
27
|
*/
|
|
27
|
-
headers?: () => Record<string, string> | Promise<Record<string, string
|
|
28
|
+
headers?: (() => Record<string, string> | Promise<Record<string, string>>) | undefined;
|
|
28
29
|
/**
|
|
29
30
|
* Reads the new tokens from the response body. Defaults to the Webority API's
|
|
30
31
|
* `{ accessToken, accessTokenExpiration, refreshToken, refreshTokenExpiration }`.
|
|
31
32
|
*/
|
|
32
|
-
readTokens?: (data: unknown) => TokenRefreshResult;
|
|
33
|
+
readTokens?: ((data: unknown) => TokenRefreshResult) | undefined;
|
|
33
34
|
}
|
|
34
35
|
export interface UserAuthOptions {
|
|
35
36
|
/** Action creator dispatched when the session is over. */
|
|
@@ -42,7 +43,7 @@ export interface UserAuthOptions {
|
|
|
42
43
|
* making it; a request that sets the header itself keeps its own value.
|
|
43
44
|
* Omit it in a product whose API takes the account from the token alone.
|
|
44
45
|
*/
|
|
45
|
-
accountId?: AccountIdProvider;
|
|
46
|
+
accountId?: AccountIdProvider | undefined;
|
|
46
47
|
/**
|
|
47
48
|
* The device's installation id, sent as `Installation-Id` on every publicClient and
|
|
48
49
|
* userClient request. Resolved once, on the first request, and kept in memory. Pass the
|
|
@@ -50,13 +51,13 @@ export interface UserAuthOptions {
|
|
|
50
51
|
* clients never import it, so they load without the optional expo-crypto peer. Omit it
|
|
51
52
|
* and no header goes out.
|
|
52
53
|
*/
|
|
53
|
-
installationId?: InstallationIdProvider;
|
|
54
|
+
installationId?: InstallationIdProvider | undefined;
|
|
54
55
|
/**
|
|
55
56
|
* The secure-store keys the app kept its session under before this library. The first token
|
|
56
57
|
* read that finds the library's keys empty moves a session found there and deletes the old
|
|
57
58
|
* keys, so the release that adopts the library signs nobody out.
|
|
58
59
|
*/
|
|
59
|
-
legacyKeys?: LegacyTokenKeys;
|
|
60
|
+
legacyKeys?: LegacyTokenKeys | undefined;
|
|
60
61
|
}
|
|
61
62
|
/**
|
|
62
63
|
* Wire the user client to the app: the Redux store it dispatches `logout` to,
|
|
@@ -69,5 +70,5 @@ export interface UserAuthOptions {
|
|
|
69
70
|
* @example
|
|
70
71
|
* initUserAuth(store, { logout, refresh: { path: '/Account/RefreshToken' }, installationId: getOrCreateInstallationId });
|
|
71
72
|
*/
|
|
72
|
-
export declare const initUserAuth:
|
|
73
|
+
export declare const initUserAuth: (store: RefreshableStore, options: UserAuthOptions) => void;
|
|
73
74
|
//# sourceMappingURL=initUserAuth.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type RemoteLogger } from "./index.js";
|
|
2
2
|
/**
|
|
3
3
|
* The part of `@react-native-firebase/crashlytics`'s modular API the adapter
|
|
4
4
|
* calls. Typed here, never imported, so the library carries no Firebase
|
|
@@ -23,9 +23,10 @@ export interface CrashlyticsModule<Instance = unknown> {
|
|
|
23
23
|
*
|
|
24
24
|
* Breadcrumbs and log lines become Crashlytics log lines, errors become
|
|
25
25
|
* non-fatals with their context logged just before, and the user id and
|
|
26
|
-
* attributes are set as given.
|
|
27
|
-
*
|
|
28
|
-
* a build without its Firebase config files has no
|
|
26
|
+
* attributes are set as given. A synchronous failure is swallowed and an async
|
|
27
|
+
* one is recorded through `Logger`: the adapter runs inside `Logger.error`, so a
|
|
28
|
+
* throw would recurse, and a build without its Firebase config files has no
|
|
29
|
+
* Firebase app to report to.
|
|
29
30
|
*/
|
|
30
31
|
export declare const crashlyticsRemoteLogger: <Instance>(crashlytics: CrashlyticsModule<Instance>) => RemoteLogger;
|
|
31
32
|
//# sourceMappingURL=crashlytics.d.ts.map
|
|
@@ -10,15 +10,15 @@ type LogFn = (message: string, ...optionalParams: unknown[]) => void;
|
|
|
10
10
|
*/
|
|
11
11
|
export interface RemoteLogger {
|
|
12
12
|
/** Append a breadcrumb (small, non-error event) for crash context. */
|
|
13
|
-
breadcrumb?: (message: string, data?: Record<string, unknown>) => void;
|
|
13
|
+
breadcrumb?: ((message: string, data?: Record<string, unknown>) => void) | undefined;
|
|
14
14
|
/** Record a non-fatal error with optional context. */
|
|
15
|
-
recordError?: (error: unknown, context?: Record<string, unknown>) => void;
|
|
15
|
+
recordError?: ((error: unknown, context?: Record<string, unknown>) => void) | undefined;
|
|
16
16
|
/** Bind a logical user to subsequent events. */
|
|
17
|
-
setUser?: (id: string | null, attrs?: Record<string, unknown>) => void;
|
|
17
|
+
setUser?: ((id: string | null, attrs?: Record<string, unknown>) => void) | undefined;
|
|
18
18
|
/** Attach a custom attribute / tag (e.g. `release`, `env`). */
|
|
19
|
-
setAttribute?: (key: string, value: string | number | boolean | null) => void;
|
|
19
|
+
setAttribute?: ((key: string, value: string | number | boolean | null) => void) | undefined;
|
|
20
20
|
/** Forward a leveled console message. */
|
|
21
|
-
log?: (level: LogLevel, message: string, optionalParams: unknown[]) => void;
|
|
21
|
+
log?: ((level: LogLevel, message: string, optionalParams: unknown[]) => void) | undefined;
|
|
22
22
|
}
|
|
23
23
|
/** Set by `initWebority`; `null` detaches. Not part of the package's public API. */
|
|
24
24
|
export declare const setRemoteLogger: (impl: RemoteLogger | null) => void;
|
|
@@ -29,12 +29,12 @@ export declare const setRemoteLogger: (impl: RemoteLogger | null) => void;
|
|
|
29
29
|
*/
|
|
30
30
|
export interface DeviceContext {
|
|
31
31
|
platform: string;
|
|
32
|
-
osVersion?: string;
|
|
33
|
-
appVersion?: string;
|
|
34
|
-
buildNumber?: string;
|
|
35
|
-
deviceModel?: string;
|
|
36
|
-
isEmulator?: boolean;
|
|
37
|
-
locale?: string;
|
|
32
|
+
osVersion?: string | undefined;
|
|
33
|
+
appVersion?: string | null | undefined;
|
|
34
|
+
buildNumber?: string | null | undefined;
|
|
35
|
+
deviceModel?: string | null | undefined;
|
|
36
|
+
isEmulator?: boolean | undefined;
|
|
37
|
+
locale?: string | undefined;
|
|
38
38
|
[key: string]: unknown;
|
|
39
39
|
}
|
|
40
40
|
/**
|
|
@@ -46,22 +46,22 @@ export declare const setDeviceContext: (context: DeviceContext | null) => void;
|
|
|
46
46
|
export declare const getDeviceContext: () => DeviceContext | null;
|
|
47
47
|
export interface LoggerBreadcrumb {
|
|
48
48
|
message: string;
|
|
49
|
-
data?: Record<string, unknown
|
|
49
|
+
data?: Record<string, unknown> | undefined;
|
|
50
50
|
/** When it was recorded, ISO 8601 in UTC. */
|
|
51
51
|
timestampUtc: string;
|
|
52
52
|
}
|
|
53
53
|
/** Tuning knobs for screen history and duplicate-error suppression. */
|
|
54
54
|
export interface LoggerOptions {
|
|
55
55
|
/** Identical errors within this window are collapsed. Default 5000ms. 0 disables dedupe. */
|
|
56
|
-
dedupeWindowMs?: number;
|
|
56
|
+
dedupeWindowMs?: number | undefined;
|
|
57
57
|
/** Max identical errors forwarded per window before suppression. Default 1. */
|
|
58
|
-
dedupeMaxPerWindow?: number;
|
|
58
|
+
dedupeMaxPerWindow?: number | undefined;
|
|
59
59
|
/** Cap on tracked screen history. Default 20. */
|
|
60
|
-
screenHistoryLimit?: number;
|
|
60
|
+
screenHistoryLimit?: number | undefined;
|
|
61
61
|
/** Extra keys masked in logs, added to the built-in list. */
|
|
62
|
-
redactKeys?: string[];
|
|
62
|
+
redactKeys?: string[] | undefined;
|
|
63
63
|
/** Breadcrumbs kept for Logger.getBreadcrumbs(). Default 50. */
|
|
64
|
-
breadcrumbLimit?: number;
|
|
64
|
+
breadcrumbLimit?: number | undefined;
|
|
65
65
|
}
|
|
66
66
|
/**
|
|
67
67
|
* Configure dedupe, screen history, breadcrumbs and redaction. Merges with current options;
|
|
@@ -71,12 +71,12 @@ export declare const configureLogger: (options: LoggerOptions) => void;
|
|
|
71
71
|
/** What `Logger.requestFailed` is told about the call beside the error itself. */
|
|
72
72
|
export interface RequestFailedContext {
|
|
73
73
|
/** What the call was, in words: `'Load projects'`. Names the log line; defaults to the method and path. */
|
|
74
|
-
label?: string;
|
|
74
|
+
label?: string | undefined;
|
|
75
75
|
/**
|
|
76
76
|
* Statuses this call answers as part of its work (a 409 the screen explains, a 404 that
|
|
77
77
|
* means "none yet"): logged as info, never recorded as an error.
|
|
78
78
|
*/
|
|
79
|
-
expectedStatuses?: readonly number[];
|
|
79
|
+
expectedStatuses?: readonly number[] | undefined;
|
|
80
80
|
/** Anything else worth carrying to the remote sink. Never a token or a request body. */
|
|
81
81
|
[key: string]: unknown;
|
|
82
82
|
}
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
export declare const configureRedaction: (extraKeys: readonly string[]) => void;
|
|
3
3
|
export declare const redactString: (input: string) => string;
|
|
4
4
|
/** Returns a copy with secrets masked. An Error comes back as its summary, never as the Error itself. */
|
|
5
|
-
export declare const redact:
|
|
5
|
+
export declare const redact: (value: unknown) => unknown;
|
|
6
|
+
/** `redact` for a plain object: a record always comes back as one, so anything else is a defect and throws. */
|
|
7
|
+
export declare const redactRecord: (value: Readonly<Record<string, unknown>>) => Record<string, unknown>;
|
|
6
8
|
/** An Error safe to hand to a sink: the original name and stack, a redacted message, and no request data. */
|
|
7
9
|
export declare const redactError: (input: unknown) => Error;
|
|
8
10
|
//# sourceMappingURL=redact.d.ts.map
|
|
@@ -13,8 +13,8 @@ export interface MetroStore {
|
|
|
13
13
|
export interface MetroSignInRequest {
|
|
14
14
|
email: string;
|
|
15
15
|
/** Absent for an account that signs in with an emailed code only. */
|
|
16
|
-
password?: string;
|
|
17
|
-
code?: string;
|
|
16
|
+
password?: string | undefined;
|
|
17
|
+
code?: string | undefined;
|
|
18
18
|
}
|
|
19
19
|
export interface MetroSignInResult {
|
|
20
20
|
/** True when the app now waits for the emailed or authenticator code. */
|
|
@@ -27,7 +27,7 @@ export interface MetroBridgeOptions {
|
|
|
27
27
|
signOut: () => Promise<void>;
|
|
28
28
|
isSignedIn: () => boolean;
|
|
29
29
|
/** App commands beyond signIn, signOut and navigate; a name already taken throws. */
|
|
30
|
-
commands?: Record<string, (args?: unknown) => unknown
|
|
30
|
+
commands?: Record<string, (args?: unknown) => unknown> | undefined;
|
|
31
31
|
}
|
|
32
32
|
export interface MetroBridge {
|
|
33
33
|
commands: {
|
|
@@ -37,7 +37,7 @@ export interface MetroBridge {
|
|
|
37
37
|
}>;
|
|
38
38
|
navigate: (args: {
|
|
39
39
|
name: string;
|
|
40
|
-
params?: object;
|
|
40
|
+
params?: object | undefined;
|
|
41
41
|
}) => {
|
|
42
42
|
route: string;
|
|
43
43
|
};
|
|
@@ -13,7 +13,7 @@ export type NetworkStatusListener = (status: NetworkStatus) => void;
|
|
|
13
13
|
interface NetInfoStateLike {
|
|
14
14
|
isConnected: boolean | null;
|
|
15
15
|
isInternetReachable: boolean | null;
|
|
16
|
-
type?: string;
|
|
16
|
+
type?: string | undefined;
|
|
17
17
|
}
|
|
18
18
|
export interface NetInfoLike {
|
|
19
19
|
fetch: () => Promise<NetInfoStateLike>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AxiosInstance } from "axios";
|
|
1
2
|
export type OutboxMethod = "POST" | "PUT" | "PATCH";
|
|
2
3
|
export interface OutboxFilePart {
|
|
3
4
|
uri: string;
|
|
@@ -25,7 +26,7 @@ export interface OutboxRequest {
|
|
|
25
26
|
/** Must carry Idempotency-Key (a uuid); Authorization and Account-Id are refused, the outbox sets the workspace itself. */
|
|
26
27
|
headers: Record<string, string>;
|
|
27
28
|
body: OutboxBody;
|
|
28
|
-
timeoutMs?: number;
|
|
29
|
+
timeoutMs?: number | undefined;
|
|
29
30
|
}
|
|
30
31
|
export type OutboxEntryState = "Pending" | "Sending" | "Failed";
|
|
31
32
|
export interface OutboxFailure {
|
|
@@ -73,27 +74,15 @@ export type OutboxEvent = {
|
|
|
73
74
|
};
|
|
74
75
|
export type OutboxListener = (event: OutboxEvent) => void;
|
|
75
76
|
/** The slice of the app's signed-in axios instance (mobile-core's userClient) the outbox sends through. */
|
|
76
|
-
export
|
|
77
|
-
request(config: {
|
|
78
|
-
method: string;
|
|
79
|
-
url: string;
|
|
80
|
-
headers: Record<string, string>;
|
|
81
|
-
data?: unknown;
|
|
82
|
-
timeout?: number;
|
|
83
|
-
retry?: false;
|
|
84
|
-
}): Promise<{
|
|
85
|
-
status: number;
|
|
86
|
-
data: unknown;
|
|
87
|
-
}>;
|
|
88
|
-
}
|
|
77
|
+
export type OutboxHttpClient = Pick<AxiosInstance, "request">;
|
|
89
78
|
export interface OutboxOptions {
|
|
90
79
|
http: OutboxHttpClient;
|
|
91
80
|
/** Default "webority-outbox". */
|
|
92
|
-
databaseName?: string;
|
|
81
|
+
databaseName?: string | undefined;
|
|
93
82
|
/** Default 50; enqueue beyond it throws OutboxFullError. */
|
|
94
|
-
maxEntriesPerOwner?: number;
|
|
83
|
+
maxEntriesPerOwner?: number | undefined;
|
|
95
84
|
/** Default 14; older entries are deleted with their files. */
|
|
96
|
-
keepDays?: number;
|
|
85
|
+
keepDays?: number | undefined;
|
|
97
86
|
}
|
|
98
87
|
export interface Outbox {
|
|
99
88
|
/** Stores the entry (files copied first), then tries it once. Definitive refusal on this first try deletes the entry and returns Failed. */
|
|
@@ -11,7 +11,7 @@ interface ExpoPermissionResponse {
|
|
|
11
11
|
granted: boolean;
|
|
12
12
|
canAskAgain: boolean;
|
|
13
13
|
/** iOS partial photo access, from expo-image-picker's MediaLibraryPermissionResponse. */
|
|
14
|
-
accessPrivileges?: "all" | "limited" | "none";
|
|
14
|
+
accessPrivileges?: "all" | "limited" | "none" | undefined;
|
|
15
15
|
}
|
|
16
16
|
interface ExpoPermissionFns {
|
|
17
17
|
check: () => Promise<ExpoPermissionResponse>;
|
|
@@ -32,6 +32,9 @@ export interface PermissionsBackend {
|
|
|
32
32
|
export declare const setPermissionsImplementation: (impl: PermissionsBackend | null) => void;
|
|
33
33
|
/** Called by the per-package entry points to register their kind(s). Not for app code. */
|
|
34
34
|
export declare const registerPermissionAdapter: (kind: PermissionKind, fns: ExpoPermissionFns) => void;
|
|
35
|
+
declare const checkPermission: (kind: PermissionKind) => Promise<PermissionStatus>;
|
|
36
|
+
declare const requestPermission: (kind: PermissionKind) => Promise<PermissionStatus>;
|
|
37
|
+
declare const openAppSettings: () => Promise<boolean>;
|
|
35
38
|
/**
|
|
36
39
|
* Cross-platform permissions wrapper. Maps an abstract `PermissionKind`
|
|
37
40
|
* (camera, photos, location, notifications, …) to whichever Expo adapter an
|
|
@@ -41,13 +44,13 @@ export declare const registerPermissionAdapter: (kind: PermissionKind, fns: Expo
|
|
|
41
44
|
* points for the kinds it actually asks for.
|
|
42
45
|
*/
|
|
43
46
|
export declare const Permissions: {
|
|
44
|
-
check:
|
|
45
|
-
request:
|
|
47
|
+
check: typeof checkPermission;
|
|
48
|
+
request: typeof requestPermission;
|
|
46
49
|
/** Convenience: returns true when the permission is `granted` or `limited`. */
|
|
47
50
|
isAuthorized: (kind: PermissionKind) => Promise<boolean>;
|
|
48
51
|
/** Convenience: check, and request only when the status is `undetermined` or `denied`. */
|
|
49
52
|
ensure: (kind: PermissionKind) => Promise<PermissionStatus>;
|
|
50
|
-
openSettings:
|
|
53
|
+
openSettings: typeof openAppSettings;
|
|
51
54
|
};
|
|
52
55
|
export {};
|
|
53
56
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
export interface PickedFile {
|
|
2
2
|
uri: string;
|
|
3
|
-
name?: string;
|
|
4
|
-
type?: string;
|
|
5
|
-
size?: number;
|
|
6
|
-
meta?: Record<string, unknown
|
|
3
|
+
name?: string | undefined;
|
|
4
|
+
type?: string | undefined;
|
|
5
|
+
size?: number | undefined;
|
|
6
|
+
meta?: Record<string, unknown> | undefined;
|
|
7
7
|
}
|
|
8
8
|
export interface PickerSource {
|
|
9
9
|
key: string;
|
|
10
10
|
label: string;
|
|
11
|
-
description?: string;
|
|
11
|
+
description?: string | undefined;
|
|
12
12
|
pick: () => Promise<PickedFile[]>;
|
|
13
13
|
}
|
|
14
14
|
export interface PhotoOptions {
|
|
15
|
-
maxEdgePx?: number;
|
|
16
|
-
quality?: number;
|
|
17
|
-
multiple?: boolean;
|
|
18
|
-
limit?: number;
|
|
15
|
+
maxEdgePx?: number | undefined;
|
|
16
|
+
quality?: number | undefined;
|
|
17
|
+
multiple?: boolean | undefined;
|
|
18
|
+
limit?: number | undefined;
|
|
19
19
|
/** What the library offers; photos only by default. */
|
|
20
|
-
mediaTypes?: ReadonlyArray<"images" | "videos"
|
|
20
|
+
mediaTypes?: ReadonlyArray<"images" | "videos"> | undefined;
|
|
21
21
|
}
|
|
22
22
|
export declare function whenSheetHasClosed(): Promise<void>;
|
|
23
23
|
/** Bounds the longer side to `maxEdgePx`, re-encodes as JPEG at `quality` and returns the file named `photo-<time>.jpg`. */
|
|
24
24
|
export declare function boundPhoto(asset: {
|
|
25
25
|
uri: string;
|
|
26
|
-
width?: number;
|
|
27
|
-
height?: number;
|
|
28
|
-
type?: "image" | "video" | "livePhoto" | "pairedVideo" | null;
|
|
29
|
-
fileName?: string | null;
|
|
30
|
-
mimeType?: string;
|
|
31
|
-
fileSize?: number;
|
|
26
|
+
width?: number | undefined;
|
|
27
|
+
height?: number | undefined;
|
|
28
|
+
type?: "image" | "video" | "livePhoto" | "pairedVideo" | null | undefined;
|
|
29
|
+
fileName?: string | null | undefined;
|
|
30
|
+
mimeType?: string | undefined;
|
|
31
|
+
fileSize?: number | undefined;
|
|
32
32
|
}, options?: PhotoOptions): Promise<PickedFile>;
|
|
33
33
|
export declare function cameraSource(options: PhotoOptions & {
|
|
34
34
|
label: string;
|
|
@@ -38,7 +38,7 @@ export declare function photoLibrarySource(options: PhotoOptions & {
|
|
|
38
38
|
}): PickerSource;
|
|
39
39
|
export declare function documentSource(options: {
|
|
40
40
|
label: string;
|
|
41
|
-
types?: string[];
|
|
42
|
-
multiple?: boolean;
|
|
41
|
+
types?: string[] | undefined;
|
|
42
|
+
multiple?: boolean | undefined;
|
|
43
43
|
}): PickerSource;
|
|
44
44
|
//# sourceMappingURL=index.d.ts.map
|