Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/management-sdk-pinned-spec.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@reflag/management-sdk": minor
---

Update the client to the current Management API. Flags now include `flagType` (`boolean` or `multivariate`), and `createFlag` accepts it; flags are Boolean by default. Flag targeting now includes `targetingMode` and `effectiveRules`, the compiled rules that decide whether the flag is on.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,6 @@ junit.xml

.next
reflag.config.json

# Generator input prepared from openapi.json by scripts/prepare-spec.mjs
packages/management-sdk/.openapi.generated.json
1 change: 1 addition & 0 deletions .oxfmtrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"coverage/**",
"playwright-report/**",
"test-results/**",
"packages/management-sdk/openapi.json",
"packages/management-sdk/src/generated/**",
"packages/node-sdk/examples/cloudflare-worker/worker-configuration.d.ts"
],
Expand Down
2 changes: 1 addition & 1 deletion packages/management-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ console.log(flags.data);
`createFlag` and `updateFlag` return the latest flag details together with
`flagStateVersions`, keyed by environment ID.

Use `null` to clear nullable fields like `description` or `ownerUserId` on update.
Flags are Boolean unless you pass `flagType: "multivariate"`. Use `null` to clear nullable fields like `description` or `ownerUserId` on update.

```typescript
const created = await api.createFlag({
Expand Down
2 changes: 1 addition & 1 deletion packages/management-sdk/openapi-generator.config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
generatorName: typescript-fetch
inputSpec: https://app.reflag.com/openapi.json
inputSpec: ./.openapi.generated.json
outputDir: src/generated
templateDir: ./openapi-templates
additionalProperties:
Expand Down
Loading
Loading