@schematichq/schematic-react 1.0.3 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +50 -1
- package/dist/schematic-react.cjs.js +290 -90
- package/dist/schematic-react.d.ts +11 -6
- package/dist/schematic-react.esm.js +287 -87
- package/package.json +2 -2
@@ -1,22 +1,25 @@
|
|
1
|
+
import { CheckFlagReturn } from '@schematichq/schematic-js';
|
1
2
|
import { Event as Event_2 } from '@schematichq/schematic-js';
|
2
3
|
import { EventBody } from '@schematichq/schematic-js';
|
3
4
|
import { EventBodyIdentify } from '@schematichq/schematic-js';
|
4
5
|
import { EventBodyTrack } from '@schematichq/schematic-js';
|
5
6
|
import { EventType } from '@schematichq/schematic-js';
|
6
|
-
import { FlagCheckResponseBody } from '@schematichq/schematic-js';
|
7
|
-
import { FlagCheckWithKeyResponseBody } from '@schematichq/schematic-js';
|
8
7
|
import { Keys } from '@schematichq/schematic-js';
|
9
8
|
import { default as React_2 } from 'react';
|
9
|
+
import { RuleType } from '@schematichq/schematic-js';
|
10
10
|
import { Schematic } from '@schematichq/schematic-js';
|
11
11
|
import { SchematicContext } from '@schematichq/schematic-js';
|
12
12
|
import * as SchematicJS from '@schematichq/schematic-js';
|
13
13
|
import { SchematicOptions } from '@schematichq/schematic-js';
|
14
14
|
import { Traits } from '@schematichq/schematic-js';
|
15
|
+
import { UsagePeriod } from '@schematichq/schematic-js';
|
15
16
|
|
16
17
|
declare type BaseSchematicProviderProps = Omit<SchematicJS.SchematicOptions, "client" | "publishableKey"> & {
|
17
18
|
children: React_2.ReactNode;
|
18
19
|
};
|
19
20
|
|
21
|
+
export { CheckFlagReturn }
|
22
|
+
|
20
23
|
export { Event_2 as Event }
|
21
24
|
|
22
25
|
export { EventBody }
|
@@ -27,12 +30,10 @@ export { EventBodyTrack }
|
|
27
30
|
|
28
31
|
export { EventType }
|
29
32
|
|
30
|
-
export { FlagCheckResponseBody }
|
31
|
-
|
32
|
-
export { FlagCheckWithKeyResponseBody }
|
33
|
-
|
34
33
|
export { Keys }
|
35
34
|
|
35
|
+
export { RuleType }
|
36
|
+
|
36
37
|
export { Schematic }
|
37
38
|
|
38
39
|
export { SchematicContext }
|
@@ -63,12 +64,16 @@ declare type SchematicProviderPropsWithPublishableKey = BaseSchematicProviderPro
|
|
63
64
|
|
64
65
|
export { Traits }
|
65
66
|
|
67
|
+
export { UsagePeriod }
|
68
|
+
|
66
69
|
export declare const useSchematic: () => SchematicContextProps;
|
67
70
|
|
68
71
|
export declare const useSchematicContext: (opts?: SchematicHookOpts) => {
|
69
72
|
setContext: (context: SchematicJS.SchematicContext) => Promise<void>;
|
70
73
|
};
|
71
74
|
|
75
|
+
export declare const useSchematicEntitlement: (key: string, opts?: UseSchematicFlagOpts) => SchematicJS.CheckFlagReturn;
|
76
|
+
|
72
77
|
export declare const useSchematicEvents: (opts?: SchematicHookOpts) => {
|
73
78
|
track: (body: SchematicJS.EventBodyTrack) => Promise<void>;
|
74
79
|
identify: (body: SchematicJS.EventBodyIdentify) => Promise<void>;
|