@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,382 @@
1
+ /api/admin/errors:
2
+ get:
3
+ operationId: listErrors
4
+ summary: List tracked errors
5
+ description: |-
6
+ Returns a single page of tracked production errors as a **bare JSON array** (no pagination envelope), ordered by `lastSeenAt desc`. Filter with `status`, free-text-search with `q`, and cap the page with `limit`.
7
+
8
+ Tracked errors are never filed by hand — an ingestion path (worker log drain / the `see()` SDK reporter) folds each occurrence into a row keyed by `fingerprint`, bumping `count` and `lastSeenAt`. This surface only reads them and (via PATCH) flips their `status`.
9
+
10
+ **Use case:** Snapshot the project's open issues for a triage dashboard, or drive a CI gate that fails the build when any `open` error of `kind: uncaught` exists in `prod`.
11
+ tags:
12
+ - Errors
13
+ parameters:
14
+ - $ref: ../components/parameters.yaml#/ProjectId
15
+ - name: status
16
+ in: query
17
+ required: false
18
+ description: Filter by triage state. `all` (the default) returns every status.
19
+ schema:
20
+ type: string
21
+ enum:
22
+ - open
23
+ - resolved
24
+ - ignored
25
+ - all
26
+ default: all
27
+ - name: q
28
+ in: query
29
+ required: false
30
+ description: Case-insensitive substring match against `message`, `errorType`, and `subject`.
31
+ schema:
32
+ type: string
33
+ maxLength: 200
34
+ - name: limit
35
+ in: query
36
+ required: false
37
+ description: Maximum number of rows to return (1–500). Defaults to 200.
38
+ schema:
39
+ type: integer
40
+ minimum: 1
41
+ maximum: 500
42
+ default: 200
43
+ responses:
44
+ "200":
45
+ description: List tracked errors
46
+ content:
47
+ application/json:
48
+ schema:
49
+ $ref: ../components/schemas/errors-api.yaml#/ListErrorsResponse
50
+ example:
51
+ - id: err_01j7w7m9q4hxbf6npe6s9zr3vc
52
+ projectId: e976b15e-2f0d-4c6e-9b1a-3a7c1f2d8e90
53
+ fingerprint: 9c1f4f1f2c0c4a5fa1c2b6d3e7c8e3a1
54
+ causedByFingerprint: null
55
+ message: Cannot read properties of undefined (reading 'id')
56
+ errorType: TypeError
57
+ stack: |-
58
+ TypeError: Cannot read properties of undefined (reading 'id')
59
+ at GateEditor (/app/gates/[id]/page.tsx:42:18)
60
+ source: shipeasy
61
+ url: https://app.example.com/dashboard/gat_01j7/edit
62
+ seenUrls: '["https://app.example.com/dashboard/#/edit"]'
63
+ subject: gate editor
64
+ outcome: crash on load
65
+ side: client
66
+ env: prod
67
+ kind: uncaught
68
+ lastExtrasJson: '{"gateId":"gat_01j7"}'
69
+ sdkVersion: 6.0.0
70
+ count: 137
71
+ status: open
72
+ firstSeenAt: 2026-06-20T08:11:02.000Z
73
+ lastSeenAt: 2026-06-28T14:55:31.000Z
74
+ createdAt: 2026-06-20T08:11:02.000Z
75
+ updatedAt: 2026-06-28T14:55:31.000Z
76
+ "400":
77
+ $ref: ../components/responses.yaml#/BadRequest
78
+ "401":
79
+ $ref: ../components/responses.yaml#/Unauthorized
80
+ "403":
81
+ $ref: ../components/responses.yaml#/Forbidden
82
+ "404":
83
+ $ref: ../components/responses.yaml#/NotFound
84
+ "409":
85
+ $ref: ../components/responses.yaml#/Conflict
86
+ "422":
87
+ $ref: ../components/responses.yaml#/UnprocessableEntity
88
+ x-error-codes:
89
+ - BAD_REQUEST
90
+ - UNAUTHORIZED
91
+ - FORBIDDEN
92
+ x-cli:
93
+ name: list
94
+ /api/admin/errors/{id}:
95
+ get:
96
+ operationId: getError
97
+ summary: Get a tracked error
98
+ description: |-
99
+ Returns a single tracked error by its id, including the latest occurrence's stack, extras, and consequence. Returns `404` if no such error exists in the project.
100
+
101
+ **Use case:** Drill into one issue — fetch its full stack and `seenUrls` to investigate, or to render the detail panel behind a row in the errors list.
102
+ tags:
103
+ - Errors
104
+ parameters:
105
+ - $ref: ../components/parameters.yaml#/ProjectId
106
+ - name: id
107
+ in: path
108
+ required: true
109
+ description: Stable opaque error id (`err_…`).
110
+ schema:
111
+ type: string
112
+ responses:
113
+ "200":
114
+ description: Get a tracked error
115
+ content:
116
+ application/json:
117
+ schema:
118
+ $ref: ../components/schemas/errors-api.yaml#/ErrorRecord
119
+ example:
120
+ id: err_01j7w7m9q4hxbf6npe6s9zr3vc
121
+ projectId: e976b15e-2f0d-4c6e-9b1a-3a7c1f2d8e90
122
+ fingerprint: 9c1f4f1f2c0c4a5fa1c2b6d3e7c8e3a1
123
+ causedByFingerprint: null
124
+ message: Cannot read properties of undefined (reading 'id')
125
+ errorType: TypeError
126
+ stack: |-
127
+ TypeError: Cannot read properties of undefined (reading 'id')
128
+ at GateEditor (/app/gates/[id]/page.tsx:42:18)
129
+ source: shipeasy
130
+ url: https://app.example.com/dashboard/gat_01j7/edit
131
+ seenUrls: '["https://app.example.com/dashboard/#/edit"]'
132
+ subject: gate editor
133
+ outcome: crash on load
134
+ side: client
135
+ env: prod
136
+ kind: uncaught
137
+ lastExtrasJson: '{"gateId":"gat_01j7"}'
138
+ sdkVersion: 6.0.0
139
+ count: 137
140
+ status: open
141
+ firstSeenAt: 2026-06-20T08:11:02.000Z
142
+ lastSeenAt: 2026-06-28T14:55:31.000Z
143
+ createdAt: 2026-06-20T08:11:02.000Z
144
+ updatedAt: 2026-06-28T14:55:31.000Z
145
+ "400":
146
+ $ref: ../components/responses.yaml#/BadRequest
147
+ "401":
148
+ $ref: ../components/responses.yaml#/Unauthorized
149
+ "403":
150
+ $ref: ../components/responses.yaml#/Forbidden
151
+ "404":
152
+ $ref: ../components/responses.yaml#/NotFound
153
+ "409":
154
+ $ref: ../components/responses.yaml#/Conflict
155
+ "422":
156
+ $ref: ../components/responses.yaml#/UnprocessableEntity
157
+ x-error-codes:
158
+ - UNAUTHORIZED
159
+ - FORBIDDEN
160
+ - NOT_FOUND
161
+ x-cli:
162
+ name: get
163
+ positional:
164
+ - id
165
+ patch:
166
+ operationId: updateErrorStatus
167
+ summary: Update a tracked error's status
168
+ description: |-
169
+ Flips the triage state of one error — the only mutation this surface allows. Valid transitions are between `open`, `resolved`, and `ignored`; the body must carry exactly `{ "status": … }`.
170
+
171
+ A `resolved` error reopens automatically (ingestion-side) if it recurs; `ignored` is sticky until flipped back here. Returns the updated row.
172
+
173
+ **Use cases**
174
+
175
+ - **Triage** — `{ "status": "ignored" }` to suppress a known-benign issue from the open list.
176
+ - **Close out** — `{ "status": "resolved" }` once the fix lands; it reopens on its own if the error recurs.
177
+ tags:
178
+ - Errors
179
+ parameters:
180
+ - $ref: ../components/parameters.yaml#/ProjectId
181
+ - name: id
182
+ in: path
183
+ required: true
184
+ description: Stable opaque error id (`err_…`).
185
+ schema:
186
+ type: string
187
+ requestBody:
188
+ required: true
189
+ content:
190
+ application/json:
191
+ schema:
192
+ $ref: ../components/schemas/errors-api.yaml#/UpdateErrorStatusRequest
193
+ examples:
194
+ resolve:
195
+ summary: Mark resolved
196
+ description: Close the error once the fix is deployed. It reopens automatically if it recurs.
197
+ value:
198
+ status: resolved
199
+ ignore:
200
+ summary: Ignore a benign issue
201
+ description: Suppress a known-benign error from the open list. Sticky until flipped back.
202
+ value:
203
+ status: ignored
204
+ responses:
205
+ "200":
206
+ description: Update a tracked error's status
207
+ content:
208
+ application/json:
209
+ schema:
210
+ $ref: ../components/schemas/errors-api.yaml#/ErrorRecord
211
+ example:
212
+ id: err_01j7w7m9q4hxbf6npe6s9zr3vc
213
+ projectId: e976b15e-2f0d-4c6e-9b1a-3a7c1f2d8e90
214
+ fingerprint: 9c1f4f1f2c0c4a5fa1c2b6d3e7c8e3a1
215
+ causedByFingerprint: null
216
+ message: Cannot read properties of undefined (reading 'id')
217
+ errorType: TypeError
218
+ stack: null
219
+ source: shipeasy
220
+ url: https://app.example.com/dashboard/gat_01j7/edit
221
+ seenUrls: null
222
+ subject: gate editor
223
+ outcome: crash on load
224
+ side: client
225
+ env: prod
226
+ kind: uncaught
227
+ lastExtrasJson: null
228
+ sdkVersion: 6.0.0
229
+ count: 137
230
+ status: resolved
231
+ firstSeenAt: 2026-06-20T08:11:02.000Z
232
+ lastSeenAt: 2026-06-28T14:55:31.000Z
233
+ createdAt: 2026-06-20T08:11:02.000Z
234
+ updatedAt: 2026-06-28T15:02:10.000Z
235
+ "400":
236
+ $ref: ../components/responses.yaml#/BadRequest
237
+ "401":
238
+ $ref: ../components/responses.yaml#/Unauthorized
239
+ "403":
240
+ $ref: ../components/responses.yaml#/Forbidden
241
+ "404":
242
+ $ref: ../components/responses.yaml#/NotFound
243
+ "409":
244
+ $ref: ../components/responses.yaml#/Conflict
245
+ "422":
246
+ $ref: ../components/responses.yaml#/UnprocessableEntity
247
+ x-error-codes:
248
+ - UNAUTHORIZED
249
+ - FORBIDDEN
250
+ - NOT_FOUND
251
+ - VALIDATION
252
+ x-cli:
253
+ name: update
254
+ positional:
255
+ - id
256
+ /api/admin/errors/{id}/file:
257
+ post:
258
+ operationId: fileErrorTicket
259
+ summary: File a feedback ticket for an error
260
+ description: |-
261
+ Files a feedback ticket (`type: "error"`) for a tracked production error — the "File an issue" action on the errors dashboard. The ticket carries the error's fingerprint as its `sourceRef` so it dedupes against, and joins back to, the tracked error. Takes no body.
262
+
263
+ Idempotent: if an open `error` ticket already tracks this fingerprint (hand- or auto-filed), that existing ticket is returned instead of creating a duplicate. Returns `404` if the error does not exist.
264
+
265
+ **Use case:** Promote a noisy tracked error into an actionable ticket in the ops queue (the same item the worker auto-files once an error crosses its occurrence threshold), so it can be triaged, assigned, and burned down via the `shipeasy-ops-work` skill.
266
+ tags:
267
+ - Errors
268
+ parameters:
269
+ - $ref: ../components/parameters.yaml#/ProjectId
270
+ - name: id
271
+ in: path
272
+ required: true
273
+ description: Stable opaque error id (`err_…`).
274
+ schema:
275
+ type: string
276
+ responses:
277
+ "201":
278
+ description: File a feedback ticket for an error
279
+ content:
280
+ application/json:
281
+ schema:
282
+ $ref: ../components/schemas/errors-api.yaml#/FileErrorTicketResponse
283
+ example:
284
+ id: 3f2a9b1c-7d4e-4a8f-9c2b-1e5d6f7a8b90
285
+ number: 42
286
+ "400":
287
+ $ref: ../components/responses.yaml#/BadRequest
288
+ "401":
289
+ $ref: ../components/responses.yaml#/Unauthorized
290
+ "403":
291
+ $ref: ../components/responses.yaml#/Forbidden
292
+ "404":
293
+ $ref: ../components/responses.yaml#/NotFound
294
+ "409":
295
+ $ref: ../components/responses.yaml#/Conflict
296
+ "422":
297
+ $ref: ../components/responses.yaml#/UnprocessableEntity
298
+ x-error-codes:
299
+ - UNAUTHORIZED
300
+ - FORBIDDEN
301
+ - NOT_FOUND
302
+ x-cli:
303
+ name: file
304
+ positional:
305
+ - id
306
+ /api/admin/errors/{id}/series:
307
+ post:
308
+ operationId: getErrorSeries
309
+ summary: Get an error's occurrence series
310
+ description: |-
311
+ Returns a bucketed occurrence timeseries for one tracked error (by its fingerprint), read from the `shipeasy_errors` Analytics Engine dataset (near-real-time; ingest lag is seconds). The window bounds are epoch **seconds**; `to` must be strictly greater than `from`. The response echoes the SQL that produced the rows.
312
+
313
+ **Use case:** Render the trend sparkline / occurrence chart on the error detail panel, or pull the raw bucketed counts to alert when an issue's rate spikes.
314
+ tags:
315
+ - Errors
316
+ parameters:
317
+ - $ref: ../components/parameters.yaml#/ProjectId
318
+ - name: id
319
+ in: path
320
+ required: true
321
+ description: Stable opaque error id (`err_…`).
322
+ schema:
323
+ type: string
324
+ requestBody:
325
+ required: true
326
+ content:
327
+ application/json:
328
+ schema:
329
+ $ref: ../components/schemas/errors-api.yaml#/ErrorSeriesRequest
330
+ examples:
331
+ lastDayHourly:
332
+ summary: Last 24h, hourly buckets
333
+ description: Hourly occurrence counts over a one-day window (bounds in epoch seconds).
334
+ value:
335
+ from: 1751000400
336
+ to: 1751086800
337
+ bucket: 3600
338
+ responses:
339
+ "200":
340
+ description: Get an error's occurrence series
341
+ content:
342
+ application/json:
343
+ schema:
344
+ $ref: ../components/schemas/errors-api.yaml#/ErrorSeriesResponse
345
+ example:
346
+ sql: |-
347
+ SELECT intDiv(toUInt32(double2), 3600) * 3600 AS t,
348
+ sum(double1 * _sample_interval) AS v
349
+ FROM shipeasy_errors
350
+ WHERE index1 = 'e976b15e-2f0d-4c6e-9b1a-3a7c1f2d8e90'
351
+ AND blob1 = '9c1f4f1f2c0c4a5fa1c2b6d3e7c8e3a1'
352
+ AND double2 >= 1751000400 AND double2 < 1751086800
353
+ GROUP BY t
354
+ ORDER BY t
355
+ rows:
356
+ - t: 1751000400
357
+ v: 12
358
+ - t: 1751004000
359
+ v: 31
360
+ - t: 1751007600
361
+ v: 27
362
+ "400":
363
+ $ref: ../components/responses.yaml#/BadRequest
364
+ "401":
365
+ $ref: ../components/responses.yaml#/Unauthorized
366
+ "403":
367
+ $ref: ../components/responses.yaml#/Forbidden
368
+ "404":
369
+ $ref: ../components/responses.yaml#/NotFound
370
+ "409":
371
+ $ref: ../components/responses.yaml#/Conflict
372
+ "422":
373
+ $ref: ../components/responses.yaml#/UnprocessableEntity
374
+ x-error-codes:
375
+ - BAD_REQUEST
376
+ - UNAUTHORIZED
377
+ - FORBIDDEN
378
+ - NOT_FOUND
379
+ x-cli:
380
+ name: series
381
+ positional:
382
+ - id