posthog-js 1.167.1 → 1.169.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.
- package/dist/all-external-dependencies.js +2 -2
- package/dist/all-external-dependencies.js.map +1 -1
- package/dist/array.full.js +2 -2
- package/dist/array.full.js.map +1 -1
- package/dist/array.full.no-external.js +2 -2
- package/dist/array.full.no-external.js.map +1 -1
- package/dist/array.js +1 -1
- package/dist/array.js.map +1 -1
- package/dist/array.no-external.js +1 -1
- package/dist/array.no-external.js.map +1 -1
- package/dist/exception-autocapture.js +1 -1
- package/dist/exception-autocapture.js.map +1 -1
- package/dist/external-scripts-loader.js.map +1 -1
- package/dist/lib/src/extensions/exception-autocapture/error-conversion.d.ts +46 -2
- package/dist/lib/src/extensions/exception-autocapture/stack-trace.d.ts +5 -5
- package/dist/lib/src/extensions/replay/sessionrecording.d.ts +11 -1
- package/dist/lib/src/types.d.ts +8 -17
- package/dist/lib/src/utils/globals.d.ts +3 -2
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/module.d.ts +20 -19
- package/dist/module.full.d.ts +20 -19
- package/dist/module.full.js +2 -2
- package/dist/module.full.js.map +1 -1
- package/dist/module.full.no-external.d.ts +20 -19
- package/dist/module.full.no-external.js +2 -2
- package/dist/module.full.no-external.js.map +1 -1
- package/dist/module.js +1 -1
- package/dist/module.js.map +1 -1
- package/dist/module.no-external.d.ts +20 -19
- package/dist/module.no-external.js +1 -1
- package/dist/module.no-external.js.map +1 -1
- package/dist/recorder-v2.js.map +1 -1
- package/dist/recorder.js.map +1 -1
- package/dist/surveys-preview.js.map +1 -1
- package/dist/surveys.js.map +1 -1
- package/dist/tracing-headers.js.map +1 -1
- package/dist/web-vitals.js.map +1 -1
- package/lib/package.json +1 -1
- package/lib/src/extensions/exception-autocapture/error-conversion.d.ts +46 -2
- package/lib/src/extensions/exception-autocapture/error-conversion.js +146 -89
- package/lib/src/extensions/exception-autocapture/error-conversion.js.map +1 -1
- package/lib/src/extensions/exception-autocapture/stack-trace.d.ts +5 -5
- package/lib/src/extensions/exception-autocapture/stack-trace.js +46 -23
- package/lib/src/extensions/exception-autocapture/stack-trace.js.map +1 -1
- package/lib/src/extensions/replay/sessionrecording.d.ts +11 -1
- package/lib/src/extensions/replay/sessionrecording.js +46 -14
- package/lib/src/extensions/replay/sessionrecording.js.map +1 -1
- package/lib/src/extensions/sentry-integration.js +1 -0
- package/lib/src/extensions/sentry-integration.js.map +1 -1
- package/lib/src/posthog-core.js +23 -16
- package/lib/src/posthog-core.js.map +1 -1
- package/lib/src/types.d.ts +8 -17
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/globals.d.ts +3 -2
- package/lib/src/utils/globals.js.map +1 -1
- package/package.json +1 -1
|
@@ -507,25 +507,16 @@ type ErrorEventArgs = [
|
|
|
507
507
|
colno?: number | undefined,
|
|
508
508
|
error?: Error | undefined
|
|
509
509
|
];
|
|
510
|
+
type ErrorMetadata = {
|
|
511
|
+
handled?: boolean;
|
|
512
|
+
synthetic?: boolean;
|
|
513
|
+
overrideExceptionType?: string;
|
|
514
|
+
overrideExceptionMessage?: string;
|
|
515
|
+
defaultExceptionType?: string;
|
|
516
|
+
defaultExceptionMessage?: string;
|
|
517
|
+
};
|
|
510
518
|
declare const severityLevels: readonly ["fatal", "error", "warning", "log", "info", "debug"];
|
|
511
519
|
declare type SeverityLevel = typeof severityLevels[number];
|
|
512
|
-
interface ErrorProperties {
|
|
513
|
-
$exception_type: string;
|
|
514
|
-
$exception_message: string;
|
|
515
|
-
$exception_level: SeverityLevel;
|
|
516
|
-
$exception_source?: string;
|
|
517
|
-
$exception_lineno?: number;
|
|
518
|
-
$exception_colno?: number;
|
|
519
|
-
$exception_DOMException_code?: string;
|
|
520
|
-
$exception_is_synthetic?: boolean;
|
|
521
|
-
$exception_stack_trace_raw?: string;
|
|
522
|
-
$exception_handled?: boolean;
|
|
523
|
-
$exception_personURL?: string;
|
|
524
|
-
}
|
|
525
|
-
interface ErrorConversions {
|
|
526
|
-
errorToProperties: (args: ErrorEventArgs) => ErrorProperties;
|
|
527
|
-
unhandledRejectionToProperties: (args: [ev: PromiseRejectionEvent]) => ErrorProperties;
|
|
528
|
-
}
|
|
529
520
|
|
|
530
521
|
/**
|
|
531
522
|
* PostHog Persistence Object
|
|
@@ -650,6 +641,7 @@ declare class PostHogFeatureFlags {
|
|
|
650
641
|
resetGroupPropertiesForFlags(group_type?: string): void;
|
|
651
642
|
}
|
|
652
643
|
|
|
644
|
+
type SessionStartReason = 'sampling_override' | 'recording_initialized' | 'linked_flag_match' | 'linked_flag_override' | 'sampling' | 'session_id_changed';
|
|
653
645
|
declare class SessionRecording {
|
|
654
646
|
private readonly instance;
|
|
655
647
|
private _endpoint;
|
|
@@ -696,7 +688,7 @@ declare class SessionRecording {
|
|
|
696
688
|
private _onOffline;
|
|
697
689
|
private _onOnline;
|
|
698
690
|
private _onVisibilityChange;
|
|
699
|
-
startIfEnabledOrStop(): void;
|
|
691
|
+
startIfEnabledOrStop(startReason?: SessionStartReason): void;
|
|
700
692
|
stopRecording(): void;
|
|
701
693
|
private makeSamplingDecision;
|
|
702
694
|
afterDecideResponse(response: DecideResponse): void;
|
|
@@ -731,6 +723,15 @@ declare class SessionRecording {
|
|
|
731
723
|
* instead call `posthog.startSessionRecording({linked_flag: true})`
|
|
732
724
|
* */
|
|
733
725
|
overrideLinkedFlag(): void;
|
|
726
|
+
/**
|
|
727
|
+
* this ignores the sampling config and causes capture to start
|
|
728
|
+
* (if recording would have started had the flag been received i.e. it does not override other config).
|
|
729
|
+
*
|
|
730
|
+
* It is not usual to call this directly,
|
|
731
|
+
* instead call `posthog.startSessionRecording({sampling: true})`
|
|
732
|
+
* */
|
|
733
|
+
overrideSampling(): void;
|
|
734
|
+
private _reportStarted;
|
|
734
735
|
}
|
|
735
736
|
|
|
736
737
|
declare class Toolbar {
|
|
@@ -2104,4 +2105,4 @@ declare class PostHog {
|
|
|
2104
2105
|
|
|
2105
2106
|
declare const posthog: PostHog;
|
|
2106
2107
|
|
|
2107
|
-
export { type ActionStepStringMatching, type ActionStepType, type ActionType, type AutocaptureCompatibleElement, type AutocaptureConfig, type BasicSurveyQuestion, type BootstrapConfig, type Breaker, type CaptureOptions, type CaptureResult, type CapturedNetworkRequest, Compression, type DecideResponse, type DomAutocaptureEvents, type EarlyAccessFeature, type EarlyAccessFeatureCallback, type EarlyAccessFeatureResponse, type
|
|
2108
|
+
export { type ActionStepStringMatching, type ActionStepType, type ActionType, type AutocaptureCompatibleElement, type AutocaptureConfig, type BasicSurveyQuestion, type BootstrapConfig, type Breaker, type CaptureOptions, type CaptureResult, type CapturedNetworkRequest, Compression, type DecideResponse, type DomAutocaptureEvents, type EarlyAccessFeature, type EarlyAccessFeatureCallback, type EarlyAccessFeatureResponse, type ErrorEventArgs, type ErrorMetadata, type EventHandler, type FeatureFlagsCallback, type FlagVariant, type Headers, type HeatmapConfig, type InitiatorType, type IsFeatureEnabledOptions, type JsonRecord, type JsonType, type LinkSurveyQuestion, type MultipleSurveyQuestion, type NetworkRecordOptions, type NetworkRequest, type OptInOutCapturingOptions, type PerformanceCaptureConfig, type PersistentStore, PostHog, type PostHogConfig, type Properties, type Property, type QueuedRequestOptions, type RatingSurveyQuestion, type RequestCallback, type RequestOptions, type RequestResponse, type RetriableRequestOptions, type SessionIdChangedCallback, type SessionRecordingOptions, type SeverityLevel, type SnippetArrayItem, type SupportedWebVitalsMetrics, type Survey, type SurveyAppearance, type SurveyCallback, type SurveyElement, type SurveyQuestion, SurveyQuestionBranchingType, type SurveyQuestionDescriptionContentType, SurveyQuestionType, type SurveyRenderReason, type SurveyResponse, SurveyType, type SurveyUrlMatchType, type ToolbarParams, type ToolbarSource, type ToolbarUserIntent, type ToolbarVersion, posthog as default, posthog, severityLevels };
|