sitepong 0.0.7 → 0.0.10

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.
@@ -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
  *
@@ -509,6 +454,10 @@ declare class SitePongClient {
509
454
  private profiler;
510
455
  constructor();
511
456
  init(config: SitePongInitConfig): void;
457
+ /**
458
+ * Check if the SDK is initialized
459
+ */
460
+ isInitialized(): boolean;
512
461
  /**
513
462
  * Get a feature flag value
514
463
  * Returns the cached evaluated result or default value
@@ -604,6 +553,8 @@ declare const setContext: (context: ErrorContext) => void;
604
553
  declare const setUser: (user: ErrorContext["user"]) => void;
605
554
  declare const setTags: (tags: Record<string, string>) => void;
606
555
  declare const flush: () => Promise<void>;
556
+ declare const isInitialized: () => boolean;
557
+
607
558
  declare const getFlag: (key: string, defaultValue?: boolean) => boolean;
608
559
  declare const getAllFlags: () => Record<string, boolean>;
609
560
  declare const getVariant: (key: string, defaultValue?: string | null) => string | null;
@@ -654,4 +605,4 @@ declare const getProfiles: () => ProfileData[];
654
605
  declare const getLatestProfile: () => ProfileData | null;
655
606
  declare const flushProfiles: () => Promise<void>;
656
607
 
657
- export { type CapturedError, type CronCheckinOptions, type CronHandle, type DatabaseQueryEvent, type DatabaseTrackerConfig, type DeviceSignals, type ErrorContext, type FraudCheckResult, type GroupTraits, type MetricOptions, type PerformanceConfig, type PerformanceSpan, type PerformanceTransaction, type ProfileData, type ProfileFrame, type ProfilerConfig, type ReplayConfig, type ReplayEvent, type SitePongConfig, type SitePongInitConfig, type TraceContext, TracePropagator, type TrackProperties, type 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 };
608
+ 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, sitepong as client, 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, isInitialized, 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
  *
@@ -509,6 +454,10 @@ declare class SitePongClient {
509
454
  private profiler;
510
455
  constructor();
511
456
  init(config: SitePongInitConfig): void;
457
+ /**
458
+ * Check if the SDK is initialized
459
+ */
460
+ isInitialized(): boolean;
512
461
  /**
513
462
  * Get a feature flag value
514
463
  * Returns the cached evaluated result or default value
@@ -604,6 +553,8 @@ declare const setContext: (context: ErrorContext) => void;
604
553
  declare const setUser: (user: ErrorContext["user"]) => void;
605
554
  declare const setTags: (tags: Record<string, string>) => void;
606
555
  declare const flush: () => Promise<void>;
556
+ declare const isInitialized: () => boolean;
557
+
607
558
  declare const getFlag: (key: string, defaultValue?: boolean) => boolean;
608
559
  declare const getAllFlags: () => Record<string, boolean>;
609
560
  declare const getVariant: (key: string, defaultValue?: string | null) => string | null;
@@ -654,4 +605,4 @@ declare const getProfiles: () => ProfileData[];
654
605
  declare const getLatestProfile: () => ProfileData | null;
655
606
  declare const flushProfiles: () => Promise<void>;
656
607
 
657
- export { type CapturedError, type CronCheckinOptions, type CronHandle, type DatabaseQueryEvent, type DatabaseTrackerConfig, type DeviceSignals, type ErrorContext, type FraudCheckResult, type GroupTraits, type MetricOptions, type PerformanceConfig, type PerformanceSpan, type PerformanceTransaction, type ProfileData, type ProfileFrame, type ProfilerConfig, type ReplayConfig, type ReplayEvent, type SitePongConfig, type SitePongInitConfig, type TraceContext, TracePropagator, type TrackProperties, type 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 };
608
+ 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, sitepong as client, 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, isInitialized, 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.js CHANGED
@@ -4176,6 +4176,12 @@ var SitePongClient = class {
4176
4176
  });
4177
4177
  }
4178
4178
  }
4179
+ /**
4180
+ * Check if the SDK is initialized
4181
+ */
4182
+ isInitialized() {
4183
+ return this.initialized;
4184
+ }
4179
4185
  /**
4180
4186
  * Get a feature flag value
4181
4187
  * Returns the cached evaluated result or default value
@@ -4612,6 +4618,7 @@ var setContext = sitepong.setContext.bind(sitepong);
4612
4618
  var setUser = sitepong.setUser.bind(sitepong);
4613
4619
  var setTags = sitepong.setTags.bind(sitepong);
4614
4620
  var flush = sitepong.flush.bind(sitepong);
4621
+ var isInitialized = sitepong.isInitialized.bind(sitepong);
4615
4622
  var getFlag = sitepong.getFlag.bind(sitepong);
4616
4623
  var getAllFlags = sitepong.getAllFlags.bind(sitepong);
4617
4624
  var getVariant = sitepong.getVariant.bind(sitepong);
@@ -4663,6 +4670,7 @@ exports.areFlagsReady = areFlagsReady;
4663
4670
  exports.captureError = captureError;
4664
4671
  exports.captureMessage = captureMessage;
4665
4672
  exports.clearAnonymousId = clearAnonymousId;
4673
+ exports.client = sitepong;
4666
4674
  exports.createTraceContext = createTraceContext;
4667
4675
  exports.cronCheckin = cronCheckin;
4668
4676
  exports.cronStart = cronStart;
@@ -4695,6 +4703,7 @@ exports.getWebVitals = getWebVitals;
4695
4703
  exports.group = group;
4696
4704
  exports.identify = identify;
4697
4705
  exports.init = init;
4706
+ exports.isInitialized = isInitialized;
4698
4707
  exports.isReplayRecording = isReplayRecording;
4699
4708
  exports.metricDistribution = metricDistribution;
4700
4709
  exports.metricGauge = metricGauge;