@contractspec/lib.feature-flags 1.57.0 → 1.59.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/browser/contracts/index.js +636 -0
- package/dist/browser/docs/feature-flags.docblock.js +71 -0
- package/dist/browser/docs/index.js +71 -0
- package/dist/browser/entities/index.js +306 -0
- package/dist/browser/evaluation/index.js +223 -0
- package/dist/browser/events.js +296 -0
- package/dist/browser/feature-flags.capability.js +28 -0
- package/dist/browser/feature-flags.feature.js +55 -0
- package/dist/browser/index.js +1583 -0
- package/dist/contracts/index.d.ts +944 -950
- package/dist/contracts/index.d.ts.map +1 -1
- package/dist/contracts/index.js +635 -906
- package/dist/docs/feature-flags.docblock.d.ts +2 -1
- package/dist/docs/feature-flags.docblock.d.ts.map +1 -0
- package/dist/docs/feature-flags.docblock.js +18 -22
- package/dist/docs/index.d.ts +2 -1
- package/dist/docs/index.d.ts.map +1 -0
- package/dist/docs/index.js +72 -1
- package/dist/entities/index.d.ts +159 -164
- package/dist/entities/index.d.ts.map +1 -1
- package/dist/entities/index.js +297 -315
- package/dist/evaluation/index.d.ts +119 -122
- package/dist/evaluation/index.d.ts.map +1 -1
- package/dist/evaluation/index.js +215 -212
- package/dist/events.d.ts +480 -486
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +272 -511
- package/dist/feature-flags.capability.d.ts +2 -7
- package/dist/feature-flags.capability.d.ts.map +1 -1
- package/dist/feature-flags.capability.js +29 -25
- package/dist/feature-flags.feature.d.ts +1 -6
- package/dist/feature-flags.feature.d.ts.map +1 -1
- package/dist/feature-flags.feature.js +54 -146
- package/dist/index.d.ts +7 -6
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1584 -8
- package/dist/node/contracts/index.js +636 -0
- package/dist/node/docs/feature-flags.docblock.js +71 -0
- package/dist/node/docs/index.js +71 -0
- package/dist/node/entities/index.js +306 -0
- package/dist/node/evaluation/index.js +223 -0
- package/dist/node/events.js +296 -0
- package/dist/node/feature-flags.capability.js +28 -0
- package/dist/node/feature-flags.feature.js +55 -0
- package/dist/node/index.js +1583 -0
- package/package.json +117 -30
- package/dist/contracts/index.js.map +0 -1
- package/dist/docs/feature-flags.docblock.js.map +0 -1
- package/dist/entities/index.js.map +0 -1
- package/dist/evaluation/index.js.map +0 -1
- package/dist/events.js.map +0 -1
- package/dist/feature-flags.capability.js.map +0 -1
- package/dist/feature-flags.feature.js.map +0 -1
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export {};
|
|
2
|
+
//# sourceMappingURL=feature-flags.docblock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature-flags.docblock.d.ts","sourceRoot":"","sources":["../../src/docs/feature-flags.docblock.ts"],"names":[],"mappings":""}
|
|
@@ -1,19 +1,16 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// src/docs/feature-flags.docblock.ts
|
|
1
3
|
import { registerDocBlocks } from "@contractspec/lib.contracts/docs";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"feature-flags",
|
|
13
|
-
"experiments",
|
|
14
|
-
"progressive-delivery"
|
|
15
|
-
],
|
|
16
|
-
body: `## What this module provides
|
|
4
|
+
var featureFlagsDocBlocks = [
|
|
5
|
+
{
|
|
6
|
+
id: "docs.feature-flags.overview",
|
|
7
|
+
title: "Feature Flags & Experiments",
|
|
8
|
+
summary: "Reusable, spec-first feature flag and experiment module with targeting, gradual rollout, multivariate variants, and evaluation logging.",
|
|
9
|
+
kind: "reference",
|
|
10
|
+
visibility: "public",
|
|
11
|
+
route: "/docs/feature-flags/overview",
|
|
12
|
+
tags: ["feature-flags", "experiments", "progressive-delivery"],
|
|
13
|
+
body: `## What this module provides
|
|
17
14
|
|
|
18
15
|
- **Entities**: FeatureFlag, FlagTargetingRule, Experiment, ExperimentAssignment, FlagEvaluation.
|
|
19
16
|
- **Contracts**: create/update/delete/toggle/list/get flags; create/delete rules; evaluate flags; create/start/stop/get experiments.
|
|
@@ -37,7 +34,7 @@ registerDocBlocks([{
|
|
|
37
34
|
|
|
38
35
|
## Usage example
|
|
39
36
|
|
|
40
|
-
|
|
37
|
+
${"```"}ts
|
|
41
38
|
import {
|
|
42
39
|
FlagEvaluator,
|
|
43
40
|
InMemoryFlagRepository,
|
|
@@ -61,16 +58,15 @@ const result = await evaluator.evaluate('new_dashboard', {
|
|
|
61
58
|
if (result.enabled) {
|
|
62
59
|
// serve the new dashboard
|
|
63
60
|
}
|
|
64
|
-
|
|
61
|
+
${"```"},
|
|
65
62
|
|
|
66
63
|
## Guardrails
|
|
67
64
|
|
|
68
65
|
- Keep flag keys stable and human-readable; avoid PII in context.
|
|
69
|
-
- Ensure experiments
|
|
66
|
+
- Ensure experiments\u2019 variant percentages sum to 100; default flag status to OFF.
|
|
70
67
|
- Use org-scoped flags for multi-tenant isolation.
|
|
71
68
|
- Log evaluations only when needed to control volume; prefer sampling for noisy paths.
|
|
72
69
|
`
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
//# sourceMappingURL=feature-flags.docblock.js.map
|
|
70
|
+
}
|
|
71
|
+
];
|
|
72
|
+
registerDocBlocks(featureFlagsDocBlocks);
|
package/dist/docs/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import './feature-flags.docblock';
|
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/docs/index.ts"],"names":[],"mappings":"AAAA,OAAO,0BAA0B,CAAC"}
|
package/dist/docs/index.js
CHANGED
|
@@ -1 +1,72 @@
|
|
|
1
|
-
|
|
1
|
+
// @bun
|
|
2
|
+
// src/docs/feature-flags.docblock.ts
|
|
3
|
+
import { registerDocBlocks } from "@contractspec/lib.contracts/docs";
|
|
4
|
+
var featureFlagsDocBlocks = [
|
|
5
|
+
{
|
|
6
|
+
id: "docs.feature-flags.overview",
|
|
7
|
+
title: "Feature Flags & Experiments",
|
|
8
|
+
summary: "Reusable, spec-first feature flag and experiment module with targeting, gradual rollout, multivariate variants, and evaluation logging.",
|
|
9
|
+
kind: "reference",
|
|
10
|
+
visibility: "public",
|
|
11
|
+
route: "/docs/feature-flags/overview",
|
|
12
|
+
tags: ["feature-flags", "experiments", "progressive-delivery"],
|
|
13
|
+
body: `## What this module provides
|
|
14
|
+
|
|
15
|
+
- **Entities**: FeatureFlag, FlagTargetingRule, Experiment, ExperimentAssignment, FlagEvaluation.
|
|
16
|
+
- **Contracts**: create/update/delete/toggle/list/get flags; create/delete rules; evaluate flags; create/start/stop/get experiments.
|
|
17
|
+
- **Events**: flag.created/updated/deleted/toggled, rule.created/deleted, experiment.created/started/stopped, flag.evaluated, experiment.variant_assigned.
|
|
18
|
+
- **Evaluation Engine**: Deterministic evaluator with gradual rollout, rule priority, audience filters, and experiment bucketing.
|
|
19
|
+
|
|
20
|
+
## How to use
|
|
21
|
+
|
|
22
|
+
1) Compose schema
|
|
23
|
+
- Add \`featureFlagsSchemaContribution\` to your module composition.
|
|
24
|
+
|
|
25
|
+
2) Register contracts/events
|
|
26
|
+
- Import exports from \`@contractspec/lib.feature-flags\` into your spec registry.
|
|
27
|
+
|
|
28
|
+
3) Evaluate at runtime
|
|
29
|
+
- Instantiate \`FlagEvaluator\` with a repository implementation and optional logger.
|
|
30
|
+
- Evaluate with context attributes (userId, orgId, plan, segment, sessionId, attributes).
|
|
31
|
+
|
|
32
|
+
4) Wire observability
|
|
33
|
+
- Emit audit trail on config changes; emit \`flag.evaluated\` for analytics.
|
|
34
|
+
|
|
35
|
+
## Usage example
|
|
36
|
+
|
|
37
|
+
${"```"}ts
|
|
38
|
+
import {
|
|
39
|
+
FlagEvaluator,
|
|
40
|
+
InMemoryFlagRepository,
|
|
41
|
+
} from '@contractspec/lib.feature-flags';
|
|
42
|
+
|
|
43
|
+
const repo = new InMemoryFlagRepository();
|
|
44
|
+
repo.addFlag({
|
|
45
|
+
id: 'flag-1',
|
|
46
|
+
key: 'new_dashboard',
|
|
47
|
+
status: 'GRADUAL',
|
|
48
|
+
defaultValue: false,
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
const evaluator = new FlagEvaluator({ repository: repo });
|
|
52
|
+
const result = await evaluator.evaluate('new_dashboard', {
|
|
53
|
+
userId: 'user-123',
|
|
54
|
+
orgId: 'org-456',
|
|
55
|
+
plan: 'pro',
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
if (result.enabled) {
|
|
59
|
+
// serve the new dashboard
|
|
60
|
+
}
|
|
61
|
+
${"```"},
|
|
62
|
+
|
|
63
|
+
## Guardrails
|
|
64
|
+
|
|
65
|
+
- Keep flag keys stable and human-readable; avoid PII in context.
|
|
66
|
+
- Ensure experiments\u2019 variant percentages sum to 100; default flag status to OFF.
|
|
67
|
+
- Use org-scoped flags for multi-tenant isolation.
|
|
68
|
+
- Log evaluations only when needed to control volume; prefer sampling for noisy paths.
|
|
69
|
+
`
|
|
70
|
+
}
|
|
71
|
+
];
|
|
72
|
+
registerDocBlocks(featureFlagsDocBlocks);
|
package/dist/entities/index.d.ts
CHANGED
|
@@ -1,201 +1,196 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ModuleSchemaContribution } from "@contractspec/lib.schema";
|
|
3
|
-
|
|
4
|
-
//#region src/entities/index.d.ts
|
|
1
|
+
import type { ModuleSchemaContribution } from '@contractspec/lib.schema';
|
|
5
2
|
/**
|
|
6
3
|
* Feature flag status enum.
|
|
7
4
|
*/
|
|
8
|
-
declare const FlagStatusEnum:
|
|
5
|
+
export declare const FlagStatusEnum: import("@contractspec/lib.schema").EntityEnumDef;
|
|
9
6
|
/**
|
|
10
7
|
* Targeting rule operator enum.
|
|
11
8
|
*/
|
|
12
|
-
declare const RuleOperatorEnum:
|
|
9
|
+
export declare const RuleOperatorEnum: import("@contractspec/lib.schema").EntityEnumDef;
|
|
13
10
|
/**
|
|
14
11
|
* Experiment status enum.
|
|
15
12
|
*/
|
|
16
|
-
declare const ExperimentStatusEnum:
|
|
13
|
+
export declare const ExperimentStatusEnum: import("@contractspec/lib.schema").EntityEnumDef;
|
|
17
14
|
/**
|
|
18
15
|
* FeatureFlag entity - defines a feature flag.
|
|
19
16
|
*/
|
|
20
|
-
declare const FeatureFlagEntity:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
17
|
+
export declare const FeatureFlagEntity: import("@contractspec/lib.schema").EntitySpec<{
|
|
18
|
+
id: import("@contractspec/lib.schema").EntityScalarField;
|
|
19
|
+
key: import("@contractspec/lib.schema").EntityScalarField;
|
|
20
|
+
name: import("@contractspec/lib.schema").EntityScalarField;
|
|
21
|
+
description: import("@contractspec/lib.schema").EntityScalarField;
|
|
22
|
+
status: import("@contractspec/lib.schema").EntityEnumField;
|
|
23
|
+
defaultValue: import("@contractspec/lib.schema").EntityScalarField;
|
|
24
|
+
variants: import("@contractspec/lib.schema").EntityScalarField;
|
|
25
|
+
orgId: import("@contractspec/lib.schema").EntityScalarField;
|
|
26
|
+
tags: import("@contractspec/lib.schema").EntityScalarField;
|
|
27
|
+
metadata: import("@contractspec/lib.schema").EntityScalarField;
|
|
28
|
+
createdAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
29
|
+
updatedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
30
|
+
targetingRules: import("@contractspec/lib.schema").EntityRelationField;
|
|
31
|
+
experiments: import("@contractspec/lib.schema").EntityRelationField;
|
|
32
|
+
evaluations: import("@contractspec/lib.schema").EntityRelationField;
|
|
36
33
|
}>;
|
|
37
34
|
/**
|
|
38
35
|
* FlagTargetingRule entity - conditions for targeting.
|
|
39
36
|
*/
|
|
40
|
-
declare const FlagTargetingRuleEntity:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
37
|
+
export declare const FlagTargetingRuleEntity: import("@contractspec/lib.schema").EntitySpec<{
|
|
38
|
+
id: import("@contractspec/lib.schema").EntityScalarField;
|
|
39
|
+
flagId: import("@contractspec/lib.schema").EntityScalarField;
|
|
40
|
+
name: import("@contractspec/lib.schema").EntityScalarField;
|
|
41
|
+
priority: import("@contractspec/lib.schema").EntityScalarField;
|
|
42
|
+
enabled: import("@contractspec/lib.schema").EntityScalarField;
|
|
43
|
+
attribute: import("@contractspec/lib.schema").EntityScalarField;
|
|
44
|
+
operator: import("@contractspec/lib.schema").EntityEnumField;
|
|
45
|
+
value: import("@contractspec/lib.schema").EntityScalarField;
|
|
46
|
+
rolloutPercentage: import("@contractspec/lib.schema").EntityScalarField;
|
|
47
|
+
serveValue: import("@contractspec/lib.schema").EntityScalarField;
|
|
48
|
+
serveVariant: import("@contractspec/lib.schema").EntityScalarField;
|
|
49
|
+
createdAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
50
|
+
updatedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
51
|
+
flag: import("@contractspec/lib.schema").EntityRelationField;
|
|
55
52
|
}>;
|
|
56
53
|
/**
|
|
57
54
|
* Experiment entity - A/B test configuration.
|
|
58
55
|
*/
|
|
59
|
-
declare const ExperimentEntity:
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
56
|
+
export declare const ExperimentEntity: import("@contractspec/lib.schema").EntitySpec<{
|
|
57
|
+
id: import("@contractspec/lib.schema").EntityScalarField;
|
|
58
|
+
key: import("@contractspec/lib.schema").EntityScalarField;
|
|
59
|
+
name: import("@contractspec/lib.schema").EntityScalarField;
|
|
60
|
+
description: import("@contractspec/lib.schema").EntityScalarField;
|
|
61
|
+
hypothesis: import("@contractspec/lib.schema").EntityScalarField;
|
|
62
|
+
flagId: import("@contractspec/lib.schema").EntityScalarField;
|
|
63
|
+
status: import("@contractspec/lib.schema").EntityEnumField;
|
|
64
|
+
variants: import("@contractspec/lib.schema").EntityScalarField;
|
|
65
|
+
metrics: import("@contractspec/lib.schema").EntityScalarField;
|
|
66
|
+
audiencePercentage: import("@contractspec/lib.schema").EntityScalarField;
|
|
67
|
+
audienceFilter: import("@contractspec/lib.schema").EntityScalarField;
|
|
68
|
+
scheduledStartAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
69
|
+
scheduledEndAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
70
|
+
startedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
71
|
+
endedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
72
|
+
winningVariant: import("@contractspec/lib.schema").EntityScalarField;
|
|
73
|
+
results: import("@contractspec/lib.schema").EntityScalarField;
|
|
74
|
+
orgId: import("@contractspec/lib.schema").EntityScalarField;
|
|
75
|
+
createdAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
76
|
+
updatedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
77
|
+
flag: import("@contractspec/lib.schema").EntityRelationField;
|
|
78
|
+
assignments: import("@contractspec/lib.schema").EntityRelationField;
|
|
82
79
|
}>;
|
|
83
80
|
/**
|
|
84
81
|
* ExperimentAssignment entity - tracks which variant a subject is assigned to.
|
|
85
82
|
*/
|
|
86
|
-
declare const ExperimentAssignmentEntity:
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
83
|
+
export declare const ExperimentAssignmentEntity: import("@contractspec/lib.schema").EntitySpec<{
|
|
84
|
+
id: import("@contractspec/lib.schema").EntityScalarField;
|
|
85
|
+
experimentId: import("@contractspec/lib.schema").EntityScalarField;
|
|
86
|
+
subjectType: import("@contractspec/lib.schema").EntityScalarField;
|
|
87
|
+
subjectId: import("@contractspec/lib.schema").EntityScalarField;
|
|
88
|
+
variant: import("@contractspec/lib.schema").EntityScalarField;
|
|
89
|
+
bucket: import("@contractspec/lib.schema").EntityScalarField;
|
|
90
|
+
context: import("@contractspec/lib.schema").EntityScalarField;
|
|
91
|
+
assignedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
92
|
+
experiment: import("@contractspec/lib.schema").EntityRelationField;
|
|
96
93
|
}>;
|
|
97
94
|
/**
|
|
98
95
|
* FlagEvaluation entity - evaluation log for analytics.
|
|
99
96
|
*/
|
|
100
|
-
declare const FlagEvaluationEntity:
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
97
|
+
export declare const FlagEvaluationEntity: import("@contractspec/lib.schema").EntitySpec<{
|
|
98
|
+
id: import("@contractspec/lib.schema").EntityScalarField;
|
|
99
|
+
flagId: import("@contractspec/lib.schema").EntityScalarField;
|
|
100
|
+
flagKey: import("@contractspec/lib.schema").EntityScalarField;
|
|
101
|
+
subjectType: import("@contractspec/lib.schema").EntityScalarField;
|
|
102
|
+
subjectId: import("@contractspec/lib.schema").EntityScalarField;
|
|
103
|
+
result: import("@contractspec/lib.schema").EntityScalarField;
|
|
104
|
+
variant: import("@contractspec/lib.schema").EntityScalarField;
|
|
105
|
+
matchedRuleId: import("@contractspec/lib.schema").EntityScalarField;
|
|
106
|
+
reason: import("@contractspec/lib.schema").EntityScalarField;
|
|
107
|
+
context: import("@contractspec/lib.schema").EntityScalarField;
|
|
108
|
+
evaluatedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
109
|
+
flag: import("@contractspec/lib.schema").EntityRelationField;
|
|
113
110
|
}>;
|
|
114
111
|
/**
|
|
115
112
|
* All feature flag entities for schema composition.
|
|
116
113
|
*/
|
|
117
|
-
declare const featureFlagEntities: (
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
}> |
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
}> |
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
}> |
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
}> |
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
114
|
+
export declare const featureFlagEntities: (import("@contractspec/lib.schema").EntitySpec<{
|
|
115
|
+
id: import("@contractspec/lib.schema").EntityScalarField;
|
|
116
|
+
key: import("@contractspec/lib.schema").EntityScalarField;
|
|
117
|
+
name: import("@contractspec/lib.schema").EntityScalarField;
|
|
118
|
+
description: import("@contractspec/lib.schema").EntityScalarField;
|
|
119
|
+
status: import("@contractspec/lib.schema").EntityEnumField;
|
|
120
|
+
defaultValue: import("@contractspec/lib.schema").EntityScalarField;
|
|
121
|
+
variants: import("@contractspec/lib.schema").EntityScalarField;
|
|
122
|
+
orgId: import("@contractspec/lib.schema").EntityScalarField;
|
|
123
|
+
tags: import("@contractspec/lib.schema").EntityScalarField;
|
|
124
|
+
metadata: import("@contractspec/lib.schema").EntityScalarField;
|
|
125
|
+
createdAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
126
|
+
updatedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
127
|
+
targetingRules: import("@contractspec/lib.schema").EntityRelationField;
|
|
128
|
+
experiments: import("@contractspec/lib.schema").EntityRelationField;
|
|
129
|
+
evaluations: import("@contractspec/lib.schema").EntityRelationField;
|
|
130
|
+
}> | import("@contractspec/lib.schema").EntitySpec<{
|
|
131
|
+
id: import("@contractspec/lib.schema").EntityScalarField;
|
|
132
|
+
flagId: import("@contractspec/lib.schema").EntityScalarField;
|
|
133
|
+
name: import("@contractspec/lib.schema").EntityScalarField;
|
|
134
|
+
priority: import("@contractspec/lib.schema").EntityScalarField;
|
|
135
|
+
enabled: import("@contractspec/lib.schema").EntityScalarField;
|
|
136
|
+
attribute: import("@contractspec/lib.schema").EntityScalarField;
|
|
137
|
+
operator: import("@contractspec/lib.schema").EntityEnumField;
|
|
138
|
+
value: import("@contractspec/lib.schema").EntityScalarField;
|
|
139
|
+
rolloutPercentage: import("@contractspec/lib.schema").EntityScalarField;
|
|
140
|
+
serveValue: import("@contractspec/lib.schema").EntityScalarField;
|
|
141
|
+
serveVariant: import("@contractspec/lib.schema").EntityScalarField;
|
|
142
|
+
createdAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
143
|
+
updatedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
144
|
+
flag: import("@contractspec/lib.schema").EntityRelationField;
|
|
145
|
+
}> | import("@contractspec/lib.schema").EntitySpec<{
|
|
146
|
+
id: import("@contractspec/lib.schema").EntityScalarField;
|
|
147
|
+
key: import("@contractspec/lib.schema").EntityScalarField;
|
|
148
|
+
name: import("@contractspec/lib.schema").EntityScalarField;
|
|
149
|
+
description: import("@contractspec/lib.schema").EntityScalarField;
|
|
150
|
+
hypothesis: import("@contractspec/lib.schema").EntityScalarField;
|
|
151
|
+
flagId: import("@contractspec/lib.schema").EntityScalarField;
|
|
152
|
+
status: import("@contractspec/lib.schema").EntityEnumField;
|
|
153
|
+
variants: import("@contractspec/lib.schema").EntityScalarField;
|
|
154
|
+
metrics: import("@contractspec/lib.schema").EntityScalarField;
|
|
155
|
+
audiencePercentage: import("@contractspec/lib.schema").EntityScalarField;
|
|
156
|
+
audienceFilter: import("@contractspec/lib.schema").EntityScalarField;
|
|
157
|
+
scheduledStartAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
158
|
+
scheduledEndAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
159
|
+
startedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
160
|
+
endedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
161
|
+
winningVariant: import("@contractspec/lib.schema").EntityScalarField;
|
|
162
|
+
results: import("@contractspec/lib.schema").EntityScalarField;
|
|
163
|
+
orgId: import("@contractspec/lib.schema").EntityScalarField;
|
|
164
|
+
createdAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
165
|
+
updatedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
166
|
+
flag: import("@contractspec/lib.schema").EntityRelationField;
|
|
167
|
+
assignments: import("@contractspec/lib.schema").EntityRelationField;
|
|
168
|
+
}> | import("@contractspec/lib.schema").EntitySpec<{
|
|
169
|
+
id: import("@contractspec/lib.schema").EntityScalarField;
|
|
170
|
+
experimentId: import("@contractspec/lib.schema").EntityScalarField;
|
|
171
|
+
subjectType: import("@contractspec/lib.schema").EntityScalarField;
|
|
172
|
+
subjectId: import("@contractspec/lib.schema").EntityScalarField;
|
|
173
|
+
variant: import("@contractspec/lib.schema").EntityScalarField;
|
|
174
|
+
bucket: import("@contractspec/lib.schema").EntityScalarField;
|
|
175
|
+
context: import("@contractspec/lib.schema").EntityScalarField;
|
|
176
|
+
assignedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
177
|
+
experiment: import("@contractspec/lib.schema").EntityRelationField;
|
|
178
|
+
}> | import("@contractspec/lib.schema").EntitySpec<{
|
|
179
|
+
id: import("@contractspec/lib.schema").EntityScalarField;
|
|
180
|
+
flagId: import("@contractspec/lib.schema").EntityScalarField;
|
|
181
|
+
flagKey: import("@contractspec/lib.schema").EntityScalarField;
|
|
182
|
+
subjectType: import("@contractspec/lib.schema").EntityScalarField;
|
|
183
|
+
subjectId: import("@contractspec/lib.schema").EntityScalarField;
|
|
184
|
+
result: import("@contractspec/lib.schema").EntityScalarField;
|
|
185
|
+
variant: import("@contractspec/lib.schema").EntityScalarField;
|
|
186
|
+
matchedRuleId: import("@contractspec/lib.schema").EntityScalarField;
|
|
187
|
+
reason: import("@contractspec/lib.schema").EntityScalarField;
|
|
188
|
+
context: import("@contractspec/lib.schema").EntityScalarField;
|
|
189
|
+
evaluatedAt: import("@contractspec/lib.schema").EntityScalarField;
|
|
190
|
+
flag: import("@contractspec/lib.schema").EntityRelationField;
|
|
194
191
|
}>)[];
|
|
195
192
|
/**
|
|
196
193
|
* Module schema contribution for feature flags.
|
|
197
194
|
*/
|
|
198
|
-
declare const featureFlagsSchemaContribution: ModuleSchemaContribution;
|
|
199
|
-
//#endregion
|
|
200
|
-
export { ExperimentAssignmentEntity, ExperimentEntity, ExperimentStatusEnum, FeatureFlagEntity, FlagEvaluationEntity, FlagStatusEnum, FlagTargetingRuleEntity, RuleOperatorEnum, featureFlagEntities, featureFlagsSchemaContribution };
|
|
195
|
+
export declare const featureFlagsSchemaContribution: ModuleSchemaContribution;
|
|
201
196
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/entities/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAEzE;;GAEG;AACH,eAAO,MAAM,cAAc,kDAKzB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB,kDAiB3B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,oBAAoB,kDAK/B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;EA4D5B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;EAyDlC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;EA2F3B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;EAuCrC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;EAqD/B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAM/B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,8BAA8B,EAAE,wBAI5C,CAAC"}
|