@sentry/replay 0.5.2 → 0.5.5

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.
@@ -97,6 +97,12 @@ export declare class SentryReplay implements Integration {
97
97
  loadSession({ expiry }: {
98
98
  expiry: number;
99
99
  }): void;
100
+ /**
101
+ * Capture some initial state that can change throughout the lifespan of the
102
+ * replay. This is required because otherwise they would be captured at the
103
+ * first flush.
104
+ */
105
+ setInitialState(): void;
100
106
  /**
101
107
  * Adds listeners to record events for the replay
102
108
  */
@@ -166,6 +172,10 @@ export declare class SentryReplay implements Integration {
166
172
  * create a new Replay event.
167
173
  */
168
174
  triggerFullSnapshot(): void;
175
+ /**
176
+ * Add an event to the event buffer
177
+ */
178
+ addEvent(event: RecordingEvent, isCheckout?: boolean): void;
169
179
  /**
170
180
  * Updates the session's last activity timestamp
171
181
  */
@@ -201,8 +211,8 @@ export declare class SentryReplay implements Integration {
201
211
  /**
202
212
  * Return and clear context
203
213
  */
204
- popEventContext({ timestamp, }: {
205
- timestamp: number;
214
+ popEventContext({ timestamp, }?: {
215
+ timestamp?: number;
206
216
  }): CaptureReplayParams & CaptureReplayUpdateParams;
207
217
  /**
208
218
  * Flushes replay event buffer to Sentry.
@@ -212,7 +222,7 @@ export declare class SentryReplay implements Integration {
212
222
  */
213
223
  flushUpdate(lastActivity?: number): Promise<void>;
214
224
  /**
215
- * Send replay attachment using either `sendBeacon()` or `fetch()`
225
+ * Send replay attachment using `fetch()`
216
226
  */
217
227
  sendReplayRequest({ endpoint, events }: ReplayRequest): Promise<void>;
218
228
  resetRetries(): void;
@@ -88,4 +88,8 @@ export interface ReplayEventContext {
88
88
  * Ordered list of URLs that have been visited during a replay segment
89
89
  */
90
90
  urls: string[];
91
+ /**
92
+ * The timestamp of the earliest event that has been added to event buffer. This can happen due to the Performance Observer which buffers events.
93
+ */
94
+ earliestEvent: number | null;
91
95
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/replay",
3
- "version": "0.5.2",
3
+ "version": "0.5.5",
4
4
  "description": "User replays for Sentry",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es.js",
@@ -1,4 +0,0 @@
1
- /**
2
- * Determine if there is browser support for `navigator.sendBeacon`
3
- */
4
- export declare function supportsSendBeacon(): boolean;