@webority/mobile-core 0.19.1 → 0.88.1
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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DateInput } from
|
|
1
|
+
import type { DateInput } from "./date";
|
|
2
2
|
/**
|
|
3
3
|
* Whether two values fall on the same calendar day in the device's local
|
|
4
4
|
* timezone. Invalid input on either side returns false rather than throwing.
|
|
@@ -30,7 +30,7 @@ export declare const addDays: (value: DateInput | null | undefined, count: numbe
|
|
|
30
30
|
* Small dayjs/moment-style token formatter — YYYY/YY, MMMM/MMM/MM/M,
|
|
31
31
|
* DD/D, dddd/ddd, HH/H (24h), hh/h (12h), mm/m, ss/s, A/a (upper/lower AM/PM).
|
|
32
32
|
* Everything else in the pattern (spaces, commas, colons) passes through
|
|
33
|
-
* literally. Hand-rolled rather than a dependency because
|
|
33
|
+
* literally. Hand-rolled rather than a dependency because the date
|
|
34
34
|
* formatting needs are a small, closed token set, not general i18n — for
|
|
35
35
|
* genuinely locale-aware output, `formatDate`/`formatTime` (Intl-backed, in
|
|
36
36
|
* `./date`) are the ones to reach for; this is for matching an exact
|
|
@@ -46,7 +46,7 @@ export declare const formatDatePattern: (value: DateInput, pattern: string, opti
|
|
|
46
46
|
/**
|
|
47
47
|
* `DD MMM, YYYY` — zero-padded day, short month, comma, year (e.g.
|
|
48
48
|
* `05 Sep, 2025`). A specific legacy pattern some apps already display,
|
|
49
|
-
* not the
|
|
49
|
+
* not the recommended convention: `formatDate` (the Intl `style`-based
|
|
50
50
|
* formatter in `./date`) is the one to reach for in new code. This exists so
|
|
51
51
|
* an app already showing this exact pattern can move off a date library
|
|
52
52
|
* without a visible change.
|
|
@@ -21,21 +21,21 @@
|
|
|
21
21
|
* only the date; the time of day, the zone and relative phrases are untouched.
|
|
22
22
|
*/
|
|
23
23
|
/** `'IST'`: every instant in India Standard Time. `'viewer'`: the device or browser zone, labelled. */
|
|
24
|
-
export type ZoneMode =
|
|
24
|
+
export type ZoneMode = "IST" | "viewer";
|
|
25
25
|
/** How the integer part of a number is grouped. */
|
|
26
|
-
export type NumberGrouping =
|
|
26
|
+
export type NumberGrouping = "indian" | "international" | "none";
|
|
27
27
|
/**
|
|
28
28
|
* The decimal mark and group separator of every number: `'PointWithCommaGroups'` "1,234.5",
|
|
29
29
|
* `'CommaWithPointGroups'` "1.234,5", `'CommaWithSpaceGroups'` "1 234,5", `'PointWithSpaceGroups'`
|
|
30
30
|
* "1 234.5". The space is a no-break space (U+00A0), so a number never wraps.
|
|
31
31
|
*/
|
|
32
|
-
export type NumberStyle =
|
|
32
|
+
export type NumberStyle = "PointWithCommaGroups" | "CommaWithPointGroups" | "CommaWithSpaceGroups" | "PointWithSpaceGroups";
|
|
33
33
|
/**
|
|
34
34
|
* The order of every date: `'DayMonthNameYear'` "09-Oct-2026" (the house order, month name from the
|
|
35
35
|
* locale when one is configured), `'DayMonthYear'` "09/10/2026", `'MonthDayYear'` "10/09/2026",
|
|
36
36
|
* `'YearMonthDay'` "2026-10-09".
|
|
37
37
|
*/
|
|
38
|
-
export type DateOrder =
|
|
38
|
+
export type DateOrder = "DayMonthNameYear" | "DayMonthYear" | "MonthDayYear" | "YearMonthDay";
|
|
39
39
|
/** The two characters a number style puts in a number. */
|
|
40
40
|
export interface NumberSeparators {
|
|
41
41
|
decimal: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { type NumberGrouping, type ZoneMode } from
|
|
1
|
+
import { type NumberGrouping, type ZoneMode } from "./formatConfig";
|
|
2
2
|
/** A date the house formatters accept; null, undefined and "" read as missing. */
|
|
3
3
|
export type DateValue = Date | string | number | null | undefined;
|
|
4
4
|
/** A zone mode, `'UTC'`, or any IANA zone name such as `'America/New_York'`. */
|
|
5
|
-
export type ZoneOption = ZoneMode |
|
|
5
|
+
export type ZoneOption = ZoneMode | "UTC" | (string & {});
|
|
6
6
|
export interface FormatDateOptions {
|
|
7
7
|
/** Overrides the configured zone mode for this call. */
|
|
8
8
|
zone?: ZoneOption;
|
|
@@ -59,7 +59,7 @@ export interface FormatNumberOptions extends Intl.NumberFormatOptions {
|
|
|
59
59
|
}
|
|
60
60
|
export interface FormatPercentOptions extends FormatNumberOptions {
|
|
61
61
|
/** `'ratio'` (the default) reads 0.42 as 42%; `'percent'` reads 42 as 42%. */
|
|
62
|
-
scale?:
|
|
62
|
+
scale?: "ratio" | "percent";
|
|
63
63
|
}
|
|
64
64
|
export interface FormatMinorOptions {
|
|
65
65
|
/** ISO 4217 code. A missing or empty one warns and prints INR. */
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export type { FormatCurrencyOptions } from
|
|
2
|
-
export { formatCurrency } from
|
|
3
|
-
export type { DateInput, DateStyle, TimeStyle } from
|
|
4
|
-
export { formatDate, formatDateTime, formatRelativeTime, formatTime } from
|
|
5
|
-
export { addDays, diffMs, formatDateDDMMMYYYY, formatDateISO, formatDatePattern, formatTime12h, formatTimeInWindowsZone, formatTimeInZone, isDateAfter, isDateBefore, isSameDay, startOfDay } from
|
|
6
|
-
export type { DateOrder, FormatterConfig, NumberGrouping, NumberStyle, ZoneMode } from
|
|
7
|
-
export { configureFormatters, getFormatterConfig } from
|
|
8
|
-
export type { DateValue, FormatDateOptions, FormatDateTimeOptions, FormatMinorOptions, FormatNumberOptions, FormatPercentOptions, FormatRelativeOptions, FormatTimeOptions, ZoneOption } from
|
|
9
|
-
export { formatMinor, formatRelative } from
|
|
10
|
-
export { getInitials } from
|
|
11
|
-
export { formatCompactNumber, formatNumber, formatPercent } from
|
|
12
|
-
export type { FormatPhoneOptions, PhoneCountry, PhoneCountryEntry, PhoneNumber, PhoneNumberType, PhoneParts, PhoneValidationKind } from
|
|
13
|
-
export { AsYouType, clampNationalNumber, countryFlagEmoji, detectPhoneCountry, formatPhone, formatPhoneAsTyped, getCountries, getCountryCallingCode, getPhoneCountries, isSupportedCountry, isValidNationalNumber, isValidPhoneNumber, maxNationalNumberLength, normalizePhone, parsePhoneNumber, parsePhoneNumberFromString, splitPhoneNumber, validatePhoneNumberLength } from
|
|
1
|
+
export type { FormatCurrencyOptions } from "./currency";
|
|
2
|
+
export { formatCurrency } from "./currency";
|
|
3
|
+
export type { DateInput, DateStyle, TimeStyle } from "./date";
|
|
4
|
+
export { formatDate, formatDateTime, formatRelativeTime, formatTime } from "./date";
|
|
5
|
+
export { addDays, diffMs, formatDateDDMMMYYYY, formatDateISO, formatDatePattern, formatTime12h, formatTimeInWindowsZone, formatTimeInZone, isDateAfter, isDateBefore, isSameDay, startOfDay, } from "./dateMath";
|
|
6
|
+
export type { DateOrder, FormatterConfig, NumberGrouping, NumberStyle, ZoneMode, } from "./formatConfig";
|
|
7
|
+
export { configureFormatters, getFormatterConfig } from "./formatConfig";
|
|
8
|
+
export type { DateValue, FormatDateOptions, FormatDateTimeOptions, FormatMinorOptions, FormatNumberOptions, FormatPercentOptions, FormatRelativeOptions, FormatTimeOptions, ZoneOption, } from "./house";
|
|
9
|
+
export { formatMinor, formatRelative } from "./house";
|
|
10
|
+
export { getInitials } from "./initials";
|
|
11
|
+
export { formatCompactNumber, formatNumber, formatPercent } from "./number";
|
|
12
|
+
export type { FormatPhoneOptions, PhoneCountry, PhoneCountryEntry, PhoneNumber, PhoneNumberType, PhoneParts, PhoneValidationKind, } from "./phone";
|
|
13
|
+
export { AsYouType, clampNationalNumber, countryFlagEmoji, detectPhoneCountry, formatPhone, formatPhoneAsTyped, getCountries, getCountryCallingCode, getPhoneCountries, isSupportedCountry, isValidNationalNumber, isValidPhoneNumber, maxNationalNumberLength, normalizePhone, parsePhoneNumber, parsePhoneNumberFromString, splitPhoneNumber, validatePhoneNumberLength, } from "./phone";
|
|
14
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type FormatNumberOptions, type FormatPercentOptions } from
|
|
1
|
+
import { type FormatNumberOptions, type FormatPercentOptions } from "./house";
|
|
2
2
|
/**
|
|
3
3
|
* Two forms share each name. With an options object, or nothing, the house
|
|
4
4
|
* formatter runs (`./house`: no Intl, the configured grouping and empty
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type CountryCode } from
|
|
2
|
-
export type { NumberType as PhoneNumberType, PhoneNumber } from
|
|
3
|
-
export { AsYouType, getCountries, getCountryCallingCode, isSupportedCountry, isValidPhoneNumber, parsePhoneNumber, parsePhoneNumberFromString, validatePhoneNumberLength } from
|
|
1
|
+
import { type CountryCode } from "libphonenumber-js/max";
|
|
2
|
+
export type { NumberType as PhoneNumberType, PhoneNumber } from "libphonenumber-js/max";
|
|
3
|
+
export { AsYouType, getCountries, getCountryCallingCode, isSupportedCountry, isValidPhoneNumber, parsePhoneNumber, parsePhoneNumberFromString, validatePhoneNumberLength, } from "libphonenumber-js/max";
|
|
4
4
|
/**
|
|
5
5
|
* Re-exported under our own name rather than importing CountryCode directly
|
|
6
6
|
* everywhere, so a future need to diverge (or re-narrow) has one place to do
|
|
@@ -56,7 +56,7 @@ export interface PhoneParts {
|
|
|
56
56
|
* a 10-digit number starting with 1 to 5 is a real fixed line and passes
|
|
57
57
|
* `'any'`, but no SMS will ever reach it.
|
|
58
58
|
*/
|
|
59
|
-
export type PhoneValidationKind =
|
|
59
|
+
export type PhoneValidationKind = "any" | "mobile";
|
|
60
60
|
/**
|
|
61
61
|
* Split a typed or pasted number into calling code + national digits.
|
|
62
62
|
* `'+919876543210'` resolves to IN / 91 / 9876543210 from its own prefix; a
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "../permissions/location";
|
|
2
2
|
export interface GeoCoordinates {
|
|
3
3
|
latitude: number;
|
|
4
4
|
longitude: number;
|
|
@@ -11,14 +11,14 @@ export interface GeoPosition {
|
|
|
11
11
|
coords: GeoCoordinates;
|
|
12
12
|
timestamp: number;
|
|
13
13
|
}
|
|
14
|
-
export type GeoErrorCode =
|
|
14
|
+
export type GeoErrorCode = "permission-denied" | "position-unavailable" | "timeout" | "services-disabled" | "unsupported";
|
|
15
15
|
export declare class GeolocationError extends Error {
|
|
16
16
|
readonly code: GeoErrorCode;
|
|
17
17
|
constructor(code: GeoErrorCode, message: string);
|
|
18
18
|
}
|
|
19
19
|
export interface GeoOptions {
|
|
20
20
|
/** `fine` maps to the platform's high-accuracy (GPS) provider. Default `fine`. */
|
|
21
|
-
accuracy?:
|
|
21
|
+
accuracy?: "fine" | "coarse";
|
|
22
22
|
timeoutMs?: number;
|
|
23
23
|
maximumAgeMs?: number;
|
|
24
24
|
/** Extra attempts after the first, used only for `timeout` / `position-unavailable`. */
|
|
@@ -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";
|
|
34
|
+
export { ACCOUNT_ID_HEADER, CLIENT_BUILD_HEADER, CLIENT_KIND, CLIENT_KIND_HEADER, getClientBuild, } from "./api/clientHeaders";
|
|
35
|
+
export { buildCurl, logCurl } from "./api/curl";
|
|
36
|
+
export type { MinAppVersionListener } from "./api/minAppVersion";
|
|
37
|
+
export { addMinAppVersionListener, getMinAppVersion, MIN_APP_VERSION_HEADER, } from "./api/minAppVersion";
|
|
38
|
+
export { default as publicClient } from "./api/publicClient";
|
|
39
|
+
export { applyRequestDefaults, newCorrelationId } from "./api/requestDefaults";
|
|
40
|
+
export type { RetryPolicy } from "./api/retry";
|
|
41
|
+
export { attachRetry, IDEMPOTENCY_KEY_HEADER, isNeverSentError, isRetryableFailure, isRetryableStatus, retryAfterMs, } from "./api/retry";
|
|
42
|
+
export { refreshAccessToken } from "./api/tokenRefresh";
|
|
43
|
+
export type { RefreshableStore, SessionTerminationCode } from "./api/userClient";
|
|
44
|
+
export { default as userClient, injectStore, injectUserAuth, RequestOfflineError, resetRefreshState, SESSION_TERMINATION_CODES, SIGN_OUT_REASON_HEADER, } from "./api/userClient";
|
|
45
|
+
export { isWorkspaceChangedError, WORKSPACE_CHANGED_CODE, WorkspaceChangedError, } from "./api/workspace";
|
|
46
|
+
export type { KeychainLike, LegacyTokenKeys, SecureCredentials, SessionEndDetail, SessionEndedListener, SessionEndReason, StoredToken, } from "./auth/authStore";
|
|
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";
|
|
48
|
+
export type { JwtClaims } from "./auth/jwt";
|
|
49
|
+
export { decodeJWT, getJWTExpiry, isJWTExpired } from "./auth/jwt";
|
|
50
|
+
export type { Config, Environment, LogLevel } from "./config";
|
|
51
|
+
export { getConfig, getConfigValue, resetConfig, setConfig } from "./config";
|
|
52
|
+
export type { DeepLinkConfig, DeepLinkRoute, ParsedLink } from "./deepLink";
|
|
53
|
+
export { DeepLink, parseDeepLink, useDeepLink } from "./deepLink";
|
|
54
|
+
export type { ApiError } from "./errors";
|
|
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";
|
|
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";
|
|
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";
|
|
58
|
+
export type { InitConfig } from "./initSDK";
|
|
59
|
+
export { initWebority } from "./initSDK";
|
|
60
|
+
export type { TokenRefreshConfig, TokenRefreshResult, UserAuthOptions } from "./initUserAuth";
|
|
61
|
+
export { initUserAuth } from "./initUserAuth";
|
|
62
|
+
export type { DeviceContext, LoggerBreadcrumb, LoggerOptions, LoggerType, RemoteLogger, RequestFailedContext, } from "./logger";
|
|
63
|
+
export { configureLogger, getDeviceContext, Logger, setDeviceContext } from "./logger";
|
|
64
|
+
export type { CrashlyticsModule } from "./logger/crashlytics";
|
|
65
|
+
export { crashlyticsRemoteLogger } from "./logger/crashlytics";
|
|
66
|
+
export type { NetworkConnectionType, NetworkStatus, NetworkStatusLike, NetworkStatusListener, } from "./network";
|
|
67
|
+
export { addNetworkStatusListener, getNetworkStatus, setNetworkStatusImplementation, useNetworkStatus, } from "./network";
|
|
68
|
+
export type { PushStatus } from "./push/status";
|
|
69
|
+
export { PUSH_STATUS } from "./push/status";
|
|
70
|
+
export type { AsyncStorageLike, StorageApi } from "./storage";
|
|
71
|
+
export { isStorageAvailable, Storage, setStorageImplementation } from "./storage";
|
|
72
|
+
export { encodeBase64 } from "./utils/base64";
|
|
73
|
+
export type { PasswordRules } from "./validators";
|
|
74
|
+
export { isAadhaar, isAlphanumeric, isBetween, isEmail, isGstin, isHexColor, isIfsc, isIndianMobile, isIndianPincode, isInteger, isNonEmpty, isNumeric, isPan, isPhone, isStrongPassword, isUrl, maxLength, minLength, } from "./validators";
|
|
75
|
+
export type { DeviceInfoLike, ParsedVersion, Platform, UpdateInfo, UpdateType, VersionCheckResult, VersionCheckType, VersionComparison, VersionData, } from "./versionCheck";
|
|
76
|
+
export { isBuildBelowMinimum, parseBuildNumber, setDeviceInfoImplementation, useVersionCheck, VersionCheck, } from "./versionCheck";
|
|
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";
|
|
6
|
+
import { type Environment, type LogLevel } from "./config";
|
|
7
|
+
import { type RemoteLogger } from "./logger";
|
|
8
|
+
import { type NetInfoLike } from "./network/networkStatus";
|
|
9
|
+
import { setStorageImplementation } from "./storage";
|
|
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";
|
|
2
|
+
import { type LegacyTokenKeys } from "./auth/authStore";
|
|
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";
|
|
2
|
+
export { addNetworkStatusListener, getNetworkStatus, setNetworkStatusImplementation, useNetworkStatus, } from "./networkStatus";
|
|
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";
|
|
2
|
+
export { disablePush, dismissAllNotifications, enablePush, initPush, notifyLocal, onAction, onReceive, resetPush, setBadgeCount, setCategories, setPushImplementation, usePush, } from "./push";
|
|
3
|
+
export type { PushStatus } from "./status";
|
|
4
|
+
export { PUSH_STATUS } from "./status";
|
|
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";
|
|
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";
|
|
2
|
+
export type { PushAction, PushActionHandler } from "./push";
|
|
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";
|
|
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";
|
|
2
|
+
export { createApiBaseQuery } from "./apiBaseQuery";
|
|
3
|
+
export { APP_API_DEFAULTS, createAppApi } from "./createAppApi";
|
|
4
|
+
export { setupApiListeners } from "./listeners";
|
|
5
|
+
export type { ListFilterValue, ListQuery, PagedDataObject, PagedListRequest, SortOrder, } from "./paging";
|
|
6
|
+
export { buildListQuery, getNextPageParam, getPreviousPageParam, hasNextPage, hasPreviousPage, } from "./paging";
|
|
7
|
+
export type { PersistedQueries, PersistedQueriesOptions } from "./persistedQueries";
|
|
8
|
+
export { createPersistedQueries, PERSISTED_QUERIES_RESTORED } from "./persistedQueries";
|
|
9
|
+
export type { ApiTag, TagId } from "./tags";
|
|
10
|
+
export { itemTag, LIST_TAG_ID, listTag, providesList, providesPagedList } from "./tags";
|
|
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";
|
|
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";
|
|
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';
|
|
|
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";
|
|
2
|
+
export { errorToastMiddleware, isSilentRejection } from "./errorToastMiddleware";
|
|
3
|
+
export type { RootReducerOptions } from "./rootReducer";
|
|
4
|
+
export { createRootReducer, resetState } from "./rootReducer";
|
|
5
|
+
export { SERIALIZABLE_IGNORED_ACTION_PATHS } from "./serializableCheck";
|
|
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);
|