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