Skip to content

Commit 3d0e8b8

Browse files
authored
Merge pull request #240 from Flagsmith/feat/transient-identities-and-traits
feat!: Support transient identities and traits
2 parents 8d91a1c + 10d1bcb commit 3d0e8b8

20 files changed

+2142
-207
lines changed

evaluation-context.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
export interface EvaluationContext {
2+
environment?: null | EnvironmentEvaluationContext;
3+
feature?: null | FeatureEvaluationContext;
4+
identity?: null | IdentityEvaluationContext;
5+
[property: string]: any;
6+
}
7+
8+
export interface EnvironmentEvaluationContext {
9+
apiKey: string;
10+
[property: string]: any;
11+
}
12+
13+
export interface FeatureEvaluationContext {
14+
name: string;
15+
[property: string]: any;
16+
}
17+
18+
export interface IdentityEvaluationContext {
19+
identifier?: null | string;
20+
traits?: { [key: string]: null | TraitEvaluationContext };
21+
transient?: boolean | null;
22+
[property: string]: any;
23+
}
24+
25+
export interface TraitEvaluationContext {
26+
transient?: boolean;
27+
value: any;
28+
[property: string]: any;
29+
}

flagsmith-core.ts

Lines changed: 166 additions & 110 deletions
Large diffs are not rendered by default.

lib/flagsmith-es/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "flagsmith-es",
3-
"version": "4.1.4",
3+
"version": "5.0.0",
44
"description": "Feature flagging to support continuous development. This is an esm equivalent of the standard flagsmith npm module.",
55
"main": "./index.js",
66
"type": "module",

lib/flagsmith/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "flagsmith",
3-
"version": "4.1.4",
3+
"version": "5.0.0",
44
"description": "Feature flagging to support continuous development",
55
"main": "./index.js",
66
"repository": {

lib/react-native-flagsmith/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-flagsmith",
3-
"version": "4.1.4",
3+
"version": "5.0.0",
44
"description": "Feature flagging to support continuous development",
55
"main": "./index.js",
66
"repository": {

0 commit comments

Comments
 (0)