@shipeasy/openapi 2.2.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 (52) hide show
  1. package/dist/{chunk-643YSMLU.js → chunk-4QSU744W.js} +183 -1
  2. package/dist/chunk-4QSU744W.js.map +1 -0
  3. package/dist/{chunk-MRW3DJ57.js → chunk-ZPKHTUVV.js} +1238 -335
  4. package/dist/chunk-ZPKHTUVV.js.map +1 -0
  5. package/dist/{client-K0ShmsC7.d.ts → client-WGNXT4xl.d.ts} +5818 -2647
  6. package/dist/client.d.ts +1 -1
  7. package/dist/client.js +51 -1
  8. package/dist/custom.js +4 -4
  9. package/dist/custom.js.map +1 -1
  10. package/dist/index.d.ts +2 -2
  11. package/dist/index.js +52 -2
  12. package/dist/index.js.map +1 -1
  13. package/dist/schemas.d.ts +3538 -534
  14. package/dist/schemas.js +253 -5
  15. package/openapi.json +12914 -7158
  16. package/openapi.yaml +7672 -3742
  17. package/package.json +1 -1
  18. package/spec/components/errors.yaml +33 -1
  19. package/spec/components/schemas/alerts.yaml +138 -0
  20. package/spec/components/schemas/attributes.yaml +53 -3
  21. package/spec/components/schemas/common.yaml +16 -0
  22. package/spec/components/schemas/configs.yaml +58 -0
  23. package/spec/components/schemas/connectors.yaml +5 -1
  24. package/spec/components/schemas/errors-api.yaml +116 -6
  25. package/spec/components/schemas/experiment-api-row.yaml +293 -0
  26. package/spec/components/schemas/experiments.yaml +395 -380
  27. package/spec/components/schemas/gates.yaml +355 -272
  28. package/spec/components/schemas/i18n.yaml +169 -40
  29. package/spec/components/schemas/keys.yaml +2 -1
  30. package/spec/components/schemas/killswitches.yaml +36 -0
  31. package/spec/components/schemas/metrics.yaml +200 -23
  32. package/spec/components/schemas/ops.yaml +918 -29
  33. package/spec/components/schemas/projects.yaml +246 -2
  34. package/spec/components/schemas/universes.yaml +83 -1
  35. package/spec/openapi.yaml +61 -0
  36. package/spec/paths/alert-rules.yaml +1 -0
  37. package/spec/paths/alerts.yaml +184 -0
  38. package/spec/paths/attributes.yaml +23 -5
  39. package/spec/paths/configs.yaml +71 -0
  40. package/spec/paths/errors.yaml +112 -2
  41. package/spec/paths/events.yaml +1 -0
  42. package/spec/paths/experiments.yaml +244 -16
  43. package/spec/paths/gates.yaml +138 -0
  44. package/spec/paths/i18n.yaml +290 -6
  45. package/spec/paths/keys.yaml +1 -0
  46. package/spec/paths/killswitches.yaml +7 -0
  47. package/spec/paths/metrics.yaml +187 -0
  48. package/spec/paths/ops.yaml +410 -0
  49. package/spec/paths/projects.yaml +62 -2
  50. package/spec/paths/universes.yaml +1 -0
  51. package/dist/chunk-643YSMLU.js.map +0 -1
  52. package/dist/chunk-MRW3DJ57.js.map +0 -1
@@ -372,6 +372,7 @@
372
372
  - GROUPS_WEIGHT_SUM
373
373
  - REFERENCED_NOT_FOUND
374
374
  - VALIDATION
375
+ - EXPERIMENT_IMMUTABLE_FIELD
375
376
  x-cli:
376
377
  name: update
377
378
  positional:
@@ -510,6 +511,12 @@
510
511
  - NOT_FOUND
511
512
  - INVALID_TRANSITION
512
513
  - VALIDATION
514
+ - PLAN_LIMIT
515
+ - EXPERIMENT_NO_GOAL_METRIC
516
+ - EXPERIMENT_ARCHIVED_RESTART
517
+ - EXPERIMENT_NOT_RUNNING
518
+ - EXPERIMENT_RUNNING_ARCHIVE
519
+ - EXPERIMENT_RESTORE_INVALID
513
520
  x-cli:
514
521
  positional:
515
522
  - id
@@ -604,6 +611,7 @@
604
611
  - EVENT_PENDING
605
612
  - REFERENCED_NOT_FOUND
606
613
  - VALIDATION
614
+ - METRIC_UNKNOWN_ID
607
615
  x-cli:
608
616
  name: set-metrics
609
617
  positional:
@@ -640,21 +648,51 @@
640
648
  status: running
641
649
  results:
642
650
  - metric: checkout_completed
643
- group_name: control
651
+ groupName: control
644
652
  ds: 2026-05-09
645
653
  n: 12421
646
654
  mean: 0.1834
647
- delta_pct: null
648
- p_value: null
649
- srm_detected: 0
655
+ variance: 0.1498
656
+ delta: null
657
+ deltaPct: null
658
+ ci95Low: null
659
+ ci95High: null
660
+ ci99Low: null
661
+ ci99High: null
662
+ ciLow: null
663
+ ciHigh: null
664
+ pValue: null
665
+ expectedN: 15000
666
+ realizedMde: null
667
+ srmPValue: 0.82
668
+ srmDetected: 0
669
+ msprtSignificant: null
670
+ msprtLambda: null
671
+ isFinal: 0
672
+ peekWarning: 0
650
673
  - metric: checkout_completed
651
- group_name: treatment
674
+ groupName: treatment
652
675
  ds: 2026-05-09
653
676
  n: 12519
654
677
  mean: 0.1922
655
- delta_pct: 4.8
656
- p_value: 0.018
657
- srm_detected: 0
678
+ variance: 0.1553
679
+ delta: 0.0088
680
+ deltaPct: 4.8
681
+ ci95Low: 0.0015
682
+ ci95High: 0.0161
683
+ ci99Low: -0.0008
684
+ ci99High: 0.0184
685
+ ciLow: 0.0015
686
+ ciHigh: 0.0161
687
+ pValue: 0.018
688
+ expectedN: 15000
689
+ realizedMde: 0.0079
690
+ srmPValue: 0.82
691
+ srmDetected: 0
692
+ msprtSignificant: null
693
+ msprtLambda: null
694
+ isFinal: 0
695
+ peekWarning: 0
658
696
  verdict: ship
659
697
  "400":
660
698
  $ref: ../components/responses.yaml#/BadRequest
@@ -715,21 +753,51 @@
715
753
  status: running
716
754
  series:
717
755
  - metric: checkout_completed
718
- group_name: treatment
756
+ groupName: treatment
719
757
  ds: 2026-05-08
720
758
  n: 11200
721
759
  mean: 0.1903
722
- delta_pct: 3.9
723
- p_value: 0.034
724
- srm_detected: 0
760
+ variance: 0.1541
761
+ delta: 0.0071
762
+ deltaPct: 3.9
763
+ ci95Low: -0.0004
764
+ ci95High: 0.0146
765
+ ci99Low: -0.0028
766
+ ci99High: 0.017
767
+ ciLow: -0.0004
768
+ ciHigh: 0.0146
769
+ pValue: 0.034
770
+ expectedN: 15000
771
+ realizedMde: 0.0083
772
+ srmPValue: 0.79
773
+ srmDetected: 0
774
+ msprtSignificant: null
775
+ msprtLambda: null
776
+ isFinal: 0
777
+ peekWarning: 0
725
778
  - metric: checkout_completed
726
- group_name: treatment
779
+ groupName: treatment
727
780
  ds: 2026-05-09
728
781
  n: 12519
729
782
  mean: 0.1922
730
- delta_pct: 4.8
731
- p_value: 0.018
732
- srm_detected: 0
783
+ variance: 0.1553
784
+ delta: 0.0088
785
+ deltaPct: 4.8
786
+ ci95Low: 0.0015
787
+ ci95High: 0.0161
788
+ ci99Low: -0.0008
789
+ ci99High: 0.0184
790
+ ciLow: 0.0015
791
+ ciHigh: 0.0161
792
+ pValue: 0.018
793
+ expectedN: 15000
794
+ realizedMde: 0.0079
795
+ srmPValue: 0.82
796
+ srmDetected: 0
797
+ msprtSignificant: null
798
+ msprtLambda: null
799
+ isFinal: 0
800
+ peekWarning: 0
733
801
  "400":
734
802
  $ref: ../components/responses.yaml#/BadRequest
735
803
  "401":
@@ -751,6 +819,166 @@
751
819
  name: timeseries
752
820
  positional:
753
821
  - id
822
+ /api/admin/experiments/{id}/readouts:
823
+ post:
824
+ operationId: createExperimentReadout
825
+ summary: Mint a readout snapshot
826
+ description: |-
827
+ Freezes the current results view into an immutable, dated readout snapshot — verdict, headline, per-metric numbers, the caveat list with its acknowledgment state, enrollment, and a hash of the assignment-relevant config. Ship/stop flows mint one automatically; "Share readout" mints one on demand. Snapshots are never updated after insert.
828
+
829
+ Pass `requireAllAcknowledged: true` to enforce ship gating server-side — returns `422` while any open caveat is not listed in `acknowledgedCaveatIds`.
830
+
831
+ **Use case:** Capture "what the data said when we decided" before shipping or stopping, so the decision stays auditable even after results move.
832
+ tags:
833
+ - Experiments
834
+ parameters:
835
+ - $ref: ../components/parameters.yaml#/ProjectId
836
+ - name: id
837
+ in: path
838
+ required: true
839
+ description: Stable opaque experiment id (`exp_…`) or the experiment's `name`.
840
+ schema:
841
+ $ref: ../components/schemas/common.yaml#/ResourceId
842
+ requestBody:
843
+ required: true
844
+ content:
845
+ application/json:
846
+ schema:
847
+ $ref: ../components/schemas/experiments.yaml#/CreateExperimentReadoutRequest
848
+ examples:
849
+ manual:
850
+ summary: Manual — "Share readout"
851
+ description: Snapshot the current results view on demand.
852
+ value:
853
+ kind: manual
854
+ shipGated:
855
+ summary: Ship — with caveat gating
856
+ description: Mint a ship readout, acknowledging the open caveats; fails with `422` if any open caveat is missing from the list.
857
+ value:
858
+ kind: ship
859
+ acknowledgedCaveatIds:
860
+ - srm
861
+ - min_runtime
862
+ requireAllAcknowledged: true
863
+ responses:
864
+ "200":
865
+ description: Mint a readout snapshot
866
+ content:
867
+ application/json:
868
+ schema:
869
+ $ref: ../components/schemas/experiments.yaml#/CreateExperimentReadoutResponse
870
+ example:
871
+ id: 5f0c1f2d-8e90-4c6e-9b1a-3a7c1f2d8e90
872
+ links:
873
+ GetExperimentReadout:
874
+ operationId: getExperimentReadout
875
+ parameters: { readoutId: $response.body#/id }
876
+ "400":
877
+ $ref: ../components/responses.yaml#/BadRequest
878
+ "401":
879
+ $ref: ../components/responses.yaml#/Unauthorized
880
+ "403":
881
+ $ref: ../components/responses.yaml#/Forbidden
882
+ "404":
883
+ $ref: ../components/responses.yaml#/NotFound
884
+ "409":
885
+ $ref: ../components/responses.yaml#/Conflict
886
+ "422":
887
+ $ref: ../components/responses.yaml#/UnprocessableEntity
888
+ x-error-codes:
889
+ - BAD_REQUEST
890
+ - UNAUTHORIZED
891
+ - FORBIDDEN
892
+ - NOT_FOUND
893
+ - VALIDATION
894
+ x-cli:
895
+ name: readout-create
896
+ positional:
897
+ - id
898
+ /api/admin/experiments/{id}/readouts/{readoutId}:
899
+ get:
900
+ operationId: getExperimentReadout
901
+ summary: Get a readout snapshot
902
+ description: |-
903
+ Returns one immutable readout snapshot — the frozen results view (verdict, headline, per-metric numbers, caveats, enrollment) captured when it was minted, plus the `configHash` that tells you whether it is still comparable to the live view.
904
+
905
+ **Use case:** Render a shared, dated readout exactly as it looked at decision time.
906
+ tags:
907
+ - Experiments
908
+ parameters:
909
+ - $ref: ../components/parameters.yaml#/ProjectId
910
+ - name: id
911
+ in: path
912
+ required: true
913
+ description: Stable opaque experiment id (`exp_…`) or the experiment's `name`.
914
+ schema:
915
+ $ref: ../components/schemas/common.yaml#/ResourceId
916
+ - name: readoutId
917
+ in: path
918
+ required: true
919
+ description: Readout snapshot id, as returned by `createExperimentReadout`.
920
+ schema:
921
+ $ref: ../components/schemas/common.yaml#/ResourceId
922
+ responses:
923
+ "200":
924
+ description: Get a readout snapshot
925
+ content:
926
+ application/json:
927
+ schema:
928
+ $ref: ../components/schemas/experiments.yaml#/GetExperimentReadoutResponse
929
+ example:
930
+ id: 5f0c1f2d-8e90-4c6e-9b1a-3a7c1f2d8e90
931
+ experimentId: exp_01j7wb12c3d4e5f6g7h8j9k0l1
932
+ experimentName: checkout_button_color
933
+ kind: ship
934
+ createdBy: pm@example.com
935
+ createdAt: 2026-05-09T18:22:11.000Z
936
+ verdict: ship
937
+ title: Treatment wins on checkout conversion
938
+ why: Goal metric significant with guardrails flat after 8 days.
939
+ configHash: 9c1f4f1f2c0c4a5fa1c2b6d3e7c8e3a19c1f4f1f2c0c4a5fa1c2b6d3e7c8e3a1
940
+ metricsJson:
941
+ - name: checkout_completed
942
+ role: goal
943
+ delta: 0.0088
944
+ deltaPct: 4.8
945
+ ci: [0.0015, 0.0161]
946
+ p: 0.018
947
+ sig: true
948
+ caveatsJson:
949
+ - id: min_runtime
950
+ severity: warn
951
+ text: Below the 14-day minimum runtime.
952
+ acknowledged: true
953
+ usersJson:
954
+ groups:
955
+ - name: control
956
+ n: 12421
957
+ - name: treatment
958
+ n: 12519
959
+ days: 8
960
+ "400":
961
+ $ref: ../components/responses.yaml#/BadRequest
962
+ "401":
963
+ $ref: ../components/responses.yaml#/Unauthorized
964
+ "403":
965
+ $ref: ../components/responses.yaml#/Forbidden
966
+ "404":
967
+ $ref: ../components/responses.yaml#/NotFound
968
+ "409":
969
+ $ref: ../components/responses.yaml#/Conflict
970
+ "422":
971
+ $ref: ../components/responses.yaml#/UnprocessableEntity
972
+ x-error-codes:
973
+ - BAD_REQUEST
974
+ - UNAUTHORIZED
975
+ - FORBIDDEN
976
+ - NOT_FOUND
977
+ x-cli:
978
+ name: readout-get
979
+ positional:
980
+ - id
981
+ - readoutId
754
982
  /api/admin/experiments/{id}/reanalyze:
755
983
  post:
756
984
  operationId: reanalyzeExperiment
@@ -43,6 +43,10 @@
43
43
  groupName: growth
44
44
  ownerEmail: ana@example.com
45
45
  stack: null
46
+ creatorEmail: ana@example.com
47
+ updaterEmail: bo@example.com
48
+ version: 4
49
+ createdAt: 2026-05-01T10:12:00.000Z
46
50
  updatedAt: 2026-05-09T16:01:22.000Z
47
51
  next_cursor: null
48
52
  "400":
@@ -195,11 +199,82 @@
195
199
  - FORBIDDEN
196
200
  - ALREADY_EXISTS
197
201
  - VALIDATION
202
+ - PLAN_LIMIT
198
203
  x-cli:
199
204
  name: create
200
205
  positional:
201
206
  - name
202
207
  /api/admin/gates/{id}:
208
+ get:
209
+ operationId: getGate
210
+ summary: Get one gate
211
+ description: |-
212
+ Returns the full gate row — including the gatekeeper `stack`, resolved creator/last-editor emails, and the edit `version` — for one gate, addressed by id or `name`.
213
+
214
+ **Use case:** Inspect a single gate's current rollout, rules, and stack before editing it, without paging through the whole list.
215
+ tags:
216
+ - Flags
217
+ parameters:
218
+ - $ref: ../components/parameters.yaml#/ProjectId
219
+ - name: id
220
+ in: path
221
+ required: true
222
+ description: Stable opaque gate id (`gat_…`) or the gate's `name`.
223
+ schema:
224
+ $ref: ../components/schemas/common.yaml#/ResourceId
225
+ responses:
226
+ "200":
227
+ description: Get one gate
228
+ content:
229
+ application/json:
230
+ schema:
231
+ $ref: ../components/schemas/gates.yaml#/GetGateResponse
232
+ example:
233
+ id: gat_01j7w7m9q4hxbf6npe6s9zr3vc
234
+ name: checkout_v2
235
+ enabled: 1
236
+ type: targeting
237
+ rolloutPct: 5000
238
+ rules:
239
+ - attr: country
240
+ op: in
241
+ value:
242
+ - US
243
+ - CA
244
+ - GB
245
+ salt: 9c1f4f1f2c0c4a5fa1c2b6d3e7c8e3a1
246
+ title: Checkout v2
247
+ description: New checkout flow. Pro users in US/CA/GB only.
248
+ folder: checkout
249
+ groupName: growth
250
+ ownerEmail: ana@example.com
251
+ stack: null
252
+ creatorEmail: ana@example.com
253
+ updaterEmail: bo@example.com
254
+ version: 4
255
+ createdAt: 2026-05-01T10:12:00.000Z
256
+ updatedAt: 2026-05-09T16:01:22.000Z
257
+ "400":
258
+ $ref: ../components/responses.yaml#/BadRequest
259
+ "401":
260
+ $ref: ../components/responses.yaml#/Unauthorized
261
+ "403":
262
+ $ref: ../components/responses.yaml#/Forbidden
263
+ "404":
264
+ $ref: ../components/responses.yaml#/NotFound
265
+ "409":
266
+ $ref: ../components/responses.yaml#/Conflict
267
+ "422":
268
+ $ref: ../components/responses.yaml#/UnprocessableEntity
269
+ x-error-codes:
270
+ - BAD_REQUEST
271
+ - UNAUTHORIZED
272
+ - FORBIDDEN
273
+ - NOT_FOUND
274
+ x-cli:
275
+ name: get
276
+ positional:
277
+ - id
203
278
  patch:
204
279
  operationId: updateGate
205
280
  summary: Update a feature gate
@@ -463,3 +538,66 @@
463
538
  name: disable
464
539
  positional:
465
540
  - id
541
+ /api/admin/gates/{id}/activity:
542
+ get:
543
+ operationId: listGateActivity
544
+ summary: List gate activity
545
+ description: |-
546
+ Returns recent audit rows for one gate (create, update, enable, disable, delete) ordered newest first. Use the `limit` query parameter to cap the result (1–100, default 20).
547
+
548
+ **Use case:** Render the activity feed in the gate detail panel or answer "who ramped this gate, and when?" during an incident review.
549
+ tags:
550
+ - Flags
551
+ parameters:
552
+ - $ref: ../components/parameters.yaml#/ProjectId
553
+ - name: id
554
+ in: path
555
+ required: true
556
+ description: Stable opaque gate id (`gat_…`) or the gate's `name`.
557
+ schema:
558
+ $ref: ../components/schemas/common.yaml#/ResourceId
559
+ - name: limit
560
+ in: query
561
+ required: false
562
+ description: Max rows to return (1–100). Defaults to 20.
563
+ schema:
564
+ default: 20
565
+ type: integer
566
+ minimum: 1
567
+ maximum: 100
568
+ responses:
569
+ "200":
570
+ description: List gate activity
571
+ content:
572
+ application/json:
573
+ schema:
574
+ $ref: ../components/schemas/gates.yaml#/ListGateActivityResponse
575
+ example:
576
+ - id: act_01j7waf01a2b3c4d5e6f7g8h9i
577
+ action: gate.update
578
+ actorEmail: ana@example.com
579
+ actorType: user
580
+ payload:
581
+ rollout_pct: 5000
582
+ createdAt: 2026-05-09T16:01:22.000Z
583
+ "400":
584
+ $ref: ../components/responses.yaml#/BadRequest
585
+ "401":
586
+ $ref: ../components/responses.yaml#/Unauthorized
587
+ "403":
588
+ $ref: ../components/responses.yaml#/Forbidden
589
+ "404":
590
+ $ref: ../components/responses.yaml#/NotFound
591
+ "409":
592
+ $ref: ../components/responses.yaml#/Conflict
593
+ "422":
594
+ $ref: ../components/responses.yaml#/UnprocessableEntity
595
+ x-error-codes:
596
+ - BAD_REQUEST
597
+ - UNAUTHORIZED
598
+ - FORBIDDEN
599
+ - NOT_FOUND
600
+ x-cli:
601
+ name: activity
602
+ positional:
603
+ - id