posthog-js 1.70.2 → 1.71.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
@@ -440,24 +440,6 @@ declare type NetworkRequest = {
440
440
  url: string;
441
441
  };
442
442
 
443
- /**
444
- * PostHog People Object
445
- * @constructor
446
- */
447
- declare class PostHogPeople {
448
- _posthog: PostHog;
449
- set: (prop: string | Properties, to?: string, callback?: RequestCallback) => void;
450
- set_once: (prop: string | Properties, to?: string, callback?: RequestCallback) => void;
451
- constructor(posthog: PostHog);
452
- toString(): string;
453
- _send_request(data: Properties, callback?: RequestCallback): Properties;
454
- _get_config<K extends keyof PostHogConfig>(conf_var: K): PostHogConfig[K];
455
- _is_reserved_property(prop: string): boolean;
456
- private set_action;
457
- private set_once_action;
458
- private apiActionParser;
459
- }
460
-
461
443
  /**
462
444
  * PostHog Persistence Object
463
445
  * @constructor
@@ -1204,7 +1186,6 @@ declare class PostHog {
1204
1186
  sessionPersistence: PostHogPersistence;
1205
1187
  sessionManager: SessionIdManager;
1206
1188
  pageViewIdManager: PageViewIdManager;
1207
- people: PostHogPeople;
1208
1189
  featureFlags: PostHogFeatureFlags;
1209
1190
  surveys: PostHogSurveys;
1210
1191
  toolbar: Toolbar;
@@ -1224,6 +1205,11 @@ declare class PostHog {
1224
1205
  SentryIntegration: typeof SentryIntegration;
1225
1206
  segmentIntegration: () => any;
1226
1207
  private uuidFn;
1208
+ /** DEPRECATED: We keep this to support existing usage but now one should just call .setPersonProperties */
1209
+ people: {
1210
+ set: (prop: string | Properties, to?: string, callback?: RequestCallback) => void;
1211
+ set_once: (prop: string | Properties, to?: string, callback?: RequestCallback) => void;
1212
+ };
1227
1213
  constructor();
1228
1214
  /**
1229
1215
  * This function initializes a new instance of the PostHog capturing object.
@@ -1457,6 +1443,14 @@ declare class PostHog {
1457
1443
  * @param {Object} [userPropertiesToSetOnce] Optional: An associative array of properties to store about the user. If property is previously set, this does not override that value.
1458
1444
  */
1459
1445
  identify(new_distinct_id?: string, userPropertiesToSet?: Properties, userPropertiesToSetOnce?: Properties): void;
1446
+ /**
1447
+ * Sets properties for the Person associated with the current distinct_id.
1448
+ *
1449
+ *
1450
+ * @param {Object} [userPropertiesToSet] Optional: An associative array of properties to store about the user
1451
+ * @param {Object} [userPropertiesToSetOnce] Optional: An associative array of properties to store about the user. If property is previously set, this does not override that value.
1452
+ */
1453
+ setPersonProperties(userPropertiesToSet?: Properties, userPropertiesToSetOnce?: Properties): void;
1460
1454
  /**
1461
1455
  * Alpha feature: don't use unless you know what you're doing!
1462
1456
  *