@@ -182,20 +182,6 @@ export interface WorkerResponse {
182182
183183export type AddEventResult = void ;
184184
185- interface SessionAndPluginOptions {
186- /**
187- * The sample rate for session-long replays. 1.0 will record all sessions and
188- * 0 will record none.
189- */
190- sessionSampleRate : number ;
191-
192- /**
193- * The sample rate for sessions that has had an error occur. This is
194- * independent of `sessionSampleRate`.
195- */
196- errorSampleRate : number ;
197- }
198-
199185export interface ReplayNetworkOptions {
200186 /**
201187 * Capture request/response details for XHR/Fetch requests that match the given URLs.
@@ -229,35 +215,24 @@ export interface ReplayNetworkOptions {
229215 networkResponseHeaders : string [ ] ;
230216}
231217
232- /**
233- * Session options that are configurable by the integration configuration
234- */
235- export interface SessionOptions extends SampleRates {
218+ export interface ReplayPluginOptions extends ReplayNetworkOptions {
236219 /**
237- * If false, will create a new session per pageload. Otherwise, saves session
238- * to Session Storage .
220+ * The sample rate for session-long replays. 1.0 will record all sessions and
221+ * 0 will record none .
239222 */
240- stickySession : boolean ;
241- }
223+ sessionSampleRate : number ;
242224
243- /**
244- * Session options that are configurable by the integration configuration
245- */
246- export interface SessionOptions extends SessionAndPluginOptions {
247225 /**
248- * Should buffer recordings to be saved later either by error sampling, or by
249- * manually calling `flush()`. This is only a factor if not sampled for a
250- * session-based replay.
226+ * The sample rate for sessions that has had an error occur. This is
227+ * independent of `sessionSampleRate`.
251228 */
252- allowBuffering : boolean ;
253- }
229+ errorSampleRate : number ;
254230
255- export interface ReplayPluginOptions extends SessionAndPluginOptions , ReplayNetworkOptions {
256231 /**
257- * The sample rate for each error event. This is only a factor if not sampled
258- * for a session-based replay .
232+ * If false, will create a new session per pageload. Otherwise, saves session
233+ * to Session Storage .
259234 */
260- errorSampleRate : number ;
235+ stickySession : boolean ;
261236
262237 /**
263238 * The amount of time to wait before sending a replay
@@ -296,6 +271,19 @@ export interface ReplayPluginOptions extends SessionAndPluginOptions, ReplayNetw
296271 } > ;
297272}
298273
274+ /**
275+ * Session options that are configurable by the integration configuration
276+ */
277+ export interface SessionOptions extends Pick < ReplayPluginOptions , 'sessionSampleRate' | 'stickySession' > {
278+ /**
279+ * Should buffer recordings to be saved later either by error sampling, or by
280+ * manually calling `flush()`. This is only a factor if not sampled for a
281+ * session-based replay.
282+ */
283+ allowBuffering : boolean ;
284+ }
285+
286+
299287export interface ReplayIntegrationPrivacyOptions {
300288 /**
301289 * Mask text content for elements that match the CSS selectors in the list.
0 commit comments