Skip to content

Commit 043e836

Browse files
committed
go with flag instead of isEnabled when exposing the flag data
1 parent c7ac4e0 commit 043e836

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

packages/node-sdk/src/client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ export class BucketClient {
494494
return features.map((f) => ({
495495
key: f.key,
496496
description: f.description,
497-
isEnabled: f.targeting,
497+
flag: f.targeting,
498498
config: f.config,
499499
}));
500500
}

packages/node-sdk/src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ export type FeatureDefinition = {
207207
/**
208208
* The targeting rules for the feature.
209209
*/
210-
isEnabled: {
210+
flag: {
211211
/**
212212
* The version of the targeting rules.
213213
*/

packages/node-sdk/test/client.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ const featureDefinitions: FeaturesAPIResponse = {
102102
features: [
103103
{
104104
key: "feature1",
105+
description: "Feature 1",
105106
targeting: {
106107
version: 1,
107108
rules: [
@@ -133,6 +134,7 @@ const featureDefinitions: FeaturesAPIResponse = {
133134
},
134135
{
135136
key: "feature2",
137+
description: "Feature 2",
136138
targeting: {
137139
version: 2,
138140
rules: [

0 commit comments

Comments
 (0)