@shipeasy/openapi 1.5.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 (101) 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 -17
  14. package/dist/index.js +253 -2458
  15. package/dist/index.js.map +1 -0
  16. package/dist/node-context.d.ts +85 -0
  17. package/dist/node-context.js +110 -0
  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 +37 -21
  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/resources/alert-rules.d.ts +0 -50
  65. package/dist/resources/alert-rules.js +0 -75
  66. package/dist/resources/configs.d.ts +0 -681
  67. package/dist/resources/configs.js +0 -509
  68. package/dist/resources/experiments.d.ts +0 -849
  69. package/dist/resources/experiments.js +0 -707
  70. package/dist/resources/gates.d.ts +0 -808
  71. package/dist/resources/gates.js +0 -522
  72. package/dist/resources/index.d.ts +0 -2749
  73. package/dist/resources/index.js +0 -2391
  74. package/dist/resources/killswitches.d.ts +0 -436
  75. package/dist/resources/killswitches.js +0 -514
  76. package/dist/resources/universes.d.ts +0 -185
  77. package/dist/resources/universes.js +0 -234
  78. package/dist/schemas/alert-rules.d.ts +0 -65
  79. package/dist/schemas/alert-rules.js +0 -37
  80. package/dist/schemas/configs.d.ts +0 -154
  81. package/dist/schemas/configs.js +0 -134
  82. package/dist/schemas/constants.d.ts +0 -6
  83. package/dist/schemas/constants.js +0 -7
  84. package/dist/schemas/experiments.d.ts +0 -229
  85. package/dist/schemas/experiments.js +0 -221
  86. package/dist/schemas/folder.d.ts +0 -10
  87. package/dist/schemas/folder.js +0 -8
  88. package/dist/schemas/gates.d.ts +0 -386
  89. package/dist/schemas/gates.js +0 -190
  90. package/dist/schemas/index.d.ts +0 -11
  91. package/dist/schemas/index.js +0 -762
  92. package/dist/schemas/killswitches.d.ts +0 -110
  93. package/dist/schemas/killswitches.js +0 -226
  94. package/dist/schemas/metric-name.d.ts +0 -5
  95. package/dist/schemas/metric-name.js +0 -6
  96. package/dist/schemas/pagination.d.ts +0 -37
  97. package/dist/schemas/pagination.js +0 -44
  98. package/dist/schemas/universes.d.ts +0 -35
  99. package/dist/schemas/universes.js +0 -55
  100. package/dist/transport.d.ts +0 -30
  101. package/dist/transport.js +0 -44
@@ -0,0 +1,366 @@
1
+ /api/admin/events:
2
+ get:
3
+ operationId: listEvents
4
+ summary: List events
5
+ description: |-
6
+ Returns every catalogued event in the project, including pending auto-discovered names. Each row carries its own `pending` flag, so the unapproved queue can be filtered client-side.
7
+
8
+ **Use case:** Snapshot the event catalog — for example to review the pending auto-discovery queue before approving names, or to confirm which events your metrics can reference.
9
+ tags:
10
+ - Events
11
+ parameters:
12
+ - $ref: ../components/parameters.yaml#/ProjectId
13
+ responses:
14
+ "200":
15
+ description: List events
16
+ content:
17
+ application/json:
18
+ schema:
19
+ $ref: ../components/schemas/events.yaml#/ListEventsResponse
20
+ example:
21
+ - id: evt_01j7w8a1b2c3d4e5f6g7h8i9j0
22
+ name: checkout_completed
23
+ folder: checkout
24
+ description: Fired when a customer finishes checkout.
25
+ properties:
26
+ - name: amount
27
+ type: number
28
+ required: true
29
+ description: ""
30
+ pending: 0
31
+ createdAt: 2026-04-12T10:14:08.000Z
32
+ "400":
33
+ $ref: ../components/responses.yaml#/BadRequest
34
+ "401":
35
+ $ref: ../components/responses.yaml#/Unauthorized
36
+ "403":
37
+ $ref: ../components/responses.yaml#/Forbidden
38
+ "404":
39
+ $ref: ../components/responses.yaml#/NotFound
40
+ "409":
41
+ $ref: ../components/responses.yaml#/Conflict
42
+ "422":
43
+ $ref: ../components/responses.yaml#/UnprocessableEntity
44
+ x-error-codes:
45
+ - BAD_REQUEST
46
+ - UNAUTHORIZED
47
+ - FORBIDDEN
48
+ x-cli:
49
+ name: list
50
+ post:
51
+ operationId: createEvent
52
+ summary: Register an event
53
+ description: |-
54
+ Registers a new event name and (optionally) its typed properties. Only `name` is required.
55
+
56
+ If the name matches an existing **pending** (auto-discovered) row, this approves that row instead of returning a conflict. Otherwise an already-registered name returns `409`.
57
+
58
+ **Use cases**
59
+
60
+ - **Register a known event** — `{ "name": "checkout_completed" }` so metrics can reference it.
61
+ - **Declare typed properties** — supply `properties` to document the event's payload shape.
62
+ tags:
63
+ - Events
64
+ parameters:
65
+ - $ref: ../components/parameters.yaml#/ProjectId
66
+ requestBody:
67
+ required: true
68
+ content:
69
+ application/json:
70
+ schema:
71
+ $ref: ../components/schemas/events.yaml#/CreateEventRequest
72
+ examples:
73
+ minimal:
74
+ summary: Minimal — name only
75
+ description: Smallest valid body. Registers the event with no properties.
76
+ value:
77
+ name: checkout_completed
78
+ withProperty:
79
+ summary: With a typed, required property
80
+ description: Declare a required numeric `amount` property and file it under `checkout`.
81
+ value:
82
+ name: purchase
83
+ folder: checkout
84
+ properties:
85
+ - name: amount
86
+ type: number
87
+ required: true
88
+ responses:
89
+ "201":
90
+ description: Register an event
91
+ content:
92
+ application/json:
93
+ schema:
94
+ $ref: ../components/schemas/events.yaml#/CreateEventResponse
95
+ example:
96
+ id: evt_01j7w8a1b2c3d4e5f6g7h8i9j0
97
+ name: checkout_completed
98
+ "400":
99
+ $ref: ../components/responses.yaml#/BadRequest
100
+ "401":
101
+ $ref: ../components/responses.yaml#/Unauthorized
102
+ "403":
103
+ $ref: ../components/responses.yaml#/Forbidden
104
+ "404":
105
+ $ref: ../components/responses.yaml#/NotFound
106
+ "409":
107
+ $ref: ../components/responses.yaml#/Conflict
108
+ "422":
109
+ $ref: ../components/responses.yaml#/UnprocessableEntity
110
+ x-error-codes:
111
+ - BAD_REQUEST
112
+ - UNAUTHORIZED
113
+ - FORBIDDEN
114
+ - ALREADY_EXISTS
115
+ - VALIDATION
116
+ x-cli:
117
+ name: create
118
+ positional:
119
+ - name
120
+ /api/admin/events/{id}:
121
+ get:
122
+ operationId: getEvent
123
+ summary: Get an event
124
+ description: |-
125
+ Returns one event's full detail. Resolves by exact id, unique id-prefix, or exact (unique) name.
126
+
127
+ **Use case:** Inspect one event's declared properties and pending state by id or name.
128
+ tags:
129
+ - Events
130
+ parameters:
131
+ - $ref: ../components/parameters.yaml#/ProjectId
132
+ - name: id
133
+ in: path
134
+ required: true
135
+ description: Stable opaque event id (`evt_…`) or the event's `name`.
136
+ schema:
137
+ type: string
138
+ responses:
139
+ "200":
140
+ description: Get an event
141
+ content:
142
+ application/json:
143
+ schema:
144
+ $ref: ../components/schemas/events.yaml#/GetEventResponse
145
+ example:
146
+ id: evt_01j7w8a1b2c3d4e5f6g7h8i9j0
147
+ name: checkout_completed
148
+ folder: checkout
149
+ description: Fired when a customer finishes checkout.
150
+ properties:
151
+ - name: amount
152
+ type: number
153
+ required: true
154
+ description: ""
155
+ pending: 0
156
+ createdAt: 2026-04-12T10:14:08.000Z
157
+ "400":
158
+ $ref: ../components/responses.yaml#/BadRequest
159
+ "401":
160
+ $ref: ../components/responses.yaml#/Unauthorized
161
+ "403":
162
+ $ref: ../components/responses.yaml#/Forbidden
163
+ "404":
164
+ $ref: ../components/responses.yaml#/NotFound
165
+ "409":
166
+ $ref: ../components/responses.yaml#/Conflict
167
+ "422":
168
+ $ref: ../components/responses.yaml#/UnprocessableEntity
169
+ x-error-codes:
170
+ - BAD_REQUEST
171
+ - UNAUTHORIZED
172
+ - FORBIDDEN
173
+ - NOT_FOUND
174
+ x-cli:
175
+ name: get
176
+ positional:
177
+ - id
178
+ patch:
179
+ operationId: updateEvent
180
+ summary: Update an event
181
+ description: |-
182
+ Partial update of an event's folder, description, or properties. `name` is immutable.
183
+
184
+ `properties` replaces the full set (no merge) — omit it to leave properties unchanged.
185
+
186
+ **Use case:** Refile an event, update its description, or redeclare its typed properties.
187
+ tags:
188
+ - Events
189
+ parameters:
190
+ - $ref: ../components/parameters.yaml#/ProjectId
191
+ - name: id
192
+ in: path
193
+ required: true
194
+ description: Stable opaque event id (`evt_…`) or the event's `name`.
195
+ schema:
196
+ type: string
197
+ requestBody:
198
+ required: true
199
+ content:
200
+ application/json:
201
+ schema:
202
+ $ref: ../components/schemas/events.yaml#/UpdateEventRequest
203
+ examples:
204
+ refile:
205
+ summary: Move to a folder
206
+ description: File the event under `checkout`.
207
+ value:
208
+ folder: checkout
209
+ setProperties:
210
+ summary: Replace the property set
211
+ description: Overwrite the full property list (no merge).
212
+ value:
213
+ properties:
214
+ - name: amount
215
+ type: number
216
+ required: true
217
+ responses:
218
+ "200":
219
+ description: Update an event
220
+ content:
221
+ application/json:
222
+ schema:
223
+ $ref: ../components/schemas/events.yaml#/UpdateEventResponse
224
+ example:
225
+ id: evt_01j7w8a1b2c3d4e5f6g7h8i9j0
226
+ "400":
227
+ $ref: ../components/responses.yaml#/BadRequest
228
+ "401":
229
+ $ref: ../components/responses.yaml#/Unauthorized
230
+ "403":
231
+ $ref: ../components/responses.yaml#/Forbidden
232
+ "404":
233
+ $ref: ../components/responses.yaml#/NotFound
234
+ "409":
235
+ $ref: ../components/responses.yaml#/Conflict
236
+ "422":
237
+ $ref: ../components/responses.yaml#/UnprocessableEntity
238
+ x-error-codes:
239
+ - BAD_REQUEST
240
+ - UNAUTHORIZED
241
+ - FORBIDDEN
242
+ - NOT_FOUND
243
+ - VALIDATION
244
+ x-cli:
245
+ name: update
246
+ positional:
247
+ - id
248
+ delete:
249
+ operationId: deleteEvent
250
+ summary: Archive an event
251
+ description: |-
252
+ Soft-deletes (archives) the event. Returns `409` if any metric still references it — delete those metrics first.
253
+
254
+ **Use case:** Retire an event from the catalog once no metric depends on it.
255
+ tags:
256
+ - Events
257
+ parameters:
258
+ - $ref: ../components/parameters.yaml#/ProjectId
259
+ - name: id
260
+ in: path
261
+ required: true
262
+ description: Stable opaque event id (`evt_…`) or the event's `name`.
263
+ schema:
264
+ type: string
265
+ responses:
266
+ "200":
267
+ description: Archive an event
268
+ content:
269
+ application/json:
270
+ schema:
271
+ $ref: ../components/schemas/events.yaml#/DeleteEventResponse
272
+ example:
273
+ ok: true
274
+ "400":
275
+ $ref: ../components/responses.yaml#/BadRequest
276
+ "401":
277
+ $ref: ../components/responses.yaml#/Unauthorized
278
+ "403":
279
+ $ref: ../components/responses.yaml#/Forbidden
280
+ "404":
281
+ $ref: ../components/responses.yaml#/NotFound
282
+ "409":
283
+ $ref: ../components/responses.yaml#/Conflict
284
+ "422":
285
+ $ref: ../components/responses.yaml#/UnprocessableEntity
286
+ x-error-codes:
287
+ - BAD_REQUEST
288
+ - UNAUTHORIZED
289
+ - FORBIDDEN
290
+ - NOT_FOUND
291
+ - REFERENCED_IN_USE
292
+ x-cli:
293
+ name: archive
294
+ positional:
295
+ - id
296
+ /api/admin/events/{id}/approve:
297
+ post:
298
+ operationId: approveEvent
299
+ summary: Approve a pending event
300
+ description: |-
301
+ Promotes a pending (auto-discovered) event to usable so metrics can query it (`pending` → `0`).
302
+
303
+ You may optionally declare the event's folder, description, or properties in the same call — the body is the same shape as update, and may be empty.
304
+
305
+ **Use case:** Clear an auto-discovered event out of the pending queue so metrics defined on it start resolving.
306
+ tags:
307
+ - Events
308
+ parameters:
309
+ - $ref: ../components/parameters.yaml#/ProjectId
310
+ - name: id
311
+ in: path
312
+ required: true
313
+ description: Stable opaque event id (`evt_…`) or the event's `name`.
314
+ schema:
315
+ type: string
316
+ requestBody:
317
+ required: true
318
+ content:
319
+ application/json:
320
+ schema:
321
+ $ref: ../components/schemas/events.yaml#/ApproveEventRequest
322
+ examples:
323
+ bare:
324
+ summary: Approve as-is
325
+ description: Promote the pending event with no further changes.
326
+ value: {}
327
+ withProperties:
328
+ summary: Approve and declare properties
329
+ description: Promote the event and document its payload shape at the same time.
330
+ value:
331
+ folder: checkout
332
+ properties:
333
+ - name: amount
334
+ type: number
335
+ required: true
336
+ responses:
337
+ "200":
338
+ description: Approve a pending event
339
+ content:
340
+ application/json:
341
+ schema:
342
+ $ref: ../components/schemas/events.yaml#/ApproveEventResponse
343
+ example:
344
+ id: evt_01j7w8a1b2c3d4e5f6g7h8i9j0
345
+ "400":
346
+ $ref: ../components/responses.yaml#/BadRequest
347
+ "401":
348
+ $ref: ../components/responses.yaml#/Unauthorized
349
+ "403":
350
+ $ref: ../components/responses.yaml#/Forbidden
351
+ "404":
352
+ $ref: ../components/responses.yaml#/NotFound
353
+ "409":
354
+ $ref: ../components/responses.yaml#/Conflict
355
+ "422":
356
+ $ref: ../components/responses.yaml#/UnprocessableEntity
357
+ x-error-codes:
358
+ - BAD_REQUEST
359
+ - UNAUTHORIZED
360
+ - FORBIDDEN
361
+ - NOT_FOUND
362
+ - VALIDATION
363
+ x-cli:
364
+ name: approve
365
+ positional:
366
+ - id