@testerpaykit/expo 2.1.3 → 2.3.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/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _testerpaykit_api_client from '@testerpaykit/api-client';
2
- import { SessionEventInput, BugReportAttachmentInput, BugReportAttachmentResponse, BugReportPayload, BugReportResponse, TaskListResponse, TesterTask, TesterPayKitApiClient, WorkCommand, CompensationWallet, PaidAssignment, AnonymousLoginResponse, BugReportType, BugSeverity, BugCategory, MyBugReportSummary, NotificationsResult, TesterSessionEndReason, PushRegistration, TesterProfile, TesterPoints, ChecklistTask, ChecklistStepResult, EarningsSummary, PayoutRecord } from '@testerpaykit/api-client';
2
+ import { SessionEventInput, BugReportAttachmentInput, BugReportAttachmentResponse, BugReportPayload, BugReportResponse, TaskListResponse, TesterTask, TesterPayKitApiClient, WorkCommand, CompensationWallet, PaidAssignment, AnonymousLoginResponse, BugReportType, BugSeverity, BugCategory, MyBugReportSummary, AppLinkResponse, NotificationsResult, TesterSessionEndReason, PushRegistration, TesterProfile, TesterPoints, ClientOutdatedInfo, ChecklistTask, ChecklistStepResult, EarningsSummary, PayoutRecord } from '@testerpaykit/api-client';
3
3
  export { BugCategory, BugReportAttachmentInput, BugReportAttachmentResponse, BugReportType, BugSeverity, CompensationWallet, EarningsSummary, EnrollmentResponse, MoneyEntry, MyBugReportSummary, MyBugReportsResponse, NotificationsResult, PaidAssignment, PayoutRecord, PushRegistration, TaskListFilter, TaskListResponse, TesterPoints, TesterProfile, TesterTask, TpkNotification, WorkCommand } from '@testerpaykit/api-client';
4
4
  import { RemoteAiSession } from '@testerpaykit/core';
5
5
  import React, { RefObject, ReactNode } from 'react';
@@ -544,6 +544,17 @@ declare function deriveTaskProgress(res: TaskListResponse): TaskProgress;
544
544
  */
545
545
  declare function findAssignmentForTask(tasks: TesterTask[], key: string): TesterTask | null;
546
546
 
547
+ /** `beta`: TesterPayKit is active. `store`: completely inert. */
548
+ type TpkBuildChannel = 'beta' | 'store';
549
+ /**
550
+ * The channel this build was made for. Fixed at build time by the config
551
+ * plugin (`["@testerpaykit/expo", { "channel": "beta" }]` or
552
+ * `TPK_CHANNEL=beta`); without one, `__DEV__` builds are `beta` and release
553
+ * builds `store`. Apps use it to hide their own TesterPayKit entries (e.g. a
554
+ * "Become a tester" row) in store builds.
555
+ */
556
+ declare function getBuildChannel(): TpkBuildChannel;
557
+
547
558
  /** Total agreed working time, including reading/reporting outside app screens.
548
559
  * This preview is never an approved balance. The server validates every receipt. */
549
560
  declare function workSeconds(a: PaidAssignment, serverNow: number): number;
@@ -580,6 +591,193 @@ declare class CompensationClient {
580
591
  resolveConflict(): Promise<void>;
581
592
  }
582
593
 
594
+ type TpkLanguage = 'de' | 'en';
595
+ /** The device's UI language, reduced to `de` / `en`. */
596
+ declare function detectDeviceLanguage(): TpkLanguage;
597
+ /** Pins the UI language for every TPK surface below it. `undefined`
598
+ * keeps device detection. */
599
+ declare function TpkLanguageProvider({ language, children, }: {
600
+ language?: TpkLanguage;
601
+ children: ReactNode;
602
+ }): React.JSX.Element;
603
+ declare function useTpkLanguage(): TpkLanguage;
604
+ declare function useTpkStrings(): TpkStrings;
605
+ /** Money in the tester's language: "1,00 €" in German, "€1.00" in
606
+ * English. `currency` is an ISO-4217 code (EUR, USD, GBP …). */
607
+ declare function formatTpkMoney(amount: number, currency: string, language: TpkLanguage): string;
608
+ /** Picks the text for the active language: `tr({ en: '…', de: '…' })`.
609
+ * For surfaces with a handful of texts; big surfaces use TPK_STRINGS. */
610
+ declare function useTr(): (texts: {
611
+ en: string;
612
+ de: string;
613
+ }) => string;
614
+ interface TpkStrings {
615
+ menuReportBug: string;
616
+ menuDetailedReport: string;
617
+ menuFeedback: string;
618
+ menuAutoTest: string;
619
+ menuChecklist: string;
620
+ /** Opens the role picker ("Login with TPK"). */
621
+ menuChoosePersona: string;
622
+ /** "Du testest als …": shown while a made-up role is chosen. */
623
+ personaHint: (title: string) => string;
624
+ menuSendToClaude: string;
625
+ menuConnectClaude: string;
626
+ menuDisconnectClaude: string;
627
+ menuCachedCrashes: (count: number) => string;
628
+ menuWorkboard: string;
629
+ menuMyBugs: string;
630
+ menuSessionDetails: string;
631
+ menuMessages: string;
632
+ menuRetests: string;
633
+ menuDebugLogs: string;
634
+ menuEndSession: string;
635
+ menuSessionEarnings: string;
636
+ menuMyMoney: string;
637
+ menuYouAre: (handle: string) => string;
638
+ unreadBadgeA11y: (count: number) => string;
639
+ verifyOfflineTitle: string;
640
+ verifyOffline: string;
641
+ verifiedNow: string;
642
+ /** FAB screen-reader hint: a tap opens the report sheet. */
643
+ fabA11yHint: string;
644
+ /** Report sheet, bottom bar: "Retests" tile (shown when there is no checklist). */
645
+ sheetRetests: string;
646
+ /** Report sheet, bottom bar: the last tile, opens the list of everything. */
647
+ sheetAll: string;
648
+ /** Report sheet, "All" list: back to the report. */
649
+ sheetBack: string;
650
+ reportTitle: string;
651
+ reportClose: string;
652
+ reportSpeak: string;
653
+ stepTitles: readonly [string, string, string, string, string];
654
+ cancel: string;
655
+ back: string;
656
+ continue: string;
657
+ submit: string;
658
+ typeBug: string;
659
+ typeBugDescription: string;
660
+ typeCrash: string;
661
+ typeCrashDescription: string;
662
+ typeUiIssue: string;
663
+ typeUiIssueDescription: string;
664
+ typePerformance: string;
665
+ typePerformanceDescription: string;
666
+ typeFeature: string;
667
+ typeFeatureDescription: string;
668
+ typeFeedback: string;
669
+ typeFeedbackDescription: string;
670
+ severityCritical: string;
671
+ severityCriticalDescription: string;
672
+ severityHigh: string;
673
+ severityHighDescription: string;
674
+ severityMedium: string;
675
+ severityMediumDescription: string;
676
+ severityLow: string;
677
+ severityLowDescription: string;
678
+ frequencyAlways: string;
679
+ frequencyOften: string;
680
+ frequencySometimes: string;
681
+ frequencyOnce: string;
682
+ fieldTitle: string;
683
+ fieldTitlePlaceholder: string;
684
+ fieldDescription: string;
685
+ fieldDescriptionPlaceholder: string;
686
+ fieldExpected: string;
687
+ fieldExpectedPlaceholder: string;
688
+ fieldActual: string;
689
+ fieldActualPlaceholder: string;
690
+ fieldFrequency: string;
691
+ fieldComponent: string;
692
+ fieldComponentPlaceholder: string;
693
+ attachments: string;
694
+ attachScreenshot: string;
695
+ attachImage: string;
696
+ attachFile: string;
697
+ attachA11y: (label: string) => string;
698
+ removeA11y: (name: string) => string;
699
+ stepsAdd: string;
700
+ stepsPlaceholder: string;
701
+ stepsAddA11y: string;
702
+ stepsEmpty: string;
703
+ stepsReorderHint: string;
704
+ stepsDragA11y: (n: number) => string;
705
+ stepsRemoveA11y: (n: number) => string;
706
+ reviewType: string;
707
+ reviewSeverity: string;
708
+ reviewTitle: string;
709
+ reviewDescription: string;
710
+ reviewExpected: string;
711
+ reviewActual: string;
712
+ reviewFrequency: string;
713
+ reviewComponent: string;
714
+ reviewSteps: string;
715
+ reviewAttachments: string;
716
+ reviewEmpty: string;
717
+ errorRejected: string;
718
+ /** 403 phone_required (migration 077). */
719
+ errorPhoneRequired: string;
720
+ /** 403 approval_required — also the wrapper's waiting notice. */
721
+ awaitingApproval: string;
722
+ awaitingApprovalTitle: string;
723
+ /** 426 client_outdated: TPK in this build is below the server's minimum.
724
+ * Same text as the Flutter SDK. */
725
+ clientOutdated: (yours: string, min: string) => string;
726
+ errorFailed: string;
727
+ errorAttachmentLimit: (max: number) => string;
728
+ errorAttachmentSize: (maxMB: number) => string;
729
+ errorNoCaptureRef: string;
730
+ errorNeedsViewShot: string;
731
+ errorScreenshotFailed: string;
732
+ errorNeedsImagePicker: string;
733
+ errorImageNoData: string;
734
+ errorImagePickFailed: string;
735
+ errorNeedsDocumentPicker: string;
736
+ errorFileUnreadable: string;
737
+ errorFilePickFailed: string;
738
+ }
739
+ declare const TPK_STRINGS: Record<TpkLanguage, TpkStrings>;
740
+
741
+ /** One text in both languages. */
742
+ interface PersonaText {
743
+ de?: string | null;
744
+ en?: string | null;
745
+ }
746
+ /** A persona as the server sends it. */
747
+ interface PersonaOption {
748
+ id: string;
749
+ /** The project's own persona (vs. a template). */
750
+ own?: boolean;
751
+ slug?: string | null;
752
+ title: PersonaText;
753
+ sub?: PersonaText;
754
+ briefing?: PersonaText;
755
+ watch?: {
756
+ de?: string[];
757
+ en?: string[];
758
+ };
759
+ /** Made-up attributes (age, situation, ...). */
760
+ attributes?: Record<string, unknown>;
761
+ /** The developer suggested it for this project. */
762
+ suggested?: boolean;
763
+ }
764
+ /** Answer of `GET /v1/testers/me/personas`. */
765
+ interface PersonaCatalog {
766
+ /** Chosen persona id; null = the tester tests as themselves. */
767
+ current: string | null;
768
+ persona: PersonaOption | null;
769
+ personas: PersonaOption[];
770
+ }
771
+ /**
772
+ * What the host app sees (test builds only): the made-up role, the title
773
+ * in the device language (German, else English) and its attributes.
774
+ */
775
+ interface TpkPersona {
776
+ id: string;
777
+ title: string;
778
+ attributes: Record<string, unknown>;
779
+ }
780
+
583
781
  interface TpkExpoConfig {
584
782
  /** Project UUID — bootstrap via `tpk project create` first. */
585
783
  projectId: string;
@@ -708,14 +906,15 @@ interface SubmitBugResult {
708
906
  /**
709
907
  * Initialise the TesterPayKit client for an Expo app.
710
908
  *
909
+ * // null in a `store` build (see getBuildChannel)
711
910
  * const tpk = await TpkExpo.init({
712
911
  * projectId: '<uuid>',
713
912
  * testerCode: deviceCodeFromSettingsScreen,
714
913
  * apiBaseUrl: __DEV__ ? 'http://192.168.178.69:18080' : undefined,
715
914
  * });
716
- * await tpk.submitBug({ title: 'X broke', description: '...' });
717
- * tpk.trackScreenView('home');
718
- * tpk.trackTap('home', 'sign_up_button');
915
+ * await tpk?.submitBug({ title: 'X broke', description: '...' });
916
+ * tpk?.trackScreenView('home');
917
+ * tpk?.trackTap('home', 'sign_up_button');
719
918
  */
720
919
  declare class TpkExpo {
721
920
  private readonly config;
@@ -780,7 +979,14 @@ declare class TpkExpo {
780
979
  sessionId: string;
781
980
  /** Active tester identity. Updated by background auth flow. */
782
981
  tester: AnonymousLoginResponse['tester'];
783
- static init(config: TpkExpoConfig): Promise<TpkExpo>;
982
+ /** The build channel (see [getBuildChannel]). `store`: [init] returns null. */
983
+ static get channel(): TpkBuildChannel;
984
+ /**
985
+ * Resolves to null in a `store` build: nothing is started, read, written
986
+ * or sent (App Store Guideline 2.2), so hosts handle it exactly like a
987
+ * client that never came up. Never rejects for that reason.
988
+ */
989
+ static init(config: TpkExpoConfig): Promise<TpkExpo | null>;
784
990
  /**
785
991
  * POST a bug report to the server. Device + app snapshots are
786
992
  * gathered automatically; recent breadcrumbs are attached. On
@@ -835,7 +1041,7 @@ declare class TpkExpo {
835
1041
  * Whether this install may report yet (migrations 075 + 077: a
836
1042
  * confirmed DE/AT/CH number AND an admin's approval).
837
1043
  * - `verified`: number confirmed and approved (cached once both hold).
838
- * - `required`: ask for the number now.
1044
+ * - `required`: not confirmed yet; confirm once in the TPK app.
839
1045
  * - `awaitingApproval`: number confirmed, approval still pending.
840
1046
  * Never cached.
841
1047
  * - `unknown`: offline / not signed in, nothing cached.
@@ -893,7 +1099,7 @@ declare class TpkExpo {
893
1099
  /**
894
1100
  * Lets a person become a visible tester from the host's own UI (e.g. a
895
1101
  * "Become a tester" entry): the mounted TesterPayKitWrapper opens the
896
- * phone sheet when the number is not confirmed yet and says so when
1102
+ * TPK-app sheet when the number is not confirmed yet and says so when
897
1103
  * the approval is still pending. Returns the resulting [access]; when
898
1104
  * it is `ready` the widget appears. Without a mounted wrapper it only
899
1105
  * re-checks.
@@ -906,34 +1112,43 @@ declare class TpkExpo {
906
1112
  /** Startup: a cached confirmation shows the widget before the network. */
907
1113
  private accessFromCache;
908
1114
  private setAccess;
1115
+ private personaStore;
1116
+ private get personas();
909
1117
  /**
910
- * Sends the SMS code. `unavailable` means the server cannot send SMS
911
- * (no provider yet) — the host should let the report through.
1118
+ * The made-up role the tester chose for this test (id, title in the
1119
+ * device language, attributes), so the app can prepare matching test
1120
+ * data. `null` when the tester tests as themselves, before the role is
1121
+ * known, and always in a `store` build. Never real data of the tester.
912
1122
  */
913
- startPhone(phone: string): Promise<{
914
- ok: true;
915
- verificationId: string;
916
- devCode?: string;
917
- } | {
918
- ok: false;
919
- reason: 'invalid' | 'tooMany' | 'unavailable' | 'network';
920
- }>;
1123
+ get persona(): TpkPersona | null;
1124
+ /** Called whenever [persona] may have changed. Returns the unsubscribe. */
1125
+ onPersonaChange(listener: () => void): () => void;
921
1126
  /**
922
- * Confirms the code, bound to this device (hashed device key +
923
- * platform, migration 077). `awaitingApproval` is true when the server
924
- * says the person is not approved yet — the host must not open the
925
- * report then. Only a confirmed AND approved state is remembered.
926
- * `deviceNotAllowed`: the number is already confirmed on another
927
- * device; an admin has to allow this one.
928
- */
929
- confirmPhone(verificationId: string, code: string): Promise<{
930
- ok: true;
931
- handle: string;
932
- awaitingApproval: boolean;
933
- } | {
934
- ok: false;
935
- reason: 'wrong' | 'expired' | 'tooMany' | 'deviceNotAllowed' | 'network';
936
- }>;
1127
+ * Loads the roles to choose from and the current choice (also updates
1128
+ * [persona]). `null` when there is nothing to show: the tester is not in
1129
+ * the project yet (404), offline, or this is a `store` build (nothing is
1130
+ * sent there). Never throws.
1131
+ */
1132
+ loadPersonas(): Promise<PersonaCatalog | null>;
1133
+ /**
1134
+ * Chooses the role for the next sessions and reports (`null` = "Myself").
1135
+ * Throws when the server cannot be reached.
1136
+ */
1137
+ choosePersona(personaId: string | null): Promise<void>;
1138
+ /**
1139
+ * Starts the confirmation in the TPK app (decision 2026-11-10, replaces
1140
+ * the SMS code): a short-lived link for this install. Open `appUrl`
1141
+ * first (TPK app installed), `url` when that fails (web page with an
1142
+ * install hint). The person allows it there; [checkAppLink] then sees
1143
+ * the confirmed number. Throws when offline.
1144
+ */
1145
+ linkWithTpkApp(): Promise<AppLinkResponse>;
1146
+ /**
1147
+ * What the TPK-app sheet polls while it waits: the phone status asked
1148
+ * from the server. Once `verified` the gate is open, so what waited in
1149
+ * the queue goes out without another launch.
1150
+ */
1151
+ checkAppLink(): Promise<'verified' | 'required' | 'awaitingApproval' | 'unknown'>;
937
1152
  /**
938
1153
  * This tester's in-app notifications (newest first) + the unread count —
939
1154
  * powers the "Nachrichten" inbox. Mirrors the Flutter SDK.
@@ -1032,7 +1247,7 @@ declare class TpkExpo {
1032
1247
  /**
1033
1248
  * Ask a natural-language question about the project. Server embeds
1034
1249
  * the question, retrieves top-K relevant chunks from the project's
1035
- * knowledge-base, and asks gpt-4o-mini to synthesise an answer
1250
+ * knowledge-base, and asks gpt-6-luna to synthesise an answer
1036
1251
  * citing those chunks. Used by the SDK widget's "double-tap →
1037
1252
  * speak → answer" voice flow.
1038
1253
  *
@@ -1048,6 +1263,8 @@ declare class TpkExpo {
1048
1263
  * SDK's lifecycle + periodic flush.
1049
1264
  */
1050
1265
  private flushDurable;
1266
+ /** 426 client_outdated: no periodic flush any more in this app run. */
1267
+ private stopDurableSync;
1051
1268
  /** Tear down crash handler + network interceptor + durable sync (test hygiene). */
1052
1269
  dispose(): void;
1053
1270
  /** Build a bug-report payload — exposed so tests can introspect. */
@@ -1200,96 +1417,33 @@ declare function hasScreenshotConsent(storage: OnboardingStorage): Promise<boole
1200
1417
  declare function resetOnboardingState(storage: OnboardingStorage): Promise<void>;
1201
1418
 
1202
1419
  interface FloatingFeedbackButtonProps {
1203
- /** Tap "Report Bug". Required — this is the primary action. */
1204
- onReportBug: () => void;
1205
- /** Tap "Feedback". Required — general (non-bug) tester feedback. */
1206
- onGeneralFeedback: () => void;
1207
- /** Tap "My Workboard" — opens the TesterDashboard. Hidden when omitted
1208
- * (the wrapper omits it unless the host enabled the dashboard). */
1209
- onViewDashboard?: () => void;
1210
- /** Tap "Mein Geld" — the money overview. Hidden when omitted. */
1211
- onShowMyMoney?: () => void;
1212
- /** The tester's handle, shown as "Du bist …" at the top of the menu. */
1213
- testerHandle?: string | null;
1214
- /** Called after the first-tap tour (if any) on a tap that would open
1215
- * the menu. Returns true when it took the tap (the daily briefing is
1216
- * showing; it calls `openMenu` on "Los geht's"). A throw never blocks
1217
- * the menu. */
1218
- onDailyBriefing?: (openMenu: () => void) => Promise<boolean>;
1219
- /** The first-tap tour takes this tap (no briefing on top of it today). */
1420
+ /** A tap on the FAB (after the first tour and the daily briefing):
1421
+ * opens the report sheet. Required. */
1422
+ onOpen: () => void;
1423
+ /** Called after the first tour (if any) on a tap that would open the
1424
+ * sheet. Returns true when it took the tap (the daily briefing is
1425
+ * showing; it calls `openSheet` on "Los geht's"). A throw never blocks
1426
+ * the sheet. */
1427
+ onDailyBriefing?: (openSheet: () => void) => Promise<boolean>;
1428
+ /** The first tour takes this tap (no briefing on top of it today). */
1220
1429
  onTourShown?: () => void;
1221
- /** The menu opened (refresh counts, checklist). */
1222
- onMenuOpened?: () => void;
1223
- /** Tap "End Session" — typically opens SessionEndDialog. */
1224
- onEndSession: () => void;
1225
- /** Tap "My Retests". When omitted, the row is hidden. */
1226
- onShowRetests?: () => void;
1227
- /** Badge next to "My Retests". */
1228
- retestCount?: number;
1229
- /** Tap "Debug Logs" — typically opens a TpkTalker history viewer. */
1230
- onShowDebugLogs?: () => void;
1231
- /** Tap "My Bugs" — opens the MyBugsSheet (this tester's submitted bugs +
1232
- * current status). When omitted, the row is hidden. */
1233
- onShowMyBugs?: () => void;
1234
- /** Tap "Session Details" — opens the SessionDetailsSheet (taps, screens,
1235
- * buffered activity diagnostics). When omitted, hidden. */
1236
- onShowSessionDetails?: () => void;
1237
- /** Tap "Nachrichten" — opens the NotificationsSheet (server-pull inbox).
1238
- * When omitted, the row is hidden. */
1239
- onShowMessages?: () => void;
1240
- /** Unread-notification count shown next to "Nachrichten" and as a
1241
- * yellow badge on the FAB itself (distinct from `notificationCount`,
1242
- * which is the cached-crash count). */
1430
+ /** Unread-notification count shown as a yellow badge on the FAB. */
1243
1431
  unreadMessageCount?: number;
1244
- /** Tap "🤖 Auto Test (AI)" — opens the AI-tester surface that lets
1245
- * a server-side LLM drive the app for the next N actions. When
1246
- * omitted, the row is hidden. See `AiRemoteControl` for the
1247
- * receiver-side wiring. */
1248
- onAutoTest?: () => void;
1249
- /** Tap "What to test" — the project's checklist (ChecklistPanel).
1250
- * Hidden when omitted (the wrapper omits it while the checklist is
1251
- * empty). */
1252
- onShowChecklist?: () => void;
1253
- /** Tasks the tester has not passed yet — shown next to the label. */
1254
- checklistCount?: number;
1255
- /** "Send to Claude": one line plus the current screen, read by the
1256
- * developer's Claude Code session (`list_device_notes`). Hidden when
1257
- * omitted. */
1258
- onSendToClaude?: () => void;
1259
- /** Switches the live link to the developer's Claude Code session on
1260
- * or off (MCP `device_snapshot`). Hidden when omitted. */
1261
- onToggleLiveLink?: () => void;
1262
- /** Whether the live link is open — flips the toggle's label. */
1263
- liveLinkConnected?: boolean;
1264
- /** Long-press the FAB — opens the Voice-AI bug-narration flow.
1265
- * When omitted, long-press is a no-op. */
1266
- onLongPressVoiceBug?: () => void | Promise<void>;
1267
- /** Action behind "Send N cached crashes". Returns the count
1268
- * actually submitted. Row is hidden when omitted OR when
1269
- * notificationCount is 0. */
1270
- onFlushCachedCrashes?: () => Promise<number> | number;
1271
- /** Notification badge value (top-right of the FAB) + the
1272
- * "Send N cached crashes" row count. */
1432
+ /** Cached-crash count, shown as a badge bottom-right. */
1273
1433
  notificationCount?: number;
1434
+ /** Title of the chosen made-up role. Shows "Du testest als <title>
1435
+ * (gespielt)" next to the button; nothing when null/omitted. */
1436
+ personaTitle?: string | null;
1274
1437
  /** Initial position of the FAB itself (top-left corner of the 56×56
1275
- * button). Default (16, 100). The user can drag it. The menu opens
1276
- * downward when the FAB sits in the upper half of the window and
1277
- * upward when it sits in the lower half, so a bottom-anchored FAB
1278
- * (e.g. above a host tab dock) never pushes the menu off-screen. */
1438
+ * button). Default (16, 100). The user can drag it. */
1279
1439
  position?: {
1280
1440
  x: number;
1281
1441
  y: number;
1282
1442
  };
1283
- /** Confirmed server balance only (the ledger). Omit when no verified
1284
- * balance is available. There are no local estimates. */
1285
- confirmedEarnings?: {
1286
- amountCents: number;
1287
- currency: string;
1288
- };
1289
1443
  /** Outer style override. */
1290
1444
  style?: StyleProp<ViewStyle>;
1291
1445
  testID?: string;
1292
- /** Show the one-time, first-tap onboarding tour. Default true.
1446
+ /** Show the one-time onboarding tour on the first tap. Default true.
1293
1447
  * Set false to disable the tour entirely (e.g. in tests / demos). */
1294
1448
  enableFirstTapTour?: boolean;
1295
1449
  /** Storage adapter for the tour's "seen" flag. Optional — when
@@ -1298,7 +1452,93 @@ interface FloatingFeedbackButtonProps {
1298
1452
  * wiring. A failed/absent storage degrades gracefully. */
1299
1453
  tourStorage?: OnboardingStorage;
1300
1454
  }
1301
- declare function FloatingFeedbackButton({ onReportBug, onGeneralFeedback, onViewDashboard, onShowMyMoney, testerHandle, onDailyBriefing, onTourShown, onMenuOpened, onEndSession, onShowRetests, retestCount, onShowDebugLogs, onShowMyBugs, onShowSessionDetails, onShowMessages, unreadMessageCount, onAutoTest, onShowChecklist, checklistCount, onSendToClaude, onToggleLiveLink, liveLinkConnected, onLongPressVoiceBug, onFlushCachedCrashes, notificationCount, position, confirmedEarnings, style, testID, enableFirstTapTour, tourStorage, }: FloatingFeedbackButtonProps): React.ReactElement;
1455
+ declare function FloatingFeedbackButton({ onOpen, onDailyBriefing, onTourShown, unreadMessageCount, notificationCount, personaTitle, position, style, testID, enableFirstTapTour, tourStorage, }: FloatingFeedbackButtonProps): React.ReactElement;
1456
+
1457
+ type MaterialIconName = string;
1458
+ /**
1459
+ * Semantic icon names used by the SDK. Map to MaterialIcons glyph
1460
+ * names by default; consumers can override via TpkIconsContext.
1461
+ */
1462
+ type TpkIconName = 'bug_report' | 'feedback' | 'dashboard' | 'session_end' | 'voice' | 'voice_off' | 'close' | 'check' | 'star_filled' | 'star_outline' | 'camera' | 'image' | 'attachment' | 'music_note' | 'language' | 'rocket' | 'lightbulb' | 'trend_up' | 'frown' | 'smile' | 'palette' | 'speed_slow' | 'crash' | 'sparkle' | 'cloud_upload' | 'refresh' | 'edit_pen' | 'shape_rect' | 'shape_circle' | 'shape_arrow' | 'text' | 'blur' | 'link' | 'link_off' | 'send' | 'person' | 'money' | 'menu';
1463
+ type TpkIconOverrideMap = Partial<Record<TpkIconName, MaterialIconName>>;
1464
+ declare function TpkIconsProvider({ icons, children, }: {
1465
+ icons: TpkIconOverrideMap;
1466
+ children: ReactNode;
1467
+ }): React.JSX.Element;
1468
+ interface TpkIconProps {
1469
+ name: TpkIconName;
1470
+ size?: number;
1471
+ color?: string;
1472
+ style?: TextStyle;
1473
+ }
1474
+ declare function TpkIcon({ name, size, color, style, }: TpkIconProps): React.ReactElement;
1475
+
1476
+ /** One entry of the "Alles" list. `onTap` runs after the sheet closed. */
1477
+ interface SheetOption {
1478
+ key: string;
1479
+ icon: TpkIconName;
1480
+ label: string;
1481
+ color: string;
1482
+ onTap: () => void;
1483
+ }
1484
+ /** One tile of the bottom bar. The last one (`all`) has no `onTap`: it
1485
+ * switches the sheet to the list. */
1486
+ interface SheetTile {
1487
+ id: 'checklist' | 'retests' | 'bugs' | 'messages' | 'all';
1488
+ icon: TpkIconName;
1489
+ color: string;
1490
+ label: string;
1491
+ badge: number;
1492
+ onTap?: () => void;
1493
+ }
1494
+ interface SheetMore {
1495
+ tiles: SheetTile[];
1496
+ backLabel: string;
1497
+ header: {
1498
+ handle?: string;
1499
+ persona?: string;
1500
+ earnings?: {
1501
+ label: string;
1502
+ amount: string;
1503
+ };
1504
+ };
1505
+ options: SheetOption[];
1506
+ }
1507
+ interface SheetMoreInput {
1508
+ S: TpkStrings;
1509
+ language: TpkLanguage;
1510
+ testerHandle?: string | null;
1511
+ personaTitle?: string | null;
1512
+ confirmedEarnings?: {
1513
+ amountCents: number;
1514
+ currency: string;
1515
+ };
1516
+ /** The checklist has tasks: first tile is "Was testen?", else "Nachtests". */
1517
+ hasChecklist: boolean;
1518
+ checklistCount: number;
1519
+ retestCount: number;
1520
+ unreadMessageCount: number;
1521
+ notificationCount: number;
1522
+ liveLinkConnected: boolean;
1523
+ onReportBug: () => void;
1524
+ onDetailedReport?: () => void;
1525
+ onGeneralFeedback: () => void;
1526
+ onShowChecklist?: () => void;
1527
+ onShowPersona?: () => void;
1528
+ onSendToClaude?: () => void;
1529
+ onToggleLiveLink?: () => void;
1530
+ onAutoTest?: () => void;
1531
+ onFlushCachedCrashes?: () => Promise<number> | number;
1532
+ onViewDashboard?: () => void;
1533
+ onShowMyMoney?: () => void;
1534
+ onShowMyBugs?: () => void;
1535
+ onShowSessionDetails?: () => void;
1536
+ onShowMessages?: () => void;
1537
+ onShowRetests?: () => void;
1538
+ onShowDebugLogs?: () => void;
1539
+ onEndSession: () => void;
1540
+ }
1541
+ declare function buildSheetMore(i: SheetMoreInput): SheetMore;
1302
1542
 
1303
1543
  type AttachmentKind = 'screenshot' | 'image' | 'video' | 'audio' | 'screen-recording' | 'log' | 'json' | 'other';
1304
1544
  interface BugReportAttachmentDraft {
@@ -1763,6 +2003,120 @@ interface TpkWelcomeSheetProps {
1763
2003
  }
1764
2004
  declare function TpkWelcomeSheet({ visible, brief, productName, onStart, onLater, style, testID, }: TpkWelcomeSheetProps): React.ReactElement;
1765
2005
 
2006
+ /** What the server knows about the store versions of this app. */
2007
+ interface TpkVersionNotice {
2008
+ /** The version this app runs, as the server understood it. */
2009
+ installedVersion: string | null;
2010
+ /** A newer store version exists. */
2011
+ updateAvailable: boolean;
2012
+ /** A release newer than this one is marked as required. */
2013
+ updateRequired: boolean;
2014
+ latestVersion: string | null;
2015
+ latestNotes: string[];
2016
+ /** Store page of the latest version (App Store, Google Play or the web). */
2017
+ storeUrl: string | null;
2018
+ /** The installed version as a store release, with its "what's new". */
2019
+ currentVersion: string | null;
2020
+ currentNotes: string[];
2021
+ }
2022
+ /** Store platform of a build. */
2023
+ type TpkStorePlatform = 'ios' | 'android' | 'web';
2024
+ declare const TPK_VERSION_NOTICE_DEFAULT_API_BASE_URL = "https://api.testerpaykit.com";
2025
+ declare const TPK_VERSION_NOTICE_SEEN_KEY = "tpk_version_notice_seen";
2026
+ declare const TPK_VERSION_NOTICE_DISMISSED_KEY = "tpk_version_notice_dismissed";
2027
+ /** Store platform of this build: `ios`, `android` or `web`; null on
2028
+ * platforms without a store release (windows, macos). */
2029
+ declare function tpkStorePlatform(os?: string): TpkStorePlatform | null;
2030
+ /** Parses the body of `GET /public/apps/{id}/release`. */
2031
+ declare function parseVersionNotice(json: unknown): TpkVersionNotice | null;
2032
+ interface FetchVersionNoticeOptions {
2033
+ projectId: string;
2034
+ /** Default `https://api.testerpaykit.com`. */
2035
+ apiBaseUrl?: string;
2036
+ /** Normally read from the app (expo-application, else expo-constants). */
2037
+ installedVersion?: string;
2038
+ /** Normally `Platform.OS`. */
2039
+ platform?: string;
2040
+ /** Normally the device language; the `<TpkVersionCheck>` component passes
2041
+ * the SDK language (`TpkLanguageProvider`). */
2042
+ language?: TpkLanguage;
2043
+ /** Default 5000 ms. */
2044
+ timeoutMs?: number;
2045
+ /** For tests; default the global `fetch`. */
2046
+ fetchImpl?: typeof fetch;
2047
+ }
2048
+ /**
2049
+ * Asks TesterPayKit for the version notice of `projectId`. Resolves to null
2050
+ * when the platform has no store, the version is unknown, the network fails,
2051
+ * the request takes longer than the timeout or the app is unknown. Never
2052
+ * throws. Needs no `TpkExpo.init`, so it works in store builds too.
2053
+ */
2054
+ declare function fetchVersionNotice({ projectId, apiBaseUrl, installedVersion, platform, language, timeoutMs, fetchImpl, }: FetchVersionNoticeOptions): Promise<TpkVersionNotice | null>;
2055
+ /** What `<TpkVersionCheck>` shows for a notice. */
2056
+ type TpkVersionNoticeKind = 'required' | 'update' | 'whatsNew';
2057
+ /**
2058
+ * Decides what to show, at most one thing, and remembers the installed
2059
+ * version:
2060
+ * - a required update: a dialog that only leads to the store;
2061
+ * - an available update: once per new store version (unless "Later" was
2062
+ * chosen for exactly that version);
2063
+ * - otherwise "what's new" once per installed version, but not on the very
2064
+ * first start of a fresh install.
2065
+ */
2066
+ declare function decideVersionNotice(notice: TpkVersionNotice, storage: TpkStorage): Promise<TpkVersionNoticeKind | null>;
2067
+ /** "Later" on an available update: no hint again until a newer version. */
2068
+ declare function dismissVersionUpdate(notice: TpkVersionNotice, storage: TpkStorage): Promise<void>;
2069
+
2070
+ interface TpkVersionCheckProps {
2071
+ /** The TesterPayKit project of this app. */
2072
+ projectId: string;
2073
+ /** Default `https://api.testerpaykit.com`. */
2074
+ apiBaseUrl?: string;
2075
+ /** Where the seen / dismissed versions live. Default `ExpoStorage`
2076
+ * (AsyncStorage). */
2077
+ storage?: TpkStorage;
2078
+ /** Called with the fetched notice (or null) once the check ran. */
2079
+ onNotice?: (notice: TpkVersionNotice | null) => void;
2080
+ /** For tests: normally read from the app. */
2081
+ installedVersion?: string;
2082
+ /** For tests: normally `Platform.OS`. */
2083
+ platform?: string;
2084
+ /** For tests: default the global `fetch`. */
2085
+ fetchImpl?: typeof fetch;
2086
+ }
2087
+ /**
2088
+ * Checks once on mount and shows at most one thing:
2089
+ * - a required update: a dialog that only leads to the store;
2090
+ * - an available update: once per new store version, with "Later";
2091
+ * - otherwise "what's new" once per installed version, but not on the very
2092
+ * first start of a fresh install.
2093
+ * The app never updates itself; "Update" opens the store page.
2094
+ */
2095
+ declare function TpkVersionCheck({ projectId, apiBaseUrl, storage, onNotice, installedVersion, platform, fetchImpl, }: TpkVersionCheckProps): React.ReactElement | null;
2096
+ interface TpkWhatsNewSheetProps {
2097
+ notice: TpkVersionNotice;
2098
+ visible: boolean;
2099
+ onClose: () => void;
2100
+ }
2101
+ /** "What's new in `version`" as a bottom sheet, e.g. from a settings row. */
2102
+ declare function TpkWhatsNewSheet({ notice, visible, onClose, }: TpkWhatsNewSheetProps): React.ReactElement;
2103
+
2104
+ /** What the server said: kind, minimum and our version (null when the
2105
+ * request carried no `X-TPK-Client`). */
2106
+ type TpkClientOutdated = ClientOutdatedInfo;
2107
+ /** Non-null once the server rejected this SDK version in this app run. */
2108
+ declare function getClientOutdated(): TpkClientOutdated | null;
2109
+ /** Called once when this app run turns outdated. Returns the unsubscribe. */
2110
+ declare function onClientOutdated(listener: (info: TpkClientOutdated) => void): () => void;
2111
+ /** React hook: null while the server serves this SDK, else the 426 body. */
2112
+ declare function useTpkClientOutdated(): TpkClientOutdated | null;
2113
+ /** The tester notice for [info], same text as the Flutter SDK. */
2114
+ declare function clientOutdatedText(info: TpkClientOutdated, language: TpkLanguage): string;
2115
+
2116
+ /** `X-TPK-Client` value: client kind and version, sent on every request to
2117
+ * the TPK API (decision 2026-11-14 "Mindestversion je Client-Art"). */
2118
+ declare const TPK_CLIENT_ID: string;
2119
+
1766
2120
  interface TpkOnboardingProps {
1767
2121
  /** Storage adapter used to persist the done flag + consent. */
1768
2122
  storage: OnboardingStorage;
@@ -1910,36 +2264,41 @@ declare function GeneralFeedbackDialog({ visible, tpk, currentScreen, onClose, o
1910
2264
 
1911
2265
  interface PhoneConfirmSheetProps {
1912
2266
  visible: boolean;
1913
- tpk: Pick<TpkExpo, 'startPhone' | 'confirmPhone'> | null;
2267
+ tpk: Pick<TpkExpo, 'linkWithTpkApp' | 'checkAppLink'> | null;
1914
2268
  /**
1915
- * Confirmed (handle) or skipped because SMS is unavailable (null).
1916
- * `awaitingApproval`: confirmed, but the account still waits for
1917
- * approval — the host must not open the report.
2269
+ * Confirmed in the TPK app. `awaitingApproval`: confirmed, but the
2270
+ * account still waits for approval — the host must not open the report.
1918
2271
  */
1919
- onDone: (handle: string | null, awaitingApproval?: boolean) => void;
2272
+ onDone: (awaitingApproval: boolean) => void;
1920
2273
  /** Tester closed the sheet: the report does not open. */
1921
2274
  onCancel: () => void;
1922
2275
  }
1923
2276
  declare function PhoneConfirmSheet({ visible, tpk, onDone, onCancel, }: PhoneConfirmSheetProps): React.ReactElement;
1924
2277
 
1925
- type MaterialIconName = string;
2278
+ interface PersonaFlowProps {
2279
+ visible: boolean;
2280
+ /** The loaded roles; the flow stays closed while this is null. */
2281
+ catalog: PersonaCatalog | null;
2282
+ /** The tester's handle for the "Connected as" line; omitted when unknown. */
2283
+ handle?: string | null;
2284
+ /** Saves the choice (`null` = "Myself"). May throw when offline. */
2285
+ onChoose: (personaId: string | null) => Promise<void>;
2286
+ /** Closed: after "Let's go" or "Next" on "Myself", or dismissed. */
2287
+ onClose: () => void;
2288
+ }
2289
+ declare function PersonaFlow({ visible, catalog, handle, onChoose, onClose, }: PersonaFlowProps): React.ReactElement;
2290
+
1926
2291
  /**
1927
- * Semantic icon names used by the SDK. Map to MaterialIcons glyph
1928
- * names by default; consumers can override via TpkIconsContext.
2292
+ * The made-up role the tester chose (id, title in the device language,
2293
+ * attributes) and re-renders when it changes. `null` without a client (a
2294
+ * `store` build never has one), while the tester tests as themselves, and
2295
+ * before the role is known. Use it to prepare matching test data; never
2296
+ * real data of the tester.
2297
+ *
2298
+ * const { client } = useTesterPayKit();
2299
+ * const persona = useTpkPersona(client);
1929
2300
  */
1930
- type TpkIconName = 'bug_report' | 'feedback' | 'dashboard' | 'session_end' | 'voice' | 'voice_off' | 'close' | 'check' | 'star_filled' | 'star_outline' | 'camera' | 'image' | 'attachment' | 'music_note' | 'language' | 'rocket' | 'lightbulb' | 'trend_up' | 'frown' | 'smile' | 'palette' | 'speed_slow' | 'crash' | 'sparkle' | 'cloud_upload' | 'refresh' | 'edit_pen' | 'shape_rect' | 'shape_circle' | 'shape_arrow' | 'text' | 'blur' | 'link' | 'link_off' | 'send' | 'person' | 'money';
1931
- type TpkIconOverrideMap = Partial<Record<TpkIconName, MaterialIconName>>;
1932
- declare function TpkIconsProvider({ icons, children, }: {
1933
- icons: TpkIconOverrideMap;
1934
- children: ReactNode;
1935
- }): React.JSX.Element;
1936
- interface TpkIconProps {
1937
- name: TpkIconName;
1938
- size?: number;
1939
- color?: string;
1940
- style?: TextStyle;
1941
- }
1942
- declare function TpkIcon({ name, size, color, style, }: TpkIconProps): React.ReactElement;
2301
+ declare function useTpkPersona(client: TpkExpo | null | undefined): TpkPersona | null;
1943
2302
 
1944
2303
  interface RetestSheetProps {
1945
2304
  visible: boolean;
@@ -1960,139 +2319,6 @@ interface ChecklistPanelProps {
1960
2319
  }
1961
2320
  declare function ChecklistPanel({ visible, tpk, tasks, onReload, onClose, }: ChecklistPanelProps): React.ReactElement | null;
1962
2321
 
1963
- type TpkLanguage = 'de' | 'en';
1964
- /** The device's UI language, reduced to `de` / `en`. */
1965
- declare function detectDeviceLanguage(): TpkLanguage;
1966
- /** Pins the UI language for every TPK surface below it. `undefined`
1967
- * keeps device detection. */
1968
- declare function TpkLanguageProvider({ language, children, }: {
1969
- language?: TpkLanguage;
1970
- children: ReactNode;
1971
- }): React.JSX.Element;
1972
- declare function useTpkLanguage(): TpkLanguage;
1973
- declare function useTpkStrings(): TpkStrings;
1974
- /** Money in the tester's language: "1,00 €" in German, "€1.00" in
1975
- * English. `currency` is an ISO-4217 code (EUR, USD, GBP …). */
1976
- declare function formatTpkMoney(amount: number, currency: string, language: TpkLanguage): string;
1977
- /** Picks the text for the active language: `tr({ en: '…', de: '…' })`.
1978
- * For surfaces with a handful of texts; big surfaces use TPK_STRINGS. */
1979
- declare function useTr(): (texts: {
1980
- en: string;
1981
- de: string;
1982
- }) => string;
1983
- interface TpkStrings {
1984
- menuReportBug: string;
1985
- menuFeedback: string;
1986
- menuAutoTest: string;
1987
- menuChecklist: string;
1988
- menuSendToClaude: string;
1989
- menuConnectClaude: string;
1990
- menuDisconnectClaude: string;
1991
- menuCachedCrashes: (count: number) => string;
1992
- menuWorkboard: string;
1993
- menuMyBugs: string;
1994
- menuSessionDetails: string;
1995
- menuMessages: string;
1996
- menuRetests: string;
1997
- menuDebugLogs: string;
1998
- menuEndSession: string;
1999
- menuSessionEarnings: string;
2000
- menuMyMoney: string;
2001
- menuYouAre: (handle: string) => string;
2002
- unreadBadgeA11y: (count: number) => string;
2003
- verifyOfflineTitle: string;
2004
- verifyOffline: string;
2005
- verifiedNow: string;
2006
- menuOpen: string;
2007
- menuClose: string;
2008
- reportTitle: string;
2009
- reportClose: string;
2010
- reportSpeak: string;
2011
- stepTitles: readonly [string, string, string, string, string];
2012
- cancel: string;
2013
- back: string;
2014
- continue: string;
2015
- submit: string;
2016
- typeBug: string;
2017
- typeBugDescription: string;
2018
- typeCrash: string;
2019
- typeCrashDescription: string;
2020
- typeUiIssue: string;
2021
- typeUiIssueDescription: string;
2022
- typePerformance: string;
2023
- typePerformanceDescription: string;
2024
- typeFeature: string;
2025
- typeFeatureDescription: string;
2026
- typeFeedback: string;
2027
- typeFeedbackDescription: string;
2028
- severityCritical: string;
2029
- severityCriticalDescription: string;
2030
- severityHigh: string;
2031
- severityHighDescription: string;
2032
- severityMedium: string;
2033
- severityMediumDescription: string;
2034
- severityLow: string;
2035
- severityLowDescription: string;
2036
- frequencyAlways: string;
2037
- frequencyOften: string;
2038
- frequencySometimes: string;
2039
- frequencyOnce: string;
2040
- fieldTitle: string;
2041
- fieldTitlePlaceholder: string;
2042
- fieldDescription: string;
2043
- fieldDescriptionPlaceholder: string;
2044
- fieldExpected: string;
2045
- fieldExpectedPlaceholder: string;
2046
- fieldActual: string;
2047
- fieldActualPlaceholder: string;
2048
- fieldFrequency: string;
2049
- fieldComponent: string;
2050
- fieldComponentPlaceholder: string;
2051
- attachments: string;
2052
- attachScreenshot: string;
2053
- attachImage: string;
2054
- attachFile: string;
2055
- attachA11y: (label: string) => string;
2056
- removeA11y: (name: string) => string;
2057
- stepsAdd: string;
2058
- stepsPlaceholder: string;
2059
- stepsAddA11y: string;
2060
- stepsEmpty: string;
2061
- stepsReorderHint: string;
2062
- stepsDragA11y: (n: number) => string;
2063
- stepsRemoveA11y: (n: number) => string;
2064
- reviewType: string;
2065
- reviewSeverity: string;
2066
- reviewTitle: string;
2067
- reviewDescription: string;
2068
- reviewExpected: string;
2069
- reviewActual: string;
2070
- reviewFrequency: string;
2071
- reviewComponent: string;
2072
- reviewSteps: string;
2073
- reviewAttachments: string;
2074
- reviewEmpty: string;
2075
- errorRejected: string;
2076
- /** 403 phone_required (migration 077). */
2077
- errorPhoneRequired: string;
2078
- /** 403 approval_required — also the wrapper's waiting notice. */
2079
- awaitingApproval: string;
2080
- awaitingApprovalTitle: string;
2081
- errorFailed: string;
2082
- errorAttachmentLimit: (max: number) => string;
2083
- errorAttachmentSize: (maxMB: number) => string;
2084
- errorNoCaptureRef: string;
2085
- errorNeedsViewShot: string;
2086
- errorScreenshotFailed: string;
2087
- errorNeedsImagePicker: string;
2088
- errorImageNoData: string;
2089
- errorImagePickFailed: string;
2090
- errorNeedsDocumentPicker: string;
2091
- errorFileUnreadable: string;
2092
- errorFilePickFailed: string;
2093
- }
2094
- declare const TPK_STRINGS: Record<TpkLanguage, TpkStrings>;
2095
-
2096
2322
  /** Verdict of one step while the tester works: null = not judged yet. */
2097
2323
  interface StepDraft {
2098
2324
  passed: boolean | null;
@@ -2266,6 +2492,10 @@ interface VoiceBugStrings {
2266
2492
  quickExtractedDescription?: string;
2267
2493
  quickNoScreenshot?: string;
2268
2494
  back?: string;
2495
+ typeInstead?: string;
2496
+ formHeadline?: string;
2497
+ formDescription?: string;
2498
+ writeReport?: string;
2269
2499
  }
2270
2500
  interface VoiceBugInputSheetProps {
2271
2501
  visible: boolean;
@@ -2281,15 +2511,10 @@ interface VoiceBugInputSheetProps {
2281
2511
  * (bug-red). Hosts that want a brand-tint can override. */
2282
2512
  accentColor?: string;
2283
2513
  /**
2284
- * Opacity of the backdrop + sheet, together, on a 0..1 scale.
2285
- * Default `0.82` (since 0.9.3) — the screen behind stays faintly
2286
- * visible while the text stays readable on light apps; `1` makes
2287
- * it fully opaque as before. A tester describing a bug describes what's on the
2288
- * screen behind this sheet; at `1` that screen is completely
2289
- * hidden while they're doing it. Lower values (e.g. `0.35`, close
2290
- * to the ~30% overall coverage a host asked for) keep both layers
2291
- * translucent together so the failing screen stays legible.
2292
- * (umkreis finding #2, 2026-08-06.)
2514
+ * Opacity of the scrim behind the sheet, on a 0..1 scale (default
2515
+ * `0.82`). Since 2.3.0 the sheet itself is always solid except while
2516
+ * recording (host text showed through the title otherwise, issue #5);
2517
+ * while recording the scrim is almost clear anyway.
2293
2518
  */
2294
2519
  sheetOpacity?: number;
2295
2520
  /**
@@ -2317,10 +2542,27 @@ interface VoiceBugInputSheetProps {
2317
2542
  currentScreen?: string;
2318
2543
  /** The tester's handle — shown as "Du meldest als …" in the sheet. */
2319
2544
  reporterHandle?: string | null;
2545
+ /**
2546
+ * Since 2.3.0 (voice first): shows "Type instead" while nothing is
2547
+ * recorded yet or recording failed (no microphone, too loud). The host
2548
+ * opens its written report, usually BugReportSheet at the details step.
2549
+ */
2550
+ onTypeInstead?: () => void;
2551
+ /**
2552
+ * Since 2.3.0 (`reportMode: 'form'`): the big button writes instead of
2553
+ * recording (it calls `onTypeInstead`) and "Type instead" is hidden.
2554
+ */
2555
+ formFirst?: boolean;
2556
+ /**
2557
+ * Since 2.3.0 (issue #5): the bottom bar and the "All" list. A tap on a
2558
+ * tile or list entry closes the sheet first and runs the action after
2559
+ * the close (React Native cannot stack modals).
2560
+ */
2561
+ more?: SheetMore;
2320
2562
  style?: StyleProp<ViewStyle>;
2321
2563
  testID?: string;
2322
2564
  }
2323
- declare function VoiceBugInputSheet({ visible, tpk, onCancel, onExtracted, maxSeconds, accentColor, sheetOpacity, voiceLanguage, strings, captureScreen, currentScreen, reporterHandle, style, testID, }: VoiceBugInputSheetProps): React.ReactElement;
2565
+ declare function VoiceBugInputSheet({ visible, tpk, onCancel, onExtracted, maxSeconds, accentColor, sheetOpacity, voiceLanguage, strings, captureScreen, currentScreen, reporterHandle, onTypeInstead, formFirst, more, style, testID, }: VoiceBugInputSheetProps): React.ReactElement;
2324
2566
  /** Maps the sheet's classification onto the BugReportSheet's
2325
2567
  * BugReportType union. Exported so the host can call it when
2326
2568
  * building the initialDraft for the bug sheet. */
@@ -2420,6 +2662,12 @@ interface TesterPayKitWrapperProps {
2420
2662
  /** Threshold above which we consider it a shake (gravity units).
2421
2663
  * Flutter default is 2.7. Lower → more sensitive. */
2422
2664
  shakeThresholdG?: number;
2665
+ /** Since 2.3.0. `'voice'` (default): "Report Bug" and shake open the
2666
+ * voice sheet, which drafts the report and lands on its review step;
2667
+ * "Type instead" and the menu's "Report in detail" open the form.
2668
+ * `'form'`: the step-by-step form first, as before 2.3.0, for apps
2669
+ * where speaking does not fit (library, till). */
2670
+ reportMode?: 'voice' | 'form';
2423
2671
  /** Outer container override. */
2424
2672
  style?: StyleProp<ViewStyle>;
2425
2673
  onShowDebugLogs?: () => void;
@@ -2492,7 +2740,10 @@ interface TesterPayKitWrapperProps {
2492
2740
  language?: TpkLanguage;
2493
2741
  testID?: string;
2494
2742
  }
2495
- declare function TesterPayKitWrapper({ children, tpk, enableWrapper, enableShake, shakeThresholdG, style, onShowDebugLogs, notificationCount, onFlushCachedCrashes, retestCount, onShowRetests, onViewDashboard, enableTesterDashboard, showCompensation, showDebugLogs, buttonPosition, currentScreen, sessionStartedAt, compensationPush, aiCoordinatorToken, aiRemoteTrigger, aiRemotePollSeconds, enableLiveLink, aiProjectId, aiApiBaseUrl, theme, language, testID, }: TesterPayKitWrapperProps): React.ReactElement;
2743
+ /** Renders `children` unchanged in a store build: no FAB, no shake, no
2744
+ * sheets, no polling, no storage (App Store Guideline 2.2). The channel is
2745
+ * fixed for the process, so the branch never flips between renders. */
2746
+ declare function TesterPayKitWrapper(props: TesterPayKitWrapperProps): React.ReactElement;
2496
2747
 
2497
2748
  type LiveLinkStatus = 'off' | 'connecting' | 'connected';
2498
2749
  /** The part of the WebSocket API the link uses (lets tests fake it). */
@@ -2517,7 +2768,7 @@ interface TpkLiveLinkOptions {
2517
2768
  /** Runs a device action (tap, type, scroll, back) Claude asked for.
2518
2769
  * Resolves with `{ok:true, matched?}`; throws to answer with an error. */
2519
2770
  act?: (action: Record<string, unknown>) => Promise<Record<string, unknown>>;
2520
- /** Socket factory. Default: the global WebSocket. */
2771
+ /** Socket factory. Default: the global WebSocket with `X-TPK-Client`. */
2521
2772
  createSocket?: (url: string) => LiveSocket;
2522
2773
  }
2523
2774
  declare class TpkLiveLink {
@@ -2992,5 +3243,5 @@ declare function useTpkEarnings(tpk: TpkExpo | null, options?: {
2992
3243
  payoutLimit?: number;
2993
3244
  }): UseEarningsResult;
2994
3245
 
2995
- export { ANNOTATION_PALETTE, AttachmentQueue, Breadcrumbs, BugReportSheet, ChecklistPanel, CompensationClient, CrashQueue, DEFAULT_STYLE, DEFAULT_TPK_THEME, DENY_LABEL_PATTERNS, ExpoStorage, FloatingFeedbackButton, GeneralFeedbackDialog, INTERACTION_NAV_WEIGHT, InviteCodeScreen, LiveNoteDialog, MIN_INTERACTIONS_PER_ACTIVE_MINUTE, MoneyOverview, MyBugsSheet, NotificationsSheet, ONBOARDING_DONE_STORAGE_KEY, PhoneConfirmSheet, RetestSheet, SCREENSHOT_CONSENT_STORAGE_KEY, ScreenRecorder, ScreenshotAnnotationEditor, SessionDetailsSheet, SessionEndDialog, SubmitQueue, TPK_STRINGS, TaskAnnotationRegistry, TesterDashboard, TesterPayKitProvider, TesterPayKitWrapper, TpkAnnotated, TpkAnnotationOverlay, TpkExpo, TpkIcon, TpkIconsProvider, TpkLanguageProvider, TpkLiveLink, TpkOnboarding, TpkSensitive, TpkTalker, TpkThemeProvider, TpkWelcomeSheet, VoiceBugInputSheet, VoiceNoteRecorder, WELCOME_ACK_STORAGE_KEY, WIDGET_TOUR_SEEN_STORAGE_KEY, WidgetDiscovery, WidgetTour, annotations, applySensitiveRedaction, arrowHeadPoints, beginNativeCapture, bugSeverityLabel, bugStatusStyle, canSubmitBugReportDraft, captureLiveSnapshot, captureView, classificationToBugType, createBugReportDraft, createCompensationPushAdapter, deriveTaskProgress, detectDeviceLanguage, emptyAnnotationDoc, endNativeCapture, engagedMinutes, extractVoiceBug, findAssignmentForTask, formatTpkMoney, getAppSnapshot, getDeviceSnapshot, getEventCounts, getNativeCaptureMode, getSessionStats, getUniqueScreens, hasCompletedOnboarding, hasScreenshotConsent, hasSeenWidgetTour, hasWelcomeBriefBeenSeen, installCrashHandler, installNetworkCapture, loadChecklist, markOnboardingComplete, markWelcomeBriefAsSeen, markWidgetTourSeen, parseLiveAction, parseVersionRange, pathToSvgD, playMoneyLabel, quickDraftBug, readLiveState, readScreenTexts, resetOnboardingState, resetWelcomeBriefAck, resetWidgetTourSeen, runLiveAction, simplifyPath, submitBugReportDraft, subscribeNativeCaptureMode, toStepResults, uploadScreenshotAttachment, useShake, useTaskAnnotation, useTesterPayKit, useTpkDashboard, useTpkEarnings, useTpkLanguage, useTpkStrings, useTpkTheme, useTr, versionSatisfies, widgetDiscovery, withNativeCapture, workSeconds };
2996
- export type { AnnotatedElementInfo, AnnotatedScreenshotResult, AnnotationColor, AnnotationEvent, AnnotationEventType, AnnotationInteraction, AnnotationListener, AnnotationShape, AnnotationStyle, AnnotationTool, AppSnapshot, ArrowShape, AttachmentQueueFlushOptions, BlurShape, Breadcrumb, BugFix, BugReportDraft, BugReportSheetProps, BuildInfo, CachedCrash, CaptureViewOptions, ChecklistPanelProps, CircleShape, CompensationPushAdapter, CompletionTrigger, CrashHandlerOptions, CrashInfo, CreateBugReportDraftInput, DashboardData, DeviceSnapshot, DiscoverOptions, EarningsData, EngagedMinutesInput, ExpoNotificationsPort, FeedbackCategory, FloatingFeedbackButtonProps, FlushTelemetryResult, FocusArea, GeneralFeedbackDialogProps, InstallNetworkCaptureOptions, InteractionBounds, InteractionType, InviteCodeScreenProps, LiveAction, LiveActionEnv, LiveActionResult, LiveLinkStatus, LiveNoteDialogProps, LiveSnapshotSource, LiveSocket, MoneyOverviewProps, MyBugsSheetProps, NotificationsSheetProps, OnboardingStorage, PathShape, PeriodFilter, PhoneConfirmSheetProps, Point, QueueFlushOptions, QueueFlushResult, QuickActionKind, RecordInteractionDetails, RecordingOptions, RecordingResult, RecordingState, RectShape, RegisterAnnotationInput, ReleaseNote, RetestSheetProps, ScreenText, ScreenshotAnnotationEditorProps, ScreenshotResult, SensitiveMaskingMode, SessionDetailsSheetProps, SessionEndDialogProps, SessionEndStats, SessionStatsSnapshot, StatusStyle, StepDraft, SubmitBugInput, SubmitBugOutcome, SubmitBugResult, TaskAnnotation, TaskInteractionSummary, TaskProgress, TesterDashboardProps, TesterPayKitContextValue, TesterPayKitProviderProps, TesterPayKitWrapperProps, TextShape, TpkAccess, TpkAnnotatedProps, TpkAnnotationOverlayHandle, TpkAnnotationOverlayProps, TpkExpoConfig, TpkIconName, TpkIconOverrideMap, TpkIconProps, TpkLanguage, TpkLiveLinkOptions, TpkLogEntry, TpkLogLevel, TpkOnboardingProps, TpkSensitiveProps, TpkStorage, TpkStrings, TpkTalkerListener, TpkTalkerOptions, TpkTheme, TpkWelcomeSheetProps, UseDashboardResult, UseEarningsResult, UseShakeOptions, UseTaskAnnotationOptions, UseTaskAnnotationResult, VersionRange, VoiceBugInputSheetProps, VoiceBugStrings, VoiceClassification, VoiceExtractAudio, VoiceExtractResult, VoiceNoteFileReader, VoiceNoteRecorderLike, VoiceNoteRecorderOptions, VoiceNoteResult, VoiceNoteState, WelcomeAckStorage, WelcomeBrief, WelcomeTask, WidgetInfo, WidgetTourProps };
3246
+ export { ANNOTATION_PALETTE, AttachmentQueue, Breadcrumbs, BugReportSheet, ChecklistPanel, CompensationClient, CrashQueue, DEFAULT_STYLE, DEFAULT_TPK_THEME, DENY_LABEL_PATTERNS, ExpoStorage, FloatingFeedbackButton, GeneralFeedbackDialog, INTERACTION_NAV_WEIGHT, InviteCodeScreen, LiveNoteDialog, MIN_INTERACTIONS_PER_ACTIVE_MINUTE, MoneyOverview, MyBugsSheet, NotificationsSheet, ONBOARDING_DONE_STORAGE_KEY, PersonaFlow, PhoneConfirmSheet, RetestSheet, SCREENSHOT_CONSENT_STORAGE_KEY, ScreenRecorder, ScreenshotAnnotationEditor, SessionDetailsSheet, SessionEndDialog, SubmitQueue, TPK_CLIENT_ID, TPK_STRINGS, TPK_VERSION_NOTICE_DEFAULT_API_BASE_URL, TPK_VERSION_NOTICE_DISMISSED_KEY, TPK_VERSION_NOTICE_SEEN_KEY, TaskAnnotationRegistry, TesterDashboard, TesterPayKitProvider, TesterPayKitWrapper, TpkAnnotated, TpkAnnotationOverlay, TpkExpo, TpkIcon, TpkIconsProvider, TpkLanguageProvider, TpkLiveLink, TpkOnboarding, TpkSensitive, TpkTalker, TpkThemeProvider, TpkVersionCheck, TpkWelcomeSheet, TpkWhatsNewSheet, VoiceBugInputSheet, VoiceNoteRecorder, WELCOME_ACK_STORAGE_KEY, WIDGET_TOUR_SEEN_STORAGE_KEY, WidgetDiscovery, WidgetTour, annotations, applySensitiveRedaction, arrowHeadPoints, beginNativeCapture, bugSeverityLabel, bugStatusStyle, buildSheetMore, canSubmitBugReportDraft, captureLiveSnapshot, captureView, classificationToBugType, clientOutdatedText, createBugReportDraft, createCompensationPushAdapter, decideVersionNotice, deriveTaskProgress, detectDeviceLanguage, dismissVersionUpdate, emptyAnnotationDoc, endNativeCapture, engagedMinutes, extractVoiceBug, fetchVersionNotice, findAssignmentForTask, formatTpkMoney, getAppSnapshot, getBuildChannel, getClientOutdated, getDeviceSnapshot, getEventCounts, getNativeCaptureMode, getSessionStats, getUniqueScreens, hasCompletedOnboarding, hasScreenshotConsent, hasSeenWidgetTour, hasWelcomeBriefBeenSeen, installCrashHandler, installNetworkCapture, loadChecklist, markOnboardingComplete, markWelcomeBriefAsSeen, markWidgetTourSeen, onClientOutdated, parseLiveAction, parseVersionNotice, parseVersionRange, pathToSvgD, playMoneyLabel, quickDraftBug, readLiveState, readScreenTexts, resetOnboardingState, resetWelcomeBriefAck, resetWidgetTourSeen, runLiveAction, simplifyPath, submitBugReportDraft, subscribeNativeCaptureMode, toStepResults, tpkStorePlatform, uploadScreenshotAttachment, useShake, useTaskAnnotation, useTesterPayKit, useTpkClientOutdated, useTpkDashboard, useTpkEarnings, useTpkLanguage, useTpkPersona, useTpkStrings, useTpkTheme, useTr, versionSatisfies, widgetDiscovery, withNativeCapture, workSeconds };
3247
+ export type { AnnotatedElementInfo, AnnotatedScreenshotResult, AnnotationColor, AnnotationEvent, AnnotationEventType, AnnotationInteraction, AnnotationListener, AnnotationShape, AnnotationStyle, AnnotationTool, AppSnapshot, ArrowShape, AttachmentQueueFlushOptions, BlurShape, Breadcrumb, BugFix, BugReportDraft, BugReportSheetProps, BuildInfo, CachedCrash, CaptureViewOptions, ChecklistPanelProps, CircleShape, CompensationPushAdapter, CompletionTrigger, CrashHandlerOptions, CrashInfo, CreateBugReportDraftInput, DashboardData, DeviceSnapshot, DiscoverOptions, EarningsData, EngagedMinutesInput, ExpoNotificationsPort, FeedbackCategory, FetchVersionNoticeOptions, FloatingFeedbackButtonProps, FlushTelemetryResult, FocusArea, GeneralFeedbackDialogProps, InstallNetworkCaptureOptions, InteractionBounds, InteractionType, InviteCodeScreenProps, LiveAction, LiveActionEnv, LiveActionResult, LiveLinkStatus, LiveNoteDialogProps, LiveSnapshotSource, LiveSocket, MoneyOverviewProps, MyBugsSheetProps, NotificationsSheetProps, OnboardingStorage, PathShape, PeriodFilter, PersonaCatalog, PersonaFlowProps, PersonaOption, PersonaText, PhoneConfirmSheetProps, Point, QueueFlushOptions, QueueFlushResult, QuickActionKind, RecordInteractionDetails, RecordingOptions, RecordingResult, RecordingState, RectShape, RegisterAnnotationInput, ReleaseNote, RetestSheetProps, ScreenText, ScreenshotAnnotationEditorProps, ScreenshotResult, SensitiveMaskingMode, SessionDetailsSheetProps, SessionEndDialogProps, SessionEndStats, SessionStatsSnapshot, SheetMore, SheetMoreInput, StatusStyle, StepDraft, SubmitBugInput, SubmitBugOutcome, SubmitBugResult, TaskAnnotation, TaskInteractionSummary, TaskProgress, TesterDashboardProps, TesterPayKitContextValue, TesterPayKitProviderProps, TesterPayKitWrapperProps, TextShape, TpkAccess, TpkAnnotatedProps, TpkAnnotationOverlayHandle, TpkAnnotationOverlayProps, TpkBuildChannel, TpkClientOutdated, TpkExpoConfig, TpkIconName, TpkIconOverrideMap, TpkIconProps, TpkLanguage, TpkLiveLinkOptions, TpkLogEntry, TpkLogLevel, TpkOnboardingProps, TpkPersona, TpkSensitiveProps, TpkStorage, TpkStorePlatform, TpkStrings, TpkTalkerListener, TpkTalkerOptions, TpkTheme, TpkVersionCheckProps, TpkVersionNotice, TpkVersionNoticeKind, TpkWelcomeSheetProps, TpkWhatsNewSheetProps, UseDashboardResult, UseEarningsResult, UseShakeOptions, UseTaskAnnotationOptions, UseTaskAnnotationResult, VersionRange, VoiceBugInputSheetProps, VoiceBugStrings, VoiceClassification, VoiceExtractAudio, VoiceExtractResult, VoiceNoteFileReader, VoiceNoteRecorderLike, VoiceNoteRecorderOptions, VoiceNoteResult, VoiceNoteState, WelcomeAckStorage, WelcomeBrief, WelcomeTask, WidgetInfo, WidgetTourProps };