@shipeasy/openapi 1.6.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. package/README.md +37 -0
  2. package/dist/chunk-EPLLHLZN.js +1616 -0
  3. package/dist/chunk-EPLLHLZN.js.map +1 -0
  4. package/dist/chunk-SPH5HWCD.js +3326 -0
  5. package/dist/chunk-SPH5HWCD.js.map +1 -0
  6. package/dist/client-pVkoo3Bf.d.ts +11186 -0
  7. package/dist/client.d.ts +1 -0
  8. package/dist/client.js +215 -0
  9. package/dist/client.js.map +1 -0
  10. package/dist/custom.d.ts +64 -0
  11. package/dist/custom.js +292 -0
  12. package/dist/custom.js.map +1 -0
  13. package/dist/index.d.ts +29 -41
  14. package/dist/index.js +258 -4375
  15. package/dist/index.js.map +1 -0
  16. package/dist/node-context.d.ts +81 -33
  17. package/dist/node-context.js +98 -44
  18. package/dist/node-context.js.map +1 -0
  19. package/dist/schemas.d.ts +7920 -0
  20. package/dist/schemas.js +1083 -0
  21. package/dist/schemas.js.map +1 -0
  22. package/openapi.json +15297 -3044
  23. package/openapi.yaml +13979 -0
  24. package/package.json +33 -26
  25. package/spec/components/errors.yaml +53 -0
  26. package/spec/components/parameters.yaml +24 -0
  27. package/spec/components/responses.yaml +107 -0
  28. package/spec/components/schemas/alert-rules.yaml +175 -0
  29. package/spec/components/schemas/attributes.yaml +157 -0
  30. package/spec/components/schemas/common.yaml +87 -0
  31. package/spec/components/schemas/configs.yaml +371 -0
  32. package/spec/components/schemas/connectors.yaml +593 -0
  33. package/spec/components/schemas/errors-api.yaml +209 -0
  34. package/spec/components/schemas/events.yaml +321 -0
  35. package/spec/components/schemas/experiments.yaml +865 -0
  36. package/spec/components/schemas/gate-templates.yaml +198 -0
  37. package/spec/components/schemas/gates.yaml +890 -0
  38. package/spec/components/schemas/i18n.yaml +478 -0
  39. package/spec/components/schemas/keys.yaml +186 -0
  40. package/spec/components/schemas/killswitches.yaml +309 -0
  41. package/spec/components/schemas/metrics.yaml +547 -0
  42. package/spec/components/schemas/ops.yaml +1011 -0
  43. package/spec/components/schemas/projects.yaml +222 -0
  44. package/spec/components/schemas/search.yaml +46 -0
  45. package/spec/components/schemas/universes.yaml +127 -0
  46. package/spec/openapi.yaml +348 -0
  47. package/spec/paths/alert-rules.yaml +250 -0
  48. package/spec/paths/attributes.yaml +261 -0
  49. package/spec/paths/configs.yaml +744 -0
  50. package/spec/paths/connectors.yaml +748 -0
  51. package/spec/paths/errors.yaml +382 -0
  52. package/spec/paths/events.yaml +366 -0
  53. package/spec/paths/experiments.yaml +777 -0
  54. package/spec/paths/gate-templates.yaml +263 -0
  55. package/spec/paths/gates.yaml +451 -0
  56. package/spec/paths/i18n.yaml +544 -0
  57. package/spec/paths/keys.yaml +181 -0
  58. package/spec/paths/killswitches.yaml +557 -0
  59. package/spec/paths/metrics.yaml +302 -0
  60. package/spec/paths/ops.yaml +446 -0
  61. package/spec/paths/projects.yaml +210 -0
  62. package/spec/paths/search.yaml +62 -0
  63. package/spec/paths/universes.yaml +247 -0
  64. package/dist/operations/attributes.d.ts +0 -33
  65. package/dist/operations/attributes.js +0 -16
  66. package/dist/operations/cli-adapter.d.ts +0 -35
  67. package/dist/operations/cli-adapter.js +0 -91
  68. package/dist/operations/coerce.d.ts +0 -32
  69. package/dist/operations/coerce.js +0 -53
  70. package/dist/operations/configs.d.ts +0 -28
  71. package/dist/operations/configs.js +0 -119
  72. package/dist/operations/docs.d.ts +0 -37
  73. package/dist/operations/docs.js +0 -39
  74. package/dist/operations/events.d.ts +0 -28
  75. package/dist/operations/events.js +0 -121
  76. package/dist/operations/experiments.d.ts +0 -28
  77. package/dist/operations/experiments.js +0 -280
  78. package/dist/operations/gates.d.ts +0 -28
  79. package/dist/operations/gates.js +0 -132
  80. package/dist/operations/i18n.d.ts +0 -28
  81. package/dist/operations/i18n.js +0 -121
  82. package/dist/operations/index.d.ts +0 -63
  83. package/dist/operations/index.js +0 -1751
  84. package/dist/operations/killswitches.d.ts +0 -28
  85. package/dist/operations/killswitches.js +0 -126
  86. package/dist/operations/mcp-adapter.d.ts +0 -35
  87. package/dist/operations/mcp-adapter.js +0 -94
  88. package/dist/operations/metrics.d.ts +0 -30
  89. package/dist/operations/metrics.js +0 -114
  90. package/dist/operations/ops.d.ts +0 -28
  91. package/dist/operations/ops.js +0 -313
  92. package/dist/operations/projects.d.ts +0 -28
  93. package/dist/operations/projects.js +0 -36
  94. package/dist/operations/sdk-docs.d.ts +0 -28
  95. package/dist/operations/sdk-docs.js +0 -160
  96. package/dist/operations/types.d.ts +0 -138
  97. package/dist/operations/types.js +0 -9
  98. package/dist/operations/universes.d.ts +0 -28
  99. package/dist/operations/universes.js +0 -93
  100. package/dist/operations/util.d.ts +0 -33
  101. package/dist/operations/util.js +0 -9
  102. package/dist/resources/alert-rules.d.ts +0 -50
  103. package/dist/resources/alert-rules.js +0 -75
  104. package/dist/resources/attributes.d.ts +0 -19
  105. package/dist/resources/attributes.js +0 -10
  106. package/dist/resources/configs.d.ts +0 -681
  107. package/dist/resources/configs.js +0 -509
  108. package/dist/resources/events.d.ts +0 -61
  109. package/dist/resources/events.js +0 -42
  110. package/dist/resources/experiments.d.ts +0 -849
  111. package/dist/resources/experiments.js +0 -707
  112. package/dist/resources/gates.d.ts +0 -808
  113. package/dist/resources/gates.js +0 -522
  114. package/dist/resources/i18n.d.ts +0 -84
  115. package/dist/resources/i18n.js +0 -60
  116. package/dist/resources/index.d.ts +0 -2767
  117. package/dist/resources/index.js +0 -2563
  118. package/dist/resources/killswitches.d.ts +0 -436
  119. package/dist/resources/killswitches.js +0 -514
  120. package/dist/resources/metrics.d.ts +0 -54
  121. package/dist/resources/metrics.js +0 -40
  122. package/dist/resources/ops.d.ts +0 -88
  123. package/dist/resources/ops.js +0 -36
  124. package/dist/resources/projects.d.ts +0 -54
  125. package/dist/resources/projects.js +0 -14
  126. package/dist/resources/universes.d.ts +0 -185
  127. package/dist/resources/universes.js +0 -234
  128. package/dist/schemas/alert-rules.d.ts +0 -65
  129. package/dist/schemas/alert-rules.js +0 -37
  130. package/dist/schemas/configs.d.ts +0 -154
  131. package/dist/schemas/configs.js +0 -134
  132. package/dist/schemas/constants.d.ts +0 -6
  133. package/dist/schemas/constants.js +0 -7
  134. package/dist/schemas/experiments.d.ts +0 -229
  135. package/dist/schemas/experiments.js +0 -221
  136. package/dist/schemas/folder.d.ts +0 -10
  137. package/dist/schemas/folder.js +0 -8
  138. package/dist/schemas/gates.d.ts +0 -386
  139. package/dist/schemas/gates.js +0 -190
  140. package/dist/schemas/index.d.ts +0 -11
  141. package/dist/schemas/index.js +0 -762
  142. package/dist/schemas/killswitches.d.ts +0 -110
  143. package/dist/schemas/killswitches.js +0 -226
  144. package/dist/schemas/metric-name.d.ts +0 -5
  145. package/dist/schemas/metric-name.js +0 -6
  146. package/dist/schemas/pagination.d.ts +0 -37
  147. package/dist/schemas/pagination.js +0 -44
  148. package/dist/schemas/universes.d.ts +0 -35
  149. package/dist/schemas/universes.js +0 -55
  150. package/dist/transport.d.ts +0 -30
  151. package/dist/transport.js +0 -44
@@ -0,0 +1,446 @@
1
+ /api/admin/ops:
2
+ get:
3
+ operationId: listOpsItems
4
+ summary: List the operational queue
5
+ description: |-
6
+ Returns the unified ops queue (bugs, feature requests, errors, alerts) in work order — highest priority first, oldest first within a priority — so consumers work it top-down. Filter by `type` and/or `status`, and cap with `limit`. Human-gated holding states (items awaiting human sign-off in the dashboard) are never returned by `all`/default status.
7
+
8
+ **Use case:** Pull the open queue to triage — e.g. every `bug` still `open` — before working items down one by one.
9
+ tags:
10
+ - Ops
11
+ parameters:
12
+ - $ref: ../components/parameters.yaml#/ProjectId
13
+ - name: type
14
+ in: query
15
+ required: false
16
+ description: Filter by item type (`bug`/`feature_request`/`error`/`alert`), or `all`.
17
+ schema:
18
+ anyOf:
19
+ - type: string
20
+ enum:
21
+ - bug
22
+ - feature_request
23
+ - error
24
+ - alert
25
+ description: Queue item type. `bug` and `feature_request` are user-fileable; `error` and `alert` tickets are auto-filed by the platform.
26
+ - type: string
27
+ const: all
28
+ - name: status
29
+ in: query
30
+ required: false
31
+ description: >-
32
+ Filter by lifecycle status, or `all`. The human-gated holding states
33
+ (`pending_approval`, `triage`) are excluded from `all`/default and
34
+ returned only when requested as the exact status.
35
+ schema:
36
+ anyOf:
37
+ - $ref: ../components/schemas/ops.yaml#/OpsItemStatus
38
+ - type: string
39
+ const: all
40
+ - name: limit
41
+ in: query
42
+ required: false
43
+ description: Max items to return (1–500).
44
+ schema:
45
+ type: integer
46
+ minimum: 1
47
+ maximum: 500
48
+ responses:
49
+ "200":
50
+ description: List the operational queue
51
+ content:
52
+ application/json:
53
+ schema:
54
+ $ref: ../components/schemas/ops.yaml#/ListOpsItemsResponse
55
+ example:
56
+ - id: fb_01j7w8a1b2c3d4e5f6g7h8i9j0
57
+ number: 7
58
+ type: bug
59
+ title: Checkout button misaligned on mobile
60
+ status: open
61
+ priority: high
62
+ createdAt: 2026-06-20T09:14:08.000Z
63
+ "400":
64
+ $ref: ../components/responses.yaml#/BadRequest
65
+ "401":
66
+ $ref: ../components/responses.yaml#/Unauthorized
67
+ "403":
68
+ $ref: ../components/responses.yaml#/Forbidden
69
+ "404":
70
+ $ref: ../components/responses.yaml#/NotFound
71
+ "409":
72
+ $ref: ../components/responses.yaml#/Conflict
73
+ "422":
74
+ $ref: ../components/responses.yaml#/UnprocessableEntity
75
+ x-error-codes:
76
+ - BAD_REQUEST
77
+ - UNAUTHORIZED
78
+ - FORBIDDEN
79
+ x-cli:
80
+ name: list
81
+ post:
82
+ operationId: createOpsItem
83
+ summary: File a queue item
84
+ description: |-
85
+ Files one queue item — a bug report or a feature request — and fires the project's connectors (GitHub issue / Slack). `type` selects which; only the two user-fileable types are accepted (`error`/`alert` tickets are auto-filed by the platform). Returns the new id and per-project number.
86
+
87
+ **Use cases**
88
+
89
+ - **File a bug** — `{ "type": "bug", "title": "Checkout 500s on Safari", "stepsToReproduce": "…" }`.
90
+ - **File a feature request** — `{ "type": "feature_request", "title": "Dark mode", "priority": "nice_to_have" }`.
91
+ tags:
92
+ - Ops
93
+ parameters:
94
+ - $ref: ../components/parameters.yaml#/ProjectId
95
+ requestBody:
96
+ required: true
97
+ content:
98
+ application/json:
99
+ schema:
100
+ $ref: ../components/schemas/ops.yaml#/CreateOpsItemRequest
101
+ examples:
102
+ bug:
103
+ summary: File a bug report
104
+ value:
105
+ type: bug
106
+ title: Checkout button misaligned on mobile
107
+ stepsToReproduce: Open the cart on iOS Safari and tap the price row.
108
+ actualResult: The primary CTA overlaps the price.
109
+ expectedResult: The CTA sits below the price with clear spacing.
110
+ priority: high
111
+ featureRequest:
112
+ summary: File a feature request
113
+ value:
114
+ type: feature_request
115
+ title: Dark mode for the dashboard
116
+ description: Add a theme toggle that persists per user.
117
+ useCase: Reduce eye strain for users working at night.
118
+ priority: nice_to_have
119
+ responses:
120
+ "201":
121
+ description: File a queue item
122
+ content:
123
+ application/json:
124
+ schema:
125
+ $ref: ../components/schemas/ops.yaml#/CreateOpsItemResponse
126
+ example:
127
+ id: fb_01j7w8a1b2c3d4e5f6g7h8i9j0
128
+ number: 7
129
+ "400":
130
+ $ref: ../components/responses.yaml#/BadRequest
131
+ "401":
132
+ $ref: ../components/responses.yaml#/Unauthorized
133
+ "403":
134
+ $ref: ../components/responses.yaml#/Forbidden
135
+ "404":
136
+ $ref: ../components/responses.yaml#/NotFound
137
+ "409":
138
+ $ref: ../components/responses.yaml#/Conflict
139
+ "422":
140
+ $ref: ../components/responses.yaml#/UnprocessableEntity
141
+ x-error-codes:
142
+ - BAD_REQUEST
143
+ - UNAUTHORIZED
144
+ - FORBIDDEN
145
+ - ALREADY_EXISTS
146
+ - VALIDATION
147
+ x-cli:
148
+ name: create
149
+ positional:
150
+ - title
151
+ commands:
152
+ - name: create
153
+ summary: File a queue item (bug or feature request) — pass --type.
154
+ - name: bug
155
+ summary: File a bug report.
156
+ preset:
157
+ type: bug
158
+ - name: feature
159
+ summary: File a feature request.
160
+ preset:
161
+ type: feature_request
162
+ /api/admin/ops/{handle}:
163
+ get:
164
+ operationId: getOpsItem
165
+ summary: Get one queue item
166
+ description: |-
167
+ Fetch a single queue item by its per-project `number` or full id.
168
+
169
+ **Use case:** Inspect one item's full detail before updating its status or linking a PR.
170
+ tags:
171
+ - Ops
172
+ parameters:
173
+ - $ref: ../components/parameters.yaml#/ProjectId
174
+ - name: handle
175
+ in: path
176
+ required: true
177
+ description: Per-project item number (e.g. `7`) or the full ops item id.
178
+ schema:
179
+ type: string
180
+ responses:
181
+ "200":
182
+ description: Get one queue item
183
+ content:
184
+ application/json:
185
+ schema:
186
+ $ref: ../components/schemas/ops.yaml#/GetOpsItemResponse
187
+ example:
188
+ id: fb_01j7w8a1b2c3d4e5f6g7h8i9j0
189
+ number: 7
190
+ type: bug
191
+ title: Checkout button misaligned on mobile
192
+ status: open
193
+ priority: high
194
+ createdAt: 2026-06-20T09:14:08.000Z
195
+ "400":
196
+ $ref: ../components/responses.yaml#/BadRequest
197
+ "401":
198
+ $ref: ../components/responses.yaml#/Unauthorized
199
+ "403":
200
+ $ref: ../components/responses.yaml#/Forbidden
201
+ "404":
202
+ $ref: ../components/responses.yaml#/NotFound
203
+ "409":
204
+ $ref: ../components/responses.yaml#/Conflict
205
+ "422":
206
+ $ref: ../components/responses.yaml#/UnprocessableEntity
207
+ x-error-codes:
208
+ - BAD_REQUEST
209
+ - UNAUTHORIZED
210
+ - FORBIDDEN
211
+ - NOT_FOUND
212
+ x-cli:
213
+ name: get
214
+ positional:
215
+ - handle
216
+ patch:
217
+ operationId: updateOpsItem
218
+ summary: Update a queue item
219
+ description: |-
220
+ Update a queue item. The body is validated against the item's stored type: a `bug` accepts its content fields (title, steps-to-reproduce, actual/expected result) plus `status`/`priority`/`notify` and a GitHub PR link; a `feature_request` its content (title, description, use-case) plus the same triage fields; `error`/`alert`/`measure_plan` accept `status`/`priority`/`notify` only (their content is platform-owned). Pass at least one field.
221
+
222
+ Completing an `error` ticket (status `resolved` or `ready_for_qa`) also resolves the tracked error it links to; the error reopens automatically if it recurs — so completing is safe pre-deploy.
223
+
224
+ **Use cases**
225
+
226
+ - **Start working an item** — `{ "status": "in_progress" }`.
227
+ - **Hand off for review** — `{ "status": "ready_for_qa" }` once the fix landed (the mode PR-based loops use).
228
+ - **Triage** — `{ "priority": "high" }`, content edits on bug/feature items.
229
+ tags:
230
+ - Ops
231
+ parameters:
232
+ - $ref: ../components/parameters.yaml#/ProjectId
233
+ - name: handle
234
+ in: path
235
+ required: true
236
+ description: Per-project item number (e.g. `7`) or the full ops item id.
237
+ schema:
238
+ type: string
239
+ requestBody:
240
+ required: true
241
+ content:
242
+ application/json:
243
+ schema:
244
+ $ref: ../components/schemas/ops.yaml#/UpdateOpsItemRequest
245
+ examples:
246
+ startWork:
247
+ summary: Flip an item to in_progress when starting it
248
+ value:
249
+ status: in_progress
250
+ handOff:
251
+ summary: Hand a fixed item off for human review
252
+ value:
253
+ status: ready_for_qa
254
+ triage:
255
+ summary: Set priority while triaging
256
+ value:
257
+ priority: high
258
+ responses:
259
+ "200":
260
+ description: Update a queue item
261
+ content:
262
+ application/json:
263
+ schema:
264
+ $ref: ../components/schemas/ops.yaml#/UpdateOpsItemResponse
265
+ example:
266
+ id: fb_01j7w8a1b2c3d4e5f6g7h8i9j0
267
+ "400":
268
+ $ref: ../components/responses.yaml#/BadRequest
269
+ "401":
270
+ $ref: ../components/responses.yaml#/Unauthorized
271
+ "403":
272
+ $ref: ../components/responses.yaml#/Forbidden
273
+ "404":
274
+ $ref: ../components/responses.yaml#/NotFound
275
+ "409":
276
+ $ref: ../components/responses.yaml#/Conflict
277
+ "422":
278
+ $ref: ../components/responses.yaml#/UnprocessableEntity
279
+ x-error-codes:
280
+ - BAD_REQUEST
281
+ - UNAUTHORIZED
282
+ - FORBIDDEN
283
+ - NOT_FOUND
284
+ - VALIDATION
285
+ x-cli:
286
+ name: update
287
+ positional:
288
+ - handle
289
+ /api/admin/ops/{handle}/link-pr:
290
+ post:
291
+ operationId: linkPrToOpsItem
292
+ summary: Link a fixing PR
293
+ description: |-
294
+ Record the pull request that fixes a queue item (and clears the link with `prNumber: null`).
295
+
296
+ **Use case:** Tie the fixing PR to the item so closing the PR can flip it to ready_for_qa.
297
+ tags:
298
+ - Ops
299
+ parameters:
300
+ - $ref: ../components/parameters.yaml#/ProjectId
301
+ - name: handle
302
+ in: path
303
+ required: true
304
+ description: Per-project item number (e.g. `7`) or the full ops item id.
305
+ schema:
306
+ type: string
307
+ requestBody:
308
+ required: true
309
+ content:
310
+ application/json:
311
+ schema:
312
+ $ref: ../components/schemas/ops.yaml#/LinkPrToOpsItemRequest
313
+ example:
314
+ prNumber: 412
315
+ prUrl: https://github.com/acme/app/pull/412
316
+ responses:
317
+ "200":
318
+ description: Link a fixing PR
319
+ content:
320
+ application/json:
321
+ schema:
322
+ $ref: ../components/schemas/ops.yaml#/LinkPrToOpsItemResponse
323
+ example:
324
+ id: fb_01j7w8a1b2c3d4e5f6g7h8i9j0
325
+ "400":
326
+ $ref: ../components/responses.yaml#/BadRequest
327
+ "401":
328
+ $ref: ../components/responses.yaml#/Unauthorized
329
+ "403":
330
+ $ref: ../components/responses.yaml#/Forbidden
331
+ "404":
332
+ $ref: ../components/responses.yaml#/NotFound
333
+ "409":
334
+ $ref: ../components/responses.yaml#/Conflict
335
+ "422":
336
+ $ref: ../components/responses.yaml#/UnprocessableEntity
337
+ x-error-codes:
338
+ - BAD_REQUEST
339
+ - UNAUTHORIZED
340
+ - FORBIDDEN
341
+ - NOT_FOUND
342
+ - VALIDATION
343
+ x-cli:
344
+ name: link-pr
345
+ positional:
346
+ - handle
347
+ /api/admin/notifications:
348
+ post:
349
+ operationId: notifyOps
350
+ summary: Raise an attention notification
351
+ description: |-
352
+ Raise a 'needs your attention' bell notification. Create-only and idempotent on `dedupeKey` — re-raising with the same key updates the one card instead of stacking duplicates. It never reads, marks read, or deletes the feed, so it is safe for restricted ops keys.
353
+
354
+ **Use case:** Escalate work that can't land in code (a product decision, a credential only a human has, a resource only a human may edit), deduped so repeats don't spam the bell.
355
+ tags:
356
+ - Ops
357
+ parameters:
358
+ - $ref: ../components/parameters.yaml#/ProjectId
359
+ requestBody:
360
+ required: true
361
+ content:
362
+ application/json:
363
+ schema:
364
+ $ref: ../components/schemas/ops.yaml#/NotifyOpsRequest
365
+ example:
366
+ title: "Alert rule @alert:checkout-error-rate needs a human edit for #42"
367
+ summary: "#42 is a false positive — the rule fires on the expected nightly batch spike, and rule definitions can only be edited by a human."
368
+ steps:
369
+ - "Open @alert:checkout-error-rate in the dashboard alerts page."
370
+ - "Raise the threshold from `2%` to `5%` and widen the window to `1h`."
371
+ - "Re-run the shipeasy-ops-work loop — #42 will be acknowledged."
372
+ dedupeKey: feedback:42
373
+ href: /dashboard/prj_0abc/bugs/42
374
+ responses:
375
+ "201":
376
+ description: Raise an attention notification
377
+ content:
378
+ application/json:
379
+ schema:
380
+ $ref: ../components/schemas/ops.yaml#/NotifyOpsResponse
381
+ example:
382
+ dedupeKey: error:checkout:5xx
383
+ dispatched: true
384
+ "400":
385
+ $ref: ../components/responses.yaml#/BadRequest
386
+ "401":
387
+ $ref: ../components/responses.yaml#/Unauthorized
388
+ "403":
389
+ $ref: ../components/responses.yaml#/Forbidden
390
+ "404":
391
+ $ref: ../components/responses.yaml#/NotFound
392
+ "409":
393
+ $ref: ../components/responses.yaml#/Conflict
394
+ "422":
395
+ $ref: ../components/responses.yaml#/UnprocessableEntity
396
+ x-error-codes:
397
+ - BAD_REQUEST
398
+ - UNAUTHORIZED
399
+ - FORBIDDEN
400
+ - VALIDATION
401
+ x-cli:
402
+ name: notify
403
+ /api/admin/slack/channels:
404
+ get:
405
+ operationId: listSlackChannels
406
+ summary: List Slack channels
407
+ description: |-
408
+ List the project's connected Slack channels — used to resolve an alert rule's notification target.
409
+
410
+ **Use case:** Populate a channel picker, or validate an alert rule's `--slack-channel` before saving.
411
+ tags:
412
+ - Alerts
413
+ parameters:
414
+ - $ref: ../components/parameters.yaml#/ProjectId
415
+ responses:
416
+ "200":
417
+ description: List Slack channels
418
+ content:
419
+ application/json:
420
+ schema:
421
+ $ref: ../components/schemas/ops.yaml#/ListSlackChannelsResponse
422
+ example:
423
+ connected: true
424
+ channels:
425
+ - id: C0123
426
+ name: alerts
427
+ - id: C0456
428
+ name: general
429
+ "400":
430
+ $ref: ../components/responses.yaml#/BadRequest
431
+ "401":
432
+ $ref: ../components/responses.yaml#/Unauthorized
433
+ "403":
434
+ $ref: ../components/responses.yaml#/Forbidden
435
+ "404":
436
+ $ref: ../components/responses.yaml#/NotFound
437
+ "409":
438
+ $ref: ../components/responses.yaml#/Conflict
439
+ "422":
440
+ $ref: ../components/responses.yaml#/UnprocessableEntity
441
+ x-error-codes:
442
+ - BAD_REQUEST
443
+ - UNAUTHORIZED
444
+ - FORBIDDEN
445
+ x-cli:
446
+ name: channels
@@ -0,0 +1,210 @@
1
+ /api/admin/projects/current:
2
+ get:
3
+ operationId: getCurrentProject
4
+ summary: Show the current project
5
+ description: |-
6
+ Returns the project the caller's auth header resolves to — plan, status, billing, and which modules are enabled. The server reads the project from the credential, so there is no id parameter. Powers `whoami`.
7
+
8
+ **Use case:** Resolve who you are — the project, plan, and enabled modules tied to the current credential — without passing an id. Backs a registry-driven `whoami`.
9
+ tags:
10
+ - Projects
11
+ parameters:
12
+ - $ref: ../components/parameters.yaml#/ProjectId
13
+ responses:
14
+ "200":
15
+ description: Show the current project
16
+ content:
17
+ application/json:
18
+ schema:
19
+ $ref: ../components/schemas/projects.yaml#/GetCurrentProjectResponse
20
+ example:
21
+ id: f81d4fae-7dec-11d0-a765-00a0c91e6bf6
22
+ name: Acme
23
+ domain: acme.com
24
+ ownerEmail: owner@acme.com
25
+ plan: paid
26
+ status: active
27
+ subscriptionStatus: active
28
+ billingInterval: monthly
29
+ currentPeriodEnd: 2026-07-12T00:00:00.000Z
30
+ trialEndsAt: null
31
+ cancelAtPeriodEnd: 0
32
+ moduleTranslations: true
33
+ moduleConfigs: true
34
+ moduleGates: true
35
+ moduleExperiments: true
36
+ moduleFeedback: true
37
+ createdAt: 2026-04-12T10:14:08.000Z
38
+ updatedAt: 2026-06-12T08:01:55.000Z
39
+ "400":
40
+ $ref: ../components/responses.yaml#/BadRequest
41
+ "401":
42
+ $ref: ../components/responses.yaml#/Unauthorized
43
+ "403":
44
+ $ref: ../components/responses.yaml#/Forbidden
45
+ "404":
46
+ $ref: ../components/responses.yaml#/NotFound
47
+ "409":
48
+ $ref: ../components/responses.yaml#/Conflict
49
+ "422":
50
+ $ref: ../components/responses.yaml#/UnprocessableEntity
51
+ x-error-codes:
52
+ - BAD_REQUEST
53
+ - UNAUTHORIZED
54
+ - FORBIDDEN
55
+ x-cli:
56
+ name: current
57
+ # Also surface this op as a top-level `whoami` command (CLI) / `whoami`
58
+ # tool (MCP) — the canonical identity lookup. The CLI/MCP generators emit
59
+ # an extra top-level entry that dispatches to the same operation.
60
+ topLevelAlias: whoami
61
+ /api/admin/projects/upsert:
62
+ post:
63
+ operationId: upsertProject
64
+ summary: Find-or-create a project by domain
65
+ description: |-
66
+ Find-or-creates a project keyed by `(owner_email, domain)` under the session's owner, and returns it. Idempotent: a second call with the same domain returns the existing project with `created: false`.
67
+
68
+ Only `domain` is required — `name` defaults to the domain on first create. Recording the result in a local `.shipeasy` binding is a consumer side-effect; this endpoint never performs it.
69
+
70
+ **Use cases**
71
+
72
+ - **Install flow** — provision a per-app project without a trip to the dashboard. Run it on every install; the idempotent key means a re-run returns the existing project rather than duplicating it.
73
+ - **Name explicitly** — pass `name` to label the project distinctly from its `domain`.
74
+ tags:
75
+ - Projects
76
+ parameters:
77
+ - $ref: ../components/parameters.yaml#/ProjectId
78
+ requestBody:
79
+ required: true
80
+ content:
81
+ application/json:
82
+ schema:
83
+ $ref: ../components/schemas/projects.yaml#/UpsertProjectRequest
84
+ examples:
85
+ minimal:
86
+ summary: Minimal — domain only
87
+ description: Smallest valid body. Names the project after the domain on first create.
88
+ value:
89
+ domain: acme.com
90
+ named:
91
+ summary: Named project
92
+ description: Supply a human-readable `name` distinct from the domain.
93
+ value:
94
+ domain: shouks.app
95
+ name: Shouks
96
+ responses:
97
+ "200":
98
+ description: Find-or-create a project by domain
99
+ content:
100
+ application/json:
101
+ schema:
102
+ $ref: ../components/schemas/projects.yaml#/UpsertProjectResponse
103
+ example:
104
+ id: f81d4fae-7dec-11d0-a765-00a0c91e6bf6
105
+ name: Acme
106
+ domain: acme.com
107
+ owner_email: owner@acme.com
108
+ created: true
109
+ "400":
110
+ $ref: ../components/responses.yaml#/BadRequest
111
+ "401":
112
+ $ref: ../components/responses.yaml#/Unauthorized
113
+ "403":
114
+ $ref: ../components/responses.yaml#/Forbidden
115
+ "404":
116
+ $ref: ../components/responses.yaml#/NotFound
117
+ "409":
118
+ $ref: ../components/responses.yaml#/Conflict
119
+ "422":
120
+ $ref: ../components/responses.yaml#/UnprocessableEntity
121
+ x-error-codes:
122
+ - BAD_REQUEST
123
+ - UNAUTHORIZED
124
+ - FORBIDDEN
125
+ - VALIDATION
126
+ x-cli:
127
+ name: upsert
128
+ /api/admin/projects/{id}:
129
+ patch:
130
+ operationId: updateProject
131
+ summary: Update the current project
132
+ description: |-
133
+ Update the current project's settings — name, domain, slug, default environment, timezone, experiment-analysis knobs (statistical method, significance threshold, auto-rollback, minimum sample days), and the per-module enable flags. Partial: only the fields you send change.
134
+
135
+ The project id in the path must match the project the caller's credential resolves to (a credential can only edit its own project). Changing `domain` re-stamps the allowed origin into every live SDK key.
136
+
137
+ **Use case:** Rename a project, move its domain, toggle a module on/off, or tune the experiment-analysis defaults without leaving the CLI.
138
+ tags:
139
+ - Projects
140
+ parameters:
141
+ - $ref: ../components/parameters.yaml#/ProjectId
142
+ - name: id
143
+ in: path
144
+ required: true
145
+ description: Stable opaque project id. Must match the caller's own project.
146
+ schema:
147
+ type: string
148
+ requestBody:
149
+ required: true
150
+ content:
151
+ application/json:
152
+ schema:
153
+ $ref: ../components/schemas/projects.yaml#/UpdateProjectRequest
154
+ examples:
155
+ rename:
156
+ summary: Rename the project
157
+ value:
158
+ name: Acme Rockets
159
+ toggleModule:
160
+ summary: Turn a module off
161
+ value:
162
+ moduleExperiments: false
163
+ responses:
164
+ "200":
165
+ description: The updated project.
166
+ content:
167
+ application/json:
168
+ schema:
169
+ $ref: ../components/schemas/projects.yaml#/GetCurrentProjectResponse
170
+ example:
171
+ id: f81d4fae-7dec-11d0-a765-00a0c91e6bf6
172
+ name: Acme Rockets
173
+ domain: acme.com
174
+ ownerEmail: owner@acme.com
175
+ plan: paid
176
+ status: active
177
+ subscriptionStatus: active
178
+ billingInterval: monthly
179
+ currentPeriodEnd: 2026-07-12T00:00:00.000Z
180
+ trialEndsAt: null
181
+ cancelAtPeriodEnd: 0
182
+ moduleTranslations: true
183
+ moduleConfigs: true
184
+ moduleGates: true
185
+ moduleExperiments: false
186
+ moduleFeedback: true
187
+ createdAt: 2026-04-12T10:14:08.000Z
188
+ updatedAt: 2026-06-12T08:01:55.000Z
189
+ "400":
190
+ $ref: ../components/responses.yaml#/BadRequest
191
+ "401":
192
+ $ref: ../components/responses.yaml#/Unauthorized
193
+ "403":
194
+ $ref: ../components/responses.yaml#/Forbidden
195
+ "404":
196
+ $ref: ../components/responses.yaml#/NotFound
197
+ "409":
198
+ $ref: ../components/responses.yaml#/Conflict
199
+ "422":
200
+ $ref: ../components/responses.yaml#/UnprocessableEntity
201
+ x-error-codes:
202
+ - BAD_REQUEST
203
+ - UNAUTHORIZED
204
+ - FORBIDDEN
205
+ - NOT_FOUND
206
+ - VALIDATION
207
+ x-cli:
208
+ name: update
209
+ positional:
210
+ - id