Skip to content

Commit 2c53e2e

Browse files
use string seed in sample feature flag
1 parent bb2bd7e commit 2c53e2e

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

sdk/feature-management/src/schema/model.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export interface FeatureFlag {
3333
*/
3434
telemetry?: TelemetryOptions
3535
}
36-
36+
3737
/**
3838
* The declaration of conditions used to dynamically enable the feature
3939
*/
@@ -47,9 +47,9 @@ export interface FeatureFlag {
4747
*/
4848
client_filters?: ClientFilter[];
4949
}
50-
50+
5151
export type RequirementType = "Any" | "All";
52-
52+
5353
interface ClientFilter {
5454
/**
5555
* The name used to refer to a client filter.
@@ -60,7 +60,7 @@ export interface FeatureFlag {
6060
*/
6161
parameters?: Record<string, unknown>;
6262
}
63-
63+
6464
export interface VariantDefinition {
6565
/**
6666
* The name used to refer to a feature variant.
@@ -75,7 +75,7 @@ export interface FeatureFlag {
7575
*/
7676
status_override?: "None" | "Enabled" | "Disabled";
7777
}
78-
78+
7979
/**
8080
* Determines how variants should be allocated for the feature to various users.
8181
*/
@@ -105,7 +105,7 @@ export interface FeatureFlag {
105105
*/
106106
seed?: string;
107107
}
108-
108+
109109
interface UserAllocation {
110110
/**
111111
* The name of the variant to use if the user allocation matches the current user.
@@ -116,7 +116,7 @@ export interface FeatureFlag {
116116
*/
117117
users: string[];
118118
}
119-
119+
120120
interface GroupAllocation {
121121
/**
122122
* The name of the variant to use if the group allocation matches a group the current user is in.
@@ -127,7 +127,7 @@ export interface FeatureFlag {
127127
*/
128128
groups: string[];
129129
}
130-
130+
131131
interface PercentileAllocation {
132132
/**
133133
* The name of the variant to use if the calculated percentile for the current user falls in the provided range.
@@ -142,7 +142,7 @@ export interface FeatureFlag {
142142
*/
143143
to: number;
144144
}
145-
145+
146146
/**
147147
* The declaration of options used to configure telemetry for this feature.
148148
*/
@@ -156,20 +156,20 @@ export interface FeatureFlag {
156156
*/
157157
metadata?: Record<string, string>;
158158
}
159-
159+
160160
// Feature Management Section fed into feature manager.
161161
// Converted from https://github.com/Azure/AppConfiguration/blob/main/docs/FeatureManagement/FeatureManagement.v1.0.0.schema.json
162-
162+
163163
export const FEATURE_MANAGEMENT_KEY = "feature_management";
164164
export const FEATURE_FLAGS_KEY = "feature_flags";
165-
165+
166166
export interface FeatureManagementConfiguration {
167167
feature_management: FeatureManagement
168168
}
169-
169+
170170
/**
171171
* Declares feature management configuration.
172172
*/
173173
export interface FeatureManagement {
174174
feature_flags: FeatureFlag[];
175-
}
175+
}

sdk/feature-management/test/sampleFeatureFlags.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ export const featureFlagsConfigurationObject = {
219219
"to": 50
220220
}
221221
],
222-
"seed": 1234
222+
"seed": "1234"
223223
},
224224
"telemetry": {
225225
"enabled": true
@@ -241,7 +241,7 @@ export const featureFlagsConfigurationObject = {
241241
"to": 50
242242
}
243243
],
244-
"seed": 12345
244+
"seed": "12345"
245245
},
246246
"telemetry": {
247247
"enabled": true
@@ -263,7 +263,7 @@ export const featureFlagsConfigurationObject = {
263263
"to": 100
264264
}
265265
],
266-
"seed": 12345
266+
"seed": "12345"
267267
},
268268
"telemetry": {
269269
"enabled": true

0 commit comments

Comments
 (0)