@productcraft/flags 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/README.md +35 -0
  2. package/api.md +110 -18
  3. package/dist/browser/{chunk-4LRAE3F3.js → chunk-OOX7EUCT.js} +114 -22
  4. package/dist/browser/chunk-OOX7EUCT.js.map +1 -0
  5. package/dist/browser/{chunk-72WU42RU.js → chunk-WUZAG2E3.js} +11 -4
  6. package/dist/browser/chunk-WUZAG2E3.js.map +1 -0
  7. package/dist/browser/{chunk-FXZVXQ75.cjs → chunk-XZK57G7L.cjs} +114 -22
  8. package/dist/browser/chunk-XZK57G7L.cjs.map +1 -0
  9. package/dist/browser/{chunk-4XCQBTYE.cjs → chunk-YM5K4NHA.cjs} +11 -4
  10. package/dist/browser/chunk-YM5K4NHA.cjs.map +1 -0
  11. package/dist/browser/index.cjs +8 -8
  12. package/dist/browser/index.js +2 -2
  13. package/dist/browser/management.cjs +2 -2
  14. package/dist/browser/management.js +1 -1
  15. package/dist/browser/testing.cjs +3 -3
  16. package/dist/browser/testing.cjs.map +1 -1
  17. package/dist/browser/testing.js +1 -1
  18. package/dist/browser/testing.js.map +1 -1
  19. package/dist/{chunk-TSRLPHJ5.js → chunk-CGVDMKEE.js} +12 -5
  20. package/dist/chunk-CGVDMKEE.js.map +1 -0
  21. package/dist/{chunk-QTDMUNLG.cjs → chunk-L3AOANTB.cjs} +12 -5
  22. package/dist/chunk-L3AOANTB.cjs.map +1 -0
  23. package/dist/{chunk-WI4EZXOV.cjs → chunk-RJIVAOBG.cjs} +114 -22
  24. package/dist/chunk-RJIVAOBG.cjs.map +1 -0
  25. package/dist/{chunk-2YRDLKNB.js → chunk-XNJ5OX4X.js} +114 -22
  26. package/dist/chunk-XNJ5OX4X.js.map +1 -0
  27. package/dist/{client-K2zALPGD.d.cts → client-BBiIKiGW.d.cts} +18 -14
  28. package/dist/{client-K2zALPGD.d.ts → client-BBiIKiGW.d.ts} +18 -14
  29. package/dist/{client-bVEJfS6_.d.cts → client-BWi7PASW.d.cts} +1091 -45
  30. package/dist/{client-bVEJfS6_.d.ts → client-BWi7PASW.d.ts} +1091 -45
  31. package/dist/index.cjs +8 -8
  32. package/dist/index.d.cts +3 -3
  33. package/dist/index.d.ts +3 -3
  34. package/dist/index.js +2 -2
  35. package/dist/management.cjs +2 -2
  36. package/dist/management.d.cts +1 -1
  37. package/dist/management.d.ts +1 -1
  38. package/dist/management.js +1 -1
  39. package/dist/testing.cjs +3 -3
  40. package/dist/testing.cjs.map +1 -1
  41. package/dist/testing.d.cts +3 -3
  42. package/dist/testing.d.ts +3 -3
  43. package/dist/testing.js +1 -1
  44. package/dist/testing.js.map +1 -1
  45. package/manifest.json +1 -1
  46. package/package.json +2 -2
  47. package/dist/browser/chunk-4LRAE3F3.js.map +0 -1
  48. package/dist/browser/chunk-4XCQBTYE.cjs.map +0 -1
  49. package/dist/browser/chunk-72WU42RU.js.map +0 -1
  50. package/dist/browser/chunk-FXZVXQ75.cjs.map +0 -1
  51. package/dist/chunk-2YRDLKNB.js.map +0 -1
  52. package/dist/chunk-QTDMUNLG.cjs.map +0 -1
  53. package/dist/chunk-TSRLPHJ5.js.map +0 -1
  54. package/dist/chunk-WI4EZXOV.cjs.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/_generated/resources.ts","../src/_generated/types.ts","../src/_generated/client.ts"],"names":["Flags"],"mappings":";;;;;AAkBA,SAAS,SAAA,CAAa,QAAW,KAAA,EAAiB;AAChD,EAAA,IAAI,KAAA,CAAM,QAAA,KAAa,MAAA,EAAW,OAAO,MAAA;AACzC,EAAA,MAAM,CAAA,GAAK,UAAU,EAAC;AACtB,EAAA,OAAQ,CAAA,CAAE,aAAa,MAAA,GAAY,EAAE,GAAG,CAAA,EAAG,QAAA,EAAU,KAAA,CAAM,QAAA,EAAS,GAAI,CAAA;AAC1E;AAEO,IAAM,cAAN,MAAkB;AAAA,EAC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AA,qBAAA,GAA0B,qBAAA;AAEhC,EAAMA,OAAA,UAAA,GAAe,UAAA;AAErB,EAAMA,OAAA,qBAAA,GAA0B,qBAAA;AAEhC,EAAMA,OAAA,6BAAA,GAAkC,6BAAA;AAExC,EAAMA,OAAA,qBAAA,GAA0B,qBAAA;AAEhC,EAAMA,OAAA,kBAAA,GAAuB,kBAAA;AAE7B,EAAMA,OAAA,gBAAA,GAAqB,gBAAA;AAAA,CAAA,EAzDnB,KAAA,KAAA,KAAA,GAAA,EAAA,CAAA,CAAA","file":"chunk-2YRDLKNB.js","sourcesContent":["// Generated by scripts/gen-sdk.mjs from Specs/flags.json. Do not edit.\n\nimport type { APIClient, APIPromise, PagePromise, PollOptions, RequestOptions } from \"@productcraft/core\";\nimport type * as T from \"./types.js\";\nimport type { UnwrapWebhookEvent, WebhookSignParams, WebhookUnwrapParams } from \"./webhooks.js\";\nimport type { SignedWebhook } from \"@productcraft/core\";\n\ntype Bound = Readonly<Record<string, string | undefined>>;\n\n/** Split params into [picked, rest] by key. */\nfunction split(params: object | undefined, keys: readonly string[]): [Record<string, unknown>, Record<string, unknown>] {\n const picked: Record<string, unknown> = {};\n const rest: Record<string, unknown> = {};\n for (const [k, v] of Object.entries(params ?? {})) (keys.includes(k) ? picked : rest)[k] = v;\n return [picked, rest];\n}\n\n/** Fill `actor_id` from a scope bound with `.as(actorId)`, unless the call passes one. */\nfunction fillActor<P>(params: P, bound: Bound): P {\n if (bound.actor_id === undefined) return params;\n const p = (params ?? {}) as Record<string, unknown>;\n return (p.actor_id === undefined ? { ...p, actor_id: bound.actor_id } : p) as P;\n}\n\nexport class APIResource {\n protected readonly _client: APIClient;\n /** Path parameters (and `actor_id`) bound by the enclosing scope. */\n protected readonly _b: Bound;\n constructor(client: APIClient, bound: Bound = {}) {\n this._client = client;\n this._b = bound;\n }\n}\n\nvoid split;\nvoid fillActor;\n/** `changes` */\nexport class ChangesResource extends APIResource {\n /**\n * Get a change\n *\n * One change with `before`, `after`, a JSON Patch `diff` (RFC 6902) and the summary. When `before` and `after` together exceed 64 KB, `diff_too_large` is true and the bodies are left out: compare the revisions in `revisions` (`url`, `previous_url`) instead.\n *\n * @param changeId - Id of the change.\n * @param options - Per-request options.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`).\n * @throws {NotFoundError} 404 NOT_FOUND, CHANGE_NOT_FOUND: `CHANGE_NOT_FOUND`: no such change in this workspace (or it was pruned).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/changes/{change_id}\n * @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-changes-change-id\n * @example\n * ```ts\n * const changeDetail = await flags.changes.retrieve(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");\n * ```\n */\n retrieve(changeId: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.ChangeDetail>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/changes/{change_id}\", pathParams: { change_id: changeId } }, options);\n }\n /**\n * Restore a version\n *\n * Writes the change's `before` back as a new change (`reverts_change_id` points to this one), through the same checks as an edit: validation, the protected-environment and note rules, and publishing. Supported for `setting_value.updated`, `segment.updated` and `setting.updated`. Send the entity's current `version` (the value or segment); a setting is restored only while it is still as this change left it. Needs `flags.value.update` plus what the original edit needed (`flags.value.update` on the environment and setting, or `flags.update`; `flags.protected.update` in protected environments).\n *\n * @param changeId - Id of the change.\n * @param params - `Flags.ChangeRevertParams`.\n * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: `version` is missing (value and segment restores) or invalid.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`). A restore needs the actions of the original edit too.\n * @throws {NotFoundError} 404 NOT_FOUND, CHANGE_NOT_FOUND, SETTING_NOT_FOUND, SEGMENT_NOT_FOUND, ENVIRONMENT_NOT_FOUND: `CHANGE_NOT_FOUND`; `SETTING_NOT_FOUND`, `SEGMENT_NOT_FOUND` or `ENVIRONMENT_NOT_FOUND` when the entity was deleted since.\n * @throws {ConflictError} 409 CONFLICT, VERSION_CONFLICT, KEY_ALREADY_EXISTS, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: `VERSION_CONFLICT`: the entity changed since you read it (`details.current_version`), or the setting no longer matches this change. `KEY_ALREADY_EXISTS`: the restored key is taken. Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, REVERT_NOT_SUPPORTED, NOTHING_TO_RESTORE, INVALID_VALUE, INVALID_TARGETING, SEGMENT_NOT_FOUND, PREREQUISITE_NOT_FOUND, PREREQUISITE_TYPE_MISMATCH, CIRCULAR_PREREQUISITE, CONFIDENTIAL_LIST_NOT_EDITABLE, LIMIT_EXCEEDED, NOTE_REQUIRED, CONFIG_TOO_LARGE, OWNER_NOT_A_MEMBER: `REVERT_NOT_SUPPORTED`: this kind of change cannot be restored. `NOTHING_TO_RESTORE`: it already matches the version before this change. The restored or copied targeting is refused by the normal write checks: `INVALID_VALUE`, `INVALID_TARGETING`, `SEGMENT_NOT_FOUND` (a segment it used was deleted), `PREREQUISITE_NOT_FOUND`, `PREREQUISITE_TYPE_MISMATCH`, `CIRCULAR_PREREQUISITE`, `CONFIDENTIAL_LIST_NOT_EDITABLE`, `LIMIT_EXCEEDED`, `NOTE_REQUIRED` (the environment requires a `note`), `CONFIG_TOO_LARGE`, or `OWNER_NOT_A_MEMBER` (a restored owner left the workspace).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/changes/{change_id}/revert\n * @see https://productcraft.co/docs/flags/api-reference#post-v1-workspaces-workspace-id-changes-change-id-revert\n * @example\n * ```ts\n * const changeDetail = await flags.changes.revert(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", { note: \"Roll back FLAG-142\" });\n * ```\n */\n revert(changeId: string, params?: T.ChangeRevertParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.ChangeDetail>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/changes/{change_id}/revert\", pathParams: { change_id: changeId }, body: params, idempotent: true }, options);\n }\n}\n\n/** `configs.environments.revisions` */\nexport class ConfigsEnvironmentsRevisionsResource extends APIResource {\n /**\n * List config revisions\n *\n * Published revisions of the config in one environment, newest first. Every write that changes what SDKs download publishes a revision; edits that do not (a description, a name) do not. The last 100 revisions, or 20 MiB of compressed snapshots, are kept, and the current one always.\n *\n * @param configId - Id of the config.\n * @param environmentId - Id of an environment of the same project.\n * @param params - `Flags.ConfigEnvironmentRevisionListParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a bad cursor or `limit`.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`).\n * @throws {NotFoundError} 404 NOT_FOUND, CONFIG_NOT_FOUND, ENVIRONMENT_NOT_FOUND: `CONFIG_NOT_FOUND` or `ENVIRONMENT_NOT_FOUND`: no such config in this workspace, or the environment is not one of its project.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/revisions\n * @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-configs-config-id-environments-environment-id-revisions\n * @example\n * ```ts\n * for await (const revision of flags.configs.environments.revisions.list(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", \"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\")) {\n * console.log(revision);\n * }\n * const page = await flags.configs.environments.revisions.list(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", \"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", {}, { timeout: 5_000 });\n * ```\n */\n list(configId: string, environmentId: string, params?: T.ConfigEnvironmentRevisionListParams, options?: RequestOptions): PagePromise<T.ConfigRevision> {\n return this._client.list({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/revisions\", pathParams: { config_id: configId, environment_id: environmentId }, query: params }, options);\n }\n /**\n * Get a config revision\n *\n * The config JSON (schema 1) of one revision, byte for byte what SDKs download: keys, types, values, rules, segments and hashes, but no names, descriptions or cleartext of confidential lists. The response body is the document itself (no envelope).\n *\n * @param configId - Id of the config.\n * @param environmentId - Id of an environment of the same project.\n * @param revision - The revision number.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: `revision` is not a positive integer.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`).\n * @throws {NotFoundError} 404 NOT_FOUND, CONFIG_NOT_FOUND, ENVIRONMENT_NOT_FOUND, REVISION_NOT_FOUND: `CONFIG_NOT_FOUND` or `ENVIRONMENT_NOT_FOUND`: no such config in this workspace, or the environment is not one of its project. `REVISION_NOT_FOUND`: no such revision (never published, or pruned).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/revisions/{revision}\n * @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-configs-config-id-environments-environment-id-revisions-revision\n * @example\n * ```ts\n * const result = await flags.configs.environments.revisions.retrieve(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", \"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", \"1\");\n * ```\n */\n retrieve(configId: string, environmentId: string, revision: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.ConfigEnvironmentRevisionRetrieveResponse>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/revisions/{revision}\", pathParams: { config_id: configId, environment_id: environmentId, revision } }, options);\n }\n}\n\n/** `configs.environments.sdkKeys` */\nexport class ConfigsEnvironmentsSdkKeysResource extends APIResource {\n /**\n * End the grace period\n *\n * Revokes the secondary key now instead of at its `expires_at`. SDK servers still using it get 404 within about 5 seconds. Recorded in the history (`sdk_key.grace_ended`) and the workspace audit log.\n *\n * @param configId - Id of the config.\n * @param environmentId - Id of an environment of the same project.\n * @param options - Per-request options.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`).\n * @throws {NotFoundError} 404 NOT_FOUND, CONFIG_NOT_FOUND, ENVIRONMENT_NOT_FOUND, SDK_KEY_NOT_FOUND: `CONFIG_NOT_FOUND` or `ENVIRONMENT_NOT_FOUND`: no such config in this workspace, or the environment is not one of its project. `SDK_KEY_NOT_FOUND`: there is no secondary key.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see DELETE /v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/sdk-keys/secondary\n * @see https://productcraft.co/docs/flags/api-reference#delete-v1-workspaces-workspace-id-configs-config-id-environments-environment-id-sdk-keys-secondary\n * @example\n * ```ts\n * const sdkKeyList = await flags.configs.environments.sdkKeys.endGracePeriod(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", \"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");\n * ```\n */\n endGracePeriod(configId: string, environmentId: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.SdkKeyList>> {\n return this._client.request({ method: \"DELETE\", path: \"/v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/sdk-keys/secondary\", pathParams: { config_id: configId, environment_id: environmentId } }, options);\n }\n /**\n * List SDK keys\n *\n * The SDK keys of this config in this environment, masked (prefix and last four characters): the primary key, and the secondary key while a rotation's grace period runs. The first call for a new environment mints its primary key.\n *\n * @param configId - Id of the config.\n * @param environmentId - Id of an environment of the same project.\n * @param options - Per-request options.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`).\n * @throws {NotFoundError} 404 NOT_FOUND, CONFIG_NOT_FOUND, ENVIRONMENT_NOT_FOUND: `CONFIG_NOT_FOUND` or `ENVIRONMENT_NOT_FOUND`: no such config in this workspace, or the environment is not one of its project.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/sdk-keys\n * @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-configs-config-id-environments-environment-id-sdk-keys\n * @example\n * ```ts\n * const sdkKeyList = await flags.configs.environments.sdkKeys.list(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", \"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");\n * ```\n */\n list(configId: string, environmentId: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.SdkKeyList>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/sdk-keys\", pathParams: { config_id: configId, environment_id: environmentId } }, options);\n }\n /**\n * Reveal SDK keys\n *\n * The full primary key, and the secondary key while a grace period runs. Needs `flags.sdk_key.reveal`; every call is recorded in the history (`sdk_key.revealed`) and the workspace audit log. Never cached. Whoever holds a key can download the whole config of this environment: keep server keys server-side.\n *\n * @param configId - Id of the config.\n * @param environmentId - Id of an environment of the same project.\n * @param options - Per-request options.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`).\n * @throws {NotFoundError} 404 NOT_FOUND, CONFIG_NOT_FOUND, ENVIRONMENT_NOT_FOUND: `CONFIG_NOT_FOUND` or `ENVIRONMENT_NOT_FOUND`: no such config in this workspace, or the environment is not one of its project.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/sdk-keys/reveal\n * @see https://productcraft.co/docs/flags/api-reference#post-v1-workspaces-workspace-id-configs-config-id-environments-environment-id-sdk-keys-reveal\n * @example\n * ```ts\n * const revealedSdkKeyList = await flags.configs.environments.sdkKeys.reveal(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", \"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");\n * ```\n */\n reveal(configId: string, environmentId: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.RevealedSdkKeyList>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/sdk-keys/reveal\", pathParams: { config_id: configId, environment_id: environmentId } }, options);\n }\n /**\n * Rotate the SDK key\n *\n * Mints a new primary key. The current primary becomes the secondary key and keeps working for `grace_hours` (default 24, at most 168; `0` revokes it at once); a previous secondary key is revoked. SDK servers pick up the change within about 5 seconds. The response is masked: reveal the new key separately.\n *\n * @param configId - Id of the config.\n * @param environmentId - Id of an environment of the same project.\n * @param params - `Flags.ConfigEnvironmentSdkKeyRotateParams`.\n * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: `grace_hours` is not an integer from 0 to 168, or `note` is too long.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`).\n * @throws {NotFoundError} 404 NOT_FOUND, CONFIG_NOT_FOUND, ENVIRONMENT_NOT_FOUND: `CONFIG_NOT_FOUND` or `ENVIRONMENT_NOT_FOUND`: no such config in this workspace, or the environment is not one of its project.\n * @throws {ConflictError} 409 CONFLICT, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/sdk-keys/rotate\n * @see https://productcraft.co/docs/flags/api-reference#post-v1-workspaces-workspace-id-configs-config-id-environments-environment-id-sdk-keys-rotate\n * @example\n * ```ts\n * const sdkKeyList = await flags.configs.environments.sdkKeys.rotate(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", \"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", { grace_hours: 24 });\n * ```\n */\n rotate(configId: string, environmentId: string, params?: T.ConfigEnvironmentSdkKeyRotateParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.SdkKeyList>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/sdk-keys/rotate\", pathParams: { config_id: configId, environment_id: environmentId }, body: params, idempotent: true }, options);\n }\n}\n\n/** `configs.environments.values` */\nexport class ConfigsEnvironmentsValuesResource extends APIResource {\n /**\n * List values in an environment\n *\n * Every setting of the config with its value and targeting in one environment (the flag list), in `ordinal` order. `include=states` adds each setting's compact state in every environment.\n *\n * @param configId - Id of the config.\n * @param environmentId - Id of an environment of the same project.\n * @param params - `Flags.ConfigEnvironmentValueListParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a bad cursor, `limit` or `include`.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`).\n * @throws {NotFoundError} 404 NOT_FOUND, CONFIG_NOT_FOUND, ENVIRONMENT_NOT_FOUND: `CONFIG_NOT_FOUND` or `ENVIRONMENT_NOT_FOUND` (not an environment of the config's project).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/values\n * @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-configs-config-id-environments-environment-id-values\n * @example\n * ```ts\n * for await (const value of flags.configs.environments.values.list(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", \"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\")) {\n * console.log(value);\n * }\n * const page = await flags.configs.environments.values.list(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", \"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", {}, { timeout: 5_000 });\n * ```\n */\n list(configId: string, environmentId: string, params?: T.ConfigEnvironmentValueListParams, options?: RequestOptions): PagePromise<T.EnvironmentValueRow> {\n return this._client.list({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/values\", pathParams: { config_id: configId, environment_id: environmentId }, query: params }, options);\n }\n}\n\n/** `configs.environments` */\nexport class ConfigsEnvironmentsResource extends APIResource {\n #revisions?: ConfigsEnvironmentsRevisionsResource;\n #sdkKeys?: ConfigsEnvironmentsSdkKeysResource;\n #values?: ConfigsEnvironmentsValuesResource;\n get revisions(): ConfigsEnvironmentsRevisionsResource {\n return (this.#revisions ??= new ConfigsEnvironmentsRevisionsResource(this._client, this._b));\n }\n get sdkKeys(): ConfigsEnvironmentsSdkKeysResource {\n return (this.#sdkKeys ??= new ConfigsEnvironmentsSdkKeysResource(this._client, this._b));\n }\n get values(): ConfigsEnvironmentsValuesResource {\n return (this.#values ??= new ConfigsEnvironmentsValuesResource(this._client, this._b));\n }\n /**\n * Copy targeting between environments\n *\n * Copies value and targeting (rules, splits, split attribute) of `setting_ids`, or of every setting that differs (`all_differing: true`), from `source_environment_id` into this environment. All or nothing: send the target `version` of every setting that will be copied in `versions`; if any moved, nothing is written and 409 lists them. Publishes one config revision, with one history entry per setting. Needs `flags.value.update` on this environment and each setting, plus `flags.protected.update` when it is protected.\n *\n * @param configId - Id of the config.\n * @param environmentId - Id of the target environment (same project as the config).\n * @param params - `Flags.ConfigEnvironmentCopyParams`.\n * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: neither or both of `setting_ids` / `all_differing`, the source is the target, or a bad `versions` entry.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`). Copies need `flags.value.update` on the environment and every setting, and `flags.protected.update` into a protected environment.\n * @throws {NotFoundError} 404 NOT_FOUND, CONFIG_NOT_FOUND, ENVIRONMENT_NOT_FOUND, SETTING_NOT_FOUND: `CONFIG_NOT_FOUND`, `ENVIRONMENT_NOT_FOUND` (target or source is not of this project) or `SETTING_NOT_FOUND`.\n * @throws {ConflictError} 409 CONFLICT, VERSION_CONFLICT, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: `VERSION_CONFLICT`: a setting changed in the target since you read it, or has no entry in `versions` (`details.conflicts[]`: `setting_id`, `key`, `current_version`, `sent_version`); nothing was copied. Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, INVALID_VALUE, INVALID_TARGETING, SEGMENT_NOT_FOUND, PREREQUISITE_NOT_FOUND, PREREQUISITE_TYPE_MISMATCH, CIRCULAR_PREREQUISITE, CONFIDENTIAL_LIST_NOT_EDITABLE, LIMIT_EXCEEDED, NOTE_REQUIRED, CONFIG_TOO_LARGE, OWNER_NOT_A_MEMBER: The restored or copied targeting is refused by the normal write checks: `INVALID_VALUE`, `INVALID_TARGETING`, `SEGMENT_NOT_FOUND` (a segment it used was deleted), `PREREQUISITE_NOT_FOUND`, `PREREQUISITE_TYPE_MISMATCH`, `CIRCULAR_PREREQUISITE`, `CONFIDENTIAL_LIST_NOT_EDITABLE`, `LIMIT_EXCEEDED`, `NOTE_REQUIRED` (the environment requires a `note`), `CONFIG_TOO_LARGE`, or `OWNER_NOT_A_MEMBER` (a restored owner left the workspace).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/copy\n * @see https://productcraft.co/docs/flags/api-reference#post-v1-workspaces-workspace-id-configs-config-id-environments-environment-id-copy\n * @example\n * ```ts\n * const copyEnvironment = await flags.configs.environments.copy(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", \"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", {\n * source_environment_id: \"9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b\",\n * versions: { \"0b8f8a2c-4d3e-4f5a-8b6c-7d8e9f0a1b2c\": 3 },\n * });\n * ```\n */\n copy(configId: string, environmentId: string, params: T.ConfigEnvironmentCopyParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.CopyEnvironment>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/copy\", pathParams: { config_id: configId, environment_id: environmentId }, body: params, idempotent: true }, options);\n }\n /**\n * Test an evaluation\n *\n * Evaluates a sample user against the published config of this environment (the current revision, or `revision`) with the same engine the SDKs run, and returns the evaluation details per key: value, reason, the rule and percentage option that decided, and soft-miss warnings. Each setting's own value is the default. Nothing is stored and the user is never logged. Limited to 30 calls a minute per credential; the evaluation has a 250 ms budget (422 `EVALUATION_BUDGET_EXCEEDED`, ask for fewer keys).\n *\n * @param configId - Id of the config.\n * @param environmentId - Id of an environment of the same project.\n * @param params - `Flags.ConfigEnvironmentEvaluateParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: `user` is not an object or null, it has more than 200 attributes, more than 200 `keys`, or a bad `revision`.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`).\n * @throws {NotFoundError} 404 NOT_FOUND, CONFIG_NOT_FOUND, ENVIRONMENT_NOT_FOUND, REVISION_NOT_FOUND: `CONFIG_NOT_FOUND` or `ENVIRONMENT_NOT_FOUND`: no such config in this workspace, or the environment is not one of its project. `REVISION_NOT_FOUND`: the requested revision was pruned or never published.\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, EVALUATION_BUDGET_EXCEEDED, INVALID_TARGETING: `EVALUATION_BUDGET_EXCEEDED`: the evaluation ran over 250 ms; ask for fewer keys. `INVALID_TARGETING`: the stored revision is not a config the engine accepts.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/evaluate\n * @see https://productcraft.co/docs/flags/api-reference#post-v1-workspaces-workspace-id-configs-config-id-environments-environment-id-evaluate\n * @example\n * ```ts\n * const testEvaluation = await flags.configs.environments.evaluate(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", \"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", { keys: [\"new_checkout\", \"banner_text\"] });\n * ```\n */\n evaluate(configId: string, environmentId: string, params?: T.ConfigEnvironmentEvaluateParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.TestEvaluation>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/evaluate\", pathParams: { config_id: configId, environment_id: environmentId }, body: params }, options);\n }\n}\n\n/** `configs.settings` */\nexport class ConfigsSettingsResource extends APIResource {\n /**\n * Create a setting\n *\n * Adds a feature flag (`boolean`) or a typed setting to the config, with a value in every environment (`initial_value`, else the type's zero). Needs `flags.create`; a non-zero `initial_value` is also a value write in every environment (protected ones need `flags.protected.update`).\n *\n * @param configId - Id of the config.\n * @param params - `Flags.ConfigSettingsCreateParams`.\n * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is missing or invalid.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`).\n * @throws {NotFoundError} 404 NOT_FOUND, CONFIG_NOT_FOUND: `CONFIG_NOT_FOUND`: no such config in this workspace.\n * @throws {ConflictError} 409 CONFLICT, KEY_ALREADY_EXISTS, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: `KEY_ALREADY_EXISTS`: the config already has a setting with this key. Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, INVALID_VALUE, LIMIT_EXCEEDED, OWNER_NOT_A_MEMBER, NOTE_REQUIRED, CONFIG_TOO_LARGE: `INVALID_VALUE`: `initial_value` does not match the type; `LIMIT_EXCEEDED`: the config has the maximum number of settings; `OWNER_NOT_A_MEMBER`: `owner_id` is not a workspace member; `NOTE_REQUIRED`. Publishing: `CONFIG_TOO_LARGE` (the rendered config would exceed 1 MiB; `details.size_bytes`, `max_bytes`) or `LIMIT_EXCEEDED` with `details.limit: comparison_values_per_config` (over 20,000 comparison values in the config); the write is not applied.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @throws {InternalServerError} 503 SERVICE_UNAVAILABLE: `SERVICE_UNAVAILABLE`: the member lookup for `owner_id` is unavailable; retry.\n * @see POST /v1/workspaces/{workspace_id}/configs/{config_id}/settings\n * @see https://productcraft.co/docs/flags/api-reference#post-v1-workspaces-workspace-id-configs-config-id-settings\n * @example\n * ```ts\n * const settingDetail = await flags.configs.settings.create(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", { key: \"new_checkout\", type: \"boolean\" });\n * ```\n */\n create(configId: string, params: T.ConfigSettingsCreateParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.SettingDetail>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/configs/{config_id}/settings\", pathParams: { config_id: configId }, body: params, idempotent: true }, options);\n }\n /**\n * List settings\n *\n * The config's feature flags and settings, in `ordinal` order, with filters.\n *\n * @param configId - Id of the config.\n * @param params - `Flags.ConfigSettingsListParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a bad filter, cursor or `limit`.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`).\n * @throws {NotFoundError} 404 NOT_FOUND, CONFIG_NOT_FOUND: `CONFIG_NOT_FOUND`: no such config in this workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/configs/{config_id}/settings\n * @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-configs-config-id-settings\n * @example\n * ```ts\n * for await (const settings of flags.configs.settings.list(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\")) {\n * console.log(settings);\n * }\n * const page = await flags.configs.settings.list(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", {}, { timeout: 5_000 });\n * ```\n */\n list(configId: string, params?: T.ConfigSettingsListParams, options?: RequestOptions): PagePromise<T.Setting> {\n return this._client.list({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/configs/{config_id}/settings\", pathParams: { config_id: configId }, query: params }, options);\n }\n}\n\n/** `configs` */\nexport class ConfigsResource extends APIResource {\n #environments?: ConfigsEnvironmentsResource;\n #settings?: ConfigsSettingsResource;\n get environments(): ConfigsEnvironmentsResource {\n return (this.#environments ??= new ConfigsEnvironmentsResource(this._client, this._b));\n }\n get settings(): ConfigsSettingsResource {\n return (this.#settings ??= new ConfigsSettingsResource(this._client, this._b));\n }\n /**\n * Compare environments\n *\n * Each setting's value and targeting side by side in 2-5 environments, with `differs` per setting.\n *\n * @param configId - Id of the config.\n * @param params - `Flags.ConfigCompareParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: `environment_ids` is not 2-5 environment ids.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`).\n * @throws {NotFoundError} 404 NOT_FOUND, CONFIG_NOT_FOUND, ENVIRONMENT_NOT_FOUND: `CONFIG_NOT_FOUND` or `ENVIRONMENT_NOT_FOUND`.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/configs/{config_id}/compare\n * @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-configs-config-id-compare\n * @example\n * ```ts\n * for await (const config of flags.configs.compare(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", {\n * environment_ids: \"0b8c7a52-5a8e-4b8f-9d0a-6b1f0e0c1a11,7c1d9e44-2f3a-4c55-8e6b-1a2b3c4d5e6f\",\n * })) {\n * console.log(config);\n * }\n * ```\n */\n compare(configId: string, params: T.ConfigCompareParams, options?: RequestOptions): PagePromise<T.CompareRow> {\n return this._client.list({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/configs/{config_id}/compare\", pathParams: { config_id: configId }, query: params }, options);\n }\n /**\n * Delete a config\n *\n * Deletes the config with its flags, values and SDK keys in every environment. Needs `flags.project.manage`.\n *\n * @param configId - Id of the config.\n * @param params - `Flags.ConfigDeleteParams`.\n * @param options - Per-request options.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`).\n * @throws {NotFoundError} 404 NOT_FOUND, CONFIG_NOT_FOUND: `CONFIG_NOT_FOUND`: no such config in this workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see DELETE /v1/workspaces/{workspace_id}/configs/{config_id}\n * @see https://productcraft.co/docs/flags/api-reference#delete-v1-workspaces-workspace-id-configs-config-id\n * @example\n * ```ts\n * await flags.configs.delete(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");\n * ```\n */\n delete(configId: string, params?: T.ConfigDeleteParams, options?: RequestOptions): APIPromise<void> {\n return this._client.request({ method: \"DELETE\", path: \"/v1/workspaces/{workspace_id}/configs/{config_id}\", pathParams: { config_id: configId }, query: params }, options);\n }\n /**\n * Get a config\n *\n * @param configId - Id of the config.\n * @param options - Per-request options.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`).\n * @throws {NotFoundError} 404 NOT_FOUND, CONFIG_NOT_FOUND: `CONFIG_NOT_FOUND`: no such config in this workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/configs/{config_id}\n * @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-configs-config-id\n * @example\n * ```ts\n * const config = await flags.configs.retrieve(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");\n * ```\n */\n retrieve(configId: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.Config>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/configs/{config_id}\", pathParams: { config_id: configId } }, options);\n }\n /**\n * Update a config\n *\n * Key, name, description or order. Only the fields you send change. Needs `flags.project.manage`.\n *\n * @param configId - Id of the config.\n * @param params - `Flags.ConfigUpdateParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`).\n * @throws {NotFoundError} 404 NOT_FOUND, CONFIG_NOT_FOUND: `CONFIG_NOT_FOUND`: no such config in this workspace.\n * @throws {ConflictError} 409 CONFLICT, KEY_ALREADY_EXISTS: `KEY_ALREADY_EXISTS`: the project already has a config with this key.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see PATCH /v1/workspaces/{workspace_id}/configs/{config_id}\n * @see https://productcraft.co/docs/flags/api-reference#patch-v1-workspaces-workspace-id-configs-config-id\n * @example\n * ```ts\n * const config = await flags.configs.update(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", { description: \"string\" });\n * ```\n */\n update(configId: string, params?: T.ConfigUpdateParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.Config>> {\n return this._client.request({ method: \"PATCH\", path: \"/v1/workspaces/{workspace_id}/configs/{config_id}\", pathParams: { config_id: configId }, body: params }, options);\n }\n}\n\n/** `imports` */\nexport class ImportsResource extends APIResource {\n /**\n * Import from ConfigCat\n *\n * Reads a ConfigCat product through ConfigCat's Public Management API with credentials you send for this one request (never stored, logged or cached), and maps it to a new Flags project: environments, configs, feature flags and settings (seed = the ConfigCat key, so every user stays in the same percentage bucket), segments, targeting rules, percentage options and prerequisite flags; sensitive comparators become confidential comparators re-hashed under the project salt. Send `dry_run: true` first: it reads and reports (`counts`, `mapped`, `unsupported`, `warnings`) and writes nothing. A real run (`dry_run: false`) creates the project and answers 201; while the report lists `unsupported` items it answers 422 `IMPORT_UNSUPPORTED` unless `skip_unsupported: true`. One synchronous call with a 120 s budget for the ConfigCat reads (paced to ConfigCat's rate limits). Needs `flags.project.manage` and `flags.create`. No Idempotency-Key: the body carries credentials, and a retry of a finished import answers 409 `KEY_ALREADY_EXISTS` (the project name is taken).\n *\n * @param params - `Flags.ImportCreateParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is missing or invalid (`source` must be `configcat`, `configcat_product_id` a uuid).\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`).\n * @throws {NotFoundError} 404 NOT_FOUND, IMPORT_SOURCE_NOT_FOUND: `IMPORT_SOURCE_NOT_FOUND`: the ConfigCat product does not exist, or the credentials cannot see it.\n * @throws {ConflictError} 409 CONFLICT, KEY_ALREADY_EXISTS: `KEY_ALREADY_EXISTS`: a project with the target name already exists (pass `target_project_name`).\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, IMPORT_CREDENTIALS_INVALID, IMPORT_UNSUPPORTED, IMPORT_EXCEEDS_LIMITS: `IMPORT_CREDENTIALS_INVALID`: ConfigCat rejected the credentials. `IMPORT_UNSUPPORTED`: a real run while the report lists unsupported items (`details.items`); send `skip_unsupported: true` to import without them. `IMPORT_EXCEEDS_LIMITS`: the product is larger than the Flags limits, or reading it ran over the 120 s budget (`details`: `limit`, `max`, `current`). Nothing was imported.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @throws {InternalServerError} 502 BAD_GATEWAY, IMPORT_SOURCE_UNAVAILABLE: `IMPORT_SOURCE_UNAVAILABLE`: ConfigCat answered 5xx, timed out or could not be reached.\n * @see POST /v1/workspaces/{workspace_id}/imports\n * @see https://productcraft.co/docs/flags/api-reference#post-v1-workspaces-workspace-id-imports\n * @example\n * ```ts\n * const importResult = await flags.imports.create({\n * configcat_product_id: \"08d8a0b0-0000-4c1f-8a1c-1a2b3c4d5e6f\",\n * credentials: { password: \"cc-basic-auth-password\", username: \"cc-basic-auth-username\" },\n * dry_run: true,\n * source: \"configcat\",\n * });\n * ```\n */\n create(params: T.ImportCreateParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.Import>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/imports\", body: params }, options);\n }\n}\n\n/** `limits` */\nexport class LimitsResource extends APIResource {\n /**\n * Get Flags limits and usage\n *\n * The preview limits that apply to this workspace and how much of the counted ones it uses.\n *\n * @param options - Per-request options.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/limits\n * @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-limits\n * @example\n * ```ts\n * const flagsLimits = await flags.limits.retrieve();\n * ```\n */\n retrieve(options?: RequestOptions): APIPromise<T.WithLastResponse<T.FlagsLimits>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/limits\" }, options);\n }\n}\n\n/** `projects.changes` */\nexport class ProjectsChangesResource extends APIResource {\n /**\n * Export changes\n *\n * The filtered history as a file, newest first, at most 50,000 rows, streamed. `csv`: one row per change with the summary (no bodies). `json`: JSON Lines (`application/x-ndjson`), one change object per line with `before` and `after` (confidential lists as counts). Cells a spreadsheet would run as a formula start with `'`.\n *\n * @param projectId - Id of the project.\n * @param params - `Flags.ProjectChangeExportParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a bad filter or `format`, or `since` is not before `until`.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`).\n * @throws {NotFoundError} 404 NOT_FOUND, PROJECT_NOT_FOUND: `PROJECT_NOT_FOUND`: no such project in this workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/projects/{project_id}/changes/export\n * @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-projects-project-id-changes-export\n * @example\n * ```ts\n * const response = await flags.projects.changes.export(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");\n * const text = await response.text();\n * ```\n */\n export(projectId: string, params?: T.ProjectChangeExportParams, options?: RequestOptions): APIPromise<Response> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/projects/{project_id}/changes/export\", pathParams: { project_id: projectId }, query: fillActor(params, this._b), raw: true }, options);\n }\n /**\n * List changes\n *\n * The history of a project, newest first: every write with who made it (user, API key, or a client acting for a user), its note, the config revisions it published and a human summary (\"Production: value false → true\"). Filter by config, environment, setting, segment, actor or time. Confidential lists show as counts, never values.\n *\n * @param projectId - Id of the project.\n * @param params - `Flags.ProjectChangeListParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a bad filter, cursor or `limit`, or `since` is not before `until`.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`).\n * @throws {NotFoundError} 404 NOT_FOUND, PROJECT_NOT_FOUND: `PROJECT_NOT_FOUND`: no such project in this workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/projects/{project_id}/changes\n * @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-projects-project-id-changes\n * @example\n * ```ts\n * for await (const change of flags.projects.changes.list(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\")) {\n * console.log(change);\n * }\n * const page = await flags.projects.changes.list(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", {}, { timeout: 5_000 });\n * ```\n */\n list(projectId: string, params?: T.ProjectChangeListParams, options?: RequestOptions): PagePromise<T.Change> {\n return this._client.list({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/projects/{project_id}/changes\", pathParams: { project_id: projectId }, query: fillActor(params, this._b) }, options);\n }\n}\n\n/** `projects.configs` */\nexport class ProjectsConfigsResource extends APIResource {\n /**\n * Create a config\n *\n * Adds a config to the project, with a published state in every environment. Each (config, environment) pair has its own SDK key. Needs `flags.project.manage`.\n *\n * @param projectId - Id of the project.\n * @param params - `Flags.ProjectConfigCreateParams`.\n * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is missing or invalid.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`).\n * @throws {NotFoundError} 404 NOT_FOUND, PROJECT_NOT_FOUND: `PROJECT_NOT_FOUND`: no such project in this workspace.\n * @throws {ConflictError} 409 CONFLICT, KEY_ALREADY_EXISTS, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: `KEY_ALREADY_EXISTS`: the project already has a config with this key. Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, LIMIT_EXCEEDED: `LIMIT_EXCEEDED`: the project already has the maximum number of configs (`details`: `limit`, `max`, `current`).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/projects/{project_id}/configs\n * @see https://productcraft.co/docs/flags/api-reference#post-v1-workspaces-workspace-id-projects-project-id-configs\n * @example\n * ```ts\n * const config = await flags.projects.configs.create(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", { key: \"checkout\", name: \"Checkout\" });\n * ```\n */\n create(projectId: string, params: T.ProjectConfigCreateParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.Config>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/projects/{project_id}/configs\", pathParams: { project_id: projectId }, body: params, idempotent: true }, options);\n }\n /**\n * List configs\n *\n * The project's configs, in `ordinal` order.\n *\n * @param projectId - Id of the project.\n * @param params - `Flags.ProjectConfigListParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a bad cursor or a `limit` outside 1-100.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`).\n * @throws {NotFoundError} 404 NOT_FOUND, PROJECT_NOT_FOUND: `PROJECT_NOT_FOUND`: no such project in this workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/projects/{project_id}/configs\n * @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-projects-project-id-configs\n * @example\n * ```ts\n * for await (const config of flags.projects.configs.list(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\")) {\n * console.log(config);\n * }\n * const page = await flags.projects.configs.list(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", {}, { timeout: 5_000 });\n * ```\n */\n list(projectId: string, params?: T.ProjectConfigListParams, options?: RequestOptions): PagePromise<T.Config> {\n return this._client.list({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/projects/{project_id}/configs\", pathParams: { project_id: projectId }, query: params }, options);\n }\n}\n\n/** `projects.environments` */\nexport class ProjectsEnvironmentsResource extends APIResource {\n /**\n * Create an environment\n *\n * Adds an environment to every config of the project. The key `production` starts protected unless you say otherwise. Needs `flags.project.manage`.\n *\n * @param projectId - Id of the project.\n * @param params - `Flags.ProjectEnvironmentCreateParams`.\n * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is missing or invalid.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`).\n * @throws {NotFoundError} 404 NOT_FOUND, PROJECT_NOT_FOUND: `PROJECT_NOT_FOUND`: no such project in this workspace.\n * @throws {ConflictError} 409 CONFLICT, KEY_ALREADY_EXISTS, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: `KEY_ALREADY_EXISTS`: the project already has an environment with this key. Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, LIMIT_EXCEEDED: `LIMIT_EXCEEDED`: the project already has the maximum number of environments (`details`: `limit`, `max`, `current`).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/projects/{project_id}/environments\n * @see https://productcraft.co/docs/flags/api-reference#post-v1-workspaces-workspace-id-projects-project-id-environments\n * @example\n * ```ts\n * const environment = await flags.projects.environments.create(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", { key: \"staging\", name: \"Staging\" });\n * ```\n */\n create(projectId: string, params: T.ProjectEnvironmentCreateParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.Environment>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/projects/{project_id}/environments\", pathParams: { project_id: projectId }, body: params, idempotent: true }, options);\n }\n /**\n * Delete an environment\n *\n * Deletes the environment with its values in every config, and its SDK keys. A project keeps at least one environment. Needs `flags.project.manage`.\n *\n * @param projectId - Id of the project.\n * @param environmentId - Id of the environment.\n * @param params - `Flags.ProjectEnvironmentDeleteParams`.\n * @param options - Per-request options.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`).\n * @throws {NotFoundError} 404 NOT_FOUND, ENVIRONMENT_NOT_FOUND: `ENVIRONMENT_NOT_FOUND`: no such environment in this project.\n * @throws {ConflictError} 409 CONFLICT, LAST_ENVIRONMENT: `LAST_ENVIRONMENT`: this is the project's only environment.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see DELETE /v1/workspaces/{workspace_id}/projects/{project_id}/environments/{environment_id}\n * @see https://productcraft.co/docs/flags/api-reference#delete-v1-workspaces-workspace-id-projects-project-id-environments-environment-id\n * @example\n * ```ts\n * await flags.projects.environments.delete(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", \"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");\n * ```\n */\n delete(projectId: string, environmentId: string, params?: T.ProjectEnvironmentDeleteParams, options?: RequestOptions): APIPromise<void> {\n return this._client.request({ method: \"DELETE\", path: \"/v1/workspaces/{workspace_id}/projects/{project_id}/environments/{environment_id}\", pathParams: { project_id: projectId, environment_id: environmentId }, query: params }, options);\n }\n /**\n * List environments\n *\n * Every environment of the project, in `ordinal` order.\n *\n * @param projectId - Id of the project.\n * @param options - Per-request options.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`).\n * @throws {NotFoundError} 404 NOT_FOUND, PROJECT_NOT_FOUND: `PROJECT_NOT_FOUND`: no such project in this workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/projects/{project_id}/environments\n * @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-projects-project-id-environments\n * @example\n * ```ts\n * const environmentList = await flags.projects.environments.list(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");\n * ```\n */\n list(projectId: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.EnvironmentList>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/projects/{project_id}/environments\", pathParams: { project_id: projectId } }, options);\n }\n /**\n * Get an environment\n *\n * @param projectId - Id of the project.\n * @param environmentId - Id of the environment.\n * @param options - Per-request options.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`).\n * @throws {NotFoundError} 404 NOT_FOUND, ENVIRONMENT_NOT_FOUND: `ENVIRONMENT_NOT_FOUND`: no such environment in this project.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/projects/{project_id}/environments/{environment_id}\n * @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-projects-project-id-environments-environment-id\n * @example\n * ```ts\n * const environment = await flags.projects.environments.retrieve(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", \"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");\n * ```\n */\n retrieve(projectId: string, environmentId: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.Environment>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/projects/{project_id}/environments/{environment_id}\", pathParams: { project_id: projectId, environment_id: environmentId } }, options);\n }\n /**\n * Update an environment\n *\n * Name, color, order, `protected` and `require_note`; the key never changes. Changing `protected` or `require_note` is recorded in the workspace audit log. Needs `flags.project.manage`.\n *\n * @param projectId - Id of the project.\n * @param environmentId - Id of the environment.\n * @param params - `Flags.ProjectEnvironmentUpdateParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`).\n * @throws {NotFoundError} 404 NOT_FOUND, ENVIRONMENT_NOT_FOUND: `ENVIRONMENT_NOT_FOUND`: no such environment in this project.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see PATCH /v1/workspaces/{workspace_id}/projects/{project_id}/environments/{environment_id}\n * @see https://productcraft.co/docs/flags/api-reference#patch-v1-workspaces-workspace-id-projects-project-id-environments-environment-id\n * @example\n * ```ts\n * const environment = await flags.projects.environments.update(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", \"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", { color: \"#e67700\" });\n * ```\n */\n update(projectId: string, environmentId: string, params?: T.ProjectEnvironmentUpdateParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.Environment>> {\n return this._client.request({ method: \"PATCH\", path: \"/v1/workspaces/{workspace_id}/projects/{project_id}/environments/{environment_id}\", pathParams: { project_id: projectId, environment_id: environmentId }, body: params }, options);\n }\n}\n\n/** `projects.segments` */\nexport class ProjectsSegmentsResource extends APIResource {\n /**\n * Create a segment\n *\n * A reusable set of ANDed user conditions that any config of the project can target with `{segment: {segment_id, comparator: in | not_in}}`. Confidential lists are stored as hashes plus encrypted cleartext; the response shows only their count.\n *\n * @param projectId - Id of the project.\n * @param params - `Flags.ProjectSegmentCreateParams`.\n * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is missing or invalid.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`).\n * @throws {NotFoundError} 404 NOT_FOUND, PROJECT_NOT_FOUND: `PROJECT_NOT_FOUND`: no such project in this workspace.\n * @throws {ConflictError} 409 CONFLICT, KEY_ALREADY_EXISTS, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: `KEY_ALREADY_EXISTS`: the project already has a segment with this key. Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, INVALID_TARGETING, LIMIT_EXCEEDED, CONFIDENTIAL_LIST_NOT_EDITABLE, NOTE_REQUIRED: The conditions are invalid; `details.errors` lists every problem (`param`, `code`, `message`) and `code` is the first one: `INVALID_TARGETING` (shape, comparator or value), `LIMIT_EXCEEDED` (conditions, values or segments per project), `CONFIDENTIAL_LIST_NOT_EDITABLE` (`values_add` / `values_remove` on a list sent pre-hashed), or `NOTE_REQUIRED` (the segment is used in an environment that requires a `note`).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/projects/{project_id}/segments\n * @see https://productcraft.co/docs/flags/api-reference#post-v1-workspaces-workspace-id-projects-project-id-segments\n * @example\n * ```ts\n * const segmentDetail = await flags.projects.segments.create(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", {\n * conditions: [\n * {\n * user: { attribute: \"email\", comparator: \"ends_with_any_hashed\", values: [\"@acme.test\"] },\n * },\n * ],\n * key: \"qa_staff\",\n * });\n * ```\n */\n create(projectId: string, params: T.ProjectSegmentCreateParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.SegmentDetail>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/projects/{project_id}/segments\", pathParams: { project_id: projectId }, body: params, idempotent: true }, options);\n }\n /**\n * List segments\n *\n * The project's segments, oldest first, with `usage_count`.\n *\n * @param projectId - Id of the project.\n * @param params - `Flags.ProjectSegmentListParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a bad cursor or `limit`.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`).\n * @throws {NotFoundError} 404 NOT_FOUND, PROJECT_NOT_FOUND: `PROJECT_NOT_FOUND`: no such project in this workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/projects/{project_id}/segments\n * @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-projects-project-id-segments\n * @example\n * ```ts\n * for await (const segment of flags.projects.segments.list(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\")) {\n * console.log(segment);\n * }\n * const page = await flags.projects.segments.list(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", {}, { timeout: 5_000 });\n * ```\n */\n list(projectId: string, params?: T.ProjectSegmentListParams, options?: RequestOptions): PagePromise<T.Segment> {\n return this._client.list({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/projects/{project_id}/segments\", pathParams: { project_id: projectId }, query: params }, options);\n }\n}\n\n/** `projects` */\nexport class ProjectsResource extends APIResource {\n #changes?: ProjectsChangesResource;\n #configs?: ProjectsConfigsResource;\n #environments?: ProjectsEnvironmentsResource;\n #segments?: ProjectsSegmentsResource;\n get changes(): ProjectsChangesResource {\n return (this.#changes ??= new ProjectsChangesResource(this._client, this._b));\n }\n get configs(): ProjectsConfigsResource {\n return (this.#configs ??= new ProjectsConfigsResource(this._client, this._b));\n }\n get environments(): ProjectsEnvironmentsResource {\n return (this.#environments ??= new ProjectsEnvironmentsResource(this._client, this._b));\n }\n get segments(): ProjectsSegmentsResource {\n return (this.#segments ??= new ProjectsSegmentsResource(this._client, this._b));\n }\n /**\n * Create a project\n *\n * Creates the project with the environments of `environment_preset` (default `dev_prod`: Development and a protected Production) and one config, `main`, unless you pass `environments` / `configs`. Every config gets a published state in every environment. Needs `flags.project.manage`.\n *\n * @param params - `Flags.ProjectCreateParams`.\n * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is missing or invalid.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`).\n * @throws {ConflictError} 409 CONFLICT, KEY_ALREADY_EXISTS, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: `KEY_ALREADY_EXISTS`: another project has this name, or a key repeats in `environments` / `configs`. Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, LIMIT_EXCEEDED: `LIMIT_EXCEEDED`: the workspace already has the maximum number of projects (`details`: `limit`, `max`, `current`).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/projects\n * @see https://productcraft.co/docs/flags/api-reference#post-v1-workspaces-workspace-id-projects\n * @example\n * ```ts\n * const project = await flags.projects.create({ name: \"Storefront\" });\n * ```\n */\n create(params: T.ProjectCreateParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.Project>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/projects\", body: params, idempotent: true }, options);\n }\n /**\n * Delete a project\n *\n * Deletes the project with all of its environments, configs, flags, segments, SDK keys and history. Pass `confirm` with the exact project name. SDKs using its keys stop receiving updates. Needs `flags.project.manage`; recorded in the workspace audit log.\n *\n * @param projectId - Id of the project.\n * @param params - `Flags.ProjectDeleteParams`.\n * @param options - Per-request options.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`).\n * @throws {NotFoundError} 404 NOT_FOUND, PROJECT_NOT_FOUND: `PROJECT_NOT_FOUND`: no such project in this workspace.\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, CONFIRMATION_REQUIRED: `CONFIRMATION_REQUIRED`: `confirm` is missing or is not the exact project name.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see DELETE /v1/workspaces/{workspace_id}/projects/{project_id}\n * @see https://productcraft.co/docs/flags/api-reference#delete-v1-workspaces-workspace-id-projects-project-id\n * @example\n * ```ts\n * await flags.projects.delete(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", { confirm: \"Storefront\" });\n * ```\n */\n delete(projectId: string, params: T.ProjectDeleteParams, options?: RequestOptions): APIPromise<void> {\n return this._client.request({ method: \"DELETE\", path: \"/v1/workspaces/{workspace_id}/projects/{project_id}\", pathParams: { project_id: projectId }, query: params }, options);\n }\n /**\n * List projects\n *\n * The workspace's projects, oldest first, each with its environments and configs.\n *\n * @param params - `Flags.ProjectListParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a bad cursor or a `limit` outside 1-100.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/projects\n * @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-projects\n * @example\n * ```ts\n * for await (const project of flags.projects.list()) {\n * console.log(project);\n * }\n * const page = await flags.projects.list({}, { timeout: 5_000 });\n * ```\n */\n list(params?: T.ProjectListParams, options?: RequestOptions): PagePromise<T.Project> {\n return this._client.list({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/projects\", query: params }, options);\n }\n /**\n * Get a project\n *\n * The project with its environments and configs.\n *\n * @param projectId - Id of the project.\n * @param options - Per-request options.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`).\n * @throws {NotFoundError} 404 NOT_FOUND, PROJECT_NOT_FOUND: `PROJECT_NOT_FOUND`: no such project in this workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/projects/{project_id}\n * @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-projects-project-id\n * @example\n * ```ts\n * const project = await flags.projects.retrieve(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");\n * ```\n */\n retrieve(projectId: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.Project>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/projects/{project_id}\", pathParams: { project_id: projectId } }, options);\n }\n /**\n * Update a project\n *\n * Rename, describe or reorder the project. Only the fields you send change. Needs `flags.project.manage`.\n *\n * @param projectId - Id of the project.\n * @param params - `Flags.ProjectUpdateParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`).\n * @throws {NotFoundError} 404 NOT_FOUND, PROJECT_NOT_FOUND: `PROJECT_NOT_FOUND`: no such project in this workspace.\n * @throws {ConflictError} 409 CONFLICT, KEY_ALREADY_EXISTS: `KEY_ALREADY_EXISTS`: another project has this name.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see PATCH /v1/workspaces/{workspace_id}/projects/{project_id}\n * @see https://productcraft.co/docs/flags/api-reference#patch-v1-workspaces-workspace-id-projects-project-id\n * @example\n * ```ts\n * const project = await flags.projects.update(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", { description: \"string\" });\n * ```\n */\n update(projectId: string, params?: T.ProjectUpdateParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.Project>> {\n return this._client.request({ method: \"PATCH\", path: \"/v1/workspaces/{workspace_id}/projects/{project_id}\", pathParams: { project_id: projectId }, body: params }, options);\n }\n}\n\n/** `segments` */\nexport class SegmentsResource extends APIResource {\n /**\n * Delete a segment\n *\n * Deletes an unused segment. Needs `flags.delete`.\n *\n * @param segmentId - Id of the segment.\n * @param params - `Flags.SegmentDeleteParams`.\n * @param options - Per-request options.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`).\n * @throws {NotFoundError} 404 NOT_FOUND, SEGMENT_NOT_FOUND: `SEGMENT_NOT_FOUND`: no such segment in this workspace.\n * @throws {ConflictError} 409 CONFLICT, SEGMENT_IN_USE: `SEGMENT_IN_USE`: a rule uses it (`details.used_by` lists where).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see DELETE /v1/workspaces/{workspace_id}/segments/{segment_id}\n * @see https://productcraft.co/docs/flags/api-reference#delete-v1-workspaces-workspace-id-segments-segment-id\n * @example\n * ```ts\n * await flags.segments.delete(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");\n * ```\n */\n delete(segmentId: string, params?: T.SegmentDeleteParams, options?: RequestOptions): APIPromise<void> {\n return this._client.request({ method: \"DELETE\", path: \"/v1/workspaces/{workspace_id}/segments/{segment_id}\", pathParams: { segment_id: segmentId }, query: params }, options);\n }\n /**\n * Get a segment\n *\n * The segment with its conditions and every (setting, environment) that uses it (`used_by`).\n *\n * @param segmentId - Id of the segment.\n * @param options - Per-request options.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`).\n * @throws {NotFoundError} 404 NOT_FOUND, SEGMENT_NOT_FOUND: `SEGMENT_NOT_FOUND`: no such segment in this workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/segments/{segment_id}\n * @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-segments-segment-id\n * @example\n * ```ts\n * const segmentDetail = await flags.segments.retrieve(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");\n * ```\n */\n retrieve(segmentId: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.SegmentDetail>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/segments/{segment_id}\", pathParams: { segment_id: segmentId } }, options);\n }\n /**\n * Reveal confidential values of a segment\n *\n * The cleartext of the segment's confidential lists, decrypted. Needs `flags.confidential.read`; every call is recorded in the history (`confidential.revealed`). Never cached.\n *\n * @param segmentId - Id of the segment.\n * @param options - Per-request options.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`).\n * @throws {NotFoundError} 404 NOT_FOUND, SEGMENT_NOT_FOUND: `SEGMENT_NOT_FOUND`: no such segment in this workspace.\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, CONFIDENTIAL_LIST_NOT_EDITABLE: `CONFIDENTIAL_LIST_NOT_EDITABLE`: every confidential list was sent pre-hashed, so there is no cleartext.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/segments/{segment_id}/confidential\n * @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-segments-segment-id-confidential\n * @example\n * ```ts\n * const confidentialReveal = await flags.segments.revealConfidential(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");\n * ```\n */\n revealConfidential(segmentId: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.ConfidentialReveal>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/segments/{segment_id}/confidential\", pathParams: { segment_id: segmentId } }, options);\n }\n /**\n * Update a segment\n *\n * Key, name, description or conditions; only the fields you send change. Edit a confidential list with `list_id` plus `values_add` / `values_remove`. A segment used in a protected environment also needs `flags.protected.update` there.\n *\n * @param segmentId - Id of the segment.\n * @param params - `Flags.SegmentUpdateParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`). A segment used in a protected environment also needs `flags.protected.update` on it.\n * @throws {NotFoundError} 404 NOT_FOUND, SEGMENT_NOT_FOUND: `SEGMENT_NOT_FOUND`: no such segment in this workspace.\n * @throws {ConflictError} 409 CONFLICT, KEY_ALREADY_EXISTS, VERSION_CONFLICT: `KEY_ALREADY_EXISTS`: the project already has a segment with this key; `VERSION_CONFLICT`: `version` is stale (`details.current_version`).\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, INVALID_TARGETING, LIMIT_EXCEEDED, CONFIDENTIAL_LIST_NOT_EDITABLE, NOTE_REQUIRED, CONFIG_TOO_LARGE: The conditions are invalid; `details.errors` lists every problem (`param`, `code`, `message`) and `code` is the first one: `INVALID_TARGETING` (shape, comparator or value), `LIMIT_EXCEEDED` (conditions, values or segments per project), `CONFIDENTIAL_LIST_NOT_EDITABLE` (`values_add` / `values_remove` on a list sent pre-hashed), or `NOTE_REQUIRED` (the segment is used in an environment that requires a `note`). Publishing (every config that uses the segment): `CONFIG_TOO_LARGE` (a rendered config would exceed 1 MiB) or `LIMIT_EXCEEDED` with `details.limit: comparison_values_per_config`; the edit is not applied.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see PATCH /v1/workspaces/{workspace_id}/segments/{segment_id}\n * @see https://productcraft.co/docs/flags/api-reference#patch-v1-workspaces-workspace-id-segments-segment-id\n * @example\n * ```ts\n * const segmentDetail = await flags.segments.update(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", {\n * conditions: [\n * {\n * user: {\n * attribute: \"email\",\n * comparator: \"ends_with_any_hashed\",\n * list_id: \"3f0c6a3e-0f5e-4b8e-9d1a-2c7b9f1e8a10\",\n * values_add: [\"@beta.test\"],\n * },\n * },\n * ],\n * });\n * ```\n */\n update(segmentId: string, params?: T.SegmentUpdateParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.SegmentDetail>> {\n return this._client.request({ method: \"PATCH\", path: \"/v1/workspaces/{workspace_id}/segments/{segment_id}\", pathParams: { segment_id: segmentId }, body: params }, options);\n }\n}\n\n/** `settings.values` */\nexport class SettingsValuesResource extends APIResource {\n /**\n * Replace a value\n *\n * Replaces the value and the whole targeting (rules, flag-level split, split attribute) in one environment. Send the `version` you read.\n *\n * @param settingId - Id of the setting.\n * @param environmentId - Id of an environment of the same project.\n * @param params - `Flags.SettingsValueReplaceParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: `version` or `note` is missing or invalid.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`). Value writes need `flags.value.update` on the environment and the setting, plus `flags.protected.update` in a protected environment.\n * @throws {NotFoundError} 404 NOT_FOUND, SETTING_NOT_FOUND, ENVIRONMENT_NOT_FOUND: `SETTING_NOT_FOUND` or `ENVIRONMENT_NOT_FOUND`.\n * @throws {ConflictError} 409 CONFLICT, VERSION_CONFLICT: `VERSION_CONFLICT`: the value changed since you read it (`details.current_version`, `updated_at`, `updated_by`).\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, INVALID_VALUE, INVALID_TARGETING, SEGMENT_NOT_FOUND, CONFIDENTIAL_LIST_NOT_EDITABLE, PERCENTAGES_MUST_SUM_TO_100, PREREQUISITE_NOT_FOUND, PREREQUISITE_TYPE_MISMATCH, CIRCULAR_PREREQUISITE, LIMIT_EXCEEDED, NOTE_REQUIRED, CONFIG_TOO_LARGE: The value or targeting is invalid; `details.errors` lists every problem (`param`, `code`, `message`) and `code` is the first one: `INVALID_VALUE` (type mismatch, over 100 KB, json that does not parse), `INVALID_TARGETING` (shape, comparator or comparison value), `SEGMENT_NOT_FOUND` (a segment condition names no segment of this project), `CONFIDENTIAL_LIST_NOT_EDITABLE` (`values_add` / `values_remove` on a list sent pre-hashed), `PERCENTAGES_MUST_SUM_TO_100`, `PREREQUISITE_NOT_FOUND`, `PREREQUISITE_TYPE_MISMATCH`, `CIRCULAR_PREREQUISITE` (`details.cycle` lists the keys), `LIMIT_EXCEEDED` (rules, conditions, values or prerequisite depth), or `NOTE_REQUIRED` (the environment requires a `note`). Publishing: `CONFIG_TOO_LARGE` (the rendered config would exceed 1 MiB; `details.size_bytes`, `max_bytes`) or `LIMIT_EXCEEDED` with `details.limit: comparison_values_per_config` (over 20,000 comparison values in the config); the write is not applied.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see PUT /v1/workspaces/{workspace_id}/settings/{setting_id}/values/{environment_id}\n * @see https://productcraft.co/docs/flags/api-reference#put-v1-workspaces-workspace-id-settings-setting-id-values-environment-id\n * @example\n * ```ts\n * const settingValue = await flags.settings.values.replace(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", \"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", { value: false, version: 3 });\n * ```\n */\n replace(settingId: string, environmentId: string, params: T.SettingsValueReplaceParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.SettingValue>> {\n return this._client.request({ method: \"PUT\", path: \"/v1/workspaces/{workspace_id}/settings/{setting_id}/values/{environment_id}\", pathParams: { setting_id: settingId, environment_id: environmentId }, body: params }, options);\n }\n /**\n * Get a value\n *\n * The setting's value and targeting in one environment, with its `version`.\n *\n * @param settingId - Id of the setting.\n * @param environmentId - Id of an environment of the same project.\n * @param options - Per-request options.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`).\n * @throws {NotFoundError} 404 NOT_FOUND, SETTING_NOT_FOUND, ENVIRONMENT_NOT_FOUND: `SETTING_NOT_FOUND` or `ENVIRONMENT_NOT_FOUND`.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/settings/{setting_id}/values/{environment_id}\n * @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-settings-setting-id-values-environment-id\n * @example\n * ```ts\n * const settingValue = await flags.settings.values.retrieve(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", \"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");\n * ```\n */\n retrieve(settingId: string, environmentId: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.SettingValue>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/settings/{setting_id}/values/{environment_id}\", pathParams: { setting_id: settingId, environment_id: environmentId } }, options);\n }\n /**\n * Reveal confidential values\n *\n * The cleartext of this value's confidential lists, decrypted. Needs `flags.confidential.read` on the environment and the setting; every call is recorded in the history (`confidential.revealed`). Never cached.\n *\n * @param settingId - Id of the setting.\n * @param environmentId - Id of an environment of the same project.\n * @param options - Per-request options.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`).\n * @throws {NotFoundError} 404 NOT_FOUND, SETTING_NOT_FOUND, ENVIRONMENT_NOT_FOUND: `SETTING_NOT_FOUND` or `ENVIRONMENT_NOT_FOUND`.\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, CONFIDENTIAL_LIST_NOT_EDITABLE: `CONFIDENTIAL_LIST_NOT_EDITABLE`: every confidential list was sent pre-hashed, so there is no cleartext.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/settings/{setting_id}/values/{environment_id}/confidential\n * @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-settings-setting-id-values-environment-id-confidential\n * @example\n * ```ts\n * const confidentialReveal = await flags.settings.values.revealConfidential(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", \"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");\n * ```\n */\n revealConfidential(settingId: string, environmentId: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.ConfidentialReveal>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/settings/{setting_id}/values/{environment_id}/confidential\", pathParams: { setting_id: settingId, environment_id: environmentId } }, options);\n }\n /**\n * Update a value\n *\n * The quick edits: `value` (the toggle), `percentage_attribute`, and `clear_rules: true` to drop every rule and split so `value` is served to everyone (the kill switch). Send the `version` you read.\n *\n * @param settingId - Id of the setting.\n * @param environmentId - Id of an environment of the same project.\n * @param params - `Flags.SettingsValueUpdateParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: nothing to change, or `version` is missing.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`). Value writes need `flags.value.update` on the environment and the setting, plus `flags.protected.update` in a protected environment.\n * @throws {NotFoundError} 404 NOT_FOUND, SETTING_NOT_FOUND, ENVIRONMENT_NOT_FOUND: `SETTING_NOT_FOUND` or `ENVIRONMENT_NOT_FOUND`.\n * @throws {ConflictError} 409 CONFLICT, VERSION_CONFLICT: `VERSION_CONFLICT`: the value changed since you read it (`details.current_version`, `updated_at`, `updated_by`).\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, INVALID_VALUE, INVALID_TARGETING, NOTE_REQUIRED, CONFIG_TOO_LARGE, LIMIT_EXCEEDED: `INVALID_VALUE`, `INVALID_TARGETING` or `NOTE_REQUIRED`; `details.errors` lists each problem. Publishing: `CONFIG_TOO_LARGE` (the rendered config would exceed 1 MiB; `details.size_bytes`, `max_bytes`) or `LIMIT_EXCEEDED` with `details.limit: comparison_values_per_config` (over 20,000 comparison values in the config); the write is not applied.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see PATCH /v1/workspaces/{workspace_id}/settings/{setting_id}/values/{environment_id}\n * @see https://productcraft.co/docs/flags/api-reference#patch-v1-workspaces-workspace-id-settings-setting-id-values-environment-id\n * @example\n * ```ts\n * const settingValue = await flags.settings.values.update(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", \"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", { version: 3 });\n * ```\n */\n update(settingId: string, environmentId: string, params: T.SettingsValueUpdateParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.SettingValue>> {\n return this._client.request({ method: \"PATCH\", path: \"/v1/workspaces/{workspace_id}/settings/{setting_id}/values/{environment_id}\", pathParams: { setting_id: settingId, environment_id: environmentId }, body: params }, options);\n }\n}\n\n/** `settings` */\nexport class SettingsResource extends APIResource {\n #values?: SettingsValuesResource;\n get values(): SettingsValuesResource {\n return (this.#values ??= new SettingsValuesResource(this._client, this._b));\n }\n /**\n * Delete a setting\n *\n * Deletes the setting and its values in every environment. Needs `flags.delete`.\n *\n * @param settingId - Id of the setting.\n * @param params - `Flags.SettingsDeleteParams`.\n * @param options - Per-request options.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`).\n * @throws {NotFoundError} 404 NOT_FOUND, SETTING_NOT_FOUND: `SETTING_NOT_FOUND`: no such setting in this workspace.\n * @throws {ConflictError} 409 CONFLICT, SETTING_IN_USE: `SETTING_IN_USE`: another setting uses it as a prerequisite (`details.used_by`).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see DELETE /v1/workspaces/{workspace_id}/settings/{setting_id}\n * @see https://productcraft.co/docs/flags/api-reference#delete-v1-workspaces-workspace-id-settings-setting-id\n * @example\n * ```ts\n * await flags.settings.delete(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");\n * ```\n */\n delete(settingId: string, params?: T.SettingsDeleteParams, options?: RequestOptions): APIPromise<void> {\n return this._client.request({ method: \"DELETE\", path: \"/v1/workspaces/{workspace_id}/settings/{setting_id}\", pathParams: { setting_id: settingId }, query: params }, options);\n }\n /**\n * Get a setting\n *\n * The setting with its value and targeting in every environment, and what depends on it (`dependents`).\n *\n * @param settingId - Id of the setting.\n * @param options - Per-request options.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`).\n * @throws {NotFoundError} 404 NOT_FOUND, SETTING_NOT_FOUND: `SETTING_NOT_FOUND`: no such setting in this workspace.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/settings/{setting_id}\n * @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-settings-setting-id\n * @example\n * ```ts\n * const settingDetail = await flags.settings.retrieve(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");\n * ```\n */\n retrieve(settingId: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.SettingDetail>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/settings/{setting_id}\", pathParams: { setting_id: settingId } }, options);\n }\n /**\n * Update a setting\n *\n * Key, name, description, hint, tags, lifecycle, owner or order; only the fields you send change. The type cannot change. Renaming the key keeps the seed (users stay in their split buckets) and needs `flags.protected.update` when the project has a protected environment.\n *\n * @param settingId - Id of the setting.\n * @param params - `Flags.SettingsUpdateParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`).\n * @throws {NotFoundError} 404 NOT_FOUND, SETTING_NOT_FOUND: `SETTING_NOT_FOUND`: no such setting in this workspace.\n * @throws {ConflictError} 409 CONFLICT, KEY_ALREADY_EXISTS: `KEY_ALREADY_EXISTS`: the config already has a setting with this key.\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, SETTING_TYPE_IMMUTABLE, OWNER_NOT_A_MEMBER, CONFIG_TOO_LARGE, LIMIT_EXCEEDED: `SETTING_TYPE_IMMUTABLE`: `type` differs from the current one; `OWNER_NOT_A_MEMBER`: `owner_id` is not a workspace member. Publishing: `CONFIG_TOO_LARGE` (the rendered config would exceed 1 MiB; `details.size_bytes`, `max_bytes`) or `LIMIT_EXCEEDED` with `details.limit: comparison_values_per_config` (over 20,000 comparison values in the config); the write is not applied.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @throws {InternalServerError} 503 SERVICE_UNAVAILABLE: `SERVICE_UNAVAILABLE`: the member lookup for `owner_id` is unavailable; retry.\n * @see PATCH /v1/workspaces/{workspace_id}/settings/{setting_id}\n * @see https://productcraft.co/docs/flags/api-reference#patch-v1-workspaces-workspace-id-settings-setting-id\n * @example\n * ```ts\n * const settingDetail = await flags.settings.update(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", { description: \"string\" });\n * ```\n */\n update(settingId: string, params?: T.SettingsUpdateParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.SettingDetail>> {\n return this._client.request({ method: \"PATCH\", path: \"/v1/workspaces/{workspace_id}/settings/{setting_id}\", pathParams: { setting_id: settingId }, body: params }, options);\n }\n}\n\n/** `stats` */\nexport class StatsResource extends APIResource {\n /**\n * Get Flags stats\n *\n * Counts for the workspace: projects, configs, flags and settings, segments, changes in the last 7 days and when the latest change was made, plus each project’s history usage against the retention caps (50,000 rows or 200 MiB per project; `warning` from 80%). Counts only: no keys, values or rules.\n *\n * @param options - Per-request options.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/stats\n * @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-stats\n * @example\n * ```ts\n * const flagsStats = await flags.stats.retrieve();\n * ```\n */\n retrieve(options?: RequestOptions): APIPromise<T.WithLastResponse<T.FlagsStats>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/stats\" }, options);\n }\n}\n\n/** `webhooks.endpoints` */\nexport class WebhooksEndpointsResource extends APIResource {\n /**\n * Add a webhook endpoint. Returns its signing secret once.\n *\n * Deliveries are signed with the Standard Webhooks headers `webhook-id`, `webhook-timestamp` and `webhook-signature` (`v1,<base64 HMAC-SHA256 of \"<id>.<timestamp>.<body>\">`); the returned `whsec_…` secret works unchanged with any Standard Webhooks library. Failed deliveries are retried after 1 min, 5 min, 30 min, 2 h, 6 h and 24 h.\n *\n * @param params - `Flags.WebhookEndpointCreateParams`.\n * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR, WEBHOOK_EVENT_TYPE_UNKNOWN: Validation failure: URL not https with a public host, or an unknown event type (`WEBHOOK_EVENT_TYPE_UNKNOWN`).\n * @throws {AuthenticationError} 401 UNAUTHORIZED: Missing or invalid bearer token.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `flags.webhook.read` (reads) or `flags.webhook.manage` (changes, Send test, replay), or Flags is not enabled for the workspace (`SERVICE_NOT_ENABLED`).\n * @throws {ConflictError} 409 CONFLICT, WEBHOOK_ENDPOINT_LIMIT, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: Already 10 endpoints (`WEBHOOK_ENDPOINT_LIMIT`), or Idempotency-Key reused with a different body (`IDEMPOTENCY_KEY_REUSE`). Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY: The URL points at a private, loopback or internal address.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/webhooks/endpoints\n * @see https://productcraft.co/docs/flags/api-reference#post-v1-workspaces-workspace-id-webhooks-endpoints\n * @example\n * ```ts\n * const webhookEndpoint = await flags.webhooks.endpoints.create({ url: \"https://api.acme.com/webhooks\" });\n * ```\n */\n create(params: T.WebhookEndpointCreateParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.WebhookEndpointWithSecret>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/webhooks/endpoints\", body: params, idempotent: true }, options);\n }\n /**\n * Delete a webhook endpoint.\n *\n * Queued retries are dropped. Its past attempts stay in the event log until the events expire.\n *\n * @param endpointId - Id of the endpoint.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `endpoint_id` is not a UUID.\n * @throws {AuthenticationError} 401 UNAUTHORIZED: Missing or invalid bearer token.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `flags.webhook.read` (reads) or `flags.webhook.manage` (changes, Send test, replay), or Flags is not enabled for the workspace (`SERVICE_NOT_ENABLED`).\n * @throws {NotFoundError} 404 NOT_FOUND, WEBHOOK_ENDPOINT_NOT_FOUND: No such endpoint here (`WEBHOOK_ENDPOINT_NOT_FOUND`).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see DELETE /v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}\n * @see https://productcraft.co/docs/flags/api-reference#delete-v1-workspaces-workspace-id-webhooks-endpoints-endpoint-id\n * @example\n * ```ts\n * await flags.webhooks.endpoints.delete(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");\n * ```\n */\n delete(endpointId: string, options?: RequestOptions): APIPromise<void> {\n return this._client.request({ method: \"DELETE\", path: \"/v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}\", pathParams: { endpoint_id: endpointId } }, options);\n }\n /**\n * List webhook endpoints, oldest first.\n *\n * At most 10, so this is always one page. Signing secrets are never returned here, only their last 4 characters.\n *\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: The scope id in the path is malformed.\n * @throws {AuthenticationError} 401 UNAUTHORIZED: Missing or invalid bearer token.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `flags.webhook.read` (reads) or `flags.webhook.manage` (changes, Send test, replay), or Flags is not enabled for the workspace (`SERVICE_NOT_ENABLED`).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/webhooks/endpoints\n * @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-webhooks-endpoints\n * @example\n * ```ts\n * for await (const endpoint of flags.webhooks.endpoints.list()) {\n * console.log(endpoint);\n * }\n * ```\n */\n list(options?: RequestOptions): PagePromise<T.WebhookEndpoint> {\n return this._client.list({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/webhooks/endpoints\" }, options);\n }\n /**\n * Get one webhook endpoint (without its secret).\n *\n * The endpoint's URL, subscription, on/off state, failure streak and the last 4 characters of its signing secret. The full secret is only returned when the endpoint is created or its secret is rotated.\n *\n * @param endpointId - Id of the endpoint.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `endpoint_id` is not a UUID.\n * @throws {AuthenticationError} 401 UNAUTHORIZED: Missing or invalid bearer token.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `flags.webhook.read` (reads) or `flags.webhook.manage` (changes, Send test, replay), or Flags is not enabled for the workspace (`SERVICE_NOT_ENABLED`).\n * @throws {NotFoundError} 404 NOT_FOUND, WEBHOOK_ENDPOINT_NOT_FOUND: No such endpoint here (`WEBHOOK_ENDPOINT_NOT_FOUND`).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}\n * @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-webhooks-endpoints-endpoint-id\n * @example\n * ```ts\n * const webhookEndpoint = await flags.webhooks.endpoints.retrieve(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\");\n * ```\n */\n retrieve(endpointId: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.WebhookEndpoint>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}\", pathParams: { endpoint_id: endpointId } }, options);\n }\n /**\n * Rotate the signing secret. The new one is returned once.\n *\n * For `grace_hours` (default 24) the previous secret keeps signing too: `webhook-signature` then lists one `v1,` signature per secret, so receivers can switch over without dropping a delivery.\n *\n * @param endpointId - Id of the endpoint.\n * @param params - `Flags.WebhookEndpointRotateSecretParams`.\n * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `grace_hours` out of range, or `endpoint_id` is not a UUID.\n * @throws {AuthenticationError} 401 UNAUTHORIZED: Missing or invalid bearer token.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `flags.webhook.read` (reads) or `flags.webhook.manage` (changes, Send test, replay), or Flags is not enabled for the workspace (`SERVICE_NOT_ENABLED`).\n * @throws {NotFoundError} 404 NOT_FOUND, WEBHOOK_ENDPOINT_NOT_FOUND: No such endpoint here (`WEBHOOK_ENDPOINT_NOT_FOUND`).\n * @throws {ConflictError} 409 CONFLICT, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: Idempotency-Key reused with a different body (`IDEMPOTENCY_KEY_REUSE`). Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}/rotate-secret\n * @see https://productcraft.co/docs/flags/api-reference#post-v1-workspaces-workspace-id-webhooks-endpoints-endpoint-id-rotate-secret\n * @example\n * ```ts\n * const webhookEndpoint = await flags.webhooks.endpoints.rotateSecret(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", { grace_hours: 24 });\n * ```\n */\n rotateSecret(endpointId: string, params?: T.WebhookEndpointRotateSecretParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.WebhookEndpointWithSecret>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}/rotate-secret\", pathParams: { endpoint_id: endpointId }, body: params, idempotent: true }, options);\n }\n /**\n * Send a test event to this endpoint now and return the result.\n *\n * Delivers the catalogue example of `event_type`, signed like any delivery, with `\"test\": true` in the body. Works while the endpoint is switched off or not subscribed to that type, is logged in the event log, and is never retried or counted toward an automatic disable. Waits up to 15 s for your receiver.\n *\n * @param endpointId - Id of the endpoint.\n * @param params - `Flags.WebhookEndpointTestParams`.\n * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: Unknown `event_type`, or `endpoint_id` is not a UUID.\n * @throws {AuthenticationError} 401 UNAUTHORIZED: Missing or invalid bearer token.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `flags.webhook.read` (reads) or `flags.webhook.manage` (changes, Send test, replay), or Flags is not enabled for the workspace (`SERVICE_NOT_ENABLED`).\n * @throws {NotFoundError} 404 NOT_FOUND, WEBHOOK_ENDPOINT_NOT_FOUND: No such endpoint here (`WEBHOOK_ENDPOINT_NOT_FOUND`).\n * @throws {ConflictError} 409 CONFLICT, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: Idempotency-Key reused with a different body (`IDEMPOTENCY_KEY_REUSE`). Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}/test\n * @see https://productcraft.co/docs/flags/api-reference#post-v1-workspaces-workspace-id-webhooks-endpoints-endpoint-id-test\n * @example\n * ```ts\n * const webhookDeliveryAttempt = await flags.webhooks.endpoints.test(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", { event_type: \"config.published\" });\n * ```\n */\n test(endpointId: string, params: T.WebhookEndpointTestParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.WebhookDeliveryAttempt>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}/test\", pathParams: { endpoint_id: endpointId }, body: params, idempotent: true }, options);\n }\n /**\n * Change a webhook endpoint: URL, description, events, on/off.\n *\n * Only the fields sent change. `enabled: true` (or a new URL) also clears an automatic disable. Switching off cancels queued retries. The secret is unchanged; rotate it with `POST …/rotate-secret`.\n *\n * @param endpointId - Id of the endpoint.\n * @param params - `Flags.WebhookEndpointUpdateParams`.\n * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: Validation failure, or `endpoint_id` is not a UUID.\n * @throws {AuthenticationError} 401 UNAUTHORIZED: Missing or invalid bearer token.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `flags.webhook.read` (reads) or `flags.webhook.manage` (changes, Send test, replay), or Flags is not enabled for the workspace (`SERVICE_NOT_ENABLED`).\n * @throws {NotFoundError} 404 NOT_FOUND, WEBHOOK_ENDPOINT_NOT_FOUND: No such endpoint here (`WEBHOOK_ENDPOINT_NOT_FOUND`).\n * @throws {ConflictError} 409 CONFLICT, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: Idempotency-Key reused with a different body (`IDEMPOTENCY_KEY_REUSE`). Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).\n * @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY: The new URL points at a private, loopback or internal address.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see PATCH /v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}\n * @see https://productcraft.co/docs/flags/api-reference#patch-v1-workspaces-workspace-id-webhooks-endpoints-endpoint-id\n * @example\n * ```ts\n * const webhookEndpoint = await flags.webhooks.endpoints.update(\"3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f\", { config_id: \"9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b\" });\n * ```\n */\n update(endpointId: string, params?: T.WebhookEndpointUpdateParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.WebhookEndpoint>> {\n return this._client.request({ method: \"PATCH\", path: \"/v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}\", pathParams: { endpoint_id: endpointId }, body: params, idempotent: true }, options);\n }\n}\n\n/** `webhooks.eventTypes` */\nexport class WebhooksEventTypesResource extends APIResource {\n /**\n * List the events an endpoint can subscribe to.\n *\n * Each type with a plain description, its group and an example `data` object (what \"Send test\" delivers).\n *\n * @param options - Per-request options.\n * @throws {AuthenticationError} 401 UNAUTHORIZED: Missing or invalid bearer token.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `flags.webhook.read` (reads) or `flags.webhook.manage` (changes, Send test, replay), or Flags is not enabled for the workspace (`SERVICE_NOT_ENABLED`).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/webhooks/event-types\n * @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-webhooks-event-types\n * @example\n * ```ts\n * const webhookEventTypeList = await flags.webhooks.eventTypes.list();\n * ```\n */\n list(options?: RequestOptions): APIPromise<T.WithLastResponse<T.WebhookEventTypeList>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/webhooks/event-types\" }, options);\n }\n}\n\n/** `webhooks.events` */\nexport class WebhooksEventsResource extends APIResource {\n /**\n * List webhook events, newest first (kept for 30 days).\n *\n * Every event logged while at least one endpoint existed, with the latest state per endpoint and when the next retry is due.\n *\n * @param params - `Flags.WebhookEventListParams`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: Invalid filter value or cursor.\n * @throws {AuthenticationError} 401 UNAUTHORIZED: Missing or invalid bearer token.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `flags.webhook.read` (reads) or `flags.webhook.manage` (changes, Send test, replay), or Flags is not enabled for the workspace (`SERVICE_NOT_ENABLED`).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/webhooks/events\n * @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-webhooks-events\n * @example\n * ```ts\n * for await (const event of flags.webhooks.events.list()) {\n * console.log(event);\n * }\n * const page = await flags.webhooks.events.list({}, { timeout: 5_000 });\n * ```\n */\n list(params?: T.WebhookEventListParams, options?: RequestOptions): PagePromise<T.WebhookEvent> {\n return this._client.list({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/webhooks/events\", query: params }, options);\n }\n /**\n * Send a logged event again, to its endpoints or to one endpoint.\n *\n * Same body and `webhook-id`, freshly signed, to every switched-on endpoint that receives this event type now, or only to `endpoint_id`. Waits for the receivers (up to 15 s each) and returns the attempts. A success cancels a retry still queued for that endpoint.\n *\n * @param eventId - The event id, `evt_<uuid>`.\n * @param params - `Flags.WebhookEventReplayParams`.\n * @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `event_id` is not `evt_<uuid>`, or `endpoint_id` is not a UUID.\n * @throws {AuthenticationError} 401 UNAUTHORIZED: Missing or invalid bearer token.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `flags.webhook.read` (reads) or `flags.webhook.manage` (changes, Send test, replay), or Flags is not enabled for the workspace (`SERVICE_NOT_ENABLED`).\n * @throws {NotFoundError} 404 NOT_FOUND, WEBHOOK_EVENT_NOT_FOUND, WEBHOOK_ENDPOINT_NOT_FOUND: No such event here (`WEBHOOK_EVENT_NOT_FOUND`); events are kept for 30 days. Or No such endpoint here (`WEBHOOK_ENDPOINT_NOT_FOUND`).\n * @throws {ConflictError} 409 CONFLICT, WEBHOOK_ENDPOINT_NOT_SUBSCRIBED, IDEMPOTENCY_KEY_REUSE, IDEMPOTENCY_IN_PROGRESS: `endpoint_id` is switched off or does not receive this event type (`WEBHOOK_ENDPOINT_NOT_SUBSCRIBED`), or Idempotency-Key reused with a different body (`IDEMPOTENCY_KEY_REUSE`). Idempotency: `IDEMPOTENCY_KEY_REUSE` when this `Idempotency-Key` was already used with a different body or route; `IDEMPOTENCY_IN_PROGRESS` while another request with the same key is still running (retry after `Retry-After` seconds, with the same key).\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see POST /v1/workspaces/{workspace_id}/webhooks/events/{event_id}/replay\n * @see https://productcraft.co/docs/flags/api-reference#post-v1-workspaces-workspace-id-webhooks-events-event-id-replay\n * @example\n * ```ts\n * const webhookEventReplay = await flags.webhooks.events.replay(\"3f0c1a2b-4c5d-4e6f-8a9b-0c1d2e3f4a5b\");\n * ```\n */\n replay(eventId: string, params?: T.WebhookEventReplayParams, options?: RequestOptions): APIPromise<T.WithLastResponse<T.WebhookEventReplay>> {\n return this._client.request({ method: \"POST\", path: \"/v1/workspaces/{workspace_id}/webhooks/events/{event_id}/replay\", pathParams: { event_id: eventId }, query: params, idempotent: true }, options);\n }\n /**\n * Get one webhook event with every delivery attempt.\n *\n * The event as it was sent (`type`, `data`) and every delivery attempt to every endpoint, with its trigger, HTTP status, error and the start of the response body. Use it to debug a receiver, then `replay` to send it again.\n *\n * @param eventId - The event id, `evt_<uuid>`.\n * @param options - Per-request options.\n * @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `event_id` is not `evt_<uuid>`.\n * @throws {AuthenticationError} 401 UNAUTHORIZED: Missing or invalid bearer token.\n * @throws {PermissionDeniedError} 403 FORBIDDEN, SERVICE_NOT_ENABLED: Caller lacks `flags.webhook.read` (reads) or `flags.webhook.manage` (changes, Send test, replay), or Flags is not enabled for the workspace (`SERVICE_NOT_ENABLED`).\n * @throws {NotFoundError} 404 NOT_FOUND, WEBHOOK_EVENT_NOT_FOUND: No such event here (`WEBHOOK_EVENT_NOT_FOUND`); events are kept for 30 days.\n * @throws {RateLimitError} 429 RATE_LIMITED: More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds.\n * @see GET /v1/workspaces/{workspace_id}/webhooks/events/{event_id}\n * @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-webhooks-events-event-id\n * @example\n * ```ts\n * const webhookEventDetail = await flags.webhooks.events.retrieve(\"3f0c1a2b-4c5d-4e6f-8a9b-0c1d2e3f4a5b\");\n * ```\n */\n retrieve(eventId: string, options?: RequestOptions): APIPromise<T.WithLastResponse<T.WebhookEventDetail>> {\n return this._client.request({ method: \"GET\", path: \"/v1/workspaces/{workspace_id}/webhooks/events/{event_id}\", pathParams: { event_id: eventId } }, options);\n }\n}\n\n/** `webhooks` */\nexport class WebhooksResource extends APIResource {\n #endpoints?: WebhooksEndpointsResource;\n #eventTypes?: WebhooksEventTypesResource;\n #events?: WebhooksEventsResource;\n get endpoints(): WebhooksEndpointsResource {\n return (this.#endpoints ??= new WebhooksEndpointsResource(this._client, this._b));\n }\n get eventTypes(): WebhooksEventTypesResource {\n return (this.#eventTypes ??= new WebhooksEventTypesResource(this._client, this._b));\n }\n get events(): WebhooksEventsResource {\n return (this.#events ??= new WebhooksEventsResource(this._client, this._b));\n }\n /**\n * Verify a webhook's signature and parse it (Standard Webhooks, and the legacy `t=…,v1=…` scheme).\n *\n * @param params - The raw body, the request headers and optionally the secret.\n * @throws {WebhookVerificationError} The signature, timestamp or payload is invalid.\n * @throws {ConfigurationError} No secret was passed or configured.\n */\n unwrap(params: WebhookUnwrapParams): Promise<UnwrapWebhookEvent> {\n return this._client.unwrapWebhook<UnwrapWebhookEvent>(params, \"PRODUCTCRAFT_FLAGS_WEBHOOK_SECRET\");\n }\n /**\n * Sign a test event the way ProductCraft signs deliveries (Standard Webhooks), so a handler\n * test can call `unwrap` without a live delivery. Returns the exact body and the headers.\n *\n * @param params - The event (an object is JSON-encoded), and optionally the secret, `id` and `timestamp`.\n * @throws {ConfigurationError} No secret was passed or configured.\n */\n sign(params: WebhookSignParams): Promise<SignedWebhook> {\n return this._client.signWebhook(params, \"PRODUCTCRAFT_FLAGS_WEBHOOK_SECRET\");\n }\n}\n\n/** `flags` */\nexport class FlagsResources extends APIResource {\n #changes?: ChangesResource;\n #configs?: ConfigsResource;\n #imports?: ImportsResource;\n #limits?: LimitsResource;\n #projects?: ProjectsResource;\n #segments?: SegmentsResource;\n #settings?: SettingsResource;\n #stats?: StatsResource;\n #webhooks?: WebhooksResource;\n get changes(): ChangesResource {\n return (this.#changes ??= new ChangesResource(this._client, this._b));\n }\n get configs(): ConfigsResource {\n return (this.#configs ??= new ConfigsResource(this._client, this._b));\n }\n get imports(): ImportsResource {\n return (this.#imports ??= new ImportsResource(this._client, this._b));\n }\n get limits(): LimitsResource {\n return (this.#limits ??= new LimitsResource(this._client, this._b));\n }\n get projects(): ProjectsResource {\n return (this.#projects ??= new ProjectsResource(this._client, this._b));\n }\n get segments(): SegmentsResource {\n return (this.#segments ??= new SegmentsResource(this._client, this._b));\n }\n get settings(): SettingsResource {\n return (this.#settings ??= new SettingsResource(this._client, this._b));\n }\n get stats(): StatsResource {\n return (this.#stats ??= new StatsResource(this._client, this._b));\n }\n get webhooks(): WebhooksResource {\n return (this.#webhooks ??= new WebhooksResource(this._client, this._b));\n }\n}\n","// Generated by scripts/gen-sdk.mjs from Specs/flags.json. Do not edit.\n\nimport type { LastResponse } from \"@productcraft/core\";\nimport type { components, paths } from \"./paths.js\";\n\ntype IsUnion<T, U = T> = T extends unknown ? ([U] extends [T] ? false : true) : never;\ntype OpenString<T extends string> = string extends T ? T : true extends IsUnion<T> ? T | (string & {}) : T;\ntype OpenValue<T> = [T] extends [string] ? OpenString<T> : T extends readonly (infer I)[] ? (OpenValue<Exclude<I, null | undefined>> | Extract<I, null | undefined>)[] : T extends object ? { [K in keyof T]: OpenValue<Exclude<T[K], null | undefined>> | Extract<T[K], null | undefined> } : T;\n/** A response type: string-literal unions also accept values added after this SDK was built. */\nexport type Open<T> = OpenValue<Exclude<T, null | undefined>> | Extract<T, null | undefined>;\n/** What a method resolves to: the parsed body plus non-enumerable `lastResponse`. */\nexport type WithLastResponse<T> = T & { readonly lastResponse: LastResponse };\n/** Params inside a scope bound with `.as(actorId)`: `actor_id` may be left out. */\nexport type WithOptionalActor<P> = P extends { actor_id: unknown } ? Omit<P, \"actor_id\"> & { actor_id?: P[\"actor_id\"] } : P;\n/** A polled model whose free-form `K` the caller types as `R` (`createAndPoll<R>`); optional and nullable stay as declared. */\nexport type WithResult<M, K extends keyof M, R> = Omit<M, K> & { [P in keyof M as P extends K ? P : never]: R | Extract<M[P], null> };\n\nexport type FlagsActorType = components[\"schemas\"][\"FlagsActorType\"];\nexport const FlagsActorType = { values: [\"user\", \"api_key\", \"system\"] as const };\n\nexport type FlagsChangeActorType = components[\"schemas\"][\"FlagsChangeActorType\"];\nexport const FlagsChangeActorType = { values: [\"user\", \"api_key\", \"system\"] as const };\n\nexport type FlagsEnvironmentPreset = components[\"schemas\"][\"FlagsEnvironmentPreset\"];\nexport const FlagsEnvironmentPreset = { values: [\"dev_prod\", \"dev_staging_prod\"] as const };\n\nexport type FlagsEvaluationErrorCode = components[\"schemas\"][\"FlagsEvaluationErrorCode\"];\nexport const FlagsEvaluationErrorCode = { values: [\"FLAG_NOT_FOUND\", \"TYPE_MISMATCH\", \"PREREQUISITE_CYCLE\", \"PREREQUISITE_NOT_FOUND\", \"PREREQUISITE_DEPTH\", \"GENERAL\"] as const };\n\nexport type FlagsEvaluationReason = components[\"schemas\"][\"FlagsEvaluationReason\"];\nexport const FlagsEvaluationReason = { values: [\"STATIC\", \"TARGETING_MATCH\", \"SPLIT\", \"DEFAULT\", \"ERROR\"] as const };\n\nexport type FlagsEvaluationWarningCode = components[\"schemas\"][\"FlagsEvaluationWarningCode\"];\nexport const FlagsEvaluationWarningCode = { values: [\"missing_user\", \"missing_attribute\", \"invalid_attribute\", \"unknown_comparator\", \"missing_percentage_attribute\"] as const };\n\nexport type FlagsHistoryExportFormat = components[\"schemas\"][\"FlagsHistoryExportFormat\"];\nexport const FlagsHistoryExportFormat = { values: [\"csv\", \"json\"] as const };\n\nexport type FlagsImportMappedType = components[\"schemas\"][\"FlagsImportMappedType\"];\nexport const FlagsImportMappedType = { values: [\"environment\", \"config\", \"segment\", \"setting\"] as const };\n\nexport type FlagsImportSource = components[\"schemas\"][\"FlagsImportSource\"];\nexport const FlagsImportSource = { values: [\"configcat\"] as const };\n\nexport type FlagsJsonPatchOp = components[\"schemas\"][\"FlagsJsonPatchOp\"];\nexport const FlagsJsonPatchOp = { values: [\"add\", \"remove\", \"replace\"] as const };\n\nexport type FlagsPrerequisiteComparator = components[\"schemas\"][\"FlagsPrerequisiteComparator\"];\nexport const FlagsPrerequisiteComparator = { values: [\"eq\", \"neq\"] as const };\n\nexport type FlagsSdkKeyRotationReason = components[\"schemas\"][\"FlagsSdkKeyRotationReason\"];\nexport const FlagsSdkKeyRotationReason = { values: [\"rotated\", \"grace_ended\"] as const };\n\nexport type FlagsSdkKeySlot = components[\"schemas\"][\"FlagsSdkKeySlot\"];\nexport const FlagsSdkKeySlot = { values: [\"primary\", \"secondary\"] as const };\n\nexport type FlagsSegmentComparator = components[\"schemas\"][\"FlagsSegmentComparator\"];\nexport const FlagsSegmentComparator = { values: [\"in\", \"not_in\"] as const };\n\nexport type FlagsSettingLifecycle = components[\"schemas\"][\"FlagsSettingLifecycle\"];\nexport const FlagsSettingLifecycle = { values: [\"temporary\", \"permanent\"] as const };\n\nexport type FlagsSettingType = components[\"schemas\"][\"FlagsSettingType\"];\nexport const FlagsSettingType = { values: [\"boolean\", \"string\", \"integer\", \"number\", \"json\"] as const };\n\nexport type FlagsUserComparator = components[\"schemas\"][\"FlagsUserComparator\"];\nexport const FlagsUserComparator = { values: [\"eq\", \"neq\", \"one_of\", \"not_one_of\", \"contains_any\", \"not_contains_any\", \"starts_with_any\", \"not_starts_with_any\", \"ends_with_any\", \"not_ends_with_any\", \"semver_one_of\", \"semver_not_one_of\", \"semver_lt\", \"semver_lte\", \"semver_gt\", \"semver_gte\", \"num_eq\", \"num_neq\", \"num_lt\", \"num_lte\", \"num_gt\", \"num_gte\", \"before\", \"after\", \"array_contains_any\", \"array_not_contains_any\", \"eq_hashed\", \"neq_hashed\", \"one_of_hashed\", \"not_one_of_hashed\", \"starts_with_any_hashed\", \"not_starts_with_any_hashed\", \"ends_with_any_hashed\", \"not_ends_with_any_hashed\", \"array_contains_any_hashed\", \"array_not_contains_any_hashed\"] as const };\n\nexport type FlagsWebhookActorType = components[\"schemas\"][\"FlagsWebhookActorType\"];\nexport const FlagsWebhookActorType = { values: [\"user\", \"api_key\", \"system\"] as const };\n\nexport type SdkKeySlot = components[\"schemas\"][\"SdkKeySlot\"];\nexport const SdkKeySlot = { values: [\"primary\", \"secondary\"] as const };\n\nexport type WebhookAttemptTrigger = components[\"schemas\"][\"WebhookAttemptTrigger\"];\nexport const WebhookAttemptTrigger = { values: [\"automatic\", \"replay\", \"test\"] as const };\n\nexport type WebhookEndpointDisabledReason = components[\"schemas\"][\"WebhookEndpointDisabledReason\"];\nexport const WebhookEndpointDisabledReason = { values: [\"manual\", \"failing\"] as const };\n\nexport type WebhookEndpointStatus = components[\"schemas\"][\"WebhookEndpointStatus\"];\nexport const WebhookEndpointStatus = { values: [\"enabled\", \"disabled\", \"auto_disabled\"] as const };\n\nexport type WebhookEventStatus = components[\"schemas\"][\"WebhookEventStatus\"];\nexport const WebhookEventStatus = { values: [\"pending\", \"delivered\", \"failed\", \"not_sent\"] as const };\n\n/**\n * Every event type this product sends; `x-webhooks` maps each to its payload schema. New types can be added, so treat it as open.\n */\nexport type WebhookEventType = components[\"schemas\"][\"WebhookEventType\"];\nexport const WebhookEventType = { values: [\"config.published\", \"sdk_key.rotated\"] as const };\n\nexport interface ChangeActor extends Open<components[\"schemas\"][\"ChangeActorDto\"]> {}\nexport interface ChangeDetail extends Open<components[\"schemas\"][\"ChangeDetailResponseDto\"]> {}\nexport interface ChangeList extends Open<components[\"schemas\"][\"ChangeListResponseDto\"]> {}\nexport interface Change extends Open<components[\"schemas\"][\"ChangeResponseDto\"]> {}\nexport interface ChangeRevision extends Open<components[\"schemas\"][\"ChangeRevisionDto\"]> {}\nexport interface CompareEnvironment extends Open<components[\"schemas\"][\"CompareEnvironmentDto\"]> {}\nexport interface Compare extends Open<components[\"schemas\"][\"CompareResponseDto\"]> {}\nexport interface CompareRow extends Open<components[\"schemas\"][\"CompareRowDto\"]> {}\nexport interface ConfidentialList extends Open<components[\"schemas\"][\"ConfidentialListDto\"]> {}\nexport interface ConfidentialReveal extends Open<components[\"schemas\"][\"ConfidentialRevealResponseDto\"]> {}\nexport interface ConfigList extends Open<components[\"schemas\"][\"ConfigListResponseDto\"]> {}\nexport interface ConfigPublishedEventData extends Open<components[\"schemas\"][\"ConfigPublishedEventDataDto\"]> {}\nexport interface Config extends Open<components[\"schemas\"][\"ConfigResponseDto\"]> {}\nexport interface ConfigRevisionList extends Open<components[\"schemas\"][\"ConfigRevisionListResponseDto\"]> {}\nexport interface ConfigRevision extends Open<components[\"schemas\"][\"ConfigRevisionResponseDto\"]> {}\nexport interface CopiedSetting extends Open<components[\"schemas\"][\"CopiedSettingDto\"]> {}\nexport interface CopyEnvironment extends Open<components[\"schemas\"][\"CopyEnvironmentResponseDto\"]> {}\nexport interface EnvironmentList extends Open<components[\"schemas\"][\"EnvironmentListResponseDto\"]> {}\nexport interface Environment extends Open<components[\"schemas\"][\"EnvironmentResponseDto\"]> {}\nexport interface EnvironmentValueList extends Open<components[\"schemas\"][\"EnvironmentValueListResponseDto\"]> {}\nexport interface EnvironmentValueRow extends Open<components[\"schemas\"][\"EnvironmentValueRowDto\"]> {}\nexport interface EvaluationResult extends Open<components[\"schemas\"][\"EvaluationResultDto\"]> {}\nexport interface EvaluationWarning extends Open<components[\"schemas\"][\"EvaluationWarningDto\"]> {}\nexport interface FlagsHistoryUsage extends Open<components[\"schemas\"][\"FlagsHistoryUsageDto\"]> {}\nexport interface FlagsLimit extends Open<components[\"schemas\"][\"FlagsLimitDto\"]> {}\nexport interface FlagsLimits extends Open<components[\"schemas\"][\"FlagsLimitsResponseDto\"]> {}\nexport interface FlagsPagination extends Open<components[\"schemas\"][\"FlagsPaginationDto\"]> {}\nexport interface FlagsProjectUsage extends Open<components[\"schemas\"][\"FlagsProjectUsageDto\"]> {}\nexport interface FlagsStats extends Open<components[\"schemas\"][\"FlagsStatsResponseDto\"]> {}\nexport interface FlagsUsage extends Open<components[\"schemas\"][\"FlagsUsageDto\"]> {}\nexport interface FlagsWebhookActor extends Open<components[\"schemas\"][\"FlagsWebhookActorDto\"]> {}\nexport interface FlagsWebhookChange extends Open<components[\"schemas\"][\"FlagsWebhookChangeDto\"]> {}\nexport interface FlagsWebhookConfig extends Open<components[\"schemas\"][\"FlagsWebhookConfigDto\"]> {}\nexport interface FlagsWebhookEnvironment extends Open<components[\"schemas\"][\"FlagsWebhookEnvironmentDto\"]> {}\nexport interface FlagsWebhookProject extends Open<components[\"schemas\"][\"FlagsWebhookProjectDto\"]> {}\nexport interface HashedValuesView extends Open<components[\"schemas\"][\"HashedValuesViewDto\"]> {}\nexport interface ImportCounts extends Open<components[\"schemas\"][\"ImportCountsDto\"]> {}\nexport interface ImportMappedItem extends Open<components[\"schemas\"][\"ImportMappedItemDto\"]> {}\nexport interface ImportReport extends Open<components[\"schemas\"][\"ImportReportDto\"]> {}\nexport interface Import extends Open<components[\"schemas\"][\"ImportResponseDto\"]> {}\nexport interface ImportUnsupportedItem extends Open<components[\"schemas\"][\"ImportUnsupportedItemDto\"]> {}\nexport interface ImportWarning extends Open<components[\"schemas\"][\"ImportWarningDto\"]> {}\nexport interface JsonPatchOperation extends Open<components[\"schemas\"][\"JsonPatchOperationDto\"]> {}\nexport interface WebhookEndpointList extends Open<components[\"schemas\"][\"ListWebhookEndpointsResponseDto\"]> {}\n/** @deprecated Renamed to `WebhookEndpointList`. Kept for 1.x callers; removed in the next major. */\nexport type ListWebhookEndpoints = WebhookEndpointList;\nexport interface WebhookEventTypeList extends Open<components[\"schemas\"][\"ListWebhookEventTypesResponseDto\"]> {}\n/** @deprecated Renamed to `WebhookEventTypeList`. Kept for 1.x callers; removed in the next major. */\nexport type ListWebhookEventTypes = WebhookEventTypeList;\nexport interface WebhookEventList extends Open<components[\"schemas\"][\"ListWebhookEventsResponseDto\"]> {}\n/** @deprecated Renamed to `WebhookEventList`. Kept for 1.x callers; removed in the next major. */\nexport type ListWebhookEvents = WebhookEventList;\nexport interface PercentageOption extends Open<components[\"schemas\"][\"PercentageOptionDto\"]> {}\nexport interface PrerequisiteConditionBody extends Open<components[\"schemas\"][\"PrerequisiteConditionBodyDto\"]> {}\nexport interface PrerequisiteCondition extends Open<components[\"schemas\"][\"PrerequisiteConditionDto\"]> {}\nexport interface ProjectList extends Open<components[\"schemas\"][\"ProjectListResponseDto\"]> {}\nexport interface Project extends Open<components[\"schemas\"][\"ProjectResponseDto\"]> {}\nexport interface WebhookEventReplay extends Open<components[\"schemas\"][\"ReplayWebhookEventResponseDto\"]> {}\n/** @deprecated Renamed to `WebhookEventReplay`. Kept for 1.x callers; removed in the next major. */\nexport type ReplayWebhookEvent = WebhookEventReplay;\nexport interface RevealedSdkKey extends Open<components[\"schemas\"][\"RevealedSdkKeyDto\"]> {}\nexport interface RevealedSdkKeyList extends Open<components[\"schemas\"][\"RevealedSdkKeyListResponseDto\"]> {}\nexport interface SdkKeyList extends Open<components[\"schemas\"][\"SdkKeyListResponseDto\"]> {}\nexport interface SdkKey extends Open<components[\"schemas\"][\"SdkKeyResponseDto\"]> {}\nexport interface SdkKeyRotatedEventData extends Open<components[\"schemas\"][\"SdkKeyRotatedEventDataDto\"]> {}\nexport interface SegmentConditionBody extends Open<components[\"schemas\"][\"SegmentConditionBodyDto\"]> {}\nexport interface SegmentCondition extends Open<components[\"schemas\"][\"SegmentConditionDto\"]> {}\nexport interface SegmentDetail extends Open<components[\"schemas\"][\"SegmentDetailResponseDto\"]> {}\nexport interface SegmentList extends Open<components[\"schemas\"][\"SegmentListResponseDto\"]> {}\nexport interface Segment extends Open<components[\"schemas\"][\"SegmentResponseDto\"]> {}\nexport interface SegmentUse extends Open<components[\"schemas\"][\"SegmentUseDto\"]> {}\nexport interface ServeRule extends Open<components[\"schemas\"][\"ServeRuleDto\"]> {}\nexport interface SettingDependent extends Open<components[\"schemas\"][\"SettingDependentDto\"]> {}\nexport interface SettingDependents extends Open<components[\"schemas\"][\"SettingDependentsDto\"]> {}\nexport interface SettingDetail extends Open<components[\"schemas\"][\"SettingDetailResponseDto\"]> {}\nexport interface SettingList extends Open<components[\"schemas\"][\"SettingListResponseDto\"]> {}\nexport interface Setting extends Open<components[\"schemas\"][\"SettingResponseDto\"]> {}\nexport interface SettingState extends Open<components[\"schemas\"][\"SettingStateDto\"]> {}\nexport interface SettingUpdatedBy extends Open<components[\"schemas\"][\"SettingUpdatedByDto\"]> {}\nexport interface SettingValue extends Open<components[\"schemas\"][\"SettingValueResponseDto\"]> {}\nexport interface SplitRule extends Open<components[\"schemas\"][\"SplitRuleDto\"]> {}\nexport interface TestEvaluation extends Open<components[\"schemas\"][\"TestEvaluationResponseDto\"]> {}\nexport interface UserConditionBody extends Open<components[\"schemas\"][\"UserConditionBodyDto\"]> {}\nexport interface UserCondition extends Open<components[\"schemas\"][\"UserConditionDto\"]> {}\nexport interface WebhookDeliveryAttempt extends Open<components[\"schemas\"][\"WebhookDeliveryAttemptDto\"]> {}\nexport interface WebhookEndpoint extends Open<components[\"schemas\"][\"WebhookEndpointDto\"]> {}\nexport interface WebhookEndpointWithSecret extends Open<components[\"schemas\"][\"WebhookEndpointWithSecretDto\"]> {}\nexport interface WebhookEventDelivery extends Open<components[\"schemas\"][\"WebhookEventDeliveryDto\"]> {}\nexport interface WebhookEventDetail extends Open<components[\"schemas\"][\"WebhookEventDetailDto\"]> {}\nexport interface WebhookEvent extends Open<components[\"schemas\"][\"WebhookEventDto\"]> {}\nexport interface WebhookEventTypeInfo extends Open<components[\"schemas\"][\"WebhookEventTypeDto\"]> {}\nexport interface WebhookPagination extends Open<components[\"schemas\"][\"WebhookPaginationDto\"]> {}\n\n/** Params for `changes.revert` (POST /v1/workspaces/{workspace_id}/changes/{change_id}/revert). */\nexport type ChangeRevertParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/changes/{change_id}/revert\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `configs.update` (PATCH /v1/workspaces/{workspace_id}/configs/{config_id}). */\nexport type ConfigUpdateParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/configs/{config_id}\"][\"patch\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `configs.delete` (DELETE /v1/workspaces/{workspace_id}/configs/{config_id}). */\nexport type ConfigDeleteParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/configs/{config_id}\"][\"delete\"][\"parameters\"][\"query\"]>;\n/** Params for `configs.compare` (GET /v1/workspaces/{workspace_id}/configs/{config_id}/compare). */\nexport type ConfigCompareParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/configs/{config_id}/compare\"][\"get\"][\"parameters\"][\"query\"]>;\n/** Params for `configs.environments.copy` (POST /v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/copy). */\nexport type ConfigEnvironmentCopyParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/copy\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `configs.environments.evaluate` (POST /v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/evaluate). */\nexport type ConfigEnvironmentEvaluateParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/evaluate\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `configs.environments.revisions.list` (GET /v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/revisions). */\nexport type ConfigEnvironmentRevisionListParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/revisions\"][\"get\"][\"parameters\"][\"query\"]>;\n/** Response of `configs.environments.revisions.retrieve`. */\nexport type ConfigEnvironmentRevisionRetrieveResponse = Open<paths[\"/v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/revisions/{revision}\"][\"get\"][\"responses\"][200][\"content\"][\"application/json\"]>;\n/** Params for `configs.environments.sdkKeys.rotate` (POST /v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/sdk-keys/rotate). */\nexport type ConfigEnvironmentSdkKeyRotateParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/sdk-keys/rotate\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `configs.environments.values.list` (GET /v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/values). */\nexport type ConfigEnvironmentValueListParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/values\"][\"get\"][\"parameters\"][\"query\"]>;\n/** Params for `configs.settings.list` (GET /v1/workspaces/{workspace_id}/configs/{config_id}/settings). */\nexport type ConfigSettingsListParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/configs/{config_id}/settings\"][\"get\"][\"parameters\"][\"query\"]>;\n/** Params for `configs.settings.create` (POST /v1/workspaces/{workspace_id}/configs/{config_id}/settings). */\nexport type ConfigSettingsCreateParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/configs/{config_id}/settings\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `imports.create` (POST /v1/workspaces/{workspace_id}/imports). */\nexport type ImportCreateParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/imports\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `projects.list` (GET /v1/workspaces/{workspace_id}/projects). */\nexport type ProjectListParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/projects\"][\"get\"][\"parameters\"][\"query\"]>;\n/** Params for `projects.create` (POST /v1/workspaces/{workspace_id}/projects). */\nexport type ProjectCreateParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/projects\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `projects.update` (PATCH /v1/workspaces/{workspace_id}/projects/{project_id}). */\nexport type ProjectUpdateParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/projects/{project_id}\"][\"patch\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `projects.delete` (DELETE /v1/workspaces/{workspace_id}/projects/{project_id}). */\nexport type ProjectDeleteParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/projects/{project_id}\"][\"delete\"][\"parameters\"][\"query\"]>;\n/** Params for `projects.changes.list` (GET /v1/workspaces/{workspace_id}/projects/{project_id}/changes). */\nexport type ProjectChangeListParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/projects/{project_id}/changes\"][\"get\"][\"parameters\"][\"query\"]>;\n/** Params for `projects.changes.export` (GET /v1/workspaces/{workspace_id}/projects/{project_id}/changes/export). */\nexport type ProjectChangeExportParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/projects/{project_id}/changes/export\"][\"get\"][\"parameters\"][\"query\"]>;\n/** Params for `projects.configs.list` (GET /v1/workspaces/{workspace_id}/projects/{project_id}/configs). */\nexport type ProjectConfigListParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/projects/{project_id}/configs\"][\"get\"][\"parameters\"][\"query\"]>;\n/** Params for `projects.configs.create` (POST /v1/workspaces/{workspace_id}/projects/{project_id}/configs). */\nexport type ProjectConfigCreateParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/projects/{project_id}/configs\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `projects.environments.create` (POST /v1/workspaces/{workspace_id}/projects/{project_id}/environments). */\nexport type ProjectEnvironmentCreateParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/projects/{project_id}/environments\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `projects.environments.update` (PATCH /v1/workspaces/{workspace_id}/projects/{project_id}/environments/{environment_id}). */\nexport type ProjectEnvironmentUpdateParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/projects/{project_id}/environments/{environment_id}\"][\"patch\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `projects.environments.delete` (DELETE /v1/workspaces/{workspace_id}/projects/{project_id}/environments/{environment_id}). */\nexport type ProjectEnvironmentDeleteParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/projects/{project_id}/environments/{environment_id}\"][\"delete\"][\"parameters\"][\"query\"]>;\n/** Params for `projects.segments.list` (GET /v1/workspaces/{workspace_id}/projects/{project_id}/segments). */\nexport type ProjectSegmentListParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/projects/{project_id}/segments\"][\"get\"][\"parameters\"][\"query\"]>;\n/** Params for `projects.segments.create` (POST /v1/workspaces/{workspace_id}/projects/{project_id}/segments). */\nexport type ProjectSegmentCreateParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/projects/{project_id}/segments\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `segments.update` (PATCH /v1/workspaces/{workspace_id}/segments/{segment_id}). */\nexport type SegmentUpdateParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/segments/{segment_id}\"][\"patch\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `segments.delete` (DELETE /v1/workspaces/{workspace_id}/segments/{segment_id}). */\nexport type SegmentDeleteParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/segments/{segment_id}\"][\"delete\"][\"parameters\"][\"query\"]>;\n/** Params for `settings.update` (PATCH /v1/workspaces/{workspace_id}/settings/{setting_id}). */\nexport type SettingsUpdateParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/settings/{setting_id}\"][\"patch\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `settings.delete` (DELETE /v1/workspaces/{workspace_id}/settings/{setting_id}). */\nexport type SettingsDeleteParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/settings/{setting_id}\"][\"delete\"][\"parameters\"][\"query\"]>;\n/** Params for `settings.values.replace` (PUT /v1/workspaces/{workspace_id}/settings/{setting_id}/values/{environment_id}). */\nexport type SettingsValueReplaceParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/settings/{setting_id}/values/{environment_id}\"][\"put\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `settings.values.update` (PATCH /v1/workspaces/{workspace_id}/settings/{setting_id}/values/{environment_id}). */\nexport type SettingsValueUpdateParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/settings/{setting_id}/values/{environment_id}\"][\"patch\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `webhooks.endpoints.create` (POST /v1/workspaces/{workspace_id}/webhooks/endpoints). */\nexport type WebhookEndpointCreateParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/webhooks/endpoints\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `webhooks.endpoints.update` (PATCH /v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}). */\nexport type WebhookEndpointUpdateParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}\"][\"patch\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `webhooks.endpoints.rotateSecret` (POST /v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}/rotate-secret). */\nexport type WebhookEndpointRotateSecretParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}/rotate-secret\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `webhooks.endpoints.test` (POST /v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}/test). */\nexport type WebhookEndpointTestParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}/test\"][\"post\"][\"requestBody\"]>[\"content\"][\"application/json\"];\n/** Params for `webhooks.events.list` (GET /v1/workspaces/{workspace_id}/webhooks/events). */\nexport type WebhookEventListParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/webhooks/events\"][\"get\"][\"parameters\"][\"query\"]>;\n/** Params for `webhooks.events.replay` (POST /v1/workspaces/{workspace_id}/webhooks/events/{event_id}/replay). */\nexport type WebhookEventReplayParams = NonNullable<paths[\"/v1/workspaces/{workspace_id}/webhooks/events/{event_id}/replay\"][\"post\"][\"parameters\"][\"query\"]>;\n","// Generated by scripts/gen-sdk.mjs from Specs/flags.json. Do not edit.\n\nimport { APIClient, createOpenAPIClient, PC_BASE_URL, type ClientOptions, type ClientOptions as CoreClientOptions, type PollOptions as CorePollOptions, type RequestOptions as CoreRequestOptions } from \"@productcraft/core\";\nimport type { APIPromise as CoreAPIPromise, LastResponse as CoreLastResponse, Page as CorePage, PagePromise as CorePagePromise, RateLimitInfo as CoreRateLimitInfo, WithResponse as CoreWithResponse } from \"@productcraft/core\";\nimport type { Client } from \"openapi-fetch\";\nimport type * as E from \"./errors.js\";\nimport type { paths } from \"./paths.js\";\nimport { FlagsResources } from \"./resources.js\";\nimport * as T from \"./types.js\";\nimport type * as W from \"./webhooks.js\";\n\ndeclare const __PC_SDK_VERSION__: string | undefined;\nconst VERSION = typeof __PC_SDK_VERSION__ === \"string\" ? __PC_SDK_VERSION__ : \"0.0.0-dev\";\n\n/**\n * ProductCraft Flags API client (projects, configs, environments, feature flags, settings, segments, SDK keys and history). Every method is generated from the API's OpenAPI document.\n *\n * @example\n * ```ts\n * import { Flags } from \"@productcraft/flags\";\n * const flags = new Flags({ apiKey: process.env.PRODUCTCRAFT_API_KEY });\n * ```\n */\n\nexport class Flags extends FlagsResources {\n constructor(options: ClientOptions = {}) {\n super(new APIClient(options, PC_BASE_URL.flags, { name: \"flags\", version: VERSION }));\n }\n #openapi?: Client<paths>;\n /** The typed `openapi-fetch` escape hatch over the same credential and base URL. It does not retry. */\n get client(): Client<paths> {\n return (this.#openapi ??= createOpenAPIClient<paths>(this._client));\n }\n}\n\ntype __RequestOptions = CoreRequestOptions;\ntype __PollOptions = CorePollOptions;\ntype __ClientOptions = CoreClientOptions;\ntype __Page<T> = CorePage<T>;\ntype __PagePromise<T> = CorePagePromise<T>;\ntype __APIPromise<T> = CoreAPIPromise<T>;\ntype __WithResponse<T> = CoreWithResponse<T>;\ntype __RateLimitInfo = CoreRateLimitInfo;\ntype __LastResponse = CoreLastResponse;\ntype __FlagsActorType = T.FlagsActorType;\ntype __FlagsChangeActorType = T.FlagsChangeActorType;\ntype __FlagsEnvironmentPreset = T.FlagsEnvironmentPreset;\ntype __FlagsEvaluationErrorCode = T.FlagsEvaluationErrorCode;\ntype __FlagsEvaluationReason = T.FlagsEvaluationReason;\ntype __FlagsEvaluationWarningCode = T.FlagsEvaluationWarningCode;\ntype __FlagsHistoryExportFormat = T.FlagsHistoryExportFormat;\ntype __FlagsImportMappedType = T.FlagsImportMappedType;\ntype __FlagsImportSource = T.FlagsImportSource;\ntype __FlagsJsonPatchOp = T.FlagsJsonPatchOp;\ntype __FlagsPrerequisiteComparator = T.FlagsPrerequisiteComparator;\ntype __FlagsSdkKeyRotationReason = T.FlagsSdkKeyRotationReason;\ntype __FlagsSdkKeySlot = T.FlagsSdkKeySlot;\ntype __FlagsSegmentComparator = T.FlagsSegmentComparator;\ntype __FlagsSettingLifecycle = T.FlagsSettingLifecycle;\ntype __FlagsSettingType = T.FlagsSettingType;\ntype __FlagsUserComparator = T.FlagsUserComparator;\ntype __FlagsWebhookActorType = T.FlagsWebhookActorType;\ntype __SdkKeySlot = T.SdkKeySlot;\ntype __WebhookAttemptTrigger = T.WebhookAttemptTrigger;\ntype __WebhookEndpointDisabledReason = T.WebhookEndpointDisabledReason;\ntype __WebhookEndpointStatus = T.WebhookEndpointStatus;\ntype __WebhookEventStatus = T.WebhookEventStatus;\ntype __WebhookEventType = T.WebhookEventType;\ntype __ChangeActor = T.ChangeActor;\ntype __ChangeDetail = T.ChangeDetail;\ntype __ChangeList = T.ChangeList;\ntype __Change = T.Change;\ntype __ChangeRevision = T.ChangeRevision;\ntype __CompareEnvironment = T.CompareEnvironment;\ntype __Compare = T.Compare;\ntype __CompareRow = T.CompareRow;\ntype __ConfidentialList = T.ConfidentialList;\ntype __ConfidentialReveal = T.ConfidentialReveal;\ntype __ConfigList = T.ConfigList;\ntype __ConfigPublishedEventData = T.ConfigPublishedEventData;\ntype __Config = T.Config;\ntype __ConfigRevisionList = T.ConfigRevisionList;\ntype __ConfigRevision = T.ConfigRevision;\ntype __CopiedSetting = T.CopiedSetting;\ntype __CopyEnvironment = T.CopyEnvironment;\ntype __EnvironmentList = T.EnvironmentList;\ntype __Environment = T.Environment;\ntype __EnvironmentValueList = T.EnvironmentValueList;\ntype __EnvironmentValueRow = T.EnvironmentValueRow;\ntype __EvaluationResult = T.EvaluationResult;\ntype __EvaluationWarning = T.EvaluationWarning;\ntype __FlagsHistoryUsage = T.FlagsHistoryUsage;\ntype __FlagsLimit = T.FlagsLimit;\ntype __FlagsLimits = T.FlagsLimits;\ntype __FlagsPagination = T.FlagsPagination;\ntype __FlagsProjectUsage = T.FlagsProjectUsage;\ntype __FlagsStats = T.FlagsStats;\ntype __FlagsUsage = T.FlagsUsage;\ntype __FlagsWebhookActor = T.FlagsWebhookActor;\ntype __FlagsWebhookChange = T.FlagsWebhookChange;\ntype __FlagsWebhookConfig = T.FlagsWebhookConfig;\ntype __FlagsWebhookEnvironment = T.FlagsWebhookEnvironment;\ntype __FlagsWebhookProject = T.FlagsWebhookProject;\ntype __HashedValuesView = T.HashedValuesView;\ntype __ImportCounts = T.ImportCounts;\ntype __ImportMappedItem = T.ImportMappedItem;\ntype __ImportReport = T.ImportReport;\ntype __Import = T.Import;\ntype __ImportUnsupportedItem = T.ImportUnsupportedItem;\ntype __ImportWarning = T.ImportWarning;\ntype __JsonPatchOperation = T.JsonPatchOperation;\ntype __WebhookEndpointList = T.WebhookEndpointList;\ntype __ListWebhookEndpoints = T.WebhookEndpointList;\ntype __WebhookEventTypeList = T.WebhookEventTypeList;\ntype __ListWebhookEventTypes = T.WebhookEventTypeList;\ntype __WebhookEventList = T.WebhookEventList;\ntype __ListWebhookEvents = T.WebhookEventList;\ntype __PercentageOption = T.PercentageOption;\ntype __PrerequisiteConditionBody = T.PrerequisiteConditionBody;\ntype __PrerequisiteCondition = T.PrerequisiteCondition;\ntype __ProjectList = T.ProjectList;\ntype __Project = T.Project;\ntype __WebhookEventReplay = T.WebhookEventReplay;\ntype __ReplayWebhookEvent = T.WebhookEventReplay;\ntype __RevealedSdkKey = T.RevealedSdkKey;\ntype __RevealedSdkKeyList = T.RevealedSdkKeyList;\ntype __SdkKeyList = T.SdkKeyList;\ntype __SdkKey = T.SdkKey;\ntype __SdkKeyRotatedEventData = T.SdkKeyRotatedEventData;\ntype __SegmentConditionBody = T.SegmentConditionBody;\ntype __SegmentCondition = T.SegmentCondition;\ntype __SegmentDetail = T.SegmentDetail;\ntype __SegmentList = T.SegmentList;\ntype __Segment = T.Segment;\ntype __SegmentUse = T.SegmentUse;\ntype __ServeRule = T.ServeRule;\ntype __SettingDependent = T.SettingDependent;\ntype __SettingDependents = T.SettingDependents;\ntype __SettingDetail = T.SettingDetail;\ntype __SettingList = T.SettingList;\ntype __Setting = T.Setting;\ntype __SettingState = T.SettingState;\ntype __SettingUpdatedBy = T.SettingUpdatedBy;\ntype __SettingValue = T.SettingValue;\ntype __SplitRule = T.SplitRule;\ntype __TestEvaluation = T.TestEvaluation;\ntype __UserConditionBody = T.UserConditionBody;\ntype __UserCondition = T.UserCondition;\ntype __WebhookDeliveryAttempt = T.WebhookDeliveryAttempt;\ntype __WebhookEndpoint = T.WebhookEndpoint;\ntype __WebhookEndpointWithSecret = T.WebhookEndpointWithSecret;\ntype __WebhookEventDelivery = T.WebhookEventDelivery;\ntype __WebhookEventDetail = T.WebhookEventDetail;\ntype __WebhookEvent = T.WebhookEvent;\ntype __WebhookEventTypeInfo = T.WebhookEventTypeInfo;\ntype __WebhookPagination = T.WebhookPagination;\ntype __ChangeRevertParams = T.ChangeRevertParams;\ntype __ConfigUpdateParams = T.ConfigUpdateParams;\ntype __ConfigDeleteParams = T.ConfigDeleteParams;\ntype __ConfigCompareParams = T.ConfigCompareParams;\ntype __ConfigEnvironmentCopyParams = T.ConfigEnvironmentCopyParams;\ntype __ConfigEnvironmentEvaluateParams = T.ConfigEnvironmentEvaluateParams;\ntype __ConfigEnvironmentRevisionListParams = T.ConfigEnvironmentRevisionListParams;\ntype __ConfigEnvironmentRevisionRetrieveResponse = T.ConfigEnvironmentRevisionRetrieveResponse;\ntype __ConfigEnvironmentSdkKeyRotateParams = T.ConfigEnvironmentSdkKeyRotateParams;\ntype __ConfigEnvironmentValueListParams = T.ConfigEnvironmentValueListParams;\ntype __ConfigSettingsListParams = T.ConfigSettingsListParams;\ntype __ConfigSettingsCreateParams = T.ConfigSettingsCreateParams;\ntype __ImportCreateParams = T.ImportCreateParams;\ntype __ProjectListParams = T.ProjectListParams;\ntype __ProjectCreateParams = T.ProjectCreateParams;\ntype __ProjectUpdateParams = T.ProjectUpdateParams;\ntype __ProjectDeleteParams = T.ProjectDeleteParams;\ntype __ProjectChangeListParams = T.ProjectChangeListParams;\ntype __ProjectChangeExportParams = T.ProjectChangeExportParams;\ntype __ProjectConfigListParams = T.ProjectConfigListParams;\ntype __ProjectConfigCreateParams = T.ProjectConfigCreateParams;\ntype __ProjectEnvironmentCreateParams = T.ProjectEnvironmentCreateParams;\ntype __ProjectEnvironmentUpdateParams = T.ProjectEnvironmentUpdateParams;\ntype __ProjectEnvironmentDeleteParams = T.ProjectEnvironmentDeleteParams;\ntype __ProjectSegmentListParams = T.ProjectSegmentListParams;\ntype __ProjectSegmentCreateParams = T.ProjectSegmentCreateParams;\ntype __SegmentUpdateParams = T.SegmentUpdateParams;\ntype __SegmentDeleteParams = T.SegmentDeleteParams;\ntype __SettingsUpdateParams = T.SettingsUpdateParams;\ntype __SettingsDeleteParams = T.SettingsDeleteParams;\ntype __SettingsValueReplaceParams = T.SettingsValueReplaceParams;\ntype __SettingsValueUpdateParams = T.SettingsValueUpdateParams;\ntype __WebhookEndpointCreateParams = T.WebhookEndpointCreateParams;\ntype __WebhookEndpointUpdateParams = T.WebhookEndpointUpdateParams;\ntype __WebhookEndpointRotateSecretParams = T.WebhookEndpointRotateSecretParams;\ntype __WebhookEndpointTestParams = T.WebhookEndpointTestParams;\ntype __WebhookEventListParams = T.WebhookEventListParams;\ntype __WebhookEventReplayParams = T.WebhookEventReplayParams;\ntype __ErrorCode = E.FlagsErrorCode;\ntype __ConfigPublishedEvent = W.ConfigPublishedEvent;\ntype __SdkKeyRotatedEvent = W.SdkKeyRotatedEvent;\ntype __UnknownWebhookEvent = W.UnknownWebhookEvent;\ntype __UnwrapWebhookEvent = W.UnwrapWebhookEvent;\ntype __WebhookSignParams = W.WebhookSignParams;\ntype __WebhookUnwrapParams = W.WebhookUnwrapParams;\n/** Public types: `Flags.ChangeActor`, `Flags.ChangeRevertParams`, … */\nexport namespace Flags {\n export type RequestOptions = __RequestOptions;\n export type PollOptions = __PollOptions;\n export type ClientOptions = __ClientOptions;\n export type Page<T> = __Page<T>;\n export type PagePromise<T> = __PagePromise<T>;\n export type APIPromise<T> = __APIPromise<T>;\n export type WithResponse<T> = __WithResponse<T>;\n export type RateLimitInfo = __RateLimitInfo;\n export type LastResponse = __LastResponse;\n export type FlagsActorType = __FlagsActorType;\n export const FlagsActorType = T.FlagsActorType;\n export type FlagsChangeActorType = __FlagsChangeActorType;\n export const FlagsChangeActorType = T.FlagsChangeActorType;\n export type FlagsEnvironmentPreset = __FlagsEnvironmentPreset;\n export const FlagsEnvironmentPreset = T.FlagsEnvironmentPreset;\n export type FlagsEvaluationErrorCode = __FlagsEvaluationErrorCode;\n export const FlagsEvaluationErrorCode = T.FlagsEvaluationErrorCode;\n export type FlagsEvaluationReason = __FlagsEvaluationReason;\n export const FlagsEvaluationReason = T.FlagsEvaluationReason;\n export type FlagsEvaluationWarningCode = __FlagsEvaluationWarningCode;\n export const FlagsEvaluationWarningCode = T.FlagsEvaluationWarningCode;\n export type FlagsHistoryExportFormat = __FlagsHistoryExportFormat;\n export const FlagsHistoryExportFormat = T.FlagsHistoryExportFormat;\n export type FlagsImportMappedType = __FlagsImportMappedType;\n export const FlagsImportMappedType = T.FlagsImportMappedType;\n export type FlagsImportSource = __FlagsImportSource;\n export const FlagsImportSource = T.FlagsImportSource;\n export type FlagsJsonPatchOp = __FlagsJsonPatchOp;\n export const FlagsJsonPatchOp = T.FlagsJsonPatchOp;\n export type FlagsPrerequisiteComparator = __FlagsPrerequisiteComparator;\n export const FlagsPrerequisiteComparator = T.FlagsPrerequisiteComparator;\n export type FlagsSdkKeyRotationReason = __FlagsSdkKeyRotationReason;\n export const FlagsSdkKeyRotationReason = T.FlagsSdkKeyRotationReason;\n export type FlagsSdkKeySlot = __FlagsSdkKeySlot;\n export const FlagsSdkKeySlot = T.FlagsSdkKeySlot;\n export type FlagsSegmentComparator = __FlagsSegmentComparator;\n export const FlagsSegmentComparator = T.FlagsSegmentComparator;\n export type FlagsSettingLifecycle = __FlagsSettingLifecycle;\n export const FlagsSettingLifecycle = T.FlagsSettingLifecycle;\n export type FlagsSettingType = __FlagsSettingType;\n export const FlagsSettingType = T.FlagsSettingType;\n export type FlagsUserComparator = __FlagsUserComparator;\n export const FlagsUserComparator = T.FlagsUserComparator;\n export type FlagsWebhookActorType = __FlagsWebhookActorType;\n export const FlagsWebhookActorType = T.FlagsWebhookActorType;\n export type SdkKeySlot = __SdkKeySlot;\n export const SdkKeySlot = T.SdkKeySlot;\n export type WebhookAttemptTrigger = __WebhookAttemptTrigger;\n export const WebhookAttemptTrigger = T.WebhookAttemptTrigger;\n export type WebhookEndpointDisabledReason = __WebhookEndpointDisabledReason;\n export const WebhookEndpointDisabledReason = T.WebhookEndpointDisabledReason;\n export type WebhookEndpointStatus = __WebhookEndpointStatus;\n export const WebhookEndpointStatus = T.WebhookEndpointStatus;\n export type WebhookEventStatus = __WebhookEventStatus;\n export const WebhookEventStatus = T.WebhookEventStatus;\n export type WebhookEventType = __WebhookEventType;\n export const WebhookEventType = T.WebhookEventType;\n export type ChangeActor = __ChangeActor;\n export type ChangeDetail = __ChangeDetail;\n export type ChangeList = __ChangeList;\n export type Change = __Change;\n export type ChangeRevision = __ChangeRevision;\n export type CompareEnvironment = __CompareEnvironment;\n export type Compare = __Compare;\n export type CompareRow = __CompareRow;\n export type ConfidentialList = __ConfidentialList;\n export type ConfidentialReveal = __ConfidentialReveal;\n export type ConfigList = __ConfigList;\n export type ConfigPublishedEventData = __ConfigPublishedEventData;\n export type Config = __Config;\n export type ConfigRevisionList = __ConfigRevisionList;\n export type ConfigRevision = __ConfigRevision;\n export type CopiedSetting = __CopiedSetting;\n export type CopyEnvironment = __CopyEnvironment;\n export type EnvironmentList = __EnvironmentList;\n export type Environment = __Environment;\n export type EnvironmentValueList = __EnvironmentValueList;\n export type EnvironmentValueRow = __EnvironmentValueRow;\n export type EvaluationResult = __EvaluationResult;\n export type EvaluationWarning = __EvaluationWarning;\n export type FlagsHistoryUsage = __FlagsHistoryUsage;\n export type FlagsLimit = __FlagsLimit;\n export type FlagsLimits = __FlagsLimits;\n export type FlagsPagination = __FlagsPagination;\n export type FlagsProjectUsage = __FlagsProjectUsage;\n export type FlagsStats = __FlagsStats;\n export type FlagsUsage = __FlagsUsage;\n export type FlagsWebhookActor = __FlagsWebhookActor;\n export type FlagsWebhookChange = __FlagsWebhookChange;\n export type FlagsWebhookConfig = __FlagsWebhookConfig;\n export type FlagsWebhookEnvironment = __FlagsWebhookEnvironment;\n export type FlagsWebhookProject = __FlagsWebhookProject;\n export type HashedValuesView = __HashedValuesView;\n export type ImportCounts = __ImportCounts;\n export type ImportMappedItem = __ImportMappedItem;\n export type ImportReport = __ImportReport;\n export type Import = __Import;\n export type ImportUnsupportedItem = __ImportUnsupportedItem;\n export type ImportWarning = __ImportWarning;\n export type JsonPatchOperation = __JsonPatchOperation;\n export type WebhookEndpointList = __WebhookEndpointList;\n /** @deprecated Renamed to `Flags.WebhookEndpointList`. Kept for 1.x callers; removed in the next major. */\n export type ListWebhookEndpoints = __ListWebhookEndpoints;\n export type WebhookEventTypeList = __WebhookEventTypeList;\n /** @deprecated Renamed to `Flags.WebhookEventTypeList`. Kept for 1.x callers; removed in the next major. */\n export type ListWebhookEventTypes = __ListWebhookEventTypes;\n export type WebhookEventList = __WebhookEventList;\n /** @deprecated Renamed to `Flags.WebhookEventList`. Kept for 1.x callers; removed in the next major. */\n export type ListWebhookEvents = __ListWebhookEvents;\n export type PercentageOption = __PercentageOption;\n export type PrerequisiteConditionBody = __PrerequisiteConditionBody;\n export type PrerequisiteCondition = __PrerequisiteCondition;\n export type ProjectList = __ProjectList;\n export type Project = __Project;\n export type WebhookEventReplay = __WebhookEventReplay;\n /** @deprecated Renamed to `Flags.WebhookEventReplay`. Kept for 1.x callers; removed in the next major. */\n export type ReplayWebhookEvent = __ReplayWebhookEvent;\n export type RevealedSdkKey = __RevealedSdkKey;\n export type RevealedSdkKeyList = __RevealedSdkKeyList;\n export type SdkKeyList = __SdkKeyList;\n export type SdkKey = __SdkKey;\n export type SdkKeyRotatedEventData = __SdkKeyRotatedEventData;\n export type SegmentConditionBody = __SegmentConditionBody;\n export type SegmentCondition = __SegmentCondition;\n export type SegmentDetail = __SegmentDetail;\n export type SegmentList = __SegmentList;\n export type Segment = __Segment;\n export type SegmentUse = __SegmentUse;\n export type ServeRule = __ServeRule;\n export type SettingDependent = __SettingDependent;\n export type SettingDependents = __SettingDependents;\n export type SettingDetail = __SettingDetail;\n export type SettingList = __SettingList;\n export type Setting = __Setting;\n export type SettingState = __SettingState;\n export type SettingUpdatedBy = __SettingUpdatedBy;\n export type SettingValue = __SettingValue;\n export type SplitRule = __SplitRule;\n export type TestEvaluation = __TestEvaluation;\n export type UserConditionBody = __UserConditionBody;\n export type UserCondition = __UserCondition;\n export type WebhookDeliveryAttempt = __WebhookDeliveryAttempt;\n export type WebhookEndpoint = __WebhookEndpoint;\n export type WebhookEndpointWithSecret = __WebhookEndpointWithSecret;\n export type WebhookEventDelivery = __WebhookEventDelivery;\n export type WebhookEventDetail = __WebhookEventDetail;\n export type WebhookEvent = __WebhookEvent;\n export type WebhookEventTypeInfo = __WebhookEventTypeInfo;\n export type WebhookPagination = __WebhookPagination;\n export type ChangeRevertParams = __ChangeRevertParams;\n export type ConfigUpdateParams = __ConfigUpdateParams;\n export type ConfigDeleteParams = __ConfigDeleteParams;\n export type ConfigCompareParams = __ConfigCompareParams;\n export type ConfigEnvironmentCopyParams = __ConfigEnvironmentCopyParams;\n export type ConfigEnvironmentEvaluateParams = __ConfigEnvironmentEvaluateParams;\n export type ConfigEnvironmentRevisionListParams = __ConfigEnvironmentRevisionListParams;\n export type ConfigEnvironmentRevisionRetrieveResponse = __ConfigEnvironmentRevisionRetrieveResponse;\n export type ConfigEnvironmentSdkKeyRotateParams = __ConfigEnvironmentSdkKeyRotateParams;\n export type ConfigEnvironmentValueListParams = __ConfigEnvironmentValueListParams;\n export type ConfigSettingsListParams = __ConfigSettingsListParams;\n export type ConfigSettingsCreateParams = __ConfigSettingsCreateParams;\n export type ImportCreateParams = __ImportCreateParams;\n export type ProjectListParams = __ProjectListParams;\n export type ProjectCreateParams = __ProjectCreateParams;\n export type ProjectUpdateParams = __ProjectUpdateParams;\n export type ProjectDeleteParams = __ProjectDeleteParams;\n export type ProjectChangeListParams = __ProjectChangeListParams;\n export type ProjectChangeExportParams = __ProjectChangeExportParams;\n export type ProjectConfigListParams = __ProjectConfigListParams;\n export type ProjectConfigCreateParams = __ProjectConfigCreateParams;\n export type ProjectEnvironmentCreateParams = __ProjectEnvironmentCreateParams;\n export type ProjectEnvironmentUpdateParams = __ProjectEnvironmentUpdateParams;\n export type ProjectEnvironmentDeleteParams = __ProjectEnvironmentDeleteParams;\n export type ProjectSegmentListParams = __ProjectSegmentListParams;\n export type ProjectSegmentCreateParams = __ProjectSegmentCreateParams;\n export type SegmentUpdateParams = __SegmentUpdateParams;\n export type SegmentDeleteParams = __SegmentDeleteParams;\n export type SettingsUpdateParams = __SettingsUpdateParams;\n export type SettingsDeleteParams = __SettingsDeleteParams;\n export type SettingsValueReplaceParams = __SettingsValueReplaceParams;\n export type SettingsValueUpdateParams = __SettingsValueUpdateParams;\n export type WebhookEndpointCreateParams = __WebhookEndpointCreateParams;\n export type WebhookEndpointUpdateParams = __WebhookEndpointUpdateParams;\n export type WebhookEndpointRotateSecretParams = __WebhookEndpointRotateSecretParams;\n export type WebhookEndpointTestParams = __WebhookEndpointTestParams;\n export type WebhookEventListParams = __WebhookEventListParams;\n export type WebhookEventReplayParams = __WebhookEventReplayParams;\n export type ErrorCode = __ErrorCode;\n export type ConfigPublishedEvent = __ConfigPublishedEvent;\n export type SdkKeyRotatedEvent = __SdkKeyRotatedEvent;\n export type UnknownWebhookEvent = __UnknownWebhookEvent;\n export type UnwrapWebhookEvent = __UnwrapWebhookEvent;\n export type WebhookSignParams = __WebhookSignParams;\n export type WebhookUnwrapParams = __WebhookUnwrapParams;\n}\n"]}