feat(native): share a booking document to TREK and import it into a trip

TREK now appears under "Open in" and in the share sheet for PDFs, calendar
entries, Wallet passes and mails (iOS document types, Android VIEW and SEND
filters). The native side reads the file (up to 15 MB) and hands it to the UI,
which asks which trip it belongs to, upcoming trips first, then opens that
trip's booking import with the file already chosen.
This commit is contained in:
Maurice
2026-11-06 13:28:00 +01:00
parent 56f9a92054
commit 825469a7f2
45 changed files with 521 additions and 3 deletions
+14
View File
@@ -49,6 +49,20 @@ export interface TrekShellPlugin {
event: 'location',
listener: (payload: NativeLocationPayload) => void
): Promise<{ remove: () => Promise<void> }>;
addListener(
event: 'sharedFile',
listener: (payload: SharedFilePayload) => void
): Promise<{ remove: () => Promise<void> }>;
/** Feature sharedFiles: the booking document shared to TREK before the UI ran. */
takeSharedFile(): Promise<{ file: SharedFilePayload | null }>;
}
/** A document shared to TREK, as the native side reads it. */
export interface SharedFilePayload {
name: string;
mimeType: string;
/** base64 */
data: string;
}
/** A position, or an error shaped like GeolocationPositionError (1 denied, 2 unavailable). */