posthog-js-lite 2.4.0 → 2.5.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/CHANGELOG.md +5 -0
- package/lib/index.cjs.js +35 -8
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.d.ts +20 -3
- package/lib/index.esm.js +35 -8
- package/lib/index.esm.js.map +1 -1
- package/lib/posthog-core/src/index.d.ts +17 -2
- package/lib/posthog-core/src/types.d.ts +3 -1
- package/package.json +1 -1
|
@@ -74,6 +74,7 @@ export declare abstract class PostHogCore extends PostHogCoreStateless {
|
|
|
74
74
|
private flagCallReported;
|
|
75
75
|
protected _decideResponsePromise?: Promise<PostHogDecideResponse | undefined>;
|
|
76
76
|
protected _sessionExpirationTimeSeconds: number;
|
|
77
|
+
protected sessionProps: PostHogEventProperties;
|
|
77
78
|
constructor(apiKey: string, options?: PosthogCoreOptions);
|
|
78
79
|
protected setupBootstrap(options?: Partial<PosthogCoreOptions>): void;
|
|
79
80
|
private get props();
|
|
@@ -83,15 +84,19 @@ export declare abstract class PostHogCore extends PostHogCoreStateless {
|
|
|
83
84
|
on(event: string, cb: (...args: any[]) => void): () => void;
|
|
84
85
|
reset(propertiesToKeep?: PostHogPersistedProperty[]): void;
|
|
85
86
|
protected getCommonEventProperties(): any;
|
|
86
|
-
|
|
87
|
+
enrichProperties(properties?: PostHogEventProperties): any;
|
|
87
88
|
getSessionId(): string | undefined;
|
|
88
89
|
resetSessionId(): void;
|
|
89
90
|
getAnonymousId(): string;
|
|
90
91
|
getDistinctId(): string;
|
|
92
|
+
unregister(property: string): void;
|
|
91
93
|
register(properties: {
|
|
92
94
|
[key: string]: any;
|
|
93
95
|
}): void;
|
|
94
|
-
|
|
96
|
+
registerForSession(properties: {
|
|
97
|
+
[key: string]: any;
|
|
98
|
+
}): void;
|
|
99
|
+
unregisterForSession(property: string): void;
|
|
95
100
|
/***
|
|
96
101
|
*** TRACKING
|
|
97
102
|
***/
|
|
@@ -112,9 +117,19 @@ export declare abstract class PostHogCore extends PostHogCoreStateless {
|
|
|
112
117
|
/***
|
|
113
118
|
* PROPERTIES
|
|
114
119
|
***/
|
|
120
|
+
setPersonPropertiesForFlags(properties: {
|
|
121
|
+
[type: string]: string;
|
|
122
|
+
}): this;
|
|
123
|
+
resetPersonPropertiesForFlags(): void;
|
|
124
|
+
/** @deprecated - Renamed to setPersonPropertiesForFlags */
|
|
115
125
|
personProperties(properties: {
|
|
116
126
|
[type: string]: string;
|
|
117
127
|
}): this;
|
|
128
|
+
setGroupPropertiesForFlags(properties: {
|
|
129
|
+
[type: string]: Record<string, string>;
|
|
130
|
+
}): this;
|
|
131
|
+
resetGroupPropertiesForFlags(): void;
|
|
132
|
+
/** @deprecated - Renamed to setGroupPropertiesForFlags */
|
|
118
133
|
groupProperties(properties: {
|
|
119
134
|
[type: string]: Record<string, string>;
|
|
120
135
|
}): this;
|
|
@@ -30,7 +30,9 @@ export declare enum PostHogPersistedProperty {
|
|
|
30
30
|
SessionId = "session_id",
|
|
31
31
|
SessionLastTimestamp = "session_timestamp",
|
|
32
32
|
PersonProperties = "person_properties",
|
|
33
|
-
GroupProperties = "group_properties"
|
|
33
|
+
GroupProperties = "group_properties",
|
|
34
|
+
InstalledAppBuild = "installed_app_build",
|
|
35
|
+
InstalledAppVersion = "installed_app_version"
|
|
34
36
|
}
|
|
35
37
|
export declare type PostHogFetchOptions = {
|
|
36
38
|
method: 'GET' | 'POST' | 'PUT' | 'PATCH';
|