@productcraft/flags 0.5.0 → 0.6.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 (48) hide show
  1. package/README.md +16 -13
  2. package/api.md +572 -4
  3. package/dist/browser/{chunk-OOX7EUCT.js → chunk-OUAC4WID.js} +584 -8
  4. package/dist/browser/chunk-OUAC4WID.js.map +1 -0
  5. package/dist/{chunk-RJIVAOBG.cjs → browser/chunk-UYL3NMDA.cjs} +584 -8
  6. package/dist/browser/chunk-UYL3NMDA.cjs.map +1 -0
  7. package/dist/browser/index.cjs +4 -4
  8. package/dist/browser/index.cjs.map +1 -1
  9. package/dist/browser/index.js +2 -2
  10. package/dist/browser/index.js.map +1 -1
  11. package/dist/browser/management.cjs +2 -2
  12. package/dist/browser/management.js +1 -1
  13. package/dist/browser/testing.cjs +845 -0
  14. package/dist/browser/testing.cjs.map +1 -1
  15. package/dist/browser/testing.js +845 -0
  16. package/dist/browser/testing.js.map +1 -1
  17. package/dist/{browser/chunk-XZK57G7L.cjs → chunk-5SDZWOUP.cjs} +584 -8
  18. package/dist/chunk-5SDZWOUP.cjs.map +1 -0
  19. package/dist/{chunk-CGVDMKEE.js → chunk-7BOM23MI.js} +3 -3
  20. package/dist/{chunk-CGVDMKEE.js.map → chunk-7BOM23MI.js.map} +1 -1
  21. package/dist/{chunk-XNJ5OX4X.js → chunk-JGSMXA3G.js} +584 -8
  22. package/dist/chunk-JGSMXA3G.js.map +1 -0
  23. package/dist/{chunk-L3AOANTB.cjs → chunk-SHMDNO4G.cjs} +3 -3
  24. package/dist/{chunk-L3AOANTB.cjs.map → chunk-SHMDNO4G.cjs.map} +1 -1
  25. package/dist/{client-BWi7PASW.d.cts → client-DVKdRqhR.d.cts} +7751 -3218
  26. package/dist/{client-BWi7PASW.d.ts → client-DVKdRqhR.d.ts} +7751 -3218
  27. package/dist/index.cjs +9 -9
  28. package/dist/index.cjs.map +1 -1
  29. package/dist/index.d.cts +1 -1
  30. package/dist/index.d.ts +1 -1
  31. package/dist/index.js +3 -3
  32. package/dist/index.js.map +1 -1
  33. package/dist/management.cjs +2 -2
  34. package/dist/management.d.cts +1 -1
  35. package/dist/management.d.ts +1 -1
  36. package/dist/management.js +1 -1
  37. package/dist/testing.cjs +848 -3
  38. package/dist/testing.cjs.map +1 -1
  39. package/dist/testing.d.cts +2 -2
  40. package/dist/testing.d.ts +2 -2
  41. package/dist/testing.js +846 -1
  42. package/dist/testing.js.map +1 -1
  43. package/manifest.json +316 -1
  44. package/package.json +1 -1
  45. package/dist/browser/chunk-OOX7EUCT.js.map +0 -1
  46. package/dist/browser/chunk-XZK57G7L.cjs.map +0 -1
  47. package/dist/chunk-RJIVAOBG.cjs.map +0 -1
  48. package/dist/chunk-XNJ5OX4X.js.map +0 -1
package/api.md CHANGED
@@ -5,6 +5,209 @@
5
5
 
6
6
  Every method of `Flags`, grouped by resource. Types are under the `Flags` namespace (`import type { Flags } from "@productcraft/flags"`). Every method takes per-request options last (`{ idempotencyKey, timeout, maxRetries, headers, signal, workspaceId }`).
7
7
 
8
+ ## changeRequests
9
+
10
+ ### `flags.changeRequests.apply(changeRequestId, options?)`
11
+
12
+ `POST /v1/workspaces/{workspace_id}/change-requests/{change_request_id}/apply` → `Flags.ChangeRequest`
13
+
14
+ Apply a change request.
15
+
16
+ Writes an approved request through the normal value-write path, only if the value is still at `base_version` (else 409 `CHANGE_REQUEST_STALE`: rebase it). A `ramp` request starts its ramp. Anyone allowed to make the write can apply, including the author's API key or agent: the approval is what the policy asks for.
17
+
18
+ | Status | Error class | Codes | When |
19
+ |---|---|---|---|
20
+ | 401 | `AuthenticationError` | `UNAUTHORIZED` | Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`. |
21
+ | 403 | `PermissionDeniedError` | `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`). The caller also needs `flags.value.update` on the environment and the setting, plus `flags.protected.update` in a protected environment. |
22
+ | 404 | `NotFoundError` | `NOT_FOUND`, `CHANGE_REQUEST_NOT_FOUND` | `CHANGE_REQUEST_NOT_FOUND`: no such change request in this workspace. |
23
+ | 409 | `ConflictError` | `CONFLICT`, `CHANGE_REQUEST_NOT_OPEN`, `CHANGE_REQUEST_NOT_APPROVED`, `CHANGE_REQUEST_STALE`, `RAMP_ALREADY_ACTIVE` | `CHANGE_REQUEST_NOT_OPEN` (its `status` does not allow this; `details.status`), `CHANGE_REQUEST_NOT_APPROVED` (it still needs approvals) or `CHANGE_REQUEST_STALE` (the value changed since it was proposed: rebase it). `RAMP_ALREADY_ACTIVE`: a ramp already runs on the flag. |
24
+ | 422 | `UnprocessableEntityError` | `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`, `NOTHING_TO_PROPOSE`, `RAMP_INVALID`, `RUN_AT_INVALID` | The proposal is refused by the checks the write itself makes: `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`, `NOTHING_TO_PROPOSE` (it equals what the environment serves now), `RAMP_INVALID` or `RUN_AT_INVALID`. |
25
+ | 429 | `RateLimitError` | `RATE_LIMITED` | More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds. |
26
+ | 503 | `InternalServerError` | `SERVICE_UNAVAILABLE`, `MANAGEMENT_UNAVAILABLE` | The management API is temporarily unavailable (`MANAGEMENT_UNAVAILABLE`), for example while its database is unreachable. Wait `Retry-After` seconds and retry; SDK config delivery keeps serving. |
27
+
28
+ ```ts
29
+ const changeRequest = await flags.changeRequests.apply("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f");
30
+ ```
31
+
32
+ [HTTP reference](https://productcraft.co/docs/flags/api-reference#post-v1-workspaces-workspace-id-change-requests-change-request-id-apply)
33
+
34
+ ### `flags.changeRequests.approve(changeRequestId, params?, options?)`
35
+
36
+ `POST /v1/workspaces/{workspace_id}/change-requests/{change_request_id}/approve` → `Flags.ChangeRequest`
37
+
38
+ Approve a change request.
39
+
40
+ Records your approval. With `required_approvals` approvals from different reviewers the request is `approved`; `apply: true` then applies it at once. Only a person signed in to the console who is not the author (nor the person an agent proposed it for) can approve, and they must be allowed to make the write. A stale request (the value moved) cannot be approved: rebase it.
41
+
42
+ - Params: `Flags.ChangeRequestApproveParams`
43
+
44
+ | Status | Error class | Codes | When |
45
+ |---|---|---|---|
46
+ | 401 | `AuthenticationError` | `UNAUTHORIZED` | Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`. |
47
+ | 403 | `PermissionDeniedError` | `FORBIDDEN`, `SERVICE_NOT_ENABLED`, `REVIEWER_MUST_BE_HUMAN`, `SELF_APPROVAL_NOT_ALLOWED` | The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`). The caller also needs `flags.value.update` on the environment and the setting, plus `flags.protected.update` in a protected environment. `REVIEWER_MUST_BE_HUMAN`: only a person signed in to the console can review (never an API key or an AI agent). `SELF_APPROVAL_NOT_ALLOWED`: the author, or the person an agent proposed it for, cannot review it. |
48
+ | 404 | `NotFoundError` | `NOT_FOUND`, `CHANGE_REQUEST_NOT_FOUND` | `CHANGE_REQUEST_NOT_FOUND`: no such change request in this workspace. |
49
+ | 409 | `ConflictError` | `CONFLICT`, `CHANGE_REQUEST_NOT_OPEN`, `CHANGE_REQUEST_NOT_APPROVED`, `CHANGE_REQUEST_STALE`, `ALREADY_REVIEWED` | `CHANGE_REQUEST_NOT_OPEN` (its `status` does not allow this; `details.status`), `CHANGE_REQUEST_NOT_APPROVED` (it still needs approvals) or `CHANGE_REQUEST_STALE` (the value changed since it was proposed: rebase it). `ALREADY_REVIEWED`: you already reviewed it. |
50
+ | 422 | `UnprocessableEntityError` | `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`, `NOTHING_TO_PROPOSE`, `RAMP_INVALID`, `RUN_AT_INVALID` | The proposal is refused by the checks the write itself makes: `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`, `NOTHING_TO_PROPOSE` (it equals what the environment serves now), `RAMP_INVALID` or `RUN_AT_INVALID`. |
51
+ | 429 | `RateLimitError` | `RATE_LIMITED` | More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds. |
52
+ | 503 | `InternalServerError` | `SERVICE_UNAVAILABLE`, `MANAGEMENT_UNAVAILABLE` | The management API is temporarily unavailable (`MANAGEMENT_UNAVAILABLE`), for example while its database is unreachable. Wait `Retry-After` seconds and retry; SDK config delivery keeps serving. |
53
+
54
+ ```ts
55
+ const changeRequest = await flags.changeRequests.approve("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f", { apply: true });
56
+ ```
57
+
58
+ [HTTP reference](https://productcraft.co/docs/flags/api-reference#post-v1-workspaces-workspace-id-change-requests-change-request-id-approve)
59
+
60
+ ### `flags.changeRequests.cancel(changeRequestId, params?, options?)`
61
+
62
+ `POST /v1/workspaces/{workspace_id}/change-requests/{change_request_id}/cancel` → `Flags.ChangeRequest`
63
+
64
+ Cancel a change request.
65
+
66
+ Withdraws an open request (and its schedule). The author can always cancel; anyone else needs the right to make the write.
67
+
68
+ - Params: `Flags.ChangeRequestCancelParams`
69
+
70
+ | Status | Error class | Codes | When |
71
+ |---|---|---|---|
72
+ | 401 | `AuthenticationError` | `UNAUTHORIZED` | Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`. |
73
+ | 403 | `PermissionDeniedError` | `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`). The caller also needs `flags.value.update` on the environment and the setting, plus `flags.protected.update` in a protected environment. |
74
+ | 404 | `NotFoundError` | `NOT_FOUND`, `CHANGE_REQUEST_NOT_FOUND` | `CHANGE_REQUEST_NOT_FOUND`: no such change request in this workspace. |
75
+ | 409 | `ConflictError` | `CONFLICT`, `CHANGE_REQUEST_NOT_OPEN`, `CHANGE_REQUEST_NOT_APPROVED`, `CHANGE_REQUEST_STALE` | `CHANGE_REQUEST_NOT_OPEN` (its `status` does not allow this; `details.status`), `CHANGE_REQUEST_NOT_APPROVED` (it still needs approvals) or `CHANGE_REQUEST_STALE` (the value changed since it was proposed: rebase it). |
76
+ | 429 | `RateLimitError` | `RATE_LIMITED` | More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds. |
77
+ | 503 | `InternalServerError` | `SERVICE_UNAVAILABLE`, `MANAGEMENT_UNAVAILABLE` | The management API is temporarily unavailable (`MANAGEMENT_UNAVAILABLE`), for example while its database is unreachable. Wait `Retry-After` seconds and retry; SDK config delivery keeps serving. |
78
+
79
+ ```ts
80
+ const changeRequest = await flags.changeRequests.cancel("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f", { note: "Roll out the new checkout to everyone (FLAG-142)" });
81
+ ```
82
+
83
+ [HTTP reference](https://productcraft.co/docs/flags/api-reference#post-v1-workspaces-workspace-id-change-requests-change-request-id-cancel)
84
+
85
+ ### `flags.changeRequests.list(params?, options?)`
86
+
87
+ `GET /v1/workspaces/{workspace_id}/change-requests` → `PagePromise<Flags.ChangeRequest>`
88
+
89
+ List change requests.
90
+
91
+ The workspace's change requests, newest first. `status=open` is the review queue (pending, approved, scheduled and failed requests).
92
+
93
+ - Params: `Flags.ChangeRequestListParams`
94
+ - Paginated: `for await` iterates every item; `await` gives one page
95
+
96
+ | Status | Error class | Codes | When |
97
+ |---|---|---|---|
98
+ | 400 | `BadRequestError` | `BAD_REQUEST`, `VALIDATION_ERROR` | `VALIDATION_ERROR`: a bad filter, cursor or `limit`. |
99
+ | 401 | `AuthenticationError` | `UNAUTHORIZED` | Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`. |
100
+ | 403 | `PermissionDeniedError` | `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`). |
101
+ | 429 | `RateLimitError` | `RATE_LIMITED` | More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds. |
102
+ | 503 | `InternalServerError` | `SERVICE_UNAVAILABLE`, `MANAGEMENT_UNAVAILABLE` | The management API is temporarily unavailable (`MANAGEMENT_UNAVAILABLE`), for example while its database is unreachable. Wait `Retry-After` seconds and retry; SDK config delivery keeps serving. |
103
+
104
+ ```ts
105
+ for await (const changeRequest of flags.changeRequests.list()) {
106
+ console.log(changeRequest);
107
+ }
108
+ const page = await flags.changeRequests.list({}, { timeout: 5_000 });
109
+ ```
110
+
111
+ [HTTP reference](https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-change-requests)
112
+
113
+ ### `flags.changeRequests.rebase(changeRequestId, options?)`
114
+
115
+ `POST /v1/workspaces/{workspace_id}/change-requests/{change_request_id}/rebase` → `Flags.ChangeRequest`
116
+
117
+ Rebase a change request.
118
+
119
+ Re-diffs a stale request against the current value: the proposed targeting stays, `before` and `base_version` become the current ones, its approvals are cleared and it is `pending` again (reviewers approve the new diff).
120
+
121
+ | Status | Error class | Codes | When |
122
+ |---|---|---|---|
123
+ | 401 | `AuthenticationError` | `UNAUTHORIZED` | Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`. |
124
+ | 403 | `PermissionDeniedError` | `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`). The caller also needs `flags.value.update` on the environment and the setting, plus `flags.protected.update` in a protected environment. |
125
+ | 404 | `NotFoundError` | `NOT_FOUND`, `CHANGE_REQUEST_NOT_FOUND` | `CHANGE_REQUEST_NOT_FOUND`: no such change request in this workspace. |
126
+ | 409 | `ConflictError` | `CONFLICT`, `CHANGE_REQUEST_NOT_OPEN`, `CHANGE_REQUEST_NOT_APPROVED`, `CHANGE_REQUEST_STALE` | `CHANGE_REQUEST_NOT_OPEN` (its `status` does not allow this; `details.status`), `CHANGE_REQUEST_NOT_APPROVED` (it still needs approvals) or `CHANGE_REQUEST_STALE` (the value changed since it was proposed: rebase it). |
127
+ | 422 | `UnprocessableEntityError` | `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`, `NOTHING_TO_PROPOSE`, `RAMP_INVALID`, `RUN_AT_INVALID` | The proposal is refused by the checks the write itself makes: `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`, `NOTHING_TO_PROPOSE` (it equals what the environment serves now), `RAMP_INVALID` or `RUN_AT_INVALID`. |
128
+ | 429 | `RateLimitError` | `RATE_LIMITED` | More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds. |
129
+ | 503 | `InternalServerError` | `SERVICE_UNAVAILABLE`, `MANAGEMENT_UNAVAILABLE` | The management API is temporarily unavailable (`MANAGEMENT_UNAVAILABLE`), for example while its database is unreachable. Wait `Retry-After` seconds and retry; SDK config delivery keeps serving. |
130
+
131
+ ```ts
132
+ const changeRequest = await flags.changeRequests.rebase("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f");
133
+ ```
134
+
135
+ [HTTP reference](https://productcraft.co/docs/flags/api-reference#post-v1-workspaces-workspace-id-change-requests-change-request-id-rebase)
136
+
137
+ ### `flags.changeRequests.reject(changeRequestId, params?, options?)`
138
+
139
+ `POST /v1/workspaces/{workspace_id}/change-requests/{change_request_id}/reject` → `Flags.ChangeRequest`
140
+
141
+ Reject a change request.
142
+
143
+ Rejects the request (final); the author is emailed with your note. Same reviewer rules as approve.
144
+
145
+ - Params: `Flags.ChangeRequestRejectParams`
146
+
147
+ | Status | Error class | Codes | When |
148
+ |---|---|---|---|
149
+ | 400 | `BadRequestError` | `BAD_REQUEST`, `VALIDATION_ERROR` | `VALIDATION_ERROR`: `apply` is only for approvals. |
150
+ | 401 | `AuthenticationError` | `UNAUTHORIZED` | Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`. |
151
+ | 403 | `PermissionDeniedError` | `FORBIDDEN`, `SERVICE_NOT_ENABLED`, `REVIEWER_MUST_BE_HUMAN`, `SELF_APPROVAL_NOT_ALLOWED` | The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`). The caller also needs `flags.value.update` on the environment and the setting, plus `flags.protected.update` in a protected environment. `REVIEWER_MUST_BE_HUMAN`: only a person signed in to the console can review (never an API key or an AI agent). `SELF_APPROVAL_NOT_ALLOWED`: the author, or the person an agent proposed it for, cannot review it. |
152
+ | 404 | `NotFoundError` | `NOT_FOUND`, `CHANGE_REQUEST_NOT_FOUND` | `CHANGE_REQUEST_NOT_FOUND`: no such change request in this workspace. |
153
+ | 409 | `ConflictError` | `CONFLICT`, `CHANGE_REQUEST_NOT_OPEN`, `CHANGE_REQUEST_NOT_APPROVED`, `CHANGE_REQUEST_STALE`, `ALREADY_REVIEWED` | `CHANGE_REQUEST_NOT_OPEN` (its `status` does not allow this; `details.status`), `CHANGE_REQUEST_NOT_APPROVED` (it still needs approvals) or `CHANGE_REQUEST_STALE` (the value changed since it was proposed: rebase it). `ALREADY_REVIEWED`: you already reviewed it. |
154
+ | 429 | `RateLimitError` | `RATE_LIMITED` | More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds. |
155
+ | 503 | `InternalServerError` | `SERVICE_UNAVAILABLE`, `MANAGEMENT_UNAVAILABLE` | The management API is temporarily unavailable (`MANAGEMENT_UNAVAILABLE`), for example while its database is unreachable. Wait `Retry-After` seconds and retry; SDK config delivery keeps serving. |
156
+
157
+ ```ts
158
+ const changeRequest = await flags.changeRequests.reject("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f", { apply: true });
159
+ ```
160
+
161
+ [HTTP reference](https://productcraft.co/docs/flags/api-reference#post-v1-workspaces-workspace-id-change-requests-change-request-id-reject)
162
+
163
+ ### `flags.changeRequests.retrieve(changeRequestId, options?)`
164
+
165
+ `GET /v1/workspaces/{workspace_id}/change-requests/{change_request_id}` → `Flags.ChangeRequest`
166
+
167
+ Get a change request.
168
+
169
+ One change request with its diff, reviews and whether it is `stale`.
170
+
171
+ | Status | Error class | Codes | When |
172
+ |---|---|---|---|
173
+ | 401 | `AuthenticationError` | `UNAUTHORIZED` | Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`. |
174
+ | 403 | `PermissionDeniedError` | `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`). |
175
+ | 404 | `NotFoundError` | `NOT_FOUND`, `CHANGE_REQUEST_NOT_FOUND` | `CHANGE_REQUEST_NOT_FOUND`: no such change request in this workspace. |
176
+ | 429 | `RateLimitError` | `RATE_LIMITED` | More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds. |
177
+ | 503 | `InternalServerError` | `SERVICE_UNAVAILABLE`, `MANAGEMENT_UNAVAILABLE` | The management API is temporarily unavailable (`MANAGEMENT_UNAVAILABLE`), for example while its database is unreachable. Wait `Retry-After` seconds and retry; SDK config delivery keeps serving. |
178
+
179
+ ```ts
180
+ const changeRequest = await flags.changeRequests.retrieve("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f");
181
+ ```
182
+
183
+ [HTTP reference](https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-change-requests-change-request-id)
184
+
185
+ ### `flags.changeRequests.schedule(changeRequestId, params, options?)`
186
+
187
+ `POST /v1/workspaces/{workspace_id}/change-requests/{change_request_id}/schedule` → `Flags.ChangeRequest`
188
+
189
+ Schedule a change request.
190
+
191
+ Applies an approved `value` request at `run_at` (status `scheduled`). If the value moved by then the request becomes `failed`: rebase it. Cancel the schedule by cancelling the scheduled change or the request.
192
+
193
+ - Params: `Flags.ChangeRequestScheduleParams`
194
+
195
+ | Status | Error class | Codes | When |
196
+ |---|---|---|---|
197
+ | 401 | `AuthenticationError` | `UNAUTHORIZED` | Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`. |
198
+ | 403 | `PermissionDeniedError` | `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`). The caller also needs `flags.value.update` on the environment and the setting, plus `flags.protected.update` in a protected environment. |
199
+ | 404 | `NotFoundError` | `NOT_FOUND`, `CHANGE_REQUEST_NOT_FOUND` | `CHANGE_REQUEST_NOT_FOUND`: no such change request in this workspace. |
200
+ | 409 | `ConflictError` | `CONFLICT`, `CHANGE_REQUEST_NOT_OPEN`, `CHANGE_REQUEST_NOT_APPROVED`, `CHANGE_REQUEST_STALE` | `CHANGE_REQUEST_NOT_OPEN` (its `status` does not allow this; `details.status`), `CHANGE_REQUEST_NOT_APPROVED` (it still needs approvals) or `CHANGE_REQUEST_STALE` (the value changed since it was proposed: rebase it). |
201
+ | 422 | `UnprocessableEntityError` | `UNPROCESSABLE_ENTITY`, `RUN_AT_INVALID` | `RUN_AT_INVALID`: `run_at` is in the past or more than a year ahead, or the request is a ramp (it carries its own times). |
202
+ | 429 | `RateLimitError` | `RATE_LIMITED` | More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds. |
203
+ | 503 | `InternalServerError` | `SERVICE_UNAVAILABLE`, `MANAGEMENT_UNAVAILABLE` | The management API is temporarily unavailable (`MANAGEMENT_UNAVAILABLE`), for example while its database is unreachable. Wait `Retry-After` seconds and retry; SDK config delivery keeps serving. |
204
+
205
+ ```ts
206
+ const changeRequest = await flags.changeRequests.schedule("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f", { run_at: "2026-11-20T09:00:00.000Z" });
207
+ ```
208
+
209
+ [HTTP reference](https://productcraft.co/docs/flags/api-reference#post-v1-workspaces-workspace-id-change-requests-change-request-id-schedule)
210
+
8
211
  ## changes
9
212
 
10
213
  ### `flags.changes.retrieve(changeId, options?)`
@@ -864,7 +1067,7 @@ const environment = await flags.projects.environments.retrieve("3f0c3c1e-8a2b-4c
864
1067
 
865
1068
  Update an environment.
866
1069
 
867
- 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`.
1070
+ Name, color, order, `protected`, `require_note`, and the approval policy (`approval_policy`, `required_approvals`); the key never changes. Changing a guard is recorded in the workspace audit log. Needs `flags.project.manage`; only a person signed in to the console can change the approval policy.
868
1071
 
869
1072
  - Params: `Flags.ProjectEnvironmentUpdateParams`
870
1073
 
@@ -872,13 +1075,13 @@ Name, color, order, `protected` and `require_note`; the key never changes. Chang
872
1075
  |---|---|---|---|
873
1076
  | 400 | `BadRequestError` | `BAD_REQUEST`, `VALIDATION_ERROR` | `VALIDATION_ERROR`: a field is invalid. |
874
1077
  | 401 | `AuthenticationError` | `UNAUTHORIZED` | Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`. |
875
- | 403 | `PermissionDeniedError` | `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`). |
1078
+ | 403 | `PermissionDeniedError` | `FORBIDDEN`, `SERVICE_NOT_ENABLED`, `APPROVAL_POLICY_HUMAN_ONLY` | The caller lacks the action this route needs (`message` names it), or the workspace has not enabled Flags (`SERVICE_NOT_ENABLED`). `APPROVAL_POLICY_HUMAN_ONLY`: an API key or an agent tried to change `approval_policy` or `required_approvals`. |
876
1079
  | 404 | `NotFoundError` | `NOT_FOUND`, `ENVIRONMENT_NOT_FOUND` | `ENVIRONMENT_NOT_FOUND`: no such environment in this project. |
877
1080
  | 429 | `RateLimitError` | `RATE_LIMITED` | More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds. |
878
1081
  | 503 | `InternalServerError` | `SERVICE_UNAVAILABLE`, `MANAGEMENT_UNAVAILABLE` | The management API is temporarily unavailable (`MANAGEMENT_UNAVAILABLE`), for example while its database is unreachable. Wait `Retry-After` seconds and retry; SDK config delivery keeps serving. |
879
1082
 
880
1083
  ```ts
881
- const environment = await flags.projects.environments.update("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f", "3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f", { color: "#e67700" });
1084
+ const environment = await flags.projects.environments.update("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f", "3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f", { approval_policy: "off" });
882
1085
  ```
883
1086
 
884
1087
  [HTTP reference](https://productcraft.co/docs/flags/api-reference#patch-v1-workspaces-workspace-id-projects-project-id-environments-environment-id)
@@ -949,6 +1152,263 @@ const page = await flags.projects.segments.list("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3
949
1152
 
950
1153
  [HTTP reference](https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-projects-project-id-segments)
951
1154
 
1155
+ ## projects.staleFlags
1156
+
1157
+ ### `flags.projects.staleFlags.list(projectId, params?, options?)`
1158
+
1159
+ `GET /v1/workspaces/{workspace_id}/projects/{project_id}/stale-flags` → `PagePromise<Flags.StaleFlag>`
1160
+
1161
+ List stale flags.
1162
+
1163
+ Flags that are probably dead code, longest unchanged first, each with its `reasons`: no value or targeting change in `days` (default the project's `stale_after_days`), serving one value to everyone in every environment (`rolled_out`, `turned_off`, `same_value_everywhere`), or marked `released` / `deprecated`. `suggested_value` is the literal to replace the flag read with when cleaning it up; `prerequisite_of` counts settings that still depend on it. Permanent flags are never listed. Flags collects no evaluation data, so the report cannot tell whether code still reads a flag (`evaluation_data: not_collected`).
1164
+
1165
+ - Params: `Flags.ProjectStaleFlagListParams`
1166
+ - Paginated: `for await` iterates every item; `await` gives one page
1167
+
1168
+ | Status | Error class | Codes | When |
1169
+ |---|---|---|---|
1170
+ | 400 | `BadRequestError` | `BAD_REQUEST`, `VALIDATION_ERROR` | `VALIDATION_ERROR`: a bad `days`, `reason`, cursor or `limit`. |
1171
+ | 401 | `AuthenticationError` | `UNAUTHORIZED` | Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`. |
1172
+ | 403 | `PermissionDeniedError` | `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`). |
1173
+ | 404 | `NotFoundError` | `NOT_FOUND`, `PROJECT_NOT_FOUND` | `PROJECT_NOT_FOUND`: no such project in this workspace. |
1174
+ | 429 | `RateLimitError` | `RATE_LIMITED` | More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds. |
1175
+ | 503 | `InternalServerError` | `SERVICE_UNAVAILABLE`, `MANAGEMENT_UNAVAILABLE` | The management API is temporarily unavailable (`MANAGEMENT_UNAVAILABLE`), for example while its database is unreachable. Wait `Retry-After` seconds and retry; SDK config delivery keeps serving. |
1176
+
1177
+ ```ts
1178
+ for await (const staleFlag of flags.projects.staleFlags.list("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f")) {
1179
+ console.log(staleFlag);
1180
+ }
1181
+ const page = await flags.projects.staleFlags.list("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f", {}, { timeout: 5_000 });
1182
+ ```
1183
+
1184
+ [HTTP reference](https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-projects-project-id-stale-flags)
1185
+
1186
+ ### `flags.projects.staleFlags.sendDigest(projectId, options?)`
1187
+
1188
+ `POST /v1/workspaces/{workspace_id}/projects/{project_id}/stale-flags/digest` → `Flags.StaleDigest`
1189
+
1190
+ Send the stale-flag digest now.
1191
+
1192
+ Emails the digest that otherwise goes out every Monday at 07:00 UTC: each flag owner gets their stale flags; flags without an owner go to the workspace owners. Recipients are always members of the workspace.
1193
+
1194
+ | Status | Error class | Codes | When |
1195
+ |---|---|---|---|
1196
+ | 401 | `AuthenticationError` | `UNAUTHORIZED` | Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`. |
1197
+ | 403 | `PermissionDeniedError` | `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`). |
1198
+ | 404 | `NotFoundError` | `NOT_FOUND`, `PROJECT_NOT_FOUND` | `PROJECT_NOT_FOUND`: no such project in this workspace. |
1199
+ | 429 | `RateLimitError` | `RATE_LIMITED` | More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds. |
1200
+ | 503 | `InternalServerError` | `SERVICE_UNAVAILABLE`, `MANAGEMENT_UNAVAILABLE` | The management API is temporarily unavailable (`MANAGEMENT_UNAVAILABLE`), for example while its database is unreachable. Wait `Retry-After` seconds and retry; SDK config delivery keeps serving. |
1201
+
1202
+ ```ts
1203
+ const staleDigest = await flags.projects.staleFlags.sendDigest("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f");
1204
+ ```
1205
+
1206
+ [HTTP reference](https://productcraft.co/docs/flags/api-reference#post-v1-workspaces-workspace-id-projects-project-id-stale-flags-digest)
1207
+
1208
+ ## ramps
1209
+
1210
+ ### `flags.ramps.cancel(rampId, params?, options?)`
1211
+
1212
+ `POST /v1/workspaces/{workspace_id}/ramps/{ramp_id}/cancel` → `Flags.Ramp`
1213
+
1214
+ Cancel a ramp.
1215
+
1216
+ Stops the ramp where it is: the split it reached stays. Change or restore the value to undo it.
1217
+
1218
+ - Params: `Flags.RampCancelParams`
1219
+
1220
+ | Status | Error class | Codes | When |
1221
+ |---|---|---|---|
1222
+ | 401 | `AuthenticationError` | `UNAUTHORIZED` | Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`. |
1223
+ | 403 | `PermissionDeniedError` | `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`). The caller also needs `flags.value.update` on the environment and the setting, plus `flags.protected.update` in a protected environment. |
1224
+ | 404 | `NotFoundError` | `NOT_FOUND`, `RAMP_NOT_FOUND` | `RAMP_NOT_FOUND`: no such ramp in this workspace. |
1225
+ | 409 | `ConflictError` | `CONFLICT`, `RAMP_NOT_LIVE` | `RAMP_NOT_LIVE`: the ramp already completed, failed or was cancelled. |
1226
+ | 429 | `RateLimitError` | `RATE_LIMITED` | More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds. |
1227
+ | 503 | `InternalServerError` | `SERVICE_UNAVAILABLE`, `MANAGEMENT_UNAVAILABLE` | The management API is temporarily unavailable (`MANAGEMENT_UNAVAILABLE`), for example while its database is unreachable. Wait `Retry-After` seconds and retry; SDK config delivery keeps serving. |
1228
+
1229
+ ```ts
1230
+ const ramp = await flags.ramps.cancel("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f", { note: "Roll out the new checkout to everyone (FLAG-142)" });
1231
+ ```
1232
+
1233
+ [HTTP reference](https://productcraft.co/docs/flags/api-reference#post-v1-workspaces-workspace-id-ramps-ramp-id-cancel)
1234
+
1235
+ ### `flags.ramps.list(params?, options?)`
1236
+
1237
+ `GET /v1/workspaces/{workspace_id}/ramps` → `PagePromise<Flags.Ramp>`
1238
+
1239
+ List ramps.
1240
+
1241
+ Percentage ramps, newest first. Filter by `status` (`active`, `paused`, `completed`, `cancelled`, `failed`), project, environment or setting.
1242
+
1243
+ - Params: `Flags.RampListParams`
1244
+ - Paginated: `for await` iterates every item; `await` gives one page
1245
+
1246
+ | Status | Error class | Codes | When |
1247
+ |---|---|---|---|
1248
+ | 400 | `BadRequestError` | `BAD_REQUEST`, `VALIDATION_ERROR` | `VALIDATION_ERROR`: a bad filter, cursor or `limit`. |
1249
+ | 401 | `AuthenticationError` | `UNAUTHORIZED` | Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`. |
1250
+ | 403 | `PermissionDeniedError` | `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`). |
1251
+ | 429 | `RateLimitError` | `RATE_LIMITED` | More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds. |
1252
+ | 503 | `InternalServerError` | `SERVICE_UNAVAILABLE`, `MANAGEMENT_UNAVAILABLE` | The management API is temporarily unavailable (`MANAGEMENT_UNAVAILABLE`), for example while its database is unreachable. Wait `Retry-After` seconds and retry; SDK config delivery keeps serving. |
1253
+
1254
+ ```ts
1255
+ for await (const ramp of flags.ramps.list()) {
1256
+ console.log(ramp);
1257
+ }
1258
+ const page = await flags.ramps.list({}, { timeout: 5_000 });
1259
+ ```
1260
+
1261
+ [HTTP reference](https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-ramps)
1262
+
1263
+ ### `flags.ramps.pause(rampId, params?, options?)`
1264
+
1265
+ `POST /v1/workspaces/{workspace_id}/ramps/{ramp_id}/pause` → `Flags.Ramp`
1266
+
1267
+ Pause a ramp.
1268
+
1269
+ Holds the ramp at its current percentage; no further steps apply until it is resumed. Allowed even where changes need approval (it is a safety stop).
1270
+
1271
+ - Params: `Flags.RampPauseParams`
1272
+
1273
+ | Status | Error class | Codes | When |
1274
+ |---|---|---|---|
1275
+ | 401 | `AuthenticationError` | `UNAUTHORIZED` | Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`. |
1276
+ | 403 | `PermissionDeniedError` | `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`). The caller also needs `flags.value.update` on the environment and the setting, plus `flags.protected.update` in a protected environment. |
1277
+ | 404 | `NotFoundError` | `NOT_FOUND`, `RAMP_NOT_FOUND` | `RAMP_NOT_FOUND`: no such ramp in this workspace. |
1278
+ | 409 | `ConflictError` | `CONFLICT`, `RAMP_NOT_LIVE` | `RAMP_NOT_LIVE`: the ramp is not active. |
1279
+ | 429 | `RateLimitError` | `RATE_LIMITED` | More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds. |
1280
+ | 503 | `InternalServerError` | `SERVICE_UNAVAILABLE`, `MANAGEMENT_UNAVAILABLE` | The management API is temporarily unavailable (`MANAGEMENT_UNAVAILABLE`), for example while its database is unreachable. Wait `Retry-After` seconds and retry; SDK config delivery keeps serving. |
1281
+
1282
+ ```ts
1283
+ const ramp = await flags.ramps.pause("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f", { note: "Roll out the new checkout to everyone (FLAG-142)" });
1284
+ ```
1285
+
1286
+ [HTTP reference](https://productcraft.co/docs/flags/api-reference#post-v1-workspaces-workspace-id-ramps-ramp-id-pause)
1287
+
1288
+ ### `flags.ramps.resume(rampId, params?, options?)`
1289
+
1290
+ `POST /v1/workspaces/{workspace_id}/ramps/{ramp_id}/resume` → `Flags.Ramp`
1291
+
1292
+ Resume a ramp.
1293
+
1294
+ Continues a paused ramp. Steps whose time passed while it was paused are not replayed one by one: the latest due step applies on the next tick.
1295
+
1296
+ - Params: `Flags.RampResumeParams`
1297
+
1298
+ | Status | Error class | Codes | When |
1299
+ |---|---|---|---|
1300
+ | 401 | `AuthenticationError` | `UNAUTHORIZED` | Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`. |
1301
+ | 403 | `PermissionDeniedError` | `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`). The caller also needs `flags.value.update` on the environment and the setting, plus `flags.protected.update` in a protected environment. |
1302
+ | 404 | `NotFoundError` | `NOT_FOUND`, `RAMP_NOT_FOUND` | `RAMP_NOT_FOUND`: no such ramp in this workspace. |
1303
+ | 409 | `ConflictError` | `CONFLICT`, `RAMP_NOT_LIVE` | `RAMP_NOT_LIVE`: the ramp is not paused. |
1304
+ | 429 | `RateLimitError` | `RATE_LIMITED` | More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds. |
1305
+ | 503 | `InternalServerError` | `SERVICE_UNAVAILABLE`, `MANAGEMENT_UNAVAILABLE` | The management API is temporarily unavailable (`MANAGEMENT_UNAVAILABLE`), for example while its database is unreachable. Wait `Retry-After` seconds and retry; SDK config delivery keeps serving. |
1306
+
1307
+ ```ts
1308
+ const ramp = await flags.ramps.resume("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f", { note: "Roll out the new checkout to everyone (FLAG-142)" });
1309
+ ```
1310
+
1311
+ [HTTP reference](https://productcraft.co/docs/flags/api-reference#post-v1-workspaces-workspace-id-ramps-ramp-id-resume)
1312
+
1313
+ ### `flags.ramps.retrieve(rampId, options?)`
1314
+
1315
+ `GET /v1/workspaces/{workspace_id}/ramps/{ramp_id}` → `Flags.Ramp`
1316
+
1317
+ Get a ramp.
1318
+
1319
+ One ramp with its steps, the percentage it reached and its state.
1320
+
1321
+ | Status | Error class | Codes | When |
1322
+ |---|---|---|---|
1323
+ | 401 | `AuthenticationError` | `UNAUTHORIZED` | Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`. |
1324
+ | 403 | `PermissionDeniedError` | `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`). |
1325
+ | 404 | `NotFoundError` | `NOT_FOUND`, `RAMP_NOT_FOUND` | `RAMP_NOT_FOUND`: no such ramp in this workspace. |
1326
+ | 429 | `RateLimitError` | `RATE_LIMITED` | More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds. |
1327
+ | 503 | `InternalServerError` | `SERVICE_UNAVAILABLE`, `MANAGEMENT_UNAVAILABLE` | The management API is temporarily unavailable (`MANAGEMENT_UNAVAILABLE`), for example while its database is unreachable. Wait `Retry-After` seconds and retry; SDK config delivery keeps serving. |
1328
+
1329
+ ```ts
1330
+ const ramp = await flags.ramps.retrieve("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f");
1331
+ ```
1332
+
1333
+ [HTTP reference](https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-ramps-ramp-id)
1334
+
1335
+ ## scheduledChanges
1336
+
1337
+ ### `flags.scheduledChanges.cancel(scheduledChangeId, params?, options?)`
1338
+
1339
+ `POST /v1/workspaces/{workspace_id}/scheduled-changes/{scheduled_change_id}/cancel` → `Flags.ScheduledChange`
1340
+
1341
+ Cancel a scheduled change.
1342
+
1343
+ Cancels a pending scheduled change. A scheduled change request goes back to `approved`.
1344
+
1345
+ - Params: `Flags.ScheduledChangeCancelParams`
1346
+
1347
+ | Status | Error class | Codes | When |
1348
+ |---|---|---|---|
1349
+ | 401 | `AuthenticationError` | `UNAUTHORIZED` | Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`. |
1350
+ | 403 | `PermissionDeniedError` | `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`). The caller also needs `flags.value.update` on the environment and the setting, plus `flags.protected.update` in a protected environment. |
1351
+ | 404 | `NotFoundError` | `NOT_FOUND`, `SCHEDULED_CHANGE_NOT_FOUND` | `SCHEDULED_CHANGE_NOT_FOUND`: no such scheduled change in this workspace. |
1352
+ | 409 | `ConflictError` | `CONFLICT`, `SCHEDULED_CHANGE_NOT_PENDING` | `SCHEDULED_CHANGE_NOT_PENDING`: it already ran or was cancelled. |
1353
+ | 429 | `RateLimitError` | `RATE_LIMITED` | More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds. |
1354
+ | 503 | `InternalServerError` | `SERVICE_UNAVAILABLE`, `MANAGEMENT_UNAVAILABLE` | The management API is temporarily unavailable (`MANAGEMENT_UNAVAILABLE`), for example while its database is unreachable. Wait `Retry-After` seconds and retry; SDK config delivery keeps serving. |
1355
+
1356
+ ```ts
1357
+ const scheduledChange = await flags.scheduledChanges.cancel("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f", { note: "Roll out the new checkout to everyone (FLAG-142)" });
1358
+ ```
1359
+
1360
+ [HTTP reference](https://productcraft.co/docs/flags/api-reference#post-v1-workspaces-workspace-id-scheduled-changes-scheduled-change-id-cancel)
1361
+
1362
+ ### `flags.scheduledChanges.list(params?, options?)`
1363
+
1364
+ `GET /v1/workspaces/{workspace_id}/scheduled-changes` → `PagePromise<Flags.ScheduledChange>`
1365
+
1366
+ List scheduled changes.
1367
+
1368
+ Scheduled value changes, soonest first. Filter by `status` (`pending`, `applied`, `failed`, `cancelled`), project, environment or setting.
1369
+
1370
+ - Params: `Flags.ScheduledChangeListParams`
1371
+ - Paginated: `for await` iterates every item; `await` gives one page
1372
+
1373
+ | Status | Error class | Codes | When |
1374
+ |---|---|---|---|
1375
+ | 400 | `BadRequestError` | `BAD_REQUEST`, `VALIDATION_ERROR` | `VALIDATION_ERROR`: a bad filter, cursor or `limit`. |
1376
+ | 401 | `AuthenticationError` | `UNAUTHORIZED` | Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`. |
1377
+ | 403 | `PermissionDeniedError` | `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`). |
1378
+ | 429 | `RateLimitError` | `RATE_LIMITED` | More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds. |
1379
+ | 503 | `InternalServerError` | `SERVICE_UNAVAILABLE`, `MANAGEMENT_UNAVAILABLE` | The management API is temporarily unavailable (`MANAGEMENT_UNAVAILABLE`), for example while its database is unreachable. Wait `Retry-After` seconds and retry; SDK config delivery keeps serving. |
1380
+
1381
+ ```ts
1382
+ for await (const scheduledChange of flags.scheduledChanges.list()) {
1383
+ console.log(scheduledChange);
1384
+ }
1385
+ const page = await flags.scheduledChanges.list({}, { timeout: 5_000 });
1386
+ ```
1387
+
1388
+ [HTTP reference](https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-scheduled-changes)
1389
+
1390
+ ### `flags.scheduledChanges.retrieve(scheduledChangeId, options?)`
1391
+
1392
+ `GET /v1/workspaces/{workspace_id}/scheduled-changes/{scheduled_change_id}` → `Flags.ScheduledChange`
1393
+
1394
+ Get a scheduled change.
1395
+
1396
+ One scheduled change, with what it will write and, once run, the history entry or the error.
1397
+
1398
+ | Status | Error class | Codes | When |
1399
+ |---|---|---|---|
1400
+ | 401 | `AuthenticationError` | `UNAUTHORIZED` | Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`. |
1401
+ | 403 | `PermissionDeniedError` | `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`). |
1402
+ | 404 | `NotFoundError` | `NOT_FOUND`, `SCHEDULED_CHANGE_NOT_FOUND` | `SCHEDULED_CHANGE_NOT_FOUND`: no such scheduled change in this workspace. |
1403
+ | 429 | `RateLimitError` | `RATE_LIMITED` | More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds. |
1404
+ | 503 | `InternalServerError` | `SERVICE_UNAVAILABLE`, `MANAGEMENT_UNAVAILABLE` | The management API is temporarily unavailable (`MANAGEMENT_UNAVAILABLE`), for example while its database is unreachable. Wait `Retry-After` seconds and retry; SDK config delivery keeps serving. |
1405
+
1406
+ ```ts
1407
+ const scheduledChange = await flags.scheduledChanges.retrieve("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f");
1408
+ ```
1409
+
1410
+ [HTTP reference](https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-scheduled-changes-scheduled-change-id)
1411
+
952
1412
  ## segments
953
1413
 
954
1414
  ### `flags.segments.delete(segmentId, params?, options?)`
@@ -1225,6 +1685,96 @@ const settingValue = await flags.settings.values.update("3f0c3c1e-8a2b-4c55-9d3f
1225
1685
 
1226
1686
  [HTTP reference](https://productcraft.co/docs/flags/api-reference#patch-v1-workspaces-workspace-id-settings-setting-id-values-environment-id)
1227
1687
 
1688
+ ## settings.values.changeRequests
1689
+
1690
+ ### `flags.settings.values.changeRequests.create(settingId, environmentId, params, options?)`
1691
+
1692
+ `POST /v1/workspaces/{workspace_id}/settings/{setting_id}/values/{environment_id}/change-requests` → `Flags.ChangeRequest`
1693
+
1694
+ Propose a change.
1695
+
1696
+ Proposes a value write (`replace` or `patch`, as PUT / PATCH …/values take them) or a timed ramp (`ramp`) for review instead of making it. The proposal is validated as the write would be and stored without any confidential cleartext; the environment's owners and admins are emailed and `change_request.created` is sent to webhooks. Works in any environment; where the environment's `approval_policy` applies to the caller it is the only way to change a value. Send the `version` you read.
1697
+
1698
+ - Params: `Flags.SettingsValueChangeRequestCreateParams`
1699
+ - Idempotent: an `Idempotency-Key` is sent automatically and reused on retries
1700
+
1701
+ | Status | Error class | Codes | When |
1702
+ |---|---|---|---|
1703
+ | 400 | `BadRequestError` | `BAD_REQUEST`, `VALIDATION_ERROR` | `VALIDATION_ERROR`: a field does not fit the `operation`, or is missing. |
1704
+ | 401 | `AuthenticationError` | `UNAUTHORIZED` | Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`. |
1705
+ | 403 | `PermissionDeniedError` | `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`). The caller also needs `flags.value.update` on the environment and the setting, plus `flags.protected.update` in a protected environment. |
1706
+ | 404 | `NotFoundError` | `NOT_FOUND`, `SETTING_NOT_FOUND`, `ENVIRONMENT_NOT_FOUND` | `SETTING_NOT_FOUND` or `ENVIRONMENT_NOT_FOUND`. |
1707
+ | 409 | `ConflictError` | `CONFLICT`, `VERSION_CONFLICT`, `RAMP_ALREADY_ACTIVE`, `IDEMPOTENCY_KEY_REUSE`, `IDEMPOTENCY_IN_PROGRESS` | `VERSION_CONFLICT`: the value changed since you read it. `RAMP_ALREADY_ACTIVE`: the flag already has a ramp in this environment. 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). |
1708
+ | 422 | `UnprocessableEntityError` | `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`, `NOTHING_TO_PROPOSE`, `RAMP_INVALID`, `RUN_AT_INVALID` | The proposal is refused by the checks the write itself makes: `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`, `NOTHING_TO_PROPOSE` (it equals what the environment serves now), `RAMP_INVALID` or `RUN_AT_INVALID`. |
1709
+ | 429 | `RateLimitError` | `RATE_LIMITED` | More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds. |
1710
+ | 503 | `InternalServerError` | `SERVICE_UNAVAILABLE`, `MANAGEMENT_UNAVAILABLE` | The management API is temporarily unavailable (`MANAGEMENT_UNAVAILABLE`), for example while its database is unreachable. Wait `Retry-After` seconds and retry; SDK config delivery keeps serving. |
1711
+
1712
+ ```ts
1713
+ const changeRequest = await flags.settings.values.changeRequests.create("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f", "3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f", { operation: "patch", version: 7 });
1714
+ ```
1715
+
1716
+ [HTTP reference](https://productcraft.co/docs/flags/api-reference#post-v1-workspaces-workspace-id-settings-setting-id-values-environment-id-change-requests)
1717
+
1718
+ ## settings.values.ramps
1719
+
1720
+ ### `flags.settings.values.ramps.create(settingId, environmentId, params, options?)`
1721
+
1722
+ `POST /v1/workspaces/{workspace_id}/settings/{setting_id}/values/{environment_id}/ramps` → `Flags.Ramp`
1723
+
1724
+ Start a ramp.
1725
+
1726
+ Rolls `value` out to a growing percentage at set times (for example 5% → 25% → 50% → 100%): each step sets the flag-level split, so users already in keep the value as it grows (sticky bucketing), and a final 100% step makes it the default. Rules still decide first. Where the environment needs approval for the caller this answers 409 `APPROVAL_REQUIRED`: propose it as a change request with `operation: ramp`.
1727
+
1728
+ - Params: `Flags.SettingsValueRampCreateParams`
1729
+ - Idempotent: an `Idempotency-Key` is sent automatically and reused on retries
1730
+
1731
+ | Status | Error class | Codes | When |
1732
+ |---|---|---|---|
1733
+ | 400 | `BadRequestError` | `BAD_REQUEST`, `VALIDATION_ERROR` | `VALIDATION_ERROR`: a field is missing or invalid. |
1734
+ | 401 | `AuthenticationError` | `UNAUTHORIZED` | Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`. |
1735
+ | 403 | `PermissionDeniedError` | `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`). The caller also needs `flags.value.update` on the environment and the setting, plus `flags.protected.update` in a protected environment. |
1736
+ | 404 | `NotFoundError` | `NOT_FOUND`, `SETTING_NOT_FOUND`, `ENVIRONMENT_NOT_FOUND` | `SETTING_NOT_FOUND` or `ENVIRONMENT_NOT_FOUND`. |
1737
+ | 409 | `ConflictError` | `CONFLICT`, `APPROVAL_REQUIRED`, `RAMP_ALREADY_ACTIVE`, `IDEMPOTENCY_KEY_REUSE`, `IDEMPOTENCY_IN_PROGRESS` | `APPROVAL_REQUIRED`: the environment needs approval for this caller. `RAMP_ALREADY_ACTIVE`: the flag already has a live ramp here. 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). |
1738
+ | 422 | `UnprocessableEntityError` | `UNPROCESSABLE_ENTITY`, `RAMP_INVALID`, `INVALID_VALUE`, `NOTE_REQUIRED` | `RAMP_INVALID` (`details.errors` lists each step problem, or the value is already the default), `INVALID_VALUE` or `NOTE_REQUIRED`. |
1739
+ | 429 | `RateLimitError` | `RATE_LIMITED` | More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds. |
1740
+ | 503 | `InternalServerError` | `SERVICE_UNAVAILABLE`, `MANAGEMENT_UNAVAILABLE` | The management API is temporarily unavailable (`MANAGEMENT_UNAVAILABLE`), for example while its database is unreachable. Wait `Retry-After` seconds and retry; SDK config delivery keeps serving. |
1741
+
1742
+ ```ts
1743
+ const ramp = await flags.settings.values.ramps.create("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f", "3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f", { steps: [{ at: "2026-11-20T09:00:00.000Z", percentage: 25 }], value: true });
1744
+ ```
1745
+
1746
+ [HTTP reference](https://productcraft.co/docs/flags/api-reference#post-v1-workspaces-workspace-id-settings-setting-id-values-environment-id-ramps)
1747
+
1748
+ ## settings.values.scheduledChanges
1749
+
1750
+ ### `flags.settings.values.scheduledChanges.create(settingId, environmentId, params, options?)`
1751
+
1752
+ `POST /v1/workspaces/{workspace_id}/settings/{setting_id}/values/{environment_id}/scheduled-changes` → `Flags.ScheduledChange`
1753
+
1754
+ Schedule a change.
1755
+
1756
+ Schedules a value write for `run_at` (to within about 30 seconds): a `patch` (turn a flag on at 09:00) applies to whatever the value is then; a `replace` applies only if the value is still at `version`. Where the environment needs approval for the caller this answers 409 `APPROVAL_REQUIRED`: propose a change request and schedule it once approved.
1757
+
1758
+ - Params: `Flags.SettingsValueScheduledChangeCreateParams`
1759
+ - Idempotent: an `Idempotency-Key` is sent automatically and reused on retries
1760
+
1761
+ | Status | Error class | Codes | When |
1762
+ |---|---|---|---|
1763
+ | 400 | `BadRequestError` | `BAD_REQUEST`, `VALIDATION_ERROR` | `VALIDATION_ERROR`: a field does not fit the `operation`. |
1764
+ | 401 | `AuthenticationError` | `UNAUTHORIZED` | Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`. |
1765
+ | 403 | `PermissionDeniedError` | `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`). The caller also needs `flags.value.update` on the environment and the setting, plus `flags.protected.update` in a protected environment. |
1766
+ | 404 | `NotFoundError` | `NOT_FOUND`, `SETTING_NOT_FOUND`, `ENVIRONMENT_NOT_FOUND` | `SETTING_NOT_FOUND` or `ENVIRONMENT_NOT_FOUND`. |
1767
+ | 409 | `ConflictError` | `CONFLICT`, `APPROVAL_REQUIRED`, `VERSION_CONFLICT`, `IDEMPOTENCY_KEY_REUSE`, `IDEMPOTENCY_IN_PROGRESS` | `APPROVAL_REQUIRED`: the environment needs approval for this caller. `VERSION_CONFLICT`: the value changed since you read it. 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). |
1768
+ | 422 | `UnprocessableEntityError` | `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`, `NOTHING_TO_PROPOSE`, `RAMP_INVALID`, `RUN_AT_INVALID` | The proposal is refused by the checks the write itself makes: `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`, `NOTHING_TO_PROPOSE` (it equals what the environment serves now), `RAMP_INVALID` or `RUN_AT_INVALID`. |
1769
+ | 429 | `RateLimitError` | `RATE_LIMITED` | More than 20 requests per second or 600 per minute from this client IP (`RATE_LIMITED`); wait `Retry-After` seconds. |
1770
+ | 503 | `InternalServerError` | `SERVICE_UNAVAILABLE`, `MANAGEMENT_UNAVAILABLE` | The management API is temporarily unavailable (`MANAGEMENT_UNAVAILABLE`), for example while its database is unreachable. Wait `Retry-After` seconds and retry; SDK config delivery keeps serving. |
1771
+
1772
+ ```ts
1773
+ const scheduledChange = await flags.settings.values.scheduledChanges.create("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f", "3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f", { operation: "patch", run_at: "2026-11-20T09:00:00.000Z" });
1774
+ ```
1775
+
1776
+ [HTTP reference](https://productcraft.co/docs/flags/api-reference#post-v1-workspaces-workspace-id-settings-setting-id-values-environment-id-scheduled-changes)
1777
+
1228
1778
  ## stats
1229
1779
 
1230
1780
  ### `flags.stats.retrieve(options?)`
@@ -1252,7 +1802,7 @@ const flagsStats = await flags.stats.retrieve();
1252
1802
 
1253
1803
  ### `flags.webhooks.unwrap({ payload, headers, secret? })`
1254
1804
 
1255
- Verifies the signature and returns `Flags.UnwrapWebhookEvent`. Events: `config.published`, `sdk_key.rotated`, plus `UnknownWebhookEvent` for types added later.
1805
+ Verifies the signature and returns `Flags.UnwrapWebhookEvent`. Events: `change_request.applied`, `change_request.approved`, `change_request.cancelled`, `change_request.created`, `change_request.rejected`, `config.published`, `sdk_key.rotated`, plus `UnknownWebhookEvent` for types added later.
1256
1806
 
1257
1807
  ### `flags.webhooks.sign({ payload, secret?, id?, timestamp? })`
1258
1808
 
@@ -1622,3 +2172,21 @@ const webhookEventDetail = await flags.webhooks.events.retrieve("3f0c1a2b-4c5d-4
1622
2172
  | `IMPORT_EXCEEDS_LIMITS` | The ConfigCat product is larger than the Flags workspace limits. |
1623
2173
  | `OWNER_NOT_A_MEMBER` | The owner_id is not a member of this workspace, or membership could not be checked with this credential. |
1624
2174
  | `SETTING_TYPE_IMMUTABLE` | A setting's type cannot change; create a new setting instead. |
2175
+ | `APPROVAL_REQUIRED` | The environment's approval policy applies to this caller: propose the change as a change request instead. |
2176
+ | `APPROVAL_POLICY_HUMAN_ONLY` | Only a person signed in to the console can change an environment approval policy. |
2177
+ | `NOTHING_TO_PROPOSE` | The proposed change matches what the environment serves now. |
2178
+ | `CHANGE_REQUEST_NOT_FOUND` | The change request does not exist in this workspace. |
2179
+ | `CHANGE_REQUEST_NOT_OPEN` | The change request is not in a state that allows this action (see details.status). |
2180
+ | `CHANGE_REQUEST_NOT_APPROVED` | The change request does not have the approvals it needs yet. |
2181
+ | `CHANGE_REQUEST_STALE` | The value changed since the change request was proposed; rebase or recreate it. |
2182
+ | `REVIEWER_MUST_BE_HUMAN` | Only a person signed in to the console can review a change request. |
2183
+ | `SELF_APPROVAL_NOT_ALLOWED` | The author of a change request (or the person an agent acted for) cannot review it. |
2184
+ | `ALREADY_REVIEWED` | You already reviewed this change request. |
2185
+ | `NOT_CHANGE_REQUEST_AUTHOR` | Only the author of the change request can do this. |
2186
+ | `SCHEDULED_CHANGE_NOT_FOUND` | The scheduled change does not exist in this workspace. |
2187
+ | `SCHEDULED_CHANGE_NOT_PENDING` | The scheduled change already ran or was cancelled. |
2188
+ | `RUN_AT_INVALID` | run_at must be in the future and within a year. |
2189
+ | `RAMP_NOT_FOUND` | The ramp does not exist in this workspace. |
2190
+ | `RAMP_INVALID` | The ramp steps are not valid (see details.errors). |
2191
+ | `RAMP_ALREADY_ACTIVE` | The flag already has an active or paused ramp in this environment. |
2192
+ | `RAMP_NOT_LIVE` | The ramp already completed, failed or was cancelled. |