@shipeasy/openapi 1.6.0 → 2.2.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 +37 -0
- package/dist/chunk-643YSMLU.js +1616 -0
- package/dist/chunk-643YSMLU.js.map +1 -0
- package/dist/chunk-MRW3DJ57.js +3385 -0
- package/dist/chunk-MRW3DJ57.js.map +1 -0
- package/dist/client-K0ShmsC7.d.ts +11284 -0
- package/dist/client.d.ts +1 -0
- package/dist/client.js +215 -0
- package/dist/client.js.map +1 -0
- package/dist/custom.d.ts +86 -0
- package/dist/custom.js +300 -0
- package/dist/custom.js.map +1 -0
- package/dist/index.d.ts +29 -41
- package/dist/index.js +258 -4375
- package/dist/index.js.map +1 -0
- package/dist/node-context.d.ts +81 -33
- package/dist/node-context.js +98 -44
- package/dist/node-context.js.map +1 -0
- package/dist/schemas.d.ts +7973 -0
- package/dist/schemas.js +1099 -0
- package/dist/schemas.js.map +1 -0
- package/openapi.json +15922 -3232
- package/openapi.yaml +14277 -0
- package/package.json +33 -26
- package/spec/components/errors.yaml +53 -0
- package/spec/components/parameters.yaml +32 -0
- package/spec/components/responses.yaml +122 -0
- package/spec/components/schemas/alert-rules.yaml +175 -0
- package/spec/components/schemas/attributes.yaml +157 -0
- package/spec/components/schemas/common.yaml +92 -0
- package/spec/components/schemas/configs.yaml +371 -0
- package/spec/components/schemas/connectors.yaml +587 -0
- package/spec/components/schemas/errors-api.yaml +209 -0
- package/spec/components/schemas/events.yaml +321 -0
- package/spec/components/schemas/experiments.yaml +865 -0
- package/spec/components/schemas/gate-templates.yaml +237 -0
- package/spec/components/schemas/gates.yaml +890 -0
- package/spec/components/schemas/i18n.yaml +478 -0
- package/spec/components/schemas/keys.yaml +186 -0
- package/spec/components/schemas/killswitches.yaml +309 -0
- package/spec/components/schemas/metrics.yaml +547 -0
- package/spec/components/schemas/ops.yaml +1013 -0
- package/spec/components/schemas/projects.yaml +222 -0
- package/spec/components/schemas/search.yaml +46 -0
- package/spec/components/schemas/universes.yaml +127 -0
- package/spec/openapi.yaml +367 -0
- package/spec/paths/alert-rules.yaml +258 -0
- package/spec/paths/attributes.yaml +272 -0
- package/spec/paths/configs.yaml +758 -0
- package/spec/paths/connectors.yaml +782 -0
- package/spec/paths/errors.yaml +382 -0
- package/spec/paths/events.yaml +380 -0
- package/spec/paths/experiments.yaml +803 -0
- package/spec/paths/gate-templates.yaml +267 -0
- package/spec/paths/gates.yaml +465 -0
- package/spec/paths/i18n.yaml +557 -0
- package/spec/paths/keys.yaml +182 -0
- package/spec/paths/killswitches.yaml +574 -0
- package/spec/paths/metrics.yaml +313 -0
- package/spec/paths/ops.yaml +446 -0
- package/spec/paths/projects.yaml +210 -0
- package/spec/paths/search.yaml +62 -0
- package/spec/paths/universes.yaml +255 -0
- package/dist/operations/attributes.d.ts +0 -33
- package/dist/operations/attributes.js +0 -16
- package/dist/operations/cli-adapter.d.ts +0 -35
- package/dist/operations/cli-adapter.js +0 -91
- package/dist/operations/coerce.d.ts +0 -32
- package/dist/operations/coerce.js +0 -53
- package/dist/operations/configs.d.ts +0 -28
- package/dist/operations/configs.js +0 -119
- package/dist/operations/docs.d.ts +0 -37
- package/dist/operations/docs.js +0 -39
- package/dist/operations/events.d.ts +0 -28
- package/dist/operations/events.js +0 -121
- package/dist/operations/experiments.d.ts +0 -28
- package/dist/operations/experiments.js +0 -280
- package/dist/operations/gates.d.ts +0 -28
- package/dist/operations/gates.js +0 -132
- package/dist/operations/i18n.d.ts +0 -28
- package/dist/operations/i18n.js +0 -121
- package/dist/operations/index.d.ts +0 -63
- package/dist/operations/index.js +0 -1751
- package/dist/operations/killswitches.d.ts +0 -28
- package/dist/operations/killswitches.js +0 -126
- package/dist/operations/mcp-adapter.d.ts +0 -35
- package/dist/operations/mcp-adapter.js +0 -94
- package/dist/operations/metrics.d.ts +0 -30
- package/dist/operations/metrics.js +0 -114
- package/dist/operations/ops.d.ts +0 -28
- package/dist/operations/ops.js +0 -313
- package/dist/operations/projects.d.ts +0 -28
- package/dist/operations/projects.js +0 -36
- package/dist/operations/sdk-docs.d.ts +0 -28
- package/dist/operations/sdk-docs.js +0 -160
- package/dist/operations/types.d.ts +0 -138
- package/dist/operations/types.js +0 -9
- package/dist/operations/universes.d.ts +0 -28
- package/dist/operations/universes.js +0 -93
- package/dist/operations/util.d.ts +0 -33
- package/dist/operations/util.js +0 -9
- package/dist/resources/alert-rules.d.ts +0 -50
- package/dist/resources/alert-rules.js +0 -75
- package/dist/resources/attributes.d.ts +0 -19
- package/dist/resources/attributes.js +0 -10
- package/dist/resources/configs.d.ts +0 -681
- package/dist/resources/configs.js +0 -509
- package/dist/resources/events.d.ts +0 -61
- package/dist/resources/events.js +0 -42
- package/dist/resources/experiments.d.ts +0 -849
- package/dist/resources/experiments.js +0 -707
- package/dist/resources/gates.d.ts +0 -808
- package/dist/resources/gates.js +0 -522
- package/dist/resources/i18n.d.ts +0 -84
- package/dist/resources/i18n.js +0 -60
- package/dist/resources/index.d.ts +0 -2767
- package/dist/resources/index.js +0 -2563
- package/dist/resources/killswitches.d.ts +0 -436
- package/dist/resources/killswitches.js +0 -514
- package/dist/resources/metrics.d.ts +0 -54
- package/dist/resources/metrics.js +0 -40
- package/dist/resources/ops.d.ts +0 -88
- package/dist/resources/ops.js +0 -36
- package/dist/resources/projects.d.ts +0 -54
- package/dist/resources/projects.js +0 -14
- package/dist/resources/universes.d.ts +0 -185
- package/dist/resources/universes.js +0 -234
- package/dist/schemas/alert-rules.d.ts +0 -65
- package/dist/schemas/alert-rules.js +0 -37
- package/dist/schemas/configs.d.ts +0 -154
- package/dist/schemas/configs.js +0 -134
- package/dist/schemas/constants.d.ts +0 -6
- package/dist/schemas/constants.js +0 -7
- package/dist/schemas/experiments.d.ts +0 -229
- package/dist/schemas/experiments.js +0 -221
- package/dist/schemas/folder.d.ts +0 -10
- package/dist/schemas/folder.js +0 -8
- package/dist/schemas/gates.d.ts +0 -386
- package/dist/schemas/gates.js +0 -190
- package/dist/schemas/index.d.ts +0 -11
- package/dist/schemas/index.js +0 -762
- package/dist/schemas/killswitches.d.ts +0 -110
- package/dist/schemas/killswitches.js +0 -226
- package/dist/schemas/metric-name.d.ts +0 -5
- package/dist/schemas/metric-name.js +0 -6
- package/dist/schemas/pagination.d.ts +0 -37
- package/dist/schemas/pagination.js +0 -44
- package/dist/schemas/universes.d.ts +0 -35
- package/dist/schemas/universes.js +0 -55
- package/dist/transport.d.ts +0 -30
- package/dist/transport.js +0 -44
|
@@ -0,0 +1,758 @@
|
|
|
1
|
+
/api/admin/configs:
|
|
2
|
+
get:
|
|
3
|
+
operationId: listConfigs
|
|
4
|
+
summary: List dynamic configs
|
|
5
|
+
description: |-
|
|
6
|
+
Returns a single page of configs ordered by `updated_at desc, id desc`. Each row includes the latest published `version` per env and any active drafts.
|
|
7
|
+
|
|
8
|
+
**Use case:** Snapshot every config in the project — e.g. CI check that asserts no env is stuck on a stale default or that every config has a published value on prod.
|
|
9
|
+
tags:
|
|
10
|
+
- Configs
|
|
11
|
+
parameters:
|
|
12
|
+
- $ref: ../components/parameters.yaml#/ProjectId
|
|
13
|
+
- $ref: ../components/parameters.yaml#/PaginationLimit
|
|
14
|
+
- $ref: ../components/parameters.yaml#/PaginationCursor
|
|
15
|
+
- $ref: ../components/parameters.yaml#/Q
|
|
16
|
+
responses:
|
|
17
|
+
"200":
|
|
18
|
+
description: List dynamic configs
|
|
19
|
+
content:
|
|
20
|
+
application/json:
|
|
21
|
+
schema:
|
|
22
|
+
$ref: ../components/schemas/configs.yaml#/ListConfigsResponse
|
|
23
|
+
example:
|
|
24
|
+
data:
|
|
25
|
+
- id: cfg_01j7wae5h6j7k8l9m0n1p2q3r4
|
|
26
|
+
name: pricing.tiers
|
|
27
|
+
description: Pricing tier definitions consumed by the checkout flow.
|
|
28
|
+
schema:
|
|
29
|
+
type: object
|
|
30
|
+
properties:
|
|
31
|
+
tiers:
|
|
32
|
+
type: array
|
|
33
|
+
items:
|
|
34
|
+
type: object
|
|
35
|
+
required:
|
|
36
|
+
- tiers
|
|
37
|
+
updatedAt: 2026-05-09T18:22:11.000Z
|
|
38
|
+
envs:
|
|
39
|
+
dev:
|
|
40
|
+
version: 5
|
|
41
|
+
publishedAt: 2026-05-09T18:22:11.000Z
|
|
42
|
+
publishedBy: ana@example.com
|
|
43
|
+
stage:
|
|
44
|
+
version: 4
|
|
45
|
+
publishedAt: 2026-05-08T11:05:22.000Z
|
|
46
|
+
publishedBy: ana@example.com
|
|
47
|
+
prod:
|
|
48
|
+
version: 4
|
|
49
|
+
publishedAt: 2026-05-08T11:05:22.000Z
|
|
50
|
+
publishedBy: ana@example.com
|
|
51
|
+
drafts:
|
|
52
|
+
dev:
|
|
53
|
+
updatedAt: 2026-05-10T09:31:00.000Z
|
|
54
|
+
authorEmail: bo@example.com
|
|
55
|
+
baseVersion: 5
|
|
56
|
+
next_cursor: null
|
|
57
|
+
"400":
|
|
58
|
+
$ref: ../components/responses.yaml#/BadRequest
|
|
59
|
+
"401":
|
|
60
|
+
$ref: ../components/responses.yaml#/Unauthorized
|
|
61
|
+
"403":
|
|
62
|
+
$ref: ../components/responses.yaml#/Forbidden
|
|
63
|
+
"404":
|
|
64
|
+
$ref: ../components/responses.yaml#/NotFound
|
|
65
|
+
"409":
|
|
66
|
+
$ref: ../components/responses.yaml#/Conflict
|
|
67
|
+
"422":
|
|
68
|
+
$ref: ../components/responses.yaml#/UnprocessableEntity
|
|
69
|
+
x-error-codes:
|
|
70
|
+
- BAD_REQUEST
|
|
71
|
+
- UNAUTHORIZED
|
|
72
|
+
- FORBIDDEN
|
|
73
|
+
x-cli:
|
|
74
|
+
name: list
|
|
75
|
+
post:
|
|
76
|
+
operationId: createConfig
|
|
77
|
+
summary: Create a dynamic config
|
|
78
|
+
description: |-
|
|
79
|
+
Creates a new config with the given `schema`. The initial `value` (or an empty object) is published as version 1 on **every** env.
|
|
80
|
+
|
|
81
|
+
Returns `409` if `name` already exists in the project, `400` if `value` doesn't validate against `schema`.
|
|
82
|
+
|
|
83
|
+
**Use cases**
|
|
84
|
+
|
|
85
|
+
- **Minimal create** — `name` + `schema`. Initial value defaults to `{}`.
|
|
86
|
+
- **Seeded create** — supply a flat `value` to publish the same object on every env.
|
|
87
|
+
- **Per-env seed** — supply a `{ env: value }` map for different per-env starting values.
|
|
88
|
+
tags:
|
|
89
|
+
- Configs
|
|
90
|
+
parameters:
|
|
91
|
+
- $ref: ../components/parameters.yaml#/ProjectId
|
|
92
|
+
requestBody:
|
|
93
|
+
required: true
|
|
94
|
+
content:
|
|
95
|
+
application/json:
|
|
96
|
+
schema:
|
|
97
|
+
$ref: ../components/schemas/configs.yaml#/CreateConfigRequest
|
|
98
|
+
examples:
|
|
99
|
+
minimal:
|
|
100
|
+
summary: Minimal — name + schema
|
|
101
|
+
description: Smallest valid body. Initial value defaults to `{}` on every env.
|
|
102
|
+
value:
|
|
103
|
+
name: pricing.tiers
|
|
104
|
+
schema:
|
|
105
|
+
type: object
|
|
106
|
+
properties:
|
|
107
|
+
tiers:
|
|
108
|
+
type: array
|
|
109
|
+
required:
|
|
110
|
+
- tiers
|
|
111
|
+
seededValue:
|
|
112
|
+
summary: Seeded — schema + initial value
|
|
113
|
+
description: Seed the same JSON object on every env at version 1.
|
|
114
|
+
value:
|
|
115
|
+
name: pricing.tiers
|
|
116
|
+
description: Pricing tier definitions consumed by checkout.
|
|
117
|
+
schema:
|
|
118
|
+
type: object
|
|
119
|
+
properties:
|
|
120
|
+
tiers:
|
|
121
|
+
type: array
|
|
122
|
+
required:
|
|
123
|
+
- tiers
|
|
124
|
+
value:
|
|
125
|
+
tiers:
|
|
126
|
+
- name: free
|
|
127
|
+
- name: pro
|
|
128
|
+
perEnvSeed:
|
|
129
|
+
summary: Per-env seed
|
|
130
|
+
description: "Pass a `{ env: value }` map to seed different initial values per env."
|
|
131
|
+
value:
|
|
132
|
+
name: pricing.tiers
|
|
133
|
+
schema:
|
|
134
|
+
type: object
|
|
135
|
+
properties:
|
|
136
|
+
tiers:
|
|
137
|
+
type: array
|
|
138
|
+
required:
|
|
139
|
+
- tiers
|
|
140
|
+
value:
|
|
141
|
+
dev:
|
|
142
|
+
tiers:
|
|
143
|
+
- name: free
|
|
144
|
+
- name: pro
|
|
145
|
+
- name: enterprise
|
|
146
|
+
stage:
|
|
147
|
+
tiers:
|
|
148
|
+
- name: free
|
|
149
|
+
- name: pro
|
|
150
|
+
prod:
|
|
151
|
+
tiers:
|
|
152
|
+
- name: free
|
|
153
|
+
- name: pro
|
|
154
|
+
responses:
|
|
155
|
+
"201":
|
|
156
|
+
description: Create a dynamic config
|
|
157
|
+
content:
|
|
158
|
+
application/json:
|
|
159
|
+
schema:
|
|
160
|
+
$ref: ../components/schemas/configs.yaml#/CreateConfigResponse
|
|
161
|
+
example:
|
|
162
|
+
id: cfg_01j7wae5h6j7k8l9m0n1p2q3r4
|
|
163
|
+
name: pricing.tiers
|
|
164
|
+
links:
|
|
165
|
+
GetConfig:
|
|
166
|
+
operationId: getConfig
|
|
167
|
+
parameters: { id: $response.body#/id }
|
|
168
|
+
UpdateConfig:
|
|
169
|
+
operationId: updateConfig
|
|
170
|
+
parameters: { id: $response.body#/id }
|
|
171
|
+
PublishConfigDraft:
|
|
172
|
+
operationId: publishConfigDraft
|
|
173
|
+
parameters: { id: $response.body#/id }
|
|
174
|
+
DeleteConfig:
|
|
175
|
+
operationId: deleteConfig
|
|
176
|
+
parameters: { id: $response.body#/id }
|
|
177
|
+
"400":
|
|
178
|
+
$ref: ../components/responses.yaml#/BadRequest
|
|
179
|
+
"401":
|
|
180
|
+
$ref: ../components/responses.yaml#/Unauthorized
|
|
181
|
+
"403":
|
|
182
|
+
$ref: ../components/responses.yaml#/Forbidden
|
|
183
|
+
"404":
|
|
184
|
+
$ref: ../components/responses.yaml#/NotFound
|
|
185
|
+
"409":
|
|
186
|
+
$ref: ../components/responses.yaml#/Conflict
|
|
187
|
+
"422":
|
|
188
|
+
$ref: ../components/responses.yaml#/UnprocessableEntity
|
|
189
|
+
x-error-codes:
|
|
190
|
+
- BAD_REQUEST
|
|
191
|
+
- UNAUTHORIZED
|
|
192
|
+
- FORBIDDEN
|
|
193
|
+
- ALREADY_EXISTS
|
|
194
|
+
- VALIDATION
|
|
195
|
+
x-cli:
|
|
196
|
+
name: create
|
|
197
|
+
positional:
|
|
198
|
+
- name
|
|
199
|
+
/api/admin/configs/{id}:
|
|
200
|
+
get:
|
|
201
|
+
operationId: getConfig
|
|
202
|
+
summary: Get one config
|
|
203
|
+
description: |-
|
|
204
|
+
Returns config metadata plus the latest published values per env and any active draft values. Use this to fetch the JSON the editor renders.
|
|
205
|
+
|
|
206
|
+
**Use case:** Fetch one config's current published values and any in-flight drafts.
|
|
207
|
+
tags:
|
|
208
|
+
- Configs
|
|
209
|
+
parameters:
|
|
210
|
+
- $ref: ../components/parameters.yaml#/ProjectId
|
|
211
|
+
- name: id
|
|
212
|
+
in: path
|
|
213
|
+
required: true
|
|
214
|
+
description: Stable opaque config id (`cfg_…`) or the config's `name`.
|
|
215
|
+
schema:
|
|
216
|
+
$ref: ../components/schemas/common.yaml#/ResourceId
|
|
217
|
+
responses:
|
|
218
|
+
"200":
|
|
219
|
+
description: Get one config
|
|
220
|
+
content:
|
|
221
|
+
application/json:
|
|
222
|
+
schema:
|
|
223
|
+
$ref: ../components/schemas/configs.yaml#/GetConfigResponse
|
|
224
|
+
example:
|
|
225
|
+
id: cfg_01j7wae5h6j7k8l9m0n1p2q3r4
|
|
226
|
+
name: pricing.tiers
|
|
227
|
+
description: Pricing tier definitions consumed by the checkout flow.
|
|
228
|
+
schema:
|
|
229
|
+
type: object
|
|
230
|
+
properties:
|
|
231
|
+
tiers:
|
|
232
|
+
type: array
|
|
233
|
+
items:
|
|
234
|
+
type: object
|
|
235
|
+
required:
|
|
236
|
+
- tiers
|
|
237
|
+
updatedAt: 2026-05-09T18:22:11.000Z
|
|
238
|
+
envs:
|
|
239
|
+
dev:
|
|
240
|
+
version: 5
|
|
241
|
+
publishedAt: 2026-05-09T18:22:11.000Z
|
|
242
|
+
publishedBy: ana@example.com
|
|
243
|
+
stage:
|
|
244
|
+
version: 4
|
|
245
|
+
publishedAt: 2026-05-08T11:05:22.000Z
|
|
246
|
+
publishedBy: ana@example.com
|
|
247
|
+
prod:
|
|
248
|
+
version: 4
|
|
249
|
+
publishedAt: 2026-05-08T11:05:22.000Z
|
|
250
|
+
publishedBy: ana@example.com
|
|
251
|
+
drafts:
|
|
252
|
+
dev:
|
|
253
|
+
updatedAt: 2026-05-10T09:31:00.000Z
|
|
254
|
+
authorEmail: bo@example.com
|
|
255
|
+
baseVersion: 5
|
|
256
|
+
values:
|
|
257
|
+
dev:
|
|
258
|
+
tiers:
|
|
259
|
+
- name: free
|
|
260
|
+
- name: pro
|
|
261
|
+
stage:
|
|
262
|
+
tiers:
|
|
263
|
+
- name: free
|
|
264
|
+
- name: pro
|
|
265
|
+
prod:
|
|
266
|
+
tiers:
|
|
267
|
+
- name: free
|
|
268
|
+
- name: pro
|
|
269
|
+
draftValues:
|
|
270
|
+
dev:
|
|
271
|
+
tiers:
|
|
272
|
+
- name: free
|
|
273
|
+
- name: pro
|
|
274
|
+
- name: enterprise
|
|
275
|
+
"400":
|
|
276
|
+
$ref: ../components/responses.yaml#/BadRequest
|
|
277
|
+
"401":
|
|
278
|
+
$ref: ../components/responses.yaml#/Unauthorized
|
|
279
|
+
"403":
|
|
280
|
+
$ref: ../components/responses.yaml#/Forbidden
|
|
281
|
+
"404":
|
|
282
|
+
$ref: ../components/responses.yaml#/NotFound
|
|
283
|
+
"409":
|
|
284
|
+
$ref: ../components/responses.yaml#/Conflict
|
|
285
|
+
"422":
|
|
286
|
+
$ref: ../components/responses.yaml#/UnprocessableEntity
|
|
287
|
+
x-error-codes:
|
|
288
|
+
- BAD_REQUEST
|
|
289
|
+
- UNAUTHORIZED
|
|
290
|
+
- FORBIDDEN
|
|
291
|
+
- NOT_FOUND
|
|
292
|
+
x-cli:
|
|
293
|
+
name: get
|
|
294
|
+
positional:
|
|
295
|
+
- id
|
|
296
|
+
patch:
|
|
297
|
+
operationId: updateConfig
|
|
298
|
+
summary: Update a dynamic config
|
|
299
|
+
description: |-
|
|
300
|
+
Partial update. When `value` is supplied it is **republished on every env** (new version per env). When `schema` is supplied it replaces the current schema; every existing value is re-validated.
|
|
301
|
+
|
|
302
|
+
For env-scoped edits, use the draft/publish flow (`PUT /{id}/drafts` then `POST /{id}/publish`) instead.
|
|
303
|
+
|
|
304
|
+
**Use cases**
|
|
305
|
+
|
|
306
|
+
- **Republish flat value** — `{ "value": {…} }` sets the same value on every env.
|
|
307
|
+
- **Schema migration** — `{ "schema": {…} }` replaces the schema; existing values are re-validated.
|
|
308
|
+
- **Env-scoped edits** — use `PUT /{id}/drafts` + `POST /{id}/publish` instead of PATCH.
|
|
309
|
+
tags:
|
|
310
|
+
- Configs
|
|
311
|
+
parameters:
|
|
312
|
+
- $ref: ../components/parameters.yaml#/ProjectId
|
|
313
|
+
- name: id
|
|
314
|
+
in: path
|
|
315
|
+
required: true
|
|
316
|
+
description: Stable opaque config id (`cfg_…`) or the config's `name`.
|
|
317
|
+
schema:
|
|
318
|
+
$ref: ../components/schemas/common.yaml#/ResourceId
|
|
319
|
+
requestBody:
|
|
320
|
+
required: true
|
|
321
|
+
content:
|
|
322
|
+
application/json:
|
|
323
|
+
schema:
|
|
324
|
+
$ref: ../components/schemas/configs.yaml#/UpdateConfigRequest
|
|
325
|
+
examples:
|
|
326
|
+
flatValue:
|
|
327
|
+
summary: Flat value — republish on every env
|
|
328
|
+
description: Sets the same JSON object as a new version on dev/stage/prod.
|
|
329
|
+
value:
|
|
330
|
+
value:
|
|
331
|
+
tiers:
|
|
332
|
+
- name: free
|
|
333
|
+
- name: pro
|
|
334
|
+
schemaOnly:
|
|
335
|
+
summary: Schema-only update
|
|
336
|
+
description: Replaces the schema. Existing values must still validate or the update fails.
|
|
337
|
+
value:
|
|
338
|
+
schema:
|
|
339
|
+
type: object
|
|
340
|
+
properties:
|
|
341
|
+
tiers:
|
|
342
|
+
type: array
|
|
343
|
+
trial_days:
|
|
344
|
+
type: integer
|
|
345
|
+
required:
|
|
346
|
+
- tiers
|
|
347
|
+
responses:
|
|
348
|
+
"200":
|
|
349
|
+
description: Update a dynamic config
|
|
350
|
+
content:
|
|
351
|
+
application/json:
|
|
352
|
+
schema:
|
|
353
|
+
$ref: ../components/schemas/configs.yaml#/UpdateConfigResponse
|
|
354
|
+
example:
|
|
355
|
+
id: cfg_01j7wae5h6j7k8l9m0n1p2q3r4
|
|
356
|
+
"400":
|
|
357
|
+
$ref: ../components/responses.yaml#/BadRequest
|
|
358
|
+
"401":
|
|
359
|
+
$ref: ../components/responses.yaml#/Unauthorized
|
|
360
|
+
"403":
|
|
361
|
+
$ref: ../components/responses.yaml#/Forbidden
|
|
362
|
+
"404":
|
|
363
|
+
$ref: ../components/responses.yaml#/NotFound
|
|
364
|
+
"409":
|
|
365
|
+
$ref: ../components/responses.yaml#/Conflict
|
|
366
|
+
"422":
|
|
367
|
+
$ref: ../components/responses.yaml#/UnprocessableEntity
|
|
368
|
+
x-error-codes:
|
|
369
|
+
- BAD_REQUEST
|
|
370
|
+
- UNAUTHORIZED
|
|
371
|
+
- FORBIDDEN
|
|
372
|
+
- NOT_FOUND
|
|
373
|
+
- VALIDATION
|
|
374
|
+
x-cli:
|
|
375
|
+
name: update
|
|
376
|
+
positional:
|
|
377
|
+
- id
|
|
378
|
+
delete:
|
|
379
|
+
operationId: deleteConfig
|
|
380
|
+
summary: Delete a dynamic config
|
|
381
|
+
description: |-
|
|
382
|
+
Soft-deletes the config and rebuilds the project's flags KV blob.
|
|
383
|
+
|
|
384
|
+
**Use case:** Tear down a config after its consumers have stopped reading it.
|
|
385
|
+
tags:
|
|
386
|
+
- Configs
|
|
387
|
+
parameters:
|
|
388
|
+
- $ref: ../components/parameters.yaml#/ProjectId
|
|
389
|
+
- name: id
|
|
390
|
+
in: path
|
|
391
|
+
required: true
|
|
392
|
+
description: Stable opaque config id (`cfg_…`) or the config's `name`.
|
|
393
|
+
schema:
|
|
394
|
+
$ref: ../components/schemas/common.yaml#/ResourceId
|
|
395
|
+
responses:
|
|
396
|
+
"200":
|
|
397
|
+
description: Delete a dynamic config
|
|
398
|
+
content:
|
|
399
|
+
application/json:
|
|
400
|
+
schema:
|
|
401
|
+
$ref: ../components/schemas/configs.yaml#/DeleteConfigResponse
|
|
402
|
+
example:
|
|
403
|
+
ok: true
|
|
404
|
+
"400":
|
|
405
|
+
$ref: ../components/responses.yaml#/BadRequest
|
|
406
|
+
"401":
|
|
407
|
+
$ref: ../components/responses.yaml#/Unauthorized
|
|
408
|
+
"403":
|
|
409
|
+
$ref: ../components/responses.yaml#/Forbidden
|
|
410
|
+
"404":
|
|
411
|
+
$ref: ../components/responses.yaml#/NotFound
|
|
412
|
+
"409":
|
|
413
|
+
$ref: ../components/responses.yaml#/Conflict
|
|
414
|
+
"422":
|
|
415
|
+
$ref: ../components/responses.yaml#/UnprocessableEntity
|
|
416
|
+
x-error-codes:
|
|
417
|
+
- BAD_REQUEST
|
|
418
|
+
- UNAUTHORIZED
|
|
419
|
+
- FORBIDDEN
|
|
420
|
+
- NOT_FOUND
|
|
421
|
+
x-cli:
|
|
422
|
+
name: archive
|
|
423
|
+
positional:
|
|
424
|
+
- id
|
|
425
|
+
/api/admin/configs/{id}/drafts:
|
|
426
|
+
put:
|
|
427
|
+
operationId: saveConfigDraft
|
|
428
|
+
summary: Save a draft value
|
|
429
|
+
description: |-
|
|
430
|
+
Stages a value for one env without publishing. The draft is validated against the config's current schema and stored alongside the `baseVersion` it was forked from.
|
|
431
|
+
|
|
432
|
+
Saving over an existing draft overwrites it. Use `POST /{id}/publish` to promote it to a new published version.
|
|
433
|
+
|
|
434
|
+
**Use case:** Iterate on a config value on dev without affecting prod — preview in staging, then publish.
|
|
435
|
+
tags:
|
|
436
|
+
- Configs
|
|
437
|
+
parameters:
|
|
438
|
+
- $ref: ../components/parameters.yaml#/ProjectId
|
|
439
|
+
- name: id
|
|
440
|
+
in: path
|
|
441
|
+
required: true
|
|
442
|
+
description: Stable opaque config id (`cfg_…`) or the config's `name`.
|
|
443
|
+
schema:
|
|
444
|
+
$ref: ../components/schemas/common.yaml#/ResourceId
|
|
445
|
+
requestBody:
|
|
446
|
+
required: true
|
|
447
|
+
content:
|
|
448
|
+
application/json:
|
|
449
|
+
schema:
|
|
450
|
+
$ref: ../components/schemas/configs.yaml#/SaveConfigDraftRequest
|
|
451
|
+
examples:
|
|
452
|
+
stageDev:
|
|
453
|
+
summary: Stage a dev draft
|
|
454
|
+
description: Stages a new value on dev without touching stage/prod.
|
|
455
|
+
value:
|
|
456
|
+
env: dev
|
|
457
|
+
value:
|
|
458
|
+
tiers:
|
|
459
|
+
- name: free
|
|
460
|
+
- name: pro
|
|
461
|
+
- name: enterprise
|
|
462
|
+
responses:
|
|
463
|
+
"200":
|
|
464
|
+
description: Save a draft value
|
|
465
|
+
content:
|
|
466
|
+
application/json:
|
|
467
|
+
schema:
|
|
468
|
+
$ref: ../components/schemas/configs.yaml#/SaveConfigDraftResponse
|
|
469
|
+
example:
|
|
470
|
+
id: cfg_01j7wae5h6j7k8l9m0n1p2q3r4
|
|
471
|
+
env: dev
|
|
472
|
+
baseVersion: 5
|
|
473
|
+
updatedAt: 2026-05-10T09:31:00.000Z
|
|
474
|
+
"400":
|
|
475
|
+
$ref: ../components/responses.yaml#/BadRequest
|
|
476
|
+
"401":
|
|
477
|
+
$ref: ../components/responses.yaml#/Unauthorized
|
|
478
|
+
"403":
|
|
479
|
+
$ref: ../components/responses.yaml#/Forbidden
|
|
480
|
+
"404":
|
|
481
|
+
$ref: ../components/responses.yaml#/NotFound
|
|
482
|
+
"409":
|
|
483
|
+
$ref: ../components/responses.yaml#/Conflict
|
|
484
|
+
"422":
|
|
485
|
+
$ref: ../components/responses.yaml#/UnprocessableEntity
|
|
486
|
+
x-error-codes:
|
|
487
|
+
- BAD_REQUEST
|
|
488
|
+
- UNAUTHORIZED
|
|
489
|
+
- FORBIDDEN
|
|
490
|
+
- NOT_FOUND
|
|
491
|
+
- VALIDATION
|
|
492
|
+
x-cli:
|
|
493
|
+
name: draft
|
|
494
|
+
positional:
|
|
495
|
+
- id
|
|
496
|
+
delete:
|
|
497
|
+
operationId: discardConfigDraft
|
|
498
|
+
summary: Discard a draft
|
|
499
|
+
description: |-
|
|
500
|
+
Drops the in-flight draft on one env. Published values are unaffected.
|
|
501
|
+
|
|
502
|
+
**Use case:** Abandon an in-progress draft after deciding not to ship it.
|
|
503
|
+
tags:
|
|
504
|
+
- Configs
|
|
505
|
+
parameters:
|
|
506
|
+
- $ref: ../components/parameters.yaml#/ProjectId
|
|
507
|
+
- name: id
|
|
508
|
+
in: path
|
|
509
|
+
required: true
|
|
510
|
+
description: Stable opaque config id (`cfg_…`) or the config's `name`.
|
|
511
|
+
schema:
|
|
512
|
+
$ref: ../components/schemas/common.yaml#/ResourceId
|
|
513
|
+
requestBody:
|
|
514
|
+
required: true
|
|
515
|
+
content:
|
|
516
|
+
application/json:
|
|
517
|
+
schema:
|
|
518
|
+
$ref: ../components/schemas/configs.yaml#/DiscardConfigDraftRequest
|
|
519
|
+
examples:
|
|
520
|
+
discardDev:
|
|
521
|
+
summary: Discard the dev draft
|
|
522
|
+
description: Drops the staged dev draft without publishing.
|
|
523
|
+
value:
|
|
524
|
+
env: dev
|
|
525
|
+
responses:
|
|
526
|
+
"200":
|
|
527
|
+
description: Discard a draft
|
|
528
|
+
content:
|
|
529
|
+
application/json:
|
|
530
|
+
schema:
|
|
531
|
+
$ref: ../components/schemas/configs.yaml#/DiscardConfigDraftResponse
|
|
532
|
+
example:
|
|
533
|
+
ok: true
|
|
534
|
+
"400":
|
|
535
|
+
$ref: ../components/responses.yaml#/BadRequest
|
|
536
|
+
"401":
|
|
537
|
+
$ref: ../components/responses.yaml#/Unauthorized
|
|
538
|
+
"403":
|
|
539
|
+
$ref: ../components/responses.yaml#/Forbidden
|
|
540
|
+
"404":
|
|
541
|
+
$ref: ../components/responses.yaml#/NotFound
|
|
542
|
+
"409":
|
|
543
|
+
$ref: ../components/responses.yaml#/Conflict
|
|
544
|
+
"422":
|
|
545
|
+
$ref: ../components/responses.yaml#/UnprocessableEntity
|
|
546
|
+
x-error-codes:
|
|
547
|
+
- BAD_REQUEST
|
|
548
|
+
- UNAUTHORIZED
|
|
549
|
+
- FORBIDDEN
|
|
550
|
+
- NOT_FOUND
|
|
551
|
+
x-cli:
|
|
552
|
+
name: discard-draft
|
|
553
|
+
positional:
|
|
554
|
+
- id
|
|
555
|
+
/api/admin/configs/{id}/publish:
|
|
556
|
+
post:
|
|
557
|
+
operationId: publishConfigDraft
|
|
558
|
+
summary: Publish a draft
|
|
559
|
+
description: |-
|
|
560
|
+
Promotes the staged draft on one env to a new published version. The draft must still validate against the current schema.
|
|
561
|
+
|
|
562
|
+
Returns `404` if there is no draft for the given env.
|
|
563
|
+
|
|
564
|
+
**Use case:** Ship a staged change once you've validated it on a lower env.
|
|
565
|
+
tags:
|
|
566
|
+
- Configs
|
|
567
|
+
parameters:
|
|
568
|
+
- $ref: ../components/parameters.yaml#/ProjectId
|
|
569
|
+
- name: id
|
|
570
|
+
in: path
|
|
571
|
+
required: true
|
|
572
|
+
description: Stable opaque config id (`cfg_…`) or the config's `name`.
|
|
573
|
+
schema:
|
|
574
|
+
$ref: ../components/schemas/common.yaml#/ResourceId
|
|
575
|
+
requestBody:
|
|
576
|
+
required: true
|
|
577
|
+
content:
|
|
578
|
+
application/json:
|
|
579
|
+
schema:
|
|
580
|
+
$ref: ../components/schemas/configs.yaml#/PublishConfigDraftRequest
|
|
581
|
+
examples:
|
|
582
|
+
publishDev:
|
|
583
|
+
summary: Publish the dev draft
|
|
584
|
+
description: Promotes the dev draft to a new published version on dev.
|
|
585
|
+
value:
|
|
586
|
+
env: dev
|
|
587
|
+
publishProd:
|
|
588
|
+
summary: Publish to prod
|
|
589
|
+
description: Promotes the prod draft after staging signed off.
|
|
590
|
+
value:
|
|
591
|
+
env: prod
|
|
592
|
+
responses:
|
|
593
|
+
"200":
|
|
594
|
+
description: Publish a draft
|
|
595
|
+
content:
|
|
596
|
+
application/json:
|
|
597
|
+
schema:
|
|
598
|
+
$ref: ../components/schemas/configs.yaml#/PublishConfigDraftResponse
|
|
599
|
+
example:
|
|
600
|
+
id: cfg_01j7wae5h6j7k8l9m0n1p2q3r4
|
|
601
|
+
env: dev
|
|
602
|
+
version: 6
|
|
603
|
+
"400":
|
|
604
|
+
$ref: ../components/responses.yaml#/BadRequest
|
|
605
|
+
"401":
|
|
606
|
+
$ref: ../components/responses.yaml#/Unauthorized
|
|
607
|
+
"403":
|
|
608
|
+
$ref: ../components/responses.yaml#/Forbidden
|
|
609
|
+
"404":
|
|
610
|
+
$ref: ../components/responses.yaml#/NotFound
|
|
611
|
+
"409":
|
|
612
|
+
$ref: ../components/responses.yaml#/Conflict
|
|
613
|
+
"422":
|
|
614
|
+
$ref: ../components/responses.yaml#/UnprocessableEntity
|
|
615
|
+
x-error-codes:
|
|
616
|
+
- BAD_REQUEST
|
|
617
|
+
- UNAUTHORIZED
|
|
618
|
+
- FORBIDDEN
|
|
619
|
+
- NOT_FOUND
|
|
620
|
+
- INVALID_TRANSITION
|
|
621
|
+
- VALIDATION
|
|
622
|
+
x-cli:
|
|
623
|
+
name: publish
|
|
624
|
+
positional:
|
|
625
|
+
- id
|
|
626
|
+
/api/admin/configs/{id}/activity:
|
|
627
|
+
get:
|
|
628
|
+
operationId: listConfigActivity
|
|
629
|
+
summary: List config activity
|
|
630
|
+
description: |-
|
|
631
|
+
Returns recent audit rows for one config (create, update, draft.save, publish, delete) ordered newest first. Use the `limit` query parameter to cap the result (1–100, default 20).
|
|
632
|
+
|
|
633
|
+
**Use case:** Render the activity panel in the config editor or drive a slack notification on publish events.
|
|
634
|
+
tags:
|
|
635
|
+
- Configs
|
|
636
|
+
parameters:
|
|
637
|
+
- $ref: ../components/parameters.yaml#/ProjectId
|
|
638
|
+
- name: id
|
|
639
|
+
in: path
|
|
640
|
+
required: true
|
|
641
|
+
description: Stable opaque config id (`cfg_…`) or the config's `name`.
|
|
642
|
+
schema:
|
|
643
|
+
$ref: ../components/schemas/common.yaml#/ResourceId
|
|
644
|
+
- name: limit
|
|
645
|
+
in: query
|
|
646
|
+
required: false
|
|
647
|
+
description: Max rows to return (1–100). Defaults to 20.
|
|
648
|
+
schema:
|
|
649
|
+
default: 20
|
|
650
|
+
type: integer
|
|
651
|
+
minimum: 1
|
|
652
|
+
maximum: 100
|
|
653
|
+
responses:
|
|
654
|
+
"200":
|
|
655
|
+
description: List config activity
|
|
656
|
+
content:
|
|
657
|
+
application/json:
|
|
658
|
+
schema:
|
|
659
|
+
$ref: ../components/schemas/configs.yaml#/ListConfigActivityResponse
|
|
660
|
+
example:
|
|
661
|
+
- id: act_01j7waf01a2b3c4d5e6f7g8h9i
|
|
662
|
+
action: config.publish
|
|
663
|
+
actorEmail: ana@example.com
|
|
664
|
+
actorType: user
|
|
665
|
+
payload:
|
|
666
|
+
env: dev
|
|
667
|
+
version: 6
|
|
668
|
+
createdAt: 2026-05-10T09:31:42.000Z
|
|
669
|
+
"400":
|
|
670
|
+
$ref: ../components/responses.yaml#/BadRequest
|
|
671
|
+
"401":
|
|
672
|
+
$ref: ../components/responses.yaml#/Unauthorized
|
|
673
|
+
"403":
|
|
674
|
+
$ref: ../components/responses.yaml#/Forbidden
|
|
675
|
+
"404":
|
|
676
|
+
$ref: ../components/responses.yaml#/NotFound
|
|
677
|
+
"409":
|
|
678
|
+
$ref: ../components/responses.yaml#/Conflict
|
|
679
|
+
"422":
|
|
680
|
+
$ref: ../components/responses.yaml#/UnprocessableEntity
|
|
681
|
+
x-error-codes:
|
|
682
|
+
- BAD_REQUEST
|
|
683
|
+
- UNAUTHORIZED
|
|
684
|
+
- FORBIDDEN
|
|
685
|
+
- NOT_FOUND
|
|
686
|
+
x-cli:
|
|
687
|
+
name: activity
|
|
688
|
+
positional:
|
|
689
|
+
- id
|
|
690
|
+
/api/admin/configs/{id}/schema:
|
|
691
|
+
patch:
|
|
692
|
+
operationId: updateConfigSchema
|
|
693
|
+
summary: Update a config schema
|
|
694
|
+
description: |-
|
|
695
|
+
Replaces a config's JSON Schema in place. Every existing published value is re-validated against the new schema before it lands; the update fails if any value no longer validates.
|
|
696
|
+
|
|
697
|
+
**Use case:** Evolve a config's shape (add/remove a field) without republishing values.
|
|
698
|
+
tags:
|
|
699
|
+
- Configs
|
|
700
|
+
parameters:
|
|
701
|
+
- $ref: ../components/parameters.yaml#/ProjectId
|
|
702
|
+
- name: id
|
|
703
|
+
in: path
|
|
704
|
+
required: true
|
|
705
|
+
description: Stable opaque config id (`cfg_…`) or the config's `name`.
|
|
706
|
+
schema:
|
|
707
|
+
$ref: ../components/schemas/common.yaml#/ResourceId
|
|
708
|
+
requestBody:
|
|
709
|
+
required: true
|
|
710
|
+
content:
|
|
711
|
+
application/json:
|
|
712
|
+
schema:
|
|
713
|
+
$ref: ../components/schemas/configs.yaml#/UpdateConfigSchemaRequest
|
|
714
|
+
examples:
|
|
715
|
+
addField:
|
|
716
|
+
summary: Add a field to the schema
|
|
717
|
+
description: Replaces the schema; existing values must still validate or the update fails.
|
|
718
|
+
value:
|
|
719
|
+
schema:
|
|
720
|
+
type: object
|
|
721
|
+
properties:
|
|
722
|
+
tiers:
|
|
723
|
+
type: array
|
|
724
|
+
trial_days:
|
|
725
|
+
type: integer
|
|
726
|
+
required:
|
|
727
|
+
- tiers
|
|
728
|
+
responses:
|
|
729
|
+
"200":
|
|
730
|
+
description: Update a config schema
|
|
731
|
+
content:
|
|
732
|
+
application/json:
|
|
733
|
+
schema:
|
|
734
|
+
$ref: ../components/schemas/configs.yaml#/UpdateConfigSchemaResponse
|
|
735
|
+
example:
|
|
736
|
+
id: cfg_01j7wae5h6j7k8l9m0n1p2q3r4
|
|
737
|
+
"400":
|
|
738
|
+
$ref: ../components/responses.yaml#/BadRequest
|
|
739
|
+
"401":
|
|
740
|
+
$ref: ../components/responses.yaml#/Unauthorized
|
|
741
|
+
"403":
|
|
742
|
+
$ref: ../components/responses.yaml#/Forbidden
|
|
743
|
+
"404":
|
|
744
|
+
$ref: ../components/responses.yaml#/NotFound
|
|
745
|
+
"409":
|
|
746
|
+
$ref: ../components/responses.yaml#/Conflict
|
|
747
|
+
"422":
|
|
748
|
+
$ref: ../components/responses.yaml#/UnprocessableEntity
|
|
749
|
+
x-error-codes:
|
|
750
|
+
- BAD_REQUEST
|
|
751
|
+
- UNAUTHORIZED
|
|
752
|
+
- FORBIDDEN
|
|
753
|
+
- NOT_FOUND
|
|
754
|
+
- VALIDATION
|
|
755
|
+
x-cli:
|
|
756
|
+
name: update-schema
|
|
757
|
+
positional:
|
|
758
|
+
- id
|