@multiplayer-app/session-recorder-react-native 0.0.1 → 1.0.0-beta.1

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 (229) hide show
  1. package/README.md +708 -83
  2. package/SessionRecorderNative.podspec +26 -0
  3. package/android/build.gradle +34 -0
  4. package/copy-react-native-dist.sh +34 -16
  5. package/dist/components/ScreenRecorderView/ScreenRecorderView.js +1 -1
  6. package/dist/components/ScreenRecorderView/ScreenRecorderView.js.map +1 -1
  7. package/dist/components/SessionRecorderWidget/ErrorBanner.d.ts +7 -0
  8. package/dist/components/SessionRecorderWidget/ErrorBanner.js +1 -0
  9. package/dist/components/SessionRecorderWidget/ErrorBanner.js.map +1 -0
  10. package/dist/components/SessionRecorderWidget/FinalPopover.d.ts +12 -0
  11. package/dist/components/SessionRecorderWidget/FinalPopover.js +1 -0
  12. package/dist/components/SessionRecorderWidget/FinalPopover.js.map +1 -0
  13. package/dist/components/SessionRecorderWidget/FloatingButton.d.ts +8 -0
  14. package/dist/components/SessionRecorderWidget/FloatingButton.js +1 -0
  15. package/dist/components/SessionRecorderWidget/FloatingButton.js.map +1 -0
  16. package/dist/components/SessionRecorderWidget/InitialPopover.d.ts +16 -0
  17. package/dist/components/SessionRecorderWidget/InitialPopover.js +1 -0
  18. package/dist/components/SessionRecorderWidget/InitialPopover.js.map +1 -0
  19. package/dist/components/SessionRecorderWidget/ModalContainer.d.ts +8 -0
  20. package/dist/components/SessionRecorderWidget/ModalContainer.js +1 -0
  21. package/dist/components/SessionRecorderWidget/ModalContainer.js.map +1 -0
  22. package/dist/components/SessionRecorderWidget/ModalHeader.d.ts +6 -0
  23. package/dist/components/SessionRecorderWidget/ModalHeader.js +1 -0
  24. package/dist/components/SessionRecorderWidget/ModalHeader.js.map +1 -0
  25. package/dist/components/SessionRecorderWidget/SessionRecorderWidget.d.ts +5 -0
  26. package/dist/components/SessionRecorderWidget/SessionRecorderWidget.js +1 -0
  27. package/dist/components/SessionRecorderWidget/SessionRecorderWidget.js.map +1 -0
  28. package/dist/components/SessionRecorderWidget/icons.d.ts +11 -0
  29. package/dist/components/SessionRecorderWidget/icons.js +1 -0
  30. package/dist/components/SessionRecorderWidget/icons.js.map +1 -0
  31. package/dist/components/SessionRecorderWidget/index.d.ts +2 -0
  32. package/dist/components/SessionRecorderWidget/index.js +1 -0
  33. package/dist/components/SessionRecorderWidget/index.js.map +1 -0
  34. package/dist/components/SessionRecorderWidget/styles.d.ts +165 -0
  35. package/dist/components/SessionRecorderWidget/styles.js +1 -0
  36. package/dist/components/SessionRecorderWidget/styles.js.map +1 -0
  37. package/dist/components/index.d.ts +2 -1
  38. package/dist/components/index.js +1 -1
  39. package/dist/components/index.js.map +1 -1
  40. package/dist/config/constants.js +1 -1
  41. package/dist/config/constants.js.map +1 -1
  42. package/dist/config/defaults.d.ts +4 -4
  43. package/dist/config/defaults.js +1 -1
  44. package/dist/config/defaults.js.map +1 -1
  45. package/dist/config/masking.d.ts +2 -2
  46. package/dist/config/masking.js +1 -1
  47. package/dist/config/masking.js.map +1 -1
  48. package/dist/config/session-recorder.js +1 -1
  49. package/dist/config/session-recorder.js.map +1 -1
  50. package/dist/config/validators.d.ts +1 -1
  51. package/dist/config/validators.js +1 -1
  52. package/dist/config/validators.js.map +1 -1
  53. package/dist/config/widget.d.ts +9 -0
  54. package/dist/config/widget.js +1 -0
  55. package/dist/config/widget.js.map +1 -0
  56. package/dist/context/SessionRecorderContext.d.ts +12 -3
  57. package/dist/context/SessionRecorderContext.js +1 -1
  58. package/dist/context/SessionRecorderContext.js.map +1 -1
  59. package/dist/context/SessionRecorderStore.d.ts +12 -0
  60. package/dist/context/SessionRecorderStore.js +1 -0
  61. package/dist/context/SessionRecorderStore.js.map +1 -0
  62. package/dist/context/useSessionRecorderStore.d.ts +8 -0
  63. package/dist/context/useSessionRecorderStore.js +1 -0
  64. package/dist/context/useSessionRecorderStore.js.map +1 -0
  65. package/dist/context/useStoreSelector.d.ts +4 -0
  66. package/dist/context/useStoreSelector.js +1 -0
  67. package/dist/context/useStoreSelector.js.map +1 -0
  68. package/dist/index.d.ts +1 -1
  69. package/dist/index.js +1 -1
  70. package/dist/index.js.map +1 -1
  71. package/dist/native/GestureRecorderNative.d.ts +57 -0
  72. package/dist/native/GestureRecorderNative.js +1 -0
  73. package/dist/native/GestureRecorderNative.js.map +1 -0
  74. package/dist/native/SessionRecorderNative.d.ts +33 -0
  75. package/dist/native/SessionRecorderNative.js +1 -0
  76. package/dist/native/SessionRecorderNative.js.map +1 -0
  77. package/dist/native/index.d.ts +2 -0
  78. package/dist/native/index.js +1 -0
  79. package/dist/native/index.js.map +1 -0
  80. package/dist/otel/index.js +1 -1
  81. package/dist/otel/index.js.map +1 -1
  82. package/dist/patch/xhr.js +1 -1
  83. package/dist/patch/xhr.js.map +1 -1
  84. package/dist/recorder/eventExporter.d.ts +4 -1
  85. package/dist/recorder/eventExporter.js +1 -1
  86. package/dist/recorder/eventExporter.js.map +1 -1
  87. package/dist/recorder/gestureRecorder.d.ts +28 -62
  88. package/dist/recorder/gestureRecorder.js +1 -1
  89. package/dist/recorder/gestureRecorder.js.map +1 -1
  90. package/dist/recorder/index.d.ts +2 -0
  91. package/dist/recorder/index.js +1 -1
  92. package/dist/recorder/index.js.map +1 -1
  93. package/dist/recorder/navigationTracker.d.ts +4 -19
  94. package/dist/recorder/navigationTracker.js +1 -1
  95. package/dist/recorder/navigationTracker.js.map +1 -1
  96. package/dist/recorder/screenRecorder.d.ts +11 -5
  97. package/dist/recorder/screenRecorder.js +1 -1
  98. package/dist/recorder/screenRecorder.js.map +1 -1
  99. package/dist/services/api.service.d.ts +12 -3
  100. package/dist/services/api.service.js +1 -1
  101. package/dist/services/api.service.js.map +1 -1
  102. package/dist/services/network.service.d.ts +46 -0
  103. package/dist/services/network.service.js +1 -0
  104. package/dist/services/network.service.js.map +1 -0
  105. package/dist/services/screenMaskingService.d.ts +47 -0
  106. package/dist/services/screenMaskingService.js +1 -0
  107. package/dist/services/screenMaskingService.js.map +1 -0
  108. package/dist/services/storage.service.d.ts +18 -2
  109. package/dist/services/storage.service.js +1 -1
  110. package/dist/services/storage.service.js.map +1 -1
  111. package/dist/session-recorder.d.ts +18 -33
  112. package/dist/session-recorder.js +1 -1
  113. package/dist/session-recorder.js.map +1 -1
  114. package/dist/types/configs.d.ts +85 -0
  115. package/dist/types/configs.js +1 -0
  116. package/dist/types/configs.js.map +1 -0
  117. package/dist/types/index.d.ts +1 -0
  118. package/dist/types/index.js +1 -1
  119. package/dist/types/index.js.map +1 -1
  120. package/dist/types/session-recorder.d.ts +105 -132
  121. package/dist/types/session-recorder.js +1 -1
  122. package/dist/types/session-recorder.js.map +1 -1
  123. package/dist/utils/constants.optional.d.ts +21 -0
  124. package/dist/utils/constants.optional.expo.d.ts +3 -0
  125. package/dist/utils/constants.optional.expo.js +1 -0
  126. package/dist/utils/constants.optional.expo.js.map +1 -0
  127. package/dist/utils/constants.optional.js +1 -0
  128. package/dist/utils/constants.optional.js.map +1 -0
  129. package/dist/utils/createStore.d.ts +8 -0
  130. package/dist/utils/createStore.js +1 -0
  131. package/dist/utils/createStore.js.map +1 -0
  132. package/dist/utils/logger.d.ts +2 -7
  133. package/dist/utils/logger.js +1 -1
  134. package/dist/utils/logger.js.map +1 -1
  135. package/dist/utils/platform.d.ts +11 -0
  136. package/dist/utils/platform.js +1 -1
  137. package/dist/utils/platform.js.map +1 -1
  138. package/dist/utils/rrweb-events.d.ts +4 -3
  139. package/dist/utils/rrweb-events.js +1 -1
  140. package/dist/utils/rrweb-events.js.map +1 -1
  141. package/dist/utils/session.d.ts +2 -1
  142. package/dist/utils/session.js +1 -1
  143. package/dist/utils/session.js.map +1 -1
  144. package/dist/utils/shallowEqual.d.ts +1 -0
  145. package/dist/utils/shallowEqual.js +1 -0
  146. package/dist/utils/shallowEqual.js.map +1 -0
  147. package/dist/version.d.ts +1 -1
  148. package/dist/version.js +1 -1
  149. package/dist/version.js.map +1 -1
  150. package/ios/GestureRecorderNative.m +21 -0
  151. package/ios/GestureRecorderNative.swift +316 -0
  152. package/ios/SessionRecorderNative.m +17 -0
  153. package/ios/SessionRecorderNative.podspec +26 -0
  154. package/ios/SessionRecorderNative.swift +599 -0
  155. package/package.json +15 -16
  156. package/react-native.config.js +12 -0
  157. package/RRWEB_INTEGRATION.md +0 -336
  158. package/VIEWSHOT_INTEGRATION_TEST.md +0 -123
  159. package/babel.config.js +0 -13
  160. package/dist/components/GestureCaptureWrapper/GestureCaptureWrapper.d.ts +0 -6
  161. package/dist/components/GestureCaptureWrapper/GestureCaptureWrapper.js +0 -1
  162. package/dist/components/GestureCaptureWrapper/GestureCaptureWrapper.js.map +0 -1
  163. package/dist/components/GestureCaptureWrapper/index.d.ts +0 -1
  164. package/dist/components/GestureCaptureWrapper/index.js +0 -1
  165. package/dist/components/GestureCaptureWrapper/index.js.map +0 -1
  166. package/dist/components/GestureCaptureWrapper.d.ts +0 -6
  167. package/dist/components/GestureCaptureWrapper.js +0 -1
  168. package/dist/components/GestureCaptureWrapper.js.map +0 -1
  169. package/dist/expo.d.ts +0 -7
  170. package/dist/expo.js +0 -1
  171. package/dist/expo.js.map +0 -1
  172. package/dist/otel/instrumentations/gestureInstrumentation.d.ts +0 -15
  173. package/dist/otel/instrumentations/gestureInstrumentation.js +0 -1
  174. package/dist/otel/instrumentations/gestureInstrumentation.js.map +0 -1
  175. package/dist/otel/instrumentations/reactNativeInstrumentation.d.ts +0 -8
  176. package/dist/otel/instrumentations/reactNativeInstrumentation.js +0 -1
  177. package/dist/otel/instrumentations/reactNativeInstrumentation.js.map +0 -1
  178. package/dist/otel/instrumentations/reactNavigationInstrumentation.d.ts +0 -13
  179. package/dist/otel/instrumentations/reactNavigationInstrumentation.js +0 -1
  180. package/dist/otel/instrumentations/reactNavigationInstrumentation.js.map +0 -1
  181. package/dist/recorder/gestureHandlerRecorder.d.ts +0 -19
  182. package/dist/recorder/gestureHandlerRecorder.js +0 -1
  183. package/dist/recorder/gestureHandlerRecorder.js.map +0 -1
  184. package/dist/types/rrweb.d.ts +0 -118
  185. package/dist/types/rrweb.js +0 -1
  186. package/dist/types/rrweb.js.map +0 -1
  187. package/scripts/generate-app-metadata.js +0 -173
  188. package/src/components/GestureCaptureWrapper/GestureCaptureWrapper.tsx +0 -86
  189. package/src/components/GestureCaptureWrapper/index.ts +0 -1
  190. package/src/components/ScreenRecorderView/ScreenRecorderView.tsx +0 -72
  191. package/src/components/ScreenRecorderView/index.ts +0 -1
  192. package/src/components/index.ts +0 -1
  193. package/src/config/constants.ts +0 -60
  194. package/src/config/defaults.ts +0 -82
  195. package/src/config/index.ts +0 -6
  196. package/src/config/masking.ts +0 -27
  197. package/src/config/session-recorder.ts +0 -55
  198. package/src/config/validators.ts +0 -31
  199. package/src/context/SessionRecorderContext.tsx +0 -75
  200. package/src/expo.ts +0 -11
  201. package/src/index.ts +0 -17
  202. package/src/otel/helpers.ts +0 -275
  203. package/src/otel/index.ts +0 -138
  204. package/src/otel/instrumentations/index.ts +0 -115
  205. package/src/patch/index.ts +0 -1
  206. package/src/patch/xhr.ts +0 -142
  207. package/src/recorder/eventExporter.ts +0 -141
  208. package/src/recorder/gestureRecorder.ts +0 -498
  209. package/src/recorder/index.ts +0 -179
  210. package/src/recorder/navigationTracker.ts +0 -449
  211. package/src/recorder/screenRecorder.ts +0 -498
  212. package/src/services/api.service.ts +0 -203
  213. package/src/services/storage.service.ts +0 -158
  214. package/src/session-recorder.ts +0 -600
  215. package/src/types/expo.d.ts +0 -23
  216. package/src/types/index.ts +0 -28
  217. package/src/types/session-recorder.ts +0 -423
  218. package/src/types/session.ts +0 -65
  219. package/src/utils/app-metadata.ts +0 -31
  220. package/src/utils/index.ts +0 -8
  221. package/src/utils/logger.ts +0 -225
  222. package/src/utils/platform.ts +0 -384
  223. package/src/utils/request-utils.ts +0 -61
  224. package/src/utils/rrweb-events.ts +0 -309
  225. package/src/utils/session.ts +0 -18
  226. package/src/utils/time.ts +0 -17
  227. package/src/utils/type-utils.ts +0 -75
  228. package/src/version.ts +0 -1
  229. package/tsconfig.json +0 -24
@@ -1,423 +0,0 @@
1
-
2
- import { SessionType } from '@multiplayer-app/session-recorder-common'
3
- import { PropagateTraceHeaderCorsUrls } from '@opentelemetry/sdk-trace-web'
4
- import { Span } from '@opentelemetry/api'
5
- import type { ISession } from './session'
6
-
7
- export enum WidgetButtonPlacement {
8
- topLeft = 'top-left',
9
- topRight = 'top-right',
10
- bottomLeft = 'bottom-left',
11
- bottomRight = 'bottom-right',
12
- }
13
-
14
- export interface SessionRecorderOptions {
15
- /**
16
- * The API key used to authenticate with the session debugger service.
17
- */
18
- apiKey: string
19
-
20
- /**
21
- * The version of the application using the session debugger.
22
- */
23
- version: string
24
-
25
- /**
26
- * The name of the application being debugged.
27
- */
28
- application: string
29
-
30
- /**
31
- * The environment where the application is running (e.g., 'production', 'staging').
32
- */
33
- environment: string
34
-
35
- /**
36
- * (Optional) OTLP collector endpoint.
37
- */
38
- exporterEndpoint?: string
39
-
40
- /**
41
- * (Optional) Base URL for the API calls.
42
- * This allows customization of the API endpoint for sending session data.
43
- */
44
- apiBaseUrl?: string
45
-
46
- /**
47
- * (Optional) An array of URLs or regular expressions that should be ignored by the session debugger.
48
- * Any URL that partially matches any regex in this array will not be traced.
49
- * Additionally, URLs that exactly match any string in the array will also be ignored.
50
- */
51
- ignoreUrls?: Array<string | RegExp>
52
-
53
- /**
54
- * (Optional) Determines where the record button should be placed on the screen.
55
- * Possible values:
56
- * - 'top-left'
57
- * - 'top-right'
58
- * - 'bottom-left'
59
- * - 'bottom-right'
60
- */
61
- widgetButtonPlacement?: WidgetButtonPlacement
62
-
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
- /**
72
- * (Optional) If false, the session recording widget will be hidden from the UI.
73
- * Use this option if you want to enable session recording without a visible UI element.
74
- * @default showWidget = true
75
- */
76
- showWidget?: boolean
77
-
78
-
79
- /**
80
- * (Optional) Trace ID Ratio for sampling
81
- * @default 0.15
82
- */
83
- sampleTraceRatio?: number
84
-
85
- /**
86
- * (Optional) URLs or regex patterns for CORS trace header propagation
87
- */
88
- propagateTraceHeaderCorsUrls?: PropagateTraceHeaderCorsUrls
89
-
90
- /**
91
- * (Optional) If true, schematizes document span payload
92
- * @default true
93
- */
94
- schemifyDocSpanPayload?: boolean
95
-
96
- /**
97
- * (Optional) Maximum size for capturing HTTP payload
98
- * @default 100000
99
- */
100
- maxCapturingHttpPayloadSize?: number
101
-
102
- /**
103
- * (Optional) If true, uses post message fallback
104
- * @default false
105
- */
106
- usePostMessageFallback?: boolean
107
-
108
-
109
- /** If true, captures body in traces
110
- * @default true
111
- */
112
- captureBody?: boolean
113
- /** If true, captures headers in traces
114
- * @default true
115
- */
116
- captureHeaders?: boolean
117
-
118
- /**
119
- * (Optional) Configuration for masking sensitive data in session recordings
120
- * @default { maskAllInputs: true, isContentMaskingEnabled: true }
121
- */
122
- masking?: MaskingConfig
123
-
124
- /**
125
- * (Optional) Configuration for customizable UI text and labels
126
- * @default See PopoverTextConfig defaults
127
- */
128
- widgetTextOverrides?: WidgetTextOverridesConfig
129
-
130
-
131
- /** Whether to record gestures */
132
- recordGestures?: boolean
133
- /** Whether to record navigation */
134
- recordNavigation?: boolean
135
- /** Whether to record screen */
136
- recordScreen?: boolean
137
- }
138
-
139
- /**
140
- * Interface for masking configuration
141
- */
142
- export interface MaskingConfig {
143
- // Span masking
144
- /** If true, enables masking for debug span payload in traces
145
- * @default true
146
- */
147
- isContentMaskingEnabled?: boolean;
148
- /** Custom function for masking body in traces */
149
- maskBody?: (payload: any, span: Span) => any;
150
- /** Custom function for masking headers in traces */
151
- maskHeaders?: (headers: any, span: any) => any;
152
-
153
-
154
- /** List of body fields to mask in traces */
155
- maskBodyFieldsList?: string[]
156
- /** List of headers to mask in traces */
157
- maskHeadersList?: string[]
158
-
159
- /** List of headers to include in traces (if specified, only these headers will be captured) */
160
- headersToInclude?: string[]
161
- /** List of headers to exclude from traces */
162
- headersToExclude?: string[]
163
- }
164
-
165
- /**
166
- * Base configuration interface with common properties
167
- */
168
- export interface BaseConfig {
169
- /** API key for authentication */
170
- apiKey: string
171
- /** Base URL for the API calls */
172
- apiBaseUrl: string
173
- /** Base URL for the API calls */
174
- exporterEndpoint: string
175
- /** Whether to use post message fallback */
176
- usePostMessageFallback?: boolean
177
- }
178
-
179
- /**
180
- * Configuration interface for the Tracer class
181
- */
182
- export type TracerReactNativeMasking = Pick<MaskingConfig, 'isContentMaskingEnabled' | 'maskBody' | 'maskHeaders' | 'maskBodyFieldsList' | 'maskHeadersList' | 'headersToInclude' | 'headersToExclude'>;
183
-
184
- export interface TracerReactNativeConfig extends BaseConfig {
185
- /** Application name */
186
- application: string
187
- /** Application version */
188
- version: string
189
- /** Environment (e.g., 'production', 'staging') */
190
- environment: string
191
- /** URLs to ignore during tracing */
192
- ignoreUrls: Array<string | RegExp>
193
- /** Trace ID ratio for sampling */
194
- sampleTraceRatio: number
195
- /** URLs for CORS trace header propagation */
196
- propagateTraceHeaderCorsUrls: PropagateTraceHeaderCorsUrls
197
- /** Whether to schematize document span payload */
198
- schemifyDocSpanPayload: boolean
199
- /** Maximum size for capturing HTTP payload */
200
- maxCapturingHttpPayloadSize: number
201
- /** If true, captures body in traces
202
- * @default true
203
- */
204
- captureBody: boolean
205
- /** If true, captures headers in traces
206
- * @default true
207
- */
208
- captureHeaders: boolean
209
- /** Configuration for masking sensitive data in session recordings */
210
- masking: TracerReactNativeMasking
211
- }
212
-
213
- /**
214
- * Configuration interface for the Recorder class
215
- */
216
- // export type RecorderMasking = Pick<MaskingConfig, 'maskAllInputs' | 'maskTextClass' | 'maskTextSelector' | 'maskInputOptions' | 'maskInput' | 'maskText' | 'maskConsoleEvent'>;
217
-
218
- export interface RecorderConfig extends BaseConfig {
219
- /** Whether to record gestures */
220
- recordGestures?: boolean
221
- /** Whether to record navigation */
222
- recordNavigation?: boolean
223
- /** Whether to record screen */
224
- recordScreen?: boolean
225
- }
226
-
227
- /**
228
- * Configuration interface for the SessionWidget class
229
- */
230
- export interface SessionWidgetConfig {
231
- /** Whether to show the widget */
232
- showWidget: boolean
233
- /** Placement of the widget button */
234
- widgetButtonPlacement: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'
235
- /** Whether continuous recording feature is enabled */
236
- showContinuousRecording: boolean
237
- /** Configuration for customizable UI text and labels */
238
- widgetTextOverrides: WidgetTextOverridesConfig
239
- }
240
-
241
- /**
242
- * Interface for customizable widget text configuration
243
- */
244
- export interface WidgetTextOverridesConfig {
245
- /** Title for the initial popover when continuous recording is enabled */
246
- initialTitleWithContinuous?: string
247
- /** Title for the initial popover when continuous recording is disabled */
248
- initialTitleWithoutContinuous?: string
249
- /** Description for the initial popover when continuous recording is enabled */
250
- initialDescriptionWithContinuous?: string
251
- /** Description for the initial popover when continuous recording is disabled */
252
- initialDescriptionWithoutContinuous?: string
253
- /** Label for the continuous recording toggle */
254
- continuousRecordingLabel?: string
255
- /** Text for the start recording button */
256
- startRecordingButtonText?: string
257
- /** Title for the final popover */
258
- finalTitle?: string
259
- /** Description for the final popover */
260
- finalDescription?: string
261
- /** Placeholder text for the comment textarea */
262
- commentPlaceholder?: string
263
- /** Text for the save button in final popover */
264
- saveButtonText?: string
265
- /** Text for the cancel button in final popover */
266
- cancelButtonText?: string
267
- /** Title for the continuous recording overlay */
268
- continuousOverlayTitle?: string
269
- /** Description for the continuous recording overlay */
270
- continuousOverlayDescription?: string
271
- /** Text for the save last snapshot button */
272
- saveLastSnapshotButtonText?: string
273
- /** Title for the submit session dialog */
274
- submitDialogTitle?: string
275
- /** Subtitle for the submit session dialog */
276
- submitDialogSubtitle?: string
277
- /** Label for the comment field in submit dialog */
278
- submitDialogCommentLabel?: string
279
- /** Placeholder for the comment field in submit dialog */
280
- submitDialogCommentPlaceholder?: string
281
- /** Text for the submit button in dialog */
282
- submitDialogSubmitText?: string
283
- /** Text for the cancel button in dialog */
284
- submitDialogCancelText?: string
285
- }
286
-
287
- /**
288
- * Configuration interface for the ApiService class
289
- */
290
- export interface ApiServiceConfig extends BaseConfig { }
291
-
292
- export interface SessionRecorderConfigs extends Required<SessionRecorderOptions> { }
293
-
294
- export enum SessionState {
295
- started = '2',
296
- paused = '1',
297
- stopped = '0',
298
- }
299
-
300
- export interface ISessionRecorder {
301
- /**
302
- * The current session ID
303
- */
304
- readonly sessionId: string | null
305
-
306
- /**
307
- * Whether continuous recording is enabled
308
- */
309
- readonly continuousRecording: boolean
310
-
311
- /**
312
- * The current debug session object
313
- */
314
- readonly session: ISession | null
315
-
316
- /**
317
- * The type of session (plain or continuous)
318
- */
319
- readonly sessionType: SessionType
320
-
321
- /**
322
- * The current state of the session
323
- */
324
- readonly sessionState: SessionState | null
325
-
326
-
327
- /**
328
- * Session attributes for additional context
329
- */
330
- readonly sessionAttributes: Record<string, any>
331
-
332
- /**
333
- * Current error message
334
- */
335
- error: string
336
-
337
- /**
338
- * The HTML button element for the session widget's recorder button
339
- */
340
- readonly sessionWidgetButtonElement: HTMLButtonElement
341
-
342
- /**
343
- * Initialize the session debugger with custom configurations
344
- * @param configs - custom configurations for session debugger
345
- */
346
- init(configs: SessionRecorderOptions): void
347
-
348
- /**
349
- * Save the continuous recording session
350
- * @returns Promise that resolves to the save response
351
- */
352
- save(): Promise<any>
353
-
354
- /**
355
- * Start a new session
356
- * @param type - the type of session to start
357
- * @param session - optional existing session to start
358
- */
359
- start(type?: SessionType, session?: ISession): void
360
-
361
- /**
362
- * Stop the current session with an optional comment
363
- * @param comment - user-provided comment to include in session feedback metadata
364
- */
365
- stop(comment?: string): Promise<void>
366
-
367
- /**
368
- * Cancel the current session
369
- */
370
- cancel(): Promise<void>
371
-
372
- /**
373
- * Pause the current session
374
- */
375
- pause(): Promise<void>
376
-
377
- /**
378
- * Resume the current session
379
- */
380
- resume(): Promise<void>
381
-
382
- /**
383
- * Set the session metadata
384
- * @param attributes - the attributes to set
385
- */
386
- setSessionAttributes(attributes: Record<string, any>): void
387
-
388
- /**
389
- * Set a custom click handler for the recording button
390
- * @param handler - function that will be invoked when the button is clicked
391
- */
392
- set recordingButtonClickHandler(handler: () => boolean | void)
393
- }
394
-
395
- export type Breaker = {}
396
-
397
- export interface ScreenEvent {
398
- screenName: string
399
- timestamp: number
400
- params?: Record<string, any>
401
- type?: string
402
- metadata?: Record<string, any>
403
- dataUrl?: string
404
- }
405
-
406
- export interface GestureEvent {
407
- type: string
408
- timestamp: number
409
- x?: number
410
- y?: number
411
- direction?: string
412
- target?: string
413
- coordinates?: { x: number; y: number }
414
- metadata?: Record<string, any>
415
- }
416
-
417
- export interface NavigationEvent {
418
- type: string
419
- timestamp: number
420
- routeName?: string
421
- params?: Record<string, any>
422
- metadata?: Record<string, any>
423
- }
@@ -1,65 +0,0 @@
1
- import { SessionType } from '@multiplayer-app/session-recorder-common'
2
-
3
- export interface IResourceAttributes {
4
- browserInfo?: string,
5
- cookiesEnabled?: string,
6
- deviceInfo?: string,
7
- hardwareConcurrency?: number,
8
- osInfo?: string,
9
- pixelRatio?: number,
10
- screenSize?: string,
11
- packageVersion?: string,
12
- [key: string]: any
13
- }
14
-
15
- export interface ISessionAttributes {
16
- userEmail?: string
17
- userId?: string,
18
- userName?: string,
19
- accountId?: string,
20
- accountName?: string,
21
- [key: string]: any
22
- }
23
-
24
- export interface ISessionView {
25
- _id: string
26
- name: string
27
- components?: string[]
28
- }
29
-
30
- export interface ISession {
31
- _id: string
32
- shortId: string
33
- workspace: string
34
- project: string
35
- continuousDebugSession?: string
36
- creationType: SessionType
37
- name: string
38
- startedAt: string | Date
39
- stoppedAt: string | Date
40
- durationInSeconds?: number
41
- createdAt: string | Date
42
- updatedAt: string | Date
43
- tags: any[]
44
-
45
- resourceAttributes?: IResourceAttributes
46
- sessionAttributes?: ISessionAttributes
47
- views: ISessionView[]
48
- starred: boolean
49
- starredItems: string[]
50
- s3Files: {
51
- _id?: string
52
- bucket: string
53
- key: string
54
- dataType: DebugSessionDataType
55
- url?: string
56
- }[]
57
- finishedS3Transfer?: boolean
58
- tempApiKey?: string
59
- }
60
-
61
- export enum DebugSessionDataType {
62
- OTLP_TRACES = 'OTLP_TRACES',
63
- OTLP_LOGS = 'OTLP_LOGS',
64
- RRWEB_EVENTS = 'RRWEB_EVENTS',
65
- }
@@ -1,31 +0,0 @@
1
- /**
2
- * Auto-generated app metadata
3
- * This file is generated at build time to provide app metadata without developer intervention
4
- */
5
-
6
- // This file is automatically generated by the build process
7
- // It extracts metadata from app.json, app.config.js, or package.json
8
-
9
- export interface AppMetadata {
10
- name?: string
11
- version?: string
12
- bundleId?: string
13
- buildNumber?: string
14
- displayName?: string
15
- }
16
-
17
- // Auto-detected values from project configuration files
18
- export const APP_METADATA: AppMetadata = {
19
- name: "@multiplayer-app/session-recorder-react-native",
20
- version: "0.0.1",
21
- bundleId: undefined,
22
- buildNumber: undefined,
23
- displayName: undefined,
24
- }
25
-
26
- /**
27
- * Get auto-detected app metadata
28
- */
29
- export function getAutoDetectedAppMetadata(): AppMetadata {
30
- return { ...APP_METADATA }
31
- }
@@ -1,8 +0,0 @@
1
- // Export all utility functions
2
- export * from './platform'
3
- export * from './session'
4
- export * from './time'
5
- export * from './type-utils'
6
- export * from './request-utils'
7
- export * from './rrweb-events'
8
- export * from './logger'