Skip to content

Commit 732589e

Browse files
committed
Reset
1 parent 8ffde2a commit 732589e

File tree

7 files changed

+29
-15
lines changed

7 files changed

+29
-15
lines changed

packages/replay/src/index.ts

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,28 @@
11
export { Replay } from './integration';
22
export type {
3+
// From ./types/replayFrame
34
BreadcrumbFrame,
45
BreadcrumbFrameEvent,
6+
OptionFrameEvent,
57
ReplayFrame,
68
ReplayFrameEvent,
79
SpanFrame,
810
SpanFrameEvent,
9-
} from './types/replayFrame';
11+
12+
// From ./types/performance
13+
AllEntryData,
14+
AllPerformanceEntryData,
15+
ExperimentalPerformanceResourceTiming,
16+
HistoryData,
17+
LargestContentfulPaintData,
18+
MemoryData,
19+
NavigationData,
20+
NetworkRequestData,
21+
PaintData,
22+
PerformanceNavigationTiming,
23+
PerformancePaintTiming,
24+
ResourceData,
25+
26+
// From rrweb
27+
EventType,
28+
} from './types';

packages/replay/src/types/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ export * from './performance';
22
export * from './replay';
33
export * from './replayFrame';
44
export * from './rrweb';
5+
export type { EventType } from '@sentry-internal/rrweb';

packages/replay/src/types/performance.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import type { ReplayNetworkRequestData } from './replay';
2+
13
export type AllPerformanceEntry = PerformancePaintTiming | PerformanceResourceTiming | PerformanceNavigationTiming;
24

35
// PerformancePaintTiming and PerformanceNavigationTiming are only available with TS 4.4 and newer
@@ -109,7 +111,7 @@ export interface LargestContentfulPaintData {
109111
/**
110112
* Entries that come from window.performance
111113
*/
112-
export type AllPerformanceEntryData = PaintData | NavigationData | ResourceData | LargestContentfulPaintData;
114+
export type AllPerformanceEntryData = PaintData | NavigationData | ReplayNetworkRequestData | ResourceData | LargestContentfulPaintData;
113115

114116
export interface MemoryData {
115117
memory: {

packages/replay/src/types/replayFrame.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
import type { EventType } from '@sentry-internal/rrweb';
12
import type { Breadcrumb, FetchBreadcrumbData, XhrBreadcrumbData } from '@sentry/types';
23

34
import type { AllEntryData } from './performance';
4-
import type { EventType } from './rrweb';
55

66
interface BaseReplayFrame {
77
timestamp: number;

packages/replay/src/types/rrweb.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
11
/* eslint-disable @typescript-eslint/naming-convention */
22

3+
import type { EventType } from '@sentry-internal/rrweb';
4+
35
type blockClass = string | RegExp;
46
type maskTextClass = string | RegExp;
57

6-
export enum EventType {
7-
DomContentLoaded = 0,
8-
Load = 1,
9-
FullSnapshot = 2,
10-
IncrementalSnapshot = 3,
11-
Meta = 4,
12-
Custom = 5,
13-
Plugin = 6,
14-
}
15-
168
/**
179
* This is a partial copy of rrweb's eventWithTime type which only contains the properties
1810
* we specifcally need in the SDK.

packages/replay/src/util/addEvent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
import { EventType } from '@sentry-internal/rrweb';
12
import { getCurrentHub } from '@sentry/core';
23
import { logger } from '@sentry/utils';
34

45
import type { AddEventResult, RecordingEvent, ReplayContainer, ReplayFrameEvent } from '../types';
5-
import { EventType } from '../types/rrweb';
66
import { timestampToMs } from './timestampToMs';
77

88
function isCustomEvent(event: RecordingEvent): event is ReplayFrameEvent {

packages/replay/src/util/handleRecordingEmit.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
import { EventType } from '@sentry-internal/rrweb';
12
import { logger } from '@sentry/utils';
23

34
import { saveSession } from '../session/saveSession';
45
import type { AddEventResult, OptionFrameEvent, RecordingEvent, ReplayContainer } from '../types';
5-
import { EventType } from '../types/rrweb';
66
import { addEvent } from './addEvent';
77

88
type RecordingEmitCallback = (event: RecordingEvent, isCheckout?: boolean) => void;

0 commit comments

Comments
 (0)