@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
@@ -0,0 +1,293 @@
1
+ # The single wire shape for an experiment row, shared by `ListExperimentsResponse`
2
+ # (`data[]` items) and `GET /api/admin/experiments/{id}`. The app projects every
3
+ # experiment through one `toExperimentApiRow` allow-list at the HTTP boundary, so
4
+ # both endpoints return the SAME object — this schema is that allow-list.
5
+ #
6
+ # Two tiers of fields:
7
+ # • base (always present) — persisted columns + the pool-slice / headroom /
8
+ # version fields the serializer defaults (`?? null` / `?? 0` / `?? 1`), so
9
+ # they appear on every row. These are `required`.
10
+ # • enriched (list only) — verdict + goal/guardrail summary + exposure spark +
11
+ # resolved creator/editor emails. The list handler derives them for every
12
+ # row; the by-id handler returns the raw row, so they are `undefined` and
13
+ # drop out of the JSON. They are therefore OPTIONAL (present on list rows,
14
+ # absent on the by-id detail) — never `required`.
15
+ ExperimentApiRow:
16
+ type: object
17
+ properties:
18
+ id:
19
+ type: string
20
+ description: Stable opaque experiment id (`exp_…`).
21
+ name:
22
+ type: string
23
+ maxLength: 128
24
+ pattern: ^[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?)?$
25
+ description: Stable experiment key. Single segment or `folder.name` (a-z, 0-9, `_`/`-`; max 128 chars). Used by SDKs as `Shipeasy.getExperiment(user, '<name>')`. Immutable after create.
26
+ description:
27
+ anyOf:
28
+ - type: string
29
+ - type: "null"
30
+ hypothesis:
31
+ anyOf:
32
+ - type: string
33
+ - type: "null"
34
+ tag:
35
+ anyOf:
36
+ - type: string
37
+ - type: "null"
38
+ ownerEmail:
39
+ anyOf:
40
+ - type: string
41
+ - type: "null"
42
+ audience:
43
+ anyOf:
44
+ - type: string
45
+ - type: "null"
46
+ bucketBy:
47
+ anyOf:
48
+ - type: string
49
+ minLength: 1
50
+ maxLength: 128
51
+ pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$
52
+ description: User-attribute name used as the bucketing key — e.g. `user_id` (default), `session_id`, `device_id`, or a custom attribute like `company_id` to keep a whole org on one variant. Defaults to `user_id` when omitted.
53
+ - type: "null"
54
+ folder:
55
+ anyOf:
56
+ - type: string
57
+ - type: "null"
58
+ status:
59
+ type: string
60
+ enum:
61
+ - draft
62
+ - running
63
+ - stopped
64
+ - archived
65
+ universe:
66
+ type: string
67
+ description: Universe name this experiment draws from.
68
+ targetingGate:
69
+ anyOf:
70
+ - type: string
71
+ - type: "null"
72
+ holdoutGate:
73
+ anyOf:
74
+ - type: string
75
+ - type: "null"
76
+ description: Per-experiment holdout gate name (a `holdout`-type flag), or `null`.
77
+ allocationPct:
78
+ type: integer
79
+ minimum: -9007199254740991
80
+ maximum: 9007199254740991
81
+ description: Allocation in basis points (0–10000).
82
+ reservedHeadroom:
83
+ type: integer
84
+ minimum: 0
85
+ maximum: 10000
86
+ description: Basis points of the split reserved for appended variants (group weights sum to 10000 − this).
87
+ hashVersion:
88
+ type: integer
89
+ minimum: 1
90
+ description: Bucketing hash algorithm version for the experiment's pool slice (§B4). Defaults to 1.
91
+ poolOffsetBp:
92
+ anyOf:
93
+ - type: integer
94
+ minimum: 0
95
+ maximum: 10000
96
+ - type: "null"
97
+ description: Basis-point offset of the experiment's contiguous slice in the universe pool, or `null` before a slice is allocated.
98
+ poolSizeBp:
99
+ anyOf:
100
+ - type: integer
101
+ minimum: 0
102
+ maximum: 10000
103
+ - type: "null"
104
+ description: Basis-point width of the experiment's pool slice (equal to its allocation), or `null` before a slice is allocated.
105
+ salt:
106
+ type: string
107
+ params:
108
+ type: object
109
+ additionalProperties:
110
+ type: string
111
+ enum:
112
+ - string
113
+ - bool
114
+ - number
115
+ groups:
116
+ type: array
117
+ items:
118
+ type: object
119
+ properties:
120
+ name:
121
+ type: string
122
+ minLength: 1
123
+ maxLength: 64
124
+ description: Group label (e.g. `control`, `treatment_a`). Max 64 chars.
125
+ weight:
126
+ type: integer
127
+ minimum: 0
128
+ maximum: 10000
129
+ description: Allocation weight in basis points (0–10000). The sum across all groups must equal exactly **10000** (100%).
130
+ params:
131
+ default: {}
132
+ description: Per-group parameter values delivered to the SDK when a caller is hashed into this group. Keys must match the experiment's `params` schema.
133
+ type: object
134
+ additionalProperties: {}
135
+ required:
136
+ - name
137
+ - weight
138
+ additionalProperties: false
139
+ description: One variant in the experiment. Weights across all groups must sum to 10000.
140
+ significanceThreshold:
141
+ type: number
142
+ minRuntimeDays:
143
+ type: integer
144
+ minimum: -9007199254740991
145
+ maximum: 9007199254740991
146
+ minSampleSize:
147
+ type: integer
148
+ minimum: -9007199254740991
149
+ maximum: 9007199254740991
150
+ sequentialTesting:
151
+ type: boolean
152
+ startedAt:
153
+ anyOf:
154
+ - type: string
155
+ - type: "null"
156
+ description: ISO-8601 timestamp the experiment last transitioned to `running`, or `null`.
157
+ stoppedAt:
158
+ anyOf:
159
+ - type: string
160
+ - type: "null"
161
+ updatedAt:
162
+ type: string
163
+ version:
164
+ anyOf:
165
+ - type: integer
166
+ - type: "null"
167
+ description: Save counter (number of published edits), or `null` on pre-versioning rows.
168
+ creatorEmail:
169
+ anyOf:
170
+ - type: string
171
+ - type: "null"
172
+ description: "Resolved creator email (`created_by` → users). Enriched field: present on list rows, omitted from the by-id detail."
173
+ updaterEmail:
174
+ anyOf:
175
+ - type: string
176
+ - type: "null"
177
+ description: "Resolved last-editor email (`updated_by` → users). Enriched field: present on list rows, omitted from the by-id detail."
178
+ verdict:
179
+ type: string
180
+ enum:
181
+ - ship
182
+ - hold
183
+ - wait
184
+ - invalid
185
+ - draft
186
+ description: "Answer-first decision from the goal metric + guardrails + SRM vs. the significance threshold and min runtime: `ship`, `hold`, `wait`, `invalid`, `draft`. Enriched field: list rows only."
187
+ verdictTitle:
188
+ type: string
189
+ description: "Expanded verdict headline the results hero renders. Enriched field: list rows only."
190
+ verdictWhy:
191
+ type: string
192
+ description: "Verdict rationale the results hero renders. Enriched field: list rows only."
193
+ goalMetric:
194
+ anyOf:
195
+ - type: object
196
+ properties:
197
+ id:
198
+ type: string
199
+ name:
200
+ type: string
201
+ required:
202
+ - id
203
+ - name
204
+ additionalProperties: false
205
+ - type: "null"
206
+ description: "The experiment's goal metric `{ id, name }`, or `null` when none is set. Enriched field: list rows only."
207
+ guardrails:
208
+ type: array
209
+ items:
210
+ type: object
211
+ properties:
212
+ id:
213
+ type: string
214
+ name:
215
+ type: string
216
+ eventName:
217
+ anyOf:
218
+ - type: string
219
+ - type: "null"
220
+ required:
221
+ - id
222
+ - name
223
+ additionalProperties: false
224
+ description: "Guardrail metrics `{ id, name, eventName? }`. Enriched field: list rows only."
225
+ guardrailCount:
226
+ type: integer
227
+ minimum: 0
228
+ description: "Number of guardrail metrics. Enriched field: list rows only."
229
+ primaryLiftPct:
230
+ anyOf:
231
+ - type: number
232
+ - type: "null"
233
+ description: "Goal-metric lift of the leading variant vs. control, in percent, or `null` when not yet computed. Enriched field: list rows only."
234
+ significancePct:
235
+ anyOf:
236
+ - type: number
237
+ - type: "null"
238
+ description: "Statistical significance (1 − p) as a percent, or `null` when not yet computed. Enriched field: list rows only."
239
+ sampleSize:
240
+ anyOf:
241
+ - type: integer
242
+ - type: "null"
243
+ description: "Total distinct units analysed, or `null` when not yet computed. Enriched field: list rows only."
244
+ exposure:
245
+ type: array
246
+ items:
247
+ type: object
248
+ properties:
249
+ ds:
250
+ type: string
251
+ value:
252
+ type: number
253
+ required:
254
+ - ds
255
+ - value
256
+ additionalProperties: false
257
+ description: "Cumulative unique-users-enrolled series for the exposure sparkline. Enriched field: list rows only."
258
+ exposureTotal:
259
+ anyOf:
260
+ - type: integer
261
+ - type: "null"
262
+ description: "Total distinct units ever exposed (sparkline headline), or `null`. Enriched field: list rows only."
263
+ required:
264
+ - id
265
+ - name
266
+ - description
267
+ - hypothesis
268
+ - tag
269
+ - ownerEmail
270
+ - audience
271
+ - bucketBy
272
+ - folder
273
+ - status
274
+ - universe
275
+ - targetingGate
276
+ - holdoutGate
277
+ - allocationPct
278
+ - reservedHeadroom
279
+ - hashVersion
280
+ - poolOffsetBp
281
+ - poolSizeBp
282
+ - salt
283
+ - params
284
+ - groups
285
+ - significanceThreshold
286
+ - minRuntimeDays
287
+ - minSampleSize
288
+ - sequentialTesting
289
+ - startedAt
290
+ - stoppedAt
291
+ - updatedAt
292
+ - version
293
+ additionalProperties: false