Skip to content

Commit 196619b

Browse files
committed
ref: Move ReplayRecordingMode to @sentry/types
1 parent 5616b9b commit 196619b

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

packages/replay/src/replay.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* eslint-disable max-lines */ // TODO: We might want to split this file up
22
import { addGlobalEventProcessor, captureException, getCurrentHub, setContext } from '@sentry/core';
3-
import { Breadcrumb, ReplayEvent, TransportMakeRequestResponse } from '@sentry/types';
3+
import type { Breadcrumb, ReplayEvent, ReplayRecordingMode, TransportMakeRequestResponse } from '@sentry/types';
44
import { addInstrumentationHandler, logger } from '@sentry/utils';
55
import { EventType, record } from 'rrweb';
66

@@ -34,7 +34,6 @@ import type {
3434
RecordingOptions,
3535
ReplayContainer as ReplayContainerInterface,
3636
ReplayPluginOptions,
37-
ReplayRecordingMode,
3837
SendReplay,
3938
Session,
4039
} from './types';

packages/replay/src/types.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ReplayRecordingData } from '@sentry/types';
1+
import type { ReplayRecordingData, ReplayRecordingMode } from '@sentry/types';
22

33
import type { eventWithTime, recordOptions } from './types/rrweb';
44

@@ -9,8 +9,6 @@ export type RecordedEvents = Uint8Array | string;
99

1010
export type AllPerformanceEntry = PerformancePaintTiming | PerformanceResourceTiming | PerformanceNavigationTiming;
1111

12-
export type ReplayRecordingMode = 'session' | 'error';
13-
1412
export interface SendReplay {
1513
events: RecordedEvents;
1614
replayId: string;

packages/types/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export type { ExtractedNodeRequestData, HttpHeaderValue, Primitive, WorkerLocati
4040
export type { ClientOptions, Options } from './options';
4141
export type { Package } from './package';
4242
export type { PolymorphicEvent, PolymorphicRequest } from './polymorphics';
43-
export type { ReplayEvent, ReplayRecordingData } from './replay';
43+
export type { ReplayEvent, ReplayRecordingData, ReplayRecordingMode } from './replay';
4444
export type { QueryParams, Request } from './request';
4545
export type { Runtime } from './runtime';
4646
export type { CaptureContext, Scope, ScopeContext } from './scope';

packages/types/src/replay.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,17 @@ export interface ReplayEvent extends Event {
1010
trace_ids: string[];
1111
replay_id: string;
1212
segment_id: number;
13-
replay_type: 'session' | 'error';
13+
replay_type: ReplayRecordingMode;
1414
}
1515

1616
/**
1717
* NOTE: These types are still considered Beta and subject to change.
1818
* @hidden
1919
*/
2020
export type ReplayRecordingData = string | Uint8Array;
21+
22+
/**
23+
* NOTE: These types are still considered Beta and subject to change.
24+
* @hidden
25+
*/
26+
export type ReplayRecordingMode = 'session' | 'error';

0 commit comments

Comments
 (0)