@productcraft/flags 0.2.0 → 0.4.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.
- package/README.md +1 -1
- package/api.md +105 -2
- package/dist/browser/{chunk-DIPMYL6H.cjs → chunk-4XCQBTYE.cjs} +3 -3
- package/dist/browser/chunk-4XCQBTYE.cjs.map +1 -0
- package/dist/browser/{chunk-OI4KARX6.js → chunk-72WU42RU.js} +3 -3
- package/dist/browser/chunk-72WU42RU.js.map +1 -0
- package/dist/browser/{chunk-YAW7UFU3.cjs → chunk-CXYODDHM.cjs} +109 -6
- package/dist/browser/chunk-CXYODDHM.cjs.map +1 -0
- package/dist/browser/{chunk-UFZYZXX5.js → chunk-TCVKCN3S.js} +109 -6
- package/dist/browser/chunk-TCVKCN3S.js.map +1 -0
- package/dist/browser/index.cjs +8 -8
- package/dist/browser/index.js +2 -2
- package/dist/browser/management.cjs +2 -2
- package/dist/browser/management.js +1 -1
- package/dist/browser/testing.cjs +3 -3
- package/dist/browser/testing.js +1 -1
- package/dist/{chunk-ERCRURB5.js → chunk-7237IZU3.js} +109 -6
- package/dist/chunk-7237IZU3.js.map +1 -0
- package/dist/{chunk-ERZAYN5A.js → chunk-NB7OGN6R.js} +4 -4
- package/dist/chunk-NB7OGN6R.js.map +1 -0
- package/dist/{chunk-HOIKWDWQ.cjs → chunk-NSAKFGTJ.cjs} +109 -6
- package/dist/chunk-NSAKFGTJ.cjs.map +1 -0
- package/dist/{chunk-J62ZCSIV.cjs → chunk-Q3P66XRI.cjs} +4 -4
- package/dist/chunk-Q3P66XRI.cjs.map +1 -0
- package/dist/{client-bVEJfS6_.d.cts → client-BwoMpm8_.d.cts} +995 -10
- package/dist/{client-bVEJfS6_.d.ts → client-BwoMpm8_.d.ts} +995 -10
- package/dist/{client-DQaz2Leb.d.cts → client-K2zALPGD.d.cts} +5 -3
- package/dist/{client-DQaz2Leb.d.ts → client-K2zALPGD.d.ts} +5 -3
- package/dist/index.cjs +8 -8
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/management.cjs +2 -2
- package/dist/management.d.cts +1 -1
- package/dist/management.d.ts +1 -1
- package/dist/management.js +1 -1
- package/dist/testing.cjs +3 -3
- package/dist/testing.d.cts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +1 -1
- package/package.json +1 -1
- package/dist/browser/chunk-DIPMYL6H.cjs.map +0 -1
- package/dist/browser/chunk-OI4KARX6.js.map +0 -1
- package/dist/browser/chunk-UFZYZXX5.js.map +0 -1
- package/dist/browser/chunk-YAW7UFU3.cjs.map +0 -1
- package/dist/chunk-ERCRURB5.js.map +0 -1
- package/dist/chunk-ERZAYN5A.js.map +0 -1
- package/dist/chunk-HOIKWDWQ.cjs.map +0 -1
- package/dist/chunk-J62ZCSIV.cjs.map +0 -1
|
@@ -27,9 +27,11 @@ var ChangesResource = class extends APIResource {
|
|
|
27
27
|
*
|
|
28
28
|
* @param changeId - Id of the change.
|
|
29
29
|
* @param options - Per-request options.
|
|
30
|
+
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`.
|
|
30
31
|
* @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`).
|
|
31
32
|
* @throws {NotFoundError} 404 NOT_FOUND, CHANGE_NOT_FOUND: `CHANGE_NOT_FOUND`: no such change in this workspace (or it was pruned).
|
|
32
33
|
* @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.
|
|
34
|
+
* @throws {InternalServerError} 503 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.
|
|
33
35
|
* @see GET /v1/workspaces/{workspace_id}/changes/{change_id}
|
|
34
36
|
* @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-changes-change-id
|
|
35
37
|
* @example
|
|
@@ -49,11 +51,13 @@ var ChangesResource = class extends APIResource {
|
|
|
49
51
|
* @param params - `Flags.ChangeRevertParams`.
|
|
50
52
|
* @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).
|
|
51
53
|
* @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: `version` is missing (value and segment restores) or invalid.
|
|
54
|
+
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`.
|
|
52
55
|
* @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.
|
|
53
56
|
* @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.
|
|
54
57
|
* @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).
|
|
55
58
|
* @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).
|
|
56
59
|
* @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.
|
|
60
|
+
* @throws {InternalServerError} 503 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.
|
|
57
61
|
* @see POST /v1/workspaces/{workspace_id}/changes/{change_id}/revert
|
|
58
62
|
* @see https://productcraft.co/docs/flags/api-reference#post-v1-workspaces-workspace-id-changes-change-id-revert
|
|
59
63
|
* @example
|
|
@@ -76,9 +80,11 @@ var ConfigsEnvironmentsRevisionsResource = class extends APIResource {
|
|
|
76
80
|
* @param params - `Flags.ConfigEnvironmentRevisionListParams`.
|
|
77
81
|
* @param options - Per-request options.
|
|
78
82
|
* @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a bad cursor or `limit`.
|
|
83
|
+
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`.
|
|
79
84
|
* @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`).
|
|
80
85
|
* @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.
|
|
81
86
|
* @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.
|
|
87
|
+
* @throws {InternalServerError} 503 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.
|
|
82
88
|
* @see GET /v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/revisions
|
|
83
89
|
* @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-configs-config-id-environments-environment-id-revisions
|
|
84
90
|
* @example
|
|
@@ -102,9 +108,11 @@ var ConfigsEnvironmentsRevisionsResource = class extends APIResource {
|
|
|
102
108
|
* @param revision - The revision number.
|
|
103
109
|
* @param options - Per-request options.
|
|
104
110
|
* @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: `revision` is not a positive integer.
|
|
111
|
+
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`.
|
|
105
112
|
* @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`).
|
|
106
113
|
* @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).
|
|
107
114
|
* @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.
|
|
115
|
+
* @throws {InternalServerError} 503 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.
|
|
108
116
|
* @see GET /v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/revisions/{revision}
|
|
109
117
|
* @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-configs-config-id-environments-environment-id-revisions-revision
|
|
110
118
|
* @example
|
|
@@ -125,9 +133,11 @@ var ConfigsEnvironmentsSdkKeysResource = class extends APIResource {
|
|
|
125
133
|
* @param configId - Id of the config.
|
|
126
134
|
* @param environmentId - Id of an environment of the same project.
|
|
127
135
|
* @param options - Per-request options.
|
|
136
|
+
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`.
|
|
128
137
|
* @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`).
|
|
129
138
|
* @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.
|
|
130
139
|
* @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.
|
|
140
|
+
* @throws {InternalServerError} 503 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.
|
|
131
141
|
* @see DELETE /v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/sdk-keys/secondary
|
|
132
142
|
* @see https://productcraft.co/docs/flags/api-reference#delete-v1-workspaces-workspace-id-configs-config-id-environments-environment-id-sdk-keys-secondary
|
|
133
143
|
* @example
|
|
@@ -146,9 +156,11 @@ var ConfigsEnvironmentsSdkKeysResource = class extends APIResource {
|
|
|
146
156
|
* @param configId - Id of the config.
|
|
147
157
|
* @param environmentId - Id of an environment of the same project.
|
|
148
158
|
* @param options - Per-request options.
|
|
159
|
+
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`.
|
|
149
160
|
* @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`).
|
|
150
161
|
* @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.
|
|
151
162
|
* @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.
|
|
163
|
+
* @throws {InternalServerError} 503 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.
|
|
152
164
|
* @see GET /v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/sdk-keys
|
|
153
165
|
* @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-configs-config-id-environments-environment-id-sdk-keys
|
|
154
166
|
* @example
|
|
@@ -167,9 +179,11 @@ var ConfigsEnvironmentsSdkKeysResource = class extends APIResource {
|
|
|
167
179
|
* @param configId - Id of the config.
|
|
168
180
|
* @param environmentId - Id of an environment of the same project.
|
|
169
181
|
* @param options - Per-request options.
|
|
182
|
+
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`.
|
|
170
183
|
* @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`).
|
|
171
184
|
* @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.
|
|
172
185
|
* @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.
|
|
186
|
+
* @throws {InternalServerError} 503 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.
|
|
173
187
|
* @see POST /v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/sdk-keys/reveal
|
|
174
188
|
* @see https://productcraft.co/docs/flags/api-reference#post-v1-workspaces-workspace-id-configs-config-id-environments-environment-id-sdk-keys-reveal
|
|
175
189
|
* @example
|
|
@@ -190,10 +204,12 @@ var ConfigsEnvironmentsSdkKeysResource = class extends APIResource {
|
|
|
190
204
|
* @param params - `Flags.ConfigEnvironmentSdkKeyRotateParams`.
|
|
191
205
|
* @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).
|
|
192
206
|
* @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: `grace_hours` is not an integer from 0 to 168, or `note` is too long.
|
|
207
|
+
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`.
|
|
193
208
|
* @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`).
|
|
194
209
|
* @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.
|
|
195
210
|
* @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).
|
|
196
211
|
* @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.
|
|
212
|
+
* @throws {InternalServerError} 503 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.
|
|
197
213
|
* @see POST /v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/sdk-keys/rotate
|
|
198
214
|
* @see https://productcraft.co/docs/flags/api-reference#post-v1-workspaces-workspace-id-configs-config-id-environments-environment-id-sdk-keys-rotate
|
|
199
215
|
* @example
|
|
@@ -216,9 +232,11 @@ var ConfigsEnvironmentsValuesResource = class extends APIResource {
|
|
|
216
232
|
* @param params - `Flags.ConfigEnvironmentValueListParams`.
|
|
217
233
|
* @param options - Per-request options.
|
|
218
234
|
* @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a bad cursor, `limit` or `include`.
|
|
235
|
+
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`.
|
|
219
236
|
* @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`).
|
|
220
237
|
* @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).
|
|
221
238
|
* @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.
|
|
239
|
+
* @throws {InternalServerError} 503 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.
|
|
222
240
|
* @see GET /v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/values
|
|
223
241
|
* @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-configs-config-id-environments-environment-id-values
|
|
224
242
|
* @example
|
|
@@ -256,11 +274,13 @@ var ConfigsEnvironmentsResource = class extends APIResource {
|
|
|
256
274
|
* @param params - `Flags.ConfigEnvironmentCopyParams`.
|
|
257
275
|
* @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).
|
|
258
276
|
* @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.
|
|
277
|
+
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`.
|
|
259
278
|
* @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.
|
|
260
279
|
* @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`.
|
|
261
280
|
* @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).
|
|
262
281
|
* @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).
|
|
263
282
|
* @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.
|
|
283
|
+
* @throws {InternalServerError} 503 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.
|
|
264
284
|
* @see POST /v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/copy
|
|
265
285
|
* @see https://productcraft.co/docs/flags/api-reference#post-v1-workspaces-workspace-id-configs-config-id-environments-environment-id-copy
|
|
266
286
|
* @example
|
|
@@ -284,10 +304,12 @@ var ConfigsEnvironmentsResource = class extends APIResource {
|
|
|
284
304
|
* @param params - `Flags.ConfigEnvironmentEvaluateParams`.
|
|
285
305
|
* @param options - Per-request options.
|
|
286
306
|
* @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`.
|
|
307
|
+
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`.
|
|
287
308
|
* @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`).
|
|
288
309
|
* @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.
|
|
289
310
|
* @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.
|
|
290
311
|
* @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.
|
|
312
|
+
* @throws {InternalServerError} 503 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.
|
|
291
313
|
* @see POST /v1/workspaces/{workspace_id}/configs/{config_id}/environments/{environment_id}/evaluate
|
|
292
314
|
* @see https://productcraft.co/docs/flags/api-reference#post-v1-workspaces-workspace-id-configs-config-id-environments-environment-id-evaluate
|
|
293
315
|
* @example
|
|
@@ -309,12 +331,13 @@ var ConfigsSettingsResource = class extends APIResource {
|
|
|
309
331
|
* @param params - `Flags.ConfigSettingsCreateParams`.
|
|
310
332
|
* @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).
|
|
311
333
|
* @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is missing or invalid.
|
|
334
|
+
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`.
|
|
312
335
|
* @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`).
|
|
313
336
|
* @throws {NotFoundError} 404 NOT_FOUND, CONFIG_NOT_FOUND: `CONFIG_NOT_FOUND`: no such config in this workspace.
|
|
314
337
|
* @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).
|
|
315
338
|
* @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.
|
|
316
339
|
* @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.
|
|
317
|
-
* @throws {InternalServerError} 503 SERVICE_UNAVAILABLE: `SERVICE_UNAVAILABLE`: the member lookup for `owner_id` is unavailable; retry.
|
|
340
|
+
* @throws {InternalServerError} 503 SERVICE_UNAVAILABLE, MANAGEMENT_UNAVAILABLE: `SERVICE_UNAVAILABLE`: the member lookup for `owner_id` is unavailable; retry. Or `MANAGEMENT_UNAVAILABLE`: the whole management API is temporarily unavailable, for example while its database is unreachable; wait `Retry-After` seconds and retry.
|
|
318
341
|
* @see POST /v1/workspaces/{workspace_id}/configs/{config_id}/settings
|
|
319
342
|
* @see https://productcraft.co/docs/flags/api-reference#post-v1-workspaces-workspace-id-configs-config-id-settings
|
|
320
343
|
* @example
|
|
@@ -334,9 +357,11 @@ var ConfigsSettingsResource = class extends APIResource {
|
|
|
334
357
|
* @param params - `Flags.ConfigSettingsListParams`.
|
|
335
358
|
* @param options - Per-request options.
|
|
336
359
|
* @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a bad filter, cursor or `limit`.
|
|
360
|
+
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`.
|
|
337
361
|
* @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`).
|
|
338
362
|
* @throws {NotFoundError} 404 NOT_FOUND, CONFIG_NOT_FOUND: `CONFIG_NOT_FOUND`: no such config in this workspace.
|
|
339
363
|
* @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.
|
|
364
|
+
* @throws {InternalServerError} 503 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.
|
|
340
365
|
* @see GET /v1/workspaces/{workspace_id}/configs/{config_id}/settings
|
|
341
366
|
* @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-configs-config-id-settings
|
|
342
367
|
* @example
|
|
@@ -369,9 +394,11 @@ var ConfigsResource = class extends APIResource {
|
|
|
369
394
|
* @param params - `Flags.ConfigCompareParams`.
|
|
370
395
|
* @param options - Per-request options.
|
|
371
396
|
* @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: `environment_ids` is not 2-5 environment ids.
|
|
397
|
+
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`.
|
|
372
398
|
* @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`).
|
|
373
399
|
* @throws {NotFoundError} 404 NOT_FOUND, CONFIG_NOT_FOUND, ENVIRONMENT_NOT_FOUND: `CONFIG_NOT_FOUND` or `ENVIRONMENT_NOT_FOUND`.
|
|
374
400
|
* @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.
|
|
401
|
+
* @throws {InternalServerError} 503 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.
|
|
375
402
|
* @see GET /v1/workspaces/{workspace_id}/configs/{config_id}/compare
|
|
376
403
|
* @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-configs-config-id-compare
|
|
377
404
|
* @example
|
|
@@ -394,9 +421,11 @@ var ConfigsResource = class extends APIResource {
|
|
|
394
421
|
* @param configId - Id of the config.
|
|
395
422
|
* @param params - `Flags.ConfigDeleteParams`.
|
|
396
423
|
* @param options - Per-request options.
|
|
424
|
+
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`.
|
|
397
425
|
* @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`).
|
|
398
426
|
* @throws {NotFoundError} 404 NOT_FOUND, CONFIG_NOT_FOUND: `CONFIG_NOT_FOUND`: no such config in this workspace.
|
|
399
427
|
* @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.
|
|
428
|
+
* @throws {InternalServerError} 503 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.
|
|
400
429
|
* @see DELETE /v1/workspaces/{workspace_id}/configs/{config_id}
|
|
401
430
|
* @see https://productcraft.co/docs/flags/api-reference#delete-v1-workspaces-workspace-id-configs-config-id
|
|
402
431
|
* @example
|
|
@@ -412,9 +441,11 @@ var ConfigsResource = class extends APIResource {
|
|
|
412
441
|
*
|
|
413
442
|
* @param configId - Id of the config.
|
|
414
443
|
* @param options - Per-request options.
|
|
444
|
+
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`.
|
|
415
445
|
* @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`).
|
|
416
446
|
* @throws {NotFoundError} 404 NOT_FOUND, CONFIG_NOT_FOUND: `CONFIG_NOT_FOUND`: no such config in this workspace.
|
|
417
447
|
* @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.
|
|
448
|
+
* @throws {InternalServerError} 503 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.
|
|
418
449
|
* @see GET /v1/workspaces/{workspace_id}/configs/{config_id}
|
|
419
450
|
* @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-configs-config-id
|
|
420
451
|
* @example
|
|
@@ -434,10 +465,12 @@ var ConfigsResource = class extends APIResource {
|
|
|
434
465
|
* @param params - `Flags.ConfigUpdateParams`.
|
|
435
466
|
* @param options - Per-request options.
|
|
436
467
|
* @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid.
|
|
468
|
+
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`.
|
|
437
469
|
* @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`).
|
|
438
470
|
* @throws {NotFoundError} 404 NOT_FOUND, CONFIG_NOT_FOUND: `CONFIG_NOT_FOUND`: no such config in this workspace.
|
|
439
471
|
* @throws {ConflictError} 409 CONFLICT, KEY_ALREADY_EXISTS: `KEY_ALREADY_EXISTS`: the project already has a config with this key.
|
|
440
472
|
* @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.
|
|
473
|
+
* @throws {InternalServerError} 503 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.
|
|
441
474
|
* @see PATCH /v1/workspaces/{workspace_id}/configs/{config_id}
|
|
442
475
|
* @see https://productcraft.co/docs/flags/api-reference#patch-v1-workspaces-workspace-id-configs-config-id
|
|
443
476
|
* @example
|
|
@@ -458,12 +491,14 @@ var ImportsResource = class extends APIResource {
|
|
|
458
491
|
* @param params - `Flags.ImportCreateParams`.
|
|
459
492
|
* @param options - Per-request options.
|
|
460
493
|
* @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is missing or invalid (`source` must be `configcat`, `configcat_product_id` a uuid).
|
|
494
|
+
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`.
|
|
461
495
|
* @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`).
|
|
462
496
|
* @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.
|
|
463
497
|
* @throws {ConflictError} 409 CONFLICT, KEY_ALREADY_EXISTS: `KEY_ALREADY_EXISTS`: a project with the target name already exists (pass `target_project_name`).
|
|
464
498
|
* @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.
|
|
465
499
|
* @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.
|
|
466
500
|
* @throws {InternalServerError} 502 BAD_GATEWAY, IMPORT_SOURCE_UNAVAILABLE: `IMPORT_SOURCE_UNAVAILABLE`: ConfigCat answered 5xx, timed out or could not be reached.
|
|
501
|
+
* @throws {InternalServerError} 503 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.
|
|
467
502
|
* @see POST /v1/workspaces/{workspace_id}/imports
|
|
468
503
|
* @see https://productcraft.co/docs/flags/api-reference#post-v1-workspaces-workspace-id-imports
|
|
469
504
|
* @example
|
|
@@ -487,8 +522,10 @@ var LimitsResource = class extends APIResource {
|
|
|
487
522
|
* The preview limits that apply to this workspace and how much of the counted ones it uses.
|
|
488
523
|
*
|
|
489
524
|
* @param options - Per-request options.
|
|
525
|
+
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`.
|
|
490
526
|
* @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`).
|
|
491
527
|
* @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.
|
|
528
|
+
* @throws {InternalServerError} 503 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.
|
|
492
529
|
* @see GET /v1/workspaces/{workspace_id}/limits
|
|
493
530
|
* @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-limits
|
|
494
531
|
* @example
|
|
@@ -510,9 +547,11 @@ var ProjectsChangesResource = class extends APIResource {
|
|
|
510
547
|
* @param params - `Flags.ProjectChangeExportParams`.
|
|
511
548
|
* @param options - Per-request options.
|
|
512
549
|
* @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a bad filter or `format`, or `since` is not before `until`.
|
|
550
|
+
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`.
|
|
513
551
|
* @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`).
|
|
514
552
|
* @throws {NotFoundError} 404 NOT_FOUND, PROJECT_NOT_FOUND: `PROJECT_NOT_FOUND`: no such project in this workspace.
|
|
515
553
|
* @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.
|
|
554
|
+
* @throws {InternalServerError} 503 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.
|
|
516
555
|
* @see GET /v1/workspaces/{workspace_id}/projects/{project_id}/changes/export
|
|
517
556
|
* @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-projects-project-id-changes-export
|
|
518
557
|
* @example
|
|
@@ -533,9 +572,11 @@ var ProjectsChangesResource = class extends APIResource {
|
|
|
533
572
|
* @param params - `Flags.ProjectChangeListParams`.
|
|
534
573
|
* @param options - Per-request options.
|
|
535
574
|
* @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a bad filter, cursor or `limit`, or `since` is not before `until`.
|
|
575
|
+
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`.
|
|
536
576
|
* @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`).
|
|
537
577
|
* @throws {NotFoundError} 404 NOT_FOUND, PROJECT_NOT_FOUND: `PROJECT_NOT_FOUND`: no such project in this workspace.
|
|
538
578
|
* @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.
|
|
579
|
+
* @throws {InternalServerError} 503 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.
|
|
539
580
|
* @see GET /v1/workspaces/{workspace_id}/projects/{project_id}/changes
|
|
540
581
|
* @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-projects-project-id-changes
|
|
541
582
|
* @example
|
|
@@ -560,11 +601,13 @@ var ProjectsConfigsResource = class extends APIResource {
|
|
|
560
601
|
* @param params - `Flags.ProjectConfigCreateParams`.
|
|
561
602
|
* @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).
|
|
562
603
|
* @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is missing or invalid.
|
|
604
|
+
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`.
|
|
563
605
|
* @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`).
|
|
564
606
|
* @throws {NotFoundError} 404 NOT_FOUND, PROJECT_NOT_FOUND: `PROJECT_NOT_FOUND`: no such project in this workspace.
|
|
565
607
|
* @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).
|
|
566
608
|
* @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, LIMIT_EXCEEDED: `LIMIT_EXCEEDED`: the project already has the maximum number of configs (`details`: `limit`, `max`, `current`).
|
|
567
609
|
* @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.
|
|
610
|
+
* @throws {InternalServerError} 503 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.
|
|
568
611
|
* @see POST /v1/workspaces/{workspace_id}/projects/{project_id}/configs
|
|
569
612
|
* @see https://productcraft.co/docs/flags/api-reference#post-v1-workspaces-workspace-id-projects-project-id-configs
|
|
570
613
|
* @example
|
|
@@ -584,9 +627,11 @@ var ProjectsConfigsResource = class extends APIResource {
|
|
|
584
627
|
* @param params - `Flags.ProjectConfigListParams`.
|
|
585
628
|
* @param options - Per-request options.
|
|
586
629
|
* @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a bad cursor or a `limit` outside 1-100.
|
|
630
|
+
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`.
|
|
587
631
|
* @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`).
|
|
588
632
|
* @throws {NotFoundError} 404 NOT_FOUND, PROJECT_NOT_FOUND: `PROJECT_NOT_FOUND`: no such project in this workspace.
|
|
589
633
|
* @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.
|
|
634
|
+
* @throws {InternalServerError} 503 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.
|
|
590
635
|
* @see GET /v1/workspaces/{workspace_id}/projects/{project_id}/configs
|
|
591
636
|
* @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-projects-project-id-configs
|
|
592
637
|
* @example
|
|
@@ -611,11 +656,13 @@ var ProjectsEnvironmentsResource = class extends APIResource {
|
|
|
611
656
|
* @param params - `Flags.ProjectEnvironmentCreateParams`.
|
|
612
657
|
* @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).
|
|
613
658
|
* @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is missing or invalid.
|
|
659
|
+
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`.
|
|
614
660
|
* @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`).
|
|
615
661
|
* @throws {NotFoundError} 404 NOT_FOUND, PROJECT_NOT_FOUND: `PROJECT_NOT_FOUND`: no such project in this workspace.
|
|
616
662
|
* @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).
|
|
617
663
|
* @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, LIMIT_EXCEEDED: `LIMIT_EXCEEDED`: the project already has the maximum number of environments (`details`: `limit`, `max`, `current`).
|
|
618
664
|
* @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.
|
|
665
|
+
* @throws {InternalServerError} 503 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.
|
|
619
666
|
* @see POST /v1/workspaces/{workspace_id}/projects/{project_id}/environments
|
|
620
667
|
* @see https://productcraft.co/docs/flags/api-reference#post-v1-workspaces-workspace-id-projects-project-id-environments
|
|
621
668
|
* @example
|
|
@@ -635,10 +682,12 @@ var ProjectsEnvironmentsResource = class extends APIResource {
|
|
|
635
682
|
* @param environmentId - Id of the environment.
|
|
636
683
|
* @param params - `Flags.ProjectEnvironmentDeleteParams`.
|
|
637
684
|
* @param options - Per-request options.
|
|
685
|
+
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`.
|
|
638
686
|
* @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`).
|
|
639
687
|
* @throws {NotFoundError} 404 NOT_FOUND, ENVIRONMENT_NOT_FOUND: `ENVIRONMENT_NOT_FOUND`: no such environment in this project.
|
|
640
688
|
* @throws {ConflictError} 409 CONFLICT, LAST_ENVIRONMENT: `LAST_ENVIRONMENT`: this is the project's only environment.
|
|
641
689
|
* @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.
|
|
690
|
+
* @throws {InternalServerError} 503 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.
|
|
642
691
|
* @see DELETE /v1/workspaces/{workspace_id}/projects/{project_id}/environments/{environment_id}
|
|
643
692
|
* @see https://productcraft.co/docs/flags/api-reference#delete-v1-workspaces-workspace-id-projects-project-id-environments-environment-id
|
|
644
693
|
* @example
|
|
@@ -656,9 +705,11 @@ var ProjectsEnvironmentsResource = class extends APIResource {
|
|
|
656
705
|
*
|
|
657
706
|
* @param projectId - Id of the project.
|
|
658
707
|
* @param options - Per-request options.
|
|
708
|
+
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`.
|
|
659
709
|
* @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`).
|
|
660
710
|
* @throws {NotFoundError} 404 NOT_FOUND, PROJECT_NOT_FOUND: `PROJECT_NOT_FOUND`: no such project in this workspace.
|
|
661
711
|
* @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.
|
|
712
|
+
* @throws {InternalServerError} 503 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.
|
|
662
713
|
* @see GET /v1/workspaces/{workspace_id}/projects/{project_id}/environments
|
|
663
714
|
* @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-projects-project-id-environments
|
|
664
715
|
* @example
|
|
@@ -675,9 +726,11 @@ var ProjectsEnvironmentsResource = class extends APIResource {
|
|
|
675
726
|
* @param projectId - Id of the project.
|
|
676
727
|
* @param environmentId - Id of the environment.
|
|
677
728
|
* @param options - Per-request options.
|
|
729
|
+
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`.
|
|
678
730
|
* @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`).
|
|
679
731
|
* @throws {NotFoundError} 404 NOT_FOUND, ENVIRONMENT_NOT_FOUND: `ENVIRONMENT_NOT_FOUND`: no such environment in this project.
|
|
680
732
|
* @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.
|
|
733
|
+
* @throws {InternalServerError} 503 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.
|
|
681
734
|
* @see GET /v1/workspaces/{workspace_id}/projects/{project_id}/environments/{environment_id}
|
|
682
735
|
* @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-projects-project-id-environments-environment-id
|
|
683
736
|
* @example
|
|
@@ -698,9 +751,11 @@ var ProjectsEnvironmentsResource = class extends APIResource {
|
|
|
698
751
|
* @param params - `Flags.ProjectEnvironmentUpdateParams`.
|
|
699
752
|
* @param options - Per-request options.
|
|
700
753
|
* @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid.
|
|
754
|
+
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`.
|
|
701
755
|
* @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`).
|
|
702
756
|
* @throws {NotFoundError} 404 NOT_FOUND, ENVIRONMENT_NOT_FOUND: `ENVIRONMENT_NOT_FOUND`: no such environment in this project.
|
|
703
757
|
* @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.
|
|
758
|
+
* @throws {InternalServerError} 503 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.
|
|
704
759
|
* @see PATCH /v1/workspaces/{workspace_id}/projects/{project_id}/environments/{environment_id}
|
|
705
760
|
* @see https://productcraft.co/docs/flags/api-reference#patch-v1-workspaces-workspace-id-projects-project-id-environments-environment-id
|
|
706
761
|
* @example
|
|
@@ -722,11 +777,13 @@ var ProjectsSegmentsResource = class extends APIResource {
|
|
|
722
777
|
* @param params - `Flags.ProjectSegmentCreateParams`.
|
|
723
778
|
* @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).
|
|
724
779
|
* @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is missing or invalid.
|
|
780
|
+
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`.
|
|
725
781
|
* @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`).
|
|
726
782
|
* @throws {NotFoundError} 404 NOT_FOUND, PROJECT_NOT_FOUND: `PROJECT_NOT_FOUND`: no such project in this workspace.
|
|
727
783
|
* @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).
|
|
728
784
|
* @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`).
|
|
729
785
|
* @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.
|
|
786
|
+
* @throws {InternalServerError} 503 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.
|
|
730
787
|
* @see POST /v1/workspaces/{workspace_id}/projects/{project_id}/segments
|
|
731
788
|
* @see https://productcraft.co/docs/flags/api-reference#post-v1-workspaces-workspace-id-projects-project-id-segments
|
|
732
789
|
* @example
|
|
@@ -753,9 +810,11 @@ var ProjectsSegmentsResource = class extends APIResource {
|
|
|
753
810
|
* @param params - `Flags.ProjectSegmentListParams`.
|
|
754
811
|
* @param options - Per-request options.
|
|
755
812
|
* @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a bad cursor or `limit`.
|
|
813
|
+
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`.
|
|
756
814
|
* @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`).
|
|
757
815
|
* @throws {NotFoundError} 404 NOT_FOUND, PROJECT_NOT_FOUND: `PROJECT_NOT_FOUND`: no such project in this workspace.
|
|
758
816
|
* @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.
|
|
817
|
+
* @throws {InternalServerError} 503 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.
|
|
759
818
|
* @see GET /v1/workspaces/{workspace_id}/projects/{project_id}/segments
|
|
760
819
|
* @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-projects-project-id-segments
|
|
761
820
|
* @example
|
|
@@ -795,10 +854,12 @@ var ProjectsResource = class extends APIResource {
|
|
|
795
854
|
* @param params - `Flags.ProjectCreateParams`.
|
|
796
855
|
* @param options - Per-request options (an Idempotency-Key is sent automatically; override with `idempotencyKey`).
|
|
797
856
|
* @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is missing or invalid.
|
|
857
|
+
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`.
|
|
798
858
|
* @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`).
|
|
799
859
|
* @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).
|
|
800
860
|
* @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, LIMIT_EXCEEDED: `LIMIT_EXCEEDED`: the workspace already has the maximum number of projects (`details`: `limit`, `max`, `current`).
|
|
801
861
|
* @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.
|
|
862
|
+
* @throws {InternalServerError} 503 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.
|
|
802
863
|
* @see POST /v1/workspaces/{workspace_id}/projects
|
|
803
864
|
* @see https://productcraft.co/docs/flags/api-reference#post-v1-workspaces-workspace-id-projects
|
|
804
865
|
* @example
|
|
@@ -817,10 +878,12 @@ var ProjectsResource = class extends APIResource {
|
|
|
817
878
|
* @param projectId - Id of the project.
|
|
818
879
|
* @param params - `Flags.ProjectDeleteParams`.
|
|
819
880
|
* @param options - Per-request options.
|
|
881
|
+
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`.
|
|
820
882
|
* @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`).
|
|
821
883
|
* @throws {NotFoundError} 404 NOT_FOUND, PROJECT_NOT_FOUND: `PROJECT_NOT_FOUND`: no such project in this workspace.
|
|
822
884
|
* @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY, CONFIRMATION_REQUIRED: `CONFIRMATION_REQUIRED`: `confirm` is missing or is not the exact project name.
|
|
823
885
|
* @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.
|
|
886
|
+
* @throws {InternalServerError} 503 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.
|
|
824
887
|
* @see DELETE /v1/workspaces/{workspace_id}/projects/{project_id}
|
|
825
888
|
* @see https://productcraft.co/docs/flags/api-reference#delete-v1-workspaces-workspace-id-projects-project-id
|
|
826
889
|
* @example
|
|
@@ -839,8 +902,10 @@ var ProjectsResource = class extends APIResource {
|
|
|
839
902
|
* @param params - `Flags.ProjectListParams`.
|
|
840
903
|
* @param options - Per-request options.
|
|
841
904
|
* @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a bad cursor or a `limit` outside 1-100.
|
|
905
|
+
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`.
|
|
842
906
|
* @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`).
|
|
843
907
|
* @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.
|
|
908
|
+
* @throws {InternalServerError} 503 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.
|
|
844
909
|
* @see GET /v1/workspaces/{workspace_id}/projects
|
|
845
910
|
* @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-projects
|
|
846
911
|
* @example
|
|
@@ -861,9 +926,11 @@ var ProjectsResource = class extends APIResource {
|
|
|
861
926
|
*
|
|
862
927
|
* @param projectId - Id of the project.
|
|
863
928
|
* @param options - Per-request options.
|
|
929
|
+
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`.
|
|
864
930
|
* @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`).
|
|
865
931
|
* @throws {NotFoundError} 404 NOT_FOUND, PROJECT_NOT_FOUND: `PROJECT_NOT_FOUND`: no such project in this workspace.
|
|
866
932
|
* @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.
|
|
933
|
+
* @throws {InternalServerError} 503 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.
|
|
867
934
|
* @see GET /v1/workspaces/{workspace_id}/projects/{project_id}
|
|
868
935
|
* @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-projects-project-id
|
|
869
936
|
* @example
|
|
@@ -883,10 +950,12 @@ var ProjectsResource = class extends APIResource {
|
|
|
883
950
|
* @param params - `Flags.ProjectUpdateParams`.
|
|
884
951
|
* @param options - Per-request options.
|
|
885
952
|
* @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid.
|
|
953
|
+
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`.
|
|
886
954
|
* @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`).
|
|
887
955
|
* @throws {NotFoundError} 404 NOT_FOUND, PROJECT_NOT_FOUND: `PROJECT_NOT_FOUND`: no such project in this workspace.
|
|
888
956
|
* @throws {ConflictError} 409 CONFLICT, KEY_ALREADY_EXISTS: `KEY_ALREADY_EXISTS`: another project has this name.
|
|
889
957
|
* @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.
|
|
958
|
+
* @throws {InternalServerError} 503 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.
|
|
890
959
|
* @see PATCH /v1/workspaces/{workspace_id}/projects/{project_id}
|
|
891
960
|
* @see https://productcraft.co/docs/flags/api-reference#patch-v1-workspaces-workspace-id-projects-project-id
|
|
892
961
|
* @example
|
|
@@ -907,10 +976,12 @@ var SegmentsResource = class extends APIResource {
|
|
|
907
976
|
* @param segmentId - Id of the segment.
|
|
908
977
|
* @param params - `Flags.SegmentDeleteParams`.
|
|
909
978
|
* @param options - Per-request options.
|
|
979
|
+
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`.
|
|
910
980
|
* @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`).
|
|
911
981
|
* @throws {NotFoundError} 404 NOT_FOUND, SEGMENT_NOT_FOUND: `SEGMENT_NOT_FOUND`: no such segment in this workspace.
|
|
912
982
|
* @throws {ConflictError} 409 CONFLICT, SEGMENT_IN_USE: `SEGMENT_IN_USE`: a rule uses it (`details.used_by` lists where).
|
|
913
983
|
* @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.
|
|
984
|
+
* @throws {InternalServerError} 503 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.
|
|
914
985
|
* @see DELETE /v1/workspaces/{workspace_id}/segments/{segment_id}
|
|
915
986
|
* @see https://productcraft.co/docs/flags/api-reference#delete-v1-workspaces-workspace-id-segments-segment-id
|
|
916
987
|
* @example
|
|
@@ -928,9 +999,11 @@ var SegmentsResource = class extends APIResource {
|
|
|
928
999
|
*
|
|
929
1000
|
* @param segmentId - Id of the segment.
|
|
930
1001
|
* @param options - Per-request options.
|
|
1002
|
+
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`.
|
|
931
1003
|
* @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`).
|
|
932
1004
|
* @throws {NotFoundError} 404 NOT_FOUND, SEGMENT_NOT_FOUND: `SEGMENT_NOT_FOUND`: no such segment in this workspace.
|
|
933
1005
|
* @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.
|
|
1006
|
+
* @throws {InternalServerError} 503 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.
|
|
934
1007
|
* @see GET /v1/workspaces/{workspace_id}/segments/{segment_id}
|
|
935
1008
|
* @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-segments-segment-id
|
|
936
1009
|
* @example
|
|
@@ -948,10 +1021,12 @@ var SegmentsResource = class extends APIResource {
|
|
|
948
1021
|
*
|
|
949
1022
|
* @param segmentId - Id of the segment.
|
|
950
1023
|
* @param options - Per-request options.
|
|
1024
|
+
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`.
|
|
951
1025
|
* @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`).
|
|
952
1026
|
* @throws {NotFoundError} 404 NOT_FOUND, SEGMENT_NOT_FOUND: `SEGMENT_NOT_FOUND`: no such segment in this workspace.
|
|
953
1027
|
* @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.
|
|
954
1028
|
* @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.
|
|
1029
|
+
* @throws {InternalServerError} 503 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.
|
|
955
1030
|
* @see GET /v1/workspaces/{workspace_id}/segments/{segment_id}/confidential
|
|
956
1031
|
* @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-segments-segment-id-confidential
|
|
957
1032
|
* @example
|
|
@@ -971,11 +1046,13 @@ var SegmentsResource = class extends APIResource {
|
|
|
971
1046
|
* @param params - `Flags.SegmentUpdateParams`.
|
|
972
1047
|
* @param options - Per-request options.
|
|
973
1048
|
* @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid.
|
|
1049
|
+
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`.
|
|
974
1050
|
* @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.
|
|
975
1051
|
* @throws {NotFoundError} 404 NOT_FOUND, SEGMENT_NOT_FOUND: `SEGMENT_NOT_FOUND`: no such segment in this workspace.
|
|
976
1052
|
* @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`).
|
|
977
1053
|
* @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.
|
|
978
1054
|
* @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.
|
|
1055
|
+
* @throws {InternalServerError} 503 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.
|
|
979
1056
|
* @see PATCH /v1/workspaces/{workspace_id}/segments/{segment_id}
|
|
980
1057
|
* @see https://productcraft.co/docs/flags/api-reference#patch-v1-workspaces-workspace-id-segments-segment-id
|
|
981
1058
|
* @example
|
|
@@ -1009,11 +1086,13 @@ var SettingsValuesResource = class extends APIResource {
|
|
|
1009
1086
|
* @param params - `Flags.SettingsValueReplaceParams`.
|
|
1010
1087
|
* @param options - Per-request options.
|
|
1011
1088
|
* @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: `version` or `note` is missing or invalid.
|
|
1089
|
+
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`.
|
|
1012
1090
|
* @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.
|
|
1013
1091
|
* @throws {NotFoundError} 404 NOT_FOUND, SETTING_NOT_FOUND, ENVIRONMENT_NOT_FOUND: `SETTING_NOT_FOUND` or `ENVIRONMENT_NOT_FOUND`.
|
|
1014
1092
|
* @throws {ConflictError} 409 CONFLICT, VERSION_CONFLICT: `VERSION_CONFLICT`: the value changed since you read it (`details.current_version`, `updated_at`, `updated_by`).
|
|
1015
1093
|
* @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.
|
|
1016
1094
|
* @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.
|
|
1095
|
+
* @throws {InternalServerError} 503 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.
|
|
1017
1096
|
* @see PUT /v1/workspaces/{workspace_id}/settings/{setting_id}/values/{environment_id}
|
|
1018
1097
|
* @see https://productcraft.co/docs/flags/api-reference#put-v1-workspaces-workspace-id-settings-setting-id-values-environment-id
|
|
1019
1098
|
* @example
|
|
@@ -1032,9 +1111,11 @@ var SettingsValuesResource = class extends APIResource {
|
|
|
1032
1111
|
* @param settingId - Id of the setting.
|
|
1033
1112
|
* @param environmentId - Id of an environment of the same project.
|
|
1034
1113
|
* @param options - Per-request options.
|
|
1114
|
+
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`.
|
|
1035
1115
|
* @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`).
|
|
1036
1116
|
* @throws {NotFoundError} 404 NOT_FOUND, SETTING_NOT_FOUND, ENVIRONMENT_NOT_FOUND: `SETTING_NOT_FOUND` or `ENVIRONMENT_NOT_FOUND`.
|
|
1037
1117
|
* @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.
|
|
1118
|
+
* @throws {InternalServerError} 503 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.
|
|
1038
1119
|
* @see GET /v1/workspaces/{workspace_id}/settings/{setting_id}/values/{environment_id}
|
|
1039
1120
|
* @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-settings-setting-id-values-environment-id
|
|
1040
1121
|
* @example
|
|
@@ -1053,10 +1134,12 @@ var SettingsValuesResource = class extends APIResource {
|
|
|
1053
1134
|
* @param settingId - Id of the setting.
|
|
1054
1135
|
* @param environmentId - Id of an environment of the same project.
|
|
1055
1136
|
* @param options - Per-request options.
|
|
1137
|
+
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`.
|
|
1056
1138
|
* @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`).
|
|
1057
1139
|
* @throws {NotFoundError} 404 NOT_FOUND, SETTING_NOT_FOUND, ENVIRONMENT_NOT_FOUND: `SETTING_NOT_FOUND` or `ENVIRONMENT_NOT_FOUND`.
|
|
1058
1140
|
* @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.
|
|
1059
1141
|
* @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.
|
|
1142
|
+
* @throws {InternalServerError} 503 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.
|
|
1060
1143
|
* @see GET /v1/workspaces/{workspace_id}/settings/{setting_id}/values/{environment_id}/confidential
|
|
1061
1144
|
* @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-settings-setting-id-values-environment-id-confidential
|
|
1062
1145
|
* @example
|
|
@@ -1077,11 +1160,13 @@ var SettingsValuesResource = class extends APIResource {
|
|
|
1077
1160
|
* @param params - `Flags.SettingsValueUpdateParams`.
|
|
1078
1161
|
* @param options - Per-request options.
|
|
1079
1162
|
* @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: nothing to change, or `version` is missing.
|
|
1163
|
+
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`.
|
|
1080
1164
|
* @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.
|
|
1081
1165
|
* @throws {NotFoundError} 404 NOT_FOUND, SETTING_NOT_FOUND, ENVIRONMENT_NOT_FOUND: `SETTING_NOT_FOUND` or `ENVIRONMENT_NOT_FOUND`.
|
|
1082
1166
|
* @throws {ConflictError} 409 CONFLICT, VERSION_CONFLICT: `VERSION_CONFLICT`: the value changed since you read it (`details.current_version`, `updated_at`, `updated_by`).
|
|
1083
1167
|
* @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.
|
|
1084
1168
|
* @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.
|
|
1169
|
+
* @throws {InternalServerError} 503 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.
|
|
1085
1170
|
* @see PATCH /v1/workspaces/{workspace_id}/settings/{setting_id}/values/{environment_id}
|
|
1086
1171
|
* @see https://productcraft.co/docs/flags/api-reference#patch-v1-workspaces-workspace-id-settings-setting-id-values-environment-id
|
|
1087
1172
|
* @example
|
|
@@ -1106,10 +1191,12 @@ var SettingsResource = class extends APIResource {
|
|
|
1106
1191
|
* @param settingId - Id of the setting.
|
|
1107
1192
|
* @param params - `Flags.SettingsDeleteParams`.
|
|
1108
1193
|
* @param options - Per-request options.
|
|
1194
|
+
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`.
|
|
1109
1195
|
* @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`).
|
|
1110
1196
|
* @throws {NotFoundError} 404 NOT_FOUND, SETTING_NOT_FOUND: `SETTING_NOT_FOUND`: no such setting in this workspace.
|
|
1111
1197
|
* @throws {ConflictError} 409 CONFLICT, SETTING_IN_USE: `SETTING_IN_USE`: another setting uses it as a prerequisite (`details.used_by`).
|
|
1112
1198
|
* @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.
|
|
1199
|
+
* @throws {InternalServerError} 503 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.
|
|
1113
1200
|
* @see DELETE /v1/workspaces/{workspace_id}/settings/{setting_id}
|
|
1114
1201
|
* @see https://productcraft.co/docs/flags/api-reference#delete-v1-workspaces-workspace-id-settings-setting-id
|
|
1115
1202
|
* @example
|
|
@@ -1127,9 +1214,11 @@ var SettingsResource = class extends APIResource {
|
|
|
1127
1214
|
*
|
|
1128
1215
|
* @param settingId - Id of the setting.
|
|
1129
1216
|
* @param options - Per-request options.
|
|
1217
|
+
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`.
|
|
1130
1218
|
* @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`).
|
|
1131
1219
|
* @throws {NotFoundError} 404 NOT_FOUND, SETTING_NOT_FOUND: `SETTING_NOT_FOUND`: no such setting in this workspace.
|
|
1132
1220
|
* @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.
|
|
1221
|
+
* @throws {InternalServerError} 503 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.
|
|
1133
1222
|
* @see GET /v1/workspaces/{workspace_id}/settings/{setting_id}
|
|
1134
1223
|
* @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-settings-setting-id
|
|
1135
1224
|
* @example
|
|
@@ -1149,12 +1238,13 @@ var SettingsResource = class extends APIResource {
|
|
|
1149
1238
|
* @param params - `Flags.SettingsUpdateParams`.
|
|
1150
1239
|
* @param options - Per-request options.
|
|
1151
1240
|
* @throws {BadRequestError} 400 BAD_REQUEST, VALIDATION_ERROR: `VALIDATION_ERROR`: a field is invalid.
|
|
1241
|
+
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`.
|
|
1152
1242
|
* @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`).
|
|
1153
1243
|
* @throws {NotFoundError} 404 NOT_FOUND, SETTING_NOT_FOUND: `SETTING_NOT_FOUND`: no such setting in this workspace.
|
|
1154
1244
|
* @throws {ConflictError} 409 CONFLICT, KEY_ALREADY_EXISTS: `KEY_ALREADY_EXISTS`: the config already has a setting with this key.
|
|
1155
1245
|
* @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.
|
|
1156
1246
|
* @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.
|
|
1157
|
-
* @throws {InternalServerError} 503 SERVICE_UNAVAILABLE: `SERVICE_UNAVAILABLE`: the member lookup for `owner_id` is unavailable; retry.
|
|
1247
|
+
* @throws {InternalServerError} 503 SERVICE_UNAVAILABLE, MANAGEMENT_UNAVAILABLE: `SERVICE_UNAVAILABLE`: the member lookup for `owner_id` is unavailable; retry. Or `MANAGEMENT_UNAVAILABLE`: the whole management API is temporarily unavailable, for example while its database is unreachable; wait `Retry-After` seconds and retry.
|
|
1158
1248
|
* @see PATCH /v1/workspaces/{workspace_id}/settings/{setting_id}
|
|
1159
1249
|
* @see https://productcraft.co/docs/flags/api-reference#patch-v1-workspaces-workspace-id-settings-setting-id
|
|
1160
1250
|
* @example
|
|
@@ -1173,8 +1263,10 @@ var StatsResource = class extends APIResource {
|
|
|
1173
1263
|
* 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.
|
|
1174
1264
|
*
|
|
1175
1265
|
* @param options - Per-request options.
|
|
1266
|
+
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing, expired or invalid bearer token (`UNAUTHORIZED`). Send a workspace API key or a platform session token as `Authorization: Bearer <token>`.
|
|
1176
1267
|
* @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`).
|
|
1177
1268
|
* @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.
|
|
1269
|
+
* @throws {InternalServerError} 503 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.
|
|
1178
1270
|
* @see GET /v1/workspaces/{workspace_id}/stats
|
|
1179
1271
|
* @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-stats
|
|
1180
1272
|
* @example
|
|
@@ -1200,6 +1292,7 @@ var WebhooksEndpointsResource = class extends APIResource {
|
|
|
1200
1292
|
* @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).
|
|
1201
1293
|
* @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY: The URL points at a private, loopback or internal address.
|
|
1202
1294
|
* @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.
|
|
1295
|
+
* @throws {InternalServerError} 503 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.
|
|
1203
1296
|
* @see POST /v1/workspaces/{workspace_id}/webhooks/endpoints
|
|
1204
1297
|
* @see https://productcraft.co/docs/flags/api-reference#post-v1-workspaces-workspace-id-webhooks-endpoints
|
|
1205
1298
|
* @example
|
|
@@ -1222,6 +1315,7 @@ var WebhooksEndpointsResource = class extends APIResource {
|
|
|
1222
1315
|
* @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`).
|
|
1223
1316
|
* @throws {NotFoundError} 404 NOT_FOUND, WEBHOOK_ENDPOINT_NOT_FOUND: No such endpoint here (`WEBHOOK_ENDPOINT_NOT_FOUND`).
|
|
1224
1317
|
* @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.
|
|
1318
|
+
* @throws {InternalServerError} 503 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.
|
|
1225
1319
|
* @see DELETE /v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}
|
|
1226
1320
|
* @see https://productcraft.co/docs/flags/api-reference#delete-v1-workspaces-workspace-id-webhooks-endpoints-endpoint-id
|
|
1227
1321
|
* @example
|
|
@@ -1242,6 +1336,7 @@ var WebhooksEndpointsResource = class extends APIResource {
|
|
|
1242
1336
|
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing or invalid bearer token.
|
|
1243
1337
|
* @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`).
|
|
1244
1338
|
* @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.
|
|
1339
|
+
* @throws {InternalServerError} 503 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.
|
|
1245
1340
|
* @see GET /v1/workspaces/{workspace_id}/webhooks/endpoints
|
|
1246
1341
|
* @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-webhooks-endpoints
|
|
1247
1342
|
* @example
|
|
@@ -1266,6 +1361,7 @@ var WebhooksEndpointsResource = class extends APIResource {
|
|
|
1266
1361
|
* @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`).
|
|
1267
1362
|
* @throws {NotFoundError} 404 NOT_FOUND, WEBHOOK_ENDPOINT_NOT_FOUND: No such endpoint here (`WEBHOOK_ENDPOINT_NOT_FOUND`).
|
|
1268
1363
|
* @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.
|
|
1364
|
+
* @throws {InternalServerError} 503 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.
|
|
1269
1365
|
* @see GET /v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}
|
|
1270
1366
|
* @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-webhooks-endpoints-endpoint-id
|
|
1271
1367
|
* @example
|
|
@@ -1290,6 +1386,7 @@ var WebhooksEndpointsResource = class extends APIResource {
|
|
|
1290
1386
|
* @throws {NotFoundError} 404 NOT_FOUND, WEBHOOK_ENDPOINT_NOT_FOUND: No such endpoint here (`WEBHOOK_ENDPOINT_NOT_FOUND`).
|
|
1291
1387
|
* @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).
|
|
1292
1388
|
* @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.
|
|
1389
|
+
* @throws {InternalServerError} 503 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.
|
|
1293
1390
|
* @see POST /v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}/rotate-secret
|
|
1294
1391
|
* @see https://productcraft.co/docs/flags/api-reference#post-v1-workspaces-workspace-id-webhooks-endpoints-endpoint-id-rotate-secret
|
|
1295
1392
|
* @example
|
|
@@ -1314,6 +1411,7 @@ var WebhooksEndpointsResource = class extends APIResource {
|
|
|
1314
1411
|
* @throws {NotFoundError} 404 NOT_FOUND, WEBHOOK_ENDPOINT_NOT_FOUND: No such endpoint here (`WEBHOOK_ENDPOINT_NOT_FOUND`).
|
|
1315
1412
|
* @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).
|
|
1316
1413
|
* @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.
|
|
1414
|
+
* @throws {InternalServerError} 503 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.
|
|
1317
1415
|
* @see POST /v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}/test
|
|
1318
1416
|
* @see https://productcraft.co/docs/flags/api-reference#post-v1-workspaces-workspace-id-webhooks-endpoints-endpoint-id-test
|
|
1319
1417
|
* @example
|
|
@@ -1339,6 +1437,7 @@ var WebhooksEndpointsResource = class extends APIResource {
|
|
|
1339
1437
|
* @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).
|
|
1340
1438
|
* @throws {UnprocessableEntityError} 422 UNPROCESSABLE_ENTITY: The new URL points at a private, loopback or internal address.
|
|
1341
1439
|
* @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.
|
|
1440
|
+
* @throws {InternalServerError} 503 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.
|
|
1342
1441
|
* @see PATCH /v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}
|
|
1343
1442
|
* @see https://productcraft.co/docs/flags/api-reference#patch-v1-workspaces-workspace-id-webhooks-endpoints-endpoint-id
|
|
1344
1443
|
* @example
|
|
@@ -1360,6 +1459,7 @@ var WebhooksEventTypesResource = class extends APIResource {
|
|
|
1360
1459
|
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing or invalid bearer token.
|
|
1361
1460
|
* @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`).
|
|
1362
1461
|
* @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.
|
|
1462
|
+
* @throws {InternalServerError} 503 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.
|
|
1363
1463
|
* @see GET /v1/workspaces/{workspace_id}/webhooks/event-types
|
|
1364
1464
|
* @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-webhooks-event-types
|
|
1365
1465
|
* @example
|
|
@@ -1383,6 +1483,7 @@ var WebhooksEventsResource = class extends APIResource {
|
|
|
1383
1483
|
* @throws {AuthenticationError} 401 UNAUTHORIZED: Missing or invalid bearer token.
|
|
1384
1484
|
* @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`).
|
|
1385
1485
|
* @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.
|
|
1486
|
+
* @throws {InternalServerError} 503 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.
|
|
1386
1487
|
* @see GET /v1/workspaces/{workspace_id}/webhooks/events
|
|
1387
1488
|
* @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-webhooks-events
|
|
1388
1489
|
* @example
|
|
@@ -1410,6 +1511,7 @@ var WebhooksEventsResource = class extends APIResource {
|
|
|
1410
1511
|
* @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`).
|
|
1411
1512
|
* @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).
|
|
1412
1513
|
* @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.
|
|
1514
|
+
* @throws {InternalServerError} 503 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.
|
|
1413
1515
|
* @see POST /v1/workspaces/{workspace_id}/webhooks/events/{event_id}/replay
|
|
1414
1516
|
* @see https://productcraft.co/docs/flags/api-reference#post-v1-workspaces-workspace-id-webhooks-events-event-id-replay
|
|
1415
1517
|
* @example
|
|
@@ -1432,6 +1534,7 @@ var WebhooksEventsResource = class extends APIResource {
|
|
|
1432
1534
|
* @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`).
|
|
1433
1535
|
* @throws {NotFoundError} 404 NOT_FOUND, WEBHOOK_EVENT_NOT_FOUND: No such event here (`WEBHOOK_EVENT_NOT_FOUND`); events are kept for 30 days.
|
|
1434
1536
|
* @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.
|
|
1537
|
+
* @throws {InternalServerError} 503 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.
|
|
1435
1538
|
* @see GET /v1/workspaces/{workspace_id}/webhooks/events/{event_id}
|
|
1436
1539
|
* @see https://productcraft.co/docs/flags/api-reference#get-v1-workspaces-workspace-id-webhooks-events-event-id
|
|
1437
1540
|
* @example
|
|
@@ -1522,7 +1625,7 @@ var FlagsChangeActorType = { values: ["user", "api_key", "system"] };
|
|
|
1522
1625
|
var FlagsEnvironmentPreset = { values: ["dev_prod", "dev_staging_prod"] };
|
|
1523
1626
|
var FlagsEvaluationErrorCode = { values: ["FLAG_NOT_FOUND", "TYPE_MISMATCH", "PREREQUISITE_CYCLE", "PREREQUISITE_NOT_FOUND", "PREREQUISITE_DEPTH", "GENERAL"] };
|
|
1524
1627
|
var FlagsEvaluationReason = { values: ["STATIC", "TARGETING_MATCH", "SPLIT", "DEFAULT", "ERROR"] };
|
|
1525
|
-
var FlagsEvaluationWarningCode = { values: ["missing_user", "missing_attribute", "invalid_attribute", "unknown_comparator", "missing_percentage_attribute"] };
|
|
1628
|
+
var FlagsEvaluationWarningCode = { values: ["missing_user", "missing_attribute", "invalid_attribute", "unknown_comparator", "missing_percentage_attribute", "iso_date_converted"] };
|
|
1526
1629
|
var FlagsHistoryExportFormat = { values: ["csv", "json"] };
|
|
1527
1630
|
var FlagsImportMappedType = { values: ["environment", "config", "segment", "setting"] };
|
|
1528
1631
|
var FlagsImportSource = { values: ["configcat"] };
|
|
@@ -1543,7 +1646,7 @@ var WebhookEventStatus = { values: ["pending", "delivered", "failed", "not_sent"
|
|
|
1543
1646
|
var WebhookEventType = { values: ["config.published", "sdk_key.rotated"] };
|
|
1544
1647
|
|
|
1545
1648
|
// src/_generated/client.ts
|
|
1546
|
-
var VERSION = "0.
|
|
1649
|
+
var VERSION = "0.4.0" ;
|
|
1547
1650
|
exports.Flags = class Flags extends FlagsResources {
|
|
1548
1651
|
constructor(options = {}) {
|
|
1549
1652
|
super(new core.APIClient(options, core.PC_BASE_URL.flags, { name: "flags", version: VERSION }));
|
|
@@ -1580,5 +1683,5 @@ exports.Flags = class Flags extends FlagsResources {
|
|
|
1580
1683
|
Flags2.WebhookEventStatus = WebhookEventStatus;
|
|
1581
1684
|
Flags2.WebhookEventType = WebhookEventType;
|
|
1582
1685
|
})(exports.Flags || (exports.Flags = {}));
|
|
1583
|
-
//# sourceMappingURL=chunk-
|
|
1584
|
-
//# sourceMappingURL=chunk-
|
|
1686
|
+
//# sourceMappingURL=chunk-CXYODDHM.cjs.map
|
|
1687
|
+
//# sourceMappingURL=chunk-CXYODDHM.cjs.map
|