@featureflip/mcp 0.10.1 → 0.11.1
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/README.md +2 -1
- package/dist/cli.mjs +1 -1
- package/dist/client.d.ts +10 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/generated/api-types.d.ts +1212 -1
- package/dist/generated/api-types.d.ts.map +1 -1
- package/dist/generated/output-schemas.json.d.ts +481 -1
- package/dist/index.mjs +1 -1
- package/dist/{org-_VO7AwOS.js → org-CBTP0gMs.js} +370 -205
- package/dist/server.d.ts.map +1 -1
- package/dist/tools/change-freezes.d.ts +4 -0
- package/dist/tools/change-freezes.d.ts.map +1 -0
- package/dist/tools/environment-comparison.d.ts.map +1 -1
- package/dist/tools/flag-environments.d.ts.map +1 -1
- package/dist/tools/params.d.ts +9 -0
- package/dist/tools/params.d.ts.map +1 -1
- package/dist/tools/rollout-ramps.d.ts.map +1 -1
- package/dist/tools/targeting.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -3,7 +3,7 @@ import * as n from "zod/v4";
|
|
|
3
3
|
// src/version.ts
|
|
4
4
|
var r = {
|
|
5
5
|
name: "@featureflip/mcp",
|
|
6
|
-
version: "0.
|
|
6
|
+
version: "0.11.1",
|
|
7
7
|
mcpName: "io.github.canopy-labs/featureflip",
|
|
8
8
|
description: "MCP server for managing Featureflip feature flags from AI agents and editors",
|
|
9
9
|
keywords: [
|
|
@@ -51,9 +51,9 @@ var r = {
|
|
|
51
51
|
"@typescript/typescript6": "^6.0.2",
|
|
52
52
|
"@types/node": "^26.6.6",
|
|
53
53
|
typescript: "^7.0.2",
|
|
54
|
-
vite: "^8.3.
|
|
54
|
+
vite: "^8.3.6",
|
|
55
55
|
"vite-plugin-dts": "^5.1.2",
|
|
56
|
-
vitest: "^5.0
|
|
56
|
+
vitest: "^5.1.0"
|
|
57
57
|
},
|
|
58
58
|
engines: { node: ">=20.19.0" }
|
|
59
59
|
}.version, i = class extends Error {
|
|
@@ -95,7 +95,7 @@ var s = /* @__PURE__ */ new Set([
|
|
|
95
95
|
Authorization: `Bearer ${this.opts.token}`,
|
|
96
96
|
Accept: "application/json"
|
|
97
97
|
}, u;
|
|
98
|
-
n.body !== void 0 && (o["Content-Type"] = "application/json", u = JSON.stringify(n.body)), n.idempotencyKey && (o["Idempotency-Key"] = n.idempotencyKey), n.ifMatch && (o["If-Match"] = a(n.ifMatch)), n.reason?.trim() && (o["X-Intent-Reason"] = encodeURIComponent(n.reason));
|
|
98
|
+
n.body !== void 0 && (o["Content-Type"] = "application/json", u = JSON.stringify(n.body)), n.idempotencyKey && (o["Idempotency-Key"] = n.idempotencyKey), n.ifMatch && (o["If-Match"] = a(n.ifMatch)), n.reason?.trim() && (o["X-Intent-Reason"] = encodeURIComponent(n.reason)), n.freezeOverride && (o["X-Freeze-Override"] = "true");
|
|
99
99
|
let d = c.has(e) && !n.ifMatch || n.idempotencyKey !== void 0, f;
|
|
100
100
|
for (let t = 0;; t++) {
|
|
101
101
|
let n = t < l.length;
|
|
@@ -150,7 +150,11 @@ function d(e) {
|
|
|
150
150
|
function f(e, t = {}) {
|
|
151
151
|
if (e instanceof i) {
|
|
152
152
|
let n = e.envelope, r = [`Featureflip API error ${e.status} (${n.error}): ${n.message}`];
|
|
153
|
-
|
|
153
|
+
if (n.fields && r.push(`Field errors: ${JSON.stringify(n.fields)}`), n.did_you_mean?.length && r.push(`Did you mean: ${n.did_you_mean.join(", ")}`), n.next_actions?.length && r.push(`Next actions: ${n.next_actions.map((e) => `${e.method} ${e.path}`).join("; ")}`), n.retry_after != null && r.push(`Rate limited — retry after ${n.retry_after}s.`), e.status === 404 && r.push("Note: 404 can also mean the public Management API is not enabled for this organization yet, or a service token does not include this project."), e.status === 412 && r.push(t.preconditionFailedHint ?? "The resource changed since it was read. If you passed ifMatch, re-read it (get_flag / get_targeting / get_segment), re-apply your change to what you read, and retry with the new etag. Otherwise the tool read it itself and lost a race: call it again."), n.error === "change_reason_required" && r.push("Retry this tool call with the `reason` argument explaining why you are making the change."), n.error === "change_frozen" && n.change_freeze) {
|
|
154
|
+
let e = n.change_freeze, t = e.ends_at ? `until ${e.ends_at}` : "until it is ended";
|
|
155
|
+
r.push(`Change freeze "${e.name}" covers environment ${e.environment_key} ${t}.` + (e.can_override ? " You can break it for this one change: retry with `reason` and `freeze_override: true`." : " Your token cannot override it: ask an Owner or Admin to make the change or end the freeze."));
|
|
156
|
+
}
|
|
157
|
+
return n.docs_url && r.push(`Docs: ${n.docs_url}`), {
|
|
154
158
|
content: [{
|
|
155
159
|
type: "text",
|
|
156
160
|
text: r.join("\n")
|
|
@@ -175,6 +179,12 @@ async function p(e) {
|
|
|
175
179
|
}
|
|
176
180
|
var m = {
|
|
177
181
|
endpoints: {
|
|
182
|
+
"GET /api/v1/orgs/{org}/change-freezes": "PublicChangeFreezeResponsePagedResult",
|
|
183
|
+
"POST /api/v1/orgs/{org}/change-freezes": "PublicChangeFreezeResponse",
|
|
184
|
+
"GET /api/v1/orgs/{org}/change-freezes/{id}": "PublicChangeFreezeResponse",
|
|
185
|
+
"PATCH /api/v1/orgs/{org}/change-freezes/{id}": "PublicChangeFreezeResponse",
|
|
186
|
+
"POST /api/v1/orgs/{org}/change-freezes/{id}/end": "PublicChangeFreezeResponse",
|
|
187
|
+
"POST /api/v1/orgs/{org}/change-freezes/{id}/approvals": "PublicFreezeApprovalResponse",
|
|
178
188
|
"POST /api/v1/orgs/{org}/projects/{project}/environments": "PublicEnvironmentResponse",
|
|
179
189
|
"GET /api/v1/orgs/{org}/projects/{project}/environments": "PublicEnvironmentResponsePagedResult",
|
|
180
190
|
"GET /api/v1/orgs/{org}/projects/{project}/environments/{env}": "PublicEnvironmentResponse",
|
|
@@ -224,7 +234,7 @@ var m = {
|
|
|
224
234
|
"POST /api/v1/orgs/{org}/webhooks/{id}/test": "PublicTestWebhookSubscriptionResponse",
|
|
225
235
|
"GET /api/v1/orgs/{org}/webhooks/{id}/deliveries": "PublicWebhookDeliveryResponsePagedResult"
|
|
226
236
|
},
|
|
227
|
-
$defs: /* @__PURE__ */ JSON.parse("{\"ActionCapability\":{\"type\":[\"object\",\"null\"],\"properties\":{\"allowed\":{\"type\":[\"boolean\",\"null\"]},\"reason\":{\"type\":[\"string\",\"null\"]}},\"description\":\"One entry in a resource's `_actions` block: may the caller perform it, and if not, why.\"},\"MeResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"type\":{\"type\":[\"string\",\"null\"]},\"id\":{\"type\":[\"string\",\"null\"]},\"name\":{\"type\":[\"string\",\"null\"]},\"email\":{\"type\":[\"string\",\"null\"]},\"emailVerified\":{\"type\":[\"boolean\",\"null\"]},\"organizationId\":{\"type\":[\"string\",\"null\"]},\"role\":{\"type\":[\"string\",\"null\"]},\"projectScope\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}}},\"description\":\"The authenticated caller's identity, returned by `GET /api/v1/me`. The public API\\nauthenticates two kinds of principal, so this is a `type`-discriminated shape.\\nA `\\\"user\\\"` caller (a session/JWT user or a personal access token, `ffp_...`) carries\\n`email` + `emailVerified`. A `\\\"service_token\\\"` caller (`ffs_...`) has no\\nbacking user row, so it carries `organizationId` + `role` + `projectScope` (the\\ntoken's org, its role in that org, and its project allowlist) instead. The type-inapplicable\\nfields are omitted from the response body. `projectScope` is omitted for an unrestricted\\nservice token (access to every project), never an empty list.\"},\"NextAction\":{\"type\":[\"object\",\"null\"],\"properties\":{\"method\":{\"type\":[\"string\",\"null\"]},\"path\":{\"type\":[\"string\",\"null\"]}}},\"OrganizationResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"id\":{\"type\":[\"string\",\"null\"]},\"name\":{\"type\":[\"string\",\"null\"]},\"slug\":{\"type\":[\"string\",\"null\"]},\"plan\":{\"type\":[\"string\",\"null\"],\"description\":\"Allowed values: Solo, Team, Pro, Business, Enterprise.\"},\"isActive\":{\"type\":[\"boolean\",\"null\"]},\"createdAt\":{\"type\":[\"string\",\"null\"]}},\"description\":\"Public representation of an organization, returned by both `GET /api/v1/orgs` (list) and\\n`GET /api/v1/orgs/{org}` (detail). Drops dashboard-only fields (`BillingEmail` is\\nbilling-contact PII, `UpdatedAt` is dashboard audit trivia) from the dashboard's\\nOrganizationDto/OrganizationListItemDto.\"},\"OrganizationResponsePagedResult\":{\"type\":[\"object\",\"null\"],\"properties\":{\"items\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/OrganizationResponse\"},{\"type\":\"null\"}]}},\"next_cursor\":{\"type\":[\"string\",\"null\"]},\"_actions\":{\"type\":[\"object\",\"null\"],\"additionalProperties\":{\"anyOf\":[{\"$ref\":\"#/$defs/ActionCapability\"},{\"type\":\"null\"}]},\"description\":\"Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it.\"}},\"description\":\"A page of results plus an opaque cursor for the next page, or null when this is the last\\npage. Wire keys are frozen: `items` (already lowercase under the camelCase policy) and\\n`next_cursor` (pinned explicitly — the policy alone would emit `nextCursor`).\"},\"ProjectResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"id\":{\"type\":[\"string\",\"null\"]},\"key\":{\"type\":[\"string\",\"null\"]},\"name\":{\"type\":[\"string\",\"null\"]},\"description\":{\"type\":[\"string\",\"null\"]},\"createdAt\":{\"type\":[\"string\",\"null\"]},\"updatedAt\":{\"type\":[\"string\",\"null\"]},\"defaultFlagLifetimeDays\":{\"type\":[\"integer\",\"null\"]},\"_actions\":{\"type\":[\"object\",\"null\"],\"additionalProperties\":{\"anyOf\":[{\"$ref\":\"#/$defs/ActionCapability\"},{\"type\":\"null\"}]},\"description\":\"Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it.\"}},\"description\":\"Public representation of a project, returned by `GET /api/v1/orgs/{org}/projects` (list),\\n`GET .../projects/{project}` (detail), and the body of a successful create/update. Drops\\nthe dashboard-only nested `Environments` collection from ProjectDto — the\\npublic API surfaces environments via their own endpoint (Task 6), not embedded here.\\nUpdatedAt is only populated from ProjectDto (the detail/create\\nshape); ProjectListItemDto doesn't carry it, so list rows leave it `null`.\\nDefaultFlagLifetimeDays is the project's default flag lifetime in days, or null (#3194).\"},\"ProjectResponsePagedResult\":{\"type\":[\"object\",\"null\"],\"properties\":{\"items\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/ProjectResponse\"},{\"type\":\"null\"}]}},\"next_cursor\":{\"type\":[\"string\",\"null\"]},\"_actions\":{\"type\":[\"object\",\"null\"],\"additionalProperties\":{\"anyOf\":[{\"$ref\":\"#/$defs/ActionCapability\"},{\"type\":\"null\"}]},\"description\":\"Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it.\"}},\"description\":\"A page of results plus an opaque cursor for the next page, or null when this is the last\\npage. Wire keys are frozen: `items` (already lowercase under the camelCase policy) and\\n`next_cursor` (pinned explicitly — the policy alone would emit `nextCursor`).\"},\"PublicAbortRolloutRampRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"percent\":{\"type\":[\"integer\",\"null\"]}},\"description\":\"Request body for `POST …/ramps/{rampId}/abort`: the percentage (0-100) to leave the rule at. Required, so\\na missing value is a 400 rather than an abort to 0%.\"},\"PublicAddVariationRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"key\":{\"type\":[\"string\",\"null\"]},\"name\":{\"type\":[\"string\",\"null\"]},\"value\":{\"type\":[\"string\",\"null\"]},\"description\":{\"type\":[\"string\",\"null\"]}},\"description\":\"Request body for\\n`POST /api/v1/orgs/{org}/projects/{project}/flags/{flag}/variations`. Named distinctly\\nfrom the dashboard's own `AddVariationRequest` —\\nsee PublicCreateEnvironmentRequest for the schemaId-collision rationale (both\\ncontrollers share one Swagger document).\"},\"PublicAdvanceRolloutRampRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"expectedStepIndex\":{\"type\":[\"integer\",\"null\"]}},\"description\":\"Request body for `POST …/ramps/{rampId}/advance`: the `currentStepIndex` the caller last saw. If the\\nramp has moved on since, the advance is a 409, so two racing advances can't skip a step.\"},\"PublicApiErrorEnvelope\":{\"type\":[\"object\",\"null\"],\"properties\":{\"error\":{\"type\":[\"string\",\"null\"]},\"message\":{\"type\":[\"string\",\"null\"]},\"docs_url\":{\"type\":[\"string\",\"null\"]},\"fields\":{\"type\":[\"object\",\"null\"],\"additionalProperties\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}}},\"retry_after\":{\"type\":[\"integer\",\"null\"]},\"did_you_mean\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}},\"next_actions\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/NextAction\"},{\"type\":\"null\"}]}},\"connection_id\":{\"type\":[\"string\",\"null\"]},\"plan_limit\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicPlanLimit\"},{\"type\":\"null\"}]}},\"description\":\"The frozen public-API error contract. `error` codes are stable snake_case strings. Wire keys\\nare frozen snake_case too (`error`, `message`, `docs_url`, `fields`,\\n`retry_after`) — the global camelCase naming policy would otherwise emit\\n`docsUrl`/`retryAfter`, breaking the published spec. !:JsonPropertyName\\nalways wins over the policy, so these are pinned explicitly rather than relying on the\\nproperty names already being lowercase for the single-word ones.\\n`did_you_mean`, `next_actions` and `connection_id` are ADDITIVE optional keys\\n(null → omitted via the global `DefaultIgnoreCondition = WhenWritingNull`), so\\npre-existing error bodies are byte-for-byte unchanged when they're absent.\\n\\n`connection_id` is present only on the `sso_required` error: the organization\\nrequires single sign-on, and this credential didn't come through its identity provider.\\n`connection_id` identifies which SSO connection to sign in with.\\n`plan_limit` is present only on the `plan_limit_reached` error: which plan cap the\\nrequest would have exceeded, so a client can branch on it without parsing `message`.\"},\"PublicConditionGroupRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"operator\":{\"type\":[\"string\",\"null\"],\"description\":\"Allowed values: And, Or.\"},\"conditions\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicConditionRequest\"},{\"type\":\"null\"}]}}},\"description\":\"Request-side condition group, symmetric with PublicConditionGroupResponse.\"},\"PublicConditionGroupResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"operator\":{\"type\":[\"string\",\"null\"],\"description\":\"Allowed values: And, Or.\"},\"conditions\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicConditionResponse\"},{\"type\":\"null\"}]}}},\"description\":\"A condition group within a PublicTargetingRuleResponse. Maps 1:1 onto\\nConditionGroupDto. Operator is a bare wire string naming one of\\nthe `ConditionGroupOperator` members (`\\\"And\\\"`/`\\\"Or\\\"`) —\\ngroups are ANDed together at the rule level; within a group, its conditions combine using\\nthis operator.\"},\"PublicConditionRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"attribute\":{\"type\":[\"string\",\"null\"]},\"operator\":{\"type\":[\"string\",\"null\"],\"description\":\"Allowed values: Equals, NotEquals, Contains, NotContains, GreaterThan, LessThan, GreaterThanOrEqual, LessThanOrEqual, In, NotIn, MatchesRegex, StartsWith, EndsWith, Before, After, SemverEquals, SemverGreaterThan, SemverGreaterThanOrEqual, SemverLessThan, SemverLessThanOrEqual.\"},\"values\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}},\"negate\":{\"type\":[\"boolean\",\"null\"]}},\"description\":\"Request-side condition, symmetric with PublicConditionResponse.\"},\"PublicConditionResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"attribute\":{\"type\":[\"string\",\"null\"]},\"operator\":{\"type\":[\"string\",\"null\"],\"description\":\"Allowed values: Equals, NotEquals, Contains, NotContains, GreaterThan, LessThan, GreaterThanOrEqual, LessThanOrEqual, In, NotIn, MatchesRegex, StartsWith, EndsWith, Before, After, SemverEquals, SemverGreaterThan, SemverGreaterThanOrEqual, SemverLessThan, SemverLessThanOrEqual.\"},\"values\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}},\"negate\":{\"type\":[\"boolean\",\"null\"]}},\"description\":\"A single condition within a PublicConditionGroupResponse. Maps 1:1 onto\\nConditionDto. Operator is a bare wire string naming one of the\\n`OperatorType` members (e.g. `\\\"Equals\\\"`, `\\\"In\\\"`).\"},\"PublicConfiguredWeight\":{\"type\":[\"object\",\"null\"],\"properties\":{\"variationKey\":{\"type\":[\"string\",\"null\"],\"description\":\"The variation's key.\"},\"name\":{\"type\":[\"string\",\"null\"],\"description\":\"The variation's name, or null when the key no longer matches one of the flag's variations.\"},\"weight\":{\"type\":[\"integer\",\"null\"],\"description\":\"Percent of the rule's traffic.\"}},\"description\":\"A variation's configured share of a rollout rule.\"},\"PublicCopyFlagConfigRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"source\":{\"type\":[\"string\",\"null\"]},\"includeState\":{\"type\":[\"boolean\",\"null\"]},\"dryRun\":{\"type\":[\"boolean\",\"null\"]},\"expectedSourceETag\":{\"type\":[\"string\",\"null\"]},\"expectedTargetETag\":{\"type\":[\"string\",\"null\"]}},\"description\":\"Request body for `POST .../flags/{flag}/environments/{env}/copy`. `source` is the environment to copy\\nfrom (key or id) and is required; the rest are optional. `dryRun: true` previews without writing and ignores\\nthe ETags.\"},\"PublicCopyResult\":{\"type\":[\"object\",\"null\"],\"properties\":{\"changed\":{\"type\":[\"boolean\",\"null\"]},\"changedSections\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}},\"before\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicEnvironmentSnapshot\"},{\"type\":\"null\"}]},\"after\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicEnvironmentSnapshot\"},{\"type\":\"null\"}]},\"sourceETag\":{\"type\":[\"string\",\"null\"]},\"targetETag\":{\"type\":[\"string\",\"null\"]},\"warnings\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicCopyWarning\"},{\"type\":\"null\"}]}}},\"description\":\"Response of `POST .../flags/{flag}/environments/{env}/copy`, for a dry run and an apply alike.\\n`targetETag` is the target's tag after an apply and before it on a dry run, so a dry run's tags are\\nwhat the apply sends back as `expectedSourceETag` / `expectedTargetETag`.\"},\"PublicCopyWarning\":{\"type\":[\"object\",\"null\"],\"properties\":{\"code\":{\"type\":[\"string\",\"null\"]},\"message\":{\"type\":[\"string\",\"null\"]}},\"description\":\"A non-blocking note about a copy.\"},\"PublicCreateEnvironmentRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"key\":{\"type\":[\"string\",\"null\"],\"description\":\"The environment's key.\"},\"name\":{\"type\":[\"string\",\"null\"],\"description\":\"The environment's display name.\"},\"color\":{\"type\":[\"string\",\"null\"],\"description\":\"The environment's display color, or null.\"},\"sortOrder\":{\"type\":[\"integer\",\"null\"],\"description\":\"Position among the project's environments.\"},\"requireChangeReason\":{\"type\":[\"boolean\",\"null\"],\"description\":\"Require a change reason (X-Intent-Reason) on every change to flags in this environment. Business plan and above.\"},\"requireConfirmation\":{\"type\":[\"boolean\",\"null\"],\"description\":\"Ask dashboard users to type the environment key before a change lands. Dashboard only; not enforced by the API.\"}},\"description\":\"Request body for `POST /api/v1/orgs/{org}/projects/{project}/environments`. Named\\ndistinctly from the dashboard's own `CreateEnvironmentRequest`\\n— both controllers share one Swagger document (see `Program.cs`'s `AddSwaggerGen``DocInclusionPredicate` override), and Swashbuckle's default schemaId is the bare type\\nname, so an identical name in either namespace throws a schemaId collision at\\n`--export-openapi` time.\"},\"PublicCreateFeatureFlagRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"key\":{\"type\":[\"string\",\"null\"]},\"name\":{\"type\":[\"string\",\"null\"]},\"type\":{\"type\":[\"string\",\"null\"],\"description\":\"Allowed values: Boolean, String, Number, Json.\"},\"description\":{\"type\":[\"string\",\"null\"]},\"tags\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}},\"initialVariations\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicCreateVariationDto\"},{\"type\":\"null\"}]}},\"clientSideVisible\":{\"type\":[\"boolean\",\"null\"]},\"expiresAtUtc\":{\"type\":[\"string\",\"null\"]},\"ownerEmail\":{\"type\":[\"string\",\"null\"]},\"isPermanent\":{\"type\":[\"boolean\",\"null\"]}},\"description\":\"Request body for `POST /api/v1/orgs/{org}/projects/{project}/flags`. Named distinctly\\nfrom the dashboard's own `CreateFeatureFlagRequest`\\n— see PublicCreateEnvironmentRequest for the\\nschemaId-collision rationale (both controllers share one Swagger document). Type\\nis passed through verbatim to Type, which itself takes a\\nbare string (Boolean/String/Number/Json) rather than the domain enum — invalid values surface\\nas the handler's own validation failure, not a controller-level 400. ExpiresAtUtc is\\noptional and advisory; a bare date (`2026-12-01`) means the end of that day in UTC, and a full\\ntimestamp is stored exactly. It must be in the future and requires the flag-expiration feature\\n(400 `EXPIRY_IN_PAST` / `FEATURE_NOT_ENABLED`). OwnerEmail optionally names\\nthe owner (an active member, matched case-insensitively; requires a plan that includes flag owners,\\nPro and above — 400 `OWNER_NOT_MEMBER` / `PLAN_FEATURE_UNAVAILABLE`). Omitted, the owner is the caller when\\nthe caller is a member, so a service token creates an unowned flag. IsPermanent marks\\nthe flag permanent (a kill switch, ops toggle or entitlement that is meant to stay; never reported for\\ncleanup). It requires the flag-permanence feature and can't be combined with ExpiresAtUtc\\n(400 `FEATURE_NOT_ENABLED` / `PERMANENT_FLAG_HAS_EXPIRY`).\"},\"PublicCreateFlagTriggerRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"name\":{\"type\":[\"string\",\"null\"]},\"action\":{\"type\":[\"string\",\"null\"]},\"description\":{\"type\":[\"string\",\"null\"]}},\"description\":\"Request body for `POST .../triggers`. Action is `\\\"Enable\\\"` or\\n`\\\"Disable\\\"`, parsed against the names only. Named apart from the dashboard's\\n`CreateFlagTriggerRequest`: both controllers share one Swagger document.\"},\"PublicCreateProjectRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"key\":{\"type\":[\"string\",\"null\"]},\"name\":{\"type\":[\"string\",\"null\"]},\"description\":{\"type\":[\"string\",\"null\"]}},\"description\":\"Request body for `POST /api/v1/orgs/{org}/projects`. Named distinctly from the\\ndashboard's own `CreateProjectRequest` — both\\ncontrollers share one Swagger document (see `Program.cs`'s `AddSwaggerGen``DocInclusionPredicate` override), and Swashbuckle's default schemaId is the bare type\\nname, so an identical name in either namespace throws a schemaId collision at\\n`--export-openapi` time.\"},\"PublicCreateSdkKeyRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"name\":{\"type\":[\"string\",\"null\"]},\"description\":{\"type\":[\"string\",\"null\"]},\"type\":{\"type\":[\"string\",\"null\"],\"description\":\"Allowed values: ClientSide, ServerSide.\"}},\"description\":\"Request body for `POST /api/v1/orgs/{org}/projects/{project}/environments/{env}/sdk-keys`.\\nType is a bare string (\\\"ClientSide\\\" or \\\"ServerSide\\\") — the controller parses it\\nagainst a NAME allowlist (not a bare TryParse``1(ReadOnlySpan{Char},Boolean,``0@), which would\\nsilently accept a numeric string like `\\\"0\\\"`) before dispatching. Named distinctly from\\nthe dashboard's own `CreateSdkKeyRequest` — both\\ncontrollers share one Swagger document, and an identical type name in either namespace throws\\na schemaId collision at `--export-openapi` time.\"},\"PublicCreateSdkKeyResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"id\":{\"type\":[\"string\",\"null\"]},\"key\":{\"type\":[\"string\",\"null\"]},\"lastFourCharacters\":{\"type\":[\"string\",\"null\"]},\"type\":{\"type\":[\"string\",\"null\"],\"description\":\"Allowed values: ClientSide, ServerSide.\"},\"name\":{\"type\":[\"string\",\"null\"]},\"createdAt\":{\"type\":[\"string\",\"null\"]},\"warning\":{\"type\":[\"string\",\"null\"]}},\"description\":\"Response body for a successful `POST .../sdk-keys`. The ONLY place the plaintext\\nKey is ever returned — PublicSdkKeyResponse (list/get) carries just\\n`LastFourCharacters`. Built directly from CreateSdkKeyResult rather than a\\nre-fetch (unlike `FeatureFlagsController.Create`'s re-fetch pattern) because the\\nplaintext key only ever exists on the create result — a subsequent\\nGetSdkKeyQuery can't recover it.\"},\"PublicCreateSegmentRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"key\":{\"type\":[\"string\",\"null\"]},\"name\":{\"type\":[\"string\",\"null\"]},\"description\":{\"type\":[\"string\",\"null\"]},\"conditions\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicSegmentConditionDto\"},{\"type\":\"null\"}]}}},\"description\":\"Request body for `POST /api/v1/orgs/{org}/projects/{project}/segments`. Named distinctly\\nfrom the dashboard's own `CreateUserSegmentRequest` — see\\nPublicCreateEnvironmentRequest for the schemaId-collision rationale (both\\ncontrollers share one Swagger document).\"},\"PublicCreateTargetingRuleRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"description\":{\"type\":[\"string\",\"null\"]},\"variationId\":{\"type\":[\"string\",\"null\"]},\"rolloutPercentage\":{\"type\":[\"integer\",\"null\"]},\"userSegmentId\":{\"type\":[\"string\",\"null\"]},\"conditionGroups\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicConditionGroupRequest\"},{\"type\":\"null\"}]}},\"bucketBy\":{\"type\":[\"string\",\"null\"],\"description\":\"Context attribute the rollout hashes on (default `user_id`; `userId` is accepted as an alias). A context without it skips this rule, even at 100%. Changing it reshuffles who is in the rollout. A fixed rule (no `rolloutPercentage`) never hashes and always stores `user_id`. When omitted on `PUT .../targeting`, a rollout keeps the value of the existing rollout it edits: the existing rule with the same targeting, told apart from others with that targeting by its variation, then its description, then its position. Any other rule gets `user_id`. The request is refused with 400 until it sends `bucketBy` for a rollout whose edited rule it can't tell when the answer changes its attribute: the rollout shares only its targeting with several rules that bucket differently, or it matches no existing rule while the request removes a rollout bucketed by another attribute. On create, omitting it gives `user_id`.\"}},\"description\":\"Request body for `POST .../rules`. The Application-side\\n`CreateTargetingRuleDto`/`CreateConditionGroupDto`/`CreateConditionDto` all take\\ntheir `Operator` as a bare string, re-parsed CASE-SENSITIVELY inside\\n`CreateTargetingRuleCommandHandler` — `FlagTargetingController`'s mapping helpers\\nvalidate every operator against the enum's member-name allowlist AND canonicalize the casing\\n(e.g. `\\\"in\\\"` → `\\\"In\\\"`) before building the command DTO, so a valid\\ncase-insensitive match never trips the handler's strict re-parse.\"},\"PublicCreateVariationDto\":{\"type\":[\"object\",\"null\"],\"properties\":{\"key\":{\"type\":[\"string\",\"null\"]},\"name\":{\"type\":[\"string\",\"null\"]},\"value\":{\"type\":[\"string\",\"null\"]},\"description\":{\"type\":[\"string\",\"null\"]}},\"description\":\"A variation supplied at flag-creation time. Maps 1:1 onto\\nCreateVariationDto.\"},\"PublicCreateWebhookSubscriptionRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"name\":{\"type\":[\"string\",\"null\"]},\"url\":{\"type\":[\"string\",\"null\"]},\"provider\":{\"type\":[\"string\",\"null\"],\"description\":\"Allowed values: GenericHttp, Slack, Datadog, Grafana.\"},\"eventTypes\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}},\"projectIds\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}},\"environmentIds\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}},\"credential\":{\"type\":[\"string\",\"null\"]}},\"description\":\"Creates a webhook subscription. `provider` is `GenericHttp`, `Slack` (an incoming\\nwebhook url), `Datadog` (your site's Events API url) or `Grafana` (your Grafana's\\n`/api/annotations` url). Datadog and Grafana also need `credential`: a Datadog API key\\nor a Grafana service account token. It is stored encrypted and never returned. Omit `eventTypes`,\\n`projectIds` or `environmentIds` (or send an empty list) to receive every event,\\nproject or environment. A token restricted to specific projects must list at least one project,\\nall of them within its allowlist.\"},\"PublicCreateWebhookSubscriptionResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"id\":{\"type\":[\"string\",\"null\"]},\"secret\":{\"type\":[\"string\",\"null\"]},\"warning\":{\"type\":[\"string\",\"null\"]}},\"description\":\"The created subscription's id and its signing secret. The secret is shown only here.\"},\"PublicDefaultFlagLifetimeImpact\":{\"type\":[\"object\",\"null\"],\"properties\":{\"newlyPastExpiry\":{\"type\":[\"integer\",\"null\"]},\"noLongerPastExpiry\":{\"type\":[\"integer\",\"null\"]}},\"description\":\"Response of `GET .../default-flag-lifetime/impact`: how many temporary flags with no expiry\\ndate of their own would newly be past expiry, and how many would stop being past it.\"},\"PublicEnvironmentResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"id\":{\"type\":[\"string\",\"null\"],\"description\":\"The environment's id.\"},\"key\":{\"type\":[\"string\",\"null\"],\"description\":\"The environment's key.\"},\"name\":{\"type\":[\"string\",\"null\"],\"description\":\"The environment's display name.\"},\"color\":{\"type\":[\"string\",\"null\"],\"description\":\"The environment's display color, or null.\"},\"sortOrder\":{\"type\":[\"integer\",\"null\"],\"description\":\"Position among the project's environments.\"},\"requireChangeReason\":{\"type\":[\"boolean\",\"null\"],\"description\":\"Require a change reason (X-Intent-Reason) on every change to flags in this environment. Business plan and above.\"},\"requireConfirmation\":{\"type\":[\"boolean\",\"null\"],\"description\":\"Ask dashboard users to type the environment key before a change lands. Dashboard only; not enforced by the API.\"},\"_actions\":{\"type\":[\"object\",\"null\"],\"additionalProperties\":{\"anyOf\":[{\"$ref\":\"#/$defs/ActionCapability\"},{\"type\":\"null\"}]},\"description\":\"Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it.\"}},\"description\":\"Public representation of an environment, returned by\\n`GET /api/v1/orgs/{org}/projects/{project}/environments` (list),\\n`GET .../environments/{env}` (detail), and the body of a successful create/update. Drops\\ninternal fields (e.g. `ProjectId` is implicit in the route) — mirrors\\n`ProjectResponse`'s minimal shape. Named `PublicEnvironmentResponse` rather than\\n`EnvironmentResponse` (unlike the sibling `ProjectResponse`, which didn't collide)\\nbecause the dashboard already has its own\\n`EnvironmentResponse` — see\\nPublicCreateEnvironmentRequest for the schemaId-collision rationale.\"},\"PublicEnvironmentResponsePagedResult\":{\"type\":[\"object\",\"null\"],\"properties\":{\"items\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicEnvironmentResponse\"},{\"type\":\"null\"}]}},\"next_cursor\":{\"type\":[\"string\",\"null\"]},\"_actions\":{\"type\":[\"object\",\"null\"],\"additionalProperties\":{\"anyOf\":[{\"$ref\":\"#/$defs/ActionCapability\"},{\"type\":\"null\"}]},\"description\":\"Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it.\"}},\"description\":\"A page of results plus an opaque cursor for the next page, or null when this is the last\\npage. Wire keys are frozen: `items` (already lowercase under the camelCase policy) and\\n`next_cursor` (pinned explicitly — the policy alone would emit `nextCursor`).\"},\"PublicEnvironmentSideSummary\":{\"type\":[\"object\",\"null\"],\"properties\":{\"isEnabled\":{\"type\":[\"boolean\",\"null\"]},\"ruleCount\":{\"type\":[\"integer\",\"null\"]},\"prerequisiteCount\":{\"type\":[\"integer\",\"null\"]}},\"description\":\"One side's headline numbers in a project-level comparison row.\"},\"PublicEnvironmentSnapshot\":{\"type\":[\"object\",\"null\"],\"properties\":{\"isEnabled\":{\"type\":[\"boolean\",\"null\"]},\"defaultVariation\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicKeyedRef\"},{\"type\":\"null\"}]},\"strategy\":{\"type\":[\"string\",\"null\"]},\"rules\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicSnapshotRule\"},{\"type\":\"null\"}]}},\"prerequisites\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicPrerequisiteDto\"},{\"type\":\"null\"}]}}},\"description\":\"A flag's configuration in one environment, as a comparison or copy result reports it.\"},\"PublicEvaluationSource\":{\"type\":[\"object\",\"null\"],\"properties\":{\"source\":{\"type\":[\"string\",\"null\"],\"description\":\"One of rule, fallthrough, off, prerequisite, error, notFound or unknown (an SDK that reports no reason, or evaluations recorded before sources were). Allowed values: rule, fallthrough, off, prerequisite, error, notFound, unknown.\"},\"ruleId\":{\"type\":[\"string\",\"null\"],\"description\":\"For a rule, its id (rules have no key). Null otherwise, or when the SDK didn't say which rule.\"},\"ruleLabel\":{\"type\":[\"string\",\"null\"],\"description\":\"For a live rule, its description or a generated label. Null otherwise.\"},\"ruleExists\":{\"type\":[\"boolean\",\"null\"],\"description\":\"False when the rule is no longer in the environment's targeting.\"},\"count\":{\"type\":[\"integer\",\"null\"],\"description\":\"Evaluations this source served.\"},\"share\":{\"type\":[\"number\",\"null\"],\"description\":\"Count as a fraction (0 to 1) of all sources' counts combined.\"},\"variations\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicEvaluationVariation\"},{\"type\":\"null\"}]},\"description\":\"What this source served, with shares of this source's count.\"},\"rollout\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicRolloutCheck\"},{\"type\":\"null\"}]}},\"description\":\"The evaluations one part of the targeting served.\"},\"PublicEvaluationVariation\":{\"type\":[\"object\",\"null\"],\"properties\":{\"variationKey\":{\"type\":[\"string\",\"null\"],\"description\":\"The variation served, or null for evaluations recorded without one.\"},\"name\":{\"type\":[\"string\",\"null\"],\"description\":\"The variation's name, or null when the key no longer matches one of the flag's variations.\"},\"exists\":{\"type\":[\"boolean\",\"null\"],\"description\":\"False when the key no longer matches one of the flag's variations.\"},\"count\":{\"type\":[\"integer\",\"null\"],\"description\":\"Evaluations that served this variation.\"},\"share\":{\"type\":[\"number\",\"null\"],\"description\":\"Count as a fraction (0 to 1) of the parent total: the window's total, or for a source's variations that source's count. 0 when the parent total is 0.\"}},\"description\":\"One variation's evaluations.\"},\"PublicFlagComparison\":{\"type\":[\"object\",\"null\"],\"properties\":{\"flagKey\":{\"type\":[\"string\",\"null\"]},\"differences\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}},\"base\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicFlagComparisonSide\"},{\"type\":\"null\"}]},\"other\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicFlagComparisonSide\"},{\"type\":\"null\"}]}},\"description\":\"Response of `GET .../flags/{flag}/compare`.\"},\"PublicFlagComparisonRow\":{\"type\":[\"object\",\"null\"],\"properties\":{\"flagKey\":{\"type\":[\"string\",\"null\"]},\"flagName\":{\"type\":[\"string\",\"null\"]},\"tags\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}},\"ownerUserId\":{\"type\":[\"string\",\"null\"]},\"status\":{\"type\":[\"string\",\"null\"]},\"differences\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}},\"base\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicEnvironmentSideSummary\"},{\"type\":\"null\"}]},\"other\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicEnvironmentSideSummary\"},{\"type\":\"null\"}]}},\"description\":\"One flag in `GET .../projects/{project}/compare`. `differences` lists the sections that differ\\n(`state`, `defaultVariation`, `strategy`, `rules`, `prerequisites`). A side is null when\\nthe flag has no configuration in that environment.\"},\"PublicFlagComparisonRowPagedResult\":{\"type\":[\"object\",\"null\"],\"properties\":{\"items\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicFlagComparisonRow\"},{\"type\":\"null\"}]}},\"next_cursor\":{\"type\":[\"string\",\"null\"]}},\"description\":\"A page of results plus an opaque cursor for the next page, or null when this is the last\\npage. Wire keys are frozen: `items` (already lowercase under the camelCase policy) and\\n`next_cursor` (pinned explicitly — the policy alone would emit `nextCursor`).\"},\"PublicFlagComparisonSide\":{\"type\":[\"object\",\"null\"],\"properties\":{\"config\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicFlagEnvConfigResponse\"},{\"type\":\"null\"}]},\"targeting\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicTargetingConfigResponse\"},{\"type\":\"null\"}]},\"snapshot\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicEnvironmentSnapshot\"},{\"type\":\"null\"}]},\"ruleHasMatchInOther\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"boolean\",\"null\"]},\"description\":\"Per rule in evaluation order: whether the other environment has an equal rule.\"}},\"description\":\"One environment's side of a per-flag comparison.\"},\"PublicFlagEnvConfigResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"environmentId\":{\"type\":[\"string\",\"null\"]},\"environmentKey\":{\"type\":[\"string\",\"null\"]},\"isEnabled\":{\"type\":[\"boolean\",\"null\"]},\"defaultVariationId\":{\"type\":[\"string\",\"null\"]},\"strategy\":{\"type\":[\"string\",\"null\"],\"description\":\"Allowed values: SingleVariation, PercentageRollout, TargetedRollout.\"},\"prerequisites\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicPrerequisiteDto\"},{\"type\":\"null\"}]}},\"_actions\":{\"type\":[\"object\",\"null\"],\"additionalProperties\":{\"anyOf\":[{\"$ref\":\"#/$defs/ActionCapability\"},{\"type\":\"null\"}]},\"description\":\"Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it.\"}},\"description\":\"Public representation of a flag's config within a single environment, returned by\\n`GET .../flags/{flag}/environments` and `GET .../flags/{flag}/environments/{env}`.\\nDrops internal/dashboard-only fields present on FlagEnvironmentConfigurationDto\\n— Id (an internal row id, not part of the public\\ncontract; EnvironmentId is the addressable key), `FeatureFlagId` (implicit\\nin the route), the environment's name/color/sort-order (dashboard display fields — the public\\ncontract only needs the addressable EnvironmentKey), and `Staleness` (an\\ninternal analytics signal).\"},\"PublicFlagEvaluationsResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"environmentKey\":{\"type\":[\"string\",\"null\"],\"description\":\"The environment's key.\"},\"days\":{\"type\":[\"integer\",\"null\"],\"description\":\"The window requested: 7, 30 or 90.\"},\"fromUtc\":{\"type\":[\"string\",\"null\"],\"description\":\"Start of the window: UTC midnight `days - 1` days ago, or the flag's creation day if later.\"},\"toUtc\":{\"type\":[\"string\",\"null\"],\"description\":\"When the counts were read.\"},\"totalCount\":{\"type\":[\"integer\",\"null\"],\"description\":\"Evaluations in the window. Evaluation counts, not unique users.\"},\"lastEvaluatedAtUtc\":{\"type\":[\"string\",\"null\"],\"description\":\"The last reported evaluation, or null if none was reported.\"},\"variations\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicEvaluationVariation\"},{\"type\":\"null\"}]},\"description\":\"Evaluations per variation over the window.\"},\"sources\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicEvaluationSource\"},{\"type\":\"null\"}]},\"description\":\"Evaluations per part of the targeting that served them: live rules in evaluation order, then deleted rules, then fallthrough, off, prerequisite, error, notFound and unknown. A live percentage-rollout rule is always listed, with a count of 0 and no variations when it served nothing in the window, so its rollout check (and rollout.unreached) has a row.\"}},\"description\":\"What a flag served in one environment over the window, returned by\\n`GET .../flags/{flag}/environments/{env}/evaluations` (#4225). These are evaluation\\ncounts, not unique users. They come from SDK-reported events, so an environment whose SDKs\\nreport none reads zero: no evaluations reported, not necessarily no traffic. The public\\ncounterpart of FlagEvaluationAnalyticsDto, keyed by environment key instead of\\nid and without the dashboard's daily series.\"},\"PublicFlagListItem\":{\"type\":[\"object\",\"null\"],\"properties\":{\"id\":{\"type\":[\"string\",\"null\"]},\"key\":{\"type\":[\"string\",\"null\"]},\"name\":{\"type\":[\"string\",\"null\"]},\"type\":{\"type\":[\"string\",\"null\"],\"description\":\"Allowed values: Boolean, String, Number, Json.\"},\"isArchived\":{\"type\":[\"boolean\",\"null\"]},\"clientSideVisible\":{\"type\":[\"boolean\",\"null\"]},\"tags\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}},\"createdAt\":{\"type\":[\"string\",\"null\"]},\"updatedAt\":{\"type\":[\"string\",\"null\"]},\"expiresAtUtc\":{\"type\":[\"string\",\"null\"]},\"owner\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicFlagOwner\"},{\"type\":\"null\"}]},\"removalPrUrl\":{\"type\":[\"string\",\"null\"]},\"isPermanent\":{\"type\":[\"boolean\",\"null\"]},\"effectiveExpiresAtUtc\":{\"type\":[\"string\",\"null\"]},\"expirySource\":{\"type\":[\"string\",\"null\"]}},\"description\":\"Public list-item representation of a feature flag, returned by\\n`GET .../flags`. Narrower than PublicFlagResponse — drops\\nVariations (a summary-only shape upstream) and\\nStaleness, matching the \\\"list is narrower than detail\\\"\\nsplit already present on the Application-layer DTOs.\\nEffectiveExpiresAtUtc is when the flag counts as past expiry, from its own ExpiresAtUtc\\nor its project's default lifetime; ExpirySource says which (`explicit` / `project-default`),\\nboth null when neither applies.\"},\"PublicFlagListItemPagedResult\":{\"type\":[\"object\",\"null\"],\"properties\":{\"items\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicFlagListItem\"},{\"type\":\"null\"}]}},\"next_cursor\":{\"type\":[\"string\",\"null\"]},\"_actions\":{\"type\":[\"object\",\"null\"],\"additionalProperties\":{\"anyOf\":[{\"$ref\":\"#/$defs/ActionCapability\"},{\"type\":\"null\"}]},\"description\":\"Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it.\"}},\"description\":\"A page of results plus an opaque cursor for the next page, or null when this is the last\\npage. Wire keys are frozen: `items` (already lowercase under the camelCase policy) and\\n`next_cursor` (pinned explicitly — the policy alone would emit `nextCursor`).\"},\"PublicFlagOwner\":{\"type\":[\"object\",\"null\"],\"properties\":{\"id\":{\"type\":[\"string\",\"null\"]},\"email\":{\"type\":[\"string\",\"null\"]},\"name\":{\"type\":[\"string\",\"null\"]}},\"description\":\"A flag's owner as returned on flag reads. Null means the flag is unowned.\"},\"PublicFlagRemovalCandidate\":{\"type\":[\"object\",\"null\"],\"properties\":{\"key\":{\"type\":[\"string\",\"null\"]},\"reason\":{\"type\":[\"string\",\"null\"]},\"treatment\":{\"type\":[\"boolean\",\"null\"]},\"status\":{\"type\":[\"string\",\"null\"]},\"blockedBy\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}}},\"description\":\"One dead flag the Featureflip Flag Cleanup Action should remove, returned by\\n`GET .../flags/removal-candidates`. `Treatment` is the kill decision: true → keep the\\nflag's on-branch, false → keep the off-branch. `Status` is the flag's staleness tier\\n(`\\\"Stale\\\"` or `\\\"Dead\\\"`, never `\\\"Active\\\"`) — lets a caller distinguish the two when\\n`?staleness=stale` widens the response to include both tiers. This is the ONLY public\\nprojection of staleness — PublicFlagResponse and PublicFlagListItem\\nstill omit it by design. `BlockedBy` names the live flags that still list this one as a\\nprerequisite, sorted by key; while it is non-empty the flag cannot be archived\\n(`FLAG_HAS_DEPENDENTS`), so a caller should remove those dependents first.\"},\"PublicFlagRemovalCandidatePagedResult\":{\"type\":[\"object\",\"null\"],\"properties\":{\"items\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicFlagRemovalCandidate\"},{\"type\":\"null\"}]}},\"next_cursor\":{\"type\":[\"string\",\"null\"]}},\"description\":\"A page of results plus an opaque cursor for the next page, or null when this is the last\\npage. Wire keys are frozen: `items` (already lowercase under the camelCase policy) and\\n`next_cursor` (pinned explicitly — the policy alone would emit `nextCursor`).\"},\"PublicFlagResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"id\":{\"type\":[\"string\",\"null\"]},\"key\":{\"type\":[\"string\",\"null\"]},\"name\":{\"type\":[\"string\",\"null\"]},\"description\":{\"type\":[\"string\",\"null\"]},\"type\":{\"type\":[\"string\",\"null\"],\"description\":\"Allowed values: Boolean, String, Number, Json.\"},\"isArchived\":{\"type\":[\"boolean\",\"null\"]},\"clientSideVisible\":{\"type\":[\"boolean\",\"null\"]},\"tags\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}},\"variations\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicVariationResponse\"},{\"type\":\"null\"}]}},\"createdAt\":{\"type\":[\"string\",\"null\"]},\"updatedAt\":{\"type\":[\"string\",\"null\"]},\"expiresAtUtc\":{\"type\":[\"string\",\"null\"]},\"owner\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicFlagOwner\"},{\"type\":\"null\"}]},\"removalPrUrl\":{\"type\":[\"string\",\"null\"]},\"isPermanent\":{\"type\":[\"boolean\",\"null\"]},\"effectiveExpiresAtUtc\":{\"type\":[\"string\",\"null\"]},\"expirySource\":{\"type\":[\"string\",\"null\"]},\"_actions\":{\"type\":[\"object\",\"null\"],\"additionalProperties\":{\"anyOf\":[{\"$ref\":\"#/$defs/ActionCapability\"},{\"type\":\"null\"}]},\"description\":\"Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it.\"}},\"description\":\"Public detail representation of a feature flag, returned by\\n`GET .../flags/{flag}` and the body of a successful create. Drops internal/dashboard-only\\nfields present on FeatureFlagDto — notably `ProjectId` (implicit in the\\nroute) and `Staleness` (an internal analytics signal, not part of the public contract).\\nEffectiveExpiresAtUtc is when the flag counts as past expiry, from its own ExpiresAtUtc\\nor its project's default lifetime; ExpirySource says which (`explicit` / `project-default`),\\nboth null when neither applies.\"},\"PublicFlagTriggerResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"id\":{\"type\":[\"string\",\"null\"]},\"name\":{\"type\":[\"string\",\"null\"]},\"description\":{\"type\":[\"string\",\"null\"]},\"action\":{\"type\":[\"string\",\"null\"]},\"enabled\":{\"type\":[\"boolean\",\"null\"]},\"secretLastFour\":{\"type\":[\"string\",\"null\"]},\"createdAt\":{\"type\":[\"string\",\"null\"]},\"updatedAt\":{\"type\":[\"string\",\"null\"]},\"lastFiredAt\":{\"type\":[\"string\",\"null\"]}},\"description\":\"A flag trigger (#4651) as `/api/v1` returns it. Carries only the secret's last four characters:\\nthe URL is returned once, by PublicFlagTriggerWithUrlResponse. Flag and environment are\\nimplicit in the route.\"},\"PublicFlagTriggerResponsePagedResult\":{\"type\":[\"object\",\"null\"],\"properties\":{\"items\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicFlagTriggerResponse\"},{\"type\":\"null\"}]}},\"next_cursor\":{\"type\":[\"string\",\"null\"]}},\"description\":\"A page of results plus an opaque cursor for the next page, or null when this is the last\\npage. Wire keys are frozen: `items` (already lowercase under the camelCase policy) and\\n`next_cursor` (pinned explicitly — the policy alone would emit `nextCursor`).\"},\"PublicFlagTriggerWithUrlResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"trigger\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicFlagTriggerResponse\"},{\"type\":\"null\"}]},\"url\":{\"type\":[\"string\",\"null\"]},\"endpoint\":{\"type\":[\"string\",\"null\"]},\"secret\":{\"type\":[\"string\",\"null\"]},\"warning\":{\"type\":[\"string\",\"null\"]}},\"description\":\"The only response that carries a trigger's secret: create and rotate. Fire it by POSTing to\\nUrl, or to Endpoint with `Authorization: Bearer {Secret}`, which keeps\\nthe secret out of the URL. Anyone holding either can fire the trigger, so store it as a secret in the\\nmonitoring tool.\"},\"PublicKeyedRef\":{\"type\":[\"object\",\"null\"],\"properties\":{\"id\":{\"type\":[\"string\",\"null\"]},\"key\":{\"type\":[\"string\",\"null\"]},\"name\":{\"type\":[\"string\",\"null\"]}},\"description\":\"An id with its key and name beside it, as the other v1 responses pair them. Key and name are null only for a deleted target.\"},\"PublicPlanLimit\":{\"type\":[\"object\",\"null\"],\"properties\":{\"resource\":{\"type\":[\"string\",\"null\"]},\"plan\":{\"type\":[\"string\",\"null\"]},\"max\":{\"type\":[\"integer\",\"null\"]}},\"description\":\"The cap behind a `plan_limit_reached` error. `resource` is the capped collection\\n(`projects`, `environments`, `flags`, `webhooks`, `members`);\\n`plan` is the plan's wire name, as `GET /api/v1/orgs/{org}` returns it; `max` is\\nthe cap. The environment and flag caps are per project.\"},\"PublicPrerequisiteDto\":{\"type\":[\"object\",\"null\"],\"properties\":{\"prerequisiteFlagKey\":{\"type\":[\"string\",\"null\"]},\"expectedVariationKey\":{\"type\":[\"string\",\"null\"]}},\"description\":\"A single prerequisite entry on a flag's per-environment config. Maps 1:1 onto\\nPrerequisiteDto (read side) and PrerequisiteInput (write side).\"},\"PublicPutTargetingRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"rules\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicCreateTargetingRuleRequest\"},{\"type\":\"null\"}]}}},\"description\":\"Request body for `PUT .../targeting` — a declarative full replace of the environment's\\nordered targeting rule set. Rules are applied in array order (index = priority, so the array\\norder IS the evaluation order). Rules is nullable so that an OMITTED `rules`\\nfield (a body of `{}`) binds successfully instead of failing ASP.NET Core's implicit\\nrequired-property check on non-nullable reference types — both an omitted `rules` field\\nand an explicit empty list (`{ \\\"rules\\\": [] }`) clear all targeting rules for the\\nenvironment. Each element is a PublicCreateTargetingRuleRequest (identical to the\\n`POST .../rules` body), so `UserSegmentId` is supported — segment-scoped rules can be\\nsubmitted through this endpoint. The replace is atomic (all-or-nothing): the whole rule set is\\nswapped in one transaction, or nothing changes.\"},\"PublicRampStep\":{\"type\":[\"object\",\"null\"],\"properties\":{\"percent\":{\"type\":[\"integer\",\"null\"]},\"holdMinutes\":{\"type\":[\"integer\",\"null\"]}},\"description\":\"One rung of a rollout ramp: the percentage served, then how long it holds before the next rung. Both fields\\nare required.\"},\"PublicReorderRulesRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"ruleIds\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}}},\"description\":\"Request body for `PUT .../rules/reorder`. Must include every existing rule id exactly\\nonce — `ReorderTargetingRulesCommandHandler` rejects duplicate, omitted, or unknown rule\\nids with `BadRequestException`, surfaced as an HTTP 400 `bad_request` envelope\\ncarrying the handler's message.\"},\"PublicRolloutCheck\":{\"type\":[\"object\",\"null\"],\"properties\":{\"configured\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicConfiguredWeight\"},{\"type\":\"null\"}]},\"description\":\"The configured weights, in percent; they sum to 100.\"},\"splitChangedAtUtc\":{\"type\":[\"string\",\"null\"],\"description\":\"The last time the split may have changed (the rule was edited, or a variation was added), or null if it hasn't since the rule was created. A change inside the window mixes two splits.\"},\"evaluable\":{\"type\":[\"boolean\",\"null\"],\"description\":\"Whether the check could run. See NotEvaluableReason when false.\"},\"pValue\":{\"type\":[\"number\",\"null\"],\"description\":\"The sample-ratio test's p-value, or null when not evaluable.\"},\"flagged\":{\"type\":[\"boolean\",\"null\"],\"description\":\"True only when the served split is both unlikely under the configured weights (p < 0.001) and at least 2 percentage points off for some variation.\"},\"notEvaluableReason\":{\"type\":[\"string\",\"null\"],\"description\":\"too-little-traffic or unexpected-variation when the check couldn't run; null otherwise. Allowed values: too-little-traffic, unexpected-variation.\"},\"bucketBy\":{\"type\":[\"string\",\"null\"],\"description\":\"The context attribute the rollout hashes on. A context without it skips the rule, even at 100%.\"},\"unreached\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicRolloutUnreached\"},{\"type\":\"null\"}]}},\"description\":\"A percentage-rollout rule's configured split beside a sample-ratio check of what it served.\"},\"PublicRolloutRampResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"id\":{\"type\":[\"string\",\"null\"]},\"ruleId\":{\"type\":[\"string\",\"null\"]},\"isDefaultRule\":{\"type\":[\"boolean\",\"null\"]},\"targetVariationId\":{\"type\":[\"string\",\"null\"]},\"status\":{\"type\":[\"string\",\"null\"]},\"steps\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicRampStep\"},{\"type\":\"null\"}]}},\"currentStepIndex\":{\"type\":[\"integer\",\"null\"]},\"nextStepAt\":{\"type\":[\"string\",\"null\"]},\"pausedReason\":{\"type\":[\"string\",\"null\"]},\"pausedDetail\":{\"type\":[\"string\",\"null\"]},\"startedByName\":{\"type\":[\"string\",\"null\"]},\"createdAt\":{\"type\":[\"string\",\"null\"]},\"completedAt\":{\"type\":[\"string\",\"null\"]},\"abortedAt\":{\"type\":[\"string\",\"null\"]}},\"description\":\"A rollout ramp (#4653, #5180) as `/api/v1` returns it. Flag and environment are implicit in the route.\\nA ramp drives either a targeting rule (RuleId set) or the default rule\\n(IsDefaultRule true, TargetVariationId the variation it rolls out).\\nStatus is `Running`, `Paused`, `Completed` or `Aborted`.\\nCurrentStepIndex is the step last applied, -1 before the first. NextStepAt is\\nset only while running and not yet on the last step.\"},\"PublicRolloutRampResponsePagedResult\":{\"type\":[\"object\",\"null\"],\"properties\":{\"items\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicRolloutRampResponse\"},{\"type\":\"null\"}]}},\"next_cursor\":{\"type\":[\"string\",\"null\"]}},\"description\":\"A page of results plus an opaque cursor for the next page, or null when this is the last\\npage. Wire keys are frozen: `items` (already lowercase under the camelCase policy) and\\n`next_cursor` (pinned explicitly — the policy alone would emit `nextCursor`).\"},\"PublicRolloutUnreached\":{\"type\":[\"object\",\"null\"],\"properties\":{\"eligibleEvaluations\":{\"type\":[\"integer\",\"null\"],\"description\":\"Evaluations that reached the flag's rules or fallthrough since SinceUtc, while this rule served none.\"},\"sinceUtc\":{\"type\":[\"string\",\"null\"],\"description\":\"The window start, or the first UTC midnight after the rule last changed when that is later.\"}},\"description\":\"A live rollout rule that no evaluations reached.\"},\"PublicRotateWebhookSecretResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"secretId\":{\"type\":[\"string\",\"null\"]},\"secret\":{\"type\":[\"string\",\"null\"]},\"warning\":{\"type\":[\"string\",\"null\"]}},\"description\":\"A newly added signing secret. The secret is shown only here.\"},\"PublicSdkKeyResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"id\":{\"type\":[\"string\",\"null\"]},\"name\":{\"type\":[\"string\",\"null\"]},\"description\":{\"type\":[\"string\",\"null\"]},\"type\":{\"type\":[\"string\",\"null\"],\"description\":\"Allowed values: ClientSide, ServerSide.\"},\"lastFourCharacters\":{\"type\":[\"string\",\"null\"]},\"isActive\":{\"type\":[\"boolean\",\"null\"]},\"createdAt\":{\"type\":[\"string\",\"null\"]},\"lastUsedAt\":{\"type\":[\"string\",\"null\"]},\"revokedAt\":{\"type\":[\"string\",\"null\"]},\"_actions\":{\"type\":[\"object\",\"null\"],\"additionalProperties\":{\"anyOf\":[{\"$ref\":\"#/$defs/ActionCapability\"},{\"type\":\"null\"}]},\"description\":\"Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it.\"}},\"description\":\"Public representation of an SDK key, returned by\\n`GET /api/v1/orgs/{org}/projects/{project}/environments/{env}/sdk-keys` (list) and\\n`GET .../sdk-keys/{sdkKey}` (detail). Deliberately narrower than\\nSdkKeyDto — drops `RevokedBy` (an internal user id) and\\n`EnvironmentId` (implicit in the route), and carries no plaintext key field: only\\nLastFourCharacters is ever exposed once the key has been created. The plaintext\\nkey is a one-time value that appears solely in PublicCreateSdkKeyResponse.\"},\"PublicSdkKeyResponsePagedResult\":{\"type\":[\"object\",\"null\"],\"properties\":{\"items\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicSdkKeyResponse\"},{\"type\":\"null\"}]}},\"next_cursor\":{\"type\":[\"string\",\"null\"]},\"_actions\":{\"type\":[\"object\",\"null\"],\"additionalProperties\":{\"anyOf\":[{\"$ref\":\"#/$defs/ActionCapability\"},{\"type\":\"null\"}]},\"description\":\"Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it.\"}},\"description\":\"A page of results plus an opaque cursor for the next page, or null when this is the last\\npage. Wire keys are frozen: `items` (already lowercase under the camelCase policy) and\\n`next_cursor` (pinned explicitly — the policy alone would emit `nextCursor`).\"},\"PublicSegmentConditionDto\":{\"type\":[\"object\",\"null\"],\"properties\":{\"attribute\":{\"type\":[\"string\",\"null\"]},\"operator\":{\"type\":[\"string\",\"null\"],\"description\":\"Allowed values: Equals, NotEquals, Contains, NotContains, GreaterThan, LessThan, GreaterThanOrEqual, LessThanOrEqual, In, NotIn, MatchesRegex, StartsWith, EndsWith, Before, After, SemverEquals, SemverGreaterThan, SemverGreaterThanOrEqual, SemverLessThan, SemverLessThanOrEqual.\"},\"values\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}},\"negate\":{\"type\":[\"boolean\",\"null\"]}},\"description\":\"A single targeting condition on a segment, used both as input (create/update) and output\\n(Conditions). Operator is a bare string on\\nboth sides of the wire — on write it's parsed to\\nOperatorType by `SegmentsController` (an unknown\\nvalue fails closed with a 400, never silently dropped or defaulted); on read it's mapped\\nstraight through from Operator, which is already a string.\"},\"PublicSegmentResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"id\":{\"type\":[\"string\",\"null\"]},\"key\":{\"type\":[\"string\",\"null\"]},\"name\":{\"type\":[\"string\",\"null\"]},\"description\":{\"type\":[\"string\",\"null\"]},\"conditions\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicSegmentConditionDto\"},{\"type\":\"null\"}]}},\"createdAt\":{\"type\":[\"string\",\"null\"]},\"updatedAt\":{\"type\":[\"string\",\"null\"]},\"_actions\":{\"type\":[\"object\",\"null\"],\"additionalProperties\":{\"anyOf\":[{\"$ref\":\"#/$defs/ActionCapability\"},{\"type\":\"null\"}]},\"description\":\"Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it.\"}},\"description\":\"Public representation of a user segment, returned by `GET .../segments`,\\n`GET .../segments/{segment}`, and the body of a successful create.\"},\"PublicSegmentResponsePagedResult\":{\"type\":[\"object\",\"null\"],\"properties\":{\"items\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicSegmentResponse\"},{\"type\":\"null\"}]}},\"next_cursor\":{\"type\":[\"string\",\"null\"]},\"_actions\":{\"type\":[\"object\",\"null\"],\"additionalProperties\":{\"anyOf\":[{\"$ref\":\"#/$defs/ActionCapability\"},{\"type\":\"null\"}]},\"description\":\"Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it.\"}},\"description\":\"A page of results plus an opaque cursor for the next page, or null when this is the last\\npage. Wire keys are frozen: `items` (already lowercase under the camelCase policy) and\\n`next_cursor` (pinned explicitly — the policy alone would emit `nextCursor`).\"},\"PublicSetDefaultFlagLifetimeRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"days\":{\"type\":[\"integer\",\"null\"]}},\"description\":\"Request body for `PUT /api/v1/orgs/{org}/projects/{project}/default-flag-lifetime`. `days`\\nis 1–3650, or an explicit null to remove the default. `days` is required: a body without it\\n(`{}`, or a misspelled field) is a `validation_failed` 400, never a removal, so a typo\\ncan't silently wipe the setting (#3788). A request with no body is rejected too.\"},\"PublicSetFlagExpiryRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"expiresAtUtc\":{\"type\":[\"string\",\"null\"]}},\"description\":\"Request body for `PUT /api/v1/orgs/{org}/projects/{project}/flags/{flag}/expiry`. Expiry is a\\ndedicated sub-resource, deliberately NOT a field on PublicUpdateFeatureFlagRequest: that\\nPUT is a full replace, so a new nullable field there would let any client that doesn't know about\\nexpiry (the Terraform provider included) wipe it on every update. A bare date means the end of that\\nUTC day; a full timestamp is stored exactly.\"},\"PublicSetFlagOwnerRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"email\":{\"type\":[\"string\",\"null\"]}},\"description\":\"Request body for `PUT /api/v1/orgs/{org}/projects/{project}/flags/{flag}/owner`. A dedicated\\nsub-resource for the same reason as expiry: the main flag PUT is a full replace, so an owner field\\nthere would let every client that doesn't know about owners wipe one. `email` must belong\\nto an active member of the organization (case-insensitive).\"},\"PublicSetFlagRemovalPrRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"url\":{\"type\":[\"string\",\"null\"]}},\"description\":\"Request body for `PUT /api/v1/orgs/{org}/projects/{project}/flags/{flag}/removal-pr`: the\\npull request that removes this flag from code, as opened by the Featureflip Flag Cleanup Action.\\nA dedicated sub-resource for the same reason as expiry and owner. `url` must be an https\\npull or merge request URL (`https://{host}/{owner}/{repo}/pull/{number}`, a GitLab\\n`https://{host}/{group}/{project}/-/merge_requests/{number}` or a Bitbucket Cloud\\n`https://{host}/{workspace}/{repo}/pull-requests/{number}`).\"},\"PublicSnapshotRule\":{\"type\":[\"object\",\"null\"],\"properties\":{\"description\":{\"type\":[\"string\",\"null\"]},\"variation\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicKeyedRef\"},{\"type\":\"null\"}]},\"segment\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicKeyedRef\"},{\"type\":\"null\"}]},\"rolloutPercentage\":{\"type\":[\"integer\",\"null\"]},\"bucketBy\":{\"type\":[\"string\",\"null\"]},\"conditionGroups\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicConditionGroupResponse\"},{\"type\":\"null\"}]}}},\"description\":\"A targeting rule as a comparison or copy shows it: the variation and segment with key and name, and the\\ncondition groups in the shape the targeting endpoints return.\"},\"PublicStartDefaultRuleRolloutRampRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"steps\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicRampStep\"},{\"type\":\"null\"}]}},\"variationId\":{\"type\":[\"string\",\"null\"]},\"bucketBy\":{\"type\":[\"string\",\"null\"]}},\"description\":\"Request body for `POST …/default-rule/ramp`. VariationId (and optionally\\nBucketBy) set the rollout up when the default rule has none; with one configured they may be\\nomitted, or must match it. A ladder ending at 100% finalises: the variation becomes the default variation.\"},\"PublicStartRolloutRampRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"steps\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicRampStep\"},{\"type\":\"null\"}]}}},\"description\":\"Request body for `POST …/rules/{ruleId}/ramp`. Between 1 and 20 steps, each percentage above the last and\\nthe first not below the rule's current rollout; every hold but the last is 5 minutes to 30 days, and the last\\none 0 minutes to 30 days. Elements are\\nnullable so a null step is a field error, not a 500.\"},\"PublicTargetingConfigResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"isEnabled\":{\"type\":[\"boolean\",\"null\"]},\"rules\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicTargetingRuleResponse\"},{\"type\":\"null\"}]}},\"_actions\":{\"type\":[\"object\",\"null\"],\"additionalProperties\":{\"anyOf\":[{\"$ref\":\"#/$defs/ActionCapability\"},{\"type\":\"null\"}]},\"description\":\"Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it.\"}},\"description\":\"The full targeting configuration for a flag in a single environment, returned by\\n`GET .../targeting`. Maps 1:1 onto TargetingConfigurationDto — including\\nits IsEnabled field, which reflects the parent\\n`FlagEnvironmentConfiguration.IsEnabled` (whether the flag is on in this environment at\\nall), not anything specific to targeting itself.\"},\"PublicTargetingRuleResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"id\":{\"type\":[\"string\",\"null\"]},\"priority\":{\"type\":[\"integer\",\"null\"]},\"description\":{\"type\":[\"string\",\"null\"]},\"variationId\":{\"type\":[\"string\",\"null\"]},\"rolloutPercentage\":{\"type\":[\"integer\",\"null\"]},\"bucketBy\":{\"type\":[\"string\",\"null\"],\"description\":\"Context attribute the rollout hashes on (default `user_id`; `userId` is accepted as an alias). A context without it skips this rule, even at 100%. Lookup is exact and case-sensitive, except `user_id`/`userId`, which both read the user id.\"},\"userSegmentId\":{\"type\":[\"string\",\"null\"]},\"conditionGroups\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicConditionGroupResponse\"},{\"type\":\"null\"}]}},\"_actions\":{\"type\":[\"object\",\"null\"],\"additionalProperties\":{\"anyOf\":[{\"$ref\":\"#/$defs/ActionCapability\"},{\"type\":\"null\"}]},\"description\":\"Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it.\"}},\"description\":\"A single targeting rule, returned by `GET .../rules/{ruleId}`,\\n`POST .../rules` (201 body), and nested within PublicTargetingConfigResponse.\\nMaps 1:1 onto TargetingRuleDto, dropping nothing — every field on the\\nApplication DTO is part of the public contract.\"},\"PublicTestWebhookSubscriptionResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"webhookEventId\":{\"type\":[\"string\",\"null\"]},\"webhookDeliveryId\":{\"type\":[\"string\",\"null\"]}},\"description\":\"The queued test event and its delivery. Poll the delivery log for the outcome.\"},\"PublicToggleFlagRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"enabled\":{\"type\":[\"boolean\",\"null\"]}},\"description\":\"Request body for `POST .../flags/{flag}/environments/{env}/toggle`. Named distinctly from\\nthe dashboard's own `ToggleFlagInEnvironmentRequest`\\n(which uses `IsEnabled`) — the public field is named Enabled per the phase-3c\\ncontract. Enabled is a NULLABLE `bool?` deliberately: a non-nullable value\\ntype would bind an omitted/empty body to `false` with no validation error (ASP.NET's\\nimplicit-required only covers non-nullable reference types, not value types), silently disabling\\nthe flag. The controller rejects a null Enabled with a `validation_failed` 400\\nso the intent is never ambiguous (#1806).\"},\"PublicUpdateEnvironmentRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"name\":{\"type\":[\"string\",\"null\"],\"description\":\"The environment's display name.\"},\"color\":{\"type\":[\"string\",\"null\"],\"description\":\"The environment's display color, or null.\"},\"sortOrder\":{\"type\":[\"integer\",\"null\"],\"description\":\"Position among the project's environments.\"},\"requireChangeReason\":{\"type\":[\"boolean\",\"null\"],\"description\":\"Require a change reason (X-Intent-Reason) on every change to flags in this environment. Business plan and above. Omit on update to leave unchanged. Turning it off needs Admin or Owner and an X-Intent-Reason.\"},\"requireConfirmation\":{\"type\":[\"boolean\",\"null\"],\"description\":\"Ask dashboard users to type the environment key before a change lands. Dashboard only; not enforced by the API. Omit on update to leave unchanged. Turning it off needs Admin or Owner and an X-Intent-Reason.\"}},\"description\":\"Request body for `PUT /api/v1/orgs/{org}/projects/{project}/environments/{env}`. See\\nPublicCreateEnvironmentRequest for why this is named distinctly from the\\ndashboard's `UpdateEnvironmentRequest`.\"},\"PublicUpdateFeatureFlagRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"name\":{\"type\":[\"string\",\"null\"]},\"description\":{\"type\":[\"string\",\"null\"]},\"tags\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}},\"clientSideVisible\":{\"type\":[\"boolean\",\"null\"]}},\"description\":\"Request body for `PUT /api/v1/orgs/{org}/projects/{project}/flags/{flag}`. See\\nPublicCreateFeatureFlagRequest for why this is named distinctly from the\\ndashboard's `UpdateFeatureFlagRequest`. The flag's key and type are immutable via this\\nendpoint (mirrors `UpdateFeatureFlagCommand`, which has no `Key`/`Type`).\"},\"PublicUpdateFlagEnvConfigRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"defaultVariationId\":{\"type\":[\"string\",\"null\"]},\"strategy\":{\"type\":[\"string\",\"null\"],\"description\":\"Allowed values: SingleVariation, PercentageRollout, TargetedRollout.\"},\"prerequisites\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicPrerequisiteDto\"},{\"type\":\"null\"}]}}},\"description\":\"Request body for `PUT .../flags/{flag}/environments/{env}`. Named distinctly from the\\ndashboard's own `UpdateFlagEnvironmentConfigurationRequest`\\n— see PublicCreateEnvironmentRequest for the schemaId-collision rationale (both\\ncontrollers share one Swagger document). Strategy is passed through verbatim to\\nStrategy\\n— the existing command validator name-allowlists it (SingleVariation/PercentageRollout/\\nTargetedRollout or null), so an invalid value surfaces as the handler's own 400, not a\\ncontroller-level guard. A null Prerequisites leaves prerequisites untouched; a\\nnon-null list replaces them wholesale (mirrors UpdateFlagPrerequisitesCommand's\\nreplace-all semantics).\"},\"PublicUpdateFlagTriggerRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"name\":{\"type\":[\"string\",\"null\"]},\"description\":{\"type\":[\"string\",\"null\"]},\"enabled\":{\"type\":[\"boolean\",\"null\"]}},\"description\":\"Request body for `PUT .../triggers/{trigger}`. The action is fixed at creation. Enabled is\\nnullable so leaving it out is a 400 rather than a bound `false` that silently turns the trigger off.\"},\"PublicUpdateProjectRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"name\":{\"type\":[\"string\",\"null\"]},\"description\":{\"type\":[\"string\",\"null\"]}},\"description\":\"Request body for `PUT /api/v1/orgs/{org}/projects/{project}`. See\\nPublicCreateProjectRequest for why this is named distinctly from the\\ndashboard's `UpdateProjectRequest`.\"},\"PublicUpdateSdkKeyRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"name\":{\"type\":[\"string\",\"null\"]},\"description\":{\"type\":[\"string\",\"null\"]}},\"description\":\"Request body for `PUT /api/v1/orgs/{org}/projects/{project}/environments/{env}/sdk-keys/{sdkKey}`.\\nType and key material are immutable via this endpoint (mirrors\\nUpdateSdkKeyCommand, which\\ncarries no `Type`).\"},\"PublicUpdateSegmentRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"name\":{\"type\":[\"string\",\"null\"]},\"description\":{\"type\":[\"string\",\"null\"]},\"conditions\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicSegmentConditionDto\"},{\"type\":\"null\"}]}}},\"description\":\"Request body for `PUT /api/v1/orgs/{org}/projects/{project}/segments/{segment}`. The\\nsegment's key is immutable via this endpoint (mirrors `UpdateUserSegmentCommand`, which\\ncarries no `Key`).\"},\"PublicUpdateTargetingRuleRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"description\":{\"type\":[\"string\",\"null\"]},\"variationId\":{\"type\":[\"string\",\"null\"]},\"rolloutPercentage\":{\"type\":[\"integer\",\"null\"]},\"userSegmentId\":{\"type\":[\"string\",\"null\"]},\"conditionGroups\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicConditionGroupRequest\"},{\"type\":\"null\"}]}},\"bucketBy\":{\"type\":[\"string\",\"null\"],\"description\":\"Context attribute the rollout hashes on (default `user_id`; `userId` is accepted as an alias). Omit to keep the current value. A fixed rule (no `rolloutPercentage`) never hashes and always stores `user_id`, so one made a rollout without `bucketBy` gets `user_id`. A context without it skips this rule, even at 100%. Changing it reshuffles who is in the rollout.\"}},\"description\":\"Request body for `PUT .../rules/{ruleId}`. Same shape as\\nPublicCreateTargetingRuleRequest — see its remarks on operator\\nvalidation/canonicalization, which applies identically here.\"},\"PublicUpdateVariationRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"name\":{\"type\":[\"string\",\"null\"]},\"value\":{\"type\":[\"string\",\"null\"]},\"description\":{\"type\":[\"string\",\"null\"]}},\"description\":\"Request body for\\n`PUT /api/v1/orgs/{org}/projects/{project}/flags/{flag}/variations/{variationId}`. The\\nvariation's key is immutable via this endpoint (mirrors\\n`UpdateVariationCommand`, which\\ncarries no `Key`).\"},\"PublicUpdateWebhookSubscriptionRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"name\":{\"type\":[\"string\",\"null\"]},\"url\":{\"type\":[\"string\",\"null\"]},\"eventTypes\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}},\"projectIds\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}},\"environmentIds\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}},\"isEnabled\":{\"type\":[\"boolean\",\"null\"]},\"credential\":{\"type\":[\"string\",\"null\"]}},\"description\":\"Replaces a subscription's configuration (full replace — omitted lists become empty, meaning\\n\\\"all\\\"). `isEnabled` is required. The provider cannot be changed. `credential`\\nreplaces a Datadog or Grafana subscription's stored credential; omit it to keep the current\\none, unless the `url` changes, which needs the credential sent again.\"},\"PublicVariationResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"id\":{\"type\":[\"string\",\"null\"]},\"key\":{\"type\":[\"string\",\"null\"]},\"name\":{\"type\":[\"string\",\"null\"]},\"value\":{\"type\":[\"string\",\"null\"]},\"description\":{\"type\":[\"string\",\"null\"]},\"_actions\":{\"type\":[\"object\",\"null\"],\"additionalProperties\":{\"anyOf\":[{\"$ref\":\"#/$defs/ActionCapability\"},{\"type\":\"null\"}]},\"description\":\"Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it.\"}},\"description\":\"A single variation on a flag, as returned in Variations.\"},\"PublicWebhookDeliveryResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"id\":{\"type\":[\"string\",\"null\"]},\"webhookEventId\":{\"type\":[\"string\",\"null\"]},\"status\":{\"type\":[\"string\",\"null\"],\"description\":\"Allowed values: Pending, Succeeded, DeadLettered.\"},\"attemptCount\":{\"type\":[\"integer\",\"null\"]},\"nextAttemptAt\":{\"type\":[\"string\",\"null\"]},\"lastResponseStatusCode\":{\"type\":[\"integer\",\"null\"]},\"lastError\":{\"type\":[\"string\",\"null\"]},\"completedAt\":{\"type\":[\"string\",\"null\"]},\"createdAt\":{\"type\":[\"string\",\"null\"]}},\"description\":\"One delivery attempt record. `status` is `Pending` (awaiting its first attempt,\\nbacking off, or in flight), `Succeeded` or `DeadLettered`.\"},\"PublicWebhookDeliveryResponsePagedResult\":{\"type\":[\"object\",\"null\"],\"properties\":{\"items\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicWebhookDeliveryResponse\"},{\"type\":\"null\"}]}},\"next_cursor\":{\"type\":[\"string\",\"null\"]}},\"description\":\"A page of results plus an opaque cursor for the next page, or null when this is the last\\npage. Wire keys are frozen: `items` (already lowercase under the camelCase policy) and\\n`next_cursor` (pinned explicitly — the policy alone would emit `nextCursor`).\"},\"PublicWebhookSecretResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"id\":{\"type\":[\"string\",\"null\"]},\"createdAt\":{\"type\":[\"string\",\"null\"]},\"retiredAt\":{\"type\":[\"string\",\"null\"]}},\"description\":\"A signing secret's id and lifecycle. A secret with no `retiredAt` is active and signs every delivery.\"},\"PublicWebhookSubscriptionResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"id\":{\"type\":[\"string\",\"null\"]},\"name\":{\"type\":[\"string\",\"null\"]},\"url\":{\"type\":[\"string\",\"null\"]},\"provider\":{\"type\":[\"string\",\"null\"],\"description\":\"Allowed values: GenericHttp, Slack, Datadog, Grafana.\"},\"isEnabled\":{\"type\":[\"boolean\",\"null\"]},\"eventTypes\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}},\"projectIds\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}},\"environmentIds\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}},\"consecutiveFailureCount\":{\"type\":[\"integer\",\"null\"]},\"autoDisabledAt\":{\"type\":[\"string\",\"null\"]},\"createdAt\":{\"type\":[\"string\",\"null\"]},\"updatedAt\":{\"type\":[\"string\",\"null\"]},\"secrets\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicWebhookSecretResponse\"},{\"type\":\"null\"}]}},\"overPlanLimit\":{\"type\":[\"boolean\",\"null\"]},\"_actions\":{\"type\":[\"object\",\"null\"],\"additionalProperties\":{\"anyOf\":[{\"$ref\":\"#/$defs/ActionCapability\"},{\"type\":\"null\"}]},\"description\":\"Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it.\"}},\"description\":\"A webhook subscription. Never carries secret material: signing secrets are listed by id and\\nlifecycle only — the value itself is returned once, when it is created or rotated.\\n`overPlanLimit` is true when the organization has more subscriptions than its plan\\nallows, which happens after a downgrade. The oldest subscriptions up to the limit keep\\ndelivering. The rest receive nothing and cannot be re-enabled, tested or redelivered to until\\nthe plan is upgraded or older subscriptions are deleted.\"},\"PublicWebhookSubscriptionResponsePagedResult\":{\"type\":[\"object\",\"null\"],\"properties\":{\"items\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicWebhookSubscriptionResponse\"},{\"type\":\"null\"}]}},\"next_cursor\":{\"type\":[\"string\",\"null\"]},\"_actions\":{\"type\":[\"object\",\"null\"],\"additionalProperties\":{\"anyOf\":[{\"$ref\":\"#/$defs/ActionCapability\"},{\"type\":\"null\"}]},\"description\":\"Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it.\"}},\"description\":\"A page of results plus an opaque cursor for the next page, or null when this is the last\\npage. Wire keys are frozen: `items` (already lowercase under the camelCase policy) and\\n`next_cursor` (pinned explicitly — the policy alone would emit `nextCursor`).\"}}")
|
|
237
|
+
$defs: /* @__PURE__ */ JSON.parse("{\"ActionCapability\":{\"type\":[\"object\",\"null\"],\"properties\":{\"allowed\":{\"type\":[\"boolean\",\"null\"]},\"reason\":{\"type\":[\"string\",\"null\"]}},\"description\":\"One entry in a resource's `_actions` block: may the caller perform it, and if not, why.\"},\"MeResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"type\":{\"type\":[\"string\",\"null\"]},\"id\":{\"type\":[\"string\",\"null\"]},\"name\":{\"type\":[\"string\",\"null\"]},\"email\":{\"type\":[\"string\",\"null\"]},\"emailVerified\":{\"type\":[\"boolean\",\"null\"]},\"organizationId\":{\"type\":[\"string\",\"null\"]},\"role\":{\"type\":[\"string\",\"null\"]},\"projectScope\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}}},\"description\":\"The authenticated caller's identity, returned by `GET /api/v1/me`. The public API\\nauthenticates two kinds of principal, so this is a `type`-discriminated shape.\\nA `\\\"user\\\"` caller (a session/JWT user or a personal access token, `ffp_...`) carries\\n`email` + `emailVerified`. A `\\\"service_token\\\"` caller (`ffs_...`) has no\\nbacking user row, so it carries `organizationId` + `role` + `projectScope` (the\\ntoken's org, its role in that org, and its project allowlist) instead. The type-inapplicable\\nfields are omitted from the response body. `projectScope` is omitted for an unrestricted\\nservice token (access to every project), never an empty list.\"},\"NextAction\":{\"type\":[\"object\",\"null\"],\"properties\":{\"method\":{\"type\":[\"string\",\"null\"]},\"path\":{\"type\":[\"string\",\"null\"]}}},\"OrganizationResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"id\":{\"type\":[\"string\",\"null\"]},\"name\":{\"type\":[\"string\",\"null\"]},\"slug\":{\"type\":[\"string\",\"null\"]},\"plan\":{\"type\":[\"string\",\"null\"],\"description\":\"Allowed values: Solo, Team, Pro, Business, Enterprise.\"},\"isActive\":{\"type\":[\"boolean\",\"null\"]},\"createdAt\":{\"type\":[\"string\",\"null\"]}},\"description\":\"Public representation of an organization, returned by both `GET /api/v1/orgs` (list) and\\n`GET /api/v1/orgs/{org}` (detail). Drops dashboard-only fields (`BillingEmail` is\\nbilling-contact PII, `UpdatedAt` is dashboard audit trivia) from the dashboard's\\nOrganizationDto/OrganizationListItemDto.\"},\"OrganizationResponsePagedResult\":{\"type\":[\"object\",\"null\"],\"properties\":{\"items\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/OrganizationResponse\"},{\"type\":\"null\"}]}},\"next_cursor\":{\"type\":[\"string\",\"null\"]},\"_actions\":{\"type\":[\"object\",\"null\"],\"additionalProperties\":{\"anyOf\":[{\"$ref\":\"#/$defs/ActionCapability\"},{\"type\":\"null\"}]},\"description\":\"Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it.\"}},\"description\":\"A page of results plus an opaque cursor for the next page, or null when this is the last\\npage. Wire keys are frozen: `items` (already lowercase under the camelCase policy) and\\n`next_cursor` (pinned explicitly — the policy alone would emit `nextCursor`).\"},\"ProjectResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"id\":{\"type\":[\"string\",\"null\"]},\"key\":{\"type\":[\"string\",\"null\"]},\"name\":{\"type\":[\"string\",\"null\"]},\"description\":{\"type\":[\"string\",\"null\"]},\"createdAt\":{\"type\":[\"string\",\"null\"]},\"updatedAt\":{\"type\":[\"string\",\"null\"]},\"defaultFlagLifetimeDays\":{\"type\":[\"integer\",\"null\"]},\"_actions\":{\"type\":[\"object\",\"null\"],\"additionalProperties\":{\"anyOf\":[{\"$ref\":\"#/$defs/ActionCapability\"},{\"type\":\"null\"}]},\"description\":\"Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it.\"}},\"description\":\"Public representation of a project, returned by `GET /api/v1/orgs/{org}/projects` (list),\\n`GET .../projects/{project}` (detail), and the body of a successful create/update. Drops\\nthe dashboard-only nested `Environments` collection from ProjectDto — the\\npublic API surfaces environments via their own endpoint (Task 6), not embedded here.\\nUpdatedAt is only populated from ProjectDto (the detail/create\\nshape); ProjectListItemDto doesn't carry it, so list rows leave it `null`.\\nDefaultFlagLifetimeDays is the project's default flag lifetime in days, or null (#3194).\"},\"ProjectResponsePagedResult\":{\"type\":[\"object\",\"null\"],\"properties\":{\"items\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/ProjectResponse\"},{\"type\":\"null\"}]}},\"next_cursor\":{\"type\":[\"string\",\"null\"]},\"_actions\":{\"type\":[\"object\",\"null\"],\"additionalProperties\":{\"anyOf\":[{\"$ref\":\"#/$defs/ActionCapability\"},{\"type\":\"null\"}]},\"description\":\"Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it.\"}},\"description\":\"A page of results plus an opaque cursor for the next page, or null when this is the last\\npage. Wire keys are frozen: `items` (already lowercase under the camelCase policy) and\\n`next_cursor` (pinned explicitly — the policy alone would emit `nextCursor`).\"},\"PublicAbortRolloutRampRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"percent\":{\"type\":[\"integer\",\"null\"]}},\"description\":\"Request body for `POST …/ramps/{rampId}/abort`: the percentage (0-100) to leave the rule at. Required, so\\na missing value is a 400 rather than an abort to 0%.\"},\"PublicAddVariationRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"key\":{\"type\":[\"string\",\"null\"]},\"name\":{\"type\":[\"string\",\"null\"]},\"value\":{\"type\":[\"string\",\"null\"]},\"description\":{\"type\":[\"string\",\"null\"]}},\"description\":\"Request body for\\n`POST /api/v1/orgs/{org}/projects/{project}/flags/{flag}/variations`. Named distinctly\\nfrom the dashboard's own `AddVariationRequest` —\\nsee PublicCreateEnvironmentRequest for the schemaId-collision rationale (both\\ncontrollers share one Swagger document).\"},\"PublicAdvanceRolloutRampRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"expectedStepIndex\":{\"type\":[\"integer\",\"null\"]}},\"description\":\"Request body for `POST …/ramps/{rampId}/advance`: the `currentStepIndex` the caller last saw. If the\\nramp has moved on since, the advance is a 409, so two racing advances can't skip a step.\"},\"PublicApiErrorEnvelope\":{\"type\":[\"object\",\"null\"],\"properties\":{\"error\":{\"type\":[\"string\",\"null\"]},\"message\":{\"type\":[\"string\",\"null\"]},\"docs_url\":{\"type\":[\"string\",\"null\"]},\"fields\":{\"type\":[\"object\",\"null\"],\"additionalProperties\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}}},\"retry_after\":{\"type\":[\"integer\",\"null\"]},\"did_you_mean\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}},\"next_actions\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/NextAction\"},{\"type\":\"null\"}]}},\"connection_id\":{\"type\":[\"string\",\"null\"]},\"plan_limit\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicPlanLimit\"},{\"type\":\"null\"}]},\"change_freeze\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicChangeFreeze\"},{\"type\":\"null\"}]}},\"description\":\"The frozen public-API error contract. `error` codes are stable snake_case strings. Wire keys\\nare frozen snake_case too (`error`, `message`, `docs_url`, `fields`,\\n`retry_after`) — the global camelCase naming policy would otherwise emit\\n`docsUrl`/`retryAfter`, breaking the published spec. !:JsonPropertyName\\nalways wins over the policy, so these are pinned explicitly rather than relying on the\\nproperty names already being lowercase for the single-word ones.\\n`did_you_mean`, `next_actions` and `connection_id` are ADDITIVE optional keys\\n(null → omitted via the global `DefaultIgnoreCondition = WhenWritingNull`), so\\npre-existing error bodies are byte-for-byte unchanged when they're absent.\\n\\n`connection_id` is present only on the `sso_required` error: the organization\\nrequires single sign-on, and this credential didn't come through its identity provider.\\n`connection_id` identifies which SSO connection to sign in with.\\n`plan_limit` is present only on the `plan_limit_reached` error: which plan cap the\\nrequest would have exceeded, so a client can branch on it without parsing `message`.\\n`change_freeze` is present only on the `change_frozen` error (#4645): the change freeze that refused the\\nwrite, so a client can show when it ends and whether the caller may break it, without parsing `message`.\"},\"PublicChangeFreeze\":{\"type\":[\"object\",\"null\"],\"properties\":{\"id\":{\"type\":[\"string\",\"null\"]},\"name\":{\"type\":[\"string\",\"null\"]},\"environment_key\":{\"type\":[\"string\",\"null\"]},\"ends_at\":{\"type\":[\"string\",\"null\"]},\"can_override\":{\"type\":[\"boolean\",\"null\"]}},\"description\":\"The freeze behind a `change_frozen` error: `id` and `name` of the window, the environment's\\n`environment_key`, `ends_at` (UTC; always present, null for an open-ended window) and whether the caller's role may\\nbreak it (`can_override`, with `X-Freeze-Override: true` and an `X-Intent-Reason`).\"},\"PublicChangeFreezeResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"id\":{\"type\":[\"string\",\"null\"]},\"project\":{\"type\":[\"string\",\"null\"]},\"name\":{\"type\":[\"string\",\"null\"]},\"reason\":{\"type\":[\"string\",\"null\"]},\"allEnvironments\":{\"type\":[\"boolean\",\"null\"]},\"environmentKeys\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}},\"environmentIds\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}},\"startsAt\":{\"type\":[\"string\",\"null\"]},\"endsAt\":{\"type\":[\"string\",\"null\"]},\"endedAt\":{\"type\":[\"string\",\"null\"]},\"scheduledChangePolicy\":{\"type\":[\"string\",\"null\"],\"description\":\"Allowed values: Hold, Fail.\"},\"status\":{\"type\":[\"string\",\"null\"],\"description\":\"Allowed values: Upcoming, Active, Ended.\"},\"enforcing\":{\"type\":[\"boolean\",\"null\"]},\"wontStartReason\":{\"type\":[\"string\",\"null\"],\"description\":\"Allowed values: Plan.\"},\"approvals\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicFreezeApprovalResponse\"},{\"type\":\"null\"}]}},\"createdByEmail\":{\"type\":[\"string\",\"null\"]},\"_actions\":{\"type\":[\"object\",\"null\"],\"additionalProperties\":{\"anyOf\":[{\"$ref\":\"#/$defs/ActionCapability\"},{\"type\":\"null\"}]},\"description\":\"Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it.\"}},\"description\":\"A change freeze window. `project` is the project's key, or null for an organization-wide window.\\nAn organization-wide window names its environments by key (`environmentKeys`, matched in every project);\\na project window names them by id, and returns both `environmentIds` and the current\\n`environmentKeys` of those environments. `status` is time-based only: `Upcoming`, `Active`\\nor `Ended`. `enforcing` is true when the window is `Active` and is actually in force: it has\\nstarted enforcing, or the organization's plan includes change freezes. `wontStartReason` is `Plan`\\nwhen the window has not started enforcing and the organization's plan no longer includes change freezes, so it\\nwill not enforce. `approvals` lists the scheduled changes approved to land inside the window.\"},\"PublicChangeFreezeResponsePagedResult\":{\"type\":[\"object\",\"null\"],\"properties\":{\"items\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicChangeFreezeResponse\"},{\"type\":\"null\"}]}},\"next_cursor\":{\"type\":[\"string\",\"null\"]},\"_actions\":{\"type\":[\"object\",\"null\"],\"additionalProperties\":{\"anyOf\":[{\"$ref\":\"#/$defs/ActionCapability\"},{\"type\":\"null\"}]},\"description\":\"Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it.\"}},\"description\":\"A page of results plus an opaque cursor for the next page, or null when this is the last\\npage. Wire keys are frozen: `items` (already lowercase under the camelCase policy) and\\n`next_cursor` (pinned explicitly — the policy alone would emit `nextCursor`).\"},\"PublicConditionGroupRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"operator\":{\"type\":[\"string\",\"null\"],\"description\":\"Allowed values: And, Or.\"},\"conditions\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicConditionRequest\"},{\"type\":\"null\"}]}}},\"description\":\"Request-side condition group, symmetric with PublicConditionGroupResponse.\"},\"PublicConditionGroupResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"operator\":{\"type\":[\"string\",\"null\"],\"description\":\"Allowed values: And, Or.\"},\"conditions\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicConditionResponse\"},{\"type\":\"null\"}]}}},\"description\":\"A condition group within a PublicTargetingRuleResponse. Maps 1:1 onto\\nConditionGroupDto. Operator is a bare wire string naming one of\\nthe `ConditionGroupOperator` members (`\\\"And\\\"`/`\\\"Or\\\"`) —\\ngroups are ANDed together at the rule level; within a group, its conditions combine using\\nthis operator.\"},\"PublicConditionRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"attribute\":{\"type\":[\"string\",\"null\"]},\"operator\":{\"type\":[\"string\",\"null\"],\"description\":\"Allowed values: Equals, NotEquals, Contains, NotContains, GreaterThan, LessThan, GreaterThanOrEqual, LessThanOrEqual, In, NotIn, MatchesRegex, StartsWith, EndsWith, Before, After, SemverEquals, SemverGreaterThan, SemverGreaterThanOrEqual, SemverLessThan, SemverLessThanOrEqual.\"},\"values\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}},\"negate\":{\"type\":[\"boolean\",\"null\"]}},\"description\":\"Request-side condition, symmetric with PublicConditionResponse.\"},\"PublicConditionResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"attribute\":{\"type\":[\"string\",\"null\"]},\"operator\":{\"type\":[\"string\",\"null\"],\"description\":\"Allowed values: Equals, NotEquals, Contains, NotContains, GreaterThan, LessThan, GreaterThanOrEqual, LessThanOrEqual, In, NotIn, MatchesRegex, StartsWith, EndsWith, Before, After, SemverEquals, SemverGreaterThan, SemverGreaterThanOrEqual, SemverLessThan, SemverLessThanOrEqual.\"},\"values\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}},\"negate\":{\"type\":[\"boolean\",\"null\"]}},\"description\":\"A single condition within a PublicConditionGroupResponse. Maps 1:1 onto\\nConditionDto. Operator is a bare wire string naming one of the\\n`OperatorType` members (e.g. `\\\"Equals\\\"`, `\\\"In\\\"`).\"},\"PublicConfiguredWeight\":{\"type\":[\"object\",\"null\"],\"properties\":{\"variationKey\":{\"type\":[\"string\",\"null\"],\"description\":\"The variation's key.\"},\"name\":{\"type\":[\"string\",\"null\"],\"description\":\"The variation's name, or null when the key no longer matches one of the flag's variations.\"},\"weight\":{\"type\":[\"integer\",\"null\"],\"description\":\"Percent of the rule's traffic.\"}},\"description\":\"A variation's configured share of a rollout rule.\"},\"PublicCopyFlagConfigRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"source\":{\"type\":[\"string\",\"null\"]},\"includeState\":{\"type\":[\"boolean\",\"null\"]},\"dryRun\":{\"type\":[\"boolean\",\"null\"]},\"expectedSourceETag\":{\"type\":[\"string\",\"null\"]},\"expectedTargetETag\":{\"type\":[\"string\",\"null\"]}},\"description\":\"Request body for `POST .../flags/{flag}/environments/{env}/copy`. `source` is the environment to copy\\nfrom (key or id) and is required; the rest are optional. `dryRun: true` previews without writing and ignores\\nthe ETags.\"},\"PublicCopyResult\":{\"type\":[\"object\",\"null\"],\"properties\":{\"changed\":{\"type\":[\"boolean\",\"null\"]},\"changedSections\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}},\"before\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicEnvironmentSnapshot\"},{\"type\":\"null\"}]},\"after\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicEnvironmentSnapshot\"},{\"type\":\"null\"}]},\"sourceETag\":{\"type\":[\"string\",\"null\"]},\"targetETag\":{\"type\":[\"string\",\"null\"]},\"warnings\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicCopyWarning\"},{\"type\":\"null\"}]}}},\"description\":\"Response of `POST .../flags/{flag}/environments/{env}/copy`, for a dry run and an apply alike.\\n`targetETag` is the target's tag after an apply and before it on a dry run, so a dry run's tags are\\nwhat the apply sends back as `expectedSourceETag` / `expectedTargetETag`.\"},\"PublicCopyWarning\":{\"type\":[\"object\",\"null\"],\"properties\":{\"code\":{\"type\":[\"string\",\"null\"]},\"message\":{\"type\":[\"string\",\"null\"]}},\"description\":\"A non-blocking note about a copy.\"},\"PublicCreateChangeFreezeRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"name\":{\"type\":[\"string\",\"null\"]},\"reason\":{\"type\":[\"string\",\"null\"]},\"project\":{\"type\":[\"string\",\"null\"]},\"allEnvironments\":{\"type\":[\"boolean\",\"null\"]},\"environmentKeys\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}},\"environmentIds\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}},\"startsAt\":{\"type\":[\"string\",\"null\"]},\"endsAt\":{\"type\":[\"string\",\"null\"]},\"scheduledChangePolicy\":{\"type\":[\"string\",\"null\"],\"description\":\"Allowed values: Hold, Fail.\"}},\"description\":\"Creates a change freeze. `project` (key or id) makes it a project window; omit it for an\\norganization-wide one. Omit `startsAt` to freeze now (then `endsAt` may be omitted for an\\nopen-ended freeze); a scheduled freeze needs both. Times are UTC and must carry an offset (`Z`).\\nName the environments with `environmentKeys` (a project window accepts keys too, resolved within\\nthe project) and/or `environmentIds`, or set `allEnvironments`.\\n`scheduledChangePolicy` is `Hold` (the default) or `Fail`.\"},\"PublicCreateEnvironmentRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"key\":{\"type\":[\"string\",\"null\"],\"description\":\"The environment's key.\"},\"name\":{\"type\":[\"string\",\"null\"],\"description\":\"The environment's display name.\"},\"color\":{\"type\":[\"string\",\"null\"],\"description\":\"The environment's display color, or null.\"},\"sortOrder\":{\"type\":[\"integer\",\"null\"],\"description\":\"Position among the project's environments.\"},\"requireChangeReason\":{\"type\":[\"boolean\",\"null\"],\"description\":\"Require a change reason (X-Intent-Reason) on every change to flags in this environment. Business plan and above.\"},\"requireConfirmation\":{\"type\":[\"boolean\",\"null\"],\"description\":\"Ask dashboard users to type the environment key before a change lands. Dashboard only; not enforced by the API.\"}},\"description\":\"Request body for `POST /api/v1/orgs/{org}/projects/{project}/environments`. Named\\ndistinctly from the dashboard's own `CreateEnvironmentRequest`\\n— both controllers share one Swagger document (see `Program.cs`'s `AddSwaggerGen``DocInclusionPredicate` override), and Swashbuckle's default schemaId is the bare type\\nname, so an identical name in either namespace throws a schemaId collision at\\n`--export-openapi` time.\"},\"PublicCreateFeatureFlagRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"key\":{\"type\":[\"string\",\"null\"]},\"name\":{\"type\":[\"string\",\"null\"]},\"type\":{\"type\":[\"string\",\"null\"],\"description\":\"Allowed values: Boolean, String, Number, Json.\"},\"description\":{\"type\":[\"string\",\"null\"]},\"tags\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}},\"initialVariations\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicCreateVariationDto\"},{\"type\":\"null\"}]}},\"clientSideVisible\":{\"type\":[\"boolean\",\"null\"]},\"expiresAtUtc\":{\"type\":[\"string\",\"null\"]},\"ownerEmail\":{\"type\":[\"string\",\"null\"]},\"isPermanent\":{\"type\":[\"boolean\",\"null\"]}},\"description\":\"Request body for `POST /api/v1/orgs/{org}/projects/{project}/flags`. Named distinctly\\nfrom the dashboard's own `CreateFeatureFlagRequest`\\n— see PublicCreateEnvironmentRequest for the\\nschemaId-collision rationale (both controllers share one Swagger document). Type\\nis passed through verbatim to Type, which itself takes a\\nbare string (Boolean/String/Number/Json) rather than the domain enum — invalid values surface\\nas the handler's own validation failure, not a controller-level 400. ExpiresAtUtc is\\noptional and advisory; a bare date (`2026-12-01`) means the end of that day in UTC, and a full\\ntimestamp is stored exactly. It must be in the future and requires the flag-expiration feature\\n(400 `EXPIRY_IN_PAST` / `FEATURE_NOT_ENABLED`). OwnerEmail optionally names\\nthe owner (an active member, matched case-insensitively; requires a plan that includes flag owners,\\nPro and above — 400 `OWNER_NOT_MEMBER` / `PLAN_FEATURE_UNAVAILABLE`). Omitted, the owner is the caller when\\nthe caller is a member, so a service token creates an unowned flag. IsPermanent marks\\nthe flag permanent (a kill switch, ops toggle or entitlement that is meant to stay; never reported for\\ncleanup). It requires the flag-permanence feature and can't be combined with ExpiresAtUtc\\n(400 `FEATURE_NOT_ENABLED` / `PERMANENT_FLAG_HAS_EXPIRY`).\"},\"PublicCreateFlagTriggerRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"name\":{\"type\":[\"string\",\"null\"]},\"action\":{\"type\":[\"string\",\"null\"]},\"description\":{\"type\":[\"string\",\"null\"]}},\"description\":\"Request body for `POST .../triggers`. Action is `\\\"Enable\\\"` or\\n`\\\"Disable\\\"`, parsed against the names only. Named apart from the dashboard's\\n`CreateFlagTriggerRequest`: both controllers share one Swagger document.\"},\"PublicCreateProjectRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"key\":{\"type\":[\"string\",\"null\"]},\"name\":{\"type\":[\"string\",\"null\"]},\"description\":{\"type\":[\"string\",\"null\"]}},\"description\":\"Request body for `POST /api/v1/orgs/{org}/projects`. Named distinctly from the\\ndashboard's own `CreateProjectRequest` — both\\ncontrollers share one Swagger document (see `Program.cs`'s `AddSwaggerGen``DocInclusionPredicate` override), and Swashbuckle's default schemaId is the bare type\\nname, so an identical name in either namespace throws a schemaId collision at\\n`--export-openapi` time.\"},\"PublicCreateSdkKeyRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"name\":{\"type\":[\"string\",\"null\"]},\"description\":{\"type\":[\"string\",\"null\"]},\"type\":{\"type\":[\"string\",\"null\"],\"description\":\"Allowed values: ClientSide, ServerSide.\"}},\"description\":\"Request body for `POST /api/v1/orgs/{org}/projects/{project}/environments/{env}/sdk-keys`.\\nType is a bare string (\\\"ClientSide\\\" or \\\"ServerSide\\\") — the controller parses it\\nagainst a NAME allowlist (not a bare TryParse``1(ReadOnlySpan{Char},Boolean,``0@), which would\\nsilently accept a numeric string like `\\\"0\\\"`) before dispatching. Named distinctly from\\nthe dashboard's own `CreateSdkKeyRequest` — both\\ncontrollers share one Swagger document, and an identical type name in either namespace throws\\na schemaId collision at `--export-openapi` time.\"},\"PublicCreateSdkKeyResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"id\":{\"type\":[\"string\",\"null\"]},\"key\":{\"type\":[\"string\",\"null\"]},\"lastFourCharacters\":{\"type\":[\"string\",\"null\"]},\"type\":{\"type\":[\"string\",\"null\"],\"description\":\"Allowed values: ClientSide, ServerSide.\"},\"name\":{\"type\":[\"string\",\"null\"]},\"createdAt\":{\"type\":[\"string\",\"null\"]},\"warning\":{\"type\":[\"string\",\"null\"]}},\"description\":\"Response body for a successful `POST .../sdk-keys`. The ONLY place the plaintext\\nKey is ever returned — PublicSdkKeyResponse (list/get) carries just\\n`LastFourCharacters`. Built directly from CreateSdkKeyResult rather than a\\nre-fetch (unlike `FeatureFlagsController.Create`'s re-fetch pattern) because the\\nplaintext key only ever exists on the create result — a subsequent\\nGetSdkKeyQuery can't recover it.\"},\"PublicCreateSegmentRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"key\":{\"type\":[\"string\",\"null\"]},\"name\":{\"type\":[\"string\",\"null\"]},\"description\":{\"type\":[\"string\",\"null\"]},\"conditions\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicSegmentConditionDto\"},{\"type\":\"null\"}]}}},\"description\":\"Request body for `POST /api/v1/orgs/{org}/projects/{project}/segments`. Named distinctly\\nfrom the dashboard's own `CreateUserSegmentRequest` — see\\nPublicCreateEnvironmentRequest for the schemaId-collision rationale (both\\ncontrollers share one Swagger document).\"},\"PublicCreateTargetingRuleRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"description\":{\"type\":[\"string\",\"null\"]},\"variationId\":{\"type\":[\"string\",\"null\"]},\"rolloutPercentage\":{\"type\":[\"integer\",\"null\"]},\"userSegmentId\":{\"type\":[\"string\",\"null\"]},\"conditionGroups\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicConditionGroupRequest\"},{\"type\":\"null\"}]}},\"bucketBy\":{\"type\":[\"string\",\"null\"],\"description\":\"Context attribute the rollout hashes on (default `user_id`; `userId` is accepted as an alias). A context without it skips this rule, even at 100%. Changing it reshuffles who is in the rollout. A fixed rule (no `rolloutPercentage`) never hashes and always stores `user_id`. When omitted on `PUT .../targeting`, a rollout keeps the value of the existing rollout it edits: the existing rule with the same targeting, told apart from others with that targeting by its variation, then its description, then its position. Any other rule gets `user_id`. The request is refused with 400 until it sends `bucketBy` for a rollout whose edited rule it can't tell when the answer changes its attribute: the rollout shares only its targeting with several rules that bucket differently, or it matches no existing rule while the request removes a rollout bucketed by another attribute. On create, omitting it gives `user_id`.\"}},\"description\":\"Request body for `POST .../rules`. The Application-side\\n`CreateTargetingRuleDto`/`CreateConditionGroupDto`/`CreateConditionDto` all take\\ntheir `Operator` as a bare string, re-parsed CASE-SENSITIVELY inside\\n`CreateTargetingRuleCommandHandler` — `FlagTargetingController`'s mapping helpers\\nvalidate every operator against the enum's member-name allowlist AND canonicalize the casing\\n(e.g. `\\\"in\\\"` → `\\\"In\\\"`) before building the command DTO, so a valid\\ncase-insensitive match never trips the handler's strict re-parse.\"},\"PublicCreateVariationDto\":{\"type\":[\"object\",\"null\"],\"properties\":{\"key\":{\"type\":[\"string\",\"null\"]},\"name\":{\"type\":[\"string\",\"null\"]},\"value\":{\"type\":[\"string\",\"null\"]},\"description\":{\"type\":[\"string\",\"null\"]}},\"description\":\"A variation supplied at flag-creation time. Maps 1:1 onto\\nCreateVariationDto.\"},\"PublicCreateWebhookSubscriptionRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"name\":{\"type\":[\"string\",\"null\"]},\"url\":{\"type\":[\"string\",\"null\"]},\"provider\":{\"type\":[\"string\",\"null\"],\"description\":\"Allowed values: GenericHttp, Slack, Datadog, Grafana.\"},\"eventTypes\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}},\"projectIds\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}},\"environmentIds\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}},\"credential\":{\"type\":[\"string\",\"null\"]}},\"description\":\"Creates a webhook subscription. `provider` is `GenericHttp`, `Slack` (an incoming\\nwebhook url), `Datadog` (your site's Events API url) or `Grafana` (your Grafana's\\n`/api/annotations` url). Datadog and Grafana also need `credential`: a Datadog API key\\nor a Grafana service account token. It is stored encrypted and never returned. Omit `eventTypes`,\\n`projectIds` or `environmentIds` (or send an empty list) to receive every event,\\nproject or environment. A token restricted to specific projects must list at least one project,\\nall of them within its allowlist.\"},\"PublicCreateWebhookSubscriptionResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"id\":{\"type\":[\"string\",\"null\"]},\"secret\":{\"type\":[\"string\",\"null\"]},\"warning\":{\"type\":[\"string\",\"null\"]}},\"description\":\"The created subscription's id and its signing secret. The secret is shown only here.\"},\"PublicDefaultFlagLifetimeImpact\":{\"type\":[\"object\",\"null\"],\"properties\":{\"newlyPastExpiry\":{\"type\":[\"integer\",\"null\"]},\"noLongerPastExpiry\":{\"type\":[\"integer\",\"null\"]}},\"description\":\"Response of `GET .../default-flag-lifetime/impact`: how many temporary flags with no expiry\\ndate of their own would newly be past expiry, and how many would stop being past it.\"},\"PublicEnvironmentResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"id\":{\"type\":[\"string\",\"null\"],\"description\":\"The environment's id.\"},\"key\":{\"type\":[\"string\",\"null\"],\"description\":\"The environment's key.\"},\"name\":{\"type\":[\"string\",\"null\"],\"description\":\"The environment's display name.\"},\"color\":{\"type\":[\"string\",\"null\"],\"description\":\"The environment's display color, or null.\"},\"sortOrder\":{\"type\":[\"integer\",\"null\"],\"description\":\"Position among the project's environments.\"},\"requireChangeReason\":{\"type\":[\"boolean\",\"null\"],\"description\":\"Require a change reason (X-Intent-Reason) on every change to flags in this environment. Business plan and above.\"},\"requireConfirmation\":{\"type\":[\"boolean\",\"null\"],\"description\":\"Ask dashboard users to type the environment key before a change lands. Dashboard only; not enforced by the API.\"},\"_actions\":{\"type\":[\"object\",\"null\"],\"additionalProperties\":{\"anyOf\":[{\"$ref\":\"#/$defs/ActionCapability\"},{\"type\":\"null\"}]},\"description\":\"Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it.\"}},\"description\":\"Public representation of an environment, returned by\\n`GET /api/v1/orgs/{org}/projects/{project}/environments` (list),\\n`GET .../environments/{env}` (detail), and the body of a successful create/update. Drops\\ninternal fields (e.g. `ProjectId` is implicit in the route) — mirrors\\n`ProjectResponse`'s minimal shape. Named `PublicEnvironmentResponse` rather than\\n`EnvironmentResponse` (unlike the sibling `ProjectResponse`, which didn't collide)\\nbecause the dashboard already has its own\\n`EnvironmentResponse` — see\\nPublicCreateEnvironmentRequest for the schemaId-collision rationale.\"},\"PublicEnvironmentResponsePagedResult\":{\"type\":[\"object\",\"null\"],\"properties\":{\"items\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicEnvironmentResponse\"},{\"type\":\"null\"}]}},\"next_cursor\":{\"type\":[\"string\",\"null\"]},\"_actions\":{\"type\":[\"object\",\"null\"],\"additionalProperties\":{\"anyOf\":[{\"$ref\":\"#/$defs/ActionCapability\"},{\"type\":\"null\"}]},\"description\":\"Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it.\"}},\"description\":\"A page of results plus an opaque cursor for the next page, or null when this is the last\\npage. Wire keys are frozen: `items` (already lowercase under the camelCase policy) and\\n`next_cursor` (pinned explicitly — the policy alone would emit `nextCursor`).\"},\"PublicEnvironmentSideSummary\":{\"type\":[\"object\",\"null\"],\"properties\":{\"isEnabled\":{\"type\":[\"boolean\",\"null\"]},\"ruleCount\":{\"type\":[\"integer\",\"null\"]},\"prerequisiteCount\":{\"type\":[\"integer\",\"null\"]}},\"description\":\"One side's headline numbers in a project-level comparison row.\"},\"PublicEnvironmentSnapshot\":{\"type\":[\"object\",\"null\"],\"properties\":{\"isEnabled\":{\"type\":[\"boolean\",\"null\"]},\"defaultVariation\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicKeyedRef\"},{\"type\":\"null\"}]},\"strategy\":{\"type\":[\"string\",\"null\"]},\"rules\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicSnapshotRule\"},{\"type\":\"null\"}]}},\"prerequisites\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicPrerequisiteDto\"},{\"type\":\"null\"}]}}},\"description\":\"A flag's configuration in one environment, as a comparison or copy result reports it.\"},\"PublicEvaluationSource\":{\"type\":[\"object\",\"null\"],\"properties\":{\"source\":{\"type\":[\"string\",\"null\"],\"description\":\"One of rule, fallthrough, off, prerequisite, error, notFound or unknown (an SDK that reports no reason, or evaluations recorded before sources were). Allowed values: rule, fallthrough, off, prerequisite, error, notFound, unknown.\"},\"ruleId\":{\"type\":[\"string\",\"null\"],\"description\":\"For a rule, its id (rules have no key). Null otherwise, or when the SDK didn't say which rule.\"},\"ruleLabel\":{\"type\":[\"string\",\"null\"],\"description\":\"For a live rule, its description or a generated label. Null otherwise.\"},\"ruleExists\":{\"type\":[\"boolean\",\"null\"],\"description\":\"False when the rule is no longer in the environment's targeting.\"},\"count\":{\"type\":[\"integer\",\"null\"],\"description\":\"Evaluations this source served.\"},\"share\":{\"type\":[\"number\",\"null\"],\"description\":\"Count as a fraction (0 to 1) of all sources' counts combined.\"},\"variations\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicEvaluationVariation\"},{\"type\":\"null\"}]},\"description\":\"What this source served, with shares of this source's count.\"},\"rollout\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicRolloutCheck\"},{\"type\":\"null\"}]}},\"description\":\"The evaluations one part of the targeting served.\"},\"PublicEvaluationVariation\":{\"type\":[\"object\",\"null\"],\"properties\":{\"variationKey\":{\"type\":[\"string\",\"null\"],\"description\":\"The variation served, or null for evaluations recorded without one.\"},\"name\":{\"type\":[\"string\",\"null\"],\"description\":\"The variation's name, or null when the key no longer matches one of the flag's variations.\"},\"exists\":{\"type\":[\"boolean\",\"null\"],\"description\":\"False when the key no longer matches one of the flag's variations.\"},\"count\":{\"type\":[\"integer\",\"null\"],\"description\":\"Evaluations that served this variation.\"},\"share\":{\"type\":[\"number\",\"null\"],\"description\":\"Count as a fraction (0 to 1) of the parent total: the window's total, or for a source's variations that source's count. 0 when the parent total is 0.\"}},\"description\":\"One variation's evaluations.\"},\"PublicFlagComparison\":{\"type\":[\"object\",\"null\"],\"properties\":{\"flagKey\":{\"type\":[\"string\",\"null\"]},\"differences\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}},\"base\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicFlagComparisonSide\"},{\"type\":\"null\"}]},\"other\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicFlagComparisonSide\"},{\"type\":\"null\"}]}},\"description\":\"Response of `GET .../flags/{flag}/compare`.\"},\"PublicFlagComparisonRow\":{\"type\":[\"object\",\"null\"],\"properties\":{\"flagKey\":{\"type\":[\"string\",\"null\"]},\"flagName\":{\"type\":[\"string\",\"null\"]},\"tags\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}},\"ownerUserId\":{\"type\":[\"string\",\"null\"]},\"status\":{\"type\":[\"string\",\"null\"]},\"differences\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}},\"base\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicEnvironmentSideSummary\"},{\"type\":\"null\"}]},\"other\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicEnvironmentSideSummary\"},{\"type\":\"null\"}]}},\"description\":\"One flag in `GET .../projects/{project}/compare`. `differences` lists the sections that differ\\n(`state`, `defaultVariation`, `strategy`, `rules`, `prerequisites`). A side is null when\\nthe flag has no configuration in that environment.\"},\"PublicFlagComparisonRowPagedResult\":{\"type\":[\"object\",\"null\"],\"properties\":{\"items\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicFlagComparisonRow\"},{\"type\":\"null\"}]}},\"next_cursor\":{\"type\":[\"string\",\"null\"]}},\"description\":\"A page of results plus an opaque cursor for the next page, or null when this is the last\\npage. Wire keys are frozen: `items` (already lowercase under the camelCase policy) and\\n`next_cursor` (pinned explicitly — the policy alone would emit `nextCursor`).\"},\"PublicFlagComparisonSide\":{\"type\":[\"object\",\"null\"],\"properties\":{\"config\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicFlagEnvConfigResponse\"},{\"type\":\"null\"}]},\"targeting\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicTargetingConfigResponse\"},{\"type\":\"null\"}]},\"snapshot\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicEnvironmentSnapshot\"},{\"type\":\"null\"}]},\"ruleHasMatchInOther\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"boolean\",\"null\"]},\"description\":\"Per rule in evaluation order: whether the other environment has an equal rule.\"}},\"description\":\"One environment's side of a per-flag comparison.\"},\"PublicFlagEnvConfigResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"environmentId\":{\"type\":[\"string\",\"null\"]},\"environmentKey\":{\"type\":[\"string\",\"null\"]},\"isEnabled\":{\"type\":[\"boolean\",\"null\"]},\"defaultVariationId\":{\"type\":[\"string\",\"null\"]},\"strategy\":{\"type\":[\"string\",\"null\"],\"description\":\"Allowed values: SingleVariation, PercentageRollout, TargetedRollout.\"},\"prerequisites\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicPrerequisiteDto\"},{\"type\":\"null\"}]}},\"_actions\":{\"type\":[\"object\",\"null\"],\"additionalProperties\":{\"anyOf\":[{\"$ref\":\"#/$defs/ActionCapability\"},{\"type\":\"null\"}]},\"description\":\"Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it.\"}},\"description\":\"Public representation of a flag's config within a single environment, returned by\\n`GET .../flags/{flag}/environments` and `GET .../flags/{flag}/environments/{env}`.\\nDrops internal/dashboard-only fields present on FlagEnvironmentConfigurationDto\\n— Id (an internal row id, not part of the public\\ncontract; EnvironmentId is the addressable key), `FeatureFlagId` (implicit\\nin the route), the environment's name/color/sort-order (dashboard display fields — the public\\ncontract only needs the addressable EnvironmentKey), and `Staleness` (an\\ninternal analytics signal).\"},\"PublicFlagEvaluationsResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"environmentKey\":{\"type\":[\"string\",\"null\"],\"description\":\"The environment's key.\"},\"days\":{\"type\":[\"integer\",\"null\"],\"description\":\"The window requested: 7, 30 or 90.\"},\"fromUtc\":{\"type\":[\"string\",\"null\"],\"description\":\"Start of the window: UTC midnight `days - 1` days ago, or the flag's creation day if later.\"},\"toUtc\":{\"type\":[\"string\",\"null\"],\"description\":\"When the counts were read.\"},\"totalCount\":{\"type\":[\"integer\",\"null\"],\"description\":\"Evaluations in the window. Evaluation counts, not unique users.\"},\"lastEvaluatedAtUtc\":{\"type\":[\"string\",\"null\"],\"description\":\"The last reported evaluation, or null if none was reported.\"},\"variations\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicEvaluationVariation\"},{\"type\":\"null\"}]},\"description\":\"Evaluations per variation over the window.\"},\"sources\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicEvaluationSource\"},{\"type\":\"null\"}]},\"description\":\"Evaluations per part of the targeting that served them: live rules in evaluation order, then deleted rules, then fallthrough, off, prerequisite, error, notFound and unknown. A live percentage-rollout rule is always listed, with a count of 0 and no variations when it served nothing in the window, so its rollout check (and rollout.unreached) has a row.\"}},\"description\":\"What a flag served in one environment over the window, returned by\\n`GET .../flags/{flag}/environments/{env}/evaluations` (#4225). These are evaluation\\ncounts, not unique users. They come from SDK-reported events, so an environment whose SDKs\\nreport none reads zero: no evaluations reported, not necessarily no traffic. The public\\ncounterpart of FlagEvaluationAnalyticsDto, keyed by environment key instead of\\nid and without the dashboard's daily series.\"},\"PublicFlagListItem\":{\"type\":[\"object\",\"null\"],\"properties\":{\"id\":{\"type\":[\"string\",\"null\"]},\"key\":{\"type\":[\"string\",\"null\"]},\"name\":{\"type\":[\"string\",\"null\"]},\"type\":{\"type\":[\"string\",\"null\"],\"description\":\"Allowed values: Boolean, String, Number, Json.\"},\"isArchived\":{\"type\":[\"boolean\",\"null\"]},\"clientSideVisible\":{\"type\":[\"boolean\",\"null\"]},\"tags\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}},\"createdAt\":{\"type\":[\"string\",\"null\"]},\"updatedAt\":{\"type\":[\"string\",\"null\"]},\"expiresAtUtc\":{\"type\":[\"string\",\"null\"]},\"owner\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicFlagOwner\"},{\"type\":\"null\"}]},\"removalPrUrl\":{\"type\":[\"string\",\"null\"]},\"isPermanent\":{\"type\":[\"boolean\",\"null\"]},\"effectiveExpiresAtUtc\":{\"type\":[\"string\",\"null\"]},\"expirySource\":{\"type\":[\"string\",\"null\"]}},\"description\":\"Public list-item representation of a feature flag, returned by\\n`GET .../flags`. Narrower than PublicFlagResponse — drops\\nVariations (a summary-only shape upstream) and\\nStaleness, matching the \\\"list is narrower than detail\\\"\\nsplit already present on the Application-layer DTOs.\\nEffectiveExpiresAtUtc is when the flag counts as past expiry, from its own ExpiresAtUtc\\nor its project's default lifetime; ExpirySource says which (`explicit` / `project-default`),\\nboth null when neither applies.\"},\"PublicFlagListItemPagedResult\":{\"type\":[\"object\",\"null\"],\"properties\":{\"items\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicFlagListItem\"},{\"type\":\"null\"}]}},\"next_cursor\":{\"type\":[\"string\",\"null\"]},\"_actions\":{\"type\":[\"object\",\"null\"],\"additionalProperties\":{\"anyOf\":[{\"$ref\":\"#/$defs/ActionCapability\"},{\"type\":\"null\"}]},\"description\":\"Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it.\"}},\"description\":\"A page of results plus an opaque cursor for the next page, or null when this is the last\\npage. Wire keys are frozen: `items` (already lowercase under the camelCase policy) and\\n`next_cursor` (pinned explicitly — the policy alone would emit `nextCursor`).\"},\"PublicFlagOwner\":{\"type\":[\"object\",\"null\"],\"properties\":{\"id\":{\"type\":[\"string\",\"null\"]},\"email\":{\"type\":[\"string\",\"null\"]},\"name\":{\"type\":[\"string\",\"null\"]}},\"description\":\"A flag's owner as returned on flag reads. Null means the flag is unowned.\"},\"PublicFlagRemovalCandidate\":{\"type\":[\"object\",\"null\"],\"properties\":{\"key\":{\"type\":[\"string\",\"null\"]},\"reason\":{\"type\":[\"string\",\"null\"]},\"treatment\":{\"type\":[\"boolean\",\"null\"]},\"status\":{\"type\":[\"string\",\"null\"]},\"blockedBy\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}}},\"description\":\"One dead flag the Featureflip Flag Cleanup Action should remove, returned by\\n`GET .../flags/removal-candidates`. `Treatment` is the kill decision: true → keep the\\nflag's on-branch, false → keep the off-branch. `Status` is the flag's staleness tier\\n(`\\\"Stale\\\"` or `\\\"Dead\\\"`, never `\\\"Active\\\"`) — lets a caller distinguish the two when\\n`?staleness=stale` widens the response to include both tiers. This is the ONLY public\\nprojection of staleness — PublicFlagResponse and PublicFlagListItem\\nstill omit it by design. `BlockedBy` names the live flags that still list this one as a\\nprerequisite, sorted by key; while it is non-empty the flag cannot be archived\\n(`FLAG_HAS_DEPENDENTS`), so a caller should remove those dependents first.\"},\"PublicFlagRemovalCandidatePagedResult\":{\"type\":[\"object\",\"null\"],\"properties\":{\"items\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicFlagRemovalCandidate\"},{\"type\":\"null\"}]}},\"next_cursor\":{\"type\":[\"string\",\"null\"]}},\"description\":\"A page of results plus an opaque cursor for the next page, or null when this is the last\\npage. Wire keys are frozen: `items` (already lowercase under the camelCase policy) and\\n`next_cursor` (pinned explicitly — the policy alone would emit `nextCursor`).\"},\"PublicFlagResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"id\":{\"type\":[\"string\",\"null\"]},\"key\":{\"type\":[\"string\",\"null\"]},\"name\":{\"type\":[\"string\",\"null\"]},\"description\":{\"type\":[\"string\",\"null\"]},\"type\":{\"type\":[\"string\",\"null\"],\"description\":\"Allowed values: Boolean, String, Number, Json.\"},\"isArchived\":{\"type\":[\"boolean\",\"null\"]},\"clientSideVisible\":{\"type\":[\"boolean\",\"null\"]},\"tags\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}},\"variations\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicVariationResponse\"},{\"type\":\"null\"}]}},\"createdAt\":{\"type\":[\"string\",\"null\"]},\"updatedAt\":{\"type\":[\"string\",\"null\"]},\"expiresAtUtc\":{\"type\":[\"string\",\"null\"]},\"owner\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicFlagOwner\"},{\"type\":\"null\"}]},\"removalPrUrl\":{\"type\":[\"string\",\"null\"]},\"isPermanent\":{\"type\":[\"boolean\",\"null\"]},\"effectiveExpiresAtUtc\":{\"type\":[\"string\",\"null\"]},\"expirySource\":{\"type\":[\"string\",\"null\"]},\"_actions\":{\"type\":[\"object\",\"null\"],\"additionalProperties\":{\"anyOf\":[{\"$ref\":\"#/$defs/ActionCapability\"},{\"type\":\"null\"}]},\"description\":\"Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it.\"}},\"description\":\"Public detail representation of a feature flag, returned by\\n`GET .../flags/{flag}` and the body of a successful create. Drops internal/dashboard-only\\nfields present on FeatureFlagDto — notably `ProjectId` (implicit in the\\nroute) and `Staleness` (an internal analytics signal, not part of the public contract).\\nEffectiveExpiresAtUtc is when the flag counts as past expiry, from its own ExpiresAtUtc\\nor its project's default lifetime; ExpirySource says which (`explicit` / `project-default`),\\nboth null when neither applies.\"},\"PublicFlagTriggerResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"id\":{\"type\":[\"string\",\"null\"]},\"name\":{\"type\":[\"string\",\"null\"]},\"description\":{\"type\":[\"string\",\"null\"]},\"action\":{\"type\":[\"string\",\"null\"]},\"enabled\":{\"type\":[\"boolean\",\"null\"]},\"secretLastFour\":{\"type\":[\"string\",\"null\"]},\"createdAt\":{\"type\":[\"string\",\"null\"]},\"updatedAt\":{\"type\":[\"string\",\"null\"]},\"lastFiredAt\":{\"type\":[\"string\",\"null\"]}},\"description\":\"A flag trigger (#4651) as `/api/v1` returns it. Carries only the secret's last four characters:\\nthe URL is returned once, by PublicFlagTriggerWithUrlResponse. Flag and environment are\\nimplicit in the route.\"},\"PublicFlagTriggerResponsePagedResult\":{\"type\":[\"object\",\"null\"],\"properties\":{\"items\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicFlagTriggerResponse\"},{\"type\":\"null\"}]}},\"next_cursor\":{\"type\":[\"string\",\"null\"]}},\"description\":\"A page of results plus an opaque cursor for the next page, or null when this is the last\\npage. Wire keys are frozen: `items` (already lowercase under the camelCase policy) and\\n`next_cursor` (pinned explicitly — the policy alone would emit `nextCursor`).\"},\"PublicFlagTriggerWithUrlResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"trigger\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicFlagTriggerResponse\"},{\"type\":\"null\"}]},\"url\":{\"type\":[\"string\",\"null\"]},\"endpoint\":{\"type\":[\"string\",\"null\"]},\"secret\":{\"type\":[\"string\",\"null\"]},\"warning\":{\"type\":[\"string\",\"null\"]}},\"description\":\"The only response that carries a trigger's secret: create and rotate. Fire it by POSTing to\\nUrl, or to Endpoint with `Authorization: Bearer {Secret}`, which keeps\\nthe secret out of the URL. Anyone holding either can fire the trigger, so store it as a secret in the\\nmonitoring tool.\"},\"PublicFreezeApprovalResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"scheduledChangeId\":{\"type\":[\"string\",\"null\"]},\"flagId\":{\"type\":[\"string\",\"null\"]},\"flagKey\":{\"type\":[\"string\",\"null\"]},\"environmentId\":{\"type\":[\"string\",\"null\"]},\"scheduledAtUtc\":{\"type\":[\"string\",\"null\"]},\"reason\":{\"type\":[\"string\",\"null\"]},\"approvedByEmail\":{\"type\":[\"string\",\"null\"]},\"approvedAt\":{\"type\":[\"string\",\"null\"]},\"stands\":{\"type\":[\"boolean\",\"null\"]}},\"description\":\"A scheduled change that a person approved to land inside a change freeze. `stands` is whether the approval\\ncounts right now: false once the approver is no longer an active Owner or Admin, and the window then holds or fails\\nthe change as if it were not approved.\"},\"PublicGrantFreezeApprovalRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"scheduledChangeId\":{\"type\":[\"string\",\"null\"]},\"reason\":{\"type\":[\"string\",\"null\"]}},\"description\":\"Approves one Pending scheduled change to apply inside the change freeze when it comes due, with a required\\n`reason`. The change must be in an environment the window covers. `scheduledChangeId` is required: a\\nmissing or empty one is a 400 naming the field.\"},\"PublicKeyedRef\":{\"type\":[\"object\",\"null\"],\"properties\":{\"id\":{\"type\":[\"string\",\"null\"]},\"key\":{\"type\":[\"string\",\"null\"]},\"name\":{\"type\":[\"string\",\"null\"]}},\"description\":\"An id with its key and name beside it, as the other v1 responses pair them. Key and name are null only for a deleted target.\"},\"PublicPlanLimit\":{\"type\":[\"object\",\"null\"],\"properties\":{\"resource\":{\"type\":[\"string\",\"null\"]},\"plan\":{\"type\":[\"string\",\"null\"]},\"max\":{\"type\":[\"integer\",\"null\"]}},\"description\":\"The cap behind a `plan_limit_reached` error. `resource` is the capped collection\\n(`projects`, `environments`, `flags`, `webhooks`, `members`);\\n`plan` is the plan's wire name, as `GET /api/v1/orgs/{org}` returns it; `max` is\\nthe cap. The environment and flag caps are per project.\"},\"PublicPrerequisiteDto\":{\"type\":[\"object\",\"null\"],\"properties\":{\"prerequisiteFlagKey\":{\"type\":[\"string\",\"null\"]},\"expectedVariationKey\":{\"type\":[\"string\",\"null\"]}},\"description\":\"A single prerequisite entry on a flag's per-environment config. Maps 1:1 onto\\nPrerequisiteDto (read side) and PrerequisiteInput (write side).\"},\"PublicPutTargetingRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"rules\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicCreateTargetingRuleRequest\"},{\"type\":\"null\"}]}}},\"description\":\"Request body for `PUT .../targeting` — a declarative full replace of the environment's\\nordered targeting rule set. Rules are applied in array order (index = priority, so the array\\norder IS the evaluation order). Rules is nullable so that an OMITTED `rules`\\nfield (a body of `{}`) binds successfully instead of failing ASP.NET Core's implicit\\nrequired-property check on non-nullable reference types — both an omitted `rules` field\\nand an explicit empty list (`{ \\\"rules\\\": [] }`) clear all targeting rules for the\\nenvironment. Each element is a PublicCreateTargetingRuleRequest (identical to the\\n`POST .../rules` body), so `UserSegmentId` is supported — segment-scoped rules can be\\nsubmitted through this endpoint. The replace is atomic (all-or-nothing): the whole rule set is\\nswapped in one transaction, or nothing changes.\"},\"PublicRampStep\":{\"type\":[\"object\",\"null\"],\"properties\":{\"percent\":{\"type\":[\"integer\",\"null\"]},\"holdMinutes\":{\"type\":[\"integer\",\"null\"]}},\"description\":\"One rung of a rollout ramp: the percentage served, then how long it holds before the next rung. Both fields\\nare required.\"},\"PublicReorderRulesRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"ruleIds\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}}},\"description\":\"Request body for `PUT .../rules/reorder`. Must include every existing rule id exactly\\nonce — `ReorderTargetingRulesCommandHandler` rejects duplicate, omitted, or unknown rule\\nids with `BadRequestException`, surfaced as an HTTP 400 `bad_request` envelope\\ncarrying the handler's message.\"},\"PublicRolloutCheck\":{\"type\":[\"object\",\"null\"],\"properties\":{\"configured\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicConfiguredWeight\"},{\"type\":\"null\"}]},\"description\":\"The configured weights, in percent; they sum to 100.\"},\"splitChangedAtUtc\":{\"type\":[\"string\",\"null\"],\"description\":\"The last time the split may have changed (the rule was edited, or a variation was added), or null if it hasn't since the rule was created. A change inside the window mixes two splits.\"},\"evaluable\":{\"type\":[\"boolean\",\"null\"],\"description\":\"Whether the check could run. See NotEvaluableReason when false.\"},\"pValue\":{\"type\":[\"number\",\"null\"],\"description\":\"The sample-ratio test's p-value, or null when not evaluable.\"},\"flagged\":{\"type\":[\"boolean\",\"null\"],\"description\":\"True only when the served split is both unlikely under the configured weights (p < 0.001) and at least 2 percentage points off for some variation.\"},\"notEvaluableReason\":{\"type\":[\"string\",\"null\"],\"description\":\"too-little-traffic or unexpected-variation when the check couldn't run; null otherwise. Allowed values: too-little-traffic, unexpected-variation.\"},\"bucketBy\":{\"type\":[\"string\",\"null\"],\"description\":\"The context attribute the rollout hashes on. A context without it skips the rule, even at 100%.\"},\"unreached\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicRolloutUnreached\"},{\"type\":\"null\"}]}},\"description\":\"A percentage-rollout rule's configured split beside a sample-ratio check of what it served.\"},\"PublicRolloutRampResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"id\":{\"type\":[\"string\",\"null\"]},\"ruleId\":{\"type\":[\"string\",\"null\"]},\"isDefaultRule\":{\"type\":[\"boolean\",\"null\"]},\"targetVariationId\":{\"type\":[\"string\",\"null\"]},\"status\":{\"type\":[\"string\",\"null\"]},\"steps\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicRampStep\"},{\"type\":\"null\"}]}},\"currentStepIndex\":{\"type\":[\"integer\",\"null\"]},\"nextStepAt\":{\"type\":[\"string\",\"null\"]},\"pausedReason\":{\"type\":[\"string\",\"null\"]},\"pausedDetail\":{\"type\":[\"string\",\"null\"]},\"startedByName\":{\"type\":[\"string\",\"null\"]},\"createdAt\":{\"type\":[\"string\",\"null\"]},\"completedAt\":{\"type\":[\"string\",\"null\"]},\"abortedAt\":{\"type\":[\"string\",\"null\"]}},\"description\":\"A rollout ramp (#4653, #5180) as `/api/v1` returns it. Flag and environment are implicit in the route.\\nA ramp drives either a targeting rule (RuleId set) or the default rule\\n(IsDefaultRule true, TargetVariationId the variation it rolls out).\\nStatus is `Running`, `Paused`, `Completed` or `Aborted`.\\nCurrentStepIndex is the step last applied, -1 before the first. NextStepAt is\\nset only while running and not yet on the last step.\"},\"PublicRolloutRampResponsePagedResult\":{\"type\":[\"object\",\"null\"],\"properties\":{\"items\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicRolloutRampResponse\"},{\"type\":\"null\"}]}},\"next_cursor\":{\"type\":[\"string\",\"null\"]}},\"description\":\"A page of results plus an opaque cursor for the next page, or null when this is the last\\npage. Wire keys are frozen: `items` (already lowercase under the camelCase policy) and\\n`next_cursor` (pinned explicitly — the policy alone would emit `nextCursor`).\"},\"PublicRolloutUnreached\":{\"type\":[\"object\",\"null\"],\"properties\":{\"eligibleEvaluations\":{\"type\":[\"integer\",\"null\"],\"description\":\"Evaluations that reached the flag's rules or fallthrough since SinceUtc, while this rule served none.\"},\"sinceUtc\":{\"type\":[\"string\",\"null\"],\"description\":\"The window start, or the first UTC midnight after the rule last changed when that is later.\"}},\"description\":\"A live rollout rule that no evaluations reached.\"},\"PublicRotateWebhookSecretResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"secretId\":{\"type\":[\"string\",\"null\"]},\"secret\":{\"type\":[\"string\",\"null\"]},\"warning\":{\"type\":[\"string\",\"null\"]}},\"description\":\"A newly added signing secret. The secret is shown only here.\"},\"PublicSdkKeyResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"id\":{\"type\":[\"string\",\"null\"]},\"name\":{\"type\":[\"string\",\"null\"]},\"description\":{\"type\":[\"string\",\"null\"]},\"type\":{\"type\":[\"string\",\"null\"],\"description\":\"Allowed values: ClientSide, ServerSide.\"},\"lastFourCharacters\":{\"type\":[\"string\",\"null\"]},\"isActive\":{\"type\":[\"boolean\",\"null\"]},\"createdAt\":{\"type\":[\"string\",\"null\"]},\"lastUsedAt\":{\"type\":[\"string\",\"null\"]},\"revokedAt\":{\"type\":[\"string\",\"null\"]},\"_actions\":{\"type\":[\"object\",\"null\"],\"additionalProperties\":{\"anyOf\":[{\"$ref\":\"#/$defs/ActionCapability\"},{\"type\":\"null\"}]},\"description\":\"Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it.\"}},\"description\":\"Public representation of an SDK key, returned by\\n`GET /api/v1/orgs/{org}/projects/{project}/environments/{env}/sdk-keys` (list) and\\n`GET .../sdk-keys/{sdkKey}` (detail). Deliberately narrower than\\nSdkKeyDto — drops `RevokedBy` (an internal user id) and\\n`EnvironmentId` (implicit in the route), and carries no plaintext key field: only\\nLastFourCharacters is ever exposed once the key has been created. The plaintext\\nkey is a one-time value that appears solely in PublicCreateSdkKeyResponse.\"},\"PublicSdkKeyResponsePagedResult\":{\"type\":[\"object\",\"null\"],\"properties\":{\"items\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicSdkKeyResponse\"},{\"type\":\"null\"}]}},\"next_cursor\":{\"type\":[\"string\",\"null\"]},\"_actions\":{\"type\":[\"object\",\"null\"],\"additionalProperties\":{\"anyOf\":[{\"$ref\":\"#/$defs/ActionCapability\"},{\"type\":\"null\"}]},\"description\":\"Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it.\"}},\"description\":\"A page of results plus an opaque cursor for the next page, or null when this is the last\\npage. Wire keys are frozen: `items` (already lowercase under the camelCase policy) and\\n`next_cursor` (pinned explicitly — the policy alone would emit `nextCursor`).\"},\"PublicSegmentConditionDto\":{\"type\":[\"object\",\"null\"],\"properties\":{\"attribute\":{\"type\":[\"string\",\"null\"]},\"operator\":{\"type\":[\"string\",\"null\"],\"description\":\"Allowed values: Equals, NotEquals, Contains, NotContains, GreaterThan, LessThan, GreaterThanOrEqual, LessThanOrEqual, In, NotIn, MatchesRegex, StartsWith, EndsWith, Before, After, SemverEquals, SemverGreaterThan, SemverGreaterThanOrEqual, SemverLessThan, SemverLessThanOrEqual.\"},\"values\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}},\"negate\":{\"type\":[\"boolean\",\"null\"]}},\"description\":\"A single targeting condition on a segment, used both as input (create/update) and output\\n(Conditions). Operator is a bare string on\\nboth sides of the wire — on write it's parsed to\\nOperatorType by `SegmentsController` (an unknown\\nvalue fails closed with a 400, never silently dropped or defaulted); on read it's mapped\\nstraight through from Operator, which is already a string.\"},\"PublicSegmentResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"id\":{\"type\":[\"string\",\"null\"]},\"key\":{\"type\":[\"string\",\"null\"]},\"name\":{\"type\":[\"string\",\"null\"]},\"description\":{\"type\":[\"string\",\"null\"]},\"conditions\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicSegmentConditionDto\"},{\"type\":\"null\"}]}},\"createdAt\":{\"type\":[\"string\",\"null\"]},\"updatedAt\":{\"type\":[\"string\",\"null\"]},\"_actions\":{\"type\":[\"object\",\"null\"],\"additionalProperties\":{\"anyOf\":[{\"$ref\":\"#/$defs/ActionCapability\"},{\"type\":\"null\"}]},\"description\":\"Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it.\"}},\"description\":\"Public representation of a user segment, returned by `GET .../segments`,\\n`GET .../segments/{segment}`, and the body of a successful create.\"},\"PublicSegmentResponsePagedResult\":{\"type\":[\"object\",\"null\"],\"properties\":{\"items\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicSegmentResponse\"},{\"type\":\"null\"}]}},\"next_cursor\":{\"type\":[\"string\",\"null\"]},\"_actions\":{\"type\":[\"object\",\"null\"],\"additionalProperties\":{\"anyOf\":[{\"$ref\":\"#/$defs/ActionCapability\"},{\"type\":\"null\"}]},\"description\":\"Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it.\"}},\"description\":\"A page of results plus an opaque cursor for the next page, or null when this is the last\\npage. Wire keys are frozen: `items` (already lowercase under the camelCase policy) and\\n`next_cursor` (pinned explicitly — the policy alone would emit `nextCursor`).\"},\"PublicSetDefaultFlagLifetimeRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"days\":{\"type\":[\"integer\",\"null\"]}},\"description\":\"Request body for `PUT /api/v1/orgs/{org}/projects/{project}/default-flag-lifetime`. `days`\\nis 1–3650, or an explicit null to remove the default. `days` is required: a body without it\\n(`{}`, or a misspelled field) is a `validation_failed` 400, never a removal, so a typo\\ncan't silently wipe the setting (#3788). A request with no body is rejected too.\"},\"PublicSetFlagExpiryRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"expiresAtUtc\":{\"type\":[\"string\",\"null\"]}},\"description\":\"Request body for `PUT /api/v1/orgs/{org}/projects/{project}/flags/{flag}/expiry`. Expiry is a\\ndedicated sub-resource, deliberately NOT a field on PublicUpdateFeatureFlagRequest: that\\nPUT is a full replace, so a new nullable field there would let any client that doesn't know about\\nexpiry (the Terraform provider included) wipe it on every update. A bare date means the end of that\\nUTC day; a full timestamp is stored exactly.\"},\"PublicSetFlagOwnerRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"email\":{\"type\":[\"string\",\"null\"]}},\"description\":\"Request body for `PUT /api/v1/orgs/{org}/projects/{project}/flags/{flag}/owner`. A dedicated\\nsub-resource for the same reason as expiry: the main flag PUT is a full replace, so an owner field\\nthere would let every client that doesn't know about owners wipe one. `email` must belong\\nto an active member of the organization (case-insensitive).\"},\"PublicSetFlagRemovalPrRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"url\":{\"type\":[\"string\",\"null\"]}},\"description\":\"Request body for `PUT /api/v1/orgs/{org}/projects/{project}/flags/{flag}/removal-pr`: the\\npull request that removes this flag from code, as opened by the Featureflip Flag Cleanup Action.\\nA dedicated sub-resource for the same reason as expiry and owner. `url` must be an https\\npull or merge request URL (`https://{host}/{owner}/{repo}/pull/{number}`, a GitLab\\n`https://{host}/{group}/{project}/-/merge_requests/{number}` or a Bitbucket Cloud\\n`https://{host}/{workspace}/{repo}/pull-requests/{number}`).\"},\"PublicSnapshotRule\":{\"type\":[\"object\",\"null\"],\"properties\":{\"description\":{\"type\":[\"string\",\"null\"]},\"variation\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicKeyedRef\"},{\"type\":\"null\"}]},\"segment\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicKeyedRef\"},{\"type\":\"null\"}]},\"rolloutPercentage\":{\"type\":[\"integer\",\"null\"]},\"bucketBy\":{\"type\":[\"string\",\"null\"]},\"conditionGroups\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicConditionGroupResponse\"},{\"type\":\"null\"}]}}},\"description\":\"A targeting rule as a comparison or copy shows it: the variation and segment with key and name, and the\\ncondition groups in the shape the targeting endpoints return.\"},\"PublicStartDefaultRuleRolloutRampRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"steps\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicRampStep\"},{\"type\":\"null\"}]}},\"variationId\":{\"type\":[\"string\",\"null\"]},\"bucketBy\":{\"type\":[\"string\",\"null\"]}},\"description\":\"Request body for `POST …/default-rule/ramp`. VariationId (and optionally\\nBucketBy) set the rollout up when the default rule has none; with one configured they may be\\nomitted, or must match it. A ladder ending at 100% finalises: the variation becomes the default variation.\"},\"PublicStartRolloutRampRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"steps\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicRampStep\"},{\"type\":\"null\"}]}}},\"description\":\"Request body for `POST …/rules/{ruleId}/ramp`. Between 1 and 20 steps, each percentage above the last and\\nthe first not below the rule's current rollout; every hold but the last is 5 minutes to 30 days, and the last\\none 0 minutes to 30 days. Elements are\\nnullable so a null step is a field error, not a 500.\"},\"PublicTargetingConfigResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"isEnabled\":{\"type\":[\"boolean\",\"null\"]},\"rules\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicTargetingRuleResponse\"},{\"type\":\"null\"}]}},\"_actions\":{\"type\":[\"object\",\"null\"],\"additionalProperties\":{\"anyOf\":[{\"$ref\":\"#/$defs/ActionCapability\"},{\"type\":\"null\"}]},\"description\":\"Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it.\"}},\"description\":\"The full targeting configuration for a flag in a single environment, returned by\\n`GET .../targeting`. Maps 1:1 onto TargetingConfigurationDto — including\\nits IsEnabled field, which reflects the parent\\n`FlagEnvironmentConfiguration.IsEnabled` (whether the flag is on in this environment at\\nall), not anything specific to targeting itself.\"},\"PublicTargetingRuleResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"id\":{\"type\":[\"string\",\"null\"]},\"priority\":{\"type\":[\"integer\",\"null\"]},\"description\":{\"type\":[\"string\",\"null\"]},\"variationId\":{\"type\":[\"string\",\"null\"]},\"rolloutPercentage\":{\"type\":[\"integer\",\"null\"]},\"bucketBy\":{\"type\":[\"string\",\"null\"],\"description\":\"Context attribute the rollout hashes on (default `user_id`; `userId` is accepted as an alias). A context without it skips this rule, even at 100%. Lookup is exact and case-sensitive, except `user_id`/`userId`, which both read the user id.\"},\"userSegmentId\":{\"type\":[\"string\",\"null\"]},\"conditionGroups\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicConditionGroupResponse\"},{\"type\":\"null\"}]}},\"_actions\":{\"type\":[\"object\",\"null\"],\"additionalProperties\":{\"anyOf\":[{\"$ref\":\"#/$defs/ActionCapability\"},{\"type\":\"null\"}]},\"description\":\"Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it.\"}},\"description\":\"A single targeting rule, returned by `GET .../rules/{ruleId}`,\\n`POST .../rules` (201 body), and nested within PublicTargetingConfigResponse.\\nMaps 1:1 onto TargetingRuleDto, dropping nothing — every field on the\\nApplication DTO is part of the public contract.\"},\"PublicTestWebhookSubscriptionResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"webhookEventId\":{\"type\":[\"string\",\"null\"]},\"webhookDeliveryId\":{\"type\":[\"string\",\"null\"]}},\"description\":\"The queued test event and its delivery. Poll the delivery log for the outcome.\"},\"PublicToggleFlagRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"enabled\":{\"type\":[\"boolean\",\"null\"]}},\"description\":\"Request body for `POST .../flags/{flag}/environments/{env}/toggle`. Named distinctly from\\nthe dashboard's own `ToggleFlagInEnvironmentRequest`\\n(which uses `IsEnabled`) — the public field is named Enabled per the phase-3c\\ncontract. Enabled is a NULLABLE `bool?` deliberately: a non-nullable value\\ntype would bind an omitted/empty body to `false` with no validation error (ASP.NET's\\nimplicit-required only covers non-nullable reference types, not value types), silently disabling\\nthe flag. The controller rejects a null Enabled with a `validation_failed` 400\\nso the intent is never ambiguous (#1806).\"},\"PublicUpdateChangeFreezeRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"name\":{\"type\":[\"string\",\"null\"]},\"reason\":{\"type\":[\"string\",\"null\"]},\"allEnvironments\":{\"type\":[\"boolean\",\"null\"]},\"environmentKeys\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}},\"environmentIds\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}},\"startsAt\":{\"type\":[\"string\",\"null\"]},\"endsAt\":{\"type\":[\"string\",\"null\"]},\"scheduledChangePolicy\":{\"type\":[\"string\",\"null\"],\"description\":\"Allowed values: Hold, Fail.\"}},\"description\":\"Edits a change freeze; a field left out is left as it was. An ended window cannot be edited, and the\\nstart of an active window cannot move. Send `If-Match` with the ETag from the last read to\\nguard against a concurrent edit.\"},\"PublicUpdateEnvironmentRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"name\":{\"type\":[\"string\",\"null\"],\"description\":\"The environment's display name.\"},\"color\":{\"type\":[\"string\",\"null\"],\"description\":\"The environment's display color, or null.\"},\"sortOrder\":{\"type\":[\"integer\",\"null\"],\"description\":\"Position among the project's environments.\"},\"requireChangeReason\":{\"type\":[\"boolean\",\"null\"],\"description\":\"Require a change reason (X-Intent-Reason) on every change to flags in this environment. Business plan and above. Omit on update to leave unchanged. Turning it off needs Admin or Owner and an X-Intent-Reason.\"},\"requireConfirmation\":{\"type\":[\"boolean\",\"null\"],\"description\":\"Ask dashboard users to type the environment key before a change lands. Dashboard only; not enforced by the API. Omit on update to leave unchanged. Turning it off needs Admin or Owner and an X-Intent-Reason.\"}},\"description\":\"Request body for `PUT /api/v1/orgs/{org}/projects/{project}/environments/{env}`. See\\nPublicCreateEnvironmentRequest for why this is named distinctly from the\\ndashboard's `UpdateEnvironmentRequest`.\"},\"PublicUpdateFeatureFlagRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"name\":{\"type\":[\"string\",\"null\"]},\"description\":{\"type\":[\"string\",\"null\"]},\"tags\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}},\"clientSideVisible\":{\"type\":[\"boolean\",\"null\"]}},\"description\":\"Request body for `PUT /api/v1/orgs/{org}/projects/{project}/flags/{flag}`. See\\nPublicCreateFeatureFlagRequest for why this is named distinctly from the\\ndashboard's `UpdateFeatureFlagRequest`. The flag's key and type are immutable via this\\nendpoint (mirrors `UpdateFeatureFlagCommand`, which has no `Key`/`Type`).\"},\"PublicUpdateFlagEnvConfigRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"defaultVariationId\":{\"type\":[\"string\",\"null\"]},\"strategy\":{\"type\":[\"string\",\"null\"],\"description\":\"Allowed values: SingleVariation, PercentageRollout, TargetedRollout.\"},\"prerequisites\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicPrerequisiteDto\"},{\"type\":\"null\"}]}}},\"description\":\"Request body for `PUT .../flags/{flag}/environments/{env}`. Named distinctly from the\\ndashboard's own `UpdateFlagEnvironmentConfigurationRequest`\\n— see PublicCreateEnvironmentRequest for the schemaId-collision rationale (both\\ncontrollers share one Swagger document). Strategy is passed through verbatim to\\nStrategy\\n— the existing command validator name-allowlists it (SingleVariation/PercentageRollout/\\nTargetedRollout or null), so an invalid value surfaces as the handler's own 400, not a\\ncontroller-level guard. A null Prerequisites leaves prerequisites untouched; a\\nnon-null list replaces them wholesale (mirrors UpdateFlagPrerequisitesCommand's\\nreplace-all semantics).\"},\"PublicUpdateFlagTriggerRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"name\":{\"type\":[\"string\",\"null\"]},\"description\":{\"type\":[\"string\",\"null\"]},\"enabled\":{\"type\":[\"boolean\",\"null\"]}},\"description\":\"Request body for `PUT .../triggers/{trigger}`. The action is fixed at creation. Enabled is\\nnullable so leaving it out is a 400 rather than a bound `false` that silently turns the trigger off.\"},\"PublicUpdateProjectRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"name\":{\"type\":[\"string\",\"null\"]},\"description\":{\"type\":[\"string\",\"null\"]}},\"description\":\"Request body for `PUT /api/v1/orgs/{org}/projects/{project}`. See\\nPublicCreateProjectRequest for why this is named distinctly from the\\ndashboard's `UpdateProjectRequest`.\"},\"PublicUpdateSdkKeyRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"name\":{\"type\":[\"string\",\"null\"]},\"description\":{\"type\":[\"string\",\"null\"]}},\"description\":\"Request body for `PUT /api/v1/orgs/{org}/projects/{project}/environments/{env}/sdk-keys/{sdkKey}`.\\nType and key material are immutable via this endpoint (mirrors\\nUpdateSdkKeyCommand, which\\ncarries no `Type`).\"},\"PublicUpdateSegmentRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"name\":{\"type\":[\"string\",\"null\"]},\"description\":{\"type\":[\"string\",\"null\"]},\"conditions\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicSegmentConditionDto\"},{\"type\":\"null\"}]}}},\"description\":\"Request body for `PUT /api/v1/orgs/{org}/projects/{project}/segments/{segment}`. The\\nsegment's key is immutable via this endpoint (mirrors `UpdateUserSegmentCommand`, which\\ncarries no `Key`).\"},\"PublicUpdateTargetingRuleRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"description\":{\"type\":[\"string\",\"null\"]},\"variationId\":{\"type\":[\"string\",\"null\"]},\"rolloutPercentage\":{\"type\":[\"integer\",\"null\"]},\"userSegmentId\":{\"type\":[\"string\",\"null\"]},\"conditionGroups\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicConditionGroupRequest\"},{\"type\":\"null\"}]}},\"bucketBy\":{\"type\":[\"string\",\"null\"],\"description\":\"Context attribute the rollout hashes on (default `user_id`; `userId` is accepted as an alias). Omit to keep the current value. A fixed rule (no `rolloutPercentage`) never hashes and always stores `user_id`, so one made a rollout without `bucketBy` gets `user_id`. A context without it skips this rule, even at 100%. Changing it reshuffles who is in the rollout.\"}},\"description\":\"Request body for `PUT .../rules/{ruleId}`. Same shape as\\nPublicCreateTargetingRuleRequest — see its remarks on operator\\nvalidation/canonicalization, which applies identically here.\"},\"PublicUpdateVariationRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"name\":{\"type\":[\"string\",\"null\"]},\"value\":{\"type\":[\"string\",\"null\"]},\"description\":{\"type\":[\"string\",\"null\"]}},\"description\":\"Request body for\\n`PUT /api/v1/orgs/{org}/projects/{project}/flags/{flag}/variations/{variationId}`. The\\nvariation's key is immutable via this endpoint (mirrors\\n`UpdateVariationCommand`, which\\ncarries no `Key`).\"},\"PublicUpdateWebhookSubscriptionRequest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"name\":{\"type\":[\"string\",\"null\"]},\"url\":{\"type\":[\"string\",\"null\"]},\"eventTypes\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}},\"projectIds\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}},\"environmentIds\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}},\"isEnabled\":{\"type\":[\"boolean\",\"null\"]},\"credential\":{\"type\":[\"string\",\"null\"]}},\"description\":\"Replaces a subscription's configuration (full replace — omitted lists become empty, meaning\\n\\\"all\\\"). `isEnabled` is required. The provider cannot be changed. `credential`\\nreplaces a Datadog or Grafana subscription's stored credential; omit it to keep the current\\none, unless the `url` changes, which needs the credential sent again.\"},\"PublicVariationResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"id\":{\"type\":[\"string\",\"null\"]},\"key\":{\"type\":[\"string\",\"null\"]},\"name\":{\"type\":[\"string\",\"null\"]},\"value\":{\"type\":[\"string\",\"null\"]},\"description\":{\"type\":[\"string\",\"null\"]},\"_actions\":{\"type\":[\"object\",\"null\"],\"additionalProperties\":{\"anyOf\":[{\"$ref\":\"#/$defs/ActionCapability\"},{\"type\":\"null\"}]},\"description\":\"Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it.\"}},\"description\":\"A single variation on a flag, as returned in Variations.\"},\"PublicWebhookDeliveryResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"id\":{\"type\":[\"string\",\"null\"]},\"webhookEventId\":{\"type\":[\"string\",\"null\"]},\"status\":{\"type\":[\"string\",\"null\"],\"description\":\"Allowed values: Pending, Succeeded, DeadLettered.\"},\"attemptCount\":{\"type\":[\"integer\",\"null\"]},\"nextAttemptAt\":{\"type\":[\"string\",\"null\"]},\"lastResponseStatusCode\":{\"type\":[\"integer\",\"null\"]},\"lastError\":{\"type\":[\"string\",\"null\"]},\"completedAt\":{\"type\":[\"string\",\"null\"]},\"createdAt\":{\"type\":[\"string\",\"null\"]}},\"description\":\"One delivery attempt record. `status` is `Pending` (awaiting its first attempt,\\nbacking off, or in flight), `Succeeded` or `DeadLettered`.\"},\"PublicWebhookDeliveryResponsePagedResult\":{\"type\":[\"object\",\"null\"],\"properties\":{\"items\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicWebhookDeliveryResponse\"},{\"type\":\"null\"}]}},\"next_cursor\":{\"type\":[\"string\",\"null\"]}},\"description\":\"A page of results plus an opaque cursor for the next page, or null when this is the last\\npage. Wire keys are frozen: `items` (already lowercase under the camelCase policy) and\\n`next_cursor` (pinned explicitly — the policy alone would emit `nextCursor`).\"},\"PublicWebhookSecretResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"id\":{\"type\":[\"string\",\"null\"]},\"createdAt\":{\"type\":[\"string\",\"null\"]},\"retiredAt\":{\"type\":[\"string\",\"null\"]}},\"description\":\"A signing secret's id and lifecycle. A secret with no `retiredAt` is active and signs every delivery.\"},\"PublicWebhookSubscriptionResponse\":{\"type\":[\"object\",\"null\"],\"properties\":{\"id\":{\"type\":[\"string\",\"null\"]},\"name\":{\"type\":[\"string\",\"null\"]},\"url\":{\"type\":[\"string\",\"null\"]},\"provider\":{\"type\":[\"string\",\"null\"],\"description\":\"Allowed values: GenericHttp, Slack, Datadog, Grafana.\"},\"isEnabled\":{\"type\":[\"boolean\",\"null\"]},\"eventTypes\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}},\"projectIds\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}},\"environmentIds\":{\"type\":[\"array\",\"null\"],\"items\":{\"type\":[\"string\",\"null\"]}},\"consecutiveFailureCount\":{\"type\":[\"integer\",\"null\"]},\"autoDisabledAt\":{\"type\":[\"string\",\"null\"]},\"createdAt\":{\"type\":[\"string\",\"null\"]},\"updatedAt\":{\"type\":[\"string\",\"null\"]},\"secrets\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicWebhookSecretResponse\"},{\"type\":\"null\"}]}},\"overPlanLimit\":{\"type\":[\"boolean\",\"null\"]},\"_actions\":{\"type\":[\"object\",\"null\"],\"additionalProperties\":{\"anyOf\":[{\"$ref\":\"#/$defs/ActionCapability\"},{\"type\":\"null\"}]},\"description\":\"Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it.\"}},\"description\":\"A webhook subscription. Never carries secret material: signing secrets are listed by id and\\nlifecycle only — the value itself is returned once, when it is created or rotated.\\n`overPlanLimit` is true when the organization has more subscriptions than its plan\\nallows, which happens after a downgrade. The oldest subscriptions up to the limit keep\\ndelivering. The rest receive nothing and cannot be re-enabled, tested or redelivered to until\\nthe plan is upgraded or older subscriptions are deleted.\"},\"PublicWebhookSubscriptionResponsePagedResult\":{\"type\":[\"object\",\"null\"],\"properties\":{\"items\":{\"type\":[\"array\",\"null\"],\"items\":{\"anyOf\":[{\"$ref\":\"#/$defs/PublicWebhookSubscriptionResponse\"},{\"type\":\"null\"}]}},\"next_cursor\":{\"type\":[\"string\",\"null\"]},\"_actions\":{\"type\":[\"object\",\"null\"],\"additionalProperties\":{\"anyOf\":[{\"$ref\":\"#/$defs/ActionCapability\"},{\"type\":\"null\"}]},\"description\":\"Capability hints: which operations the authenticated caller may perform on this resource, each with allowed + optional reason. Computed from the caller's role and the resource's state. Injected at runtime; safe to ignore. Present only on top-level resource responses — nested occurrences (e.g. a rule inside a targeting-config response) do not carry it.\"}},\"description\":\"A page of results plus an opaque cursor for the next page, or null when this is the last\\npage. Wire keys are frozen: `items` (already lowercase under the camelCase policy) and\\n`next_cursor` (pinned explicitly — the policy alone would emit `nextCursor`).\"}}")
|
|
228
238
|
}, h = m.$defs, g = m.endpoints, _ = (e) => ({ type: [e, "null"] });
|
|
229
239
|
function v(e) {
|
|
230
240
|
if (!h[e]) throw Error(`no API schema named ${e}`);
|
|
@@ -291,7 +301,16 @@ function E(e, t = []) {
|
|
|
291
301
|
var D = n.string().describe("Project key"), O = n.string().describe("Flag key or id"), k = n.string().describe("Environment key, e.g. production"), A = n.string().optional().describe("Why you are making this change. Recorded in the audit log, and required when the environment (or, for project-wide changes, any environment in the project) is marked critical."), j = {
|
|
292
302
|
limit: n.number().int().min(1).max(100).optional().describe("Page size (default 20)"),
|
|
293
303
|
cursor: n.string().optional().describe("next_cursor from a previous response")
|
|
294
|
-
};
|
|
304
|
+
}, M = n.boolean().optional().describe("Owner/Admin only: break an active change freeze for this one change. Requires `reason`. Use it only after a change_frozen error says can_override is true.");
|
|
305
|
+
function N(e, t) {
|
|
306
|
+
if (e && !t?.trim()) return {
|
|
307
|
+
content: [{
|
|
308
|
+
type: "text",
|
|
309
|
+
text: "Error: freeze_override requires reason: say why this change must break the freeze."
|
|
310
|
+
}],
|
|
311
|
+
isError: !0
|
|
312
|
+
};
|
|
313
|
+
}
|
|
295
314
|
// src/tools/projects.ts
|
|
296
315
|
function ee(e, t) {
|
|
297
316
|
e.registerTool("list_projects", {
|
|
@@ -456,7 +475,7 @@ function te(e, t) {
|
|
|
456
475
|
}));
|
|
457
476
|
}
|
|
458
477
|
// src/tools/sdk-keys.ts
|
|
459
|
-
var
|
|
478
|
+
var P = "This is the only time the full key is returned; it cannot be shown again. Store it in a secret or an untracked .env file, never in source control or a chat log.";
|
|
460
479
|
function ne(e, t) {
|
|
461
480
|
let r = (e, n) => `/api/v1/orgs/${o(t.org)}/projects/${o(e)}/environments/${o(n)}/sdk-keys`;
|
|
462
481
|
e.registerTool("list_sdk_keys", {
|
|
@@ -511,7 +530,7 @@ function ne(e, t) {
|
|
|
511
530
|
} });
|
|
512
531
|
return d({
|
|
513
532
|
...e,
|
|
514
|
-
warning: e.warning ? `${e.warning} ${
|
|
533
|
+
warning: e.warning ? `${e.warning} ${P}` : P
|
|
515
534
|
});
|
|
516
535
|
}
|
|
517
536
|
if (!a) return f(/* @__PURE__ */ Error(`action=${e} requires sdkKey (see list_sdk_keys)`));
|
|
@@ -531,17 +550,17 @@ function ne(e, t) {
|
|
|
531
550
|
}));
|
|
532
551
|
}
|
|
533
552
|
// src/tools/etag.ts
|
|
534
|
-
var
|
|
553
|
+
var F = {
|
|
535
554
|
type: "string",
|
|
536
555
|
description: "ETag of what was read. Pass it as ifMatch on the matching update so the write is refused (412) instead of overwriting a change made since."
|
|
537
|
-
},
|
|
556
|
+
}, I = {
|
|
538
557
|
type: "string",
|
|
539
558
|
description: "ETag of what this write left behind. Pass it as ifMatch on the next update to chain writes without re-reading. Absent when the API sent none; read the resource again before the next conditional write."
|
|
540
559
|
};
|
|
541
|
-
function
|
|
560
|
+
function L(e) {
|
|
542
561
|
return n.string().optional().describe(`etag from ${e}. The write is refused with 412 if the resource changed since that read; re-read and re-apply. Omit to write unconditionally.`);
|
|
543
562
|
}
|
|
544
|
-
function
|
|
563
|
+
function R({ data: e, etag: t }) {
|
|
545
564
|
return t ? {
|
|
546
565
|
...e,
|
|
547
566
|
etag: t
|
|
@@ -568,9 +587,9 @@ function re(e, t) {
|
|
|
568
587
|
project: n.string().describe("Project key"),
|
|
569
588
|
segment: n.string().describe("Segment key or id")
|
|
570
589
|
}),
|
|
571
|
-
outputSchema: C("GET /api/v1/orgs/{org}/projects/{project}/segments/{segment}", { etag:
|
|
590
|
+
outputSchema: C("GET /api/v1/orgs/{org}/projects/{project}/segments/{segment}", { etag: F }),
|
|
572
591
|
annotations: { readOnlyHint: !0 }
|
|
573
|
-
}, async ({ project: e, segment: n }) => p(async () => d(
|
|
592
|
+
}, async ({ project: e, segment: n }) => p(async () => d(R(await t.api.requestWithEtag("GET", `/api/v1/orgs/${o(t.org)}/projects/${o(e)}/segments/${o(n)}`)))));
|
|
574
593
|
let r = n.object({
|
|
575
594
|
attribute: n.string().describe("Context attribute name, e.g. plan, country, user_id"),
|
|
576
595
|
operator: n.string().describe("Case-sensitive: Equals, NotEquals, Contains, NotContains, GreaterThan, LessThan, GreaterThanOrEqual, LessThanOrEqual, In, NotIn, MatchesRegex, StartsWith, EndsWith, Before, After, SemverEquals, SemverGreaterThan, SemverGreaterThanOrEqual, SemverLessThan, SemverLessThanOrEqual"),
|
|
@@ -597,7 +616,7 @@ function re(e, t) {
|
|
|
597
616
|
name: n.string().optional().describe("Display name; required for create"),
|
|
598
617
|
description: n.string().optional().describe("What the segment means; \"\" clears it"),
|
|
599
618
|
conditions: n.array(r).optional().describe("Conditions a user must match to be in the segment; on update, replaces the whole list"),
|
|
600
|
-
ifMatch:
|
|
619
|
+
ifMatch: L("get_segment"),
|
|
601
620
|
reason: A
|
|
602
621
|
}),
|
|
603
622
|
outputSchema: T(y("POST /api/v1/orgs/{org}/projects/{project}/segments"), E({
|
|
@@ -609,7 +628,7 @@ function re(e, t) {
|
|
|
609
628
|
type: ["array", "null"],
|
|
610
629
|
items: { type: "object" }
|
|
611
630
|
},
|
|
612
|
-
etag:
|
|
631
|
+
etag: I
|
|
613
632
|
}, ["segment", "updated"]), E({ deleted: { type: "string" } }, ["deleted"])),
|
|
614
633
|
annotations: { destructiveHint: !0 }
|
|
615
634
|
}, async ({ action: e, project: n, segment: r, key: a, name: s, description: c, conditions: l, ifMatch: u, reason: m }) => p(async () => {
|
|
@@ -636,7 +655,7 @@ function re(e, t) {
|
|
|
636
655
|
ifMatch: u ?? n,
|
|
637
656
|
reason: m
|
|
638
657
|
});
|
|
639
|
-
return d(
|
|
658
|
+
return d(R({
|
|
640
659
|
data: {
|
|
641
660
|
segment: r,
|
|
642
661
|
updated: !0,
|
|
@@ -649,8 +668,8 @@ function re(e, t) {
|
|
|
649
668
|
}));
|
|
650
669
|
}
|
|
651
670
|
// src/tools/owner.ts
|
|
652
|
-
var
|
|
653
|
-
async function
|
|
671
|
+
var z = n.string().optional().describe("Only flags with this owner: an email, \"me\" for the token's own user, or \"none\" for unowned flags");
|
|
672
|
+
async function B(e, t) {
|
|
654
673
|
let n = t?.trim();
|
|
655
674
|
if (!n) return;
|
|
656
675
|
if (n.toLowerCase() !== "me") return n;
|
|
@@ -659,13 +678,13 @@ async function L(e, t) {
|
|
|
659
678
|
return r.email;
|
|
660
679
|
}
|
|
661
680
|
// src/tools/flags.ts
|
|
662
|
-
var
|
|
681
|
+
var V = n.enum([
|
|
663
682
|
"Boolean",
|
|
664
683
|
"String",
|
|
665
684
|
"Number",
|
|
666
685
|
"Json"
|
|
667
686
|
]);
|
|
668
|
-
function
|
|
687
|
+
function ie(e, t) {
|
|
669
688
|
let r = (e) => `/api/v1/orgs/${o(t.org)}/projects/${o(e)}/flags`;
|
|
670
689
|
e.registerTool("list_flags", {
|
|
671
690
|
title: "List feature flags",
|
|
@@ -674,16 +693,16 @@ function ae(e, t) {
|
|
|
674
693
|
project: D,
|
|
675
694
|
search: n.string().optional().describe("Substring of the flag key or name"),
|
|
676
695
|
tag: n.string().optional().describe("Only flags carrying this tag"),
|
|
677
|
-
type:
|
|
696
|
+
type: V.optional().describe("Only flags of this type"),
|
|
678
697
|
archived: n.boolean().optional().describe("true = only archived, false = only active"),
|
|
679
|
-
owner:
|
|
698
|
+
owner: z,
|
|
680
699
|
...j
|
|
681
700
|
}),
|
|
682
701
|
outputSchema: S("GET /api/v1/orgs/{org}/projects/{project}/flags"),
|
|
683
702
|
annotations: { readOnlyHint: !0 }
|
|
684
703
|
}, async ({ project: e, owner: n, ...i }) => p(async () => d(await t.api.request("GET", r(e), { query: {
|
|
685
704
|
...i,
|
|
686
|
-
owner: await
|
|
705
|
+
owner: await B(t, n)
|
|
687
706
|
} })))), e.registerTool("get_flag", {
|
|
688
707
|
title: "Get feature flag",
|
|
689
708
|
description: "Get one feature flag with its variations and metadata, including its owner (null when unowned). Address by flag key or id.",
|
|
@@ -691,16 +710,16 @@ function ae(e, t) {
|
|
|
691
710
|
project: D,
|
|
692
711
|
flag: O
|
|
693
712
|
}),
|
|
694
|
-
outputSchema: C("GET /api/v1/orgs/{org}/projects/{project}/flags/{flag}", { etag:
|
|
713
|
+
outputSchema: C("GET /api/v1/orgs/{org}/projects/{project}/flags/{flag}", { etag: F }),
|
|
695
714
|
annotations: { readOnlyHint: !0 }
|
|
696
|
-
}, async ({ project: e, flag: n }) => p(async () => d(
|
|
715
|
+
}, async ({ project: e, flag: n }) => p(async () => d(R(await t.api.requestWithEtag("GET", `${r(e)}/${o(n)}`))))), e.registerTool("create_flag", {
|
|
697
716
|
title: "Create feature flag",
|
|
698
717
|
description: "Create a feature flag. type is one of Boolean|String|Number|Json. Boolean flags get true/false variations automatically; for other types pass initialVariations. The flag is created in every environment of the project (disabled).",
|
|
699
718
|
inputSchema: n.object({
|
|
700
719
|
project: D,
|
|
701
720
|
key: n.string().describe("Unique flag key, e.g. checkout-v2"),
|
|
702
721
|
name: n.string().describe("Display name"),
|
|
703
|
-
type:
|
|
722
|
+
type: V.describe("Value type; Boolean gets true/false variations automatically"),
|
|
704
723
|
description: n.string().optional().describe("What the flag controls"),
|
|
705
724
|
tags: n.array(n.string()).optional().describe("Tags for filtering, e.g. team or area"),
|
|
706
725
|
clientSideVisible: n.boolean().optional().describe("Expose to client-side SDKs (browser/mobile)"),
|
|
@@ -730,14 +749,14 @@ function ae(e, t) {
|
|
|
730
749
|
description: n.string().optional().describe("New description; \"\" clears it"),
|
|
731
750
|
tags: n.array(n.string()).optional().describe("Replaces the whole tag list"),
|
|
732
751
|
clientSideVisible: n.boolean().optional().describe("Expose to client-side SDKs (browser/mobile); false hides the flag from them entirely"),
|
|
733
|
-
ifMatch:
|
|
752
|
+
ifMatch: L("get_flag"),
|
|
734
753
|
reason: A
|
|
735
754
|
}),
|
|
736
755
|
outputSchema: w({
|
|
737
756
|
project: { type: "string" },
|
|
738
757
|
flag: { type: "string" },
|
|
739
758
|
updated: { type: "boolean" },
|
|
740
|
-
etag:
|
|
759
|
+
etag: I
|
|
741
760
|
}, [
|
|
742
761
|
"project",
|
|
743
762
|
"flag",
|
|
@@ -755,7 +774,7 @@ function ae(e, t) {
|
|
|
755
774
|
ifMatch: l ?? p?.etag,
|
|
756
775
|
reason: u
|
|
757
776
|
});
|
|
758
|
-
return d(
|
|
777
|
+
return d(R({
|
|
759
778
|
data: {
|
|
760
779
|
project: e,
|
|
761
780
|
flag: n,
|
|
@@ -844,7 +863,7 @@ function ae(e, t) {
|
|
|
844
863
|
idempotentHint: !0
|
|
845
864
|
}
|
|
846
865
|
}, async ({ project: e, flag: n, owner: i }) => p(async () => {
|
|
847
|
-
let a = `${r(e)}/${o(n)}/owner`, s = i?.trim().toLowerCase() === "none" ? void 0 : await
|
|
866
|
+
let a = `${r(e)}/${o(n)}/owner`, s = i?.trim().toLowerCase() === "none" ? void 0 : await B(t, i ?? void 0);
|
|
848
867
|
return s === void 0 ? await t.api.request("DELETE", a) : await t.api.request("PUT", a, { body: { email: s } }), d({
|
|
849
868
|
project: e,
|
|
850
869
|
flag: n,
|
|
@@ -899,12 +918,12 @@ function ae(e, t) {
|
|
|
899
918
|
}))));
|
|
900
919
|
}
|
|
901
920
|
// src/tools/flag-environments.ts
|
|
902
|
-
var
|
|
921
|
+
var ae = n.enum([
|
|
903
922
|
"SingleVariation",
|
|
904
923
|
"PercentageRollout",
|
|
905
924
|
"TargetedRollout"
|
|
906
925
|
]);
|
|
907
|
-
function
|
|
926
|
+
function oe(e, t) {
|
|
908
927
|
let r = (e, n) => `/api/v1/orgs/${o(t.org)}/projects/${o(e)}/flags/${o(n)}`;
|
|
909
928
|
e.registerTool("toggle_flag", {
|
|
910
929
|
title: "Toggle flag in environment",
|
|
@@ -914,7 +933,8 @@ function se(e, t) {
|
|
|
914
933
|
flag: O,
|
|
915
934
|
environment: k,
|
|
916
935
|
enabled: n.boolean().describe("true to turn the flag on in this environment, false to turn it off"),
|
|
917
|
-
reason: A
|
|
936
|
+
reason: A,
|
|
937
|
+
freeze_override: M
|
|
918
938
|
}),
|
|
919
939
|
outputSchema: w({
|
|
920
940
|
project: { type: "string" },
|
|
@@ -928,9 +948,10 @@ function se(e, t) {
|
|
|
928
948
|
"enabled"
|
|
929
949
|
]),
|
|
930
950
|
annotations: { destructiveHint: !0 }
|
|
931
|
-
}, async ({ project: e, flag: n, environment: i, enabled: a, reason: s }) => p(async () => (await t.api.request("POST", `${r(e, n)}/environments/${o(i)}/toggle`, {
|
|
951
|
+
}, async ({ project: e, flag: n, environment: i, enabled: a, reason: s, freeze_override: c }) => N(c, s) || p(async () => (await t.api.request("POST", `${r(e, n)}/environments/${o(i)}/toggle`, {
|
|
932
952
|
body: { enabled: a },
|
|
933
|
-
reason: s
|
|
953
|
+
reason: s,
|
|
954
|
+
freezeOverride: c
|
|
934
955
|
}), d({
|
|
935
956
|
project: e,
|
|
936
957
|
flag: n,
|
|
@@ -944,12 +965,13 @@ function se(e, t) {
|
|
|
944
965
|
flag: O,
|
|
945
966
|
environment: k,
|
|
946
967
|
defaultVariationId: n.string().describe("Variation id to serve on fallthrough — required by the API"),
|
|
947
|
-
strategy:
|
|
968
|
+
strategy: ae.optional().describe("Serving strategy; only SingleVariation is currently supported here"),
|
|
948
969
|
prerequisites: n.array(n.object({
|
|
949
970
|
prerequisiteFlagKey: n.string(),
|
|
950
971
|
expectedVariationKey: n.string()
|
|
951
972
|
})).optional().describe("Flags that must evaluate to the expected variation before this flag serves. Omit to leave existing prerequisites untouched; pass a list (possibly empty) to replace them wholesale."),
|
|
952
|
-
reason: A
|
|
973
|
+
reason: A,
|
|
974
|
+
freeze_override: M
|
|
953
975
|
}),
|
|
954
976
|
outputSchema: w({
|
|
955
977
|
project: { type: "string" },
|
|
@@ -971,14 +993,15 @@ function se(e, t) {
|
|
|
971
993
|
"defaultVariationId"
|
|
972
994
|
]),
|
|
973
995
|
annotations: { destructiveHint: !0 }
|
|
974
|
-
}, async ({ project: e, flag: n, environment: i, reason: a,
|
|
975
|
-
body:
|
|
976
|
-
reason: a
|
|
996
|
+
}, async ({ project: e, flag: n, environment: i, reason: a, freeze_override: s, ...c }) => N(s, a) || p(async () => (await t.api.request("PUT", `${r(e, n)}/environments/${o(i)}`, {
|
|
997
|
+
body: c,
|
|
998
|
+
reason: a,
|
|
999
|
+
freezeOverride: s
|
|
977
1000
|
}), d({
|
|
978
1001
|
project: e,
|
|
979
1002
|
flag: n,
|
|
980
1003
|
environment: i,
|
|
981
|
-
...
|
|
1004
|
+
...c
|
|
982
1005
|
})))), e.registerTool("flag_status", {
|
|
983
1006
|
title: "Flag status across environments",
|
|
984
1007
|
description: "Compact cross-environment view of one flag: enabled state, strategy, default variation, and prerequisites per environment.",
|
|
@@ -1048,22 +1071,22 @@ function se(e, t) {
|
|
|
1048
1071
|
}, async ({ project: e, flag: n, environment: i, days: a }) => p(async () => d(await t.api.request("GET", `${r(e, n)}/environments/${o(i)}/evaluations`, { query: { days: a ?? 7 } }))));
|
|
1049
1072
|
}
|
|
1050
1073
|
// src/tools/flag-triggers.ts
|
|
1051
|
-
var
|
|
1052
|
-
function
|
|
1074
|
+
var H = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i, U = "GET /api/v1/orgs/{org}/projects/{project}/flags/{flag}/environments/{env}/triggers", se = "Relay the url (or endpoint + secret) to the user verbatim so they can paste it into their monitoring tool, where it should be stored as a secret. Never write it to source control or a chat log. If it leaks, rotate it.", ce = "The old URL stopped working the moment this returned: update the monitoring tool now.", le = [["PLAN_FEATURE_UNAVAILABLE", "Flag triggers need the Team plan or above. On a lower plan you can still list, rename, disable and delete existing triggers, but not create, re-enable or rotate one. An organization Owner can upgrade in Billing."], ["FEATURE_NOT_ENABLED", "Flag triggers are not enabled for this organization yet. Nothing in the request is wrong, and retrying will not help until they are."]];
|
|
1075
|
+
function ue(e) {
|
|
1053
1076
|
if (!(e instanceof i)) return;
|
|
1054
1077
|
let t = [e.envelope.message, ...Object.values(e.envelope.fields ?? {}).flat()].join("\n");
|
|
1055
|
-
return
|
|
1078
|
+
return le.find(([e]) => t.includes(e))?.[1];
|
|
1056
1079
|
}
|
|
1057
|
-
async function
|
|
1080
|
+
async function W(e) {
|
|
1058
1081
|
try {
|
|
1059
1082
|
return await e();
|
|
1060
1083
|
} catch (e) {
|
|
1061
|
-
let t = f(e), n =
|
|
1084
|
+
let t = f(e), n = ue(e);
|
|
1062
1085
|
return n && (t.content[0].text += `\n${n}`), t;
|
|
1063
1086
|
}
|
|
1064
1087
|
}
|
|
1065
|
-
var
|
|
1066
|
-
function
|
|
1088
|
+
var G = (e) => f(/* @__PURE__ */ Error(`trigger must be a trigger id, not "${e}": triggers have no key. See list_flag_triggers.`));
|
|
1089
|
+
function de(e, t) {
|
|
1067
1090
|
let r = (e, n, r) => `/api/v1/orgs/${o(t.org)}/projects/${o(e)}/flags/${o(n)}/environments/${o(r)}/triggers`;
|
|
1068
1091
|
e.registerTool("list_flag_triggers", {
|
|
1069
1092
|
title: "List flag triggers",
|
|
@@ -1075,14 +1098,14 @@ function ge(e, t) {
|
|
|
1075
1098
|
trigger: n.string().optional().describe("Trigger id: get just that trigger instead of listing"),
|
|
1076
1099
|
...j
|
|
1077
1100
|
}),
|
|
1078
|
-
outputSchema: T(y(
|
|
1101
|
+
outputSchema: T(y(U), y(`${U}/{trigger}`)),
|
|
1079
1102
|
annotations: { readOnlyHint: !0 }
|
|
1080
|
-
}, async ({ project: e, flag: n, environment: i, trigger: a, limit: s, cursor: c }) =>
|
|
1103
|
+
}, async ({ project: e, flag: n, environment: i, trigger: a, limit: s, cursor: c }) => W(async () => {
|
|
1081
1104
|
let l = r(e, n, i);
|
|
1082
1105
|
return a === void 0 ? d(await t.api.request("GET", l, { query: {
|
|
1083
1106
|
limit: s,
|
|
1084
1107
|
cursor: c
|
|
1085
|
-
} })) :
|
|
1108
|
+
} })) : H.test(a) ? d(await t.api.request("GET", `${l}/${o(a)}`)) : G(a);
|
|
1086
1109
|
})), e.registerTool("manage_flag_trigger", {
|
|
1087
1110
|
title: "Create, update, rotate, or delete a flag trigger",
|
|
1088
1111
|
description: "Manage a flag's triggers in one environment. A trigger is a secret URL a monitoring tool POSTs to (no body) to turn the flag on (Enable) or off (Disable); calling it when the flag is already in that state changes nothing. action=create needs name + triggerAction and returns the URL ONCE. action=update needs trigger and changes only the fields you pass (name, description, enabled; enabled=false stops the URL working until re-enabled). action=rotate needs trigger: the old URL stops working at once and the new one is returned ONCE. action=delete needs trigger. The action (Enable/Disable) is fixed at creation. Creating, re-enabling and rotating need the Team plan or above; every write needs a Member token; at most 10 per flag per environment. To change the flag yourself, use toggle_flag instead.",
|
|
@@ -1106,13 +1129,13 @@ function ge(e, t) {
|
|
|
1106
1129
|
}),
|
|
1107
1130
|
outputSchema: T(y("POST /api/v1/orgs/{org}/projects/{project}/flags/{flag}/environments/{env}/triggers"), y("PUT /api/v1/orgs/{org}/projects/{project}/flags/{flag}/environments/{env}/triggers/{trigger}"), E({ deleted: { type: "string" } }, ["deleted"])),
|
|
1108
1131
|
annotations: { destructiveHint: !0 }
|
|
1109
|
-
}, async ({ action: e, project: n, flag: i, environment: a, trigger: s, name: c, triggerAction: l, description: u, enabled: p, reason: m, idempotency_key: h }) =>
|
|
1132
|
+
}, async ({ action: e, project: n, flag: i, environment: a, trigger: s, name: c, triggerAction: l, description: u, enabled: p, reason: m, idempotency_key: h }) => W(async () => {
|
|
1110
1133
|
let g = r(n, i, a), _ = (e, ...t) => d({
|
|
1111
1134
|
...e,
|
|
1112
1135
|
warning: [
|
|
1113
1136
|
...t,
|
|
1114
1137
|
e.warning,
|
|
1115
|
-
|
|
1138
|
+
se
|
|
1116
1139
|
].filter(Boolean).join(" ")
|
|
1117
1140
|
});
|
|
1118
1141
|
if (e === "create") return !c || !l ? f(/* @__PURE__ */ Error("action=create requires name and triggerAction")) : _(await t.api.request("POST", g, {
|
|
@@ -1125,7 +1148,7 @@ function ge(e, t) {
|
|
|
1125
1148
|
reason: m
|
|
1126
1149
|
}));
|
|
1127
1150
|
if (!s) return f(/* @__PURE__ */ Error(`action=${e} requires trigger (see list_flag_triggers)`));
|
|
1128
|
-
if (!
|
|
1151
|
+
if (!H.test(s)) return G(s);
|
|
1129
1152
|
let v = `${g}/${o(s)}`;
|
|
1130
1153
|
if (e === "update") {
|
|
1131
1154
|
if (c === void 0 && u === void 0 && p === void 0) return f(/* @__PURE__ */ Error("action=update needs at least one of name, description or enabled"));
|
|
@@ -1139,17 +1162,128 @@ function ge(e, t) {
|
|
|
1139
1162
|
reason: m
|
|
1140
1163
|
}));
|
|
1141
1164
|
}
|
|
1142
|
-
return e === "rotate" ? _(await t.api.request("POST", `${v}/rotate`, { reason: m }),
|
|
1165
|
+
return e === "rotate" ? _(await t.api.request("POST", `${v}/rotate`, { reason: m }), ce) : (await t.api.request("DELETE", v, { reason: m }), d({ deleted: s }));
|
|
1143
1166
|
}));
|
|
1144
1167
|
}
|
|
1168
|
+
// src/tools/change-freezes.ts
|
|
1169
|
+
var K = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i, fe = "GET /api/v1/orgs/{org}/change-freezes", q = (e, t) => f(/* @__PURE__ */ Error(`${e} must be a UUID, not "${t}". See list_change_freezes.`));
|
|
1170
|
+
function pe(e, t) {
|
|
1171
|
+
let r = () => `/api/v1/orgs/${o(t.org)}/change-freezes`;
|
|
1172
|
+
e.registerTool("list_change_freezes", {
|
|
1173
|
+
title: "List change freezes",
|
|
1174
|
+
description: "List change freeze windows, or get one by passing freeze_id. A freeze blocks flag changes in the environments it covers (toggles, targeting, ramps, copies) until it ends; scheduled changes due inside it are held or failed per its policy. Filter by status (Upcoming, Active, Ended) and project. Each window shows its environments, end time, scheduledChangePolicy and the approvals that let scheduled changes through. A single get also returns an etag for manage_change_freeze action=update. Listing and getting work on any plan.",
|
|
1175
|
+
inputSchema: n.object({
|
|
1176
|
+
freeze_id: n.string().optional().describe("Freeze id: get just that window instead of listing"),
|
|
1177
|
+
status: n.enum([
|
|
1178
|
+
"Upcoming",
|
|
1179
|
+
"Active",
|
|
1180
|
+
"Ended"
|
|
1181
|
+
]).optional().describe("Only windows in this state"),
|
|
1182
|
+
project: D.optional().describe("Only windows for this project key (project windows)"),
|
|
1183
|
+
...j
|
|
1184
|
+
}),
|
|
1185
|
+
outputSchema: T(y(fe), y(`${fe}/{id}`)),
|
|
1186
|
+
annotations: { readOnlyHint: !0 }
|
|
1187
|
+
}, async ({ freeze_id: e, status: n, project: i, limit: a, cursor: s }) => p(async () => e !== void 0 && (n !== void 0 || i !== void 0) ? f(/* @__PURE__ */ Error("freeze_id gets one window and cannot be combined with status or project filters")) : e === void 0 ? d(await t.api.request("GET", r(), { query: {
|
|
1188
|
+
status: n,
|
|
1189
|
+
project: i,
|
|
1190
|
+
limit: a,
|
|
1191
|
+
cursor: s
|
|
1192
|
+
} })) : K.test(e) ? d(R(await t.api.requestWithEtag("GET", `${r()}/${o(e)}`))) : q("freeze_id", e))), e.registerTool("manage_change_freeze", {
|
|
1193
|
+
title: "Create, edit, end, or delete a change freeze",
|
|
1194
|
+
description: "Manage change freeze windows. action=create makes a window: name + reason + environments (keys) or all_environments. Give starts_at and ends_at to schedule it; omit starts_at to start at once, and omit ends_at for an open-ended freeze (a scheduled window with starts_at needs ends_at). action=freeze_now starts at once and never takes starts_at; it may leave ends_at open until you end it. Pass project for a project window; omit it for an organization-wide one. scheduled_change_policy: Hold (default) keeps scheduled changes pending until the freeze ends, Fail fails them. action=update needs freeze_id and changes only the fields you pass (accepts ifMatch). action=end stops an active window now. action=delete removes an UPCOMING window. action=approve_scheduled_change (freeze_id + scheduled_change_id + reason) lets one pending scheduled change apply inside the freeze; revoke_approval withdraws it. Creating a window or approving a change needs the Business plan or above (below it, update can only rename, change the reason or shorten); ending, deleting and revoking work on any plan. All need an Admin token.",
|
|
1195
|
+
inputSchema: n.object({
|
|
1196
|
+
action: n.enum([
|
|
1197
|
+
"create",
|
|
1198
|
+
"freeze_now",
|
|
1199
|
+
"update",
|
|
1200
|
+
"end",
|
|
1201
|
+
"delete",
|
|
1202
|
+
"approve_scheduled_change",
|
|
1203
|
+
"revoke_approval"
|
|
1204
|
+
]).describe("create and freeze_now need name + reason + environments or all_environments; update, end and delete need freeze_id; approve_scheduled_change needs freeze_id + scheduled_change_id + reason; revoke_approval needs freeze_id + scheduled_change_id"),
|
|
1205
|
+
freeze_id: n.string().optional().describe("Freeze id (see list_change_freezes)"),
|
|
1206
|
+
name: n.string().optional().describe("Window name, e.g. \"Black Friday code freeze\""),
|
|
1207
|
+
reason: n.string().optional().describe("Why the freeze exists (shown to people it blocks); for approve_scheduled_change, why the change may proceed"),
|
|
1208
|
+
project: D.optional().describe("Project key for a project window; omit for organization-wide"),
|
|
1209
|
+
environments: n.array(n.string()).optional().describe("Environment keys the window covers, e.g. [\"production\"]"),
|
|
1210
|
+
all_environments: n.boolean().optional().describe("Cover every environment instead of listing them"),
|
|
1211
|
+
starts_at: n.string().optional().describe("ISO 8601 UTC start. create only: omit (or use freeze_now) to freeze immediately"),
|
|
1212
|
+
ends_at: n.string().optional().describe("ISO 8601 UTC end. On create: required when scheduling (with starts_at); omitting it with no starts_at makes an open-ended freeze. On update: omitting it leaves the end unchanged."),
|
|
1213
|
+
scheduled_change_policy: n.enum(["Hold", "Fail"]).optional().describe("What happens to scheduled changes that come due inside the window (default Hold)"),
|
|
1214
|
+
scheduled_change_id: n.string().optional().describe("Scheduled change id, for approve_scheduled_change and revoke_approval"),
|
|
1215
|
+
ifMatch: L("list_change_freezes with freeze_id"),
|
|
1216
|
+
idempotency_key: n.string().uuid().optional().describe("Idempotency-Key (a UUID) for create, freeze_now, end and approve_scheduled_change")
|
|
1217
|
+
}),
|
|
1218
|
+
outputSchema: T(y("POST /api/v1/orgs/{org}/change-freezes"), y("PATCH /api/v1/orgs/{org}/change-freezes/{id}"), y("POST /api/v1/orgs/{org}/change-freezes/{id}/approvals"), E({
|
|
1219
|
+
deleted: { type: "string" },
|
|
1220
|
+
etag: I
|
|
1221
|
+
}, ["deleted"])),
|
|
1222
|
+
annotations: { destructiveHint: !0 }
|
|
1223
|
+
}, async (e) => p(async () => {
|
|
1224
|
+
let { action: n, freeze_id: i, name: a, reason: s, project: c, environments: l, all_environments: u, starts_at: p, ends_at: m } = e, h = (e) => f(Error(e));
|
|
1225
|
+
if (n === "create" || n === "freeze_now") {
|
|
1226
|
+
if (n === "freeze_now" && p) return h("freeze_now starts at once; use action=create with starts_at to schedule");
|
|
1227
|
+
if (!a || !s) return h(`action=${n} requires name and reason`);
|
|
1228
|
+
if (!l?.length && !u) return h(`action=${n} requires environments (keys) or all_environments: true`);
|
|
1229
|
+
if (n === "create" && p && !m) return h("a scheduled freeze (starts_at set) requires ends_at; only freeze_now may be open-ended");
|
|
1230
|
+
let i = {
|
|
1231
|
+
name: a,
|
|
1232
|
+
reason: s,
|
|
1233
|
+
project: c,
|
|
1234
|
+
allEnvironments: u ?? (!l?.length && void 0),
|
|
1235
|
+
environmentKeys: l,
|
|
1236
|
+
startsAt: n === "create" ? p : void 0,
|
|
1237
|
+
endsAt: m,
|
|
1238
|
+
scheduledChangePolicy: e.scheduled_change_policy
|
|
1239
|
+
};
|
|
1240
|
+
return d(await t.api.request("POST", r(), {
|
|
1241
|
+
body: me(i),
|
|
1242
|
+
idempotencyKey: e.idempotency_key
|
|
1243
|
+
}));
|
|
1244
|
+
}
|
|
1245
|
+
if (!i) return h(`action=${n} requires freeze_id (see list_change_freezes)`);
|
|
1246
|
+
if (!K.test(i)) return q("freeze_id", i);
|
|
1247
|
+
let g = `${r()}/${o(i)}`;
|
|
1248
|
+
if (n === "update") {
|
|
1249
|
+
if (c !== void 0) return h("a window's project cannot be changed; create a new window instead");
|
|
1250
|
+
let n = me({
|
|
1251
|
+
name: a,
|
|
1252
|
+
reason: s,
|
|
1253
|
+
allEnvironments: u,
|
|
1254
|
+
environmentKeys: l,
|
|
1255
|
+
startsAt: p,
|
|
1256
|
+
endsAt: m,
|
|
1257
|
+
scheduledChangePolicy: e.scheduled_change_policy
|
|
1258
|
+
});
|
|
1259
|
+
return Object.keys(n).length === 0 ? h("action=update needs at least one field to change") : d(R(await t.api.requestWithEtag("PATCH", g, {
|
|
1260
|
+
body: n,
|
|
1261
|
+
ifMatch: e.ifMatch
|
|
1262
|
+
})));
|
|
1263
|
+
}
|
|
1264
|
+
if (n === "end") return d(await t.api.request("POST", `${g}/end`, { idempotencyKey: e.idempotency_key }));
|
|
1265
|
+
if (n === "delete") return await t.api.request("DELETE", g), d({ deleted: i });
|
|
1266
|
+
let _ = e.scheduled_change_id;
|
|
1267
|
+
return _ ? K.test(_) ? n === "approve_scheduled_change" ? s ? d(await t.api.request("POST", `${g}/approvals`, {
|
|
1268
|
+
body: {
|
|
1269
|
+
scheduledChangeId: _,
|
|
1270
|
+
reason: s
|
|
1271
|
+
},
|
|
1272
|
+
idempotencyKey: e.idempotency_key
|
|
1273
|
+
})) : h("action=approve_scheduled_change requires reason") : (await t.api.request("DELETE", `${g}/approvals/${o(_)}`), d({ deleted: _ })) : q("scheduled_change_id", _) : h(`action=${n} requires scheduled_change_id`);
|
|
1274
|
+
}));
|
|
1275
|
+
}
|
|
1276
|
+
function me(e) {
|
|
1277
|
+
return Object.fromEntries(Object.entries(e).filter(([, e]) => e !== void 0));
|
|
1278
|
+
}
|
|
1145
1279
|
// src/tools/rollout-ramps.ts
|
|
1146
|
-
var
|
|
1280
|
+
var J = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i, he = "/api/v1/orgs/{org}/projects/{project}/flags/{flag}/environments/{env}", ge = `GET ${he}/ramps`, _e = `GET ${he}/ramps/{rampId}`, ve = [["PLAN_FEATURE_UNAVAILABLE", "Starting a rollout ramp needs the Team plan or above. A ramp already running keeps running and can still be paused or aborted. An organization Owner can upgrade in Billing."], ["FEATURE_NOT_ENABLED", "Rollout ramps are not enabled for this organization yet. Nothing in the request is wrong, and retrying will not help until they are."]];
|
|
1147
1281
|
function ye(e) {
|
|
1148
1282
|
if (!(e instanceof i)) return;
|
|
1149
1283
|
let t = [e.envelope.message, ...Object.values(e.envelope.fields ?? {}).flat()].join("\n");
|
|
1150
1284
|
return ve.find(([e]) => t.includes(e))?.[1];
|
|
1151
1285
|
}
|
|
1152
|
-
async function
|
|
1286
|
+
async function be(e) {
|
|
1153
1287
|
try {
|
|
1154
1288
|
return await e();
|
|
1155
1289
|
} catch (e) {
|
|
@@ -1157,11 +1291,11 @@ async function H(e) {
|
|
|
1157
1291
|
return n && (t.content[0].text += `\n${n}`), t;
|
|
1158
1292
|
}
|
|
1159
1293
|
}
|
|
1160
|
-
var
|
|
1294
|
+
var Y = (e, t, n) => f(/* @__PURE__ */ Error(`${e} must be an id, not "${t}". See ${n}.`)), xe = 5, Se = n.object({
|
|
1161
1295
|
percent: n.number().int().min(1).max(100).describe("Rollout percentage for this step, 1-100"),
|
|
1162
1296
|
holdMinutes: n.number().int().min(0).max(43200).describe("Minutes to hold at this step before the next one: 5 to 43200 (30 days); 0 to 43200 on the last step")
|
|
1163
1297
|
});
|
|
1164
|
-
function
|
|
1298
|
+
function Ce(e, t) {
|
|
1165
1299
|
let r = (e, n, r) => `/api/v1/orgs/${o(t.org)}/projects/${o(e)}/flags/${o(n)}/environments/${o(r)}`;
|
|
1166
1300
|
e.registerTool("list_rollout_ramps", {
|
|
1167
1301
|
title: "List rollout ramps",
|
|
@@ -1173,14 +1307,14 @@ function xe(e, t) {
|
|
|
1173
1307
|
ramp: n.string().optional().describe("Ramp id: get just that ramp (with its etag) instead of listing"),
|
|
1174
1308
|
...j
|
|
1175
1309
|
}),
|
|
1176
|
-
outputSchema: T(y(
|
|
1310
|
+
outputSchema: T(y(ge), y(_e)),
|
|
1177
1311
|
annotations: { readOnlyHint: !0 }
|
|
1178
|
-
}, async ({ project: e, flag: n, environment: i, ramp: a, limit: s, cursor: c }) =>
|
|
1312
|
+
}, async ({ project: e, flag: n, environment: i, ramp: a, limit: s, cursor: c }) => be(async () => {
|
|
1179
1313
|
let l = `${r(e, n, i)}/ramps`;
|
|
1180
1314
|
return a === void 0 ? d(await t.api.request("GET", l, { query: {
|
|
1181
1315
|
limit: s,
|
|
1182
1316
|
cursor: c
|
|
1183
|
-
} })) :
|
|
1317
|
+
} })) : J.test(a) ? d(R(await t.api.requestWithEtag("GET", `${l}/${o(a)}`))) : Y("ramp", a, "list_rollout_ramps");
|
|
1184
1318
|
})), e.registerTool("manage_rollout_ramp", {
|
|
1185
1319
|
title: "Start, pause, resume, advance, or abort a rollout ramp",
|
|
1186
1320
|
description: "Manage a rollout ramp on a flag in one environment. A ramp raises a percentage rollout step by step: it applies the first step at once, then each next step when the previous hold runs out. Every step is an audited rule change that reaches SDKs over the stream. action=start needs rule + steps: rule is a targeting rule id (from get_targeting) whose rule serves a percentage rollout, or \"default\" for the default rule. Steps (1 to 20) must rise, the first not below the rule's current rollout. A default-rule ramp may name the variation to ramp to (variation id; needed when the default rule has no rollout yet) and bucketBy, and on reaching 100% makes that variation the default. The flag must be on in the environment. action=pause keeps the rest of the hold; action=resume continues from the rule as it stands now; action=advance applies the next step now and needs expectedStepIndex (the currentStepIndex you last saw); action=abort stops the ramp and leaves the rule at percent (0-100, at or below the current one). pause, resume, advance and abort need ramp and accept ifMatch. Editing the rule by hand or turning the flag off pauses a ramp. Starting needs the Team plan or above; every write needs a Member token.",
|
|
@@ -1196,61 +1330,74 @@ function xe(e, t) {
|
|
|
1196
1330
|
flag: O,
|
|
1197
1331
|
environment: k,
|
|
1198
1332
|
rule: n.string().optional().describe("start only: the targeting rule id (see get_targeting), or \"default\" for the default rule"),
|
|
1199
|
-
steps: n.array(
|
|
1333
|
+
steps: n.array(Se).min(1).max(20).optional().describe("start only: the ladder, in rising order"),
|
|
1200
1334
|
variation: n.string().optional().describe("start on rule=\"default\" only: the variation id to ramp to (see get_flag)"),
|
|
1201
1335
|
bucketBy: n.string().optional().describe("start on rule=\"default\" only: the context attribute to bucket by (default: key)"),
|
|
1202
1336
|
ramp: n.string().optional().describe("Ramp id (see list_rollout_ramps); required for every action but start"),
|
|
1203
1337
|
expectedStepIndex: n.number().int().min(0).optional().describe("advance only (required): the currentStepIndex you last saw; a ramp that moved on is refused (409)"),
|
|
1204
1338
|
percent: n.number().int().min(0).max(100).optional().describe("abort only (required): the rollout percentage to leave the rule at"),
|
|
1205
|
-
ifMatch:
|
|
1339
|
+
ifMatch: L("list_rollout_ramps with ramp"),
|
|
1206
1340
|
reason: A,
|
|
1341
|
+
freeze_override: M,
|
|
1207
1342
|
idempotency_key: n.string().optional().describe("Idempotency-Key header for start")
|
|
1208
1343
|
}),
|
|
1209
|
-
outputSchema: C(
|
|
1344
|
+
outputSchema: C(_e, { etag: I }),
|
|
1210
1345
|
annotations: { destructiveHint: !0 }
|
|
1211
|
-
}, async ({ action: e, project: n, flag: i, environment: a, rule: s, steps: c, variation: l, bucketBy: u, ramp: p, expectedStepIndex: m, percent: h, ifMatch: g, reason: _,
|
|
1212
|
-
let
|
|
1213
|
-
if (
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1346
|
+
}, async ({ action: e, project: n, flag: i, environment: a, rule: s, steps: c, variation: l, bucketBy: u, ramp: p, expectedStepIndex: m, percent: h, ifMatch: g, reason: _, freeze_override: v, idempotency_key: y }) => {
|
|
1347
|
+
let b = N(v, _);
|
|
1348
|
+
if (b) return b;
|
|
1349
|
+
let x = [
|
|
1350
|
+
"start",
|
|
1351
|
+
"resume",
|
|
1352
|
+
"advance"
|
|
1353
|
+
].includes(e) ? v : void 0;
|
|
1354
|
+
return be(async () => {
|
|
1355
|
+
let v = r(n, i, a);
|
|
1356
|
+
if (e === "start") {
|
|
1357
|
+
if (!s || !c) return f(/* @__PURE__ */ Error("action=start requires rule and steps"));
|
|
1358
|
+
let e = c.findIndex((e, t) => t < c.length - 1 && e.holdMinutes < xe);
|
|
1359
|
+
if (e >= 0) return f(/* @__PURE__ */ Error(`steps[${e}].holdMinutes must be at least ${xe}: every step but the last holds 5 minutes to 30 days`));
|
|
1360
|
+
let n = c.map(({ percent: e, holdMinutes: t }) => ({
|
|
1361
|
+
percent: e,
|
|
1362
|
+
holdMinutes: t
|
|
1363
|
+
}));
|
|
1364
|
+
return s === "default" ? d(R(await t.api.requestWithEtag("POST", `${v}/default-rule/ramp`, {
|
|
1365
|
+
body: {
|
|
1366
|
+
steps: n,
|
|
1367
|
+
variationId: l ?? null,
|
|
1368
|
+
bucketBy: u ?? null
|
|
1369
|
+
},
|
|
1370
|
+
idempotencyKey: y,
|
|
1371
|
+
reason: _,
|
|
1372
|
+
freezeOverride: x
|
|
1373
|
+
}))) : l !== void 0 || u !== void 0 ? f(/* @__PURE__ */ Error("variation and bucketBy apply only to rule=\"default\"; a rule ramp keeps the rule's own")) : J.test(s) ? d(R(await t.api.requestWithEtag("POST", `${v}/rules/${o(s)}/ramp`, {
|
|
1374
|
+
body: { steps: n },
|
|
1375
|
+
idempotencyKey: y,
|
|
1376
|
+
reason: _,
|
|
1377
|
+
freezeOverride: x
|
|
1378
|
+
}))) : Y("rule", s, "get_targeting, or pass rule=\"default\"");
|
|
1379
|
+
}
|
|
1380
|
+
if (!p) return f(/* @__PURE__ */ Error(`action=${e} requires ramp (see list_rollout_ramps)`));
|
|
1381
|
+
if (!J.test(p)) return Y("ramp", p, "list_rollout_ramps");
|
|
1382
|
+
let b;
|
|
1383
|
+
if (e === "advance") {
|
|
1384
|
+
if (m === void 0) return f(/* @__PURE__ */ Error("action=advance requires expectedStepIndex: the currentStepIndex from list_rollout_ramps"));
|
|
1385
|
+
b = { expectedStepIndex: m };
|
|
1386
|
+
} else if (e === "abort") {
|
|
1387
|
+
if (h === void 0) return f(/* @__PURE__ */ Error("action=abort requires percent: the rollout percentage to leave the rule at"));
|
|
1388
|
+
b = { percent: h };
|
|
1389
|
+
}
|
|
1390
|
+
return d(R(await t.api.requestWithEtag("POST", `${v}/ramps/${o(p)}/${e}`, {
|
|
1391
|
+
body: b,
|
|
1392
|
+
ifMatch: g,
|
|
1393
|
+
reason: _,
|
|
1394
|
+
freezeOverride: x
|
|
1395
|
+
})));
|
|
1396
|
+
});
|
|
1397
|
+
});
|
|
1251
1398
|
}
|
|
1252
1399
|
// src/tools/environment-comparison.ts
|
|
1253
|
-
function
|
|
1400
|
+
function we(e, t) {
|
|
1254
1401
|
let r = (e) => `/api/v1/orgs/${o(t.org)}/projects/${o(e)}`;
|
|
1255
1402
|
e.registerTool("compare_environments", {
|
|
1256
1403
|
title: "Compare environments",
|
|
@@ -1286,11 +1433,14 @@ function Se(e, t) {
|
|
|
1286
1433
|
dry_run: n.boolean().optional().describe("Preview only, change nothing (default true). Pass false to apply, with both ETags from a preview made with the same source and include_state"),
|
|
1287
1434
|
source_etag: n.string().optional().describe("sourceETag from the preview; the apply is refused (412) if the source changed since"),
|
|
1288
1435
|
target_etag: n.string().optional().describe("targetETag from the preview; the apply is refused (412) if the target changed since"),
|
|
1289
|
-
reason: A
|
|
1436
|
+
reason: A,
|
|
1437
|
+
freeze_override: M
|
|
1290
1438
|
}),
|
|
1291
1439
|
outputSchema: S("POST /api/v1/orgs/{org}/projects/{project}/flags/{flag}/environments/{env}/copy"),
|
|
1292
1440
|
annotations: { destructiveHint: !0 }
|
|
1293
|
-
}, async ({ project: e, flag: n, source: i, target: a, include_state: s, dry_run: c, source_etag: l, target_etag: u, reason: p }) => {
|
|
1441
|
+
}, async ({ project: e, flag: n, source: i, target: a, include_state: s, dry_run: c, source_etag: l, target_etag: u, reason: p, freeze_override: m }) => {
|
|
1442
|
+
let h = N(m, p);
|
|
1443
|
+
if (h) return h;
|
|
1294
1444
|
if (c === !1 && (!l || !u)) return {
|
|
1295
1445
|
content: [{
|
|
1296
1446
|
type: "text",
|
|
@@ -1307,7 +1457,8 @@ function Se(e, t) {
|
|
|
1307
1457
|
expectedSourceETag: l,
|
|
1308
1458
|
expectedTargetETag: u
|
|
1309
1459
|
},
|
|
1310
|
-
reason: p
|
|
1460
|
+
reason: p,
|
|
1461
|
+
freezeOverride: m
|
|
1311
1462
|
}));
|
|
1312
1463
|
} catch (e) {
|
|
1313
1464
|
return f(e, { preconditionFailedHint: "The source or target changed since the preview; run copy_flag_config with dry_run: true again, then apply with the new sourceETag/targetETag." });
|
|
@@ -1315,12 +1466,12 @@ function Se(e, t) {
|
|
|
1315
1466
|
});
|
|
1316
1467
|
}
|
|
1317
1468
|
// src/tools/targeting.ts
|
|
1318
|
-
var
|
|
1469
|
+
var Te = n.object({
|
|
1319
1470
|
attribute: n.string().describe("Context attribute name, e.g. plan, country, user_id"),
|
|
1320
1471
|
operator: n.string().describe("OperatorType member name, case-sensitive — e.g. Equals, NotEquals, Contains, In, GreaterThan"),
|
|
1321
1472
|
values: n.array(n.string()),
|
|
1322
1473
|
negate: n.boolean().optional().default(!1)
|
|
1323
|
-
}),
|
|
1474
|
+
}), Ee = n.object({
|
|
1324
1475
|
description: n.string().optional(),
|
|
1325
1476
|
variationId: n.string().optional().describe("Variation served when the rule matches"),
|
|
1326
1477
|
rolloutPercentage: n.number().int().min(0).max(100).optional().describe("Percentage rollout for this rule"),
|
|
@@ -1328,13 +1479,13 @@ var Ce = n.object({
|
|
|
1328
1479
|
userSegmentId: n.string().optional().describe("Match users in this segment (see list_segments)"),
|
|
1329
1480
|
conditionGroups: n.array(n.object({
|
|
1330
1481
|
operator: n.enum(["And", "Or"]).describe("How conditions inside this group combine"),
|
|
1331
|
-
conditions: n.array(
|
|
1482
|
+
conditions: n.array(Te)
|
|
1332
1483
|
})).optional().describe("Groups are ANDed together; conditions inside a group use the group operator")
|
|
1333
|
-
}),
|
|
1484
|
+
}), De = (e) => ({
|
|
1334
1485
|
...e,
|
|
1335
1486
|
conditionGroups: e.conditionGroups ?? []
|
|
1336
1487
|
});
|
|
1337
|
-
function
|
|
1488
|
+
function Oe(e, t) {
|
|
1338
1489
|
let r = (e, n, r) => `/api/v1/orgs/${o(t.org)}/projects/${o(e)}/flags/${o(n)}/environments/${o(r)}/targeting`;
|
|
1339
1490
|
e.registerTool("get_targeting", {
|
|
1340
1491
|
title: "Get targeting rules",
|
|
@@ -1344,25 +1495,26 @@ function we(e, t) {
|
|
|
1344
1495
|
flag: O,
|
|
1345
1496
|
environment: k
|
|
1346
1497
|
}),
|
|
1347
|
-
outputSchema: C("GET /api/v1/orgs/{org}/projects/{project}/flags/{flag}/environments/{env}/targeting", { etag:
|
|
1498
|
+
outputSchema: C("GET /api/v1/orgs/{org}/projects/{project}/flags/{flag}/environments/{env}/targeting", { etag: F }),
|
|
1348
1499
|
annotations: { readOnlyHint: !0 }
|
|
1349
|
-
}, async ({ project: e, flag: n, environment: i }) => p(async () => d(
|
|
1500
|
+
}, async ({ project: e, flag: n, environment: i }) => p(async () => d(R(await t.api.requestWithEtag("GET", r(e, n, i)))))), e.registerTool("update_targeting", {
|
|
1350
1501
|
title: "Replace targeting rules",
|
|
1351
1502
|
description: "REPLACE all targeting rules of a flag in one environment (full PUT — rules not included are removed). Rules are evaluated in order. Get the current rules first with get_targeting. Pass ifMatch (the etag from get_targeting) so rules someone else changed meanwhile are not overwritten.",
|
|
1352
1503
|
inputSchema: n.object({
|
|
1353
1504
|
project: D,
|
|
1354
1505
|
flag: O,
|
|
1355
1506
|
environment: k,
|
|
1356
|
-
rules: n.array(
|
|
1357
|
-
ifMatch:
|
|
1358
|
-
reason: A
|
|
1507
|
+
rules: n.array(Ee).describe("The complete ordered rule list; rules left out are deleted"),
|
|
1508
|
+
ifMatch: L("get_targeting"),
|
|
1509
|
+
reason: A,
|
|
1510
|
+
freeze_override: M
|
|
1359
1511
|
}),
|
|
1360
1512
|
outputSchema: w({
|
|
1361
1513
|
project: { type: "string" },
|
|
1362
1514
|
flag: { type: "string" },
|
|
1363
1515
|
environment: { type: "string" },
|
|
1364
1516
|
rulesReplaced: { type: "integer" },
|
|
1365
|
-
etag:
|
|
1517
|
+
etag: I
|
|
1366
1518
|
}, [
|
|
1367
1519
|
"project",
|
|
1368
1520
|
"flag",
|
|
@@ -1370,20 +1522,21 @@ function we(e, t) {
|
|
|
1370
1522
|
"rulesReplaced"
|
|
1371
1523
|
]),
|
|
1372
1524
|
annotations: { destructiveHint: !0 }
|
|
1373
|
-
}, async ({ project: e, flag: n, environment: i, rules: a, ifMatch: o, reason: s }) => p(async () => {
|
|
1374
|
-
let { etag:
|
|
1375
|
-
body: { rules: a.map(
|
|
1525
|
+
}, async ({ project: e, flag: n, environment: i, rules: a, ifMatch: o, reason: s, freeze_override: c }) => N(c, s) || p(async () => {
|
|
1526
|
+
let { etag: l } = await t.api.requestWithEtag("PUT", r(e, n, i), {
|
|
1527
|
+
body: { rules: a.map(De) },
|
|
1376
1528
|
ifMatch: o,
|
|
1377
|
-
reason: s
|
|
1529
|
+
reason: s,
|
|
1530
|
+
freezeOverride: c
|
|
1378
1531
|
});
|
|
1379
|
-
return d(
|
|
1532
|
+
return d(R({
|
|
1380
1533
|
data: {
|
|
1381
1534
|
project: e,
|
|
1382
1535
|
flag: n,
|
|
1383
1536
|
environment: i,
|
|
1384
1537
|
rulesReplaced: a.length
|
|
1385
1538
|
},
|
|
1386
|
-
etag:
|
|
1539
|
+
etag: l
|
|
1387
1540
|
}));
|
|
1388
1541
|
})), e.registerTool("manage_targeting_rule", {
|
|
1389
1542
|
title: "Add, update, remove, or reorder one targeting rule",
|
|
@@ -1399,9 +1552,10 @@ function we(e, t) {
|
|
|
1399
1552
|
flag: O,
|
|
1400
1553
|
environment: k,
|
|
1401
1554
|
ruleId: n.string().optional().describe("Rule id from get_targeting; required for update and remove"),
|
|
1402
|
-
rule:
|
|
1555
|
+
rule: Ee.optional().describe("Rule fields; required for add and update"),
|
|
1403
1556
|
ruleIds: n.array(n.string()).optional().describe("Every rule id exactly once, in evaluation order; required for reorder"),
|
|
1404
|
-
reason: A
|
|
1557
|
+
reason: A,
|
|
1558
|
+
freeze_override: M
|
|
1405
1559
|
}),
|
|
1406
1560
|
outputSchema: T(y("POST /api/v1/orgs/{org}/projects/{project}/flags/{flag}/environments/{env}/rules"), E({
|
|
1407
1561
|
ruleId: { type: "string" },
|
|
@@ -1411,50 +1565,61 @@ function we(e, t) {
|
|
|
1411
1565
|
items: { type: "string" }
|
|
1412
1566
|
} }, ["reordered"])),
|
|
1413
1567
|
annotations: { destructiveHint: !0 }
|
|
1414
|
-
}, async ({ action: e, project: n, flag: r, environment: i, ruleId: a, rule: s, ruleIds: c, reason: l
|
|
1415
|
-
let
|
|
1416
|
-
if (
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1568
|
+
}, async ({ action: e, project: n, flag: r, environment: i, ruleId: a, rule: s, ruleIds: c, reason: l, freeze_override: u }) => {
|
|
1569
|
+
let m = N(u, l);
|
|
1570
|
+
if (m) return m;
|
|
1571
|
+
let h = u;
|
|
1572
|
+
return p(async () => {
|
|
1573
|
+
let u = `/api/v1/orgs/${o(t.org)}/projects/${o(n)}/flags/${o(r)}/environments/${o(i)}/rules`;
|
|
1574
|
+
if (e === "add") return s ? d(await t.api.request("POST", u, {
|
|
1575
|
+
body: De(s),
|
|
1576
|
+
reason: l,
|
|
1577
|
+
freezeOverride: h
|
|
1578
|
+
})) : f(/* @__PURE__ */ Error("action=add requires rule"));
|
|
1579
|
+
if (e === "reorder") return c ? (await t.api.request("PUT", `${u}/reorder`, {
|
|
1580
|
+
body: { ruleIds: c },
|
|
1581
|
+
reason: l,
|
|
1582
|
+
freezeOverride: h
|
|
1583
|
+
}), d({ reordered: c })) : f(/* @__PURE__ */ Error("action=reorder requires ruleIds (see get_targeting)"));
|
|
1584
|
+
if (!a) return f(/* @__PURE__ */ Error(`action=${e} requires ruleId (see get_targeting)`));
|
|
1585
|
+
let p = `${u}/${o(a)}`;
|
|
1586
|
+
if (e === "update") {
|
|
1587
|
+
if (!s) return f(/* @__PURE__ */ Error("action=update requires rule"));
|
|
1588
|
+
let { data: e, etag: n } = await t.api.requestWithEtag("GET", p), r = s.bucketBy ?? (e.rolloutPercentage == null ? void 0 : e.bucketBy), i = {
|
|
1589
|
+
description: s.description ?? e.description,
|
|
1590
|
+
variationId: s.variationId ?? e.variationId,
|
|
1591
|
+
rolloutPercentage: s.rolloutPercentage ?? e.rolloutPercentage,
|
|
1592
|
+
...r == null ? {} : { bucketBy: r },
|
|
1593
|
+
userSegmentId: s.userSegmentId ?? e.userSegmentId,
|
|
1594
|
+
conditionGroups: s.conditionGroups ?? (e.conditionGroups ?? []).map((e) => ({
|
|
1438
1595
|
operator: e.operator,
|
|
1439
|
-
|
|
1440
|
-
|
|
1596
|
+
conditions: (e.conditions ?? []).map((e) => ({
|
|
1597
|
+
attribute: e.attribute,
|
|
1598
|
+
operator: e.operator,
|
|
1599
|
+
values: e.values,
|
|
1600
|
+
negate: e.negate
|
|
1601
|
+
}))
|
|
1441
1602
|
}))
|
|
1442
|
-
}
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1603
|
+
};
|
|
1604
|
+
return await t.api.request("PUT", p, {
|
|
1605
|
+
body: i,
|
|
1606
|
+
ifMatch: n,
|
|
1607
|
+
reason: l,
|
|
1608
|
+
freezeOverride: h
|
|
1609
|
+
}), d({
|
|
1610
|
+
ruleId: a,
|
|
1611
|
+
updated: !0
|
|
1612
|
+
});
|
|
1613
|
+
}
|
|
1614
|
+
return await t.api.request("DELETE", p, {
|
|
1615
|
+
reason: l,
|
|
1616
|
+
freezeOverride: h
|
|
1617
|
+
}), d({ removed: a });
|
|
1618
|
+
});
|
|
1619
|
+
});
|
|
1455
1620
|
}
|
|
1456
1621
|
// src/tools/variations.ts
|
|
1457
|
-
function
|
|
1622
|
+
function ke(e, t) {
|
|
1458
1623
|
e.registerTool("manage_variation", {
|
|
1459
1624
|
title: "Add, update, or remove a variation",
|
|
1460
1625
|
description: "Manage a flag's variations. action=add requires key + value; action=update/remove require variationId (get ids via get_flag). Removing a variation fails with VARIATION_HAS_DEPENDENTS if other flags depend on it.",
|
|
@@ -1502,8 +1667,8 @@ function Te(e, t) {
|
|
|
1502
1667
|
}));
|
|
1503
1668
|
}
|
|
1504
1669
|
// src/tools/webhooks.ts
|
|
1505
|
-
var
|
|
1506
|
-
function
|
|
1670
|
+
var Ae = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i, X = "Requires an Admin token. A 404 on every webhook call means webhooks are not enabled for the organization.";
|
|
1671
|
+
function je(e) {
|
|
1507
1672
|
let t;
|
|
1508
1673
|
try {
|
|
1509
1674
|
t = new URL(e);
|
|
@@ -1512,13 +1677,13 @@ function Y(e) {
|
|
|
1512
1677
|
}
|
|
1513
1678
|
return t.protocol === "https:" && t.port === "" && !t.username && !t.password && t.hostname === "hooks.slack.com" && t.pathname.startsWith("/services/");
|
|
1514
1679
|
}
|
|
1515
|
-
var
|
|
1516
|
-
function
|
|
1680
|
+
var Me = "url is a Slack incoming webhook URL. Slack rejects the generic JSON payload, so every delivery would fail. Create the subscription with provider: \"Slack\" instead.";
|
|
1681
|
+
function Ne(e, t) {
|
|
1517
1682
|
let r = `/api/v1/orgs/${o(t.org)}/webhooks`, i = (e) => `${r}/${o(e)}`;
|
|
1518
1683
|
async function a(e) {
|
|
1519
1684
|
let n = [];
|
|
1520
1685
|
for (let r of e) {
|
|
1521
|
-
if (
|
|
1686
|
+
if (Ae.test(r)) {
|
|
1522
1687
|
n.push(r);
|
|
1523
1688
|
continue;
|
|
1524
1689
|
}
|
|
@@ -1530,7 +1695,7 @@ function Ee(e, t) {
|
|
|
1530
1695
|
}
|
|
1531
1696
|
async function s(e) {
|
|
1532
1697
|
let n = e.map((e) => {
|
|
1533
|
-
if (
|
|
1698
|
+
if (Ae.test(e)) return { id: e };
|
|
1534
1699
|
let t = e.indexOf("/"), n = e.slice(0, t), r = e.slice(t + 1);
|
|
1535
1700
|
if (t < 0 || !n || !r) throw Error(`Environment "${e}" needs its project: pass "<project>/<environment>", e.g. "web/production", or the environment's id.`);
|
|
1536
1701
|
return {
|
|
@@ -1551,7 +1716,7 @@ function Ee(e, t) {
|
|
|
1551
1716
|
}
|
|
1552
1717
|
e.registerTool("list_webhooks", {
|
|
1553
1718
|
title: "List webhook subscriptions",
|
|
1554
|
-
description: "List the organization's outbound webhook subscriptions (url, event/project/environment filters, enabled state, failure count, signing secret ids — never secret values), plus availableEventTypes: the event types a subscription can filter on. Empty filter lists mean \"all\". Paginated via cursor. " +
|
|
1719
|
+
description: "List the organization's outbound webhook subscriptions (url, event/project/environment filters, enabled state, failure count, signing secret ids — never secret values), plus availableEventTypes: the event types a subscription can filter on. Empty filter lists mean \"all\". Paginated via cursor. " + X,
|
|
1555
1720
|
inputSchema: n.object({ ...j }),
|
|
1556
1721
|
outputSchema: C("GET /api/v1/orgs/{org}/webhooks", { availableEventTypes: {
|
|
1557
1722
|
type: "array",
|
|
@@ -1570,7 +1735,7 @@ function Ee(e, t) {
|
|
|
1570
1735
|
});
|
|
1571
1736
|
})), e.registerTool("list_webhook_deliveries", {
|
|
1572
1737
|
title: "List webhook deliveries",
|
|
1573
|
-
description: "List one subscription's delivery attempts, most recent first. status is Pending (awaiting an attempt, backing off, or in flight), Succeeded or DeadLettered; lastResponseStatusCode and lastError explain a failure. Paginated via cursor. " +
|
|
1738
|
+
description: "List one subscription's delivery attempts, most recent first. status is Pending (awaiting an attempt, backing off, or in flight), Succeeded or DeadLettered; lastResponseStatusCode and lastError explain a failure. Paginated via cursor. " + X,
|
|
1574
1739
|
inputSchema: n.object({
|
|
1575
1740
|
id: n.string().describe("Subscription id (from list_webhooks)"),
|
|
1576
1741
|
...j
|
|
@@ -1582,7 +1747,7 @@ function Ee(e, t) {
|
|
|
1582
1747
|
cursor: r
|
|
1583
1748
|
} })))), e.registerTool("manage_webhook", {
|
|
1584
1749
|
title: "Create, update, or delete a webhook subscription, or rotate its secret",
|
|
1585
|
-
description: "action=create requires name + url and returns the signing secret. action=update/delete/rotate_secret/retire_secret require id. provider (create only, default GenericHttp) is the destination type: a Slack incoming webhook URL (https://hooks.slack.com/services/...) needs provider: \"Slack\", which posts readable channel messages; provider: \"Datadog\" sends Events API change events (url is your site's https://event-management-intake.<site>/api/v2/events) and provider: \"Grafana\" creates annotations (url is https://<your grafana>/api/annotations). Datadog and Grafana require credential (a Datadog API key, or a Grafana service account token that can create annotations, e.g. Editor); GenericHttp and Slack refuse it. credential is write-only: stored encrypted, never returned, and never echoed in this tool's output. A subscription's provider can never change. update changes only the fields you pass and keeps the rest; pass an empty list to widen that filter back to \"all\". projects take project keys or ids; environments take \"<project>/<environment>\" keys (e.g. \"web/production\") or ids. eventTypes come from list_webhooks → availableEventTypes. create and rotate_secret return a secret that is NEVER shown again: relay it to the user verbatim so they can store it (for a GenericHttp subscription only: Slack, Datadog and Grafana never check it, so skip it there). Slack doesn't verify signatures, so a Slack subscription's secret is unused and rotate_secret is refused for one, and so are Datadog and Grafana ones, which authenticate with credential instead. On update, omit credential to keep the stored one; changing the url of a Datadog or Grafana subscription requires sending credential again. rotate_secret adds a new active secret while the old one keeps signing; retire_secret (secretId from list_webhooks) removes one and is refused for the last active secret. A project-restricted service token must list at least one project, all in its scope. " +
|
|
1750
|
+
description: "action=create requires name + url and returns the signing secret. action=update/delete/rotate_secret/retire_secret require id. provider (create only, default GenericHttp) is the destination type: a Slack incoming webhook URL (https://hooks.slack.com/services/...) needs provider: \"Slack\", which posts readable channel messages; provider: \"Datadog\" sends Events API change events (url is your site's https://event-management-intake.<site>/api/v2/events) and provider: \"Grafana\" creates annotations (url is https://<your grafana>/api/annotations). Datadog and Grafana require credential (a Datadog API key, or a Grafana service account token that can create annotations, e.g. Editor); GenericHttp and Slack refuse it. credential is write-only: stored encrypted, never returned, and never echoed in this tool's output. A subscription's provider can never change. update changes only the fields you pass and keeps the rest; pass an empty list to widen that filter back to \"all\". projects take project keys or ids; environments take \"<project>/<environment>\" keys (e.g. \"web/production\") or ids. eventTypes come from list_webhooks → availableEventTypes. create and rotate_secret return a secret that is NEVER shown again: relay it to the user verbatim so they can store it (for a GenericHttp subscription only: Slack, Datadog and Grafana never check it, so skip it there). Slack doesn't verify signatures, so a Slack subscription's secret is unused and rotate_secret is refused for one, and so are Datadog and Grafana ones, which authenticate with credential instead. On update, omit credential to keep the stored one; changing the url of a Datadog or Grafana subscription requires sending credential again. rotate_secret adds a new active secret while the old one keeps signing; retire_secret (secretId from list_webhooks) removes one and is refused for the last active secret. A project-restricted service token must list at least one project, all in its scope. " + X,
|
|
1586
1751
|
inputSchema: n.object({
|
|
1587
1752
|
action: n.enum([
|
|
1588
1753
|
"create",
|
|
@@ -1636,7 +1801,7 @@ function Ee(e, t) {
|
|
|
1636
1801
|
if (e === "create") {
|
|
1637
1802
|
if (!c || !l) return f(/* @__PURE__ */ Error("action=create requires name and url"));
|
|
1638
1803
|
let e = u ?? "GenericHttp";
|
|
1639
|
-
if (e === "GenericHttp" &&
|
|
1804
|
+
if (e === "GenericHttp" && je(l)) return f(/* @__PURE__ */ Error(Me));
|
|
1640
1805
|
let n = _ && await s(_), i = g && await a(g);
|
|
1641
1806
|
return d(await t.api.request("POST", r, {
|
|
1642
1807
|
body: {
|
|
@@ -1654,7 +1819,7 @@ function Ee(e, t) {
|
|
|
1654
1819
|
if (!n) return f(/* @__PURE__ */ Error(`action=${e} requires id (see list_webhooks)`));
|
|
1655
1820
|
if (e === "update") {
|
|
1656
1821
|
let e = _ && await s(_), r = g && await a(g), { data: o, etag: u } = await t.api.requestWithEtag("GET", i(n));
|
|
1657
|
-
if (l && o.provider === "GenericHttp" &&
|
|
1822
|
+
if (l && o.provider === "GenericHttp" && je(l)) return f(/* @__PURE__ */ Error(`${Me} This subscription is GenericHttp, and a provider can't change.`));
|
|
1658
1823
|
let p = {
|
|
1659
1824
|
name: c ?? o.name,
|
|
1660
1825
|
url: l ?? o.url,
|
|
@@ -1686,7 +1851,7 @@ function Ee(e, t) {
|
|
|
1686
1851
|
})) : f(/* @__PURE__ */ Error("action=retire_secret requires secretId (see list_webhooks)"));
|
|
1687
1852
|
})), e.registerTool("deliver_webhook", {
|
|
1688
1853
|
title: "Send a test event or redeliver",
|
|
1689
|
-
description: "action=test queues one synthetic flag.toggled event to this subscription alone; action=redeliver (deliveryId from list_webhook_deliveries) re-sends a finished delivery, restarting its retry schedule. Delivery is asynchronous: read list_webhook_deliveries for the outcome. Both are refused for a disabled subscription, and redeliver for a delivery that is still Pending. " +
|
|
1854
|
+
description: "action=test queues one synthetic flag.toggled event to this subscription alone; action=redeliver (deliveryId from list_webhook_deliveries) re-sends a finished delivery, restarting its retry schedule. Delivery is asynchronous: read list_webhook_deliveries for the outcome. Both are refused for a disabled subscription, and redeliver for a delivery that is still Pending. " + X,
|
|
1690
1855
|
inputSchema: n.object({
|
|
1691
1856
|
action: n.enum(["test", "redeliver"]).describe("test sends a synthetic event; redeliver re-sends deliveryId"),
|
|
1692
1857
|
id: n.string().describe("Subscription id (from list_webhooks)"),
|
|
@@ -1706,15 +1871,15 @@ function Ee(e, t) {
|
|
|
1706
1871
|
})) : f(/* @__PURE__ */ Error("action=redeliver requires deliveryId (see list_webhook_deliveries)"))));
|
|
1707
1872
|
}
|
|
1708
1873
|
// src/tools/workflows/stale-flags.ts
|
|
1709
|
-
var
|
|
1710
|
-
function
|
|
1874
|
+
var Pe = n.enum(["dead", "stale"]), Z = 50;
|
|
1875
|
+
function Fe(e, t) {
|
|
1711
1876
|
e.registerTool("find_stale_flags", {
|
|
1712
1877
|
title: "Find stale flags",
|
|
1713
1878
|
description: `Find flags that look ready for code cleanup: not updated in N days AND either enabled in every environment (verify rollout is complete before removing — per-rule percentage ramps are not inspected) or disabled in every environment (dead — remove flag and code path). A flag whose expiry date (set_flag_expiry) has passed is always a candidate, however recently it was edited; if it is on in some environments and off in others its reason is past-expiry, meaning the owner has to decide which way to fold it. A project can give its temporary flags a default lifetime, so a flag with no date of its own can still be past expiry. Every result carries expiresAtUtc (the date set on the flag), effectiveExpiresAtUtc (the date in effect, from the flag or its project default), expirySource (explicit, project-default, or null), expired and owner (null when unowned). Flags marked permanent (kill switches, ops toggles) are never listed. Pass owner to see one person's stale flags ("me" for your own) or "none" for the unowned ones. Every result also carries blockedBy: the live flags that still list it as a prerequisite, which have to be removed and archived before it ([] when none). blockedBy is null when the server did not classify the flag as a removal candidate, which means unknown, not unblocked. A flag that other live flags list as a prerequisite has to be removed LAST, dependents first: archiving it while a dependent still names it makes that dependent fail its prerequisite check and serve its off variation, so archive_flag refuses it with FLAG_HAS_DEPENDENTS. Checks at most ${Z} candidates per call, expired flags first.`,
|
|
1714
1879
|
inputSchema: n.object({
|
|
1715
1880
|
project: D,
|
|
1716
1881
|
days: n.number().int().min(1).optional().default(30).describe("Minimum age in days since last update"),
|
|
1717
|
-
owner:
|
|
1882
|
+
owner: z
|
|
1718
1883
|
}),
|
|
1719
1884
|
outputSchema: w({
|
|
1720
1885
|
project: { type: "string" },
|
|
@@ -1759,7 +1924,7 @@ function Oe(e, t) {
|
|
|
1759
1924
|
]),
|
|
1760
1925
|
annotations: { readOnlyHint: !0 }
|
|
1761
1926
|
}, async ({ project: e, days: n, owner: r }) => p(async () => {
|
|
1762
|
-
let a = await
|
|
1927
|
+
let a = await B(t, r), s = `/api/v1/orgs/${o(t.org)}/projects/${o(e)}/flags`, c = Date.now(), l = c - n * 24 * 60 * 60 * 1e3, u = (e) => e.effectiveExpiresAtUtc ?? e.expiresAtUtc ?? null, f = (e) => e.expirySource ?? (e.expiresAtUtc ? "explicit" : null), p = (e) => {
|
|
1763
1928
|
let t = u(e);
|
|
1764
1929
|
return !!t && new Date(t).getTime() <= c;
|
|
1765
1930
|
}, m = [], h;
|
|
@@ -1825,7 +1990,7 @@ function Oe(e, t) {
|
|
|
1825
1990
|
description: "List the flags the server is confident can be removed from code, the same list the Featureflip flag cleanup GitHub Action works from. Each item has key, reason, status (Dead or Stale), treatment (true = keep the on-branch, false = keep the off-branch) and blockedBy: the live flags that still list it as a prerequisite. Only remove a flag whose blockedBy is empty. A flag that other live flags list as a prerequisite has to be removed LAST, dependents first: archiving it while a dependent still names it makes that dependent fail its prerequisite check and serve its off variation, so archive_flag refuses it with FLAG_HAS_DEPENDENTS. staleness \"dead\" (the default) returns only dead flags, \"stale\" adds stale ones. Paginated via cursor.",
|
|
1826
1991
|
inputSchema: n.object({
|
|
1827
1992
|
project: D,
|
|
1828
|
-
staleness:
|
|
1993
|
+
staleness: Pe.optional().describe("Minimum staleness tier: dead (default) or stale"),
|
|
1829
1994
|
...j
|
|
1830
1995
|
}),
|
|
1831
1996
|
outputSchema: S("GET /api/v1/orgs/{org}/projects/{project}/flags/removal-candidates"),
|
|
@@ -1833,7 +1998,7 @@ function Oe(e, t) {
|
|
|
1833
1998
|
}, async ({ project: e, ...n }) => p(async () => d(await t.api.request("GET", `/api/v1/orgs/${o(t.org)}/projects/${o(e)}/flags/removal-candidates`, { query: n }))));
|
|
1834
1999
|
}
|
|
1835
2000
|
// src/tools/workflows/snippets.ts
|
|
1836
|
-
var
|
|
2001
|
+
var Ie = [
|
|
1837
2002
|
"js",
|
|
1838
2003
|
"node",
|
|
1839
2004
|
"browser",
|
|
@@ -1845,16 +2010,16 @@ var ke = [
|
|
|
1845
2010
|
"php",
|
|
1846
2011
|
"ruby",
|
|
1847
2012
|
"swift"
|
|
1848
|
-
],
|
|
2013
|
+
], Le = [
|
|
1849
2014
|
"browser",
|
|
1850
2015
|
"react",
|
|
1851
2016
|
"swift"
|
|
1852
2017
|
];
|
|
1853
|
-
function
|
|
1854
|
-
return
|
|
2018
|
+
function Re(e) {
|
|
2019
|
+
return Le.includes(e);
|
|
1855
2020
|
}
|
|
1856
2021
|
var Q = "Uses a SERVER-side SDK key (Featureflip dashboard → environment → SDK keys).", $ = "Uses a CLIENT-side SDK key (safe to ship to browsers/apps).";
|
|
1857
|
-
function
|
|
2022
|
+
function ze(e, t) {
|
|
1858
2023
|
switch (e) {
|
|
1859
2024
|
case "js": return {
|
|
1860
2025
|
install: "npm install @featureflip/js",
|
|
@@ -2003,7 +2168,7 @@ if enabled {
|
|
|
2003
2168
|
}
|
|
2004
2169
|
}
|
|
2005
2170
|
// src/tools/workflows/wrap-feature.ts
|
|
2006
|
-
function
|
|
2171
|
+
function Be(e, t) {
|
|
2007
2172
|
e.registerTool("wrap_feature", {
|
|
2008
2173
|
title: "Wrap a feature in a new flag",
|
|
2009
2174
|
description: "Create a Boolean feature flag and get back the SDK code snippet to guard the new code path with it. Returns the snippet only — apply the edit yourself. The flag starts DISABLED in every environment; enable it with toggle_flag when ready.",
|
|
@@ -2013,7 +2178,7 @@ function Ne(e, t) {
|
|
|
2013
2178
|
name: n.string().optional().describe("Display name; defaults to the key"),
|
|
2014
2179
|
description: n.string().optional().describe("What this flag guards"),
|
|
2015
2180
|
tags: n.array(n.string()).optional().describe("Tags for filtering, e.g. team or area"),
|
|
2016
|
-
language: n.enum(
|
|
2181
|
+
language: n.enum(Ie).describe("SDK language of the codebase being edited"),
|
|
2017
2182
|
idempotency_key: n.string().optional().describe("Idempotency-Key header for safe retries")
|
|
2018
2183
|
}),
|
|
2019
2184
|
outputSchema: w({
|
|
@@ -2042,10 +2207,10 @@ function Ne(e, t) {
|
|
|
2042
2207
|
type: "Boolean",
|
|
2043
2208
|
description: i,
|
|
2044
2209
|
tags: a,
|
|
2045
|
-
...
|
|
2210
|
+
...Re(s) ? { clientSideVisible: !0 } : {}
|
|
2046
2211
|
},
|
|
2047
2212
|
idempotencyKey: c
|
|
2048
|
-
}), u =
|
|
2213
|
+
}), u = ze(s, n);
|
|
2049
2214
|
return d({
|
|
2050
2215
|
flag: l,
|
|
2051
2216
|
integration: {
|
|
@@ -2063,16 +2228,16 @@ function Ne(e, t) {
|
|
|
2063
2228
|
}));
|
|
2064
2229
|
}
|
|
2065
2230
|
// src/server.ts
|
|
2066
|
-
function
|
|
2231
|
+
function Ve(t) {
|
|
2067
2232
|
let n = new e({
|
|
2068
2233
|
name: "featureflip",
|
|
2069
2234
|
version: r
|
|
2070
2235
|
});
|
|
2071
|
-
return ee(n, t), te(n, t), ne(n, t), re(n, t),
|
|
2236
|
+
return ee(n, t), te(n, t), ne(n, t), re(n, t), ie(n, t), oe(n, t), de(n, t), Ce(n, t), pe(n, t), we(n, t), Oe(n, t), ke(n, t), Ne(n, t), Fe(n, t), Be(n, t), n;
|
|
2072
2237
|
}
|
|
2073
2238
|
// src/config.ts
|
|
2074
|
-
var
|
|
2075
|
-
function
|
|
2239
|
+
var He = "FEATUREFLIP_TOKEN is required. Create one in the Featureflip dashboard — Settings → API Tokens (personal token, ffp_...) or Organization Settings → Service Tokens (ffs_...) — and set it in your MCP client config.";
|
|
2240
|
+
function Ue(e = process.env) {
|
|
2076
2241
|
let t = e.FEATUREFLIP_TOKEN?.trim();
|
|
2077
2242
|
return t ? {
|
|
2078
2243
|
token: t,
|
|
@@ -2080,13 +2245,13 @@ function Ie(e = process.env) {
|
|
|
2080
2245
|
org: e.FEATUREFLIP_ORG?.trim() || void 0
|
|
2081
2246
|
} : null;
|
|
2082
2247
|
}
|
|
2083
|
-
function
|
|
2084
|
-
let t =
|
|
2085
|
-
if (!t) throw Error(
|
|
2248
|
+
function We(e = process.env) {
|
|
2249
|
+
let t = Ue(e);
|
|
2250
|
+
if (!t) throw Error(He);
|
|
2086
2251
|
return t;
|
|
2087
2252
|
}
|
|
2088
2253
|
// src/org.ts
|
|
2089
|
-
async function
|
|
2254
|
+
async function Ge(e, t) {
|
|
2090
2255
|
if (t) return t;
|
|
2091
2256
|
let n = (await e.request("GET", "/api/v1/orgs", { query: { limit: 100 } })).items ?? [];
|
|
2092
2257
|
if (n.length === 1) {
|
|
@@ -2096,4 +2261,4 @@ async function Re(e, t) {
|
|
|
2096
2261
|
}
|
|
2097
2262
|
throw n.length === 0 ? Error("The token can see no organizations. Check the token in the Featureflip dashboard.") : Error(`The token can see ${n.length} organizations — set FEATUREFLIP_ORG to one of: ` + n.map((e) => e.slug ?? "?").join(", "));
|
|
2098
2263
|
}
|
|
2099
|
-
export {
|
|
2264
|
+
export { Ve as a, r as c, Ue as i, He as n, i as o, We as r, u as s, Ge as t };
|