yaver-feedback-react-native 0.4.0 → 0.5.2
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/LICENSE +201 -0
- package/README.md +29 -11
- package/package.json +22 -7
- package/src/AuthOverlay.tsx +97 -0
- package/src/BlackBox.ts +41 -2
- package/src/Discovery.ts +26 -13
- package/src/FeedbackModal.tsx +9 -2
- package/src/LoginScreen.tsx +395 -0
- package/src/MachinePickerScreen.tsx +196 -0
- package/src/P2PClient.ts +110 -0
- package/src/ShakeDetector.ts +95 -35
- package/src/YaverFeedback.ts +257 -9
- package/src/YaverUpdates.ts +334 -0
- package/src/__tests__/Discovery.test.ts +8 -2
- package/src/__tests__/YaverFeedback.test.ts +4 -1
- package/src/auth.ts +338 -0
- package/src/index.ts +36 -0
- package/src/types.ts +21 -2
package/src/index.ts
CHANGED
|
@@ -24,14 +24,50 @@
|
|
|
24
24
|
|
|
25
25
|
export { YaverFeedback } from './YaverFeedback';
|
|
26
26
|
export { BlackBox } from './BlackBox';
|
|
27
|
+
export { YaverUpdates } from './YaverUpdates';
|
|
28
|
+
export type { YaverUpdatesConfig, PendingUpdate } from './YaverUpdates';
|
|
27
29
|
export { initExpo } from './expo';
|
|
28
30
|
export { YaverDiscovery } from './Discovery';
|
|
29
31
|
export { P2PClient } from './P2PClient';
|
|
30
32
|
export { YaverConnectionScreen } from './ConnectionScreen';
|
|
33
|
+
export { YaverLoginScreen } from './LoginScreen';
|
|
34
|
+
export type { YaverLoginScreenProps } from './LoginScreen';
|
|
35
|
+
export { YaverMachinePickerScreen } from './MachinePickerScreen';
|
|
36
|
+
export type { YaverMachinePickerProps } from './MachinePickerScreen';
|
|
37
|
+
export { AuthOverlay } from './AuthOverlay';
|
|
31
38
|
export { ShakeDetector } from './ShakeDetector';
|
|
32
39
|
export { FloatingButton } from './FloatingButton';
|
|
33
40
|
export { FeedbackModal } from './FeedbackModal';
|
|
34
41
|
export { FixReport } from './FixReport';
|
|
42
|
+
export {
|
|
43
|
+
configureAuthEndpoints,
|
|
44
|
+
getConvexSiteUrl,
|
|
45
|
+
getWebBaseUrl,
|
|
46
|
+
getToken,
|
|
47
|
+
saveToken,
|
|
48
|
+
clearToken,
|
|
49
|
+
getUser,
|
|
50
|
+
saveUser,
|
|
51
|
+
getSelectedDeviceId,
|
|
52
|
+
saveSelectedDeviceId,
|
|
53
|
+
clearSelectedDeviceId,
|
|
54
|
+
validateToken,
|
|
55
|
+
startDeviceCode,
|
|
56
|
+
pollDeviceCode,
|
|
57
|
+
signupWithEmail,
|
|
58
|
+
loginWithEmail,
|
|
59
|
+
listReachableDevices,
|
|
60
|
+
DEFAULT_CONVEX_SITE_URL,
|
|
61
|
+
DEFAULT_WEB_BASE_URL,
|
|
62
|
+
} from './auth';
|
|
63
|
+
export type {
|
|
64
|
+
OAuthProvider,
|
|
65
|
+
User,
|
|
66
|
+
DeviceCodeStart,
|
|
67
|
+
DeviceCodePoll,
|
|
68
|
+
RemoteDevice,
|
|
69
|
+
DeviceList,
|
|
70
|
+
} from './auth';
|
|
35
71
|
export { captureScreenshot, startAudioRecording, stopAudioRecording } from './capture';
|
|
36
72
|
export { uploadFeedback } from './upload';
|
|
37
73
|
export type {
|
package/src/types.ts
CHANGED
|
@@ -1,8 +1,27 @@
|
|
|
1
1
|
export interface FeedbackConfig {
|
|
2
2
|
/** URL of the Yaver agent (e.g. "http://192.168.1.10:18080"). If omitted, auto-discovery is used. */
|
|
3
3
|
agentUrl?: string;
|
|
4
|
-
/**
|
|
5
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Auth token for the Yaver agent. Optional in 0.5+: if omitted, the SDK
|
|
6
|
+
* will hydrate one from AsyncStorage or show its in-app login screen
|
|
7
|
+
* (device-code / email / OAuth) the first time the user triggers feedback.
|
|
8
|
+
*/
|
|
9
|
+
authToken?: string;
|
|
10
|
+
/**
|
|
11
|
+
* When true (default), the SDK will automatically prompt the user to sign
|
|
12
|
+
* in and pick a remote machine the first time they trigger feedback and
|
|
13
|
+
* no `authToken` / `preferredDeviceId` is cached. Set false to opt back
|
|
14
|
+
* into the pre-0.5 behavior where you manage auth yourself and pass
|
|
15
|
+
* `authToken` at init.
|
|
16
|
+
*/
|
|
17
|
+
autoLogin?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Override the public Yaver endpoints the in-app login screen talks to.
|
|
20
|
+
* Useful when running against staging. Defaults to the production
|
|
21
|
+
* yaver.io / Convex site URLs.
|
|
22
|
+
*/
|
|
23
|
+
authConvexSiteUrl?: string;
|
|
24
|
+
authWebBaseUrl?: string;
|
|
6
25
|
/**
|
|
7
26
|
* Convex site URL for cloud IP resolution.
|
|
8
27
|
* When set, the SDK fetches the agent's IP from Convex instead of
|