@leanbase.com/js 0.2.1 → 0.2.2-alpha.0

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 (71) hide show
  1. package/dist/extensions/replay/external/config.d.ts +9 -0
  2. package/dist/extensions/replay/external/denylist.d.ts +5 -0
  3. package/dist/extensions/replay/external/lazy-loaded-session-recorder.d.ts +153 -0
  4. package/dist/extensions/replay/external/mutation-throttler.d.ts +20 -0
  5. package/dist/extensions/replay/external/network-plugin.d.ts +15 -0
  6. package/dist/extensions/replay/external/sessionrecording-utils.d.ts +19 -0
  7. package/dist/extensions/replay/external/triggerMatching.d.ts +102 -0
  8. package/dist/extensions/replay/rrweb-plugins/patch.d.ts +3 -0
  9. package/dist/extensions/replay/session-recording.d.ts +75 -0
  10. package/dist/extensions/replay/types/rrweb-types.d.ts +439 -0
  11. package/dist/extensions/replay/types/rrweb.d.ts +82 -0
  12. package/dist/extensions/sampling.d.ts +4 -0
  13. package/dist/leanbase.d.ts +3 -0
  14. package/dist/leanbase.iife.js +1 -1
  15. package/dist/leanbase.iife.js.map +1 -1
  16. package/dist/main.js +1 -1
  17. package/dist/main.js.map +1 -1
  18. package/dist/module.d.ts +708 -0
  19. package/dist/module.js +1 -1
  20. package/dist/module.js.map +1 -1
  21. package/dist/types.d.ts +135 -0
  22. package/dist/utils/logger.d.ts +10 -0
  23. package/dist/version.d.ts +1 -1
  24. package/lib/extensions/replay/external/config.d.ts +9 -0
  25. package/lib/extensions/replay/external/config.js +221 -0
  26. package/lib/extensions/replay/external/config.js.map +1 -0
  27. package/lib/extensions/replay/external/denylist.d.ts +5 -0
  28. package/lib/extensions/replay/external/denylist.js +28 -0
  29. package/lib/extensions/replay/external/denylist.js.map +1 -0
  30. package/lib/extensions/replay/external/lazy-loaded-session-recorder.d.ts +153 -0
  31. package/lib/extensions/replay/external/lazy-loaded-session-recorder.js +1042 -0
  32. package/lib/extensions/replay/external/lazy-loaded-session-recorder.js.map +1 -0
  33. package/lib/extensions/replay/external/mutation-throttler.d.ts +20 -0
  34. package/lib/extensions/replay/external/mutation-throttler.js +77 -0
  35. package/lib/extensions/replay/external/mutation-throttler.js.map +1 -0
  36. package/lib/extensions/replay/external/network-plugin.d.ts +15 -0
  37. package/lib/extensions/replay/external/network-plugin.js +503 -0
  38. package/lib/extensions/replay/external/network-plugin.js.map +1 -0
  39. package/lib/extensions/replay/external/sessionrecording-utils.d.ts +19 -0
  40. package/lib/extensions/replay/external/sessionrecording-utils.js +125 -0
  41. package/lib/extensions/replay/external/sessionrecording-utils.js.map +1 -0
  42. package/lib/extensions/replay/external/triggerMatching.d.ts +102 -0
  43. package/lib/extensions/replay/external/triggerMatching.js +342 -0
  44. package/lib/extensions/replay/external/triggerMatching.js.map +1 -0
  45. package/lib/extensions/replay/rrweb-plugins/patch.d.ts +3 -0
  46. package/lib/extensions/replay/rrweb-plugins/patch.js +32 -0
  47. package/lib/extensions/replay/rrweb-plugins/patch.js.map +1 -0
  48. package/lib/extensions/replay/session-recording.d.ts +75 -0
  49. package/lib/extensions/replay/session-recording.js +279 -0
  50. package/lib/extensions/replay/session-recording.js.map +1 -0
  51. package/lib/extensions/replay/types/rrweb-types.d.ts +439 -0
  52. package/lib/extensions/replay/types/rrweb-types.js +83 -0
  53. package/lib/extensions/replay/types/rrweb-types.js.map +1 -0
  54. package/lib/extensions/replay/types/rrweb.d.ts +82 -0
  55. package/lib/extensions/replay/types/rrweb.js +9 -0
  56. package/lib/extensions/replay/types/rrweb.js.map +1 -0
  57. package/lib/extensions/sampling.d.ts +4 -0
  58. package/lib/extensions/sampling.js +23 -0
  59. package/lib/extensions/sampling.js.map +1 -0
  60. package/lib/leanbase.d.ts +3 -0
  61. package/lib/leanbase.js +25 -0
  62. package/lib/leanbase.js.map +1 -1
  63. package/lib/types.d.ts +135 -0
  64. package/lib/types.js.map +1 -1
  65. package/lib/utils/logger.d.ts +10 -0
  66. package/lib/utils/logger.js +15 -0
  67. package/lib/utils/logger.js.map +1 -0
  68. package/lib/version.d.ts +1 -1
  69. package/lib/version.js +1 -1
  70. package/lib/version.js.map +1 -1
  71. package/package.json +5 -21
@@ -0,0 +1,9 @@
1
+ import { LeanbaseConfig, NetworkRecordOptions } from '../../../types';
2
+ export declare const defaultNetworkOptions: Required<NetworkRecordOptions>;
3
+ /**
4
+ * whether a maskRequestFn is provided or not,
5
+ * we ensure that we remove the denied header from requests
6
+ * we _never_ want to record that header by accident
7
+ * if someone complains then we'll add an opt-in to let them override it
8
+ */
9
+ export declare const buildNetworkRequestOptions: (instanceConfig: LeanbaseConfig, remoteNetworkOptions?: Pick<NetworkRecordOptions, "recordHeaders" | "recordBody" | "recordPerformance" | "payloadHostDenyList">) => NetworkRecordOptions;
@@ -0,0 +1,5 @@
1
+ import { NetworkRecordOptions } from '../../../types';
2
+ export declare function isHostOnDenyList(url: string | URL | Request, options: NetworkRecordOptions): {
3
+ hostname: string | null;
4
+ isHostDenied: boolean;
5
+ };
@@ -0,0 +1,153 @@
1
+ import { EventType, eventWithTime, IncrementalSource } from '../types/rrweb-types';
2
+ import { SessionRecordingStatus, TriggerType } from './triggerMatching';
3
+ import { Leanbase } from '../../../leanbase';
4
+ import { Properties, SessionRecordingPersistedConfig, SessionStartReason } from '../../../types';
5
+ export declare const RECORDING_IDLE_THRESHOLD_MS: number;
6
+ export declare const RECORDING_MAX_EVENT_SIZE: number;
7
+ export declare const RECORDING_BUFFER_TIMEOUT = 2000;
8
+ export declare const SESSION_RECORDING_BATCH_KEY = "recordings";
9
+ export interface SnapshotBuffer {
10
+ size: number;
11
+ data: any[];
12
+ sessionId: string;
13
+ windowId: string;
14
+ }
15
+ export type compressedFullSnapshotEvent = {
16
+ type: EventType.FullSnapshot;
17
+ data: string;
18
+ };
19
+ export type compressedIncrementalSnapshotEvent = {
20
+ type: EventType.IncrementalSnapshot;
21
+ data: {
22
+ source: IncrementalSource;
23
+ texts: string;
24
+ attributes: string;
25
+ removes: string;
26
+ adds: string;
27
+ };
28
+ };
29
+ export type compressedIncrementalStyleSnapshotEvent = {
30
+ type: EventType.IncrementalSnapshot;
31
+ data: {
32
+ source: IncrementalSource.StyleSheetRule;
33
+ id?: number;
34
+ styleId?: number;
35
+ replace?: string;
36
+ replaceSync?: string;
37
+ adds?: string;
38
+ removes?: string;
39
+ };
40
+ };
41
+ export type compressedEvent = compressedIncrementalStyleSnapshotEvent | compressedFullSnapshotEvent | compressedIncrementalSnapshotEvent;
42
+ export type compressedEventWithTime = compressedEvent & {
43
+ timestamp: number;
44
+ delay?: number;
45
+ cv: '2024-10';
46
+ };
47
+ export declare const SEVEN_MEGABYTES: number;
48
+ export declare function splitBuffer(buffer: SnapshotBuffer, sizeLimit?: number): SnapshotBuffer[];
49
+ export declare class LazyLoadedSessionRecording {
50
+ private readonly _instance;
51
+ private _endpoint;
52
+ private _mutationThrottler?;
53
+ /**
54
+ * Util to help developers working on this feature manually override
55
+ */
56
+ private _forceAllowLocalhostNetworkCapture;
57
+ private _stopRrweb;
58
+ private _lastActivityTimestamp;
59
+ /**
60
+ * if pageview capture is disabled,
61
+ * then we can manually track href changes
62
+ */
63
+ private _lastHref?;
64
+ /**
65
+ * and a queue - that contains rrweb events that we want to send to rrweb, but rrweb wasn't able to accept them yet
66
+ */
67
+ private _queuedRRWebEvents;
68
+ private _isIdle;
69
+ private _warnedMissingConsolePlugin;
70
+ private _linkedFlagMatching;
71
+ private _urlTriggerMatching;
72
+ private _eventTriggerMatching;
73
+ private _triggerMatching;
74
+ private _fullSnapshotTimer?;
75
+ private _windowId;
76
+ private _sessionId;
77
+ get sessionId(): string;
78
+ private _flushBufferTimer?;
79
+ private _buffer;
80
+ private _removePageViewCaptureHook;
81
+ private _removeEventTriggerCaptureHook;
82
+ private get _sessionManager();
83
+ private get _sessionIdleThresholdMilliseconds();
84
+ private get _isSampled();
85
+ private get _sampleRate();
86
+ private get _minimumDuration();
87
+ private _statusMatcher;
88
+ private _onSessionIdListener;
89
+ private _onSessionIdleResetForcedListener;
90
+ private _samplingSessionListener;
91
+ private _forceIdleSessionIdListener;
92
+ constructor(_instance: Leanbase);
93
+ private get _masking();
94
+ private get _canvasRecording();
95
+ private get _isConsoleLogCaptureEnabled();
96
+ private get _networkPayloadCapture();
97
+ private _gatherRRWebPlugins;
98
+ private _maskUrl;
99
+ private _tryRRWebMethod;
100
+ private _tryAddCustomEvent;
101
+ private _pageViewFallBack;
102
+ private _processQueuedEvents;
103
+ private _tryTakeFullSnapshot;
104
+ private get _fullSnapshotIntervalMillis();
105
+ private _scheduleFullSnapshot;
106
+ private _pauseRecording;
107
+ private _resumeRecording;
108
+ private _activateTrigger;
109
+ get isStarted(): boolean;
110
+ get _remoteConfig(): SessionRecordingPersistedConfig | undefined;
111
+ start(startReason?: SessionStartReason): void;
112
+ private _onSessionIdCallback;
113
+ stop(): void;
114
+ onRRwebEmit(rawEvent: eventWithTime): void;
115
+ get status(): SessionRecordingStatus;
116
+ log(message: string, level?: 'log' | 'warn' | 'error'): void;
117
+ overrideLinkedFlag(): void;
118
+ /**
119
+ * this ignores the sampling config and (if other conditions are met) causes capture to start
120
+ *
121
+ * It is not usual to call this directly,
122
+ * instead call `posthog.startSessionRecording({sampling: true})`
123
+ * */
124
+ overrideSampling(): void;
125
+ /**
126
+ * this ignores the URL/Event trigger config and (if other conditions are met) causes capture to start
127
+ *
128
+ * It is not usual to call this directly,
129
+ * instead call `posthog.startSessionRecording({trigger: 'url' | 'event'})`
130
+ * */
131
+ overrideTrigger(triggerType: TriggerType): void;
132
+ private _clearFlushBufferTimer;
133
+ private _flushBuffer;
134
+ private _captureSnapshotBuffered;
135
+ private _captureSnapshot;
136
+ private _snapshotUrl;
137
+ private get _sessionDuration();
138
+ private _clearBufferBeforeMostRecentMeta;
139
+ private _clearBuffer;
140
+ private _onBeforeUnload;
141
+ private _onOffline;
142
+ private _onOnline;
143
+ private _onVisibilityChange;
144
+ private _reportStarted;
145
+ private _isInteractiveEvent;
146
+ private _updateWindowAndSessionIds;
147
+ private _clearConditionalRecordingPersistence;
148
+ private _makeSamplingDecision;
149
+ private _addEventTriggerListener;
150
+ get sdkDebugProperties(): Properties;
151
+ private _startRecorder;
152
+ tryAddCustomEvent(tag: string, payload: any): boolean;
153
+ }
@@ -0,0 +1,20 @@
1
+ import type { eventWithTime } from '../types/rrweb-types';
2
+ import type { rrwebRecord } from '../types/rrweb';
3
+ export declare class MutationThrottler {
4
+ private readonly _rrweb;
5
+ private readonly _options;
6
+ private _loggedTracker;
7
+ private _rateLimiter;
8
+ constructor(_rrweb: rrwebRecord, _options?: {
9
+ bucketSize?: number;
10
+ refillRate?: number;
11
+ onBlockedNode?: (id: number, node: Node | null) => void;
12
+ });
13
+ private _onNodeRateLimited;
14
+ private _getNodeOrRelevantParent;
15
+ private _getNode;
16
+ private _numberOfChanges;
17
+ throttleMutations: (event: eventWithTime) => eventWithTime | undefined;
18
+ reset(): void;
19
+ stop(): void;
20
+ }
@@ -0,0 +1,15 @@
1
+ import type { RecordPlugin } from '../types/rrweb-types';
2
+ import { CapturedNetworkRequest, Headers, NetworkRecordOptions } from '../../../types';
3
+ export type NetworkData = {
4
+ requests: CapturedNetworkRequest[];
5
+ isInitial?: boolean;
6
+ };
7
+ export declare function findLast<T>(array: Array<T>, predicate: (value: T) => boolean): T | undefined;
8
+ export declare function shouldRecordBody({ type, recordBody, headers, url, }: {
9
+ type: 'request' | 'response';
10
+ headers: Headers;
11
+ url: string | URL | RequestInfo;
12
+ recordBody: NetworkRecordOptions['recordBody'];
13
+ }): boolean;
14
+ export declare const NETWORK_PLUGIN_NAME = "rrweb/network@1";
15
+ export declare const getRecordNetworkPlugin: (options?: NetworkRecordOptions) => RecordPlugin;
@@ -0,0 +1,19 @@
1
+ import type { eventWithTime } from '../types/rrweb-types';
2
+ import { SnapshotBuffer } from './lazy-loaded-session-recorder';
3
+ export declare function circularReferenceReplacer(): (this: any, _key: string, value: any) => any;
4
+ export declare function estimateSize(sizeable: unknown): number;
5
+ export declare const replacementImageURI = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJibGFjayIvPgo8cGF0aCBkPSJNOCAwSDE2TDAgMTZWOEw4IDBaIiBmaWxsPSIjMkQyRDJEIi8+CjxwYXRoIGQ9Ik0xNiA4VjE2SDhMMTYgOFoiIGZpbGw9IiMyRDJEMkQiLz4KPC9zdmc+Cg==";
6
+ export declare const FULL_SNAPSHOT_EVENT_TYPE = 2;
7
+ export declare const META_EVENT_TYPE = 4;
8
+ export declare const INCREMENTAL_SNAPSHOT_EVENT_TYPE = 3;
9
+ export declare const PLUGIN_EVENT_TYPE = 6;
10
+ export declare const MUTATION_SOURCE_TYPE = 0;
11
+ export declare const MAX_MESSAGE_SIZE = 5000000;
12
+ export declare function ensureMaxMessageSize(data: eventWithTime): {
13
+ event: eventWithTime;
14
+ size: number;
15
+ };
16
+ export declare const CONSOLE_LOG_PLUGIN_NAME = "rrweb/console@1";
17
+ export declare function truncateLargeConsoleLogs(_event: eventWithTime): eventWithTime;
18
+ export declare const SEVEN_MEGABYTES: number;
19
+ export declare function splitBuffer(buffer: SnapshotBuffer, sizeLimit?: number): SnapshotBuffer[];
@@ -0,0 +1,102 @@
1
+ import { Leanbase } from '../../../leanbase';
2
+ import { RemoteConfig, SessionRecordingPersistedConfig, SessionRecordingUrlTrigger } from '../../../types';
3
+ export declare const DISABLED = "disabled";
4
+ export declare const SAMPLED = "sampled";
5
+ export declare const ACTIVE = "active";
6
+ export declare const BUFFERING = "buffering";
7
+ export declare const PAUSED = "paused";
8
+ export declare const LAZY_LOADING = "lazy_loading";
9
+ export declare const TRIGGER_ACTIVATED: string;
10
+ export declare const TRIGGER_PENDING: string;
11
+ export declare const TRIGGER_DISABLED: string;
12
+ export interface RecordingTriggersStatus {
13
+ get receivedFlags(): boolean;
14
+ get isRecordingEnabled(): false | true | undefined;
15
+ get isSampled(): false | true | null;
16
+ get urlTriggerMatching(): URLTriggerMatching;
17
+ get eventTriggerMatching(): EventTriggerMatching;
18
+ get linkedFlagMatching(): LinkedFlagMatching;
19
+ get sessionId(): string;
20
+ }
21
+ export type TriggerType = 'url' | 'event';
22
+ declare const triggerStatuses: readonly [string, string, string];
23
+ export type TriggerStatus = (typeof triggerStatuses)[number];
24
+ /**
25
+ * Session recording starts in buffering mode while waiting for "flags response".
26
+ * Once the response is received, it might be disabled, active or sampled.
27
+ * When "sampled" that means a sample rate is set, and the last time the session ID rotated
28
+ * the sample rate determined this session should be sent to the server.
29
+ */
30
+ declare const sessionRecordingStatuses: readonly ["disabled", "sampled", "active", "buffering", "paused", "lazy_loading"];
31
+ export type SessionRecordingStatus = (typeof sessionRecordingStatuses)[number];
32
+ type ReplayConfigType = RemoteConfig | SessionRecordingPersistedConfig;
33
+ export interface TriggerStatusMatching {
34
+ triggerStatus(sessionId: string): TriggerStatus;
35
+ stop(): void;
36
+ }
37
+ export declare class OrTriggerMatching implements TriggerStatusMatching {
38
+ private readonly _matchers;
39
+ constructor(_matchers: TriggerStatusMatching[]);
40
+ triggerStatus(sessionId: string): TriggerStatus;
41
+ stop(): void;
42
+ }
43
+ export declare class AndTriggerMatching implements TriggerStatusMatching {
44
+ private readonly _matchers;
45
+ constructor(_matchers: TriggerStatusMatching[]);
46
+ triggerStatus(sessionId: string): TriggerStatus;
47
+ stop(): void;
48
+ }
49
+ export declare class PendingTriggerMatching implements TriggerStatusMatching {
50
+ triggerStatus(): TriggerStatus;
51
+ stop(): void;
52
+ }
53
+ export declare class URLTriggerMatching implements TriggerStatusMatching {
54
+ private readonly _instance;
55
+ _urlTriggers: SessionRecordingUrlTrigger[];
56
+ _urlBlocklist: SessionRecordingUrlTrigger[];
57
+ urlBlocked: boolean;
58
+ constructor(_instance: Leanbase);
59
+ onConfig(config: ReplayConfigType): void;
60
+ /**
61
+ * @deprecated Use onConfig instead
62
+ */
63
+ onRemoteConfig(response: RemoteConfig): void;
64
+ private _urlTriggerStatus;
65
+ triggerStatus(sessionId: string): TriggerStatus;
66
+ checkUrlTriggerConditions(onPause: () => void, onResume: () => void, onActivate: (triggerType: TriggerType) => void): void;
67
+ stop(): void;
68
+ }
69
+ export declare class LinkedFlagMatching implements TriggerStatusMatching {
70
+ private readonly _instance;
71
+ linkedFlag: string | {
72
+ flag: string;
73
+ variant: string;
74
+ } | null;
75
+ linkedFlagSeen: boolean;
76
+ private _flagListenerCleanup;
77
+ constructor(_instance: Leanbase);
78
+ triggerStatus(): TriggerStatus;
79
+ onConfig(config: ReplayConfigType, onStarted: (flag: string, variant: string | null) => void): void;
80
+ /**
81
+ * @deprecated Use onConfig instead
82
+ */
83
+ onRemoteConfig(response: RemoteConfig, onStarted: (flag: string, variant: string | null) => void): void;
84
+ stop(): void;
85
+ }
86
+ export declare class EventTriggerMatching implements TriggerStatusMatching {
87
+ private readonly _instance;
88
+ _eventTriggers: string[];
89
+ constructor(_instance: Leanbase);
90
+ onConfig(config: ReplayConfigType): void;
91
+ /**
92
+ * @deprecated Use onConfig instead
93
+ */
94
+ onRemoteConfig(response: RemoteConfig): void;
95
+ private _eventTriggerStatus;
96
+ triggerStatus(sessionId: string): TriggerStatus;
97
+ stop(): void;
98
+ }
99
+ export declare function nullMatchSessionRecordingStatus(triggersStatus: RecordingTriggersStatus): SessionRecordingStatus;
100
+ export declare function anyMatchSessionRecordingStatus(triggersStatus: RecordingTriggersStatus): SessionRecordingStatus;
101
+ export declare function allMatchSessionRecordingStatus(triggersStatus: RecordingTriggersStatus): SessionRecordingStatus;
102
+ export {};
@@ -0,0 +1,3 @@
1
+ export declare function patch(source: {
2
+ [key: string]: any;
3
+ }, name: string, replacement: (...args: unknown[]) => unknown): () => void;
@@ -0,0 +1,75 @@
1
+ import { Leanbase } from '../../leanbase';
2
+ import { Properties, RemoteConfig, SessionStartReason } from '../../types';
3
+ import { type eventWithTime } from './types/rrweb-types';
4
+ import { SessionRecordingStatus, TriggerType } from './external/triggerMatching';
5
+ export declare class SessionRecording {
6
+ private readonly _instance;
7
+ _forceAllowLocalhostNetworkCapture: boolean;
8
+ private _receivedFlags;
9
+ private _bootstrapFailed;
10
+ private _warnedMissingConsent;
11
+ private _warnedMissingLoader;
12
+ private _persistFlagsOnSessionListener;
13
+ private _lazyLoadedSessionRecording;
14
+ get started(): boolean;
15
+ /**
16
+ * defaults to buffering mode until a flags response is received
17
+ * once a flags response is received status can be disabled, active or sampled
18
+ */
19
+ get status(): SessionRecordingStatus;
20
+ constructor(_instance: Leanbase);
21
+ private get _isRecordingEnabled();
22
+ startIfEnabledOrStop(startReason?: SessionStartReason): void;
23
+ /**
24
+ * session recording waits until it receives remote config before loading the script
25
+ * this is to ensure we can control the script name remotely
26
+ * and because we wait until we have local and remote config to determine if we should start at all
27
+ * if start is called and there is no remote config then we wait until there is
28
+ */
29
+ private _lazyLoadAndStart;
30
+ stopRecording(): void;
31
+ private _resetSampling;
32
+ private _persistRemoteConfig;
33
+ private _clearRemoteConfig;
34
+ onRemoteConfig(response: RemoteConfig): void;
35
+ log(message: string, level?: 'log' | 'warn' | 'error'): void;
36
+ private get _scriptName();
37
+ private _onScriptLoaded;
38
+ /**
39
+ * this is maintained on the public API only because it has always been on the public API
40
+ * if you are calling this directly you are certainly doing something wrong
41
+ * @deprecated
42
+ */
43
+ onRRwebEmit(rawEvent: eventWithTime): void;
44
+ /**
45
+ * this ignores the linked flag config and (if other conditions are met) causes capture to start
46
+ *
47
+ * It is not usual to call this directly,
48
+ * instead call `posthog.startSessionRecording({linked_flag: true})`
49
+ * */
50
+ overrideLinkedFlag(): void;
51
+ /**
52
+ * this ignores the sampling config and (if other conditions are met) causes capture to start
53
+ *
54
+ * It is not usual to call this directly,
55
+ * instead call `posthog.startSessionRecording({sampling: true})`
56
+ * */
57
+ overrideSampling(): void;
58
+ /**
59
+ * this ignores the URL/Event trigger config and (if other conditions are met) causes capture to start
60
+ *
61
+ * It is not usual to call this directly,
62
+ * instead call `posthog.startSessionRecording({trigger: 'url' | 'event'})`
63
+ * */
64
+ overrideTrigger(triggerType: TriggerType): void;
65
+ get sdkDebugProperties(): Properties;
66
+ /**
67
+ * This adds a custom event to the session recording
68
+ *
69
+ * It is not intended for arbitrary public use - playback only displays known custom events
70
+ * And is exposed on the public interface only so that other parts of the SDK are able to use it
71
+ *
72
+ * if you are calling this from client code, you're probably looking for `posthog.capture('$custom_event', {...})`
73
+ */
74
+ tryAddCustomEvent(tag: string, payload: any): boolean;
75
+ }