@voltro/react-native 0.81.0 → 0.82.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/CHANGELOG.md +1520 -6
- package/THIRD-PARTY-NOTICES.md +115 -1
- package/dist/index.d.ts +239 -112
- package/dist/index.js +217 -135
- package/dist/schema.d.ts +15 -0
- package/dist/schema.js +18 -15
- package/package.json +4 -3
package/THIRD-PARTY-NOTICES.md
CHANGED
|
@@ -5,7 +5,7 @@ property of its respective copyright holders and is used under the terms of
|
|
|
5
5
|
its license. This file is provided for attribution; it grants no rights in
|
|
6
6
|
@voltro/react-native itself, which is proprietary (see LICENSE).
|
|
7
7
|
|
|
8
|
-
Generated from the resolved runtime dependency closure (
|
|
8
|
+
Generated from the resolved runtime dependency closure (17 packages).
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -205,6 +205,34 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
205
205
|
SOFTWARE.
|
|
206
206
|
```
|
|
207
207
|
|
|
208
|
+
## isomorphic.js@0.2.5
|
|
209
|
+
|
|
210
|
+
License: MIT
|
|
211
|
+
|
|
212
|
+
```
|
|
213
|
+
The MIT License (MIT)
|
|
214
|
+
|
|
215
|
+
Copyright (c) 2020 Kevin Jahns <kevin.jahns@protonmail.com>.
|
|
216
|
+
|
|
217
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
218
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
219
|
+
in the Software without restriction, including without limitation the rights
|
|
220
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
221
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
222
|
+
furnished to do so, subject to the following conditions:
|
|
223
|
+
|
|
224
|
+
The above copyright notice and this permission notice shall be included in all
|
|
225
|
+
copies or substantial portions of the Software.
|
|
226
|
+
|
|
227
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
228
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
229
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
230
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
231
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
232
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
233
|
+
SOFTWARE.
|
|
234
|
+
```
|
|
235
|
+
|
|
208
236
|
## jose@6.2.12
|
|
209
237
|
|
|
210
238
|
License: MIT
|
|
@@ -261,6 +289,34 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
261
289
|
SOFTWARE.
|
|
262
290
|
```
|
|
263
291
|
|
|
292
|
+
## lib0@0.2.117
|
|
293
|
+
|
|
294
|
+
License: MIT
|
|
295
|
+
|
|
296
|
+
```
|
|
297
|
+
The MIT License (MIT)
|
|
298
|
+
|
|
299
|
+
Copyright (c) 2019 Kevin Jahns <kevin.jahns@protonmail.com>.
|
|
300
|
+
|
|
301
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
302
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
303
|
+
in the Software without restriction, including without limitation the rights
|
|
304
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
305
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
306
|
+
furnished to do so, subject to the following conditions:
|
|
307
|
+
|
|
308
|
+
The above copyright notice and this permission notice shall be included in all
|
|
309
|
+
copies or substantial portions of the Software.
|
|
310
|
+
|
|
311
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
312
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
313
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
314
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
315
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
316
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
317
|
+
SOFTWARE.
|
|
318
|
+
```
|
|
319
|
+
|
|
264
320
|
## typeid-js@1.2.0
|
|
265
321
|
|
|
266
322
|
License: Apache-2.0
|
|
@@ -541,3 +597,61 @@ The above copyright notice and this permission notice shall be included in all c
|
|
|
541
597
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
542
598
|
```
|
|
543
599
|
|
|
600
|
+
## y-protocols@1.0.7
|
|
601
|
+
|
|
602
|
+
License: MIT
|
|
603
|
+
|
|
604
|
+
```
|
|
605
|
+
The MIT License (MIT)
|
|
606
|
+
|
|
607
|
+
Copyright (c) 2019 Kevin Jahns <kevin.jahns@protonmail.com>.
|
|
608
|
+
|
|
609
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
610
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
611
|
+
in the Software without restriction, including without limitation the rights
|
|
612
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
613
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
614
|
+
furnished to do so, subject to the following conditions:
|
|
615
|
+
|
|
616
|
+
The above copyright notice and this permission notice shall be included in all
|
|
617
|
+
copies or substantial portions of the Software.
|
|
618
|
+
|
|
619
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
620
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
621
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
622
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
623
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
624
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
625
|
+
SOFTWARE.
|
|
626
|
+
```
|
|
627
|
+
|
|
628
|
+
## yjs@13.6.32
|
|
629
|
+
|
|
630
|
+
License: MIT
|
|
631
|
+
|
|
632
|
+
```
|
|
633
|
+
The MIT License (MIT)
|
|
634
|
+
|
|
635
|
+
Copyright (c) 2023
|
|
636
|
+
- Kevin Jahns <kevin.jahns@protonmail.com>.
|
|
637
|
+
- Chair of Computer Science 5 (Databases & Information Systems), RWTH Aachen University, Germany
|
|
638
|
+
|
|
639
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
640
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
641
|
+
in the Software without restriction, including without limitation the rights
|
|
642
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
643
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
644
|
+
furnished to do so, subject to the following conditions:
|
|
645
|
+
|
|
646
|
+
The above copyright notice and this permission notice shall be included in all
|
|
647
|
+
copies or substantial portions of the Software.
|
|
648
|
+
|
|
649
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
650
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
651
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
652
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
653
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
654
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
655
|
+
SOFTWARE.
|
|
656
|
+
```
|
|
657
|
+
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,42 @@
|
|
|
1
1
|
import { ApiHandle } from '@voltro/client';
|
|
2
|
+
import { BiometricSource } from '@voltro/client';
|
|
3
|
+
import { browserOnlineSource } from '@voltro/client';
|
|
2
4
|
import { ClientDescriptorMap } from '@voltro/client';
|
|
5
|
+
import { DeepLinkDescriptor } from '@voltro/client';
|
|
6
|
+
import { DeepLinkHandler } from '@voltro/client';
|
|
7
|
+
import { deepLinkHref } from '@voltro/client';
|
|
8
|
+
import { DeepLinkParams } from '@voltro/client';
|
|
9
|
+
import { DeepLinkSource } from '@voltro/client';
|
|
10
|
+
import { defineDeepLink } from '@voltro/client';
|
|
11
|
+
import { DefineDeepLinkConfig } from '@voltro/client';
|
|
12
|
+
import { dispatchDeepLink } from '@voltro/client';
|
|
13
|
+
import { KvStore } from '@voltro/local-first';
|
|
14
|
+
import { LifecycleSource } from '@voltro/client';
|
|
15
|
+
import { matchDeepLink } from '@voltro/client';
|
|
16
|
+
import { matchFirstDeepLink } from '@voltro/client';
|
|
3
17
|
import { MountedApi } from '@voltro/client';
|
|
18
|
+
import { NotificationSurface } from '@voltro/client';
|
|
19
|
+
import { OnlineSource } from '@voltro/client';
|
|
20
|
+
import { PersistenceAdapter } from '@voltro/local-first';
|
|
21
|
+
import { PlatformAdapter } from '@voltro/client';
|
|
22
|
+
import { PlatformCapabilities } from '@voltro/client';
|
|
4
23
|
import { ResolvableHeaders } from '@voltro/client';
|
|
5
24
|
import { ResolvedClient } from '@voltro/client';
|
|
25
|
+
import { runDeepLink } from '@voltro/client';
|
|
6
26
|
import { StoreStorageProvider } from '@voltro/client';
|
|
7
27
|
import { SupervisorHandle } from '@voltro/client';
|
|
28
|
+
import { TokenStore } from '@voltro/client';
|
|
29
|
+
import { UpdateChannel } from '@voltro/client';
|
|
30
|
+
|
|
31
|
+
export declare const appStateLifecycle: (appState: AppStateLike) => LifecycleSource;
|
|
32
|
+
|
|
33
|
+
/** `react-native`'s `AppState`, structurally. */
|
|
34
|
+
export declare interface AppStateLike {
|
|
35
|
+
readonly currentState: string;
|
|
36
|
+
readonly addEventListener: (type: 'change', handler: (state: string) => void) => {
|
|
37
|
+
readonly remove: () => void;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
8
40
|
|
|
9
41
|
/**
|
|
10
42
|
* The async storage this adapter writes through to — `AsyncStorage` from
|
|
@@ -64,6 +96,8 @@ export declare interface AsyncStoragePersistenceOptions {
|
|
|
64
96
|
readonly onError?: (key: string, error: unknown) => void;
|
|
65
97
|
}
|
|
66
98
|
|
|
99
|
+
export declare type BackgroundFetchOutcome = 'new-data' | 'no-data' | 'failed';
|
|
100
|
+
|
|
67
101
|
export declare type BackgroundSyncAction = {
|
|
68
102
|
readonly type: 'foreground';
|
|
69
103
|
} | {
|
|
@@ -82,6 +116,8 @@ export declare type BackgroundSyncAction = {
|
|
|
82
116
|
readonly type: 'reset';
|
|
83
117
|
};
|
|
84
118
|
|
|
119
|
+
export declare type BackgroundSyncAvailability = 'available' | 'denied' | 'restricted' | 'unknown';
|
|
120
|
+
|
|
85
121
|
export declare const backgroundSyncReducer: (state: BackgroundSyncState, action: BackgroundSyncAction) => BackgroundSyncState;
|
|
86
122
|
|
|
87
123
|
export declare interface BackgroundSyncState {
|
|
@@ -102,9 +138,35 @@ export declare interface BackgroundSyncState {
|
|
|
102
138
|
|
|
103
139
|
export declare type BackgroundSyncStatus = 'idle' | 'syncing' | 'success' | 'error';
|
|
104
140
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
141
|
+
export declare interface BackgroundSyncTask {
|
|
142
|
+
readonly name: string;
|
|
143
|
+
/** Define the task with the OS and register it. Idempotent. */
|
|
144
|
+
readonly register: () => Promise<void>;
|
|
145
|
+
readonly unregister: () => Promise<void>;
|
|
146
|
+
/** Whether the OS lets this app fetch in the background at all. */
|
|
147
|
+
readonly availability: () => Promise<BackgroundSyncAvailability>;
|
|
148
|
+
/** Run the task body now (the same code the OS runs) — for a manual trigger or a test. */
|
|
149
|
+
readonly runNow: () => Promise<BackgroundFetchOutcome>;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export declare interface BackgroundSyncTaskOptions {
|
|
153
|
+
/** The task's name — stable across builds; the OS keys registrations by it. */
|
|
154
|
+
readonly name?: string;
|
|
155
|
+
readonly taskManager: ExpoTaskManagerLike;
|
|
156
|
+
readonly backgroundFetch: ExpoBackgroundFetchLike;
|
|
157
|
+
/** The sync itself: `'new-data'` when something was pulled or pushed. Throw = `'failed'`. */
|
|
158
|
+
readonly run: () => Promise<BackgroundFetchOutcome | void>;
|
|
159
|
+
/** Android's hint; iOS ignores it. Default 15 minutes (the platform floor). */
|
|
160
|
+
readonly minimumIntervalSeconds?: number;
|
|
161
|
+
/** Keep the task after the user swipes the app away (Android). Default true. */
|
|
162
|
+
readonly survivesTermination?: boolean;
|
|
163
|
+
/** Register again after a reboot (Android). Default true. */
|
|
164
|
+
readonly startOnBoot?: boolean;
|
|
165
|
+
/** Observe each background run's outcome (the sync banner's `reportFailure`). */
|
|
166
|
+
readonly onOutcome?: (outcome: BackgroundFetchOutcome, error?: unknown) => void;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export { browserOnlineSource }
|
|
108
170
|
|
|
109
171
|
/**
|
|
110
172
|
* Build a React-Native persistence adapter over an async key-value storage.
|
|
@@ -122,68 +184,58 @@ export declare const browserOnlineSource: OnlineSource;
|
|
|
122
184
|
export declare const createAsyncStoragePersistence: (options: AsyncStoragePersistenceOptions) => AsyncStoragePersistence;
|
|
123
185
|
|
|
124
186
|
/**
|
|
125
|
-
*
|
|
126
|
-
*
|
|
187
|
+
* Build the Expo adapter. Hydrates the persisted stores first — await it, then
|
|
188
|
+
* `installPlatform(result.adapter)`, then render.
|
|
127
189
|
*/
|
|
128
|
-
export declare
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
190
|
+
export declare const createExpoPlatform: (options: CreateExpoPlatformOptions) => Promise<ExpoPlatform>;
|
|
191
|
+
|
|
192
|
+
export declare interface CreateExpoPlatformOptions {
|
|
193
|
+
/** `Platform.OS` — `'ios'` | `'android'` | `'web'`. */
|
|
194
|
+
readonly os: string;
|
|
195
|
+
readonly netInfo: NetInfoLike;
|
|
196
|
+
readonly appState: AppStateLike;
|
|
197
|
+
readonly linking: LinkingLike;
|
|
198
|
+
readonly secureStore: SecureStoreLike;
|
|
199
|
+
/** AsyncStorage (or any async key-value store) for persisted stores. */
|
|
200
|
+
readonly storage: AsyncKeyValueStorage;
|
|
201
|
+
/** Which persisted keys to hydrate — see `createAsyncStoragePersistence`. */
|
|
202
|
+
readonly persistedKeys?: ReadonlyArray<string>;
|
|
203
|
+
readonly notifications?: NotificationsLike;
|
|
204
|
+
/** Expo project id for `getExpoPushTokenAsync`. */
|
|
205
|
+
readonly expoProjectId?: string;
|
|
206
|
+
readonly updates?: UpdatesLike;
|
|
207
|
+
readonly localAuthentication?: LocalAuthenticationLike;
|
|
208
|
+
/** The app's version (`Constants.expoConfig?.version`). */
|
|
209
|
+
readonly appVersion?: string;
|
|
210
|
+
readonly webSocket?: PlatformAdapter['webSocket'];
|
|
211
|
+
readonly capabilities?: Partial<PlatformCapabilities>;
|
|
212
|
+
readonly extensions?: Readonly<Record<string, unknown>>;
|
|
132
213
|
}
|
|
133
214
|
|
|
134
|
-
|
|
135
|
-
export declare type DeepLinkHandler<Pattern extends string> = (params: DeepLinkParams<Pattern>) => void | Promise<void>;
|
|
215
|
+
export declare const createExpoSqliteLocalFirst: (db: SqliteDatabaseLike) => Promise<ExpoSqliteLocalFirst>;
|
|
136
216
|
|
|
137
|
-
|
|
138
|
-
* Substitute captured params back into a pattern, producing a concrete path.
|
|
139
|
-
*
|
|
140
|
-
* `deepLinkHref('/orders/:id', { id: '42' })` → `'/orders/42'`. This is the
|
|
141
|
-
* inverse of {@link matchDeepLink} and it exists because a DERIVED deep link
|
|
142
|
-
* (one the generator built from an Expo Router screen) navigates to the very
|
|
143
|
-
* path it matched — the screen's own route.
|
|
144
|
-
*
|
|
145
|
-
* It lives here rather than being emitted into the generated module on purpose:
|
|
146
|
-
* generated code that carries logic is logic nothing tests. A missing param
|
|
147
|
-
* would silently produce `/orders/` (a different, probably-existing route), so
|
|
148
|
-
* it throws instead.
|
|
149
|
-
*/
|
|
150
|
-
export declare const deepLinkHref: (pattern: string, params: Readonly<Record<string, string>>) => string;
|
|
217
|
+
export { DeepLinkDescriptor }
|
|
151
218
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
*/
|
|
160
|
-
export declare type DeepLinkParams<Pattern extends string> = Pattern extends `${string}:${infer Param}/${infer Rest}` ? {
|
|
161
|
-
readonly [K in Param | keyof DeepLinkParams<`/${Rest}`>]: string;
|
|
162
|
-
} : Pattern extends `${string}:${infer Param}` ? {
|
|
163
|
-
readonly [K in Param]: string;
|
|
164
|
-
} : Record<string, never>;
|
|
219
|
+
export { DeepLinkHandler }
|
|
220
|
+
|
|
221
|
+
export { deepLinkHref }
|
|
222
|
+
|
|
223
|
+
export { DeepLinkParams }
|
|
224
|
+
|
|
225
|
+
export declare const DEFAULT_BACKGROUND_SYNC_TASK = "voltro-background-sync";
|
|
165
226
|
|
|
166
227
|
/** The default constructor: React Native's global `WebSocket`. Exported so the
|
|
167
228
|
* refusal below is testable — an untestable error message is one nobody has
|
|
168
229
|
* ever read. */
|
|
169
230
|
export declare const defaultWebSocketConstructor: (url: string, protocols?: string | ReadonlyArray<string>) => WebSocket;
|
|
170
231
|
|
|
171
|
-
/**
|
|
172
|
-
*
|
|
173
|
-
|
|
174
|
-
* ```ts
|
|
175
|
-
* export default defineDeepLink({
|
|
176
|
-
* pattern: '/orders/:id',
|
|
177
|
-
* handler: ({ id }) => navigateTo(`/orders/${id}`),
|
|
178
|
-
* })
|
|
179
|
-
* ```
|
|
180
|
-
*/
|
|
181
|
-
export declare const defineDeepLink: <const Pattern extends string>(config: DefineDeepLinkConfig<Pattern>) => DeepLinkDescriptor<Pattern>;
|
|
232
|
+
/** `expo-task-manager` requires `defineTask` at module scope, once; this
|
|
233
|
+
* keeps the task body reachable from there while `register` stays lazy. */
|
|
234
|
+
export declare const defineBackgroundSyncTask: (options: BackgroundSyncTaskOptions) => BackgroundSyncTask;
|
|
182
235
|
|
|
183
|
-
export
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
}
|
|
236
|
+
export { defineDeepLink }
|
|
237
|
+
|
|
238
|
+
export { DefineDeepLinkConfig }
|
|
187
239
|
|
|
188
240
|
/**
|
|
189
241
|
* The status mapping, pure and standalone (mirrors `@voltro/client`'s):
|
|
@@ -254,23 +306,61 @@ export declare const DEVICES_TABLE = "_voltro_devices";
|
|
|
254
306
|
*/
|
|
255
307
|
export declare type DeviceUpsert<Result = unknown> = (registration: DeviceRegistration) => Promise<Result>;
|
|
256
308
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
*
|
|
261
|
-
*
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
309
|
+
export { dispatchDeepLink }
|
|
310
|
+
|
|
311
|
+
/** `expo-background-fetch`, as much of it as this binding touches. The
|
|
312
|
+
* `BackgroundFetchResult` values are passed in because the enum lives in
|
|
313
|
+
* the module and this file imports nothing from it. */
|
|
314
|
+
export declare interface ExpoBackgroundFetchLike {
|
|
315
|
+
readonly registerTaskAsync: (name: string, options?: {
|
|
316
|
+
readonly minimumInterval?: number;
|
|
317
|
+
readonly stopOnTerminate?: boolean;
|
|
318
|
+
readonly startOnBoot?: boolean;
|
|
319
|
+
}) => Promise<void>;
|
|
320
|
+
readonly unregisterTaskAsync: (name: string) => Promise<void>;
|
|
321
|
+
readonly getStatusAsync?: () => Promise<number | null>;
|
|
322
|
+
readonly BackgroundFetchResult: {
|
|
323
|
+
readonly NewData: unknown;
|
|
324
|
+
readonly NoData: unknown;
|
|
325
|
+
readonly Failed: unknown;
|
|
326
|
+
};
|
|
327
|
+
readonly BackgroundFetchStatus?: {
|
|
328
|
+
readonly Available: number;
|
|
329
|
+
readonly Denied: number;
|
|
330
|
+
readonly Restricted: number;
|
|
331
|
+
};
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
export declare const expoBiometrics: (auth: LocalAuthenticationLike) => BiometricSource;
|
|
335
|
+
|
|
336
|
+
export declare const expoNotifications: (notifications: NotificationsLike, expoProjectId?: string) => NotificationSurface;
|
|
337
|
+
|
|
338
|
+
export declare interface ExpoPlatform {
|
|
339
|
+
readonly adapter: PlatformAdapter;
|
|
340
|
+
/** The hydrated persistence — `flush()` before backgrounding if needed. */
|
|
341
|
+
readonly persistence: AsyncStoragePersistence;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
export declare const expoSecureTokenStore: (secureStore: SecureStoreLike) => TokenStore;
|
|
345
|
+
|
|
346
|
+
export declare interface ExpoSqliteLocalFirst {
|
|
347
|
+
readonly persistence: PersistenceAdapter;
|
|
348
|
+
readonly kv: KvStore;
|
|
349
|
+
/** Create the tables. Called by `createExpoSqliteLocalFirst`; exposed for a
|
|
350
|
+
* caller that opens the database itself. */
|
|
351
|
+
readonly migrate: () => Promise<void>;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
/** `expo-task-manager`, as much of it as this binding touches. */
|
|
355
|
+
export declare interface ExpoTaskManagerLike {
|
|
356
|
+
readonly defineTask: (name: string, task: (body: {
|
|
357
|
+
readonly data?: unknown;
|
|
358
|
+
readonly error?: unknown;
|
|
359
|
+
}) => Promise<unknown>) => void;
|
|
360
|
+
readonly isTaskRegisteredAsync?: (name: string) => Promise<boolean>;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
export declare const expoUpdates: (updates: UpdatesLike) => UpdateChannel;
|
|
274
364
|
|
|
275
365
|
/**
|
|
276
366
|
* Subscribe to "app returned to the foreground". Returns an unsubscribe.
|
|
@@ -287,32 +377,32 @@ export declare const initialBackgroundSyncState: BackgroundSyncState;
|
|
|
287
377
|
/** Narrow an untrusted string to a {@link DevicePlatform}. */
|
|
288
378
|
export declare const isDevicePlatform: (value: unknown) => value is DevicePlatform;
|
|
289
379
|
|
|
290
|
-
|
|
291
|
-
* Match a `pattern` against a `path`, returning the captured params or `null`
|
|
292
|
-
* when it does not match. Pure — no navigation, no side effects.
|
|
293
|
-
*
|
|
294
|
-
* ```ts
|
|
295
|
-
* matchDeepLink('/orders/:id', '/orders/42') // → { id: '42' }
|
|
296
|
-
* matchDeepLink('/orders/:id', '/orders/42/edit') // → null
|
|
297
|
-
* matchDeepLink('/health', '/health') // → {}
|
|
298
|
-
* ```
|
|
299
|
-
*
|
|
300
|
-
* A `*` segment matches exactly one segment without capturing; a trailing `*`
|
|
301
|
-
* is not a catch-all (keep the model boringly predictable — one pattern
|
|
302
|
-
* segment matches one path segment).
|
|
303
|
-
*/
|
|
304
|
-
export declare const matchDeepLink: <Pattern extends string>(pattern: Pattern, path: string) => DeepLinkParams<Pattern> | null;
|
|
380
|
+
export declare const linkingDeepLinks: (linking: LinkingLike) => DeepLinkSource;
|
|
305
381
|
|
|
306
|
-
/**
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
382
|
+
/** `expo-linking` / `react-native`'s `Linking`, structurally. */
|
|
383
|
+
export declare interface LinkingLike {
|
|
384
|
+
readonly getInitialURL: () => Promise<string | null>;
|
|
385
|
+
readonly addEventListener: (type: 'url', handler: (event: {
|
|
386
|
+
readonly url: string;
|
|
387
|
+
}) => void) => {
|
|
388
|
+
readonly remove: () => void;
|
|
389
|
+
};
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
/** `expo-local-authentication`, the subset used. */
|
|
393
|
+
export declare interface LocalAuthenticationLike {
|
|
394
|
+
readonly hasHardwareAsync: () => Promise<boolean>;
|
|
395
|
+
readonly isEnrolledAsync: () => Promise<boolean>;
|
|
396
|
+
readonly authenticateAsync: (options?: {
|
|
397
|
+
readonly promptMessage?: string;
|
|
398
|
+
}) => Promise<{
|
|
399
|
+
readonly success: boolean;
|
|
400
|
+
}>;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
export { matchDeepLink }
|
|
404
|
+
|
|
405
|
+
export { matchFirstDeepLink }
|
|
316
406
|
|
|
317
407
|
/** One api this app talks to. `group` and `descriptors` come from the api's
|
|
318
408
|
* generated rpc surface — on mobile, from the file `voltro codegen` writes
|
|
@@ -377,6 +467,29 @@ export declare interface NetInfoState {
|
|
|
377
467
|
readonly isInternetReachable?: boolean | null;
|
|
378
468
|
}
|
|
379
469
|
|
|
470
|
+
/** `expo-notifications`, the subset used. */
|
|
471
|
+
export declare interface NotificationsLike {
|
|
472
|
+
readonly getPermissionsAsync: () => Promise<{
|
|
473
|
+
readonly status: string;
|
|
474
|
+
}>;
|
|
475
|
+
readonly requestPermissionsAsync: () => Promise<{
|
|
476
|
+
readonly status: string;
|
|
477
|
+
}>;
|
|
478
|
+
readonly getExpoPushTokenAsync?: (options?: {
|
|
479
|
+
readonly projectId?: string;
|
|
480
|
+
}) => Promise<{
|
|
481
|
+
readonly data: string;
|
|
482
|
+
}>;
|
|
483
|
+
readonly scheduleNotificationAsync?: (request: {
|
|
484
|
+
readonly content: {
|
|
485
|
+
readonly title: string;
|
|
486
|
+
readonly body?: string;
|
|
487
|
+
readonly data?: Record<string, unknown>;
|
|
488
|
+
};
|
|
489
|
+
readonly trigger: null;
|
|
490
|
+
}) => Promise<string>;
|
|
491
|
+
}
|
|
492
|
+
|
|
380
493
|
/**
|
|
381
494
|
* The mobile client posture. Spread into the client config on RN:
|
|
382
495
|
*
|
|
@@ -401,18 +514,7 @@ export declare interface OfflineFirstDefaults {
|
|
|
401
514
|
|
|
402
515
|
export declare const offlineFirstDefaults: OfflineFirstDefaults;
|
|
403
516
|
|
|
404
|
-
|
|
405
|
-
* A source of reachability. `subscribe` reports every change and returns an
|
|
406
|
-
* unsubscribe; `read` gives the value to start from.
|
|
407
|
-
*
|
|
408
|
-
* Injected rather than detected, because detection is exactly what went wrong:
|
|
409
|
-
* a `typeof navigator === 'undefined' ? true : …` fallback answers "online" on
|
|
410
|
-
* every platform that does not implement the API it is testing for.
|
|
411
|
-
*/
|
|
412
|
-
export declare interface OnlineSource {
|
|
413
|
-
readonly read: () => boolean;
|
|
414
|
-
readonly subscribe: (onChange: (online: boolean) => void) => () => void;
|
|
415
|
-
}
|
|
517
|
+
export { OnlineSource }
|
|
416
518
|
|
|
417
519
|
/**
|
|
418
520
|
* Register (or re-register, on token rotation) the current device.
|
|
@@ -456,11 +558,14 @@ export declare const resolveDeviceRegistration: (input: DeviceRegistrationInput,
|
|
|
456
558
|
*/
|
|
457
559
|
export declare const resolveDevWsUrl: (hostUri: string | undefined, port: number, path?: string) => string;
|
|
458
560
|
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
561
|
+
export { runDeepLink }
|
|
562
|
+
|
|
563
|
+
/** `expo-secure-store`, structurally. */
|
|
564
|
+
export declare interface SecureStoreLike {
|
|
565
|
+
readonly getItemAsync: (key: string) => Promise<string | null>;
|
|
566
|
+
readonly setItemAsync: (key: string, value: string) => Promise<void>;
|
|
567
|
+
readonly deleteItemAsync: (key: string) => Promise<void>;
|
|
568
|
+
}
|
|
464
569
|
|
|
465
570
|
/**
|
|
466
571
|
* Should a trigger run a sync right now? Pure — the single place the timing
|
|
@@ -484,6 +589,14 @@ export declare interface ShouldSyncOptions {
|
|
|
484
589
|
readonly enabled: boolean;
|
|
485
590
|
}
|
|
486
591
|
|
|
592
|
+
/** The subset of `expo-sqlite`'s `SQLiteDatabase` this adapter uses. */
|
|
593
|
+
export declare interface SqliteDatabaseLike {
|
|
594
|
+
readonly execAsync: (sql: string) => Promise<void>;
|
|
595
|
+
readonly runAsync: (sql: string, params?: ReadonlyArray<string | number | Uint8Array | null>) => Promise<unknown>;
|
|
596
|
+
readonly getFirstAsync: <T = Record<string, unknown>>(sql: string, params?: ReadonlyArray<string | number | Uint8Array | null>) => Promise<T | null>;
|
|
597
|
+
readonly getAllAsync: <T = Record<string, unknown>>(sql: string, params?: ReadonlyArray<string | number | Uint8Array | null>) => Promise<ReadonlyArray<T>>;
|
|
598
|
+
}
|
|
599
|
+
|
|
487
600
|
/**
|
|
488
601
|
* Connect every api and keep them connected.
|
|
489
602
|
*
|
|
@@ -530,6 +643,20 @@ export declare interface StartMobileApisOptions {
|
|
|
530
643
|
*/
|
|
531
644
|
export declare const toApiHandles: (apis: ReadonlyArray<MobileApiBinding>, clients: ReadonlyMap<string, ResolvedClient>) => ReadonlyMap<string, ApiHandle>;
|
|
532
645
|
|
|
646
|
+
/** `expo-updates`, the subset used. */
|
|
647
|
+
export declare interface UpdatesLike {
|
|
648
|
+
readonly checkForUpdateAsync: () => Promise<{
|
|
649
|
+
readonly isAvailable: boolean;
|
|
650
|
+
readonly manifest?: {
|
|
651
|
+
readonly id?: string;
|
|
652
|
+
};
|
|
653
|
+
}>;
|
|
654
|
+
readonly fetchUpdateAsync: () => Promise<unknown>;
|
|
655
|
+
readonly reloadAsync: () => Promise<void>;
|
|
656
|
+
readonly updateId?: string | null;
|
|
657
|
+
readonly runtimeVersion?: string | null;
|
|
658
|
+
}
|
|
659
|
+
|
|
533
660
|
/**
|
|
534
661
|
* Register a periodic + foreground-triggered sync callback.
|
|
535
662
|
*
|