@shipeasy/openapi 1.5.0 → 2.1.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.
- package/README.md +37 -0
- package/dist/chunk-EPLLHLZN.js +1616 -0
- package/dist/chunk-EPLLHLZN.js.map +1 -0
- package/dist/chunk-SPH5HWCD.js +3326 -0
- package/dist/chunk-SPH5HWCD.js.map +1 -0
- package/dist/client-pVkoo3Bf.d.ts +11186 -0
- package/dist/client.d.ts +1 -0
- package/dist/client.js +215 -0
- package/dist/client.js.map +1 -0
- package/dist/custom.d.ts +64 -0
- package/dist/custom.js +292 -0
- package/dist/custom.js.map +1 -0
- package/dist/index.d.ts +29 -17
- package/dist/index.js +253 -2458
- package/dist/index.js.map +1 -0
- package/dist/node-context.d.ts +85 -0
- package/dist/node-context.js +110 -0
- package/dist/node-context.js.map +1 -0
- package/dist/schemas.d.ts +7920 -0
- package/dist/schemas.js +1083 -0
- package/dist/schemas.js.map +1 -0
- package/openapi.json +15297 -3044
- package/openapi.yaml +13979 -0
- package/package.json +37 -21
- package/spec/components/errors.yaml +53 -0
- package/spec/components/parameters.yaml +24 -0
- package/spec/components/responses.yaml +107 -0
- package/spec/components/schemas/alert-rules.yaml +175 -0
- package/spec/components/schemas/attributes.yaml +157 -0
- package/spec/components/schemas/common.yaml +87 -0
- package/spec/components/schemas/configs.yaml +371 -0
- package/spec/components/schemas/connectors.yaml +593 -0
- package/spec/components/schemas/errors-api.yaml +209 -0
- package/spec/components/schemas/events.yaml +321 -0
- package/spec/components/schemas/experiments.yaml +865 -0
- package/spec/components/schemas/gate-templates.yaml +198 -0
- package/spec/components/schemas/gates.yaml +890 -0
- package/spec/components/schemas/i18n.yaml +478 -0
- package/spec/components/schemas/keys.yaml +186 -0
- package/spec/components/schemas/killswitches.yaml +309 -0
- package/spec/components/schemas/metrics.yaml +547 -0
- package/spec/components/schemas/ops.yaml +1011 -0
- package/spec/components/schemas/projects.yaml +222 -0
- package/spec/components/schemas/search.yaml +46 -0
- package/spec/components/schemas/universes.yaml +127 -0
- package/spec/openapi.yaml +348 -0
- package/spec/paths/alert-rules.yaml +250 -0
- package/spec/paths/attributes.yaml +261 -0
- package/spec/paths/configs.yaml +744 -0
- package/spec/paths/connectors.yaml +748 -0
- package/spec/paths/errors.yaml +382 -0
- package/spec/paths/events.yaml +366 -0
- package/spec/paths/experiments.yaml +777 -0
- package/spec/paths/gate-templates.yaml +263 -0
- package/spec/paths/gates.yaml +451 -0
- package/spec/paths/i18n.yaml +544 -0
- package/spec/paths/keys.yaml +181 -0
- package/spec/paths/killswitches.yaml +557 -0
- package/spec/paths/metrics.yaml +302 -0
- package/spec/paths/ops.yaml +446 -0
- package/spec/paths/projects.yaml +210 -0
- package/spec/paths/search.yaml +62 -0
- package/spec/paths/universes.yaml +247 -0
- package/dist/resources/alert-rules.d.ts +0 -50
- package/dist/resources/alert-rules.js +0 -75
- package/dist/resources/configs.d.ts +0 -681
- package/dist/resources/configs.js +0 -509
- package/dist/resources/experiments.d.ts +0 -849
- package/dist/resources/experiments.js +0 -707
- package/dist/resources/gates.d.ts +0 -808
- package/dist/resources/gates.js +0 -522
- package/dist/resources/index.d.ts +0 -2749
- package/dist/resources/index.js +0 -2391
- package/dist/resources/killswitches.d.ts +0 -436
- package/dist/resources/killswitches.js +0 -514
- package/dist/resources/universes.d.ts +0 -185
- package/dist/resources/universes.js +0 -234
- package/dist/schemas/alert-rules.d.ts +0 -65
- package/dist/schemas/alert-rules.js +0 -37
- package/dist/schemas/configs.d.ts +0 -154
- package/dist/schemas/configs.js +0 -134
- package/dist/schemas/constants.d.ts +0 -6
- package/dist/schemas/constants.js +0 -7
- package/dist/schemas/experiments.d.ts +0 -229
- package/dist/schemas/experiments.js +0 -221
- package/dist/schemas/folder.d.ts +0 -10
- package/dist/schemas/folder.js +0 -8
- package/dist/schemas/gates.d.ts +0 -386
- package/dist/schemas/gates.js +0 -190
- package/dist/schemas/index.d.ts +0 -11
- package/dist/schemas/index.js +0 -762
- package/dist/schemas/killswitches.d.ts +0 -110
- package/dist/schemas/killswitches.js +0 -226
- package/dist/schemas/metric-name.d.ts +0 -5
- package/dist/schemas/metric-name.js +0 -6
- package/dist/schemas/pagination.d.ts +0 -37
- package/dist/schemas/pagination.js +0 -44
- package/dist/schemas/universes.d.ts +0 -35
- package/dist/schemas/universes.js +0 -55
- package/dist/transport.d.ts +0 -30
- package/dist/transport.js +0 -44
|
@@ -0,0 +1,547 @@
|
|
|
1
|
+
ListMetricsResponse:
|
|
2
|
+
type: array
|
|
3
|
+
items:
|
|
4
|
+
type: object
|
|
5
|
+
properties:
|
|
6
|
+
id:
|
|
7
|
+
type: string
|
|
8
|
+
description: Stable opaque metric id.
|
|
9
|
+
name:
|
|
10
|
+
type: string
|
|
11
|
+
description: Metric key.
|
|
12
|
+
folder:
|
|
13
|
+
anyOf:
|
|
14
|
+
- type: string
|
|
15
|
+
- type: "null"
|
|
16
|
+
description: Folder grouping the metric, or `null`.
|
|
17
|
+
eventName:
|
|
18
|
+
type: string
|
|
19
|
+
description: Source event name (camelCase in response).
|
|
20
|
+
query:
|
|
21
|
+
description: Rendered DSL text form of the query, or `null` if it could not be rendered.
|
|
22
|
+
anyOf:
|
|
23
|
+
- type: string
|
|
24
|
+
- type: "null"
|
|
25
|
+
queryIr:
|
|
26
|
+
$ref: "#/QueryIr"
|
|
27
|
+
direction:
|
|
28
|
+
type: string
|
|
29
|
+
enum:
|
|
30
|
+
- higher_better
|
|
31
|
+
- lower_better
|
|
32
|
+
- neutral
|
|
33
|
+
description: Desired direction of movement. `higher_better` (default), `lower_better`, or `neutral` (guardrail).
|
|
34
|
+
winsorizePct:
|
|
35
|
+
description: Winsorise percentile applied to the metric.
|
|
36
|
+
type: number
|
|
37
|
+
minDetectableEffect:
|
|
38
|
+
description: Configured MDE, or `null`.
|
|
39
|
+
anyOf:
|
|
40
|
+
- type: number
|
|
41
|
+
- type: "null"
|
|
42
|
+
createdAt:
|
|
43
|
+
description: ISO-8601 creation timestamp.
|
|
44
|
+
type: string
|
|
45
|
+
updatedAt:
|
|
46
|
+
description: ISO-8601 last-update timestamp.
|
|
47
|
+
type: string
|
|
48
|
+
required:
|
|
49
|
+
- id
|
|
50
|
+
- name
|
|
51
|
+
- folder
|
|
52
|
+
- eventName
|
|
53
|
+
- query
|
|
54
|
+
- queryIr
|
|
55
|
+
additionalProperties: {}
|
|
56
|
+
description: A metric definition.
|
|
57
|
+
description: Every metric in the project (the list endpoint is not paginated).
|
|
58
|
+
GetMetricResponse:
|
|
59
|
+
type: object
|
|
60
|
+
properties:
|
|
61
|
+
id:
|
|
62
|
+
type: string
|
|
63
|
+
description: Stable opaque metric id.
|
|
64
|
+
name:
|
|
65
|
+
type: string
|
|
66
|
+
description: Metric key.
|
|
67
|
+
folder:
|
|
68
|
+
anyOf:
|
|
69
|
+
- type: string
|
|
70
|
+
- type: "null"
|
|
71
|
+
description: Folder grouping the metric, or `null`.
|
|
72
|
+
eventName:
|
|
73
|
+
type: string
|
|
74
|
+
description: Source event name (camelCase in response).
|
|
75
|
+
query:
|
|
76
|
+
description: Rendered DSL text form of the query, or `null` if it could not be rendered.
|
|
77
|
+
anyOf:
|
|
78
|
+
- type: string
|
|
79
|
+
- type: "null"
|
|
80
|
+
queryIr:
|
|
81
|
+
$ref: "#/QueryIr"
|
|
82
|
+
direction:
|
|
83
|
+
type: string
|
|
84
|
+
enum:
|
|
85
|
+
- higher_better
|
|
86
|
+
- lower_better
|
|
87
|
+
- neutral
|
|
88
|
+
description: Desired direction of movement. `higher_better` (default), `lower_better`, or `neutral` (guardrail).
|
|
89
|
+
winsorizePct:
|
|
90
|
+
description: Winsorise percentile applied to the metric.
|
|
91
|
+
type: number
|
|
92
|
+
minDetectableEffect:
|
|
93
|
+
description: Configured MDE, or `null`.
|
|
94
|
+
anyOf:
|
|
95
|
+
- type: number
|
|
96
|
+
- type: "null"
|
|
97
|
+
createdAt:
|
|
98
|
+
description: ISO-8601 creation timestamp.
|
|
99
|
+
type: string
|
|
100
|
+
updatedAt:
|
|
101
|
+
description: ISO-8601 last-update timestamp.
|
|
102
|
+
type: string
|
|
103
|
+
required:
|
|
104
|
+
- id
|
|
105
|
+
- name
|
|
106
|
+
- folder
|
|
107
|
+
- eventName
|
|
108
|
+
- query
|
|
109
|
+
- queryIr
|
|
110
|
+
additionalProperties: {}
|
|
111
|
+
description: A metric definition.
|
|
112
|
+
QueryIr:
|
|
113
|
+
description: Typed query IR — the structured alternative to the `query` DSL string. Exactly one of `query` / `query_ir` is supplied per metric body.
|
|
114
|
+
type: object
|
|
115
|
+
properties:
|
|
116
|
+
agg:
|
|
117
|
+
oneOf:
|
|
118
|
+
- type: object
|
|
119
|
+
properties:
|
|
120
|
+
kind:
|
|
121
|
+
type: string
|
|
122
|
+
const: count_users
|
|
123
|
+
required:
|
|
124
|
+
- kind
|
|
125
|
+
additionalProperties: false
|
|
126
|
+
- type: object
|
|
127
|
+
properties:
|
|
128
|
+
kind:
|
|
129
|
+
type: string
|
|
130
|
+
const: count_events
|
|
131
|
+
required:
|
|
132
|
+
- kind
|
|
133
|
+
additionalProperties: false
|
|
134
|
+
- type: object
|
|
135
|
+
properties:
|
|
136
|
+
kind:
|
|
137
|
+
type: string
|
|
138
|
+
const: sum
|
|
139
|
+
required:
|
|
140
|
+
- kind
|
|
141
|
+
additionalProperties: false
|
|
142
|
+
- type: object
|
|
143
|
+
properties:
|
|
144
|
+
kind:
|
|
145
|
+
type: string
|
|
146
|
+
const: avg
|
|
147
|
+
required:
|
|
148
|
+
- kind
|
|
149
|
+
additionalProperties: false
|
|
150
|
+
- type: object
|
|
151
|
+
properties:
|
|
152
|
+
kind:
|
|
153
|
+
type: string
|
|
154
|
+
const: min
|
|
155
|
+
required:
|
|
156
|
+
- kind
|
|
157
|
+
additionalProperties: false
|
|
158
|
+
- type: object
|
|
159
|
+
properties:
|
|
160
|
+
kind:
|
|
161
|
+
type: string
|
|
162
|
+
const: max
|
|
163
|
+
required:
|
|
164
|
+
- kind
|
|
165
|
+
additionalProperties: false
|
|
166
|
+
- type: object
|
|
167
|
+
properties:
|
|
168
|
+
kind:
|
|
169
|
+
type: string
|
|
170
|
+
const: unique
|
|
171
|
+
required:
|
|
172
|
+
- kind
|
|
173
|
+
additionalProperties: false
|
|
174
|
+
- type: object
|
|
175
|
+
properties:
|
|
176
|
+
kind:
|
|
177
|
+
type: string
|
|
178
|
+
const: quantile
|
|
179
|
+
p:
|
|
180
|
+
anyOf:
|
|
181
|
+
- type: number
|
|
182
|
+
const: 0.5
|
|
183
|
+
- type: number
|
|
184
|
+
const: 0.75
|
|
185
|
+
- type: number
|
|
186
|
+
const: 0.9
|
|
187
|
+
- type: number
|
|
188
|
+
const: 0.95
|
|
189
|
+
- type: number
|
|
190
|
+
const: 0.99
|
|
191
|
+
- type: number
|
|
192
|
+
const: 0.999
|
|
193
|
+
description: Quantile fraction (0.5 = p50 … 0.999 = p999).
|
|
194
|
+
required:
|
|
195
|
+
- kind
|
|
196
|
+
- p
|
|
197
|
+
additionalProperties: false
|
|
198
|
+
- type: object
|
|
199
|
+
properties:
|
|
200
|
+
kind:
|
|
201
|
+
type: string
|
|
202
|
+
const: retention_Nd
|
|
203
|
+
n:
|
|
204
|
+
type: integer
|
|
205
|
+
minimum: 1
|
|
206
|
+
maximum: 90
|
|
207
|
+
description: Retention window in days (1–90).
|
|
208
|
+
required:
|
|
209
|
+
- kind
|
|
210
|
+
- n
|
|
211
|
+
additionalProperties: false
|
|
212
|
+
- type: object
|
|
213
|
+
properties:
|
|
214
|
+
kind:
|
|
215
|
+
type: string
|
|
216
|
+
const: ratio
|
|
217
|
+
numerator:
|
|
218
|
+
type: object
|
|
219
|
+
properties:
|
|
220
|
+
agg:
|
|
221
|
+
type: string
|
|
222
|
+
enum:
|
|
223
|
+
- count_users
|
|
224
|
+
- count_events
|
|
225
|
+
description: Counting mode for this ratio arm.
|
|
226
|
+
metric:
|
|
227
|
+
type: string
|
|
228
|
+
minLength: 1
|
|
229
|
+
maxLength: 128
|
|
230
|
+
description: Source event name for this ratio arm.
|
|
231
|
+
filters:
|
|
232
|
+
description: Optional label filters.
|
|
233
|
+
maxItems: 16
|
|
234
|
+
type: array
|
|
235
|
+
items:
|
|
236
|
+
type: object
|
|
237
|
+
properties:
|
|
238
|
+
label:
|
|
239
|
+
type: string
|
|
240
|
+
pattern: ^[a-z_][a-z0-9_]{0,63}$
|
|
241
|
+
description: Event property / label identifier.
|
|
242
|
+
op:
|
|
243
|
+
type: string
|
|
244
|
+
enum:
|
|
245
|
+
- =
|
|
246
|
+
- "!="
|
|
247
|
+
- =~
|
|
248
|
+
- "!~"
|
|
249
|
+
description: Match operator (`=~`/`!~` are regex).
|
|
250
|
+
value:
|
|
251
|
+
type: string
|
|
252
|
+
maxLength: 512
|
|
253
|
+
description: Quoted filter value (coerced for numeric labels).
|
|
254
|
+
required:
|
|
255
|
+
- label
|
|
256
|
+
- op
|
|
257
|
+
- value
|
|
258
|
+
additionalProperties: false
|
|
259
|
+
description: One label filter on the source event.
|
|
260
|
+
required:
|
|
261
|
+
- agg
|
|
262
|
+
- metric
|
|
263
|
+
additionalProperties: false
|
|
264
|
+
description: Numerator or denominator arm of a `ratio` aggregation.
|
|
265
|
+
denominator:
|
|
266
|
+
type: object
|
|
267
|
+
properties:
|
|
268
|
+
agg:
|
|
269
|
+
type: string
|
|
270
|
+
enum:
|
|
271
|
+
- count_users
|
|
272
|
+
- count_events
|
|
273
|
+
description: Counting mode for this ratio arm.
|
|
274
|
+
metric:
|
|
275
|
+
type: string
|
|
276
|
+
minLength: 1
|
|
277
|
+
maxLength: 128
|
|
278
|
+
description: Source event name for this ratio arm.
|
|
279
|
+
filters:
|
|
280
|
+
description: Optional label filters.
|
|
281
|
+
maxItems: 16
|
|
282
|
+
type: array
|
|
283
|
+
items:
|
|
284
|
+
type: object
|
|
285
|
+
properties:
|
|
286
|
+
label:
|
|
287
|
+
type: string
|
|
288
|
+
pattern: ^[a-z_][a-z0-9_]{0,63}$
|
|
289
|
+
description: Event property / label identifier.
|
|
290
|
+
op:
|
|
291
|
+
type: string
|
|
292
|
+
enum:
|
|
293
|
+
- =
|
|
294
|
+
- "!="
|
|
295
|
+
- =~
|
|
296
|
+
- "!~"
|
|
297
|
+
description: Match operator (`=~`/`!~` are regex).
|
|
298
|
+
value:
|
|
299
|
+
type: string
|
|
300
|
+
maxLength: 512
|
|
301
|
+
description: Quoted filter value (coerced for numeric labels).
|
|
302
|
+
required:
|
|
303
|
+
- label
|
|
304
|
+
- op
|
|
305
|
+
- value
|
|
306
|
+
additionalProperties: false
|
|
307
|
+
description: One label filter on the source event.
|
|
308
|
+
required:
|
|
309
|
+
- agg
|
|
310
|
+
- metric
|
|
311
|
+
additionalProperties: false
|
|
312
|
+
description: Numerator or denominator arm of a `ratio` aggregation.
|
|
313
|
+
required:
|
|
314
|
+
- kind
|
|
315
|
+
- numerator
|
|
316
|
+
- denominator
|
|
317
|
+
additionalProperties: false
|
|
318
|
+
description: Aggregation function applied to the source event.
|
|
319
|
+
metric:
|
|
320
|
+
type: string
|
|
321
|
+
minLength: 1
|
|
322
|
+
maxLength: 128
|
|
323
|
+
description: Source event name (must equal `event_name`).
|
|
324
|
+
valueLabel:
|
|
325
|
+
description: Numeric property summed/averaged for `sum`/`avg`/quantile aggregations.
|
|
326
|
+
type: string
|
|
327
|
+
minLength: 1
|
|
328
|
+
maxLength: 128
|
|
329
|
+
filters:
|
|
330
|
+
default: []
|
|
331
|
+
description: Label filters on the event.
|
|
332
|
+
maxItems: 16
|
|
333
|
+
type: array
|
|
334
|
+
items:
|
|
335
|
+
type: object
|
|
336
|
+
properties:
|
|
337
|
+
label:
|
|
338
|
+
type: string
|
|
339
|
+
pattern: ^[a-z_][a-z0-9_]{0,63}$
|
|
340
|
+
description: Event property / label identifier.
|
|
341
|
+
op:
|
|
342
|
+
type: string
|
|
343
|
+
enum:
|
|
344
|
+
- =
|
|
345
|
+
- "!="
|
|
346
|
+
- =~
|
|
347
|
+
- "!~"
|
|
348
|
+
description: Match operator (`=~`/`!~` are regex).
|
|
349
|
+
value:
|
|
350
|
+
type: string
|
|
351
|
+
maxLength: 512
|
|
352
|
+
description: Quoted filter value (coerced for numeric labels).
|
|
353
|
+
required:
|
|
354
|
+
- label
|
|
355
|
+
- op
|
|
356
|
+
- value
|
|
357
|
+
additionalProperties: false
|
|
358
|
+
description: One label filter on the source event.
|
|
359
|
+
groupBy:
|
|
360
|
+
type: object
|
|
361
|
+
properties:
|
|
362
|
+
op:
|
|
363
|
+
type: string
|
|
364
|
+
enum:
|
|
365
|
+
- by
|
|
366
|
+
- without
|
|
367
|
+
description: "`by` keeps the listed labels; `without` drops them."
|
|
368
|
+
labels:
|
|
369
|
+
maxItems: 5
|
|
370
|
+
type: array
|
|
371
|
+
items:
|
|
372
|
+
type: string
|
|
373
|
+
pattern: ^[a-z_][a-z0-9_]{0,63}$
|
|
374
|
+
description: Event property / label identifier.
|
|
375
|
+
description: Labels to group by (max 5).
|
|
376
|
+
required:
|
|
377
|
+
- op
|
|
378
|
+
- labels
|
|
379
|
+
additionalProperties: false
|
|
380
|
+
description: Optional group-by clause (ignored for experiment analysis).
|
|
381
|
+
required:
|
|
382
|
+
- agg
|
|
383
|
+
- metric
|
|
384
|
+
additionalProperties: false
|
|
385
|
+
MetricEventName:
|
|
386
|
+
type: string
|
|
387
|
+
minLength: 1
|
|
388
|
+
description: Source event the query reads from.
|
|
389
|
+
MetricQueryDsl:
|
|
390
|
+
description: Metric query DSL string, e.g. `sum(purchase, amount)`. The alternative to `query_ir`. Every label the query references — in filters, the value position, `by (…)`, or `without (…)` — must exist as a property on the tracked event's payload; a query over a label the event never carries validates fine but returns empty results.
|
|
391
|
+
type: string
|
|
392
|
+
minLength: 1
|
|
393
|
+
maxLength: 4096
|
|
394
|
+
MetricWinsorizePct:
|
|
395
|
+
default: 99
|
|
396
|
+
description: Winsorise percentile (1–99) to clamp outliers. Defaults to 99.
|
|
397
|
+
type: integer
|
|
398
|
+
minimum: 1
|
|
399
|
+
maximum: 99
|
|
400
|
+
MetricMinDetectableEffect:
|
|
401
|
+
default: null
|
|
402
|
+
description: Minimum detectable effect (relative, 0–1) for power planning. `null` to omit.
|
|
403
|
+
anyOf:
|
|
404
|
+
- type: number
|
|
405
|
+
- type: "null"
|
|
406
|
+
MetricDirection:
|
|
407
|
+
default: higher_better
|
|
408
|
+
type: string
|
|
409
|
+
enum:
|
|
410
|
+
- higher_better
|
|
411
|
+
- lower_better
|
|
412
|
+
- neutral
|
|
413
|
+
description: Desired direction of movement. `higher_better` (default), `lower_better`, or `neutral` (guardrail).
|
|
414
|
+
CreateMetricRequest:
|
|
415
|
+
oneOf:
|
|
416
|
+
- $ref: "#/CreateMetricWithQuery"
|
|
417
|
+
- $ref: "#/CreateMetricWithQueryIr"
|
|
418
|
+
description: 'Body for `POST /api/admin/metrics`. Requires `name`, `event_name`, and exactly one of `query` / `query_ir` — modelled as a `oneOf` of two strict variants, so supplying both (or neither) is rejected.'
|
|
419
|
+
CreateMetricWithQuery:
|
|
420
|
+
type: object
|
|
421
|
+
properties:
|
|
422
|
+
name:
|
|
423
|
+
$ref: ./common.yaml#/MetricName
|
|
424
|
+
folder:
|
|
425
|
+
$ref: ./common.yaml#/Folder
|
|
426
|
+
event_name:
|
|
427
|
+
$ref: "#/MetricEventName"
|
|
428
|
+
query:
|
|
429
|
+
$ref: "#/MetricQueryDsl"
|
|
430
|
+
winsorize_pct:
|
|
431
|
+
$ref: "#/MetricWinsorizePct"
|
|
432
|
+
min_detectable_effect:
|
|
433
|
+
$ref: "#/MetricMinDetectableEffect"
|
|
434
|
+
direction:
|
|
435
|
+
$ref: "#/MetricDirection"
|
|
436
|
+
required:
|
|
437
|
+
- name
|
|
438
|
+
- event_name
|
|
439
|
+
- query
|
|
440
|
+
additionalProperties: false
|
|
441
|
+
description: Create a metric, supplying the query as a `query` DSL string.
|
|
442
|
+
CreateMetricWithQueryIr:
|
|
443
|
+
type: object
|
|
444
|
+
properties:
|
|
445
|
+
name:
|
|
446
|
+
$ref: ./common.yaml#/MetricName
|
|
447
|
+
folder:
|
|
448
|
+
$ref: ./common.yaml#/Folder
|
|
449
|
+
event_name:
|
|
450
|
+
$ref: "#/MetricEventName"
|
|
451
|
+
query_ir:
|
|
452
|
+
$ref: "#/QueryIr"
|
|
453
|
+
winsorize_pct:
|
|
454
|
+
$ref: "#/MetricWinsorizePct"
|
|
455
|
+
min_detectable_effect:
|
|
456
|
+
$ref: "#/MetricMinDetectableEffect"
|
|
457
|
+
direction:
|
|
458
|
+
$ref: "#/MetricDirection"
|
|
459
|
+
required:
|
|
460
|
+
- name
|
|
461
|
+
- event_name
|
|
462
|
+
- query_ir
|
|
463
|
+
additionalProperties: false
|
|
464
|
+
description: Create a metric, supplying the query as a typed `query_ir`.
|
|
465
|
+
UpdateMetricRequest:
|
|
466
|
+
oneOf:
|
|
467
|
+
- $ref: "#/UpdateMetricWithQuery"
|
|
468
|
+
- $ref: "#/UpdateMetricWithQueryIr"
|
|
469
|
+
- $ref: "#/UpdateMetricFields"
|
|
470
|
+
description: "Body for `PATCH /api/admin/metrics/{id}`. Every field is optional (`name` is immutable); provide at most one of `query` / `query_ir` — modelled as a `oneOf` of three disjoint strict variants (query-only, query_ir-only, or neither), so supplying both is rejected."
|
|
471
|
+
UpdateMetricWithQuery:
|
|
472
|
+
type: object
|
|
473
|
+
properties:
|
|
474
|
+
folder:
|
|
475
|
+
$ref: ./common.yaml#/Folder
|
|
476
|
+
event_name:
|
|
477
|
+
$ref: "#/MetricEventName"
|
|
478
|
+
query:
|
|
479
|
+
$ref: "#/MetricQueryDsl"
|
|
480
|
+
winsorize_pct:
|
|
481
|
+
$ref: "#/MetricWinsorizePct"
|
|
482
|
+
min_detectable_effect:
|
|
483
|
+
$ref: "#/MetricMinDetectableEffect"
|
|
484
|
+
direction:
|
|
485
|
+
$ref: "#/MetricDirection"
|
|
486
|
+
required:
|
|
487
|
+
- query
|
|
488
|
+
additionalProperties: false
|
|
489
|
+
description: Update-metric variant that replaces the query with a `query` DSL string.
|
|
490
|
+
UpdateMetricWithQueryIr:
|
|
491
|
+
type: object
|
|
492
|
+
properties:
|
|
493
|
+
folder:
|
|
494
|
+
$ref: ./common.yaml#/Folder
|
|
495
|
+
event_name:
|
|
496
|
+
$ref: "#/MetricEventName"
|
|
497
|
+
query_ir:
|
|
498
|
+
$ref: "#/QueryIr"
|
|
499
|
+
winsorize_pct:
|
|
500
|
+
$ref: "#/MetricWinsorizePct"
|
|
501
|
+
min_detectable_effect:
|
|
502
|
+
$ref: "#/MetricMinDetectableEffect"
|
|
503
|
+
direction:
|
|
504
|
+
$ref: "#/MetricDirection"
|
|
505
|
+
required:
|
|
506
|
+
- query_ir
|
|
507
|
+
additionalProperties: false
|
|
508
|
+
description: Update-metric variant that replaces the query with a typed `query_ir`.
|
|
509
|
+
UpdateMetricFields:
|
|
510
|
+
type: object
|
|
511
|
+
properties:
|
|
512
|
+
folder:
|
|
513
|
+
$ref: ./common.yaml#/Folder
|
|
514
|
+
event_name:
|
|
515
|
+
$ref: "#/MetricEventName"
|
|
516
|
+
winsorize_pct:
|
|
517
|
+
$ref: "#/MetricWinsorizePct"
|
|
518
|
+
min_detectable_effect:
|
|
519
|
+
$ref: "#/MetricMinDetectableEffect"
|
|
520
|
+
direction:
|
|
521
|
+
$ref: "#/MetricDirection"
|
|
522
|
+
additionalProperties: false
|
|
523
|
+
description: Update-metric variant that leaves the query untouched (metadata-only edit — folder, event, winsorisation, MDE, direction).
|
|
524
|
+
CreateMetricResponse:
|
|
525
|
+
type: object
|
|
526
|
+
properties:
|
|
527
|
+
id:
|
|
528
|
+
type: string
|
|
529
|
+
description: Newly assigned metric id.
|
|
530
|
+
name:
|
|
531
|
+
type: string
|
|
532
|
+
description: Metric name that was created.
|
|
533
|
+
required:
|
|
534
|
+
- id
|
|
535
|
+
- name
|
|
536
|
+
additionalProperties: false
|
|
537
|
+
description: Result of a successful metric create.
|
|
538
|
+
DeleteMetricResponse:
|
|
539
|
+
type: object
|
|
540
|
+
properties:
|
|
541
|
+
ok:
|
|
542
|
+
type: boolean
|
|
543
|
+
const: true
|
|
544
|
+
required:
|
|
545
|
+
- ok
|
|
546
|
+
additionalProperties: false
|
|
547
|
+
description: Soft-delete (archive) acknowledgement.
|