@shipeasy/openapi 2.3.0 → 2.4.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 (43) hide show
  1. package/dist/{chunk-LYNWK55D.js → chunk-4QSU744W.js} +161 -1
  2. package/dist/chunk-4QSU744W.js.map +1 -0
  3. package/dist/{chunk-PRN4AEAM.js → chunk-ZPKHTUVV.js} +1004 -251
  4. package/dist/chunk-ZPKHTUVV.js.map +1 -0
  5. package/dist/{client-DO5HTb_L.d.ts → client-WGNXT4xl.d.ts} +5267 -2643
  6. package/dist/client.d.ts +1 -1
  7. package/dist/client.js +45 -1
  8. package/dist/index.d.ts +2 -2
  9. package/dist/index.js +46 -2
  10. package/dist/index.js.map +1 -1
  11. package/dist/schemas.d.ts +2933 -542
  12. package/dist/schemas.js +213 -1
  13. package/openapi.json +11646 -6855
  14. package/openapi.yaml +4939 -1675
  15. package/package.json +1 -1
  16. package/spec/components/errors.yaml +3 -0
  17. package/spec/components/schemas/alerts.yaml +138 -0
  18. package/spec/components/schemas/attributes.yaml +53 -3
  19. package/spec/components/schemas/common.yaml +10 -0
  20. package/spec/components/schemas/configs.yaml +58 -0
  21. package/spec/components/schemas/connectors.yaml +5 -1
  22. package/spec/components/schemas/errors-api.yaml +51 -4
  23. package/spec/components/schemas/experiments.yaml +347 -87
  24. package/spec/components/schemas/gates.yaml +341 -277
  25. package/spec/components/schemas/i18n.yaml +169 -40
  26. package/spec/components/schemas/killswitches.yaml +36 -0
  27. package/spec/components/schemas/metrics.yaml +183 -6
  28. package/spec/components/schemas/ops.yaml +817 -29
  29. package/spec/components/schemas/projects.yaml +129 -3
  30. package/spec/openapi.yaml +47 -0
  31. package/spec/paths/alerts.yaml +184 -0
  32. package/spec/paths/attributes.yaml +23 -5
  33. package/spec/paths/configs.yaml +70 -0
  34. package/spec/paths/errors.yaml +16 -0
  35. package/spec/paths/experiments.yaml +236 -16
  36. package/spec/paths/gates.yaml +137 -0
  37. package/spec/paths/i18n.yaml +290 -6
  38. package/spec/paths/killswitches.yaml +6 -0
  39. package/spec/paths/metrics.yaml +186 -0
  40. package/spec/paths/ops.yaml +299 -0
  41. package/spec/paths/projects.yaml +60 -0
  42. package/dist/chunk-LYNWK55D.js.map +0 -1
  43. 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:
@@ -545,3 +621,104 @@ DeleteMetricResponse:
545
621
  - ok
546
622
  additionalProperties: false
547
623
  description: Soft-delete (archive) acknowledgement.
624
+ UnarchiveMetricResponse:
625
+ type: object
626
+ properties:
627
+ ok:
628
+ type: boolean
629
+ const: true
630
+ required:
631
+ - ok
632
+ additionalProperties: false
633
+ description: Unarchive (undo soft-delete) acknowledgement.
634
+ ListMetricExperimentsResponse:
635
+ type: object
636
+ description: Experiments that attach this metric, ordered with running experiments first, then by role weight (goal > guardrail > secondary), then by name.
637
+ properties:
638
+ experiments:
639
+ type: array
640
+ items:
641
+ type: object
642
+ properties:
643
+ id:
644
+ type: string
645
+ description: Stable opaque experiment id.
646
+ name:
647
+ type: string
648
+ description: Experiment name.
649
+ status:
650
+ type: string
651
+ enum:
652
+ - draft
653
+ - running
654
+ - stopped
655
+ - archived
656
+ description: Experiment lifecycle status.
657
+ role:
658
+ type: string
659
+ enum:
660
+ - goal
661
+ - guardrail
662
+ - secondary
663
+ description: Role this metric plays in the experiment. `goal` drives the decision, `guardrail` blocks ship if degraded, `secondary` is informational.
664
+ required:
665
+ - id
666
+ - name
667
+ - status
668
+ - role
669
+ additionalProperties: false
670
+ description: One experiment attaching this metric.
671
+ description: Every experiment (any status) attaching this metric.
672
+ required:
673
+ - experiments
674
+ additionalProperties: false
675
+ GetMetricSeriesRequest:
676
+ type: object
677
+ description: |-
678
+ 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`.
679
+ properties:
680
+ from:
681
+ type: integer
682
+ minimum: 0
683
+ description: Window start, epoch seconds (inclusive).
684
+ to:
685
+ type: integer
686
+ minimum: 0
687
+ description: Window end, epoch seconds (exclusive). Must be greater than `from`.
688
+ bucket:
689
+ type: integer
690
+ minimum: 60
691
+ maximum: 86400
692
+ default: 3600
693
+ description: Bucket width in seconds (60s–86400s/1d). Defaults to `3600` (hourly). Each returned point is floor-aligned to this width.
694
+ required:
695
+ - from
696
+ - to
697
+ additionalProperties: false
698
+ GetMetricSeriesResponse:
699
+ type: object
700
+ 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).
701
+ properties:
702
+ sql:
703
+ type: string
704
+ description: The Analytics Engine SQL executed to produce `rows` (echoed for transparency / debugging).
705
+ rows:
706
+ type: array
707
+ 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.
708
+ items:
709
+ type: object
710
+ properties:
711
+ t:
712
+ type: integer
713
+ description: Bucket start, epoch seconds, floor-aligned to `bucket`.
714
+ v:
715
+ type: number
716
+ description: Aggregated metric value in the bucket (sample-interval weighted).
717
+ required:
718
+ - t
719
+ - v
720
+ additionalProperties: true
721
+ required:
722
+ - sql
723
+ - rows
724
+ additionalProperties: false