posthog-react-native 2.1.1 → 2.1.2

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.
@@ -26,7 +26,6 @@ export declare abstract class PostHogCore {
26
26
  private _optoutOverride;
27
27
  constructor(apiKey: string, options?: PosthogCoreOptions);
28
28
  protected getCommonEventProperties(): any;
29
- protected setupBootstrap(options?: Partial<PosthogCoreOptions>): void;
30
29
  private get props();
31
30
  private set props(value);
32
31
  private clearProps;
@@ -77,7 +76,6 @@ export declare abstract class PostHogCore {
77
76
  ***/
78
77
  private decideAsync;
79
78
  private _decideAsync;
80
- private setKnownFeatureFlags;
81
79
  getFeatureFlag(key: string): boolean | string | undefined;
82
80
  getFeatureFlags(): PostHogDecideResponse['featureFlags'] | undefined;
83
81
  isFeatureEnabled(key: string): boolean | undefined;
@@ -5,11 +5,6 @@ export declare type PosthogCoreOptions = {
5
5
  enable?: boolean;
6
6
  sendFeatureFlagEvent?: boolean;
7
7
  preloadFeatureFlags?: boolean;
8
- bootstrap?: {
9
- distinctId?: string;
10
- isIdentifiedId?: boolean;
11
- featureFlags?: Record<string, boolean | string>;
12
- };
13
8
  fetchRetryCount?: number;
14
9
  fetchRetryDelay?: number;
15
10
  sessionExpirationTimeSeconds?: number;
@@ -35,8 +30,7 @@ export declare type PostHogFetchOptions = {
35
30
  headers: {
36
31
  [key: string]: string;
37
32
  };
38
- body?: string;
39
- signal?: AbortSignal;
33
+ body: string;
40
34
  };
41
35
  export declare type PostHogFetchResponse = {
42
36
  status: number;
@@ -0,0 +1,14 @@
1
+ import { PostHogCore, PosthogCoreOptions, PostHogFetchOptions, PostHogFetchResponse, PostHogPersistedProperty } from 'posthog-core';
2
+ export interface PostHogReactNativeOptions extends PosthogCoreOptions {
3
+ }
4
+ export declare class PostHogReactNative extends PostHogCore {
5
+ constructor(apiKey: string, options?: PostHogReactNativeOptions);
6
+ getPersistedProperty<T>(key: PostHogPersistedProperty): T | undefined;
7
+ setPersistedProperty<T>(key: PostHogPersistedProperty, value: T | null): void;
8
+ fetch(url: string, options: PostHogFetchOptions): Promise<PostHogFetchResponse>;
9
+ getLibraryId(): string;
10
+ getLibraryVersion(): string;
11
+ getCustomUserAgent(): void;
12
+ getCommonEventProperties(): any;
13
+ screen(name: string, properties?: any): void;
14
+ }
@@ -9,7 +9,5 @@ export declare type PostHogAutocaptureOptions = {
9
9
  maxElementsCaptured?: number;
10
10
  ignoreLabels?: string[];
11
11
  propsToCapture?: string[];
12
- captureScreens?: boolean;
13
12
  navigation?: PostHogAutocaptureNavigationTrackerOptions;
14
- captureLifecycleEvents?: boolean;
15
13
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "posthog-react-native",
3
- "version": "2.1.1",
3
+ "version": "2.1.2",
4
4
  "main": "lib/index.cjs.js",
5
5
  "module": "lib/index.esm.js",
6
6
  "types": "lib/index.d.ts",
package/CHANGELOG.md DELETED
@@ -1,8 +0,0 @@
1
- # 2.1.1 - 2022-09-09
2
-
3
- 1. Support for bootstrapping feature flags and distinctIDs. This allows you to initialise the library with a set of feature flags and distinctID that are immediately available.
4
- # 2.1.0 - 2022-09-02
5
-
6
- What's new:
7
-
8
- 1. PosthogProvider `autocapture` can be configured with `captureLifecycleEvents: false` and `captureScreens: false` if you want do disable these autocapture elements. Both of these default to `true`
@@ -1,35 +0,0 @@
1
- export function __extends(d: any, b: any): void;
2
- export function __rest(s: any, e: any): {};
3
- export function __decorate(decorators: any, target: any, key: any, desc: any, ...args: any[]): any;
4
- export function __param(paramIndex: any, decorator: any): (target: any, key: any) => void;
5
- export function __metadata(metadataKey: any, metadataValue: any): any;
6
- export function __awaiter(thisArg: any, _arguments: any, P: any, generator: any): any;
7
- export function __generator(thisArg: any, body: any): {
8
- next: (v: any) => any;
9
- throw: (v: any) => any;
10
- return: (v: any) => any;
11
- };
12
- export function __exportStar(m: any, o: any): void;
13
- export function __values(o: any): any;
14
- export function __read(o: any, n: any): any;
15
- /** @deprecated */
16
- export function __spread(...args: any[]): any[];
17
- /** @deprecated */
18
- export function __spreadArrays(...args: any[]): any[];
19
- export function __spreadArray(to: any, from: any, pack: any, ...args: any[]): any;
20
- export function __await(v: any): __await;
21
- export class __await {
22
- constructor(v: any);
23
- v: any;
24
- }
25
- export function __asyncGenerator(thisArg: any, _arguments: any, generator: any): {};
26
- export function __asyncDelegator(o: any): {};
27
- export function __asyncValues(o: any): any;
28
- export function __makeTemplateObject(cooked: any, raw: any): any;
29
- export function __importStar(mod: any): any;
30
- export function __importDefault(mod: any): any;
31
- export function __classPrivateFieldGet(receiver: any, state: any, kind: any, f: any): any;
32
- export function __classPrivateFieldSet(receiver: any, state: any, value: any, kind: any, f: any): any;
33
- export function __classPrivateFieldIn(state: any, receiver: any): any;
34
- export function __assign(...args: any[]): any;
35
- export function __createBinding(o: any, m: any, k: any, k2: any): void;