posthog-js 1.75.2 → 1.75.4
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/CHANGELOG.md +8 -0
- package/dist/array.full.js +2 -3
- package/dist/array.full.js.map +1 -1
- package/dist/array.js +2 -3
- package/dist/array.js.map +1 -1
- package/dist/es.js +2 -3
- package/dist/es.js.map +1 -1
- package/dist/module.d.ts +3 -22
- package/dist/module.js +2 -3
- package/dist/module.js.map +1 -1
- package/lib/package.json +1 -1
- package/package.json +1 -1
package/dist/module.d.ts
CHANGED
|
@@ -113,14 +113,6 @@ declare class Mirror implements IMirror<Node> {
|
|
|
113
113
|
reset(): void;
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
declare class CaptureMetrics {
|
|
117
|
-
enabled: boolean;
|
|
118
|
-
metrics: Record<string, number>;
|
|
119
|
-
constructor(enabled: boolean);
|
|
120
|
-
incr(key: string, by?: number): void;
|
|
121
|
-
decr(key: string): void;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
116
|
declare class RequestQueueScaffold {
|
|
125
117
|
isPolling: boolean;
|
|
126
118
|
_event_queue: any[];
|
|
@@ -141,13 +133,12 @@ declare class RateLimiter {
|
|
|
141
133
|
}
|
|
142
134
|
|
|
143
135
|
declare class RetryQueue extends RequestQueueScaffold {
|
|
144
|
-
captureMetrics: CaptureMetrics;
|
|
145
136
|
queue: RetryQueueElement[];
|
|
146
137
|
isPolling: boolean;
|
|
147
138
|
areWeOnline: boolean;
|
|
148
139
|
onXHRError: (failedRequest: XMLHttpRequest) => void;
|
|
149
140
|
rateLimiter: RateLimiter;
|
|
150
|
-
constructor(
|
|
141
|
+
constructor(onXHRError: (failedRequest: XMLHttpRequest) => void, rateLimiter: RateLimiter);
|
|
151
142
|
enqueue(requestData: QueuedRequestData): void;
|
|
152
143
|
poll(): void;
|
|
153
144
|
flush(): void;
|
|
@@ -252,7 +243,6 @@ interface PostHogConfig {
|
|
|
252
243
|
name: string;
|
|
253
244
|
callback_fn: string;
|
|
254
245
|
_onCapture: (eventName: string, eventData: CaptureResult) => void;
|
|
255
|
-
_capture_metrics: boolean;
|
|
256
246
|
capture_performance?: boolean;
|
|
257
247
|
disable_compression: boolean;
|
|
258
248
|
bootstrap: {
|
|
@@ -262,7 +252,6 @@ interface PostHogConfig {
|
|
|
262
252
|
featureFlagPayloads?: Record<string, JsonType>;
|
|
263
253
|
};
|
|
264
254
|
segment?: any;
|
|
265
|
-
uuid_version?: UUIDVersion;
|
|
266
255
|
}
|
|
267
256
|
interface OptInOutCapturingOptions {
|
|
268
257
|
capture: (event: string, properties: Properties, options: CaptureOptions) => void;
|
|
@@ -335,7 +324,6 @@ interface QueuedRequestData {
|
|
|
335
324
|
retriesPerformedSoFar?: number;
|
|
336
325
|
}
|
|
337
326
|
interface XHRParams extends QueuedRequestData {
|
|
338
|
-
captureMetrics: CaptureMetrics;
|
|
339
327
|
retryQueue: RetryQueue;
|
|
340
328
|
onXHRError: (req: XMLHttpRequest) => void;
|
|
341
329
|
timeout?: number;
|
|
@@ -1029,18 +1017,15 @@ declare class Toolbar {
|
|
|
1029
1017
|
}
|
|
1030
1018
|
|
|
1031
1019
|
declare class RequestQueue extends RequestQueueScaffold {
|
|
1032
|
-
captureMetrics: CaptureMetrics;
|
|
1033
1020
|
handlePollRequest: (url: string, data: Properties, options?: XHROptions) => void;
|
|
1034
|
-
constructor(
|
|
1021
|
+
constructor(handlePollRequest: (url: string, data: Properties, options?: XHROptions) => void, pollInterval?: number);
|
|
1035
1022
|
enqueue(url: string, data: Properties, options: XHROptions): void;
|
|
1036
1023
|
poll(): void;
|
|
1037
|
-
updateUnloadMetrics(): void;
|
|
1038
1024
|
unload(): void;
|
|
1039
1025
|
formatQueue(): Record<string, QueuedRequestData>;
|
|
1040
1026
|
}
|
|
1041
1027
|
|
|
1042
1028
|
declare class SessionIdManager {
|
|
1043
|
-
private uuidFn;
|
|
1044
1029
|
private config;
|
|
1045
1030
|
private persistence;
|
|
1046
1031
|
private _windowId;
|
|
@@ -1051,7 +1036,7 @@ declare class SessionIdManager {
|
|
|
1051
1036
|
private _sessionActivityTimestamp;
|
|
1052
1037
|
private _sessionTimeoutMs;
|
|
1053
1038
|
private _sessionIdChangedHandlers;
|
|
1054
|
-
constructor(config: Partial<PostHogConfig>, persistence: PostHogPersistence
|
|
1039
|
+
constructor(config: Partial<PostHogConfig>, persistence: PostHogPersistence);
|
|
1055
1040
|
onSessionId(callback: SessionIdChangedCallback): () => void;
|
|
1056
1041
|
private _canUseSessionStorage;
|
|
1057
1042
|
private _setWindowId;
|
|
@@ -1098,10 +1083,8 @@ declare class SentryIntegration implements _SentryIntegration {
|
|
|
1098
1083
|
}
|
|
1099
1084
|
|
|
1100
1085
|
declare class PageViewIdManager {
|
|
1101
|
-
private uuidFn;
|
|
1102
1086
|
_pageViewId: string | undefined;
|
|
1103
1087
|
_seenFirstPageView: boolean;
|
|
1104
|
-
constructor(uuidFn: () => string);
|
|
1105
1088
|
onPageview(): void;
|
|
1106
1089
|
getPageViewId(): string;
|
|
1107
1090
|
}
|
|
@@ -1209,7 +1192,6 @@ declare class PostHog {
|
|
|
1209
1192
|
sessionRecording: SessionRecording | undefined;
|
|
1210
1193
|
webPerformance: WebPerformanceObserver | undefined;
|
|
1211
1194
|
exceptionAutocapture: ExceptionObserver | undefined;
|
|
1212
|
-
_captureMetrics: CaptureMetrics;
|
|
1213
1195
|
_requestQueue: RequestQueue;
|
|
1214
1196
|
_retryQueue: RetryQueue;
|
|
1215
1197
|
_triggered_notifs: any;
|
|
@@ -1221,7 +1203,6 @@ declare class PostHog {
|
|
|
1221
1203
|
decideEndpointWasHit: boolean;
|
|
1222
1204
|
SentryIntegration: typeof SentryIntegration;
|
|
1223
1205
|
segmentIntegration: () => any;
|
|
1224
|
-
private uuidFn;
|
|
1225
1206
|
/** DEPRECATED: We keep this to support existing usage but now one should just call .setPersonProperties */
|
|
1226
1207
|
people: {
|
|
1227
1208
|
set: (prop: string | Properties, to?: string, callback?: RequestCallback) => void;
|