@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
@@ -474,52 +474,8 @@ GetExperimentResultsResponse:
474
474
  results:
475
475
  type: array
476
476
  items:
477
- type: object
478
- properties:
479
- metric:
480
- type: string
481
- group_name:
482
- type: string
483
- ds:
484
- type: string
485
- description: Date slice (`YYYY-MM-DD`).
486
- n:
487
- anyOf:
488
- - type: number
489
- - type: "null"
490
- mean:
491
- anyOf:
492
- - type: number
493
- - type: "null"
494
- delta_pct:
495
- anyOf:
496
- - type: number
497
- - type: "null"
498
- p_value:
499
- anyOf:
500
- - type: number
501
- - type: "null"
502
- srm_detected:
503
- anyOf:
504
- - type: number
505
- - type: "null"
506
- description: "`1` if sample-ratio mismatch detected, else `0`."
507
- realized_mde:
508
- anyOf:
509
- - type: number
510
- - type: "null"
511
- description: "Realized minimum detectable effect (absolute, in metric units) — the smallest true effect this run could detect at the experiment's significance level and target power GIVEN the observed variance and per-arm sample sizes. A derived OUTPUT, not an input knob; compare it against the metric's minimum effect of interest to judge whether the run is adequately powered. `null` on the control row and on empty arms."
512
- required:
513
- - metric
514
- - group_name
515
- - ds
516
- - n
517
- - mean
518
- - delta_pct
519
- - p_value
520
- - srm_detected
521
- - realized_mde
522
- additionalProperties: false
477
+ $ref: "#/ExperimentResultRow"
478
+ description: One analysis row per metric/group/day — the persisted `experiment_results` rows for this experiment.
523
479
  verdict:
524
480
  type: string
525
481
  enum:
@@ -562,50 +518,144 @@ GetExperimentTimeseriesResponse:
562
518
  series:
563
519
  type: array
564
520
  items:
565
- type: object
566
- properties:
567
- metric:
568
- type: string
569
- group_name:
570
- type: string
571
- ds:
572
- type: string
573
- description: Date slice (`YYYY-MM-DD`).
574
- n:
575
- anyOf:
576
- - type: number
577
- - type: "null"
578
- mean:
579
- anyOf:
580
- - type: number
581
- - type: "null"
582
- delta_pct:
583
- anyOf:
584
- - type: number
585
- - type: "null"
586
- p_value:
587
- anyOf:
588
- - type: number
589
- - type: "null"
590
- srm_detected:
591
- anyOf:
592
- - type: number
593
- - type: "null"
594
- description: "`1` if sample-ratio mismatch detected, else `0`."
595
- required:
596
- - metric
597
- - group_name
598
- - ds
599
- - n
600
- - mean
601
- - delta_pct
602
- - p_value
603
- - srm_detected
604
- additionalProperties: false
521
+ $ref: "#/ExperimentResultRow"
522
+ description: Every daily analysis slice (same row shape as `/results`), oldest to newest.
605
523
  required:
606
524
  - experiment
607
525
  - series
608
526
  additionalProperties: false
527
+ ExperimentResultRow:
528
+ type: object
529
+ description: One persisted analysis row (`experiment_results`) for a single metric/group/day slice. Camel-case wire names; nullable statistics are `null` on control rows, empty arms, or when the analysis pass hasn't produced them.
530
+ properties:
531
+ metric:
532
+ type: string
533
+ description: Metric name this row was computed for.
534
+ groupName:
535
+ type: string
536
+ description: Variant (group) label the row belongs to, e.g. `control` or `treatment`.
537
+ ds:
538
+ type: string
539
+ description: Date slice (`YYYY-MM-DD`).
540
+ n:
541
+ description: Sample size (exposed units) in this group for the slice, or `null` when unknown.
542
+ anyOf:
543
+ - type: integer
544
+ - type: "null"
545
+ mean:
546
+ description: Per-unit metric mean in this group, or `null` on empty arms.
547
+ anyOf:
548
+ - type: number
549
+ - type: "null"
550
+ variance:
551
+ description: Per-unit metric variance in this group, or `null` on empty arms.
552
+ anyOf:
553
+ - type: number
554
+ - type: "null"
555
+ delta:
556
+ description: Absolute difference vs. control (metric units). `null` on the control row.
557
+ anyOf:
558
+ - type: number
559
+ - type: "null"
560
+ deltaPct:
561
+ description: Relative difference vs. control, in percent. `null` on the control row.
562
+ anyOf:
563
+ - type: number
564
+ - type: "null"
565
+ ci95Low:
566
+ description: Lower bound of the 95% confidence interval on `delta`, or `null`. Kept for back-compat — prefer `ciLow`/`ciHigh`.
567
+ anyOf:
568
+ - type: number
569
+ - type: "null"
570
+ ci95High:
571
+ description: Upper bound of the 95% confidence interval on `delta`, or `null`. Kept for back-compat — prefer `ciLow`/`ciHigh`.
572
+ anyOf:
573
+ - type: number
574
+ - type: "null"
575
+ ci99Low:
576
+ description: Lower bound of the 99% confidence interval on `delta`, or `null`. Kept for back-compat — prefer `ciLow`/`ciHigh`.
577
+ anyOf:
578
+ - type: number
579
+ - type: "null"
580
+ ci99High:
581
+ description: Upper bound of the 99% confidence interval on `delta`, or `null`. Kept for back-compat — prefer `ciLow`/`ciHigh`.
582
+ anyOf:
583
+ - type: number
584
+ - type: "null"
585
+ ciLow:
586
+ description: Lower bound of the confidence interval at the project's configured `ci_confidence` (not always 95%), or `null`. When both `ciLow`/`ciHigh` are `null`, fall back to `ci95Low`/`ci95High` (pre-migration rows).
587
+ anyOf:
588
+ - type: number
589
+ - type: "null"
590
+ ciHigh:
591
+ description: Upper bound of the confidence interval at the project's configured `ci_confidence` (not always 95%), or `null`. When both `ciLow`/`ciHigh` are `null`, fall back to `ci95Low`/`ci95High` (pre-migration rows).
592
+ anyOf:
593
+ - type: number
594
+ - type: "null"
595
+ pValue:
596
+ description: Two-sided p-value vs. control, or `null` on the control row / empty arms.
597
+ anyOf:
598
+ - type: number
599
+ - type: "null"
600
+ expectedN:
601
+ description: Sample size per arm the power calculation expects for a conclusive read, or `null` when not computed.
602
+ anyOf:
603
+ - type: integer
604
+ - type: "null"
605
+ realizedMde:
606
+ description: "Realized minimum detectable effect (absolute, in metric units) — the smallest true effect this run could detect at the experiment's significance level and target power GIVEN the observed variance and per-arm sample sizes. A derived OUTPUT, not an input knob; compare it against the metric's minimum effect of interest to judge whether the run is adequately powered. `null` on the control row and on empty arms."
607
+ anyOf:
608
+ - type: number
609
+ - type: "null"
610
+ srmPValue:
611
+ description: p-value of the sample-ratio-mismatch chi-squared test, or `null` when not computed.
612
+ anyOf:
613
+ - type: number
614
+ - type: "null"
615
+ srmDetected:
616
+ type: integer
617
+ description: "`1` if sample-ratio mismatch detected, else `0`."
618
+ msprtSignificant:
619
+ description: "Sequential (mSPRT) significance flag: `1` significant, `0` not, `null` when sequential testing is off or not computed."
620
+ anyOf:
621
+ - type: integer
622
+ - type: "null"
623
+ msprtLambda:
624
+ description: mSPRT mixture likelihood-ratio statistic, or `null` when sequential testing is off or not computed.
625
+ anyOf:
626
+ - type: number
627
+ - type: "null"
628
+ isFinal:
629
+ type: integer
630
+ description: "`1` when this row belongs to the final analysis pass after the experiment stopped, else `0`."
631
+ peekWarning:
632
+ type: integer
633
+ description: "`1` when the row was read before `min_runtime_days`/`min_sample_size` were met (peeking inflates false positives), else `0`."
634
+ required:
635
+ - metric
636
+ - groupName
637
+ - ds
638
+ - n
639
+ - mean
640
+ - variance
641
+ - delta
642
+ - deltaPct
643
+ - ci95Low
644
+ - ci95High
645
+ - ci99Low
646
+ - ci99High
647
+ - ciLow
648
+ - ciHigh
649
+ - pValue
650
+ - expectedN
651
+ - realizedMde
652
+ - srmPValue
653
+ - srmDetected
654
+ - msprtSignificant
655
+ - msprtLambda
656
+ - isFinal
657
+ - peekWarning
658
+ additionalProperties: false
609
659
  ReanalyzeExperimentResponse:
610
660
  type: object
611
661
  properties:
@@ -613,8 +663,218 @@ ReanalyzeExperimentResponse:
613
663
  type: string
614
664
  queued:
615
665
  type: boolean
616
- const: true
666
+ description: "`true` when the analysis job was enqueued; `false` when the worker enqueue failed or the analysis queue is not configured (retry later)."
617
667
  required:
618
668
  - id
619
669
  - queued
620
670
  additionalProperties: false
671
+ CreateExperimentReadoutRequest:
672
+ type: object
673
+ description: Body for `POST /api/admin/experiments/{id}/readouts`. Mints an immutable, dated readout snapshot of the current results view — "this is what we saw when we decided".
674
+ properties:
675
+ kind:
676
+ type: string
677
+ enum:
678
+ - manual
679
+ - ship
680
+ - stop
681
+ description: Why the snapshot is being minted — `manual` ("Share readout"), or automatically on `ship` / `stop`.
682
+ acknowledgedCaveatIds:
683
+ type: array
684
+ items:
685
+ type: string
686
+ description: Caveat id, as surfaced in the results view's caveat list.
687
+ description: Ids of the open caveats the caller ticked (decision-gating acknowledgment). Unlisted caveats are stored as unacknowledged.
688
+ requireAllAcknowledged:
689
+ type: boolean
690
+ description: When `true`, refuse (`422`) to mint while any open caveat is not listed in `acknowledgedCaveatIds` — server-side ship gating.
691
+ required:
692
+ - kind
693
+ additionalProperties: false
694
+ CreateExperimentReadoutResponse:
695
+ type: object
696
+ properties:
697
+ id:
698
+ type: string
699
+ description: Id of the newly minted readout snapshot.
700
+ required:
701
+ - id
702
+ additionalProperties: false
703
+ ExperimentReadoutMetric:
704
+ type: object
705
+ description: Frozen per-metric numbers as rendered at mint time. Display-shaped, not row-shaped — the snapshot keeps rendering exactly what was decided on even if derivations change later.
706
+ properties:
707
+ name:
708
+ type: string
709
+ description: Metric name.
710
+ role:
711
+ type: string
712
+ enum:
713
+ - goal
714
+ - guardrail
715
+ - secondary
716
+ description: Metric role at mint time. `goal` drives the decision, `guardrail` blocks ship if degraded, `secondary` is informational.
717
+ delta:
718
+ description: Absolute difference vs. control (metric units), or `null`.
719
+ anyOf:
720
+ - type: number
721
+ - type: "null"
722
+ deltaPct:
723
+ description: Relative difference vs. control in percent, or `null`.
724
+ anyOf:
725
+ - type: number
726
+ - type: "null"
727
+ ci:
728
+ description: "Two-item `[low, high]` confidence interval on the delta at the project's configured confidence, or `null`."
729
+ anyOf:
730
+ - type: array
731
+ items:
732
+ type: number
733
+ minItems: 2
734
+ maxItems: 2
735
+ - type: "null"
736
+ p:
737
+ description: p-value vs. control, or `null`.
738
+ anyOf:
739
+ - type: number
740
+ - type: "null"
741
+ sig:
742
+ type: boolean
743
+ description: Whether the metric was statistically significant at mint time.
744
+ pass:
745
+ type: boolean
746
+ description: Guardrail pass/fail at mint time. Omitted for metrics where pass/fail doesn't apply.
747
+ required:
748
+ - name
749
+ - role
750
+ - delta
751
+ - deltaPct
752
+ - ci
753
+ - p
754
+ - sig
755
+ additionalProperties: false
756
+ ExperimentReadoutCaveat:
757
+ type: object
758
+ description: One caveat from the results view, frozen with its acknowledgment state at mint time.
759
+ properties:
760
+ id:
761
+ type: string
762
+ description: Stable caveat id.
763
+ severity:
764
+ type: string
765
+ enum:
766
+ - info
767
+ - warn
768
+ - danger
769
+ description: Caveat severity as rendered in the results view.
770
+ text:
771
+ type: string
772
+ description: Human-readable caveat text.
773
+ acknowledged:
774
+ type: boolean
775
+ description: Whether the caller ticked this caveat when minting (decision-gating acknowledgment).
776
+ required:
777
+ - id
778
+ - severity
779
+ - text
780
+ - acknowledged
781
+ additionalProperties: false
782
+ ExperimentReadoutApiRow:
783
+ type: object
784
+ description: An immutable, dated readout snapshot — the frozen results view captured when a decision was made. Never updated after insert.
785
+ properties:
786
+ id:
787
+ type: string
788
+ description: Stable readout id.
789
+ experimentId:
790
+ type: string
791
+ description: Id of the experiment the snapshot belongs to.
792
+ experimentName:
793
+ type: string
794
+ description: Experiment name at mint time (denormalised — survives renames).
795
+ kind:
796
+ type: string
797
+ enum:
798
+ - manual
799
+ - ship
800
+ - stop
801
+ description: Why the snapshot was minted — `manual` ("Share readout"), or automatically on `ship` / `stop`.
802
+ createdBy:
803
+ type: string
804
+ description: Email of the actor who minted the snapshot.
805
+ createdAt:
806
+ type: string
807
+ description: ISO-8601 mint timestamp.
808
+ verdict:
809
+ type: string
810
+ description: Server-computed verdict at mint time (e.g. `ship`, `hold`, `wait`, `invalid`).
811
+ title:
812
+ type: string
813
+ description: Headline of the results view at mint time.
814
+ why:
815
+ type: string
816
+ description: One-line explanation backing the verdict at mint time.
817
+ configHash:
818
+ type: string
819
+ description: sha-256 hex over the assignment-relevant config (salt, groups, allocation, universe, gate) — the snapshot is only comparable to the live view while this hash still matches.
820
+ metricsJson:
821
+ description: Frozen per-metric numbers as rendered at mint time, or `null` for legacy rows without a metrics slice.
822
+ anyOf:
823
+ - type: array
824
+ items:
825
+ $ref: "#/ExperimentReadoutMetric"
826
+ - type: "null"
827
+ caveatsJson:
828
+ description: The caveat list with its acknowledgment state at mint time, or `null` for legacy rows without one.
829
+ anyOf:
830
+ - type: array
831
+ items:
832
+ $ref: "#/ExperimentReadoutCaveat"
833
+ - type: "null"
834
+ usersJson:
835
+ description: Enrollment at mint time — per-group sample sizes plus the number of days the experiment had been running — or `null` when not captured.
836
+ anyOf:
837
+ - type: object
838
+ properties:
839
+ groups:
840
+ type: array
841
+ items:
842
+ type: object
843
+ properties:
844
+ name:
845
+ type: string
846
+ description: Group label.
847
+ n:
848
+ type: number
849
+ description: Enrolled units in the group at mint time.
850
+ required:
851
+ - name
852
+ - n
853
+ additionalProperties: false
854
+ description: One group's enrollment at mint time.
855
+ description: Per-group enrollment counts.
856
+ days:
857
+ type: number
858
+ description: Days the experiment had been running at mint time.
859
+ required:
860
+ - groups
861
+ - days
862
+ additionalProperties: false
863
+ - type: "null"
864
+ required:
865
+ - id
866
+ - experimentId
867
+ - experimentName
868
+ - kind
869
+ - createdBy
870
+ - createdAt
871
+ - verdict
872
+ - title
873
+ - why
874
+ - configHash
875
+ - metricsJson
876
+ - caveatsJson
877
+ - usersJson
878
+ additionalProperties: false
879
+ GetExperimentReadoutResponse:
880
+ $ref: "#/ExperimentReadoutApiRow"