@multiplayer-app/session-recorder-react-native 1.3.37 → 2.0.17-alpha.10

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.
Files changed (280) hide show
  1. package/package.json +4 -4
  2. package/src/NativeSessionRecorderModule.ts +4 -2
  3. package/src/NativeSessionRecorderModuleSpec.ts +4 -2
  4. package/src/NativeSessionRecorderNative.ts +1 -1
  5. package/src/index.ts +0 -1
  6. package/src/otel/instrumentations/index.ts +22 -22
  7. package/src/session-recorder.ts +4 -0
  8. package/src/types/configs.ts +1 -2
  9. package/lib/module/NativeSessionRecorderModule.js +0 -5
  10. package/lib/module/NativeSessionRecorderModule.js.map +0 -1
  11. package/lib/module/NativeSessionRecorderModuleSpec.js +0 -5
  12. package/lib/module/NativeSessionRecorderModuleSpec.js.map +0 -1
  13. package/lib/module/NativeSessionRecorderNative.js +0 -5
  14. package/lib/module/NativeSessionRecorderNative.js.map +0 -1
  15. package/lib/module/components/ErrorBoundary.js +0 -32
  16. package/lib/module/components/ErrorBoundary.js.map +0 -1
  17. package/lib/module/components/ScreenRecorderView/ScreenRecorderView.js +0 -23
  18. package/lib/module/components/ScreenRecorderView/ScreenRecorderView.js.map +0 -1
  19. package/lib/module/components/ScreenRecorderView/index.js +0 -4
  20. package/lib/module/components/ScreenRecorderView/index.js.map +0 -1
  21. package/lib/module/components/SessionRecorderWidget/ErrorBanner.js +0 -64
  22. package/lib/module/components/SessionRecorderWidget/ErrorBanner.js.map +0 -1
  23. package/lib/module/components/SessionRecorderWidget/FinalPopover.js +0 -74
  24. package/lib/module/components/SessionRecorderWidget/FinalPopover.js.map +0 -1
  25. package/lib/module/components/SessionRecorderWidget/FloatingButton.js +0 -191
  26. package/lib/module/components/SessionRecorderWidget/FloatingButton.js.map +0 -1
  27. package/lib/module/components/SessionRecorderWidget/InitialPopover.js +0 -138
  28. package/lib/module/components/SessionRecorderWidget/InitialPopover.js.map +0 -1
  29. package/lib/module/components/SessionRecorderWidget/ModalContainer.js +0 -177
  30. package/lib/module/components/SessionRecorderWidget/ModalContainer.js.map +0 -1
  31. package/lib/module/components/SessionRecorderWidget/ModalHeader.js +0 -27
  32. package/lib/module/components/SessionRecorderWidget/ModalHeader.js.map +0 -1
  33. package/lib/module/components/SessionRecorderWidget/SessionRecorderWidget.js +0 -133
  34. package/lib/module/components/SessionRecorderWidget/SessionRecorderWidget.js.map +0 -1
  35. package/lib/module/components/SessionRecorderWidget/icons.js +0 -93
  36. package/lib/module/components/SessionRecorderWidget/icons.js.map +0 -1
  37. package/lib/module/components/SessionRecorderWidget/index.js +0 -5
  38. package/lib/module/components/SessionRecorderWidget/index.js.map +0 -1
  39. package/lib/module/components/SessionRecorderWidget/styles.js +0 -173
  40. package/lib/module/components/SessionRecorderWidget/styles.js.map +0 -1
  41. package/lib/module/components/index.js +0 -6
  42. package/lib/module/components/index.js.map +0 -1
  43. package/lib/module/config/constants.js +0 -47
  44. package/lib/module/config/constants.js.map +0 -1
  45. package/lib/module/config/defaults.js +0 -87
  46. package/lib/module/config/defaults.js.map +0 -1
  47. package/lib/module/config/index.js +0 -9
  48. package/lib/module/config/index.js.map +0 -1
  49. package/lib/module/config/masking.js +0 -35
  50. package/lib/module/config/masking.js.map +0 -1
  51. package/lib/module/config/session-recorder.js +0 -50
  52. package/lib/module/config/session-recorder.js.map +0 -1
  53. package/lib/module/config/validators.js +0 -28
  54. package/lib/module/config/validators.js.map +0 -1
  55. package/lib/module/config/widget.js +0 -35
  56. package/lib/module/config/widget.js.map +0 -1
  57. package/lib/module/context/SessionRecorderContext.js +0 -100
  58. package/lib/module/context/SessionRecorderContext.js.map +0 -1
  59. package/lib/module/context/SessionRecorderStore.js +0 -12
  60. package/lib/module/context/SessionRecorderStore.js.map +0 -1
  61. package/lib/module/context/createStore.js +0 -27
  62. package/lib/module/context/createStore.js.map +0 -1
  63. package/lib/module/context/useSessionRecorderStore.js +0 -45
  64. package/lib/module/context/useSessionRecorderStore.js.map +0 -1
  65. package/lib/module/context/useStoreSelector.js +0 -27
  66. package/lib/module/context/useStoreSelector.js.map +0 -1
  67. package/lib/module/index.js +0 -14
  68. package/lib/module/index.js.map +0 -1
  69. package/lib/module/native/SessionRecorderNative.js +0 -76
  70. package/lib/module/native/SessionRecorderNative.js.map +0 -1
  71. package/lib/module/native/index.js +0 -4
  72. package/lib/module/native/index.js.map +0 -1
  73. package/lib/module/otel/CrashBufferSpanProcessor.js +0 -42
  74. package/lib/module/otel/CrashBufferSpanProcessor.js.map +0 -1
  75. package/lib/module/otel/helpers.js +0 -218
  76. package/lib/module/otel/helpers.js.map +0 -1
  77. package/lib/module/otel/index.js +0 -202
  78. package/lib/module/otel/index.js.map +0 -1
  79. package/lib/module/otel/instrumentations/index.js +0 -122
  80. package/lib/module/otel/instrumentations/index.js.map +0 -1
  81. package/lib/module/package.json +0 -1
  82. package/lib/module/patch/configs.js +0 -18
  83. package/lib/module/patch/configs.js.map +0 -1
  84. package/lib/module/patch/fetch.js +0 -222
  85. package/lib/module/patch/fetch.js.map +0 -1
  86. package/lib/module/patch/index.js +0 -6
  87. package/lib/module/patch/index.js.map +0 -1
  88. package/lib/module/patch/xhr.js +0 -100
  89. package/lib/module/patch/xhr.js.map +0 -1
  90. package/lib/module/recorder/gestureRecorder.js +0 -641
  91. package/lib/module/recorder/gestureRecorder.js.map +0 -1
  92. package/lib/module/recorder/index.js +0 -176
  93. package/lib/module/recorder/index.js.map +0 -1
  94. package/lib/module/recorder/navigationRecorder.js +0 -238
  95. package/lib/module/recorder/navigationRecorder.js.map +0 -1
  96. package/lib/module/recorder/screenRecorder.js +0 -527
  97. package/lib/module/recorder/screenRecorder.js.map +0 -1
  98. package/lib/module/services/api.service.js +0 -166
  99. package/lib/module/services/api.service.js.map +0 -1
  100. package/lib/module/services/crashBuffer.service.js +0 -280
  101. package/lib/module/services/crashBuffer.service.js.map +0 -1
  102. package/lib/module/services/network.service.js +0 -178
  103. package/lib/module/services/network.service.js.map +0 -1
  104. package/lib/module/services/screenRecordingService.js +0 -107
  105. package/lib/module/services/screenRecordingService.js.map +0 -1
  106. package/lib/module/services/socket.service.js +0 -186
  107. package/lib/module/services/socket.service.js.map +0 -1
  108. package/lib/module/services/storage.service.js +0 -178
  109. package/lib/module/services/storage.service.js.map +0 -1
  110. package/lib/module/session-recorder.js +0 -750
  111. package/lib/module/session-recorder.js.map +0 -1
  112. package/lib/module/types/configs.js +0 -4
  113. package/lib/module/types/configs.js.map +0 -1
  114. package/lib/module/types/expo-constants.d.js +0 -2
  115. package/lib/module/types/expo-constants.d.js.map +0 -1
  116. package/lib/module/types/index.js +0 -10
  117. package/lib/module/types/index.js.map +0 -1
  118. package/lib/module/types/session-recorder.js +0 -68
  119. package/lib/module/types/session-recorder.js.map +0 -1
  120. package/lib/module/utils/app-metadata.js +0 -28
  121. package/lib/module/utils/app-metadata.js.map +0 -1
  122. package/lib/module/utils/constants.optional.expo.js +0 -6
  123. package/lib/module/utils/constants.optional.expo.js.map +0 -1
  124. package/lib/module/utils/constants.optional.js +0 -8
  125. package/lib/module/utils/constants.optional.js.map +0 -1
  126. package/lib/module/utils/index.js +0 -11
  127. package/lib/module/utils/index.js.map +0 -1
  128. package/lib/module/utils/logger.js +0 -185
  129. package/lib/module/utils/logger.js.map +0 -1
  130. package/lib/module/utils/platform.js +0 -340
  131. package/lib/module/utils/platform.js.map +0 -1
  132. package/lib/module/utils/request-utils.js +0 -58
  133. package/lib/module/utils/request-utils.js.map +0 -1
  134. package/lib/module/utils/rrweb-events.js +0 -276
  135. package/lib/module/utils/rrweb-events.js.map +0 -1
  136. package/lib/module/utils/session.js +0 -21
  137. package/lib/module/utils/session.js.map +0 -1
  138. package/lib/module/utils/shallowEqual.js +0 -17
  139. package/lib/module/utils/shallowEqual.js.map +0 -1
  140. package/lib/module/utils/time.js +0 -17
  141. package/lib/module/utils/time.js.map +0 -1
  142. package/lib/module/utils/type-utils.js +0 -69
  143. package/lib/module/utils/type-utils.js.map +0 -1
  144. package/lib/module/version.js +0 -4
  145. package/lib/module/version.js.map +0 -1
  146. package/lib/typescript/package.json +0 -1
  147. package/lib/typescript/src/NativeSessionRecorderModule.d.ts +0 -25
  148. package/lib/typescript/src/NativeSessionRecorderModule.d.ts.map +0 -1
  149. package/lib/typescript/src/NativeSessionRecorderModuleSpec.d.ts +0 -25
  150. package/lib/typescript/src/NativeSessionRecorderModuleSpec.d.ts.map +0 -1
  151. package/lib/typescript/src/NativeSessionRecorderNative.d.ts +0 -25
  152. package/lib/typescript/src/NativeSessionRecorderNative.d.ts.map +0 -1
  153. package/lib/typescript/src/components/ErrorBoundary.d.ts +0 -16
  154. package/lib/typescript/src/components/ErrorBoundary.d.ts.map +0 -1
  155. package/lib/typescript/src/components/ScreenRecorderView/ScreenRecorderView.d.ts +0 -6
  156. package/lib/typescript/src/components/ScreenRecorderView/ScreenRecorderView.d.ts.map +0 -1
  157. package/lib/typescript/src/components/ScreenRecorderView/index.d.ts +0 -2
  158. package/lib/typescript/src/components/ScreenRecorderView/index.d.ts.map +0 -1
  159. package/lib/typescript/src/components/SessionRecorderWidget/ErrorBanner.d.ts +0 -8
  160. package/lib/typescript/src/components/SessionRecorderWidget/ErrorBanner.d.ts.map +0 -1
  161. package/lib/typescript/src/components/SessionRecorderWidget/FinalPopover.d.ts +0 -13
  162. package/lib/typescript/src/components/SessionRecorderWidget/FinalPopover.d.ts.map +0 -1
  163. package/lib/typescript/src/components/SessionRecorderWidget/FloatingButton.d.ts +0 -9
  164. package/lib/typescript/src/components/SessionRecorderWidget/FloatingButton.d.ts.map +0 -1
  165. package/lib/typescript/src/components/SessionRecorderWidget/InitialPopover.d.ts +0 -17
  166. package/lib/typescript/src/components/SessionRecorderWidget/InitialPopover.d.ts.map +0 -1
  167. package/lib/typescript/src/components/SessionRecorderWidget/ModalContainer.d.ts +0 -9
  168. package/lib/typescript/src/components/SessionRecorderWidget/ModalContainer.d.ts.map +0 -1
  169. package/lib/typescript/src/components/SessionRecorderWidget/ModalHeader.d.ts +0 -7
  170. package/lib/typescript/src/components/SessionRecorderWidget/ModalHeader.d.ts.map +0 -1
  171. package/lib/typescript/src/components/SessionRecorderWidget/SessionRecorderWidget.d.ts +0 -6
  172. package/lib/typescript/src/components/SessionRecorderWidget/SessionRecorderWidget.d.ts.map +0 -1
  173. package/lib/typescript/src/components/SessionRecorderWidget/icons.d.ts +0 -12
  174. package/lib/typescript/src/components/SessionRecorderWidget/icons.d.ts.map +0 -1
  175. package/lib/typescript/src/components/SessionRecorderWidget/index.d.ts +0 -3
  176. package/lib/typescript/src/components/SessionRecorderWidget/index.d.ts.map +0 -1
  177. package/lib/typescript/src/components/SessionRecorderWidget/styles.d.ts +0 -166
  178. package/lib/typescript/src/components/SessionRecorderWidget/styles.d.ts.map +0 -1
  179. package/lib/typescript/src/components/index.d.ts +0 -4
  180. package/lib/typescript/src/components/index.d.ts.map +0 -1
  181. package/lib/typescript/src/config/constants.d.ts +0 -22
  182. package/lib/typescript/src/config/constants.d.ts.map +0 -1
  183. package/lib/typescript/src/config/defaults.d.ts +0 -5
  184. package/lib/typescript/src/config/defaults.d.ts.map +0 -1
  185. package/lib/typescript/src/config/index.d.ts +0 -6
  186. package/lib/typescript/src/config/index.d.ts.map +0 -1
  187. package/lib/typescript/src/config/masking.d.ts +0 -3
  188. package/lib/typescript/src/config/masking.d.ts.map +0 -1
  189. package/lib/typescript/src/config/session-recorder.d.ts +0 -3
  190. package/lib/typescript/src/config/session-recorder.d.ts.map +0 -1
  191. package/lib/typescript/src/config/validators.d.ts +0 -11
  192. package/lib/typescript/src/config/validators.d.ts.map +0 -1
  193. package/lib/typescript/src/config/widget.d.ts +0 -10
  194. package/lib/typescript/src/config/widget.d.ts.map +0 -1
  195. package/lib/typescript/src/context/SessionRecorderContext.d.ts +0 -22
  196. package/lib/typescript/src/context/SessionRecorderContext.d.ts.map +0 -1
  197. package/lib/typescript/src/context/SessionRecorderStore.d.ts +0 -13
  198. package/lib/typescript/src/context/SessionRecorderStore.d.ts.map +0 -1
  199. package/lib/typescript/src/context/createStore.d.ts +0 -9
  200. package/lib/typescript/src/context/createStore.d.ts.map +0 -1
  201. package/lib/typescript/src/context/useSessionRecorderStore.d.ts +0 -29
  202. package/lib/typescript/src/context/useSessionRecorderStore.d.ts.map +0 -1
  203. package/lib/typescript/src/context/useStoreSelector.d.ts +0 -5
  204. package/lib/typescript/src/context/useStoreSelector.d.ts.map +0 -1
  205. package/lib/typescript/src/index.d.ts +0 -9
  206. package/lib/typescript/src/index.d.ts.map +0 -1
  207. package/lib/typescript/src/native/SessionRecorderNative.d.ts +0 -29
  208. package/lib/typescript/src/native/SessionRecorderNative.d.ts.map +0 -1
  209. package/lib/typescript/src/native/index.d.ts +0 -2
  210. package/lib/typescript/src/native/index.d.ts.map +0 -1
  211. package/lib/typescript/src/otel/CrashBufferSpanProcessor.d.ts +0 -17
  212. package/lib/typescript/src/otel/CrashBufferSpanProcessor.d.ts.map +0 -1
  213. package/lib/typescript/src/otel/helpers.d.ts +0 -46
  214. package/lib/typescript/src/otel/helpers.d.ts.map +0 -1
  215. package/lib/typescript/src/otel/index.d.ts +0 -33
  216. package/lib/typescript/src/otel/index.d.ts.map +0 -1
  217. package/lib/typescript/src/otel/instrumentations/index.d.ts +0 -5
  218. package/lib/typescript/src/otel/instrumentations/index.d.ts.map +0 -1
  219. package/lib/typescript/src/patch/configs.d.ts +0 -9
  220. package/lib/typescript/src/patch/configs.d.ts.map +0 -1
  221. package/lib/typescript/src/patch/fetch.d.ts +0 -2
  222. package/lib/typescript/src/patch/fetch.d.ts.map +0 -1
  223. package/lib/typescript/src/patch/index.d.ts +0 -4
  224. package/lib/typescript/src/patch/index.d.ts.map +0 -1
  225. package/lib/typescript/src/patch/xhr.d.ts +0 -2
  226. package/lib/typescript/src/patch/xhr.d.ts.map +0 -1
  227. package/lib/typescript/src/recorder/gestureRecorder.d.ts +0 -66
  228. package/lib/typescript/src/recorder/gestureRecorder.d.ts.map +0 -1
  229. package/lib/typescript/src/recorder/index.d.ts +0 -79
  230. package/lib/typescript/src/recorder/index.d.ts.map +0 -1
  231. package/lib/typescript/src/recorder/navigationRecorder.d.ts +0 -29
  232. package/lib/typescript/src/recorder/navigationRecorder.d.ts.map +0 -1
  233. package/lib/typescript/src/recorder/screenRecorder.d.ts +0 -127
  234. package/lib/typescript/src/recorder/screenRecorder.d.ts.map +0 -1
  235. package/lib/typescript/src/services/api.service.d.ts +0 -116
  236. package/lib/typescript/src/services/api.service.d.ts.map +0 -1
  237. package/lib/typescript/src/services/crashBuffer.service.d.ts +0 -27
  238. package/lib/typescript/src/services/crashBuffer.service.d.ts.map +0 -1
  239. package/lib/typescript/src/services/network.service.d.ts +0 -47
  240. package/lib/typescript/src/services/network.service.d.ts.map +0 -1
  241. package/lib/typescript/src/services/screenRecordingService.d.ts +0 -48
  242. package/lib/typescript/src/services/screenRecordingService.d.ts.map +0 -1
  243. package/lib/typescript/src/services/socket.service.d.ts +0 -44
  244. package/lib/typescript/src/services/socket.service.d.ts.map +0 -1
  245. package/lib/typescript/src/services/storage.service.d.ts +0 -47
  246. package/lib/typescript/src/services/storage.service.d.ts.map +0 -1
  247. package/lib/typescript/src/session-recorder.d.ts +0 -191
  248. package/lib/typescript/src/session-recorder.d.ts.map +0 -1
  249. package/lib/typescript/src/types/configs.d.ts +0 -92
  250. package/lib/typescript/src/types/configs.d.ts.map +0 -1
  251. package/lib/typescript/src/types/index.d.ts +0 -21
  252. package/lib/typescript/src/types/index.d.ts.map +0 -1
  253. package/lib/typescript/src/types/session-recorder.d.ts +0 -367
  254. package/lib/typescript/src/types/session-recorder.d.ts.map +0 -1
  255. package/lib/typescript/src/utils/app-metadata.d.ts +0 -17
  256. package/lib/typescript/src/utils/app-metadata.d.ts.map +0 -1
  257. package/lib/typescript/src/utils/constants.optional.d.ts +0 -22
  258. package/lib/typescript/src/utils/constants.optional.d.ts.map +0 -1
  259. package/lib/typescript/src/utils/constants.optional.expo.d.ts +0 -4
  260. package/lib/typescript/src/utils/constants.optional.expo.d.ts.map +0 -1
  261. package/lib/typescript/src/utils/index.d.ts +0 -8
  262. package/lib/typescript/src/utils/index.d.ts.map +0 -1
  263. package/lib/typescript/src/utils/logger.d.ts +0 -108
  264. package/lib/typescript/src/utils/logger.d.ts.map +0 -1
  265. package/lib/typescript/src/utils/platform.d.ts +0 -58
  266. package/lib/typescript/src/utils/platform.d.ts.map +0 -1
  267. package/lib/typescript/src/utils/request-utils.d.ts +0 -22
  268. package/lib/typescript/src/utils/request-utils.d.ts.map +0 -1
  269. package/lib/typescript/src/utils/rrweb-events.d.ts +0 -67
  270. package/lib/typescript/src/utils/rrweb-events.d.ts.map +0 -1
  271. package/lib/typescript/src/utils/session.d.ts +0 -7
  272. package/lib/typescript/src/utils/session.d.ts.map +0 -1
  273. package/lib/typescript/src/utils/shallowEqual.d.ts +0 -2
  274. package/lib/typescript/src/utils/shallowEqual.d.ts.map +0 -1
  275. package/lib/typescript/src/utils/time.d.ts +0 -5
  276. package/lib/typescript/src/utils/time.d.ts.map +0 -1
  277. package/lib/typescript/src/utils/type-utils.d.ts +0 -17
  278. package/lib/typescript/src/utils/type-utils.d.ts.map +0 -1
  279. package/lib/typescript/src/version.d.ts +0 -2
  280. package/lib/typescript/src/version.d.ts.map +0 -1
@@ -1,191 +0,0 @@
1
- import { SessionType, type ISession, type IUserAttributes } from '@multiplayer-app/session-recorder-common';
2
- import { Observable } from 'lib0/observable';
3
- import { type eventWithTime } from '@rrweb/types';
4
- import { SessionState, type ISessionRecorder, type SessionRecorderConfigs, type SessionRecorderOptions, type EventRecorder } from './types';
5
- type SessionRecorderEvents = 'state-change' | 'init';
6
- declare class SessionRecorder extends Observable<SessionRecorderEvents> implements ISessionRecorder, EventRecorder {
7
- private _configs;
8
- private _apiService;
9
- private _socketService;
10
- private _tracer;
11
- private _recorder;
12
- private _storageService;
13
- private _networkService;
14
- private _crashBuffer;
15
- private _isFlushingBuffer;
16
- private _startRequestController;
17
- private _isInitialized;
18
- get isInitialized(): boolean;
19
- set isInitialized(isInitialized: boolean);
20
- private _sessionId;
21
- get sessionId(): string | null;
22
- set sessionId(sessionId: string | null);
23
- private _sessionType;
24
- get sessionType(): SessionType;
25
- set sessionType(sessionType: SessionType);
26
- get continuousRecording(): boolean;
27
- private _sessionState;
28
- get sessionState(): SessionState | null;
29
- set sessionState(state: SessionState | null);
30
- private _session;
31
- get session(): ISession | null;
32
- set session(session: ISession | null);
33
- private _sessionAttributes;
34
- get sessionAttributes(): Record<string, any>;
35
- set sessionAttributes(attributes: Record<string, any> | null);
36
- private _userAttributes;
37
- get userAttributes(): IUserAttributes | null;
38
- set userAttributes(userAttributes: IUserAttributes | null);
39
- /**
40
- * Error message getter and setter
41
- */
42
- get error(): string;
43
- set error(v: string);
44
- private _error;
45
- /**
46
- * React Native doesn't have HTML elements, so we return null
47
- */
48
- get sessionWidgetButtonElement(): any;
49
- get config(): SessionRecorderConfigs;
50
- /**
51
- * Initialize debugger with default or custom configurations
52
- */
53
- constructor();
54
- /**
55
- * Capture an exception manually and send it as an error trace.
56
- */
57
- captureException(error: unknown, errorInfo?: Record<string, any>): void;
58
- private _flushBuffer;
59
- private _createExceptionSession;
60
- private _loadStoredSessionData;
61
- /**
62
- * Initialize the session debugger
63
- * @param configs - custom configurations for session debugger
64
- */
65
- init(configs: SessionRecorderOptions): Promise<void>;
66
- private _startBufferOnlyRecording;
67
- /**
68
- * Register socket service event listeners
69
- */
70
- private _registerSocketServiceListeners;
71
- /**
72
- * Setup network state change callbacks
73
- */
74
- private _setupNetworkCallbacks;
75
- /**
76
- * Start a new session
77
- * @param type - the type of session to start
78
- * @param session - the session to start
79
- */
80
- start(type?: SessionType, session?: ISession): Promise<void>;
81
- /**
82
- * Stop the current session with an optional comment
83
- * @param comment - user-provided comment to include in session session attributes
84
- */
85
- stop(comment?: string): Promise<void>;
86
- /**
87
- * Pause the current session
88
- */
89
- pause(): Promise<void>;
90
- /**
91
- * Resume the current session
92
- */
93
- resume(): Promise<void>;
94
- /**
95
- * Cancel the current session
96
- */
97
- cancel(): Promise<void>;
98
- /**
99
- * Save the continuous recording session
100
- */
101
- save(): Promise<any>;
102
- /**
103
- * Set the session attributes
104
- * @param attributes - the attributes to set
105
- */
106
- setSessionAttributes(attributes: Record<string, any>): void;
107
- /**
108
- * Set the user attributes
109
- * @param userAttributes - the user attributes to set
110
- */
111
- setUserAttributes(userAttributes: IUserAttributes | null): void;
112
- /**
113
- * @description Check if session should be started/stopped automatically
114
- * @param {ISession} [sessionPayload]
115
- * @returns {Promise<void>}
116
- */
117
- checkRemoteContinuousSession(sessionPayload?: Omit<ISession, '_id' | 'shortId'>): Promise<void>;
118
- /**
119
- * Create a new session and start it
120
- */
121
- private _createSessionAndStart;
122
- /**
123
- * Start tracing and recording for the session
124
- */
125
- private _start;
126
- /**
127
- * Stop tracing and recording for the session
128
- */
129
- private _stop;
130
- /**
131
- * Pause the session tracing and recording
132
- */
133
- private _pause;
134
- /**
135
- * Resume the session tracing and recording
136
- */
137
- private _resume;
138
- private _setupSessionAndStart;
139
- /**
140
- * Set the session ID in storage
141
- * @param sessionId - the session ID to set or clear
142
- */
143
- private _setSession;
144
- private _clearSession;
145
- /**
146
- * Check the operation validity based on the session state and action
147
- * @param action - action being checked ('init', 'start', 'stop', 'cancel', 'pause', 'resume')
148
- */
149
- private _checkOperation;
150
- setSessionAttribute(key: string, value: any): void;
151
- /**
152
- * Record a custom rrweb event
153
- * Note: Screen capture and touch events are recorded automatically when session is started
154
- * @param event - The rrweb event to record
155
- */
156
- recordEvent(event: eventWithTime): void;
157
- /**
158
- * Set the viewshot ref for screen capture
159
- * @param ref - React Native View ref for screen capture
160
- */
161
- setViewShotRef(ref: any): void;
162
- /**
163
- * Set the navigation ref for navigation tracking
164
- * @param ref - React Native Navigation ref for navigation tracking
165
- */
166
- setNavigationRef(ref: any): void;
167
- /**
168
- * Cleanup resources and unsubscribe from network monitoring
169
- */
170
- cleanup(): void;
171
- /**
172
- * Normalize an error to an Error object
173
- * @param error - the error to normalize
174
- * @returns the normalized error
175
- */
176
- private _normalizeError;
177
- /**
178
- * Normalize an error info object to a Record<string, any>
179
- * @param errorInfo - the error info to normalize
180
- * @returns the normalized error info
181
- */
182
- private _normalizeErrorInfo;
183
- /**
184
- * Get the session name
185
- * @returns the session name
186
- */
187
- private _getSessionName;
188
- }
189
- declare const _default: SessionRecorder;
190
- export default _default;
191
- //# sourceMappingURL=session-recorder.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"session-recorder.d.ts","sourceRoot":"","sources":["../../../src/session-recorder.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,KAAK,QAAQ,EACb,KAAK,eAAe,EACrB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAMlD,OAAO,EACL,YAAY,EACZ,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,aAAa,EACnB,MAAM,SAAS,CAAC;AAwBjB,KAAK,qBAAqB,GAAG,cAAc,GAAG,MAAM,CAAC;AAErD,cAAM,eACJ,SAAQ,UAAU,CAAC,qBAAqB,CACxC,YAAW,gBAAgB,EAAE,aAAa;IAE1C,OAAO,CAAC,QAAQ,CAAyB;IACzC,OAAO,CAAC,WAAW,CAAoB;IACvC,OAAO,CAAC,cAAc,CAAuB;IAC7C,OAAO,CAAC,OAAO,CAA8B;IAC7C,OAAO,CAAC,SAAS,CAAgC;IACjD,OAAO,CAAC,eAAe,CAAgC;IACvD,OAAO,CAAC,eAAe,CAAgC;IACvD,OAAO,CAAC,YAAY,CAAoC;IACxD,OAAO,CAAC,iBAAiB,CAAkB;IAC3C,OAAO,CAAC,uBAAuB,CAAgC;IAG/D,OAAO,CAAC,cAAc,CAAS;IAC/B,IAAI,aAAa,IAAI,OAAO,CAE3B;IACD,IAAI,aAAa,CAAC,aAAa,EAAE,OAAO,EAEvC;I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AC,WAAW;IAQnB,OAAO,CAAC,aAAa;IAOrB;;;OAGG;IACH,OAAO,CAAC,eAAe;IAoEvB,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI;IAUlD;;;;OAIG;IACH,WAAW,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI;IASvC;;;OAGG;IACH,cAAc,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI;IAM9B;;;OAGG;IACH,gBAAgB,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI;IAMhC;;OAEG;IACH,OAAO,IAAI,IAAI;IAIf;;;;OAIG;IACH,OAAO,CAAC,eAAe;IAUvB;;;;OAIG;IACH,OAAO,CAAC,mBAAmB;IAW3B;;;OAGG;IACH,OAAO,CAAC,eAAe;CAUxB;;AAED,wBAAqC"}
@@ -1,92 +0,0 @@
1
- import { type PropagateTraceHeaderCorsUrls } from '@opentelemetry/instrumentation-xml-http-request/build/src/types';
2
- import { type MaskingOptions, type SessionRecorderOptions } from './session-recorder';
3
- /**
4
- * Utility type that makes all properties required recursively
5
- * Removes optional modifiers and undefined types from nested objects
6
- */
7
- export type DeepRequired<T> = T extends Function ? T : T extends ReadonlyArray<infer U> ? Array<DeepRequired<NonNullable<U>>> : T extends Array<infer U> ? Array<DeepRequired<NonNullable<U>>> : T extends object ? {
8
- -readonly [K in keyof T]-?: DeepRequired<NonNullable<T[K]>>;
9
- } : NonNullable<T>;
10
- /**
11
- * Fully resolved configuration interface
12
- * All optional properties from SessionRecorderOptions are now required
13
- */
14
- export interface SessionRecorderConfigs extends DeepRequired<SessionRecorderOptions> {
15
- }
16
- /**
17
- * Base configuration interface with common properties
18
- * Shared by all service configuration interfaces
19
- */
20
- export interface BaseConfig {
21
- /** API key for authentication */
22
- apiKey: string;
23
- /** Base URL for the API calls */
24
- apiBaseUrl: string;
25
- /** OTLP collector endpoint for traces */
26
- exporterEndpoint: string;
27
- }
28
- /**
29
- * Type for masking configuration used by the Tracer
30
- * Contains only trace-related masking options
31
- */
32
- export type TracerReactNativeMasking = Pick<MaskingOptions, 'isContentMaskingEnabled' | 'maskBody' | 'maskHeaders' | 'maskBodyFieldsList' | 'maskHeadersList' | 'headersToInclude' | 'headersToExclude'>;
33
- /**
34
- * Configuration interface for the Tracer class
35
- * Contains all settings needed for OpenTelemetry tracing
36
- */
37
- export interface TracerReactNativeConfig extends BaseConfig {
38
- /** Application name */
39
- application: string;
40
- /** Application version */
41
- version: string;
42
- /** Environment (e.g., 'production', 'staging') */
43
- environment: string;
44
- /** URLs to ignore during tracing */
45
- ignoreUrls: Array<string | RegExp>;
46
- /** Trace ID ratio for sampling */
47
- sampleTraceRatio: number;
48
- /** URLs for CORS trace header propagation */
49
- propagateTraceHeaderCorsUrls: PropagateTraceHeaderCorsUrls;
50
- /** Whether to schematize document span payload */
51
- schemifyDocSpanPayload: boolean;
52
- /** Maximum size for capturing HTTP payload */
53
- maxCapturingHttpPayloadSize: number;
54
- /** If true, captures body in traces */
55
- captureBody: boolean;
56
- /** If true, captures headers in traces */
57
- captureHeaders: boolean;
58
- /** Configuration for masking sensitive data in session recordings */
59
- masking: TracerReactNativeMasking;
60
- }
61
- /**
62
- * Type for masking configuration used by the Recorder
63
- * Contains only screen recording masking options
64
- */
65
- export type RecorderMaskingConfig = Pick<MaskingOptions, 'maskTextInputs' | 'maskImages' | 'maskButtons' | 'maskLabels' | 'maskWebViews' | 'maskSandboxedViews'>;
66
- /**
67
- * Configuration interface for the Recorder class
68
- * Contains settings for screen recording and gesture capture
69
- */
70
- export interface RecorderConfig extends BaseConfig {
71
- /** Whether to record gestures */
72
- recordGestures?: boolean;
73
- /** Whether to record navigation */
74
- recordNavigation?: boolean;
75
- /** Whether to record screen */
76
- recordScreen?: boolean;
77
- /** Buffering options used by recorder runtime behavior */
78
- buffering?: {
79
- enabled?: boolean;
80
- windowMinutes?: number;
81
- snapshotIntervalMs?: number;
82
- };
83
- /** Configuration for masking sensitive data in screen recordings */
84
- masking?: RecorderMaskingConfig;
85
- }
86
- /**
87
- * Configuration interface for the ApiService class
88
- * Contains settings for API communication
89
- */
90
- export interface ApiServiceConfig extends BaseConfig {
91
- }
92
- //# sourceMappingURL=configs.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"configs.d.ts","sourceRoot":"","sources":["../../../../src/types/configs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,4BAA4B,EAAE,MAAM,iEAAiE,CAAC;AACpH,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,sBAAsB,EAC5B,MAAM,oBAAoB,CAAC;AAE5B;;;GAGG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAAC,SAAS,QAAQ,GAC5C,CAAC,GACD,CAAC,SAAS,aAAa,CAAC,MAAM,CAAC,CAAC,GAC9B,KAAK,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,GACnC,CAAC,SAAS,KAAK,CAAC,MAAM,CAAC,CAAC,GACtB,KAAK,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,GACnC,CAAC,SAAS,MAAM,GACd;IAAE,CAAC,UAAU,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,YAAY,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,GAC/D,WAAW,CAAC,CAAC,CAAC,CAAC;AAEzB;;;GAGG;AACH,MAAM,WAAW,sBACf,SAAQ,YAAY,CAAC,sBAAsB,CAAC;CAAG;AAEjD;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB,iCAAiC;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,iCAAiC;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,yCAAyC;IACzC,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED;;;GAGG;AACH,MAAM,MAAM,wBAAwB,GAAG,IAAI,CACzC,cAAc,EACZ,yBAAyB,GACzB,UAAU,GACV,aAAa,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CAAC;CACjC;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAiB,SAAQ,UAAU;CAAG"}
@@ -1,21 +0,0 @@
1
- export * from './session-recorder';
2
- export * from './configs';
3
- import type { eventWithTime } from '@rrweb/types';
4
- export interface ReactNativeScreenData {
5
- width: number;
6
- height: number;
7
- base64Image: string;
8
- timestamp: number;
9
- screenName?: string;
10
- }
11
- export interface ReactNativeTouchData {
12
- pageX: number;
13
- pageY: number;
14
- target?: string;
15
- pressure?: number;
16
- timestamp: number;
17
- }
18
- export interface EventRecorder {
19
- recordEvent(event: eventWithTime): void;
20
- }
21
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAG1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAGD,MAAM,WAAW,aAAa;IAC5B,WAAW,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI,CAAC;CACzC"}
@@ -1,367 +0,0 @@
1
- import { type Span } from '@opentelemetry/api';
2
- import { type ISession, type SessionType, type IUserAttributes } from '@multiplayer-app/session-recorder-common';
3
- import { type PropagateTraceHeaderCorsUrls } from '@opentelemetry/sdk-trace-web';
4
- export declare enum SessionState {
5
- started = "2",
6
- paused = "1",
7
- stopped = "0"
8
- }
9
- /**
10
- * Enumeration for widget button placement positions
11
- */
12
- export declare enum WidgetButtonPlacement {
13
- topLeft = "top-left",
14
- topRight = "top-right",
15
- bottomLeft = "bottom-left",
16
- bottomRight = "bottom-right"
17
- }
18
- /**
19
- * Enumeration for log levels
20
- */
21
- export declare enum LogLevel {
22
- DEBUG = 0,
23
- INFO = 1,
24
- WARN = 2,
25
- ERROR = 3
26
- }
27
- /**
28
- * Main configuration interface for the Session Recorder
29
- * Contains all configurable options for session recording, tracing, and UI
30
- */
31
- export interface SessionRecorderOptions {
32
- /**
33
- * The API key used to authenticate with the session debugger service.
34
- */
35
- apiKey: string;
36
- /**
37
- * The version of the application using the session debugger.
38
- */
39
- version: string;
40
- /**
41
- * The name of the application being debugged.
42
- */
43
- application: string;
44
- /**
45
- * The environment where the application is running (e.g., 'production', 'staging').
46
- */
47
- environment: string;
48
- /**
49
- * (Optional) OTLP collector endpoint.
50
- */
51
- exporterEndpoint?: string;
52
- /**
53
- * (Optional) Base URL for the API calls.
54
- * This allows customization of the API endpoint for sending session data.
55
- */
56
- apiBaseUrl?: string;
57
- /**
58
- * (Optional) An array of URLs or regular expressions that should be ignored by the session debugger.
59
- * Any URL that partially matches any regex in this array will not be traced.
60
- * Additionally, URLs that exactly match any string in the array will also be ignored.
61
- */
62
- ignoreUrls?: Array<string | RegExp>;
63
- /**
64
- * (Optional) Enables the continuous recording feature and UI.
65
- * If false, the UI toggle is hidden and attempts to start a continuous
66
- * session are ignored.
67
- * @default true
68
- */
69
- showContinuousRecording?: boolean;
70
- /**
71
- * Optional widget configuration
72
- */
73
- widget?: {
74
- /** Enables/disables the widget entirely
75
- * @default true
76
- */
77
- enabled?: boolean;
78
- /** Floating button config
79
- * @default visible: true, placement: 'bottom-right'
80
- */
81
- button?: {
82
- visible?: boolean;
83
- placement?: WidgetButtonPlacement;
84
- };
85
- /**
86
- * (Optional) Configuration for customizable UI text and labels
87
- * @default See PopoverTextConfig defaults
88
- */
89
- textOverrides?: TextOverridesOptions;
90
- };
91
- /**
92
- * (Optional) Trace ID Ratio for sampling
93
- * @default 0.15
94
- */
95
- sampleTraceRatio?: number;
96
- /**
97
- * (Optional) URLs or regex patterns for CORS trace header propagation
98
- */
99
- propagateTraceHeaderCorsUrls?: PropagateTraceHeaderCorsUrls;
100
- /**
101
- * (Optional) If true, schematizes document span payload
102
- * @default true
103
- */
104
- schemifyDocSpanPayload?: boolean;
105
- /**
106
- * (Optional) Maximum size for capturing HTTP payload
107
- * @default 100000
108
- */
109
- maxCapturingHttpPayloadSize?: number;
110
- /** If true, captures body in traces
111
- * @default true
112
- */
113
- captureBody?: boolean;
114
- /** If true, captures headers in traces
115
- * @default true
116
- */
117
- captureHeaders?: boolean;
118
- /**
119
- * (Optional) Configuration for masking sensitive data in session recordings
120
- * @default { maskAllInputs: true, isContentMaskingEnabled: true }
121
- */
122
- masking?: MaskingOptions;
123
- /** Whether to record gestures */
124
- recordGestures?: boolean;
125
- /** Whether to record navigation */
126
- recordNavigation?: boolean;
127
- /** Whether to record screen */
128
- recordScreen?: boolean;
129
- /**
130
- * (Optional) Logger configuration overrides
131
- * Allows setting log level, console enabling, and prefix customizations
132
- */
133
- logger?: {
134
- level?: number;
135
- enabled?: boolean;
136
- };
137
- /**
138
- * @description
139
- * If true, webSocket will be used to manage remote recording sessions.
140
- * @default true
141
- */
142
- useWebsocket?: boolean;
143
- /**
144
- * (Optional) Client-side crash buffer configuration.
145
- * When enabled, the SDK keeps a rolling window of recent events + traces
146
- * even if the user did not start a manual/continuous recording.
147
- */
148
- buffering?: {
149
- /** Enable/disable buffering. @default false */
150
- enabled?: boolean;
151
- /** Rolling window size (minutes). @default 0.5 */
152
- windowMinutes?: number;
153
- /** Force a fresh full snapshot at this interval (ms). @default 20000 */
154
- snapshotIntervalMs?: number;
155
- };
156
- }
157
- /**
158
- * Interface for customizable widget text configuration
159
- * Allows overriding default text labels and messages in the UI
160
- */
161
- export interface TextOverridesOptions {
162
- /** Title for the initial popover when continuous recording is enabled */
163
- initialTitleWithContinuous?: string;
164
- /** Title for the initial popover when continuous recording is disabled */
165
- initialTitleWithoutContinuous?: string;
166
- /** Description for the initial popover when continuous recording is enabled */
167
- initialDescriptionWithContinuous?: string;
168
- /** Description for the initial popover when continuous recording is disabled */
169
- initialDescriptionWithoutContinuous?: string;
170
- /** Label for the continuous recording toggle */
171
- continuousRecordingLabel?: string;
172
- /** Text for the start recording button */
173
- startRecordingButtonText?: string;
174
- /** Title for the final popover */
175
- finalTitle?: string;
176
- /** Description for the final popover */
177
- finalDescription?: string;
178
- /** Placeholder text for the comment textarea */
179
- commentPlaceholder?: string;
180
- /** Text for the save button in final popover */
181
- saveButtonText?: string;
182
- /** Text for the cancel button in final popover */
183
- cancelButtonText?: string;
184
- /** Title for the continuous recording overlay */
185
- continuousOverlayTitle?: string;
186
- /** Description for the continuous recording overlay */
187
- continuousOverlayDescription?: string;
188
- /** Text for the save last snapshot button */
189
- saveLastSnapshotButtonText?: string;
190
- /** Title for the submit session dialog */
191
- submitDialogTitle?: string;
192
- /** Subtitle for the submit session dialog */
193
- submitDialogSubtitle?: string;
194
- /** Label for the comment field in submit dialog */
195
- submitDialogCommentLabel?: string;
196
- /** Placeholder for the comment field in submit dialog */
197
- submitDialogCommentPlaceholder?: string;
198
- /** Text for the submit button in dialog */
199
- submitDialogSubmitText?: string;
200
- /** Text for the cancel button in dialog */
201
- submitDialogCancelText?: string;
202
- }
203
- /**
204
- * Interface for masking configuration options
205
- * Controls what data is masked in both traces and screen recordings
206
- */
207
- export interface MaskingOptions {
208
- /** If true, enables masking for debug span payload in traces */
209
- isContentMaskingEnabled?: boolean;
210
- /** Custom function for masking body in traces */
211
- maskBody?: (payload: any, span: Span) => any;
212
- /** Custom function for masking headers in traces */
213
- maskHeaders?: (headers: any, span: any) => any;
214
- /** List of body fields to mask in traces */
215
- maskBodyFieldsList?: string[];
216
- /** List of headers to mask in traces */
217
- maskHeadersList?: string[];
218
- /** List of headers to include in traces (if specified, only these headers will be captured) */
219
- headersToInclude?: string[];
220
- /** List of headers to exclude from traces */
221
- headersToExclude?: string[];
222
- /** Whether to mask text inputs (UITextField, UITextView, React Native text components) */
223
- maskTextInputs?: boolean;
224
- /** Whether to mask images (UIImageView, React Native Image components) */
225
- maskImages?: boolean;
226
- /** Whether to mask buttons (UIButton) */
227
- maskButtons?: boolean;
228
- /** Whether to mask labels (UILabel) */
229
- maskLabels?: boolean;
230
- /** Whether to mask web views (WKWebView) */
231
- maskWebViews?: boolean;
232
- /** Whether to mask sandboxed views (system views that don't belong to current process) */
233
- maskSandboxedViews?: boolean;
234
- }
235
- /**
236
- * Main interface for the Session Recorder
237
- * Defines the public API for session recording functionality
238
- */
239
- export interface ISessionRecorder {
240
- /**
241
- * The current session ID
242
- */
243
- readonly sessionId: string | null;
244
- /**
245
- * Whether continuous recording is enabled
246
- */
247
- readonly continuousRecording: boolean;
248
- /**
249
- * The current debug session object
250
- */
251
- readonly session: ISession | null;
252
- /**
253
- * The type of session (plain or continuous)
254
- */
255
- readonly sessionType: SessionType;
256
- /**
257
- * The current state of the session
258
- */
259
- readonly sessionState: SessionState | null;
260
- /**
261
- * Session attributes for additional context
262
- */
263
- readonly sessionAttributes: Record<string, any>;
264
- /**
265
- * Current error message
266
- */
267
- error: string;
268
- /**
269
- * The HTML button element for the session widget's recorder button
270
- */
271
- readonly sessionWidgetButtonElement: HTMLButtonElement;
272
- /**
273
- * Initialize the session debugger with custom configurations
274
- * @param configs - custom configurations for session debugger
275
- */
276
- init(configs: SessionRecorderOptions): void;
277
- /**
278
- * Save the continuous recording session
279
- * @returns Promise that resolves to the save response
280
- */
281
- save(): Promise<any>;
282
- /**
283
- * Start a new session
284
- * @param type - the type of session to start
285
- * @param session - optional existing session to start
286
- */
287
- start(type?: SessionType, session?: ISession): void;
288
- /**
289
- * Stop the current session with an optional comment
290
- * @param comment - user-provided comment to include in session feedback metadata
291
- */
292
- stop(comment?: string): Promise<void>;
293
- /**
294
- * Cancel the current session
295
- */
296
- cancel(): Promise<void>;
297
- /**
298
- * Pause the current session
299
- */
300
- pause(): Promise<void>;
301
- /**
302
- * Resume the current session
303
- */
304
- resume(): Promise<void>;
305
- /**
306
- * Set the session metadata
307
- * @param attributes - the attributes to set
308
- */
309
- setSessionAttributes(attributes: Record<string, any>): void;
310
- /**
311
- * Set the user attributes
312
- * @param userAttributes - the user attributes to set
313
- */
314
- setUserAttributes(userAttributes: IUserAttributes | null): void;
315
- /**
316
- * Capture an exception and send it as an error trace
317
- */
318
- captureException(error: unknown, errorInfo?: Record<string, any>): void;
319
- }
320
- /**
321
- * Interface representing screen capture events
322
- * Contains metadata about screen recordings
323
- */
324
- export interface ScreenEvent {
325
- screenName: string;
326
- timestamp: number;
327
- params?: Record<string, any>;
328
- type?: string;
329
- metadata?: Record<string, any>;
330
- dataUrl?: string;
331
- }
332
- /**
333
- * Interface representing gesture/touch events
334
- * Contains information about user interactions with the screen
335
- */
336
- export interface GestureEvent {
337
- type: string;
338
- timestamp: number;
339
- x?: number;
340
- y?: number;
341
- direction?: string;
342
- target?: string;
343
- coordinates?: {
344
- x: number;
345
- y: number;
346
- };
347
- targetInfo?: {
348
- identifier: string;
349
- label?: string;
350
- role?: string;
351
- testId?: string;
352
- text?: string;
353
- };
354
- metadata?: Record<string, any>;
355
- }
356
- /**
357
- * Interface representing navigation events
358
- * Contains information about screen/route changes
359
- */
360
- export interface NavigationEvent {
361
- type: string;
362
- timestamp: number;
363
- routeName?: string;
364
- params?: Record<string, any>;
365
- metadata?: Record<string, any>;
366
- }
367
- //# sourceMappingURL=session-recorder.d.ts.map