posthog-js 1.158.3 → 1.160.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/module.d.ts CHANGED
@@ -1660,14 +1660,12 @@ declare class ConsentManager {
1660
1660
  }
1661
1661
 
1662
1662
  declare class ExceptionObserver {
1663
- private _endpointSuffix;
1664
1663
  instance: PostHog;
1665
1664
  remoteEnabled: boolean | undefined;
1666
1665
  private originalOnUnhandledRejectionHandler;
1667
1666
  private unwrapOnError;
1668
1667
  private unwrapUnhandledRejection;
1669
1668
  constructor(instance: PostHog);
1670
- get endpoint(): string;
1671
1669
  get isEnabled(): boolean;
1672
1670
  get isCapturing(): boolean;
1673
1671
  get hasHandlers(): ((this: WindowEventHandlers, ev: PromiseRejectionEvent) => any) | undefined;
@@ -1677,12 +1675,6 @@ declare class ExceptionObserver {
1677
1675
  private stopCapturing;
1678
1676
  afterDecideResponse(response: DecideResponse): void;
1679
1677
  captureException(errorProperties: Properties): void;
1680
- /**
1681
- * :TRICKY: Make sure we batch these requests
1682
- */
1683
- sendExceptionEvent(properties: {
1684
- [key: string]: any;
1685
- }): void;
1686
1678
  }
1687
1679
 
1688
1680
  declare class WebVitalsAutocapture {
@@ -1703,6 +1695,18 @@ declare class WebVitalsAutocapture {
1703
1695
  private _startCapturing;
1704
1696
  }
1705
1697
 
1698
+ declare class PostHogExceptions {
1699
+ private readonly instance;
1700
+ private _endpointSuffix;
1701
+ constructor(instance: PostHog);
1702
+ get endpoint(): string;
1703
+ afterDecideResponse(response: DecideResponse): void;
1704
+ /**
1705
+ * :TRICKY: Make sure we batch these requests
1706
+ */
1707
+ sendExceptionEvent(properties: Properties): void;
1708
+ }
1709
+
1706
1710
  type OnlyValidKeys<T, Shape> = T extends Shape ? (Exclude<keyof T, keyof Shape> extends never ? T : never) : never;
1707
1711
  declare class DeprecatedWebPerformanceObserver {
1708
1712
  get _forceAllowLocalhost(): boolean;
@@ -1722,6 +1726,7 @@ declare class PostHog {
1722
1726
  featureFlags: PostHogFeatureFlags;
1723
1727
  surveys: PostHogSurveys;
1724
1728
  toolbar: Toolbar;
1729
+ exceptions: PostHogExceptions;
1725
1730
  consent: ConsentManager;
1726
1731
  persistence?: PostHogPersistence;
1727
1732
  sessionPersistence?: PostHogPersistence;
@@ -1736,6 +1741,7 @@ declare class PostHog {
1736
1741
  _retryQueue?: RetryQueue;
1737
1742
  sessionRecording?: SessionRecording;
1738
1743
  webPerformance: DeprecatedWebPerformanceObserver;
1744
+ _initialPageviewCaptured: boolean;
1739
1745
  _triggered_notifs: any;
1740
1746
  compression?: Compression;
1741
1747
  __request_queue: QueuedRequestOptions[];
@@ -2249,6 +2255,8 @@ declare class PostHog {
2249
2255
  * is currently running
2250
2256
  */
2251
2257
  sessionRecordingStarted(): boolean;
2258
+ /** Capture a caught exception manually */
2259
+ captureException(error: Error, additionalProperties?: Properties): void;
2252
2260
  /**
2253
2261
  * returns a boolean indicating whether the toolbar loaded
2254
2262
  * @param toolbarParams
@@ -2384,6 +2392,7 @@ declare class PostHog {
2384
2392
  */
2385
2393
  clear_opt_in_out_capturing(): void;
2386
2394
  _is_bot(): boolean | undefined;
2395
+ _captureInitialPageview(): void;
2387
2396
  debug(debug?: boolean): void;
2388
2397
  }
2389
2398