@shipeasy/openapi 2.3.0 → 2.5.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 (46) hide show
  1. package/dist/{chunk-PRN4AEAM.js → chunk-DBTSD3W5.js} +1085 -261
  2. package/dist/chunk-DBTSD3W5.js.map +1 -0
  3. package/dist/{chunk-LYNWK55D.js → chunk-RDMD5XQT.js} +171 -1
  4. package/dist/chunk-RDMD5XQT.js.map +1 -0
  5. package/dist/{client-DO5HTb_L.d.ts → client-ObcuFHaV.d.ts} +5605 -2734
  6. package/dist/client.d.ts +1 -1
  7. package/dist/client.js +47 -1
  8. package/dist/custom.d.ts +9 -4
  9. package/dist/custom.js +57 -9
  10. package/dist/custom.js.map +1 -1
  11. package/dist/index.d.ts +2 -2
  12. package/dist/index.js +48 -2
  13. package/dist/index.js.map +1 -1
  14. package/dist/schemas.d.ts +3171 -485
  15. package/dist/schemas.js +229 -1
  16. package/openapi.json +13264 -8071
  17. package/openapi.yaml +5108 -1550
  18. package/package.json +1 -1
  19. package/spec/components/errors.yaml +3 -0
  20. package/spec/components/schemas/alerts.yaml +138 -0
  21. package/spec/components/schemas/attributes.yaml +53 -3
  22. package/spec/components/schemas/common.yaml +10 -0
  23. package/spec/components/schemas/configs.yaml +91 -3
  24. package/spec/components/schemas/connectors.yaml +5 -1
  25. package/spec/components/schemas/errors-api.yaml +51 -4
  26. package/spec/components/schemas/experiments.yaml +347 -87
  27. package/spec/components/schemas/gates.yaml +350 -277
  28. package/spec/components/schemas/i18n.yaml +169 -40
  29. package/spec/components/schemas/killswitches.yaml +36 -0
  30. package/spec/components/schemas/metrics.yaml +199 -7
  31. package/spec/components/schemas/ops.yaml +961 -29
  32. package/spec/components/schemas/projects.yaml +129 -3
  33. package/spec/openapi.yaml +58 -0
  34. package/spec/paths/alerts.yaml +184 -0
  35. package/spec/paths/attributes.yaml +23 -5
  36. package/spec/paths/configs.yaml +98 -21
  37. package/spec/paths/errors.yaml +16 -0
  38. package/spec/paths/experiments.yaml +236 -16
  39. package/spec/paths/gates.yaml +137 -0
  40. package/spec/paths/i18n.yaml +290 -6
  41. package/spec/paths/killswitches.yaml +6 -0
  42. package/spec/paths/metrics.yaml +186 -0
  43. package/spec/paths/ops.yaml +382 -0
  44. package/spec/paths/projects.yaml +60 -0
  45. package/dist/chunk-LYNWK55D.js.map +0 -1
  46. package/dist/chunk-PRN4AEAM.js.map +0 -1
@@ -23,8 +23,13 @@ ListI18nProfilesResponse:
23
23
  required:
24
24
  - id
25
25
  - name
26
+ - isDefault
27
+ - createdAt
28
+ - deletedAt
26
29
  additionalProperties: false
27
30
  description: One i18n locale profile.
31
+ DeleteI18nProfileResponse:
32
+ $ref: "./common.yaml#/OkResponse"
28
33
  CreateI18nProfileRequest:
29
34
  type: object
30
35
  properties:
@@ -84,9 +89,19 @@ ListI18nKeysResponse:
84
89
  profileId:
85
90
  description: Owning profile id.
86
91
  type: string
92
+ profileName:
93
+ description: Name of the owning profile (e.g. `en:prod`), or `null` when it cannot be resolved.
94
+ anyOf:
95
+ - type: string
96
+ - type: "null"
87
97
  chunkId:
88
98
  description: Owning chunk (authoring grouping) id.
89
99
  type: string
100
+ chunkName:
101
+ description: Name of the owning chunk (authoring grouping), or `null` when it cannot be resolved.
102
+ anyOf:
103
+ - type: string
104
+ - type: "null"
90
105
  updatedAt:
91
106
  description: ISO-8601 timestamp of the last edit.
92
107
  type: string
@@ -97,7 +112,15 @@ ListI18nKeysResponse:
97
112
  - id
98
113
  - key
99
114
  - value
100
- additionalProperties: {}
115
+ - description
116
+ - variables
117
+ - profileId
118
+ - profileName
119
+ - chunkId
120
+ - chunkName
121
+ - updatedAt
122
+ - updatedBy
123
+ additionalProperties: false
101
124
  description: One i18n key row.
102
125
  description: The page of matching keys.
103
126
  total:
@@ -217,47 +240,76 @@ UpdateI18nKeyResponse:
217
240
  - id
218
241
  additionalProperties: false
219
242
  description: Updated key id.
243
+ DeleteI18nKeyResponse:
244
+ $ref: "./common.yaml#/OkResponse"
245
+ UpsertI18nKeysRequest:
246
+ type: object
247
+ properties:
248
+ profile_id:
249
+ type: string
250
+ format: uuid
251
+ description: Target profile id to upsert keys into.
252
+ chunk:
253
+ description: Logical grouping the keys are filed under. Defaults to `default`.
254
+ type: string
255
+ minLength: 1
256
+ maxLength: 64
257
+ default: default
258
+ keys:
259
+ type: array
260
+ minItems: 1
261
+ maxItems: 5000
262
+ items:
263
+ type: object
264
+ properties:
265
+ key:
266
+ type: string
267
+ minLength: 1
268
+ maxLength: 256
269
+ description: Dotted key path, e.g. `home.cta`.
270
+ value:
271
+ type: string
272
+ description: Translated value for the key.
273
+ description:
274
+ type: string
275
+ description: Optional human note stored with the key.
276
+ variables:
277
+ type: array
278
+ maxItems: 32
279
+ items:
280
+ type: string
281
+ minLength: 1
282
+ maxLength: 64
283
+ description: Optional explicit list of `{{var}}` placeholder names in the value. Auto-derived from the value when omitted.
284
+ required:
285
+ - key
286
+ - value
287
+ additionalProperties: false
288
+ description: Keys to upsert. Existing keys ARE overwritten — this is the bulk overwrite path.
289
+ required:
290
+ - profile_id
291
+ - keys
292
+ additionalProperties: false
293
+ description: "Body for `PUT /api/admin/i18n/keys`. Bulk upsert (overwrite): existing keys are replaced, new ones inserted. Backs the devtools overlay's in-product label editing; deliberately not surfaced by the CLI or MCP."
294
+ UpsertI18nKeysResponse:
295
+ type: object
296
+ properties:
297
+ upserted:
298
+ type: number
299
+ description: Number of keys written (inserted or overwritten).
300
+ chunk:
301
+ type: string
302
+ description: The chunk the keys were filed under.
303
+ required:
304
+ - upserted
305
+ - chunk
306
+ additionalProperties: false
307
+ description: Result of a bulk key upsert. The affected profile's KV snapshot is rebuilt (and the CDN purged) before this returns.
220
308
  ListI18nDraftsResponse:
221
309
  type: array
222
310
  items:
223
- type: object
224
- properties:
225
- id:
226
- type: string
227
- description: Stable opaque draft id.
228
- name:
229
- description: Draft name, e.g. the target locale being staged.
230
- type: string
231
- profileId:
232
- description: Profile the draft targets.
233
- type: string
234
- sourceProfileId:
235
- description: Profile the draft was seeded from, or `null`.
236
- anyOf:
237
- - type: string
238
- - type: "null"
239
- status:
240
- description: Lifecycle state of the draft.
241
- type: string
242
- enum:
243
- - open
244
- - merged
245
- - abandoned
246
- createdBy:
247
- description: Actor email that created the draft.
248
- type: string
249
- createdAt:
250
- description: ISO-8601 timestamp of creation.
251
- type: string
252
- publishedAt:
253
- description: ISO-8601 merge/publish timestamp, or `null`.
254
- anyOf:
255
- - type: string
256
- - type: "null"
257
- required:
258
- - id
259
- additionalProperties: {}
260
- description: One staged translation draft.
311
+ $ref: "#/I18nDraft"
312
+ description: Bare array of the project's staged translation drafts.
261
313
  I18nDraft:
262
314
  type: object
263
315
  properties:
@@ -295,8 +347,15 @@ I18nDraft:
295
347
  description: ISO-8601 merge/publish timestamp, or `null`.
296
348
  required:
297
349
  - id
350
+ - name
351
+ - profileId
352
+ - sourceProfileId
353
+ - status
354
+ - createdBy
355
+ - createdAt
356
+ - publishedAt
298
357
  additionalProperties: {}
299
- description: One staged translation draft.
358
+ description: One staged translation draft. The shape is open — additional fields may be present.
300
359
  CreateI18nDraftRequest:
301
360
  type: object
302
361
  properties:
@@ -334,6 +393,76 @@ UpdateI18nDraftRequest:
334
393
  description: Body for `PATCH /api/admin/i18n/drafts/{draftId}`. Transitions the draft's lifecycle state.
335
394
  UpdateI18nDraftResponse:
336
395
  $ref: "#/I18nDraft"
396
+ DeleteI18nDraftResponse:
397
+ $ref: "./common.yaml#/OkResponse"
398
+ ListI18nDraftKeysResponse:
399
+ type: array
400
+ items:
401
+ type: object
402
+ properties:
403
+ id:
404
+ type: string
405
+ description: Stable opaque draft-key id.
406
+ draftId:
407
+ type: string
408
+ description: Id of the draft the key belongs to.
409
+ key:
410
+ type: string
411
+ description: Dotted key path, e.g. `home.cta`.
412
+ value:
413
+ type: string
414
+ description: Staged translated value for the key.
415
+ description:
416
+ description: Optional human note stored with the key, or `null`.
417
+ anyOf:
418
+ - type: string
419
+ - type: "null"
420
+ variables:
421
+ description: "`{{var}}` placeholder names in the value, or `null` when there are none."
422
+ anyOf:
423
+ - type: array
424
+ items:
425
+ type: string
426
+ - type: "null"
427
+ updatedBy:
428
+ type: string
429
+ description: Actor email that last edited the staged key.
430
+ updatedAt:
431
+ type: string
432
+ description: ISO-8601 timestamp of the last edit.
433
+ required:
434
+ - id
435
+ - draftId
436
+ - key
437
+ - value
438
+ - description
439
+ - variables
440
+ - updatedBy
441
+ - updatedAt
442
+ additionalProperties: false
443
+ description: One staged draft key.
444
+ description: Bare array of the draft's staged keys (no pagination envelope).
445
+ UpsertI18nDraftKeyRequest:
446
+ type: object
447
+ properties:
448
+ key:
449
+ type: string
450
+ minLength: 1
451
+ maxLength: 256
452
+ description: Dotted key path to stage, e.g. `home.cta`.
453
+ value:
454
+ type: string
455
+ description: Staged translated value for the key.
456
+ description:
457
+ type: string
458
+ description: Optional human note stored with the staged key.
459
+ required:
460
+ - key
461
+ - value
462
+ additionalProperties: false
463
+ description: "Body for `POST /api/admin/i18n/drafts/{draftId}/keys`. Upserts one staged key into an open draft — inserted when new, overwritten when it already exists. `{{var}}` placeholder names are auto-derived from the value."
464
+ UpsertI18nDraftKeyResponse:
465
+ $ref: "./common.yaml#/OkResponse"
337
466
  PublishI18nProfileRequest:
338
467
  type: object
339
468
  properties:
@@ -18,6 +18,21 @@ ListKillswitchesResponse:
18
18
  - type: string
19
19
  - type: "null"
20
20
  description: Free-form description or `null`.
21
+ folder:
22
+ description: Folder segment used for dashboard organisation, or `null` when the killswitch lives at the root.
23
+ anyOf:
24
+ - type: string
25
+ - type: "null"
26
+ creatorEmail:
27
+ description: Resolved email of the creator (`created_by` → `users.email`), or `null` when unknown.
28
+ anyOf:
29
+ - type: string
30
+ - type: "null"
31
+ createdAt:
32
+ description: ISO-8601 creation timestamp, or `null` on legacy rows created before the column existed.
33
+ anyOf:
34
+ - type: string
35
+ - type: "null"
21
36
  updatedAt:
22
37
  type: string
23
38
  description: ISO-8601 timestamp of last mutation.
@@ -56,6 +71,9 @@ ListKillswitchesResponse:
56
71
  - id
57
72
  - name
58
73
  - description
74
+ - folder
75
+ - creatorEmail
76
+ - createdAt
59
77
  - updatedAt
60
78
  - envs
61
79
  additionalProperties: false
@@ -82,6 +100,21 @@ GetKillswitchResponse:
82
100
  - type: string
83
101
  - type: "null"
84
102
  description: Free-form description or `null`.
103
+ folder:
104
+ description: Folder segment used for dashboard organisation, or `null` when the killswitch lives at the root.
105
+ anyOf:
106
+ - type: string
107
+ - type: "null"
108
+ creatorEmail:
109
+ description: Resolved email of the creator (`created_by` → `users.email`), or `null` when unknown.
110
+ anyOf:
111
+ - type: string
112
+ - type: "null"
113
+ createdAt:
114
+ description: ISO-8601 creation timestamp, or `null` on legacy rows created before the column existed.
115
+ anyOf:
116
+ - type: string
117
+ - type: "null"
85
118
  updatedAt:
86
119
  type: string
87
120
  description: ISO-8601 timestamp of last mutation.
@@ -120,6 +153,9 @@ GetKillswitchResponse:
120
153
  - id
121
154
  - name
122
155
  - description
156
+ - folder
157
+ - creatorEmail
158
+ - createdAt
123
159
  - updatedAt
124
160
  - envs
125
161
  additionalProperties: false
@@ -23,7 +23,43 @@ ListMetricsResponse:
23
23
  - type: string
24
24
  - type: "null"
25
25
  queryIr:
26
- $ref: "#/QueryIr"
26
+ description: Typed query IR, or `null` for a metric whose IR was never populated (re-save it to backfill).
27
+ anyOf:
28
+ - $ref: "#/QueryIr"
29
+ - type: "null"
30
+ displayName:
31
+ description: Human-friendly display name shown in the dashboard, or `null` to fall back to `name`.
32
+ anyOf:
33
+ - type: string
34
+ - type: "null"
35
+ presetId:
36
+ description: Id of the metric preset this metric was created from, or `null` for a custom metric.
37
+ anyOf:
38
+ - type: string
39
+ - type: "null"
40
+ unit:
41
+ description: Display unit (e.g. `ms`, `%`, `$`), or `null` when unitless.
42
+ anyOf:
43
+ - type: string
44
+ - type: "null"
45
+ version:
46
+ type: integer
47
+ description: Monotonic save counter — incremented on every update.
48
+ deletedAt:
49
+ description: ISO-8601 soft-delete (archive) timestamp, or `null` while the metric is live.
50
+ anyOf:
51
+ - type: string
52
+ - type: "null"
53
+ creatorEmail:
54
+ description: Email of the user who created the metric, or `null` when unknown. List responses only.
55
+ anyOf:
56
+ - type: string
57
+ - type: "null"
58
+ updaterEmail:
59
+ description: Email of the user who last edited the metric, or `null` when unknown. List responses only.
60
+ anyOf:
61
+ - type: string
62
+ - type: "null"
27
63
  direction:
28
64
  type: string
29
65
  enum:
@@ -40,8 +76,10 @@ ListMetricsResponse:
40
76
  - type: number
41
77
  - type: "null"
42
78
  createdAt:
43
- description: ISO-8601 creation timestamp.
44
- type: string
79
+ description: ISO-8601 creation timestamp, or `null` on legacy rows created before the column existed.
80
+ anyOf:
81
+ - type: string
82
+ - type: "null"
45
83
  updatedAt:
46
84
  description: ISO-8601 last-update timestamp.
47
85
  type: string
@@ -52,6 +90,11 @@ ListMetricsResponse:
52
90
  - eventName
53
91
  - query
54
92
  - queryIr
93
+ - version
94
+ - displayName
95
+ - presetId
96
+ - unit
97
+ - deletedAt
55
98
  additionalProperties: {}
56
99
  description: A metric definition.
57
100
  description: Every metric in the project (the list endpoint is not paginated).
@@ -78,7 +121,33 @@ GetMetricResponse:
78
121
  - type: string
79
122
  - type: "null"
80
123
  queryIr:
81
- $ref: "#/QueryIr"
124
+ description: Typed query IR, or `null` for a metric whose IR was never populated (re-save it to backfill).
125
+ anyOf:
126
+ - $ref: "#/QueryIr"
127
+ - type: "null"
128
+ displayName:
129
+ description: Human-friendly display name shown in the dashboard, or `null` to fall back to `name`.
130
+ anyOf:
131
+ - type: string
132
+ - type: "null"
133
+ presetId:
134
+ description: Id of the metric preset this metric was created from, or `null` for a custom metric.
135
+ anyOf:
136
+ - type: string
137
+ - type: "null"
138
+ unit:
139
+ description: Display unit (e.g. `ms`, `%`, `$`), or `null` when unitless.
140
+ anyOf:
141
+ - type: string
142
+ - type: "null"
143
+ version:
144
+ type: integer
145
+ description: Monotonic save counter — incremented on every update.
146
+ deletedAt:
147
+ description: ISO-8601 soft-delete (archive) timestamp, or `null` while the metric is live.
148
+ anyOf:
149
+ - type: string
150
+ - type: "null"
82
151
  direction:
83
152
  type: string
84
153
  enum:
@@ -95,8 +164,10 @@ GetMetricResponse:
95
164
  - type: number
96
165
  - type: "null"
97
166
  createdAt:
98
- description: ISO-8601 creation timestamp.
99
- type: string
167
+ description: ISO-8601 creation timestamp, or `null` on legacy rows created before the column existed.
168
+ anyOf:
169
+ - type: string
170
+ - type: "null"
100
171
  updatedAt:
101
172
  description: ISO-8601 last-update timestamp.
102
173
  type: string
@@ -107,6 +178,11 @@ GetMetricResponse:
107
178
  - eventName
108
179
  - query
109
180
  - queryIr
181
+ - version
182
+ - displayName
183
+ - presetId
184
+ - unit
185
+ - deletedAt
110
186
  additionalProperties: {}
111
187
  description: A metric definition.
112
188
  QueryIr:
@@ -411,6 +487,11 @@ MetricDirection:
411
487
  - lower_better
412
488
  - neutral
413
489
  description: Desired direction of movement. `higher_better` (default), `lower_better`, or `neutral` (guardrail).
490
+ MetricDisplayUnit:
491
+ description: Display unit (e.g. `ms`, `%`, `$`), or `null` when unitless.
492
+ anyOf:
493
+ - type: string
494
+ - type: "null"
414
495
  CreateMetricRequest:
415
496
  oneOf:
416
497
  - $ref: "#/CreateMetricWithQuery"
@@ -433,6 +514,8 @@ CreateMetricWithQuery:
433
514
  $ref: "#/MetricDefaultMinEffectOfInterest"
434
515
  direction:
435
516
  $ref: "#/MetricDirection"
517
+ unit:
518
+ $ref: "#/MetricDisplayUnit"
436
519
  required:
437
520
  - name
438
521
  - event_name
@@ -456,6 +539,8 @@ CreateMetricWithQueryIr:
456
539
  $ref: "#/MetricDefaultMinEffectOfInterest"
457
540
  direction:
458
541
  $ref: "#/MetricDirection"
542
+ unit:
543
+ $ref: "#/MetricDisplayUnit"
459
544
  required:
460
545
  - name
461
546
  - event_name
@@ -483,6 +568,8 @@ UpdateMetricWithQuery:
483
568
  $ref: "#/MetricDefaultMinEffectOfInterest"
484
569
  direction:
485
570
  $ref: "#/MetricDirection"
571
+ unit:
572
+ $ref: "#/MetricDisplayUnit"
486
573
  required:
487
574
  - query
488
575
  additionalProperties: false
@@ -502,6 +589,8 @@ UpdateMetricWithQueryIr:
502
589
  $ref: "#/MetricDefaultMinEffectOfInterest"
503
590
  direction:
504
591
  $ref: "#/MetricDirection"
592
+ unit:
593
+ $ref: "#/MetricDisplayUnit"
505
594
  required:
506
595
  - query_ir
507
596
  additionalProperties: false
@@ -519,8 +608,10 @@ UpdateMetricFields:
519
608
  $ref: "#/MetricDefaultMinEffectOfInterest"
520
609
  direction:
521
610
  $ref: "#/MetricDirection"
611
+ unit:
612
+ $ref: "#/MetricDisplayUnit"
522
613
  additionalProperties: false
523
- description: Update-metric variant that leaves the query untouched (metadata-only edit — folder, event, winsorisation, default minimum effect of interest, direction).
614
+ description: Update-metric variant that leaves the query untouched (metadata-only edit — folder, event, winsorisation, default minimum effect of interest, direction, display unit).
524
615
  CreateMetricResponse:
525
616
  type: object
526
617
  properties:
@@ -545,3 +636,104 @@ DeleteMetricResponse:
545
636
  - ok
546
637
  additionalProperties: false
547
638
  description: Soft-delete (archive) acknowledgement.
639
+ UnarchiveMetricResponse:
640
+ type: object
641
+ properties:
642
+ ok:
643
+ type: boolean
644
+ const: true
645
+ required:
646
+ - ok
647
+ additionalProperties: false
648
+ description: Unarchive (undo soft-delete) acknowledgement.
649
+ ListMetricExperimentsResponse:
650
+ type: object
651
+ description: Experiments that attach this metric, ordered with running experiments first, then by role weight (goal > guardrail > secondary), then by name.
652
+ properties:
653
+ experiments:
654
+ type: array
655
+ items:
656
+ type: object
657
+ properties:
658
+ id:
659
+ type: string
660
+ description: Stable opaque experiment id.
661
+ name:
662
+ type: string
663
+ description: Experiment name.
664
+ status:
665
+ type: string
666
+ enum:
667
+ - draft
668
+ - running
669
+ - stopped
670
+ - archived
671
+ description: Experiment lifecycle status.
672
+ role:
673
+ type: string
674
+ enum:
675
+ - goal
676
+ - guardrail
677
+ - secondary
678
+ description: Role this metric plays in the experiment. `goal` drives the decision, `guardrail` blocks ship if degraded, `secondary` is informational.
679
+ required:
680
+ - id
681
+ - name
682
+ - status
683
+ - role
684
+ additionalProperties: false
685
+ description: One experiment attaching this metric.
686
+ description: Every experiment (any status) attaching this metric.
687
+ required:
688
+ - experiments
689
+ additionalProperties: false
690
+ GetMetricSeriesRequest:
691
+ type: object
692
+ description: |-
693
+ Time window for the metric series. Bounds are epoch **seconds** (Analytics Engine stores the event timestamp in seconds). `to` must be strictly greater than `from`.
694
+ properties:
695
+ from:
696
+ type: integer
697
+ minimum: 0
698
+ description: Window start, epoch seconds (inclusive).
699
+ to:
700
+ type: integer
701
+ minimum: 0
702
+ description: Window end, epoch seconds (exclusive). Must be greater than `from`.
703
+ bucket:
704
+ type: integer
705
+ minimum: 60
706
+ maximum: 86400
707
+ default: 3600
708
+ description: Bucket width in seconds (60s–86400s/1d). Defaults to `3600` (hourly). Each returned point is floor-aligned to this width.
709
+ required:
710
+ - from
711
+ - to
712
+ additionalProperties: false
713
+ GetMetricSeriesResponse:
714
+ type: object
715
+ description: Bucketed values for one metric, compiled from its typed IR and executed against the Analytics Engine SQL API, plus the SQL that produced them. Capped at 5000 rows (high-cardinality `groupBy` series are truncated).
716
+ properties:
717
+ sql:
718
+ type: string
719
+ description: The Analytics Engine SQL executed to produce `rows` (echoed for transparency / debugging).
720
+ rows:
721
+ type: array
722
+ description: Bucketed series, ordered by `t` ascending. For a metric with a `groupBy` clause each bucket has one row per label combination, with the label values as extra string/number properties on the row.
723
+ items:
724
+ type: object
725
+ properties:
726
+ t:
727
+ type: integer
728
+ description: Bucket start, epoch seconds, floor-aligned to `bucket`.
729
+ v:
730
+ type: number
731
+ description: Aggregated metric value in the bucket (sample-interval weighted).
732
+ required:
733
+ - t
734
+ - v
735
+ additionalProperties: true
736
+ required:
737
+ - sql
738
+ - rows
739
+ additionalProperties: false