sitepong 0.0.7 → 0.0.8
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.
- package/dist/{breadcrumbs-DwXK5gNn.d.ts → breadcrumbs-Cydh62b1.d.mts} +6 -0
- package/dist/{breadcrumbs-DwXK5gNn.d.mts → breadcrumbs-DRlJ9h_B.d.ts} +6 -0
- package/dist/index.d.mts +4 -59
- package/dist/index.d.ts +4 -59
- package/dist/nextjs/index.d.mts +3 -2
- package/dist/nextjs/index.d.ts +3 -2
- package/dist/react/index.d.mts +5 -3
- package/dist/react/index.d.ts +5 -3
- package/dist/server/index.d.mts +3 -2
- package/dist/server/index.d.ts +3 -2
- package/dist/types-CLEYbaV8.d.mts +88 -0
- package/dist/types-CLEYbaV8.d.ts +88 -0
- package/package.json +1 -1
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { R as ReplayConfig, A as AnalyticsConfig } from './types-CLEYbaV8.mjs';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* SitePong SDK Types
|
|
3
5
|
*/
|
|
@@ -28,6 +30,10 @@ interface SitePongConfig {
|
|
|
28
30
|
};
|
|
29
31
|
/** Custom API endpoint (for self-hosted) */
|
|
30
32
|
apiEndpoint?: string;
|
|
33
|
+
/** Session replay configuration */
|
|
34
|
+
replay?: Omit<ReplayConfig, "apiKey">;
|
|
35
|
+
/** Analytics configuration */
|
|
36
|
+
analytics?: Omit<AnalyticsConfig, "apiKey">;
|
|
31
37
|
}
|
|
32
38
|
interface User {
|
|
33
39
|
id?: string;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { R as ReplayConfig, A as AnalyticsConfig } from './types-CLEYbaV8.js';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* SitePong SDK Types
|
|
3
5
|
*/
|
|
@@ -28,6 +30,10 @@ interface SitePongConfig {
|
|
|
28
30
|
};
|
|
29
31
|
/** Custom API endpoint (for self-hosted) */
|
|
30
32
|
apiEndpoint?: string;
|
|
33
|
+
/** Session replay configuration */
|
|
34
|
+
replay?: Omit<ReplayConfig, "apiKey">;
|
|
35
|
+
/** Analytics configuration */
|
|
36
|
+
analytics?: Omit<AnalyticsConfig, "apiKey">;
|
|
31
37
|
}
|
|
32
38
|
interface User {
|
|
33
39
|
id?: string;
|
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { T as TrackProperties, U as UserTraits, G as GroupTraits } from './types-CLEYbaV8.mjs';
|
|
2
|
+
export { R as ReplayConfig, a as ReplayEvent } from './types-CLEYbaV8.mjs';
|
|
3
|
+
|
|
1
4
|
interface CoreSignals {
|
|
2
5
|
userAgent: string;
|
|
3
6
|
language: string;
|
|
@@ -111,27 +114,6 @@ declare global {
|
|
|
111
114
|
}
|
|
112
115
|
}
|
|
113
116
|
|
|
114
|
-
interface TrackProperties {
|
|
115
|
-
[key: string]: unknown;
|
|
116
|
-
}
|
|
117
|
-
interface UserTraits {
|
|
118
|
-
email?: string;
|
|
119
|
-
name?: string;
|
|
120
|
-
firstName?: string;
|
|
121
|
-
lastName?: string;
|
|
122
|
-
phone?: string;
|
|
123
|
-
avatar?: string;
|
|
124
|
-
createdAt?: string;
|
|
125
|
-
[key: string]: unknown;
|
|
126
|
-
}
|
|
127
|
-
interface GroupTraits {
|
|
128
|
-
name?: string;
|
|
129
|
-
industry?: string;
|
|
130
|
-
employees?: number;
|
|
131
|
-
plan?: string;
|
|
132
|
-
[key: string]: unknown;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
117
|
interface PerformanceConfig {
|
|
136
118
|
apiKey: string;
|
|
137
119
|
endpoint?: string;
|
|
@@ -305,43 +287,6 @@ declare function clearAnonymousId(): void;
|
|
|
305
287
|
*/
|
|
306
288
|
declare function setAnonymousId(id: string): void;
|
|
307
289
|
|
|
308
|
-
interface ReplayConfig {
|
|
309
|
-
apiKey: string;
|
|
310
|
-
endpoint?: string;
|
|
311
|
-
enabled?: boolean;
|
|
312
|
-
/** Mask all text input values (default: true) */
|
|
313
|
-
maskInputs?: boolean;
|
|
314
|
-
/** CSS selector for elements to block from recording */
|
|
315
|
-
blockSelector?: string;
|
|
316
|
-
/** CSS selector for elements to mask content */
|
|
317
|
-
maskSelector?: string;
|
|
318
|
-
/** Maximum session duration in ms (default: 60 minutes) */
|
|
319
|
-
maxSessionDuration?: number;
|
|
320
|
-
/** Flush interval in ms (default: 5000) */
|
|
321
|
-
flushInterval?: number;
|
|
322
|
-
/** Maximum events per batch (default: 100) */
|
|
323
|
-
maxBatchSize?: number;
|
|
324
|
-
/** Sample rate 0-1 (default: 1.0 = record all sessions) */
|
|
325
|
-
sampleRate?: number;
|
|
326
|
-
/** Custom endpoint for replay data */
|
|
327
|
-
replayEndpoint?: string;
|
|
328
|
-
/** Record network requests (XHR/fetch) */
|
|
329
|
-
recordNetwork?: boolean;
|
|
330
|
-
/** Capture request/response headers in network recording */
|
|
331
|
-
captureNetworkHeaders?: boolean;
|
|
332
|
-
/** Record console logs */
|
|
333
|
-
recordConsole?: boolean;
|
|
334
|
-
/** Console levels to record (default: all) */
|
|
335
|
-
consoleLevels?: Array<'log' | 'info' | 'warn' | 'error' | 'debug'>;
|
|
336
|
-
debug?: boolean;
|
|
337
|
-
}
|
|
338
|
-
type ReplayEventType = 'snapshot' | 'mutation' | 'mouse_move' | 'mouse_click' | 'mouse_leave' | 'touch' | 'scroll' | 'input' | 'resize' | 'focus' | 'blur' | 'network' | 'console' | 'custom';
|
|
339
|
-
interface ReplayEvent {
|
|
340
|
-
type: ReplayEventType;
|
|
341
|
-
timestamp: number;
|
|
342
|
-
data: unknown;
|
|
343
|
-
}
|
|
344
|
-
|
|
345
290
|
/**
|
|
346
291
|
* Database Query Tracking SDK Module
|
|
347
292
|
*
|
|
@@ -654,4 +599,4 @@ declare const getProfiles: () => ProfileData[];
|
|
|
654
599
|
declare const getLatestProfile: () => ProfileData | null;
|
|
655
600
|
declare const flushProfiles: () => Promise<void>;
|
|
656
601
|
|
|
657
|
-
export { type CapturedError, type CronCheckinOptions, type CronHandle, type DatabaseQueryEvent, type DatabaseTrackerConfig, type DeviceSignals, type ErrorContext, type FraudCheckResult,
|
|
602
|
+
export { type CapturedError, type CronCheckinOptions, type CronHandle, type DatabaseQueryEvent, type DatabaseTrackerConfig, type DeviceSignals, type ErrorContext, type FraudCheckResult, GroupTraits, type MetricOptions, type PerformanceConfig, type PerformanceSpan, type PerformanceTransaction, type ProfileData, type ProfileFrame, type ProfilerConfig, type SitePongConfig, type SitePongInitConfig, type TraceContext, TracePropagator, TrackProperties, UserTraits, type VisitorIdResult, type WebVitals, areFlagsReady, captureError, captureMessage, clearAnonymousId, createTraceContext, cronCheckin, cronStart, cronWrap, dbTrack, dbTrackSync, sitepong as default, endSpan, endTransaction, extractTrace, flush, flushMetrics, flushProfiles, generateSpanId, generateTraceId, getAllFlags, getAnonymousId, getDbNPlusOnePatterns, getDbQueryCount, getDeviceSignals, getFlag, getFraudCheck, getLatestProfile, getProfiles, getReplaySessionId, getVariant, getVariantPayload, getVisitorId, getWebVitals, group, identify, init, isReplayRecording, metricDistribution, metricGauge, metricHistogram, metricIncrement, metricStartTimer, metricTime, profile, propagateTrace, refreshFlags, resetAnalytics, resetDbQueryCount, setAnonymousId, setContext, setTags, setUser, startProfileSpan, startReplay, startSpan, startTransaction, stopReplay, track, trackPageView, waitForFlags };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { T as TrackProperties, U as UserTraits, G as GroupTraits } from './types-CLEYbaV8.js';
|
|
2
|
+
export { R as ReplayConfig, a as ReplayEvent } from './types-CLEYbaV8.js';
|
|
3
|
+
|
|
1
4
|
interface CoreSignals {
|
|
2
5
|
userAgent: string;
|
|
3
6
|
language: string;
|
|
@@ -111,27 +114,6 @@ declare global {
|
|
|
111
114
|
}
|
|
112
115
|
}
|
|
113
116
|
|
|
114
|
-
interface TrackProperties {
|
|
115
|
-
[key: string]: unknown;
|
|
116
|
-
}
|
|
117
|
-
interface UserTraits {
|
|
118
|
-
email?: string;
|
|
119
|
-
name?: string;
|
|
120
|
-
firstName?: string;
|
|
121
|
-
lastName?: string;
|
|
122
|
-
phone?: string;
|
|
123
|
-
avatar?: string;
|
|
124
|
-
createdAt?: string;
|
|
125
|
-
[key: string]: unknown;
|
|
126
|
-
}
|
|
127
|
-
interface GroupTraits {
|
|
128
|
-
name?: string;
|
|
129
|
-
industry?: string;
|
|
130
|
-
employees?: number;
|
|
131
|
-
plan?: string;
|
|
132
|
-
[key: string]: unknown;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
117
|
interface PerformanceConfig {
|
|
136
118
|
apiKey: string;
|
|
137
119
|
endpoint?: string;
|
|
@@ -305,43 +287,6 @@ declare function clearAnonymousId(): void;
|
|
|
305
287
|
*/
|
|
306
288
|
declare function setAnonymousId(id: string): void;
|
|
307
289
|
|
|
308
|
-
interface ReplayConfig {
|
|
309
|
-
apiKey: string;
|
|
310
|
-
endpoint?: string;
|
|
311
|
-
enabled?: boolean;
|
|
312
|
-
/** Mask all text input values (default: true) */
|
|
313
|
-
maskInputs?: boolean;
|
|
314
|
-
/** CSS selector for elements to block from recording */
|
|
315
|
-
blockSelector?: string;
|
|
316
|
-
/** CSS selector for elements to mask content */
|
|
317
|
-
maskSelector?: string;
|
|
318
|
-
/** Maximum session duration in ms (default: 60 minutes) */
|
|
319
|
-
maxSessionDuration?: number;
|
|
320
|
-
/** Flush interval in ms (default: 5000) */
|
|
321
|
-
flushInterval?: number;
|
|
322
|
-
/** Maximum events per batch (default: 100) */
|
|
323
|
-
maxBatchSize?: number;
|
|
324
|
-
/** Sample rate 0-1 (default: 1.0 = record all sessions) */
|
|
325
|
-
sampleRate?: number;
|
|
326
|
-
/** Custom endpoint for replay data */
|
|
327
|
-
replayEndpoint?: string;
|
|
328
|
-
/** Record network requests (XHR/fetch) */
|
|
329
|
-
recordNetwork?: boolean;
|
|
330
|
-
/** Capture request/response headers in network recording */
|
|
331
|
-
captureNetworkHeaders?: boolean;
|
|
332
|
-
/** Record console logs */
|
|
333
|
-
recordConsole?: boolean;
|
|
334
|
-
/** Console levels to record (default: all) */
|
|
335
|
-
consoleLevels?: Array<'log' | 'info' | 'warn' | 'error' | 'debug'>;
|
|
336
|
-
debug?: boolean;
|
|
337
|
-
}
|
|
338
|
-
type ReplayEventType = 'snapshot' | 'mutation' | 'mouse_move' | 'mouse_click' | 'mouse_leave' | 'touch' | 'scroll' | 'input' | 'resize' | 'focus' | 'blur' | 'network' | 'console' | 'custom';
|
|
339
|
-
interface ReplayEvent {
|
|
340
|
-
type: ReplayEventType;
|
|
341
|
-
timestamp: number;
|
|
342
|
-
data: unknown;
|
|
343
|
-
}
|
|
344
|
-
|
|
345
290
|
/**
|
|
346
291
|
* Database Query Tracking SDK Module
|
|
347
292
|
*
|
|
@@ -654,4 +599,4 @@ declare const getProfiles: () => ProfileData[];
|
|
|
654
599
|
declare const getLatestProfile: () => ProfileData | null;
|
|
655
600
|
declare const flushProfiles: () => Promise<void>;
|
|
656
601
|
|
|
657
|
-
export { type CapturedError, type CronCheckinOptions, type CronHandle, type DatabaseQueryEvent, type DatabaseTrackerConfig, type DeviceSignals, type ErrorContext, type FraudCheckResult,
|
|
602
|
+
export { type CapturedError, type CronCheckinOptions, type CronHandle, type DatabaseQueryEvent, type DatabaseTrackerConfig, type DeviceSignals, type ErrorContext, type FraudCheckResult, GroupTraits, type MetricOptions, type PerformanceConfig, type PerformanceSpan, type PerformanceTransaction, type ProfileData, type ProfileFrame, type ProfilerConfig, type SitePongConfig, type SitePongInitConfig, type TraceContext, TracePropagator, TrackProperties, UserTraits, type VisitorIdResult, type WebVitals, areFlagsReady, captureError, captureMessage, clearAnonymousId, createTraceContext, cronCheckin, cronStart, cronWrap, dbTrack, dbTrackSync, sitepong as default, endSpan, endTransaction, extractTrace, flush, flushMetrics, flushProfiles, generateSpanId, generateTraceId, getAllFlags, getAnonymousId, getDbNPlusOnePatterns, getDbQueryCount, getDeviceSignals, getFlag, getFraudCheck, getLatestProfile, getProfiles, getReplaySessionId, getVariant, getVariantPayload, getVisitorId, getWebVitals, group, identify, init, isReplayRecording, metricDistribution, metricGauge, metricHistogram, metricIncrement, metricStartTimer, metricTime, profile, propagateTrace, refreshFlags, resetAnalytics, resetDbQueryCount, setAnonymousId, setContext, setTags, setUser, startProfileSpan, startReplay, startSpan, startTransaction, stopReplay, track, trackPageView, waitForFlags };
|
package/dist/nextjs/index.d.mts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { NextRequest } from 'next/server';
|
|
2
|
-
import { S as SitePongConfig } from '../breadcrumbs-
|
|
3
|
-
export { a as addBreadcrumb } from '../breadcrumbs-
|
|
2
|
+
import { S as SitePongConfig } from '../breadcrumbs-Cydh62b1.mjs';
|
|
3
|
+
export { a as addBreadcrumb } from '../breadcrumbs-Cydh62b1.mjs';
|
|
4
4
|
export { captureServerException, initServer } from '../server/index.mjs';
|
|
5
|
+
import '../types-CLEYbaV8.mjs';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Next.js integration for SitePong
|
package/dist/nextjs/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { NextRequest } from 'next/server';
|
|
2
|
-
import { S as SitePongConfig } from '../breadcrumbs-
|
|
3
|
-
export { a as addBreadcrumb } from '../breadcrumbs-
|
|
2
|
+
import { S as SitePongConfig } from '../breadcrumbs-DRlJ9h_B.js';
|
|
3
|
+
export { a as addBreadcrumb } from '../breadcrumbs-DRlJ9h_B.js';
|
|
4
4
|
export { captureServerException, initServer } from '../server/index.js';
|
|
5
|
+
import '../types-CLEYbaV8.js';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Next.js integration for SitePong
|
package/dist/react/index.d.mts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React, { Component, ReactNode, ErrorInfo } from 'react';
|
|
2
|
-
import { S as SitePongConfig, C as CaptureContext, L as LogLevel, U as User, a as addBreadcrumb } from '../breadcrumbs-
|
|
3
|
-
import { TrackProperties, UserTraits,
|
|
4
|
-
export {
|
|
2
|
+
import { S as SitePongConfig, C as CaptureContext, L as LogLevel, U as User, a as addBreadcrumb } from '../breadcrumbs-Cydh62b1.mjs';
|
|
3
|
+
import { T as TrackProperties, U as UserTraits, G as GroupTraits } from '../types-CLEYbaV8.mjs';
|
|
4
|
+
export { R as ReplayConfig, a as ReplayEvent } from '../types-CLEYbaV8.mjs';
|
|
5
|
+
import { DeviceSignals, WebVitals } from '../index.mjs';
|
|
6
|
+
export { CapturedError, CronCheckinOptions, CronHandle, DatabaseQueryEvent, DatabaseTrackerConfig, ErrorContext, FraudCheckResult, MetricOptions, PerformanceConfig, PerformanceSpan, PerformanceTransaction, ProfileData, ProfileFrame, ProfilerConfig, SitePongConfig, SitePongInitConfig, TraceContext, TracePropagator, VisitorIdResult, areFlagsReady, captureError, captureMessage, clearAnonymousId, createTraceContext, cronCheckin, cronStart, cronWrap, dbTrack, dbTrackSync, endSpan, endTransaction, extractTrace, flush, flushMetrics, flushProfiles, generateSpanId, generateTraceId, getAllFlags, getAnonymousId, getDbNPlusOnePatterns, getDbQueryCount, getDeviceSignals, getFlag, getFraudCheck, getLatestProfile, getProfiles, getReplaySessionId, getVariant, getVariantPayload, getVisitorId, getWebVitals, group, identify, init, isReplayRecording, metricDistribution, metricGauge, metricHistogram, metricIncrement, metricStartTimer, metricTime, profile, propagateTrace, refreshFlags, resetAnalytics, resetDbQueryCount, setAnonymousId, setContext, setTags, setUser, startProfileSpan, startReplay, startSpan, startTransaction, stopReplay, track, trackPageView, waitForFlags } from '../index.mjs';
|
|
5
7
|
|
|
6
8
|
interface SitePongContextValue {
|
|
7
9
|
isInitialized: boolean;
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React, { Component, ReactNode, ErrorInfo } from 'react';
|
|
2
|
-
import { S as SitePongConfig, C as CaptureContext, L as LogLevel, U as User, a as addBreadcrumb } from '../breadcrumbs-
|
|
3
|
-
import { TrackProperties, UserTraits,
|
|
4
|
-
export {
|
|
2
|
+
import { S as SitePongConfig, C as CaptureContext, L as LogLevel, U as User, a as addBreadcrumb } from '../breadcrumbs-DRlJ9h_B.js';
|
|
3
|
+
import { T as TrackProperties, U as UserTraits, G as GroupTraits } from '../types-CLEYbaV8.js';
|
|
4
|
+
export { R as ReplayConfig, a as ReplayEvent } from '../types-CLEYbaV8.js';
|
|
5
|
+
import { DeviceSignals, WebVitals } from '../index.js';
|
|
6
|
+
export { CapturedError, CronCheckinOptions, CronHandle, DatabaseQueryEvent, DatabaseTrackerConfig, ErrorContext, FraudCheckResult, MetricOptions, PerformanceConfig, PerformanceSpan, PerformanceTransaction, ProfileData, ProfileFrame, ProfilerConfig, SitePongConfig, SitePongInitConfig, TraceContext, TracePropagator, VisitorIdResult, areFlagsReady, captureError, captureMessage, clearAnonymousId, createTraceContext, cronCheckin, cronStart, cronWrap, dbTrack, dbTrackSync, endSpan, endTransaction, extractTrace, flush, flushMetrics, flushProfiles, generateSpanId, generateTraceId, getAllFlags, getAnonymousId, getDbNPlusOnePatterns, getDbQueryCount, getDeviceSignals, getFlag, getFraudCheck, getLatestProfile, getProfiles, getReplaySessionId, getVariant, getVariantPayload, getVisitorId, getWebVitals, group, identify, init, isReplayRecording, metricDistribution, metricGauge, metricHistogram, metricIncrement, metricStartTimer, metricTime, profile, propagateTrace, refreshFlags, resetAnalytics, resetDbQueryCount, setAnonymousId, setContext, setTags, setUser, startProfileSpan, startReplay, startSpan, startTransaction, stopReplay, track, trackPageView, waitForFlags } from '../index.js';
|
|
5
7
|
|
|
6
8
|
interface SitePongContextValue {
|
|
7
9
|
isInitialized: boolean;
|
package/dist/server/index.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { S as SitePongConfig, C as CaptureContext, L as LogLevel } from '../breadcrumbs-
|
|
2
|
-
export { E as ErrorEvent, a as addBreadcrumb, c as clearBreadcrumbs, g as getBreadcrumbs } from '../breadcrumbs-
|
|
1
|
+
import { S as SitePongConfig, C as CaptureContext, L as LogLevel } from '../breadcrumbs-Cydh62b1.mjs';
|
|
2
|
+
export { E as ErrorEvent, a as addBreadcrumb, c as clearBreadcrumbs, g as getBreadcrumbs } from '../breadcrumbs-Cydh62b1.mjs';
|
|
3
|
+
import '../types-CLEYbaV8.mjs';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Server-side exports for @sitepong/react
|
package/dist/server/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { S as SitePongConfig, C as CaptureContext, L as LogLevel } from '../breadcrumbs-
|
|
2
|
-
export { E as ErrorEvent, a as addBreadcrumb, c as clearBreadcrumbs, g as getBreadcrumbs } from '../breadcrumbs-
|
|
1
|
+
import { S as SitePongConfig, C as CaptureContext, L as LogLevel } from '../breadcrumbs-DRlJ9h_B.js';
|
|
2
|
+
export { E as ErrorEvent, a as addBreadcrumb, c as clearBreadcrumbs, g as getBreadcrumbs } from '../breadcrumbs-DRlJ9h_B.js';
|
|
3
|
+
import '../types-CLEYbaV8.js';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Server-side exports for @sitepong/react
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Analytics Types
|
|
3
|
+
* Types for events, traits, and analytics configuration
|
|
4
|
+
*/
|
|
5
|
+
interface AutocaptureOptions {
|
|
6
|
+
/** Enable autocapture of click events (default: true) */
|
|
7
|
+
clicks?: boolean;
|
|
8
|
+
/** Enable autocapture of form submissions (default: true) */
|
|
9
|
+
forms?: boolean;
|
|
10
|
+
/** Enable autocapture of page views (default: true) */
|
|
11
|
+
pageviews?: boolean;
|
|
12
|
+
/** CSS selectors for elements to exclude from autocapture */
|
|
13
|
+
blockSelectors?: string[];
|
|
14
|
+
/** Only capture events on elements matching these selectors */
|
|
15
|
+
allowSelectors?: string[];
|
|
16
|
+
}
|
|
17
|
+
interface AnalyticsConfig {
|
|
18
|
+
apiKey: string;
|
|
19
|
+
endpoint?: string;
|
|
20
|
+
enabled?: boolean;
|
|
21
|
+
autocapturePageviews?: boolean;
|
|
22
|
+
autocaptureClicks?: boolean;
|
|
23
|
+
autocaptureForms?: boolean;
|
|
24
|
+
autocapture?: AutocaptureOptions | boolean;
|
|
25
|
+
maxBatchSize?: number;
|
|
26
|
+
flushInterval?: number;
|
|
27
|
+
eventsEndpoint?: string;
|
|
28
|
+
debug?: boolean;
|
|
29
|
+
}
|
|
30
|
+
interface TrackProperties {
|
|
31
|
+
[key: string]: unknown;
|
|
32
|
+
}
|
|
33
|
+
interface UserTraits {
|
|
34
|
+
email?: string;
|
|
35
|
+
name?: string;
|
|
36
|
+
firstName?: string;
|
|
37
|
+
lastName?: string;
|
|
38
|
+
phone?: string;
|
|
39
|
+
avatar?: string;
|
|
40
|
+
createdAt?: string;
|
|
41
|
+
[key: string]: unknown;
|
|
42
|
+
}
|
|
43
|
+
interface GroupTraits {
|
|
44
|
+
name?: string;
|
|
45
|
+
industry?: string;
|
|
46
|
+
employees?: number;
|
|
47
|
+
plan?: string;
|
|
48
|
+
[key: string]: unknown;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
interface ReplayConfig {
|
|
52
|
+
apiKey: string;
|
|
53
|
+
endpoint?: string;
|
|
54
|
+
enabled?: boolean;
|
|
55
|
+
/** Mask all text input values (default: true) */
|
|
56
|
+
maskInputs?: boolean;
|
|
57
|
+
/** CSS selector for elements to block from recording */
|
|
58
|
+
blockSelector?: string;
|
|
59
|
+
/** CSS selector for elements to mask content */
|
|
60
|
+
maskSelector?: string;
|
|
61
|
+
/** Maximum session duration in ms (default: 60 minutes) */
|
|
62
|
+
maxSessionDuration?: number;
|
|
63
|
+
/** Flush interval in ms (default: 5000) */
|
|
64
|
+
flushInterval?: number;
|
|
65
|
+
/** Maximum events per batch (default: 100) */
|
|
66
|
+
maxBatchSize?: number;
|
|
67
|
+
/** Sample rate 0-1 (default: 1.0 = record all sessions) */
|
|
68
|
+
sampleRate?: number;
|
|
69
|
+
/** Custom endpoint for replay data */
|
|
70
|
+
replayEndpoint?: string;
|
|
71
|
+
/** Record network requests (XHR/fetch) */
|
|
72
|
+
recordNetwork?: boolean;
|
|
73
|
+
/** Capture request/response headers in network recording */
|
|
74
|
+
captureNetworkHeaders?: boolean;
|
|
75
|
+
/** Record console logs */
|
|
76
|
+
recordConsole?: boolean;
|
|
77
|
+
/** Console levels to record (default: all) */
|
|
78
|
+
consoleLevels?: Array<'log' | 'info' | 'warn' | 'error' | 'debug'>;
|
|
79
|
+
debug?: boolean;
|
|
80
|
+
}
|
|
81
|
+
type ReplayEventType = 'snapshot' | 'mutation' | 'mouse_move' | 'mouse_click' | 'mouse_leave' | 'touch' | 'scroll' | 'input' | 'resize' | 'focus' | 'blur' | 'network' | 'console' | 'custom';
|
|
82
|
+
interface ReplayEvent {
|
|
83
|
+
type: ReplayEventType;
|
|
84
|
+
timestamp: number;
|
|
85
|
+
data: unknown;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export type { AnalyticsConfig as A, GroupTraits as G, ReplayConfig as R, TrackProperties as T, UserTraits as U, ReplayEvent as a };
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Analytics Types
|
|
3
|
+
* Types for events, traits, and analytics configuration
|
|
4
|
+
*/
|
|
5
|
+
interface AutocaptureOptions {
|
|
6
|
+
/** Enable autocapture of click events (default: true) */
|
|
7
|
+
clicks?: boolean;
|
|
8
|
+
/** Enable autocapture of form submissions (default: true) */
|
|
9
|
+
forms?: boolean;
|
|
10
|
+
/** Enable autocapture of page views (default: true) */
|
|
11
|
+
pageviews?: boolean;
|
|
12
|
+
/** CSS selectors for elements to exclude from autocapture */
|
|
13
|
+
blockSelectors?: string[];
|
|
14
|
+
/** Only capture events on elements matching these selectors */
|
|
15
|
+
allowSelectors?: string[];
|
|
16
|
+
}
|
|
17
|
+
interface AnalyticsConfig {
|
|
18
|
+
apiKey: string;
|
|
19
|
+
endpoint?: string;
|
|
20
|
+
enabled?: boolean;
|
|
21
|
+
autocapturePageviews?: boolean;
|
|
22
|
+
autocaptureClicks?: boolean;
|
|
23
|
+
autocaptureForms?: boolean;
|
|
24
|
+
autocapture?: AutocaptureOptions | boolean;
|
|
25
|
+
maxBatchSize?: number;
|
|
26
|
+
flushInterval?: number;
|
|
27
|
+
eventsEndpoint?: string;
|
|
28
|
+
debug?: boolean;
|
|
29
|
+
}
|
|
30
|
+
interface TrackProperties {
|
|
31
|
+
[key: string]: unknown;
|
|
32
|
+
}
|
|
33
|
+
interface UserTraits {
|
|
34
|
+
email?: string;
|
|
35
|
+
name?: string;
|
|
36
|
+
firstName?: string;
|
|
37
|
+
lastName?: string;
|
|
38
|
+
phone?: string;
|
|
39
|
+
avatar?: string;
|
|
40
|
+
createdAt?: string;
|
|
41
|
+
[key: string]: unknown;
|
|
42
|
+
}
|
|
43
|
+
interface GroupTraits {
|
|
44
|
+
name?: string;
|
|
45
|
+
industry?: string;
|
|
46
|
+
employees?: number;
|
|
47
|
+
plan?: string;
|
|
48
|
+
[key: string]: unknown;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
interface ReplayConfig {
|
|
52
|
+
apiKey: string;
|
|
53
|
+
endpoint?: string;
|
|
54
|
+
enabled?: boolean;
|
|
55
|
+
/** Mask all text input values (default: true) */
|
|
56
|
+
maskInputs?: boolean;
|
|
57
|
+
/** CSS selector for elements to block from recording */
|
|
58
|
+
blockSelector?: string;
|
|
59
|
+
/** CSS selector for elements to mask content */
|
|
60
|
+
maskSelector?: string;
|
|
61
|
+
/** Maximum session duration in ms (default: 60 minutes) */
|
|
62
|
+
maxSessionDuration?: number;
|
|
63
|
+
/** Flush interval in ms (default: 5000) */
|
|
64
|
+
flushInterval?: number;
|
|
65
|
+
/** Maximum events per batch (default: 100) */
|
|
66
|
+
maxBatchSize?: number;
|
|
67
|
+
/** Sample rate 0-1 (default: 1.0 = record all sessions) */
|
|
68
|
+
sampleRate?: number;
|
|
69
|
+
/** Custom endpoint for replay data */
|
|
70
|
+
replayEndpoint?: string;
|
|
71
|
+
/** Record network requests (XHR/fetch) */
|
|
72
|
+
recordNetwork?: boolean;
|
|
73
|
+
/** Capture request/response headers in network recording */
|
|
74
|
+
captureNetworkHeaders?: boolean;
|
|
75
|
+
/** Record console logs */
|
|
76
|
+
recordConsole?: boolean;
|
|
77
|
+
/** Console levels to record (default: all) */
|
|
78
|
+
consoleLevels?: Array<'log' | 'info' | 'warn' | 'error' | 'debug'>;
|
|
79
|
+
debug?: boolean;
|
|
80
|
+
}
|
|
81
|
+
type ReplayEventType = 'snapshot' | 'mutation' | 'mouse_move' | 'mouse_click' | 'mouse_leave' | 'touch' | 'scroll' | 'input' | 'resize' | 'focus' | 'blur' | 'network' | 'console' | 'custom';
|
|
82
|
+
interface ReplayEvent {
|
|
83
|
+
type: ReplayEventType;
|
|
84
|
+
timestamp: number;
|
|
85
|
+
data: unknown;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export type { AnalyticsConfig as A, GroupTraits as G, ReplayConfig as R, TrackProperties as T, UserTraits as U, ReplayEvent as a };
|