@shipeasy/devtools-core 1.0.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/LICENSE +40 -0
- package/README.md +19 -0
- package/dist/api.d.mts +143 -0
- package/dist/api.d.ts +143 -0
- package/dist/api.js +10 -0
- package/dist/api.mjs +10 -0
- package/dist/auth.d.mts +57 -0
- package/dist/auth.d.ts +57 -0
- package/dist/auth.js +12 -0
- package/dist/auth.mjs +12 -0
- package/dist/chunk-2B75JLTX.js +25 -0
- package/dist/chunk-5VQLXGNR.mjs +101 -0
- package/dist/chunk-6SU5REDK.mjs +2848 -0
- package/dist/chunk-7NO55TFC.mjs +25 -0
- package/dist/chunk-GUTBZI2O.js +2848 -0
- package/dist/chunk-I2KLQ2HA.js +22 -0
- package/dist/chunk-KPO3R7ND.js +28 -0
- package/dist/chunk-LCRTLHGL.js +101 -0
- package/dist/chunk-LZDNBMH6.mjs +1394 -0
- package/dist/chunk-MK56AKZR.js +178 -0
- package/dist/chunk-RANNOC72.js +72 -0
- package/dist/chunk-RH6X24HG.mjs +28 -0
- package/dist/chunk-U5DDQYSF.mjs +22 -0
- package/dist/chunk-VHYOR3XA.mjs +178 -0
- package/dist/chunk-WP2TWHG3.mjs +72 -0
- package/dist/chunk-YQHCUZGP.js +1394 -0
- package/dist/feedback-state.d.mts +29 -0
- package/dist/feedback-state.d.ts +29 -0
- package/dist/feedback-state.js +9 -0
- package/dist/feedback-state.mjs +9 -0
- package/dist/forms.d.mts +95 -0
- package/dist/forms.d.ts +95 -0
- package/dist/forms.js +21 -0
- package/dist/forms.mjs +21 -0
- package/dist/gate-flow.d.mts +41 -0
- package/dist/gate-flow.d.ts +41 -0
- package/dist/gate-flow.js +17 -0
- package/dist/gate-flow.mjs +17 -0
- package/dist/index.d.mts +10 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +86 -0
- package/dist/index.mjs +86 -0
- package/dist/public-report.d.mts +56 -0
- package/dist/public-report.d.ts +56 -0
- package/dist/public-report.js +12 -0
- package/dist/public-report.mjs +12 -0
- package/dist/self-report.d.mts +25 -0
- package/dist/self-report.d.ts +25 -0
- package/dist/self-report.js +73 -0
- package/dist/self-report.mjs +73 -0
- package/dist/types-D0sroUDD.d.mts +278 -0
- package/dist/types-D0sroUDD.d.ts +278 -0
- package/dist/zod.gen-DTKpgw-T.d.mts +64 -0
- package/dist/zod.gen-DTKpgw-T.d.ts +64 -0
- package/package.json +58 -0
|
@@ -0,0 +1,2848 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// src/generated/zod.gen.ts
|
|
2
|
+
var _zod = require('zod'); var z = _interopRequireWildcard(_zod);
|
|
3
|
+
var zListGatesResponse = z.object({
|
|
4
|
+
data: z.array(z.object({
|
|
5
|
+
id: z.string(),
|
|
6
|
+
name: z.string().max(128).regex(/^[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?)?$/),
|
|
7
|
+
enabled: z.union([
|
|
8
|
+
z.boolean(),
|
|
9
|
+
z.int().gte(0).lte(1)
|
|
10
|
+
]),
|
|
11
|
+
type: z.enum(["targeting", "holdout"]).optional(),
|
|
12
|
+
rolloutPct: z.int().gte(0).lte(1e4),
|
|
13
|
+
rules: z.array(z.object({
|
|
14
|
+
attr: z.string().min(1),
|
|
15
|
+
op: z.enum([
|
|
16
|
+
"eq",
|
|
17
|
+
"neq",
|
|
18
|
+
"in",
|
|
19
|
+
"not_in",
|
|
20
|
+
"gt",
|
|
21
|
+
"gte",
|
|
22
|
+
"lt",
|
|
23
|
+
"lte",
|
|
24
|
+
"contains",
|
|
25
|
+
"regex",
|
|
26
|
+
"semver_gt",
|
|
27
|
+
"semver_gte",
|
|
28
|
+
"semver_lt",
|
|
29
|
+
"semver_lte",
|
|
30
|
+
"gate_pass",
|
|
31
|
+
"exp_in"
|
|
32
|
+
]),
|
|
33
|
+
value: z.unknown()
|
|
34
|
+
})).optional(),
|
|
35
|
+
salt: z.string().optional(),
|
|
36
|
+
title: z.string().nullish(),
|
|
37
|
+
description: z.string().nullish(),
|
|
38
|
+
folder: z.string().nullish(),
|
|
39
|
+
groupName: z.string().nullish(),
|
|
40
|
+
ownerEmail: z.string().nullish(),
|
|
41
|
+
stack: z.array(z.union([z.object({
|
|
42
|
+
id: z.string().min(1),
|
|
43
|
+
type: z.literal("condition"),
|
|
44
|
+
name: z.string().optional(),
|
|
45
|
+
fromTemplate: z.string().nullish(),
|
|
46
|
+
pass: z.enum(["all", "any"]).optional(),
|
|
47
|
+
rules: z.array(z.object({
|
|
48
|
+
attr: z.string().min(1),
|
|
49
|
+
op: z.enum([
|
|
50
|
+
"eq",
|
|
51
|
+
"neq",
|
|
52
|
+
"in",
|
|
53
|
+
"not_in",
|
|
54
|
+
"gt",
|
|
55
|
+
"gte",
|
|
56
|
+
"lt",
|
|
57
|
+
"lte",
|
|
58
|
+
"contains",
|
|
59
|
+
"regex",
|
|
60
|
+
"semver_gt",
|
|
61
|
+
"semver_gte",
|
|
62
|
+
"semver_lt",
|
|
63
|
+
"semver_lte",
|
|
64
|
+
"gate_pass",
|
|
65
|
+
"exp_in"
|
|
66
|
+
]),
|
|
67
|
+
value: z.unknown()
|
|
68
|
+
})).optional().default([]),
|
|
69
|
+
rolloutPct: z.int().gte(0).lte(1e4).optional(),
|
|
70
|
+
bucketBy: z.string().optional(),
|
|
71
|
+
salt: z.string().optional(),
|
|
72
|
+
ramp: z.object({
|
|
73
|
+
from: z.int().gte(0).lte(1e4),
|
|
74
|
+
to: z.int().gte(0).lte(1e4),
|
|
75
|
+
startAt: z.int().gte(0).lte(9007199254740991),
|
|
76
|
+
durationMs: z.int().gt(0).lte(9007199254740991)
|
|
77
|
+
}).optional(),
|
|
78
|
+
locked: z.boolean().optional()
|
|
79
|
+
}), z.object({
|
|
80
|
+
id: z.string().min(1),
|
|
81
|
+
type: z.literal("rollout"),
|
|
82
|
+
name: z.string().optional(),
|
|
83
|
+
fromTemplate: z.string().nullish(),
|
|
84
|
+
rolloutPct: z.int().gte(0).lte(1e4),
|
|
85
|
+
bucketBy: z.string().optional(),
|
|
86
|
+
salt: z.string().optional(),
|
|
87
|
+
ramp: z.object({
|
|
88
|
+
from: z.int().gte(0).lte(1e4),
|
|
89
|
+
to: z.int().gte(0).lte(1e4),
|
|
90
|
+
startAt: z.int().gte(0).lte(9007199254740991),
|
|
91
|
+
durationMs: z.int().gt(0).lte(9007199254740991)
|
|
92
|
+
}).optional(),
|
|
93
|
+
locked: z.boolean().optional()
|
|
94
|
+
})])).nullish(),
|
|
95
|
+
updatedAt: z.string()
|
|
96
|
+
})),
|
|
97
|
+
next_cursor: z.string().nullable()
|
|
98
|
+
});
|
|
99
|
+
var zErrorCode = z.enum([
|
|
100
|
+
"BAD_REQUEST",
|
|
101
|
+
"UNAUTHORIZED",
|
|
102
|
+
"FORBIDDEN",
|
|
103
|
+
"PLAN_REQUIRED",
|
|
104
|
+
"NOT_FOUND",
|
|
105
|
+
"ALREADY_EXISTS",
|
|
106
|
+
"INVALID_TRANSITION",
|
|
107
|
+
"IMMUTABLE_FIELD",
|
|
108
|
+
"READ_ONLY",
|
|
109
|
+
"REFERENCED_IN_USE",
|
|
110
|
+
"VALIDATION",
|
|
111
|
+
"REFERENCED_NOT_FOUND",
|
|
112
|
+
"GROUPS_WEIGHT_SUM",
|
|
113
|
+
"EVENT_PENDING",
|
|
114
|
+
"INTERNAL",
|
|
115
|
+
"PLAN_LIMIT",
|
|
116
|
+
"EXPERIMENT_NO_GOAL_METRIC",
|
|
117
|
+
"EXPERIMENT_ARCHIVED_RESTART",
|
|
118
|
+
"EXPERIMENT_RESTORE_INVALID",
|
|
119
|
+
"EXPERIMENT_NOT_RUNNING",
|
|
120
|
+
"EXPERIMENT_RUNNING_ARCHIVE",
|
|
121
|
+
"EXPERIMENT_IMMUTABLE_FIELD",
|
|
122
|
+
"METRIC_NOT_FOUND",
|
|
123
|
+
"METRIC_UNKNOWN_ID"
|
|
124
|
+
]);
|
|
125
|
+
var zError = z.object({
|
|
126
|
+
error: z.string(),
|
|
127
|
+
code: zErrorCode.optional(),
|
|
128
|
+
detail: z.string().optional(),
|
|
129
|
+
fields: z.record(z.string(), z.string()).optional(),
|
|
130
|
+
instructions: z.string().optional(),
|
|
131
|
+
schema: z.record(z.string(), z.unknown()).optional()
|
|
132
|
+
});
|
|
133
|
+
var zFolder = z.string().max(256).regex(/^[a-zA-Z0-9_-]+$/).nullable();
|
|
134
|
+
var zCreateGateRequest = z.object({
|
|
135
|
+
name: z.string().max(128).regex(/^[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?)?$/),
|
|
136
|
+
type: z.enum(["targeting", "holdout"]).optional().default("targeting"),
|
|
137
|
+
enabled: z.boolean().optional().default(true),
|
|
138
|
+
rollout_pct: z.int().gte(0).lte(1e4).optional().default(0),
|
|
139
|
+
rollout_percent: z.number().gte(0).lte(100).optional(),
|
|
140
|
+
rules: z.array(z.object({
|
|
141
|
+
attr: z.string().min(1),
|
|
142
|
+
op: z.enum([
|
|
143
|
+
"eq",
|
|
144
|
+
"neq",
|
|
145
|
+
"in",
|
|
146
|
+
"not_in",
|
|
147
|
+
"gt",
|
|
148
|
+
"gte",
|
|
149
|
+
"lt",
|
|
150
|
+
"lte",
|
|
151
|
+
"contains",
|
|
152
|
+
"regex",
|
|
153
|
+
"semver_gt",
|
|
154
|
+
"semver_gte",
|
|
155
|
+
"semver_lt",
|
|
156
|
+
"semver_lte",
|
|
157
|
+
"gate_pass",
|
|
158
|
+
"exp_in"
|
|
159
|
+
]),
|
|
160
|
+
value: z.unknown()
|
|
161
|
+
})).optional().default([]),
|
|
162
|
+
salt: z.string().min(1).max(64).optional(),
|
|
163
|
+
stack: z.array(z.union([z.object({
|
|
164
|
+
id: z.string().min(1),
|
|
165
|
+
type: z.literal("condition"),
|
|
166
|
+
name: z.string().optional(),
|
|
167
|
+
fromTemplate: z.string().nullish(),
|
|
168
|
+
pass: z.enum(["all", "any"]).optional(),
|
|
169
|
+
rules: z.array(z.object({
|
|
170
|
+
attr: z.string().min(1),
|
|
171
|
+
op: z.enum([
|
|
172
|
+
"eq",
|
|
173
|
+
"neq",
|
|
174
|
+
"in",
|
|
175
|
+
"not_in",
|
|
176
|
+
"gt",
|
|
177
|
+
"gte",
|
|
178
|
+
"lt",
|
|
179
|
+
"lte",
|
|
180
|
+
"contains",
|
|
181
|
+
"regex",
|
|
182
|
+
"semver_gt",
|
|
183
|
+
"semver_gte",
|
|
184
|
+
"semver_lt",
|
|
185
|
+
"semver_lte",
|
|
186
|
+
"gate_pass",
|
|
187
|
+
"exp_in"
|
|
188
|
+
]),
|
|
189
|
+
value: z.unknown()
|
|
190
|
+
})).optional().default([]),
|
|
191
|
+
rolloutPct: z.int().gte(0).lte(1e4).optional(),
|
|
192
|
+
bucketBy: z.string().optional(),
|
|
193
|
+
salt: z.string().optional(),
|
|
194
|
+
ramp: z.object({
|
|
195
|
+
from: z.int().gte(0).lte(1e4),
|
|
196
|
+
to: z.int().gte(0).lte(1e4),
|
|
197
|
+
startAt: z.int().gte(0).lte(9007199254740991),
|
|
198
|
+
durationMs: z.int().gt(0).lte(9007199254740991)
|
|
199
|
+
}).optional(),
|
|
200
|
+
locked: z.boolean().optional()
|
|
201
|
+
}), z.object({
|
|
202
|
+
id: z.string().min(1),
|
|
203
|
+
type: z.literal("rollout"),
|
|
204
|
+
name: z.string().optional(),
|
|
205
|
+
fromTemplate: z.string().nullish(),
|
|
206
|
+
rolloutPct: z.int().gte(0).lte(1e4),
|
|
207
|
+
bucketBy: z.string().optional(),
|
|
208
|
+
salt: z.string().optional(),
|
|
209
|
+
ramp: z.object({
|
|
210
|
+
from: z.int().gte(0).lte(1e4),
|
|
211
|
+
to: z.int().gte(0).lte(1e4),
|
|
212
|
+
startAt: z.int().gte(0).lte(9007199254740991),
|
|
213
|
+
durationMs: z.int().gt(0).lte(9007199254740991)
|
|
214
|
+
}).optional(),
|
|
215
|
+
locked: z.boolean().optional()
|
|
216
|
+
})])).nullish(),
|
|
217
|
+
title: z.string().max(140).optional(),
|
|
218
|
+
description: z.string().max(2e3).optional(),
|
|
219
|
+
folder: zFolder.optional(),
|
|
220
|
+
group: z.string().max(64).optional(),
|
|
221
|
+
owner_email: z.string().max(190).optional()
|
|
222
|
+
});
|
|
223
|
+
var zCreateGateResponse = z.object({
|
|
224
|
+
id: z.string(),
|
|
225
|
+
name: z.string().max(128).regex(/^[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?)?$/)
|
|
226
|
+
});
|
|
227
|
+
var zResourceId = z.string().min(1).max(128);
|
|
228
|
+
var zDeleteGateResponse = z.object({
|
|
229
|
+
ok: z.literal(true)
|
|
230
|
+
});
|
|
231
|
+
var zUpdateGateRequest = z.object({
|
|
232
|
+
type: z.enum(["targeting", "holdout"]).optional(),
|
|
233
|
+
rollout_pct: z.int().gte(0).lte(1e4).optional(),
|
|
234
|
+
rollout_percent: z.number().gte(0).lte(100).optional(),
|
|
235
|
+
rules: z.array(z.object({
|
|
236
|
+
attr: z.string().min(1),
|
|
237
|
+
op: z.enum([
|
|
238
|
+
"eq",
|
|
239
|
+
"neq",
|
|
240
|
+
"in",
|
|
241
|
+
"not_in",
|
|
242
|
+
"gt",
|
|
243
|
+
"gte",
|
|
244
|
+
"lt",
|
|
245
|
+
"lte",
|
|
246
|
+
"contains",
|
|
247
|
+
"regex",
|
|
248
|
+
"semver_gt",
|
|
249
|
+
"semver_gte",
|
|
250
|
+
"semver_lt",
|
|
251
|
+
"semver_lte",
|
|
252
|
+
"gate_pass",
|
|
253
|
+
"exp_in"
|
|
254
|
+
]),
|
|
255
|
+
value: z.unknown()
|
|
256
|
+
})).optional(),
|
|
257
|
+
enabled: z.boolean().optional(),
|
|
258
|
+
stack: z.array(z.union([z.object({
|
|
259
|
+
id: z.string().min(1),
|
|
260
|
+
type: z.literal("condition"),
|
|
261
|
+
name: z.string().optional(),
|
|
262
|
+
fromTemplate: z.string().nullish(),
|
|
263
|
+
pass: z.enum(["all", "any"]).optional(),
|
|
264
|
+
rules: z.array(z.object({
|
|
265
|
+
attr: z.string().min(1),
|
|
266
|
+
op: z.enum([
|
|
267
|
+
"eq",
|
|
268
|
+
"neq",
|
|
269
|
+
"in",
|
|
270
|
+
"not_in",
|
|
271
|
+
"gt",
|
|
272
|
+
"gte",
|
|
273
|
+
"lt",
|
|
274
|
+
"lte",
|
|
275
|
+
"contains",
|
|
276
|
+
"regex",
|
|
277
|
+
"semver_gt",
|
|
278
|
+
"semver_gte",
|
|
279
|
+
"semver_lt",
|
|
280
|
+
"semver_lte",
|
|
281
|
+
"gate_pass",
|
|
282
|
+
"exp_in"
|
|
283
|
+
]),
|
|
284
|
+
value: z.unknown()
|
|
285
|
+
})).optional().default([]),
|
|
286
|
+
rolloutPct: z.int().gte(0).lte(1e4).optional(),
|
|
287
|
+
bucketBy: z.string().optional(),
|
|
288
|
+
salt: z.string().optional(),
|
|
289
|
+
ramp: z.object({
|
|
290
|
+
from: z.int().gte(0).lte(1e4),
|
|
291
|
+
to: z.int().gte(0).lte(1e4),
|
|
292
|
+
startAt: z.int().gte(0).lte(9007199254740991),
|
|
293
|
+
durationMs: z.int().gt(0).lte(9007199254740991)
|
|
294
|
+
}).optional(),
|
|
295
|
+
locked: z.boolean().optional()
|
|
296
|
+
}), z.object({
|
|
297
|
+
id: z.string().min(1),
|
|
298
|
+
type: z.literal("rollout"),
|
|
299
|
+
name: z.string().optional(),
|
|
300
|
+
fromTemplate: z.string().nullish(),
|
|
301
|
+
rolloutPct: z.int().gte(0).lte(1e4),
|
|
302
|
+
bucketBy: z.string().optional(),
|
|
303
|
+
salt: z.string().optional(),
|
|
304
|
+
ramp: z.object({
|
|
305
|
+
from: z.int().gte(0).lte(1e4),
|
|
306
|
+
to: z.int().gte(0).lte(1e4),
|
|
307
|
+
startAt: z.int().gte(0).lte(9007199254740991),
|
|
308
|
+
durationMs: z.int().gt(0).lte(9007199254740991)
|
|
309
|
+
}).optional(),
|
|
310
|
+
locked: z.boolean().optional()
|
|
311
|
+
})])).nullish(),
|
|
312
|
+
title: z.string().max(140).optional(),
|
|
313
|
+
description: z.string().max(2e3).optional(),
|
|
314
|
+
folder: zFolder.optional(),
|
|
315
|
+
group: z.string().max(64).optional(),
|
|
316
|
+
owner_email: z.string().max(190).optional()
|
|
317
|
+
});
|
|
318
|
+
var zUpdateGateResponse = z.object({
|
|
319
|
+
id: z.string()
|
|
320
|
+
});
|
|
321
|
+
var zEnableGateResponse = z.object({
|
|
322
|
+
id: z.string(),
|
|
323
|
+
enabled: z.boolean()
|
|
324
|
+
});
|
|
325
|
+
var zDisableGateResponse = z.object({
|
|
326
|
+
id: z.string(),
|
|
327
|
+
enabled: z.boolean()
|
|
328
|
+
});
|
|
329
|
+
var zListExperimentsResponse = z.object({
|
|
330
|
+
data: z.array(z.object({
|
|
331
|
+
id: z.string(),
|
|
332
|
+
name: z.string().max(128).regex(/^[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?)?$/),
|
|
333
|
+
description: z.string().nullable(),
|
|
334
|
+
hypothesis: z.string().nullable(),
|
|
335
|
+
tag: z.string().nullable(),
|
|
336
|
+
ownerEmail: z.string().nullable(),
|
|
337
|
+
audience: z.string().nullable(),
|
|
338
|
+
bucketBy: z.string().min(1).max(128).regex(/^[a-zA-Z_][a-zA-Z0-9_]*$/).nullable(),
|
|
339
|
+
folder: z.string().nullable(),
|
|
340
|
+
status: z.enum([
|
|
341
|
+
"draft",
|
|
342
|
+
"running",
|
|
343
|
+
"stopped",
|
|
344
|
+
"archived"
|
|
345
|
+
]),
|
|
346
|
+
universe: z.string(),
|
|
347
|
+
targetingGate: z.string().nullable(),
|
|
348
|
+
holdoutGate: z.string().nullish(),
|
|
349
|
+
allocationPct: z.int().gte(-9007199254740991).lte(9007199254740991),
|
|
350
|
+
reservedHeadroom: z.int().gte(0).lte(1e4).optional(),
|
|
351
|
+
salt: z.string(),
|
|
352
|
+
params: z.record(z.string(), z.enum([
|
|
353
|
+
"string",
|
|
354
|
+
"bool",
|
|
355
|
+
"number"
|
|
356
|
+
])),
|
|
357
|
+
groups: z.array(z.object({
|
|
358
|
+
name: z.string().min(1).max(64),
|
|
359
|
+
weight: z.int().gte(0).lte(1e4),
|
|
360
|
+
params: z.record(z.string(), z.unknown()).optional().default({})
|
|
361
|
+
})),
|
|
362
|
+
significanceThreshold: z.number(),
|
|
363
|
+
minRuntimeDays: z.int().gte(-9007199254740991).lte(9007199254740991),
|
|
364
|
+
minSampleSize: z.int().gte(-9007199254740991).lte(9007199254740991),
|
|
365
|
+
sequentialTesting: z.boolean(),
|
|
366
|
+
startedAt: z.string().nullable(),
|
|
367
|
+
stoppedAt: z.string().nullish(),
|
|
368
|
+
updatedAt: z.string()
|
|
369
|
+
})),
|
|
370
|
+
next_cursor: z.string().nullable()
|
|
371
|
+
});
|
|
372
|
+
var zMetricName = z.string().max(128).regex(/^[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?)?$/);
|
|
373
|
+
var zExperimentInlineMetric = z.object({
|
|
374
|
+
name: zMetricName.optional(),
|
|
375
|
+
query: z.string().min(1).max(4096).optional(),
|
|
376
|
+
event: z.string().min(1).max(256).optional(),
|
|
377
|
+
aggregation: z.enum([
|
|
378
|
+
"count_users",
|
|
379
|
+
"count_events",
|
|
380
|
+
"retention_7d",
|
|
381
|
+
"retention_30d",
|
|
382
|
+
"sum",
|
|
383
|
+
"avg"
|
|
384
|
+
]).optional(),
|
|
385
|
+
value: z.string().min(1).max(256).optional(),
|
|
386
|
+
min_effect_of_interest: z.number().nullish().default(null)
|
|
387
|
+
});
|
|
388
|
+
var zCreateExperimentRequest = z.object({
|
|
389
|
+
name: z.string().max(128).regex(/^[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?)?$/),
|
|
390
|
+
description: z.string().max(2e3).nullish().default(null),
|
|
391
|
+
hypothesis: z.string().max(4e3).nullish().default(null),
|
|
392
|
+
tag: z.string().max(64).nullish().default(null),
|
|
393
|
+
owner_email: z.string().max(254).nullish().default(null),
|
|
394
|
+
audience: z.string().max(256).nullish().default(null),
|
|
395
|
+
bucket_by: z.string().min(1).max(128).regex(/^[a-zA-Z_][a-zA-Z0-9_]*$/).nullish().default(null),
|
|
396
|
+
folder: zFolder.optional(),
|
|
397
|
+
universe: z.string().min(1),
|
|
398
|
+
targeting_gate: z.string().nullish().default(null),
|
|
399
|
+
holdout_gate: z.string().nullish().default(null),
|
|
400
|
+
allocation_pct: z.int().gte(0).lte(1e4).optional().default(0),
|
|
401
|
+
allocation_percent: z.number().gte(0).lte(100).optional(),
|
|
402
|
+
reserved_headroom: z.int().gte(0).lte(1e4).optional(),
|
|
403
|
+
salt: z.string().min(1).max(64).optional(),
|
|
404
|
+
params: z.record(z.string(), z.enum([
|
|
405
|
+
"string",
|
|
406
|
+
"bool",
|
|
407
|
+
"number"
|
|
408
|
+
])).optional().default({}),
|
|
409
|
+
groups: z.array(z.object({
|
|
410
|
+
name: z.string().min(1).max(64),
|
|
411
|
+
weight: z.int().gte(0).lte(1e4),
|
|
412
|
+
params: z.record(z.string(), z.unknown()).optional().default({})
|
|
413
|
+
})).min(2),
|
|
414
|
+
significance_threshold: z.number().gte(1e-4).lte(0.5).optional().default(0.05),
|
|
415
|
+
min_runtime_days: z.int().gte(0).lte(365).optional().default(0),
|
|
416
|
+
min_sample_size: z.int().gte(1).lte(9007199254740991).optional().default(100),
|
|
417
|
+
sequential_testing: z.boolean().optional().default(false),
|
|
418
|
+
goal_metric: zExperimentInlineMetric.optional(),
|
|
419
|
+
guardrail_metrics: z.array(zExperimentInlineMetric).max(10).optional().default([])
|
|
420
|
+
});
|
|
421
|
+
var zCreateExperimentResponse = z.object({
|
|
422
|
+
id: z.string(),
|
|
423
|
+
name: z.string().max(128).regex(/^[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?)?$/)
|
|
424
|
+
});
|
|
425
|
+
var zGetExperimentResponse = z.object({
|
|
426
|
+
id: z.string(),
|
|
427
|
+
name: z.string().max(128).regex(/^[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?)?$/),
|
|
428
|
+
description: z.string().nullable(),
|
|
429
|
+
hypothesis: z.string().nullable(),
|
|
430
|
+
tag: z.string().nullable(),
|
|
431
|
+
ownerEmail: z.string().nullable(),
|
|
432
|
+
audience: z.string().nullable(),
|
|
433
|
+
bucketBy: z.string().min(1).max(128).regex(/^[a-zA-Z_][a-zA-Z0-9_]*$/).nullable(),
|
|
434
|
+
folder: z.string().nullable(),
|
|
435
|
+
status: z.enum([
|
|
436
|
+
"draft",
|
|
437
|
+
"running",
|
|
438
|
+
"stopped",
|
|
439
|
+
"archived"
|
|
440
|
+
]),
|
|
441
|
+
universe: z.string(),
|
|
442
|
+
targetingGate: z.string().nullable(),
|
|
443
|
+
allocationPct: z.int().gte(-9007199254740991).lte(9007199254740991),
|
|
444
|
+
salt: z.string(),
|
|
445
|
+
params: z.record(z.string(), z.enum([
|
|
446
|
+
"string",
|
|
447
|
+
"bool",
|
|
448
|
+
"number"
|
|
449
|
+
])),
|
|
450
|
+
groups: z.array(z.object({
|
|
451
|
+
name: z.string().min(1).max(64),
|
|
452
|
+
weight: z.int().gte(0).lte(1e4),
|
|
453
|
+
params: z.record(z.string(), z.unknown()).optional().default({})
|
|
454
|
+
})),
|
|
455
|
+
significanceThreshold: z.number(),
|
|
456
|
+
minRuntimeDays: z.int().gte(-9007199254740991).lte(9007199254740991),
|
|
457
|
+
minSampleSize: z.int().gte(-9007199254740991).lte(9007199254740991),
|
|
458
|
+
sequentialTesting: z.boolean(),
|
|
459
|
+
startedAt: z.string().nullable(),
|
|
460
|
+
stoppedAt: z.string().nullish(),
|
|
461
|
+
updatedAt: z.string()
|
|
462
|
+
});
|
|
463
|
+
var zDeleteExperimentResponse = z.object({
|
|
464
|
+
ok: z.literal(true)
|
|
465
|
+
});
|
|
466
|
+
var zUpdateExperimentRequest = z.object({
|
|
467
|
+
name: z.string().max(128).regex(/^[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?)?$/).optional(),
|
|
468
|
+
description: z.string().max(2e3).nullish(),
|
|
469
|
+
hypothesis: z.string().max(4e3).nullish(),
|
|
470
|
+
tag: z.string().max(64).nullish(),
|
|
471
|
+
owner_email: z.string().max(254).nullish(),
|
|
472
|
+
audience: z.string().max(256).nullish(),
|
|
473
|
+
bucket_by: z.string().min(1).max(128).regex(/^[a-zA-Z_][a-zA-Z0-9_]*$/).nullish(),
|
|
474
|
+
folder: zFolder.optional(),
|
|
475
|
+
targeting_gate: z.string().nullish(),
|
|
476
|
+
holdout_gate: z.string().nullish(),
|
|
477
|
+
allocation_pct: z.int().gte(0).lte(1e4).optional(),
|
|
478
|
+
reserved_headroom: z.int().gte(0).lte(1e4).optional(),
|
|
479
|
+
allocation_percent: z.number().gte(0).lte(100).optional(),
|
|
480
|
+
salt: z.string().min(1).max(64).optional(),
|
|
481
|
+
universe: z.string().optional(),
|
|
482
|
+
params: z.record(z.string(), z.enum([
|
|
483
|
+
"string",
|
|
484
|
+
"bool",
|
|
485
|
+
"number"
|
|
486
|
+
])).optional(),
|
|
487
|
+
groups: z.array(z.object({
|
|
488
|
+
name: z.string().min(1).max(64),
|
|
489
|
+
weight: z.int().gte(0).lte(1e4),
|
|
490
|
+
params: z.record(z.string(), z.unknown()).optional().default({})
|
|
491
|
+
})).min(2).optional(),
|
|
492
|
+
significance_threshold: z.number().gte(1e-4).lte(0.5).optional(),
|
|
493
|
+
min_runtime_days: z.int().gte(0).lte(365).optional(),
|
|
494
|
+
min_sample_size: z.int().gte(1).lte(9007199254740991).optional(),
|
|
495
|
+
sequential_testing: z.boolean().optional(),
|
|
496
|
+
goal_metric: zExperimentInlineMetric.optional(),
|
|
497
|
+
guardrail_metrics: z.array(zExperimentInlineMetric).max(10).optional()
|
|
498
|
+
});
|
|
499
|
+
var zUpdateExperimentResponse = z.object({
|
|
500
|
+
id: z.string()
|
|
501
|
+
});
|
|
502
|
+
var zSetExperimentStatusRequest = z.object({
|
|
503
|
+
status: z.enum([
|
|
504
|
+
"draft",
|
|
505
|
+
"running",
|
|
506
|
+
"stopped",
|
|
507
|
+
"archived"
|
|
508
|
+
])
|
|
509
|
+
});
|
|
510
|
+
var zSetExperimentStatusResponse = z.object({
|
|
511
|
+
id: z.string(),
|
|
512
|
+
status: z.enum([
|
|
513
|
+
"draft",
|
|
514
|
+
"running",
|
|
515
|
+
"stopped",
|
|
516
|
+
"archived"
|
|
517
|
+
])
|
|
518
|
+
});
|
|
519
|
+
var zSetExperimentMetricsRequest = z.object({
|
|
520
|
+
metrics: z.array(z.object({
|
|
521
|
+
metric_id: z.string(),
|
|
522
|
+
role: z.enum([
|
|
523
|
+
"goal",
|
|
524
|
+
"guardrail",
|
|
525
|
+
"secondary"
|
|
526
|
+
]),
|
|
527
|
+
min_effect_of_interest: z.number().nullish().default(null)
|
|
528
|
+
}))
|
|
529
|
+
});
|
|
530
|
+
var zSetExperimentMetricsResponse = z.object({
|
|
531
|
+
id: z.string(),
|
|
532
|
+
metrics: z.array(z.object({
|
|
533
|
+
metric_id: z.string(),
|
|
534
|
+
role: z.enum([
|
|
535
|
+
"goal",
|
|
536
|
+
"guardrail",
|
|
537
|
+
"secondary"
|
|
538
|
+
]),
|
|
539
|
+
min_effect_of_interest: z.number().nullable()
|
|
540
|
+
}))
|
|
541
|
+
});
|
|
542
|
+
var zGetExperimentResultsResponse = z.object({
|
|
543
|
+
experiment: z.object({
|
|
544
|
+
id: z.string(),
|
|
545
|
+
name: z.string().max(128).regex(/^[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?)?$/),
|
|
546
|
+
status: z.enum([
|
|
547
|
+
"draft",
|
|
548
|
+
"running",
|
|
549
|
+
"stopped",
|
|
550
|
+
"archived"
|
|
551
|
+
])
|
|
552
|
+
}),
|
|
553
|
+
results: z.array(z.object({
|
|
554
|
+
metric: z.string(),
|
|
555
|
+
group_name: z.string(),
|
|
556
|
+
ds: z.string(),
|
|
557
|
+
n: z.number().nullable(),
|
|
558
|
+
mean: z.number().nullable(),
|
|
559
|
+
delta_pct: z.number().nullable(),
|
|
560
|
+
p_value: z.number().nullable(),
|
|
561
|
+
srm_detected: z.number().nullable(),
|
|
562
|
+
realized_mde: z.number().nullable()
|
|
563
|
+
})),
|
|
564
|
+
verdict: z.enum([
|
|
565
|
+
"ship",
|
|
566
|
+
"hold",
|
|
567
|
+
"wait",
|
|
568
|
+
"invalid",
|
|
569
|
+
"draft"
|
|
570
|
+
])
|
|
571
|
+
});
|
|
572
|
+
var zGetExperimentTimeseriesResponse = z.object({
|
|
573
|
+
experiment: z.object({
|
|
574
|
+
id: z.string(),
|
|
575
|
+
name: z.string().max(128).regex(/^[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?)?$/),
|
|
576
|
+
status: z.enum([
|
|
577
|
+
"draft",
|
|
578
|
+
"running",
|
|
579
|
+
"stopped",
|
|
580
|
+
"archived"
|
|
581
|
+
])
|
|
582
|
+
}),
|
|
583
|
+
series: z.array(z.object({
|
|
584
|
+
metric: z.string(),
|
|
585
|
+
group_name: z.string(),
|
|
586
|
+
ds: z.string(),
|
|
587
|
+
n: z.number().nullable(),
|
|
588
|
+
mean: z.number().nullable(),
|
|
589
|
+
delta_pct: z.number().nullable(),
|
|
590
|
+
p_value: z.number().nullable(),
|
|
591
|
+
srm_detected: z.number().nullable()
|
|
592
|
+
}))
|
|
593
|
+
});
|
|
594
|
+
var zReanalyzeExperimentResponse = z.object({
|
|
595
|
+
id: z.string(),
|
|
596
|
+
queued: z.literal(true)
|
|
597
|
+
});
|
|
598
|
+
var zListConfigsResponse = z.object({
|
|
599
|
+
data: z.array(z.object({
|
|
600
|
+
id: z.string(),
|
|
601
|
+
name: z.string().max(128),
|
|
602
|
+
description: z.string().nullable(),
|
|
603
|
+
schema: z.record(z.string(), z.unknown()),
|
|
604
|
+
updatedAt: z.string(),
|
|
605
|
+
envs: z.record(z.string(), z.object({
|
|
606
|
+
version: z.int().gte(-9007199254740991).lte(9007199254740991),
|
|
607
|
+
publishedAt: z.string(),
|
|
608
|
+
publishedBy: z.string()
|
|
609
|
+
})),
|
|
610
|
+
drafts: z.record(z.string(), z.object({
|
|
611
|
+
updatedAt: z.string(),
|
|
612
|
+
authorEmail: z.string(),
|
|
613
|
+
baseVersion: z.int().gte(-9007199254740991).lte(9007199254740991)
|
|
614
|
+
})),
|
|
615
|
+
values: z.record(z.string(), z.unknown()).optional(),
|
|
616
|
+
draftValues: z.record(z.string(), z.unknown()).optional()
|
|
617
|
+
})),
|
|
618
|
+
next_cursor: z.string().nullable()
|
|
619
|
+
});
|
|
620
|
+
var zConfigName = z.string().max(128).regex(/^(?:_default|[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?)\.[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?$/);
|
|
621
|
+
var zCreateConfigRequest = z.object({
|
|
622
|
+
name: zConfigName,
|
|
623
|
+
description: z.string().max(512).optional(),
|
|
624
|
+
folder: zFolder.optional(),
|
|
625
|
+
schema: z.record(z.string(), z.unknown()),
|
|
626
|
+
value: z.unknown().optional()
|
|
627
|
+
});
|
|
628
|
+
var zCreateConfigResponse = z.object({
|
|
629
|
+
id: z.string(),
|
|
630
|
+
name: z.string().max(128)
|
|
631
|
+
});
|
|
632
|
+
var zGetConfigResponse = z.object({
|
|
633
|
+
id: z.string(),
|
|
634
|
+
name: z.string().max(128),
|
|
635
|
+
description: z.string().nullable(),
|
|
636
|
+
schema: z.record(z.string(), z.unknown()),
|
|
637
|
+
updatedAt: z.string(),
|
|
638
|
+
envs: z.record(z.string(), z.object({
|
|
639
|
+
version: z.int().gte(-9007199254740991).lte(9007199254740991),
|
|
640
|
+
publishedAt: z.string(),
|
|
641
|
+
publishedBy: z.string()
|
|
642
|
+
})),
|
|
643
|
+
drafts: z.record(z.string(), z.object({
|
|
644
|
+
updatedAt: z.string(),
|
|
645
|
+
authorEmail: z.string(),
|
|
646
|
+
baseVersion: z.int().gte(-9007199254740991).lte(9007199254740991)
|
|
647
|
+
})),
|
|
648
|
+
values: z.record(z.string(), z.unknown()).optional(),
|
|
649
|
+
draftValues: z.record(z.string(), z.unknown()).optional()
|
|
650
|
+
});
|
|
651
|
+
var zDeleteConfigResponse = z.object({
|
|
652
|
+
ok: z.literal(true)
|
|
653
|
+
});
|
|
654
|
+
var zUpdateConfigRequest = z.object({
|
|
655
|
+
schema: z.record(z.string(), z.unknown()).optional(),
|
|
656
|
+
value: z.unknown().optional(),
|
|
657
|
+
folder: zFolder.optional()
|
|
658
|
+
});
|
|
659
|
+
var zUpdateConfigResponse = z.object({
|
|
660
|
+
id: z.string()
|
|
661
|
+
});
|
|
662
|
+
var zEnv = z.enum([
|
|
663
|
+
"dev",
|
|
664
|
+
"staging",
|
|
665
|
+
"prod"
|
|
666
|
+
]);
|
|
667
|
+
var zSaveConfigDraftRequest = z.object({
|
|
668
|
+
env: zEnv,
|
|
669
|
+
value: z.unknown()
|
|
670
|
+
});
|
|
671
|
+
var zSaveConfigDraftResponse = z.object({
|
|
672
|
+
id: z.string(),
|
|
673
|
+
env: zEnv,
|
|
674
|
+
baseVersion: z.int().gte(-9007199254740991).lte(9007199254740991),
|
|
675
|
+
updatedAt: z.string()
|
|
676
|
+
});
|
|
677
|
+
var zDiscardConfigDraftRequest = z.object({
|
|
678
|
+
env: zEnv
|
|
679
|
+
});
|
|
680
|
+
var zDiscardConfigDraftResponse = z.object({
|
|
681
|
+
ok: z.literal(true)
|
|
682
|
+
});
|
|
683
|
+
var zPublishConfigDraftRequest = z.object({
|
|
684
|
+
env: zEnv
|
|
685
|
+
});
|
|
686
|
+
var zPublishConfigDraftResponse = z.object({
|
|
687
|
+
id: z.string(),
|
|
688
|
+
env: zEnv,
|
|
689
|
+
version: z.int().gte(-9007199254740991).lte(9007199254740991)
|
|
690
|
+
});
|
|
691
|
+
var zListConfigActivityResponse = z.array(z.object({
|
|
692
|
+
id: z.string(),
|
|
693
|
+
action: z.string(),
|
|
694
|
+
actorEmail: z.string(),
|
|
695
|
+
actorType: z.enum([
|
|
696
|
+
"user",
|
|
697
|
+
"cli",
|
|
698
|
+
"system"
|
|
699
|
+
]),
|
|
700
|
+
payload: z.unknown(),
|
|
701
|
+
createdAt: z.string()
|
|
702
|
+
}));
|
|
703
|
+
var zUpdateConfigSchemaRequest = z.object({
|
|
704
|
+
schema: z.record(z.string(), z.unknown())
|
|
705
|
+
});
|
|
706
|
+
var zUpdateConfigSchemaResponse = z.object({
|
|
707
|
+
id: z.string()
|
|
708
|
+
});
|
|
709
|
+
var zListKillswitchesResponse = z.object({
|
|
710
|
+
data: z.array(z.object({
|
|
711
|
+
id: z.string(),
|
|
712
|
+
name: z.string().max(128),
|
|
713
|
+
description: z.string().nullable(),
|
|
714
|
+
updatedAt: z.string(),
|
|
715
|
+
envs: z.record(z.string(), z.object({
|
|
716
|
+
value: z.boolean(),
|
|
717
|
+
switches: z.record(z.string(), z.boolean()).optional(),
|
|
718
|
+
version: z.int().gte(-9007199254740991).lte(9007199254740991),
|
|
719
|
+
publishedAt: z.string(),
|
|
720
|
+
publishedBy: z.string().nullish()
|
|
721
|
+
}))
|
|
722
|
+
})),
|
|
723
|
+
next_cursor: z.string().nullable()
|
|
724
|
+
});
|
|
725
|
+
var zCreateKillswitchRequest = z.object({
|
|
726
|
+
name: zConfigName,
|
|
727
|
+
description: z.string().max(512).optional(),
|
|
728
|
+
folder: zFolder.optional(),
|
|
729
|
+
value: z.boolean().optional(),
|
|
730
|
+
switches: z.record(z.string(), z.boolean()).optional()
|
|
731
|
+
});
|
|
732
|
+
var zCreateKillswitchResponse = z.object({
|
|
733
|
+
id: z.string(),
|
|
734
|
+
name: z.string().max(128)
|
|
735
|
+
});
|
|
736
|
+
var zGetKillswitchResponse = z.object({
|
|
737
|
+
id: z.string(),
|
|
738
|
+
name: z.string().max(128),
|
|
739
|
+
description: z.string().nullable(),
|
|
740
|
+
updatedAt: z.string(),
|
|
741
|
+
envs: z.record(z.string(), z.object({
|
|
742
|
+
value: z.boolean(),
|
|
743
|
+
switches: z.record(z.string(), z.boolean()).optional(),
|
|
744
|
+
version: z.int().gte(-9007199254740991).lte(9007199254740991),
|
|
745
|
+
publishedAt: z.string(),
|
|
746
|
+
publishedBy: z.string().nullish()
|
|
747
|
+
}))
|
|
748
|
+
});
|
|
749
|
+
var zDeleteKillswitchResponse = z.object({
|
|
750
|
+
ok: z.literal(true)
|
|
751
|
+
});
|
|
752
|
+
var zUpdateKillswitchRequest = z.object({
|
|
753
|
+
description: z.string().max(512).nullish(),
|
|
754
|
+
folder: zFolder.optional(),
|
|
755
|
+
value: z.boolean().optional(),
|
|
756
|
+
switches: z.record(z.string(), z.boolean()).optional()
|
|
757
|
+
});
|
|
758
|
+
var zUpdateKillswitchResponse = z.object({
|
|
759
|
+
id: z.string()
|
|
760
|
+
});
|
|
761
|
+
var zSetKillswitchSwitchRequest = z.object({
|
|
762
|
+
env: zEnv,
|
|
763
|
+
switchKey: z.string().max(64).regex(/^[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?$/),
|
|
764
|
+
value: z.boolean()
|
|
765
|
+
});
|
|
766
|
+
var zSetKillswitchSwitchResponse = z.object({
|
|
767
|
+
id: z.string(),
|
|
768
|
+
env: zEnv,
|
|
769
|
+
switchKey: z.string().max(64).regex(/^[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?$/),
|
|
770
|
+
value: z.boolean()
|
|
771
|
+
});
|
|
772
|
+
var zUnsetKillswitchSwitchRequest = z.object({
|
|
773
|
+
env: zEnv,
|
|
774
|
+
switchKey: z.string().max(64).regex(/^[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?$/)
|
|
775
|
+
});
|
|
776
|
+
var zUnsetKillswitchSwitchResponse = z.object({
|
|
777
|
+
id: z.string(),
|
|
778
|
+
env: zEnv,
|
|
779
|
+
switchKey: z.string().max(64).regex(/^[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?$/),
|
|
780
|
+
removed: z.boolean()
|
|
781
|
+
});
|
|
782
|
+
var zSetKillswitchValueRequest = z.object({
|
|
783
|
+
env: zEnv,
|
|
784
|
+
value: z.boolean()
|
|
785
|
+
});
|
|
786
|
+
var zKillswitchValue = z.object({
|
|
787
|
+
value: z.boolean(),
|
|
788
|
+
switches: z.record(z.string(), z.boolean()).optional()
|
|
789
|
+
});
|
|
790
|
+
var zSetKillswitchValueResponse = z.object({
|
|
791
|
+
id: z.string(),
|
|
792
|
+
env: zEnv,
|
|
793
|
+
version: z.int().gte(-9007199254740991).lte(9007199254740991),
|
|
794
|
+
published: zKillswitchValue
|
|
795
|
+
});
|
|
796
|
+
var zUniverseParam = z.object({
|
|
797
|
+
name: z.string().min(1).max(128).regex(/^[a-zA-Z_][a-zA-Z0-9_]*$/),
|
|
798
|
+
type: z.enum([
|
|
799
|
+
"bool",
|
|
800
|
+
"string",
|
|
801
|
+
"int",
|
|
802
|
+
"number"
|
|
803
|
+
]),
|
|
804
|
+
default: z.unknown()
|
|
805
|
+
});
|
|
806
|
+
var zUniverseParamSchema = z.array(zUniverseParam);
|
|
807
|
+
var zListUniversesResponse = z.object({
|
|
808
|
+
data: z.array(z.object({
|
|
809
|
+
id: z.string(),
|
|
810
|
+
name: z.string().max(128).regex(/^[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?)?$/),
|
|
811
|
+
description: z.string().nullish(),
|
|
812
|
+
unitType: z.string(),
|
|
813
|
+
holdoutRange: z.tuple([z.number(), z.number()]).nullable(),
|
|
814
|
+
recommendedHeadroom: z.int().gte(0).lte(1e4).optional(),
|
|
815
|
+
paramSchema: zUniverseParamSchema.nullish(),
|
|
816
|
+
createdAt: z.string()
|
|
817
|
+
})),
|
|
818
|
+
next_cursor: z.string().nullable()
|
|
819
|
+
});
|
|
820
|
+
var zCreateUniverseRequest = z.object({
|
|
821
|
+
name: z.string().max(128).regex(/^[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?)?$/),
|
|
822
|
+
folder: zFolder.optional(),
|
|
823
|
+
description: z.string().max(2e3).nullish().default(null),
|
|
824
|
+
unit_type: z.string().optional().default("user_id"),
|
|
825
|
+
holdout_range: z.tuple([z.int().gte(0).lte(9999), z.int().gte(0).lte(9999)]).nullish().default(null),
|
|
826
|
+
recommended_headroom: z.int().gte(0).lte(1e4).optional().default(0),
|
|
827
|
+
param_schema: zUniverseParamSchema.nullish().default(null)
|
|
828
|
+
});
|
|
829
|
+
var zCreateUniverseResponse = z.object({
|
|
830
|
+
id: z.string(),
|
|
831
|
+
name: z.string().max(128).regex(/^[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?)?$/)
|
|
832
|
+
});
|
|
833
|
+
var zDeleteUniverseResponse = z.object({
|
|
834
|
+
ok: z.literal(true)
|
|
835
|
+
});
|
|
836
|
+
var zUpdateUniverseRequest = z.object({
|
|
837
|
+
folder: zFolder.optional(),
|
|
838
|
+
description: z.string().max(2e3).nullish(),
|
|
839
|
+
holdout_range: z.tuple([z.int().gte(0).lte(9999), z.int().gte(0).lte(9999)]).nullish(),
|
|
840
|
+
recommended_headroom: z.int().gte(0).lte(1e4).optional(),
|
|
841
|
+
param_schema: zUniverseParamSchema.nullish()
|
|
842
|
+
});
|
|
843
|
+
var zUpdateUniverseResponse = z.object({
|
|
844
|
+
id: z.string()
|
|
845
|
+
});
|
|
846
|
+
var zGateTemplateRuleResponse = z.object({
|
|
847
|
+
attr: z.string(),
|
|
848
|
+
op: z.enum([
|
|
849
|
+
"eq",
|
|
850
|
+
"neq",
|
|
851
|
+
"in",
|
|
852
|
+
"not_in",
|
|
853
|
+
"gt",
|
|
854
|
+
"gte",
|
|
855
|
+
"lt",
|
|
856
|
+
"lte",
|
|
857
|
+
"contains",
|
|
858
|
+
"regex",
|
|
859
|
+
"semver_gt",
|
|
860
|
+
"semver_gte",
|
|
861
|
+
"semver_lt",
|
|
862
|
+
"semver_lte",
|
|
863
|
+
"gate_pass",
|
|
864
|
+
"exp_in"
|
|
865
|
+
]),
|
|
866
|
+
value: z.unknown().optional()
|
|
867
|
+
});
|
|
868
|
+
var zGateTemplate = z.object({
|
|
869
|
+
id: z.string(),
|
|
870
|
+
name: z.string(),
|
|
871
|
+
description: z.string(),
|
|
872
|
+
category: z.enum(["condition", "rollout"]),
|
|
873
|
+
auto: z.boolean(),
|
|
874
|
+
builtin: z.boolean(),
|
|
875
|
+
iconKey: z.string().nullish(),
|
|
876
|
+
rules: z.array(zGateTemplateRuleResponse),
|
|
877
|
+
createdAt: z.string().nullish(),
|
|
878
|
+
updatedAt: z.string().nullish()
|
|
879
|
+
});
|
|
880
|
+
var zListGateTemplatesResponse = z.object({
|
|
881
|
+
data: z.array(zGateTemplate),
|
|
882
|
+
next_cursor: z.string().nullable()
|
|
883
|
+
});
|
|
884
|
+
var zGateTemplateRule = z.object({
|
|
885
|
+
attr: z.string(),
|
|
886
|
+
op: z.enum([
|
|
887
|
+
"eq",
|
|
888
|
+
"neq",
|
|
889
|
+
"in",
|
|
890
|
+
"not_in",
|
|
891
|
+
"gt",
|
|
892
|
+
"gte",
|
|
893
|
+
"lt",
|
|
894
|
+
"lte",
|
|
895
|
+
"contains",
|
|
896
|
+
"regex",
|
|
897
|
+
"semver_gt",
|
|
898
|
+
"semver_gte",
|
|
899
|
+
"semver_lt",
|
|
900
|
+
"semver_lte",
|
|
901
|
+
"gate_pass",
|
|
902
|
+
"exp_in"
|
|
903
|
+
]),
|
|
904
|
+
value: z.union([
|
|
905
|
+
z.string(),
|
|
906
|
+
z.number(),
|
|
907
|
+
z.boolean(),
|
|
908
|
+
z.array(z.unknown())
|
|
909
|
+
])
|
|
910
|
+
});
|
|
911
|
+
var zCreateGateTemplateRequest = z.object({
|
|
912
|
+
name: z.string().min(1).max(140),
|
|
913
|
+
description: z.string().max(2e3).optional().default(""),
|
|
914
|
+
category: z.enum(["condition", "rollout"]).optional().default("condition"),
|
|
915
|
+
icon_key: z.string().max(64).optional(),
|
|
916
|
+
auto: z.boolean().optional().default(false),
|
|
917
|
+
rules: z.array(zGateTemplateRule).min(1)
|
|
918
|
+
});
|
|
919
|
+
var zCreateGateTemplateResponse = z.object({
|
|
920
|
+
id: z.string(),
|
|
921
|
+
name: z.string()
|
|
922
|
+
});
|
|
923
|
+
var zDeleteGateTemplateResponse = z.object({
|
|
924
|
+
ok: z.literal(true)
|
|
925
|
+
});
|
|
926
|
+
var zUpdateGateTemplateRequest = z.object({
|
|
927
|
+
name: z.string().min(1).max(140).optional(),
|
|
928
|
+
description: z.string().max(2e3).optional(),
|
|
929
|
+
category: z.enum(["condition", "rollout"]).optional(),
|
|
930
|
+
icon_key: z.string().nullish(),
|
|
931
|
+
auto: z.boolean().optional(),
|
|
932
|
+
rules: z.array(zGateTemplateRule).min(1).optional()
|
|
933
|
+
});
|
|
934
|
+
var zUpdateGateTemplateResponse = z.object({
|
|
935
|
+
id: z.string()
|
|
936
|
+
});
|
|
937
|
+
var zListAttributesResponse = z.array(z.object({
|
|
938
|
+
name: z.string(),
|
|
939
|
+
type: z.string().optional()
|
|
940
|
+
}));
|
|
941
|
+
var zAttributeType = z.enum([
|
|
942
|
+
"string",
|
|
943
|
+
"number",
|
|
944
|
+
"boolean",
|
|
945
|
+
"enum",
|
|
946
|
+
"date"
|
|
947
|
+
]);
|
|
948
|
+
var zCreateAttributeRequest = z.object({
|
|
949
|
+
name: z.string().regex(/^[a-z0-9][a-z0-9_-]{0,63}$/),
|
|
950
|
+
type: zAttributeType,
|
|
951
|
+
enum_values: z.array(z.string()).nullish().default(null),
|
|
952
|
+
required: z.boolean().optional().default(false),
|
|
953
|
+
description: z.string().optional(),
|
|
954
|
+
sdk_path: z.string().optional()
|
|
955
|
+
});
|
|
956
|
+
var zCreateAttributeResponse = z.object({
|
|
957
|
+
id: z.string(),
|
|
958
|
+
name: z.string()
|
|
959
|
+
});
|
|
960
|
+
var zGetAttributeResponse = z.object({
|
|
961
|
+
id: z.string(),
|
|
962
|
+
name: z.string(),
|
|
963
|
+
type: zAttributeType,
|
|
964
|
+
enumValues: z.array(z.string()).nullish(),
|
|
965
|
+
required: z.union([z.literal(0), z.literal(1)]).optional(),
|
|
966
|
+
description: z.string().nullish(),
|
|
967
|
+
sdkPath: z.string().nullish(),
|
|
968
|
+
createdAt: z.string().optional()
|
|
969
|
+
});
|
|
970
|
+
var zDeleteAttributeResponse = z.object({
|
|
971
|
+
ok: z.boolean()
|
|
972
|
+
});
|
|
973
|
+
var zUpdateAttributeRequest = z.object({
|
|
974
|
+
type: zAttributeType.optional(),
|
|
975
|
+
enum_values: z.array(z.string()).nullish(),
|
|
976
|
+
required: z.boolean().optional(),
|
|
977
|
+
description: z.string().optional(),
|
|
978
|
+
sdk_path: z.string().optional()
|
|
979
|
+
});
|
|
980
|
+
var zUpdateAttributeResponse = z.object({
|
|
981
|
+
id: z.string()
|
|
982
|
+
});
|
|
983
|
+
var zQueryIr = z.object({
|
|
984
|
+
agg: z.union([
|
|
985
|
+
z.object({
|
|
986
|
+
kind: z.literal("count_users")
|
|
987
|
+
}),
|
|
988
|
+
z.object({
|
|
989
|
+
kind: z.literal("count_events")
|
|
990
|
+
}),
|
|
991
|
+
z.object({
|
|
992
|
+
kind: z.literal("sum")
|
|
993
|
+
}),
|
|
994
|
+
z.object({
|
|
995
|
+
kind: z.literal("avg")
|
|
996
|
+
}),
|
|
997
|
+
z.object({
|
|
998
|
+
kind: z.literal("min")
|
|
999
|
+
}),
|
|
1000
|
+
z.object({
|
|
1001
|
+
kind: z.literal("max")
|
|
1002
|
+
}),
|
|
1003
|
+
z.object({
|
|
1004
|
+
kind: z.literal("unique")
|
|
1005
|
+
}),
|
|
1006
|
+
z.object({
|
|
1007
|
+
kind: z.literal("quantile"),
|
|
1008
|
+
p: z.union([
|
|
1009
|
+
z.literal(0.5),
|
|
1010
|
+
z.literal(0.75),
|
|
1011
|
+
z.literal(0.9),
|
|
1012
|
+
z.literal(0.95),
|
|
1013
|
+
z.literal(0.99),
|
|
1014
|
+
z.literal(0.999)
|
|
1015
|
+
])
|
|
1016
|
+
}),
|
|
1017
|
+
z.object({
|
|
1018
|
+
kind: z.literal("retention_Nd"),
|
|
1019
|
+
n: z.int().gte(1).lte(90)
|
|
1020
|
+
}),
|
|
1021
|
+
z.object({
|
|
1022
|
+
kind: z.literal("ratio"),
|
|
1023
|
+
numerator: z.object({
|
|
1024
|
+
agg: z.enum(["count_users", "count_events"]),
|
|
1025
|
+
metric: z.string().min(1).max(128),
|
|
1026
|
+
filters: z.array(z.object({
|
|
1027
|
+
label: z.string().regex(/^[a-z_][a-z0-9_]{0,63}$/),
|
|
1028
|
+
op: z.enum([
|
|
1029
|
+
"=",
|
|
1030
|
+
"!=",
|
|
1031
|
+
"=~",
|
|
1032
|
+
"!~"
|
|
1033
|
+
]),
|
|
1034
|
+
value: z.string().max(512)
|
|
1035
|
+
})).max(16).optional()
|
|
1036
|
+
}),
|
|
1037
|
+
denominator: z.object({
|
|
1038
|
+
agg: z.enum(["count_users", "count_events"]),
|
|
1039
|
+
metric: z.string().min(1).max(128),
|
|
1040
|
+
filters: z.array(z.object({
|
|
1041
|
+
label: z.string().regex(/^[a-z_][a-z0-9_]{0,63}$/),
|
|
1042
|
+
op: z.enum([
|
|
1043
|
+
"=",
|
|
1044
|
+
"!=",
|
|
1045
|
+
"=~",
|
|
1046
|
+
"!~"
|
|
1047
|
+
]),
|
|
1048
|
+
value: z.string().max(512)
|
|
1049
|
+
})).max(16).optional()
|
|
1050
|
+
})
|
|
1051
|
+
})
|
|
1052
|
+
]),
|
|
1053
|
+
metric: z.string().min(1).max(128),
|
|
1054
|
+
valueLabel: z.string().min(1).max(128).optional(),
|
|
1055
|
+
filters: z.array(z.object({
|
|
1056
|
+
label: z.string().regex(/^[a-z_][a-z0-9_]{0,63}$/),
|
|
1057
|
+
op: z.enum([
|
|
1058
|
+
"=",
|
|
1059
|
+
"!=",
|
|
1060
|
+
"=~",
|
|
1061
|
+
"!~"
|
|
1062
|
+
]),
|
|
1063
|
+
value: z.string().max(512)
|
|
1064
|
+
})).max(16).optional().default([]),
|
|
1065
|
+
groupBy: z.object({
|
|
1066
|
+
op: z.enum(["by", "without"]),
|
|
1067
|
+
labels: z.array(z.string().regex(/^[a-z_][a-z0-9_]{0,63}$/)).max(5)
|
|
1068
|
+
}).optional()
|
|
1069
|
+
});
|
|
1070
|
+
var zListMetricsResponse = z.array(z.object({
|
|
1071
|
+
id: z.string(),
|
|
1072
|
+
name: z.string(),
|
|
1073
|
+
folder: z.string().nullable(),
|
|
1074
|
+
eventName: z.string(),
|
|
1075
|
+
query: z.string().nullable(),
|
|
1076
|
+
queryIr: zQueryIr,
|
|
1077
|
+
direction: z.enum([
|
|
1078
|
+
"higher_better",
|
|
1079
|
+
"lower_better",
|
|
1080
|
+
"neutral"
|
|
1081
|
+
]).optional(),
|
|
1082
|
+
winsorizePct: z.number().optional(),
|
|
1083
|
+
defaultMinEffectOfInterest: z.number().nullish(),
|
|
1084
|
+
createdAt: z.string().optional(),
|
|
1085
|
+
updatedAt: z.string().optional()
|
|
1086
|
+
}));
|
|
1087
|
+
var zMetricEventName = z.string().min(1);
|
|
1088
|
+
var zMetricQueryDsl = z.string().min(1).max(4096);
|
|
1089
|
+
var zMetricWinsorizePct = z.int().gte(1).lte(99).default(99);
|
|
1090
|
+
var zMetricDefaultMinEffectOfInterest = z.number().nullable().default(null);
|
|
1091
|
+
var zMetricDirection = z.enum([
|
|
1092
|
+
"higher_better",
|
|
1093
|
+
"lower_better",
|
|
1094
|
+
"neutral"
|
|
1095
|
+
]).default("higher_better");
|
|
1096
|
+
var zCreateMetricWithQuery = z.object({
|
|
1097
|
+
name: zMetricName,
|
|
1098
|
+
folder: zFolder.optional(),
|
|
1099
|
+
event_name: zMetricEventName,
|
|
1100
|
+
query: zMetricQueryDsl,
|
|
1101
|
+
winsorize_pct: zMetricWinsorizePct.optional(),
|
|
1102
|
+
default_min_effect_of_interest: zMetricDefaultMinEffectOfInterest.optional(),
|
|
1103
|
+
direction: zMetricDirection.optional()
|
|
1104
|
+
});
|
|
1105
|
+
var zCreateMetricWithQueryIr = z.object({
|
|
1106
|
+
name: zMetricName,
|
|
1107
|
+
folder: zFolder.optional(),
|
|
1108
|
+
event_name: zMetricEventName,
|
|
1109
|
+
query_ir: zQueryIr,
|
|
1110
|
+
winsorize_pct: zMetricWinsorizePct.optional(),
|
|
1111
|
+
default_min_effect_of_interest: zMetricDefaultMinEffectOfInterest.optional(),
|
|
1112
|
+
direction: zMetricDirection.optional()
|
|
1113
|
+
});
|
|
1114
|
+
var zCreateMetricRequest = z.union([
|
|
1115
|
+
zCreateMetricWithQuery,
|
|
1116
|
+
zCreateMetricWithQueryIr
|
|
1117
|
+
]);
|
|
1118
|
+
var zCreateMetricResponse = z.object({
|
|
1119
|
+
id: z.string(),
|
|
1120
|
+
name: z.string()
|
|
1121
|
+
});
|
|
1122
|
+
var zGetMetricResponse = z.object({
|
|
1123
|
+
id: z.string(),
|
|
1124
|
+
name: z.string(),
|
|
1125
|
+
folder: z.string().nullable(),
|
|
1126
|
+
eventName: z.string(),
|
|
1127
|
+
query: z.string().nullable(),
|
|
1128
|
+
queryIr: zQueryIr,
|
|
1129
|
+
direction: z.enum([
|
|
1130
|
+
"higher_better",
|
|
1131
|
+
"lower_better",
|
|
1132
|
+
"neutral"
|
|
1133
|
+
]).optional(),
|
|
1134
|
+
winsorizePct: z.number().optional(),
|
|
1135
|
+
defaultMinEffectOfInterest: z.number().nullish(),
|
|
1136
|
+
createdAt: z.string().optional(),
|
|
1137
|
+
updatedAt: z.string().optional()
|
|
1138
|
+
});
|
|
1139
|
+
var zDeleteMetricResponse = z.object({
|
|
1140
|
+
ok: z.literal(true)
|
|
1141
|
+
});
|
|
1142
|
+
var zUpdateMetricWithQuery = z.object({
|
|
1143
|
+
folder: zFolder.optional(),
|
|
1144
|
+
event_name: zMetricEventName.optional(),
|
|
1145
|
+
query: zMetricQueryDsl,
|
|
1146
|
+
winsorize_pct: zMetricWinsorizePct.optional(),
|
|
1147
|
+
default_min_effect_of_interest: zMetricDefaultMinEffectOfInterest.optional(),
|
|
1148
|
+
direction: zMetricDirection.optional()
|
|
1149
|
+
});
|
|
1150
|
+
var zUpdateMetricWithQueryIr = z.object({
|
|
1151
|
+
folder: zFolder.optional(),
|
|
1152
|
+
event_name: zMetricEventName.optional(),
|
|
1153
|
+
query_ir: zQueryIr,
|
|
1154
|
+
winsorize_pct: zMetricWinsorizePct.optional(),
|
|
1155
|
+
default_min_effect_of_interest: zMetricDefaultMinEffectOfInterest.optional(),
|
|
1156
|
+
direction: zMetricDirection.optional()
|
|
1157
|
+
});
|
|
1158
|
+
var zUpdateMetricFields = z.object({
|
|
1159
|
+
folder: zFolder.optional(),
|
|
1160
|
+
event_name: zMetricEventName.optional(),
|
|
1161
|
+
winsorize_pct: zMetricWinsorizePct.optional(),
|
|
1162
|
+
default_min_effect_of_interest: zMetricDefaultMinEffectOfInterest.optional(),
|
|
1163
|
+
direction: zMetricDirection.optional()
|
|
1164
|
+
});
|
|
1165
|
+
var zUpdateMetricRequest = z.union([
|
|
1166
|
+
zUpdateMetricWithQuery,
|
|
1167
|
+
zUpdateMetricWithQueryIr,
|
|
1168
|
+
zUpdateMetricFields
|
|
1169
|
+
]);
|
|
1170
|
+
var zListEventsResponse = z.array(z.object({
|
|
1171
|
+
id: z.string(),
|
|
1172
|
+
name: z.string(),
|
|
1173
|
+
folder: z.string().max(256).regex(/^[a-zA-Z0-9_-]+$/).nullish(),
|
|
1174
|
+
description: z.string().nullable(),
|
|
1175
|
+
properties: z.array(z.object({
|
|
1176
|
+
name: z.string().min(1).max(64),
|
|
1177
|
+
type: z.enum([
|
|
1178
|
+
"string",
|
|
1179
|
+
"number",
|
|
1180
|
+
"boolean"
|
|
1181
|
+
]),
|
|
1182
|
+
required: z.boolean().optional().default(false),
|
|
1183
|
+
description: z.string().optional().default("")
|
|
1184
|
+
})),
|
|
1185
|
+
pending: z.int().gte(-9007199254740991).lte(9007199254740991),
|
|
1186
|
+
createdAt: z.string()
|
|
1187
|
+
}));
|
|
1188
|
+
var zCreateEventRequest = z.object({
|
|
1189
|
+
name: z.string().regex(/^[a-zA-Z0-9_][a-zA-Z0-9_\-.]{0,127}$/),
|
|
1190
|
+
folder: zFolder.optional(),
|
|
1191
|
+
description: z.string().optional(),
|
|
1192
|
+
properties: z.array(z.object({
|
|
1193
|
+
name: z.string().min(1).max(64),
|
|
1194
|
+
type: z.enum([
|
|
1195
|
+
"string",
|
|
1196
|
+
"number",
|
|
1197
|
+
"boolean"
|
|
1198
|
+
]),
|
|
1199
|
+
required: z.boolean().optional().default(false),
|
|
1200
|
+
description: z.string().optional().default("")
|
|
1201
|
+
})).optional().default([])
|
|
1202
|
+
});
|
|
1203
|
+
var zCreateEventResponse = z.object({
|
|
1204
|
+
id: z.string(),
|
|
1205
|
+
name: z.string()
|
|
1206
|
+
});
|
|
1207
|
+
var zGetEventResponse = z.object({
|
|
1208
|
+
id: z.string(),
|
|
1209
|
+
name: z.string(),
|
|
1210
|
+
folder: z.string().max(256).regex(/^[a-zA-Z0-9_-]+$/).nullish(),
|
|
1211
|
+
description: z.string().nullable(),
|
|
1212
|
+
properties: z.array(z.object({
|
|
1213
|
+
name: z.string().min(1).max(64),
|
|
1214
|
+
type: z.enum([
|
|
1215
|
+
"string",
|
|
1216
|
+
"number",
|
|
1217
|
+
"boolean"
|
|
1218
|
+
]),
|
|
1219
|
+
required: z.boolean().optional().default(false),
|
|
1220
|
+
description: z.string().optional().default("")
|
|
1221
|
+
})),
|
|
1222
|
+
pending: z.int().gte(-9007199254740991).lte(9007199254740991),
|
|
1223
|
+
createdAt: z.string()
|
|
1224
|
+
});
|
|
1225
|
+
var zDeleteEventResponse = z.object({
|
|
1226
|
+
ok: z.literal(true)
|
|
1227
|
+
});
|
|
1228
|
+
var zUpdateEventRequest = z.object({
|
|
1229
|
+
folder: zFolder.optional(),
|
|
1230
|
+
description: z.string().optional(),
|
|
1231
|
+
properties: z.array(z.object({
|
|
1232
|
+
name: z.string().min(1).max(64),
|
|
1233
|
+
type: z.enum([
|
|
1234
|
+
"string",
|
|
1235
|
+
"number",
|
|
1236
|
+
"boolean"
|
|
1237
|
+
]),
|
|
1238
|
+
required: z.boolean().optional().default(false),
|
|
1239
|
+
description: z.string().optional().default("")
|
|
1240
|
+
})).optional()
|
|
1241
|
+
});
|
|
1242
|
+
var zUpdateEventResponse = z.object({
|
|
1243
|
+
id: z.string()
|
|
1244
|
+
});
|
|
1245
|
+
var zApproveEventRequest = z.object({
|
|
1246
|
+
folder: zFolder.optional(),
|
|
1247
|
+
description: z.string().optional(),
|
|
1248
|
+
properties: z.array(z.object({
|
|
1249
|
+
name: z.string().min(1).max(64),
|
|
1250
|
+
type: z.enum([
|
|
1251
|
+
"string",
|
|
1252
|
+
"number",
|
|
1253
|
+
"boolean"
|
|
1254
|
+
]),
|
|
1255
|
+
required: z.boolean().optional().default(false),
|
|
1256
|
+
description: z.string().optional().default("")
|
|
1257
|
+
})).optional()
|
|
1258
|
+
});
|
|
1259
|
+
var zApproveEventResponse = z.object({
|
|
1260
|
+
id: z.string()
|
|
1261
|
+
});
|
|
1262
|
+
var zOpsItemStatus = z.enum([
|
|
1263
|
+
"open",
|
|
1264
|
+
"pending_approval",
|
|
1265
|
+
"triage",
|
|
1266
|
+
"triaged",
|
|
1267
|
+
"in_progress",
|
|
1268
|
+
"ready_for_qa",
|
|
1269
|
+
"resolved",
|
|
1270
|
+
"wont_fix"
|
|
1271
|
+
]);
|
|
1272
|
+
var zOpsItemPriority = z.enum([
|
|
1273
|
+
"nice_to_have",
|
|
1274
|
+
"medium",
|
|
1275
|
+
"high",
|
|
1276
|
+
"critical"
|
|
1277
|
+
]);
|
|
1278
|
+
var zListOpsItemsResponse = z.array(z.object({
|
|
1279
|
+
id: z.string(),
|
|
1280
|
+
number: z.number().nullable(),
|
|
1281
|
+
type: z.enum([
|
|
1282
|
+
"bug",
|
|
1283
|
+
"feature_request",
|
|
1284
|
+
"error",
|
|
1285
|
+
"alert",
|
|
1286
|
+
"measure_plan"
|
|
1287
|
+
]),
|
|
1288
|
+
title: z.string(),
|
|
1289
|
+
status: zOpsItemStatus,
|
|
1290
|
+
priority: zOpsItemPriority.nullable(),
|
|
1291
|
+
sourceRef: z.string().nullish(),
|
|
1292
|
+
createdAt: z.string()
|
|
1293
|
+
}));
|
|
1294
|
+
var zNotificationTarget = z.object({
|
|
1295
|
+
slackChannel: z.object({
|
|
1296
|
+
id: z.string().min(1),
|
|
1297
|
+
name: z.string().min(1)
|
|
1298
|
+
}).nullish(),
|
|
1299
|
+
email: z.email().nullish()
|
|
1300
|
+
}).nullable();
|
|
1301
|
+
var zCreateBugRequest = z.object({
|
|
1302
|
+
type: z.enum(["bug"]),
|
|
1303
|
+
title: z.string().min(1).max(200).regex(/^\S(.*\S)?$/),
|
|
1304
|
+
stepsToReproduce: z.string().max(8e3).optional().default(""),
|
|
1305
|
+
actualResult: z.string().max(8e3).optional().default(""),
|
|
1306
|
+
expectedResult: z.string().max(8e3).optional().default(""),
|
|
1307
|
+
priority: zOpsItemPriority.nullish(),
|
|
1308
|
+
reporterEmail: z.email().nullish(),
|
|
1309
|
+
pageUrl: z.url().nullish(),
|
|
1310
|
+
userAgent: z.string().max(500).nullish(),
|
|
1311
|
+
viewport: z.string().max(40).nullish(),
|
|
1312
|
+
context: z.record(z.string(), z.unknown()).nullish(),
|
|
1313
|
+
notify: zNotificationTarget.nullish()
|
|
1314
|
+
});
|
|
1315
|
+
var zCreateFeatureRequestRequest = z.object({
|
|
1316
|
+
type: z.enum(["feature_request"]),
|
|
1317
|
+
title: z.string().min(1).max(200).regex(/^\S(.*\S)?$/),
|
|
1318
|
+
description: z.string().max(8e3).optional().default(""),
|
|
1319
|
+
useCase: z.string().max(8e3).optional().default(""),
|
|
1320
|
+
priority: zOpsItemPriority.nullish(),
|
|
1321
|
+
reporterEmail: z.email().nullish(),
|
|
1322
|
+
pageUrl: z.url().nullish(),
|
|
1323
|
+
userAgent: z.string().max(500).nullish(),
|
|
1324
|
+
context: z.record(z.string(), z.unknown()).nullish(),
|
|
1325
|
+
notify: zNotificationTarget.nullish()
|
|
1326
|
+
});
|
|
1327
|
+
var zCreateOpsItemRequest = z.discriminatedUnion("type", [
|
|
1328
|
+
zCreateBugRequest.extend({ type: z.literal("bug") }),
|
|
1329
|
+
zCreateFeatureRequestRequest.extend({ type: z.literal("feature_request") })
|
|
1330
|
+
]);
|
|
1331
|
+
var zCreateOpsItemResponse = z.object({
|
|
1332
|
+
id: z.string(),
|
|
1333
|
+
number: z.number().nullish()
|
|
1334
|
+
});
|
|
1335
|
+
var zOpsBrowserContext = z.object({
|
|
1336
|
+
pageUrl: z.string().nullish(),
|
|
1337
|
+
userAgent: z.string().nullish(),
|
|
1338
|
+
viewport: z.string().nullish()
|
|
1339
|
+
});
|
|
1340
|
+
var zOpsErrorContext = z.object({
|
|
1341
|
+
id: z.string(),
|
|
1342
|
+
fingerprint: z.string(),
|
|
1343
|
+
causedByFingerprint: z.string().nullish(),
|
|
1344
|
+
errorType: z.string().nullish(),
|
|
1345
|
+
message: z.string(),
|
|
1346
|
+
subject: z.string().nullish(),
|
|
1347
|
+
outcome: z.string().nullish(),
|
|
1348
|
+
kind: z.string().nullish(),
|
|
1349
|
+
side: z.string().nullish(),
|
|
1350
|
+
env: z.string().nullish(),
|
|
1351
|
+
count: z.number(),
|
|
1352
|
+
firstSeenAt: z.string(),
|
|
1353
|
+
lastSeenAt: z.string(),
|
|
1354
|
+
seenUrls: z.array(z.string()),
|
|
1355
|
+
stackTail: z.string().nullish(),
|
|
1356
|
+
sdkVersion: z.string().nullish()
|
|
1357
|
+
});
|
|
1358
|
+
var zOpsAlertRuleSummary = z.object({
|
|
1359
|
+
id: z.string(),
|
|
1360
|
+
name: z.string(),
|
|
1361
|
+
comparator: z.enum([
|
|
1362
|
+
"gt",
|
|
1363
|
+
"gte",
|
|
1364
|
+
"lt",
|
|
1365
|
+
"lte"
|
|
1366
|
+
]),
|
|
1367
|
+
threshold: z.number(),
|
|
1368
|
+
windowHours: z.number()
|
|
1369
|
+
});
|
|
1370
|
+
var zOpsAlertMetricSummary = z.object({
|
|
1371
|
+
id: z.string(),
|
|
1372
|
+
name: z.string(),
|
|
1373
|
+
events: z.array(z.string())
|
|
1374
|
+
});
|
|
1375
|
+
var zOpsAlertContext = z.object({
|
|
1376
|
+
source: z.enum([
|
|
1377
|
+
"metric_rule",
|
|
1378
|
+
"experiment_srm",
|
|
1379
|
+
"experiment_peek",
|
|
1380
|
+
"guardrail"
|
|
1381
|
+
]),
|
|
1382
|
+
dedupeKey: z.string(),
|
|
1383
|
+
severity: z.enum([
|
|
1384
|
+
"danger",
|
|
1385
|
+
"warn",
|
|
1386
|
+
"info"
|
|
1387
|
+
]),
|
|
1388
|
+
observedValue: z.number().nullish(),
|
|
1389
|
+
href: z.string().nullish(),
|
|
1390
|
+
status: z.enum([
|
|
1391
|
+
"active",
|
|
1392
|
+
"resolved",
|
|
1393
|
+
"dismissed"
|
|
1394
|
+
]).nullish(),
|
|
1395
|
+
activeSince: z.string().nullish(),
|
|
1396
|
+
resolvedAt: z.string().nullish(),
|
|
1397
|
+
rule: zOpsAlertRuleSummary.nullish(),
|
|
1398
|
+
metric: zOpsAlertMetricSummary.nullish()
|
|
1399
|
+
});
|
|
1400
|
+
var zMeasurePlanResource = z.object({
|
|
1401
|
+
kind: z.enum([
|
|
1402
|
+
"metric",
|
|
1403
|
+
"experiment",
|
|
1404
|
+
"alert_rule",
|
|
1405
|
+
"event"
|
|
1406
|
+
]),
|
|
1407
|
+
id: z.string().nullish(),
|
|
1408
|
+
name: z.string()
|
|
1409
|
+
});
|
|
1410
|
+
var zMeasurePlanStep = z.object({
|
|
1411
|
+
event: z.string().nullish(),
|
|
1412
|
+
attribute: z.string().nullish(),
|
|
1413
|
+
label: z.string(),
|
|
1414
|
+
description: z.string().nullish(),
|
|
1415
|
+
properties: z.array(z.string()).optional()
|
|
1416
|
+
});
|
|
1417
|
+
var zOpsMeasurePlanContext = z.object({
|
|
1418
|
+
goal: z.string().nullish(),
|
|
1419
|
+
created: z.array(zMeasurePlanResource),
|
|
1420
|
+
pending: z.array(zMeasurePlanResource).optional(),
|
|
1421
|
+
instrumentation: z.array(zMeasurePlanStep)
|
|
1422
|
+
});
|
|
1423
|
+
var zOpsItemContext = z.object({
|
|
1424
|
+
browser: zOpsBrowserContext.optional(),
|
|
1425
|
+
error: zOpsErrorContext.optional(),
|
|
1426
|
+
alert: zOpsAlertContext.optional(),
|
|
1427
|
+
measurePlan: zOpsMeasurePlanContext.optional()
|
|
1428
|
+
});
|
|
1429
|
+
var zOpsItemAttachment = z.object({
|
|
1430
|
+
id: z.string(),
|
|
1431
|
+
kind: z.string(),
|
|
1432
|
+
filename: z.string(),
|
|
1433
|
+
mimeType: z.string(),
|
|
1434
|
+
sizeBytes: z.number(),
|
|
1435
|
+
fetchUrl: z.string()
|
|
1436
|
+
});
|
|
1437
|
+
var zOpsItemRelated = z.object({
|
|
1438
|
+
dashboard: z.string().optional(),
|
|
1439
|
+
error: z.string().optional(),
|
|
1440
|
+
alertRule: z.string().optional(),
|
|
1441
|
+
metric: z.string().optional(),
|
|
1442
|
+
githubIssue: z.string().optional(),
|
|
1443
|
+
githubPr: z.string().optional()
|
|
1444
|
+
});
|
|
1445
|
+
var zGithubConnectorData = z.object({
|
|
1446
|
+
issue: z.object({
|
|
1447
|
+
number: z.number(),
|
|
1448
|
+
url: z.string(),
|
|
1449
|
+
owner: z.string(),
|
|
1450
|
+
repo: z.string(),
|
|
1451
|
+
createdAt: z.string().optional()
|
|
1452
|
+
}).optional(),
|
|
1453
|
+
pr: z.object({
|
|
1454
|
+
number: z.number(),
|
|
1455
|
+
url: z.string(),
|
|
1456
|
+
linkedAt: z.string().optional(),
|
|
1457
|
+
connectedToIssue: z.boolean().optional(),
|
|
1458
|
+
method: z.enum(["closes", "comment"]).optional()
|
|
1459
|
+
}).optional()
|
|
1460
|
+
});
|
|
1461
|
+
var zSlackConnectorData = z.object({
|
|
1462
|
+
message: z.object({
|
|
1463
|
+
channel: z.string(),
|
|
1464
|
+
ts: z.string(),
|
|
1465
|
+
postedAt: z.string().optional()
|
|
1466
|
+
}).optional()
|
|
1467
|
+
});
|
|
1468
|
+
var zConnectorData = z.object({
|
|
1469
|
+
github: zGithubConnectorData.optional(),
|
|
1470
|
+
slack: zSlackConnectorData.optional()
|
|
1471
|
+
});
|
|
1472
|
+
var zGetOpsItemResponse = z.object({
|
|
1473
|
+
id: z.string(),
|
|
1474
|
+
number: z.number().nullable(),
|
|
1475
|
+
type: z.enum([
|
|
1476
|
+
"bug",
|
|
1477
|
+
"feature_request",
|
|
1478
|
+
"error",
|
|
1479
|
+
"alert",
|
|
1480
|
+
"measure_plan"
|
|
1481
|
+
]),
|
|
1482
|
+
title: z.string(),
|
|
1483
|
+
status: zOpsItemStatus,
|
|
1484
|
+
priority: zOpsItemPriority.nullable(),
|
|
1485
|
+
source: z.enum(["team", "system"]).optional(),
|
|
1486
|
+
sourceRef: z.string().nullish(),
|
|
1487
|
+
reporterEmail: z.string().nullish(),
|
|
1488
|
+
stepsToReproduce: z.string().optional(),
|
|
1489
|
+
actualResult: z.string().optional(),
|
|
1490
|
+
expectedResult: z.string().optional(),
|
|
1491
|
+
description: z.string().optional(),
|
|
1492
|
+
useCase: z.string().optional(),
|
|
1493
|
+
context: zOpsItemContext.nullable(),
|
|
1494
|
+
attachments: z.array(zOpsItemAttachment),
|
|
1495
|
+
related: zOpsItemRelated,
|
|
1496
|
+
connectorData: zConnectorData.nullish(),
|
|
1497
|
+
notify: zNotificationTarget.nullish(),
|
|
1498
|
+
createdAt: z.string(),
|
|
1499
|
+
updatedAt: z.string().optional()
|
|
1500
|
+
});
|
|
1501
|
+
var zOpsItemPriorityOrNull = zOpsItemPriority.nullable();
|
|
1502
|
+
var zOpsItemNotifyOrNull = zNotificationTarget.nullable();
|
|
1503
|
+
var zUpdateBugRequest = z.object({
|
|
1504
|
+
title: z.string().min(1).max(200).regex(/^\S(.*\S)?$/).optional(),
|
|
1505
|
+
stepsToReproduce: z.string().max(8e3).optional(),
|
|
1506
|
+
actualResult: z.string().max(8e3).optional(),
|
|
1507
|
+
expectedResult: z.string().max(8e3).optional(),
|
|
1508
|
+
status: zOpsItemStatus.optional(),
|
|
1509
|
+
priority: zOpsItemPriorityOrNull.optional(),
|
|
1510
|
+
githubPrNumber: z.int().gte(1).nullish(),
|
|
1511
|
+
notify: zOpsItemNotifyOrNull.optional()
|
|
1512
|
+
});
|
|
1513
|
+
var zUpdateFeatureRequestRequest = z.object({
|
|
1514
|
+
title: z.string().min(1).max(200).regex(/^\S(.*\S)?$/).optional(),
|
|
1515
|
+
description: z.string().max(8e3).optional(),
|
|
1516
|
+
useCase: z.string().max(8e3).optional(),
|
|
1517
|
+
status: zOpsItemStatus.optional(),
|
|
1518
|
+
priority: zOpsItemPriorityOrNull.optional(),
|
|
1519
|
+
githubPrNumber: z.int().gte(1).nullish(),
|
|
1520
|
+
notify: zOpsItemNotifyOrNull.optional()
|
|
1521
|
+
});
|
|
1522
|
+
var zUpdateOpsItemStatusRequest = z.object({
|
|
1523
|
+
status: zOpsItemStatus.optional(),
|
|
1524
|
+
priority: zOpsItemPriorityOrNull.optional(),
|
|
1525
|
+
notify: zOpsItemNotifyOrNull.optional()
|
|
1526
|
+
});
|
|
1527
|
+
var zUpdateOpsItemRequest = z.union([
|
|
1528
|
+
zUpdateBugRequest,
|
|
1529
|
+
zUpdateFeatureRequestRequest,
|
|
1530
|
+
zUpdateOpsItemStatusRequest
|
|
1531
|
+
]);
|
|
1532
|
+
var zUpdateOpsItemResponse = z.object({
|
|
1533
|
+
id: z.string()
|
|
1534
|
+
});
|
|
1535
|
+
var zLinkPrToOpsItemRequest = z.object({
|
|
1536
|
+
prNumber: z.int().gt(0).lte(9007199254740991).nullable(),
|
|
1537
|
+
prUrl: z.url().optional()
|
|
1538
|
+
});
|
|
1539
|
+
var zLinkPrToOpsItemResponse = z.object({
|
|
1540
|
+
id: z.string()
|
|
1541
|
+
});
|
|
1542
|
+
var zOpsCommentAuthorType = z.enum(["user", "system"]);
|
|
1543
|
+
var zOpsComment = z.object({
|
|
1544
|
+
id: z.string(),
|
|
1545
|
+
feedbackId: z.string(),
|
|
1546
|
+
parentId: z.string().nullable(),
|
|
1547
|
+
authorType: zOpsCommentAuthorType,
|
|
1548
|
+
authorEmail: z.string().nullable(),
|
|
1549
|
+
body: z.string(),
|
|
1550
|
+
createdAt: z.string(),
|
|
1551
|
+
updatedAt: z.string()
|
|
1552
|
+
});
|
|
1553
|
+
var zListOpsCommentsResponse = z.object({
|
|
1554
|
+
comments: z.array(zOpsComment)
|
|
1555
|
+
});
|
|
1556
|
+
var zCreateOpsCommentRequest = z.object({
|
|
1557
|
+
body: z.string().min(1).max(1e4),
|
|
1558
|
+
parentId: z.string().nullish()
|
|
1559
|
+
});
|
|
1560
|
+
var zCreateOpsCommentResponse = z.object({
|
|
1561
|
+
id: z.string()
|
|
1562
|
+
});
|
|
1563
|
+
var zNotifyOpsRequest = z.object({
|
|
1564
|
+
title: z.string().min(1).max(200),
|
|
1565
|
+
summary: z.string().min(1).max(280),
|
|
1566
|
+
steps: z.array(z.string()).optional(),
|
|
1567
|
+
href: z.string().nullish(),
|
|
1568
|
+
dedupeKey: z.string().optional()
|
|
1569
|
+
});
|
|
1570
|
+
var zNotifyOpsResponse = z.object({
|
|
1571
|
+
dedupeKey: z.string(),
|
|
1572
|
+
dispatched: z.boolean()
|
|
1573
|
+
});
|
|
1574
|
+
var zListSlackChannelsResponse = z.object({
|
|
1575
|
+
connected: z.boolean(),
|
|
1576
|
+
channels: z.array(z.object({
|
|
1577
|
+
id: z.string(),
|
|
1578
|
+
name: z.string(),
|
|
1579
|
+
isPrivate: z.boolean().optional()
|
|
1580
|
+
}))
|
|
1581
|
+
});
|
|
1582
|
+
var zListAlertRulesResponse = z.array(z.object({
|
|
1583
|
+
id: z.string(),
|
|
1584
|
+
name: z.string(),
|
|
1585
|
+
metricId: z.string(),
|
|
1586
|
+
metricName: z.string().nullable(),
|
|
1587
|
+
comparator: z.enum([
|
|
1588
|
+
"gt",
|
|
1589
|
+
"gte",
|
|
1590
|
+
"lt",
|
|
1591
|
+
"lte"
|
|
1592
|
+
]),
|
|
1593
|
+
threshold: z.number(),
|
|
1594
|
+
windowHours: z.int().gte(-9007199254740991).lte(9007199254740991),
|
|
1595
|
+
severity: z.enum([
|
|
1596
|
+
"danger",
|
|
1597
|
+
"warn",
|
|
1598
|
+
"info"
|
|
1599
|
+
]),
|
|
1600
|
+
enabled: z.boolean(),
|
|
1601
|
+
notify: zNotificationTarget,
|
|
1602
|
+
createdAt: z.string(),
|
|
1603
|
+
updatedAt: z.string()
|
|
1604
|
+
}));
|
|
1605
|
+
var zCreateAlertRuleRequest = z.object({
|
|
1606
|
+
name: z.string().min(1).max(120),
|
|
1607
|
+
metricId: z.string().min(1),
|
|
1608
|
+
comparator: z.enum([
|
|
1609
|
+
"gt",
|
|
1610
|
+
"gte",
|
|
1611
|
+
"lt",
|
|
1612
|
+
"lte"
|
|
1613
|
+
]),
|
|
1614
|
+
threshold: z.number(),
|
|
1615
|
+
windowHours: z.int().gte(1).lte(720).optional().default(24),
|
|
1616
|
+
severity: z.enum([
|
|
1617
|
+
"danger",
|
|
1618
|
+
"warn",
|
|
1619
|
+
"info"
|
|
1620
|
+
]).optional().default("warn"),
|
|
1621
|
+
enabled: z.boolean().optional().default(true),
|
|
1622
|
+
notify: zNotificationTarget.optional()
|
|
1623
|
+
});
|
|
1624
|
+
var zCreateAlertRuleResponse = z.object({
|
|
1625
|
+
id: z.string()
|
|
1626
|
+
});
|
|
1627
|
+
var zDeleteAlertRuleResponse = z.object({
|
|
1628
|
+
ok: z.literal(true)
|
|
1629
|
+
});
|
|
1630
|
+
var zUpdateAlertRuleRequest = z.object({
|
|
1631
|
+
name: z.string().min(1).max(120).optional(),
|
|
1632
|
+
comparator: z.enum([
|
|
1633
|
+
"gt",
|
|
1634
|
+
"gte",
|
|
1635
|
+
"lt",
|
|
1636
|
+
"lte"
|
|
1637
|
+
]).optional(),
|
|
1638
|
+
threshold: z.number().optional(),
|
|
1639
|
+
windowHours: z.int().gte(1).lte(720).optional(),
|
|
1640
|
+
severity: z.enum([
|
|
1641
|
+
"danger",
|
|
1642
|
+
"warn",
|
|
1643
|
+
"info"
|
|
1644
|
+
]).optional(),
|
|
1645
|
+
enabled: z.boolean().optional(),
|
|
1646
|
+
notify: zNotificationTarget.optional()
|
|
1647
|
+
});
|
|
1648
|
+
var zUpdateAlertRuleResponse = z.object({
|
|
1649
|
+
id: z.string()
|
|
1650
|
+
});
|
|
1651
|
+
var zGetCurrentProjectResponse = z.object({
|
|
1652
|
+
id: z.string(),
|
|
1653
|
+
name: z.string(),
|
|
1654
|
+
domain: z.string().nullable(),
|
|
1655
|
+
ownerEmail: z.string(),
|
|
1656
|
+
plan: z.enum([
|
|
1657
|
+
"free",
|
|
1658
|
+
"pro",
|
|
1659
|
+
"business",
|
|
1660
|
+
"enterprise"
|
|
1661
|
+
]),
|
|
1662
|
+
status: z.enum(["active", "inactive"]),
|
|
1663
|
+
subscriptionStatus: z.string(),
|
|
1664
|
+
billingInterval: z.enum(["monthly", "annual"]),
|
|
1665
|
+
currentPeriodEnd: z.string().nullable(),
|
|
1666
|
+
trialEndsAt: z.string().nullable(),
|
|
1667
|
+
cancelAtPeriodEnd: z.number(),
|
|
1668
|
+
moduleTranslations: z.union([
|
|
1669
|
+
z.boolean(),
|
|
1670
|
+
z.number()
|
|
1671
|
+
]),
|
|
1672
|
+
moduleConfigs: z.union([
|
|
1673
|
+
z.boolean(),
|
|
1674
|
+
z.number()
|
|
1675
|
+
]),
|
|
1676
|
+
moduleGates: z.union([
|
|
1677
|
+
z.boolean(),
|
|
1678
|
+
z.number()
|
|
1679
|
+
]),
|
|
1680
|
+
moduleExperiments: z.union([
|
|
1681
|
+
z.boolean(),
|
|
1682
|
+
z.number()
|
|
1683
|
+
]),
|
|
1684
|
+
moduleFeedback: z.union([
|
|
1685
|
+
z.boolean(),
|
|
1686
|
+
z.number()
|
|
1687
|
+
]),
|
|
1688
|
+
minSampleSize: z.int().optional(),
|
|
1689
|
+
minRuntimeDays: z.int().optional(),
|
|
1690
|
+
defaultPower: z.number().optional(),
|
|
1691
|
+
ciConfidence: z.number().optional(),
|
|
1692
|
+
defaultAllocationPct: z.int().optional(),
|
|
1693
|
+
defaultHoldout: z.int().optional(),
|
|
1694
|
+
defaultWinsorizePct: z.int().optional(),
|
|
1695
|
+
defaultMei: z.number().nullish(),
|
|
1696
|
+
cupedBaselineDays: z.int().optional(),
|
|
1697
|
+
cupedMinOverlap: z.number().optional(),
|
|
1698
|
+
cupedMinBaselineUsers: z.int().optional(),
|
|
1699
|
+
msprtTauMeiFactor: z.number().optional(),
|
|
1700
|
+
msprtTauSdFactor: z.number().optional(),
|
|
1701
|
+
srmThreshold: z.number().optional(),
|
|
1702
|
+
createdAt: z.string(),
|
|
1703
|
+
updatedAt: z.string()
|
|
1704
|
+
});
|
|
1705
|
+
var zUpsertProjectRequest = z.object({
|
|
1706
|
+
domain: z.string().min(1).max(2048).regex(/^(\*|(\*\.)?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?(\.[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)+)$/),
|
|
1707
|
+
name: z.string().min(1).max(100).optional()
|
|
1708
|
+
});
|
|
1709
|
+
var zUpsertProjectResponse = z.object({
|
|
1710
|
+
id: z.string(),
|
|
1711
|
+
name: z.string(),
|
|
1712
|
+
domain: z.string().nullable(),
|
|
1713
|
+
owner_email: z.string(),
|
|
1714
|
+
created: z.boolean()
|
|
1715
|
+
});
|
|
1716
|
+
var zDomain = z.string().min(1).max(2048).regex(/^(\*|(\*\.)?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?(\.[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)+)$/);
|
|
1717
|
+
var zUpdateProjectRequest = z.object({
|
|
1718
|
+
name: z.string().min(1).max(120).optional(),
|
|
1719
|
+
domain: zDomain.optional(),
|
|
1720
|
+
slug: z.string().min(2).max(48).regex(/^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$/).optional(),
|
|
1721
|
+
defaultEnv: z.enum([
|
|
1722
|
+
"dev",
|
|
1723
|
+
"staging",
|
|
1724
|
+
"prod"
|
|
1725
|
+
]).optional(),
|
|
1726
|
+
timezone: z.string().min(1).max(64).optional(),
|
|
1727
|
+
statMethod: z.enum([
|
|
1728
|
+
"sequential",
|
|
1729
|
+
"fixed",
|
|
1730
|
+
"bayesian"
|
|
1731
|
+
]).optional(),
|
|
1732
|
+
sigThreshold: z.enum([
|
|
1733
|
+
"0.01",
|
|
1734
|
+
"0.05",
|
|
1735
|
+
"0.10"
|
|
1736
|
+
]).optional(),
|
|
1737
|
+
autoRollback: z.boolean().optional(),
|
|
1738
|
+
minSampleDays: z.int().gte(1).lte(365).optional(),
|
|
1739
|
+
moduleTranslations: z.boolean().optional(),
|
|
1740
|
+
moduleConfigs: z.boolean().optional(),
|
|
1741
|
+
moduleGates: z.boolean().optional(),
|
|
1742
|
+
moduleExperiments: z.boolean().optional(),
|
|
1743
|
+
moduleFeedback: z.boolean().optional(),
|
|
1744
|
+
moduleUser: z.boolean().optional(),
|
|
1745
|
+
moduleEvents: z.boolean().optional(),
|
|
1746
|
+
minSampleSize: z.int().gte(2).lte(1e6).optional(),
|
|
1747
|
+
minRuntimeDays: z.int().gte(0).lte(365).optional(),
|
|
1748
|
+
defaultPower: z.number().gte(0.5).lte(0.99).optional(),
|
|
1749
|
+
ciConfidence: z.number().gte(0.5).lte(0.999).optional(),
|
|
1750
|
+
defaultAllocationPct: z.int().gte(1).lte(1e4).optional(),
|
|
1751
|
+
defaultHoldout: z.int().gte(0).lte(1e4).optional(),
|
|
1752
|
+
defaultWinsorizePct: z.int().gte(1).lte(99).optional(),
|
|
1753
|
+
defaultMei: z.number().gte(0).lte(1).nullish(),
|
|
1754
|
+
cupedBaselineDays: z.int().gte(1).lte(365).optional(),
|
|
1755
|
+
cupedMinOverlap: z.number().gte(0.01).lte(0.99).optional(),
|
|
1756
|
+
cupedMinBaselineUsers: z.int().gte(10).lte(1e5).optional(),
|
|
1757
|
+
msprtTauMeiFactor: z.number().gte(0.1).lte(2).optional(),
|
|
1758
|
+
msprtTauSdFactor: z.number().gte(0.05).lte(1).optional(),
|
|
1759
|
+
srmThreshold: z.number().gte(1e-4).lte(0.05).optional()
|
|
1760
|
+
});
|
|
1761
|
+
var zListI18nProfilesResponse = z.array(z.object({
|
|
1762
|
+
id: z.string(),
|
|
1763
|
+
name: z.string(),
|
|
1764
|
+
isDefault: z.number().optional(),
|
|
1765
|
+
createdAt: z.string().optional(),
|
|
1766
|
+
deletedAt: z.string().nullish()
|
|
1767
|
+
}));
|
|
1768
|
+
var zCreateI18nProfileRequest = z.object({
|
|
1769
|
+
name: z.string().min(1).max(64).regex(/^[a-z0-9][a-z0-9_:.-]*$/)
|
|
1770
|
+
});
|
|
1771
|
+
var zCreateI18nProfileResponse = z.object({
|
|
1772
|
+
id: z.string(),
|
|
1773
|
+
name: z.string()
|
|
1774
|
+
});
|
|
1775
|
+
var zListI18nKeysResponse = z.object({
|
|
1776
|
+
keys: z.array(z.object({
|
|
1777
|
+
id: z.string(),
|
|
1778
|
+
key: z.string(),
|
|
1779
|
+
value: z.string(),
|
|
1780
|
+
description: z.string().nullish(),
|
|
1781
|
+
variables: z.array(z.string()).nullish(),
|
|
1782
|
+
profileId: z.string().optional(),
|
|
1783
|
+
chunkId: z.string().optional(),
|
|
1784
|
+
updatedAt: z.string().optional(),
|
|
1785
|
+
updatedBy: z.string().optional()
|
|
1786
|
+
})),
|
|
1787
|
+
total: z.number()
|
|
1788
|
+
});
|
|
1789
|
+
var zPushI18nKeysRequest = z.object({
|
|
1790
|
+
profile_id: z.uuid(),
|
|
1791
|
+
chunk: z.string().min(1).max(64).optional().default("default"),
|
|
1792
|
+
keys: z.array(z.object({
|
|
1793
|
+
key: z.string().min(1).max(256),
|
|
1794
|
+
value: z.string(),
|
|
1795
|
+
description: z.string().optional(),
|
|
1796
|
+
variables: z.array(z.string().min(1).max(64)).max(32).optional()
|
|
1797
|
+
})).min(1).max(5e3)
|
|
1798
|
+
});
|
|
1799
|
+
var zPushI18nKeysResponse = z.object({
|
|
1800
|
+
added: z.array(z.string()),
|
|
1801
|
+
skipped: z.array(z.string()),
|
|
1802
|
+
pushed_count: z.number(),
|
|
1803
|
+
skipped_count: z.number(),
|
|
1804
|
+
chunk: z.string().optional()
|
|
1805
|
+
});
|
|
1806
|
+
var zUpdateI18nKeyRequest = z.object({
|
|
1807
|
+
value: z.string(),
|
|
1808
|
+
description: z.string().optional(),
|
|
1809
|
+
variables: z.array(z.string().min(1).max(64)).max(32).optional()
|
|
1810
|
+
});
|
|
1811
|
+
var zUpdateI18nKeyResponse = z.object({
|
|
1812
|
+
id: z.string()
|
|
1813
|
+
});
|
|
1814
|
+
var zListI18nDraftsResponse = z.array(z.object({
|
|
1815
|
+
id: z.string(),
|
|
1816
|
+
name: z.string().optional(),
|
|
1817
|
+
profileId: z.string().optional(),
|
|
1818
|
+
sourceProfileId: z.string().nullish(),
|
|
1819
|
+
status: z.enum([
|
|
1820
|
+
"open",
|
|
1821
|
+
"merged",
|
|
1822
|
+
"abandoned"
|
|
1823
|
+
]).optional(),
|
|
1824
|
+
createdBy: z.string().optional(),
|
|
1825
|
+
createdAt: z.string().optional(),
|
|
1826
|
+
publishedAt: z.string().nullish()
|
|
1827
|
+
}));
|
|
1828
|
+
var zCreateI18nDraftRequest = z.object({
|
|
1829
|
+
name: z.string().min(1).max(64),
|
|
1830
|
+
profile_id: z.uuid(),
|
|
1831
|
+
source_profile_id: z.uuid().optional()
|
|
1832
|
+
});
|
|
1833
|
+
var zI18nDraft = z.object({
|
|
1834
|
+
id: z.string(),
|
|
1835
|
+
name: z.string().optional(),
|
|
1836
|
+
profileId: z.string().optional(),
|
|
1837
|
+
sourceProfileId: z.string().nullish(),
|
|
1838
|
+
status: z.enum([
|
|
1839
|
+
"open",
|
|
1840
|
+
"merged",
|
|
1841
|
+
"abandoned"
|
|
1842
|
+
]).optional(),
|
|
1843
|
+
createdBy: z.string().optional(),
|
|
1844
|
+
createdAt: z.string().optional(),
|
|
1845
|
+
publishedAt: z.string().nullish()
|
|
1846
|
+
});
|
|
1847
|
+
var zUpdateI18nDraftRequest = z.object({
|
|
1848
|
+
status: z.enum([
|
|
1849
|
+
"open",
|
|
1850
|
+
"merged",
|
|
1851
|
+
"abandoned"
|
|
1852
|
+
]).optional()
|
|
1853
|
+
});
|
|
1854
|
+
var zPublishI18nProfileRequest = z.object({
|
|
1855
|
+
chunk: z.string().optional()
|
|
1856
|
+
});
|
|
1857
|
+
var zPublishI18nProfileResponse = z.object({
|
|
1858
|
+
ok: z.literal(true),
|
|
1859
|
+
profile_id: z.string(),
|
|
1860
|
+
chunk: z.string().nullable(),
|
|
1861
|
+
published_at: z.string(),
|
|
1862
|
+
version: z.string(),
|
|
1863
|
+
key_count: z.number(),
|
|
1864
|
+
changed: z.boolean(),
|
|
1865
|
+
purged: z.enum([
|
|
1866
|
+
"purged",
|
|
1867
|
+
"skipped",
|
|
1868
|
+
"failed"
|
|
1869
|
+
]),
|
|
1870
|
+
kv_verified: z.boolean(),
|
|
1871
|
+
warning: z.string().optional()
|
|
1872
|
+
});
|
|
1873
|
+
var zSetI18nLabelRequest = z.object({
|
|
1874
|
+
key: z.string().min(1).max(256),
|
|
1875
|
+
value: z.string(),
|
|
1876
|
+
profile: z.string().min(1).max(64).optional(),
|
|
1877
|
+
description: z.string().optional()
|
|
1878
|
+
});
|
|
1879
|
+
var zSetI18nLabelResponse = z.object({
|
|
1880
|
+
ok: z.literal(true),
|
|
1881
|
+
profile: z.string(),
|
|
1882
|
+
profile_id: z.string(),
|
|
1883
|
+
key: z.string(),
|
|
1884
|
+
value: z.string(),
|
|
1885
|
+
published_at: z.string(),
|
|
1886
|
+
version: z.string(),
|
|
1887
|
+
key_count: z.number(),
|
|
1888
|
+
changed: z.boolean(),
|
|
1889
|
+
purged: z.enum([
|
|
1890
|
+
"purged",
|
|
1891
|
+
"skipped",
|
|
1892
|
+
"failed"
|
|
1893
|
+
]),
|
|
1894
|
+
kv_verified: z.boolean(),
|
|
1895
|
+
warning: z.string().optional()
|
|
1896
|
+
});
|
|
1897
|
+
var zErrorRecord = z.object({
|
|
1898
|
+
id: z.string(),
|
|
1899
|
+
projectId: z.string(),
|
|
1900
|
+
fingerprint: z.string(),
|
|
1901
|
+
causedByFingerprint: z.string().nullish(),
|
|
1902
|
+
message: z.string(),
|
|
1903
|
+
errorType: z.string().nullish(),
|
|
1904
|
+
stack: z.string().nullish(),
|
|
1905
|
+
source: z.string().nullish(),
|
|
1906
|
+
url: z.string().nullish(),
|
|
1907
|
+
seenUrls: z.string().nullish(),
|
|
1908
|
+
subject: z.string().nullish(),
|
|
1909
|
+
outcome: z.string().nullish(),
|
|
1910
|
+
side: z.string().nullish(),
|
|
1911
|
+
env: z.string().nullish(),
|
|
1912
|
+
kind: z.enum([
|
|
1913
|
+
"caught",
|
|
1914
|
+
"uncaught",
|
|
1915
|
+
"unhandled_rejection",
|
|
1916
|
+
"network",
|
|
1917
|
+
"violation"
|
|
1918
|
+
]).nullish(),
|
|
1919
|
+
lastExtrasJson: z.string().nullish(),
|
|
1920
|
+
sdkVersion: z.string().nullish(),
|
|
1921
|
+
count: z.int().gte(1),
|
|
1922
|
+
status: z.enum([
|
|
1923
|
+
"open",
|
|
1924
|
+
"resolved",
|
|
1925
|
+
"ignored"
|
|
1926
|
+
]),
|
|
1927
|
+
firstSeenAt: z.string(),
|
|
1928
|
+
lastSeenAt: z.string(),
|
|
1929
|
+
createdAt: z.string(),
|
|
1930
|
+
updatedAt: z.string()
|
|
1931
|
+
});
|
|
1932
|
+
var zListErrorsResponse = z.array(zErrorRecord);
|
|
1933
|
+
var zUpdateErrorStatusRequest = z.object({
|
|
1934
|
+
status: z.enum([
|
|
1935
|
+
"open",
|
|
1936
|
+
"resolved",
|
|
1937
|
+
"ignored"
|
|
1938
|
+
])
|
|
1939
|
+
});
|
|
1940
|
+
var zFileErrorTicketResponse = z.object({
|
|
1941
|
+
id: z.string(),
|
|
1942
|
+
number: z.int()
|
|
1943
|
+
});
|
|
1944
|
+
var zErrorSeriesRequest = z.object({
|
|
1945
|
+
from: z.int().gte(0),
|
|
1946
|
+
to: z.int().gte(0),
|
|
1947
|
+
bucket: z.int().gte(60).lte(86400).optional().default(3600)
|
|
1948
|
+
});
|
|
1949
|
+
var zErrorSeriesResponse = z.object({
|
|
1950
|
+
sql: z.string(),
|
|
1951
|
+
rows: z.array(z.object({
|
|
1952
|
+
t: z.int(),
|
|
1953
|
+
v: z.number()
|
|
1954
|
+
}))
|
|
1955
|
+
});
|
|
1956
|
+
var zConnectorProvider = z.enum([
|
|
1957
|
+
"google_sheets",
|
|
1958
|
+
"github",
|
|
1959
|
+
"slack",
|
|
1960
|
+
"claude_trigger",
|
|
1961
|
+
"cursor_trigger",
|
|
1962
|
+
"copilot_trigger",
|
|
1963
|
+
"jules_trigger"
|
|
1964
|
+
]);
|
|
1965
|
+
var zConnectorEvent = z.enum(["bug.created", "feature_request.created"]);
|
|
1966
|
+
var zConnectorRecord = z.object({
|
|
1967
|
+
id: z.string(),
|
|
1968
|
+
projectId: z.string(),
|
|
1969
|
+
provider: zConnectorProvider,
|
|
1970
|
+
name: z.string().max(80),
|
|
1971
|
+
enabled: z.boolean(),
|
|
1972
|
+
events: z.array(zConnectorEvent),
|
|
1973
|
+
config: z.record(z.string(), z.unknown()),
|
|
1974
|
+
accountLabel: z.string().nullable(),
|
|
1975
|
+
lastError: z.string().nullable(),
|
|
1976
|
+
lastAttemptAt: z.string().nullable(),
|
|
1977
|
+
lastSuccessAt: z.string().nullable(),
|
|
1978
|
+
createdAt: z.string(),
|
|
1979
|
+
updatedAt: z.string()
|
|
1980
|
+
});
|
|
1981
|
+
var zListConnectorsResponse = z.array(zConnectorRecord);
|
|
1982
|
+
var zCreateOAuthConnectorRequest = z.object({
|
|
1983
|
+
provider: z.enum([
|
|
1984
|
+
"google_sheets",
|
|
1985
|
+
"github",
|
|
1986
|
+
"slack"
|
|
1987
|
+
]),
|
|
1988
|
+
name: z.string().min(1).max(80),
|
|
1989
|
+
events: z.array(zConnectorEvent).min(1)
|
|
1990
|
+
});
|
|
1991
|
+
var zClaudeTriggerConfig = z.object({
|
|
1992
|
+
routineId: z.string().min(1),
|
|
1993
|
+
fireText: z.string().min(1).optional()
|
|
1994
|
+
});
|
|
1995
|
+
var zCreateClaudeTriggerRequest = z.object({
|
|
1996
|
+
provider: z.enum(["claude_trigger"]),
|
|
1997
|
+
name: z.string().min(1).max(80).optional().default("Claude trigger"),
|
|
1998
|
+
events: z.array(zConnectorEvent).optional().default([]),
|
|
1999
|
+
config: zClaudeTriggerConfig,
|
|
2000
|
+
token: z.string().min(1).optional(),
|
|
2001
|
+
enabled: z.boolean().optional().default(true)
|
|
2002
|
+
});
|
|
2003
|
+
var zCursorTriggerConfig = z.object({
|
|
2004
|
+
repoUrl: z.url(),
|
|
2005
|
+
startingRef: z.string().min(1).optional(),
|
|
2006
|
+
projectId: z.string().min(1)
|
|
2007
|
+
});
|
|
2008
|
+
var zCreateCursorTriggerRequest = z.object({
|
|
2009
|
+
provider: z.enum(["cursor_trigger"]),
|
|
2010
|
+
name: z.string().min(1).max(80).optional().default("Cursor trigger"),
|
|
2011
|
+
events: z.array(zConnectorEvent).optional().default([]),
|
|
2012
|
+
config: zCursorTriggerConfig,
|
|
2013
|
+
apiKey: z.string().min(1),
|
|
2014
|
+
opsKey: z.string().min(1),
|
|
2015
|
+
enabled: z.boolean().optional().default(true)
|
|
2016
|
+
});
|
|
2017
|
+
var zCopilotTriggerConfig = z.object({
|
|
2018
|
+
owner: z.string().min(1),
|
|
2019
|
+
repo: z.string().min(1),
|
|
2020
|
+
baseRef: z.string().min(1).optional(),
|
|
2021
|
+
projectId: z.string().min(1)
|
|
2022
|
+
});
|
|
2023
|
+
var zCreateCopilotTriggerRequest = z.object({
|
|
2024
|
+
provider: z.enum(["copilot_trigger"]),
|
|
2025
|
+
name: z.string().min(1).max(80).optional().default("Copilot trigger"),
|
|
2026
|
+
events: z.array(zConnectorEvent).optional().default([]),
|
|
2027
|
+
config: zCopilotTriggerConfig,
|
|
2028
|
+
token: z.string().min(1),
|
|
2029
|
+
enabled: z.boolean().optional().default(true)
|
|
2030
|
+
});
|
|
2031
|
+
var zJulesTriggerConfig = z.object({
|
|
2032
|
+
source: z.string().min(1),
|
|
2033
|
+
startingBranch: z.string().min(1).optional(),
|
|
2034
|
+
projectId: z.string().min(1)
|
|
2035
|
+
});
|
|
2036
|
+
var zCreateJulesTriggerRequest = z.object({
|
|
2037
|
+
provider: z.enum(["jules_trigger"]),
|
|
2038
|
+
name: z.string().min(1).max(80).optional().default("Jules trigger"),
|
|
2039
|
+
events: z.array(zConnectorEvent).optional().default([]),
|
|
2040
|
+
config: zJulesTriggerConfig,
|
|
2041
|
+
apiKey: z.string().min(1),
|
|
2042
|
+
opsKey: z.string().min(1),
|
|
2043
|
+
enabled: z.boolean().optional().default(true)
|
|
2044
|
+
});
|
|
2045
|
+
var zCreateConnectorRequest = z.discriminatedUnion("provider", [
|
|
2046
|
+
zCreateOAuthConnectorRequest.extend({ provider: z.literal("google_sheets") }),
|
|
2047
|
+
zCreateOAuthConnectorRequest.extend({ provider: z.literal("github") }),
|
|
2048
|
+
zCreateOAuthConnectorRequest.extend({ provider: z.literal("slack") }),
|
|
2049
|
+
zCreateClaudeTriggerRequest.extend({ provider: z.literal("claude_trigger") }),
|
|
2050
|
+
zCreateCursorTriggerRequest.extend({ provider: z.literal("cursor_trigger") }),
|
|
2051
|
+
zCreateCopilotTriggerRequest.extend({ provider: z.literal("copilot_trigger") }),
|
|
2052
|
+
zCreateJulesTriggerRequest.extend({ provider: z.literal("jules_trigger") })
|
|
2053
|
+
]);
|
|
2054
|
+
var zCreateConnectorResponse = z.object({
|
|
2055
|
+
id: z.string()
|
|
2056
|
+
});
|
|
2057
|
+
var zDeleteConnectorResponse = z.object({
|
|
2058
|
+
ok: z.literal(true)
|
|
2059
|
+
});
|
|
2060
|
+
var zUpdateConnectorRequest = z.object({
|
|
2061
|
+
name: z.string().min(1).max(80).optional(),
|
|
2062
|
+
enabled: z.boolean().optional(),
|
|
2063
|
+
events: z.array(zConnectorEvent).optional(),
|
|
2064
|
+
config: z.record(z.string(), z.unknown()).optional()
|
|
2065
|
+
});
|
|
2066
|
+
var zUpdateConnectorResponse = z.object({
|
|
2067
|
+
id: z.string()
|
|
2068
|
+
});
|
|
2069
|
+
var zFireConnectorRequest = z.object({
|
|
2070
|
+
text: z.string().optional()
|
|
2071
|
+
});
|
|
2072
|
+
var zFireConnectorResponse = z.object({
|
|
2073
|
+
ok: z.boolean()
|
|
2074
|
+
});
|
|
2075
|
+
var zTestConnectorResponse = z.object({
|
|
2076
|
+
ok: z.boolean(),
|
|
2077
|
+
issueUrl: z.string().nullable()
|
|
2078
|
+
});
|
|
2079
|
+
var zUpdateClaudeTriggerRequest = z.object({
|
|
2080
|
+
provider: z.enum(["claude_trigger"]),
|
|
2081
|
+
name: z.string().min(1).max(80).optional(),
|
|
2082
|
+
config: zClaudeTriggerConfig,
|
|
2083
|
+
token: z.string().min(1).optional()
|
|
2084
|
+
});
|
|
2085
|
+
var zUpdateCursorTriggerRequest = z.object({
|
|
2086
|
+
provider: z.enum(["cursor_trigger"]),
|
|
2087
|
+
name: z.string().min(1).max(80).optional(),
|
|
2088
|
+
config: zCursorTriggerConfig,
|
|
2089
|
+
apiKey: z.string().min(1).optional(),
|
|
2090
|
+
opsKey: z.string().min(1).optional()
|
|
2091
|
+
});
|
|
2092
|
+
var zUpdateCopilotTriggerRequest = z.object({
|
|
2093
|
+
provider: z.enum(["copilot_trigger"]),
|
|
2094
|
+
name: z.string().min(1).max(80).optional(),
|
|
2095
|
+
config: zCopilotTriggerConfig,
|
|
2096
|
+
token: z.string().min(1).optional()
|
|
2097
|
+
});
|
|
2098
|
+
var zUpdateJulesTriggerRequest = z.object({
|
|
2099
|
+
provider: z.enum(["jules_trigger"]),
|
|
2100
|
+
name: z.string().min(1).max(80).optional(),
|
|
2101
|
+
config: zJulesTriggerConfig,
|
|
2102
|
+
apiKey: z.string().min(1).optional(),
|
|
2103
|
+
opsKey: z.string().min(1).optional()
|
|
2104
|
+
});
|
|
2105
|
+
var zUpdateTriggerConnectorRequest = z.discriminatedUnion("provider", [
|
|
2106
|
+
zUpdateClaudeTriggerRequest.extend({ provider: z.literal("claude_trigger") }),
|
|
2107
|
+
zUpdateCursorTriggerRequest.extend({ provider: z.literal("cursor_trigger") }),
|
|
2108
|
+
zUpdateCopilotTriggerRequest.extend({ provider: z.literal("copilot_trigger") }),
|
|
2109
|
+
zUpdateJulesTriggerRequest.extend({ provider: z.literal("jules_trigger") })
|
|
2110
|
+
]);
|
|
2111
|
+
var zCreateTriggerConnectorRequest = z.discriminatedUnion("provider", [
|
|
2112
|
+
zCreateClaudeTriggerRequest.extend({ provider: z.literal("claude_trigger") }),
|
|
2113
|
+
zCreateCursorTriggerRequest.extend({ provider: z.literal("cursor_trigger") }),
|
|
2114
|
+
zCreateCopilotTriggerRequest.extend({ provider: z.literal("copilot_trigger") }),
|
|
2115
|
+
zCreateJulesTriggerRequest.extend({ provider: z.literal("jules_trigger") })
|
|
2116
|
+
]);
|
|
2117
|
+
var zKeyRecord = z.object({
|
|
2118
|
+
id: z.string(),
|
|
2119
|
+
type: z.enum([
|
|
2120
|
+
"server",
|
|
2121
|
+
"client",
|
|
2122
|
+
"admin",
|
|
2123
|
+
"ops"
|
|
2124
|
+
]),
|
|
2125
|
+
env: z.enum([
|
|
2126
|
+
"dev",
|
|
2127
|
+
"staging",
|
|
2128
|
+
"prod"
|
|
2129
|
+
]),
|
|
2130
|
+
created_at: z.string(),
|
|
2131
|
+
revoked_at: z.string().nullable(),
|
|
2132
|
+
expires_at: z.string().nullable(),
|
|
2133
|
+
created_by_email: z.string().nullable(),
|
|
2134
|
+
name: z.string().nullable(),
|
|
2135
|
+
scopes: z.array(z.string()).nullable(),
|
|
2136
|
+
last4: z.string().nullable()
|
|
2137
|
+
});
|
|
2138
|
+
var zListKeysResponse = z.object({
|
|
2139
|
+
data: z.array(zKeyRecord),
|
|
2140
|
+
next_cursor: z.string().nullable()
|
|
2141
|
+
});
|
|
2142
|
+
var zCreateKeyRequest = z.object({
|
|
2143
|
+
type: z.enum([
|
|
2144
|
+
"server",
|
|
2145
|
+
"client",
|
|
2146
|
+
"admin",
|
|
2147
|
+
"ops"
|
|
2148
|
+
]),
|
|
2149
|
+
name: z.string().min(1).max(80).optional(),
|
|
2150
|
+
scopes: z.array(z.enum([
|
|
2151
|
+
"experiments:read",
|
|
2152
|
+
"gates:evaluate",
|
|
2153
|
+
"events:write",
|
|
2154
|
+
"configs:write",
|
|
2155
|
+
"experiments:write",
|
|
2156
|
+
"tickets:public_create"
|
|
2157
|
+
])).optional(),
|
|
2158
|
+
expiresInDays: z.int().gte(1).lte(3650).nullish(),
|
|
2159
|
+
env: z.enum([
|
|
2160
|
+
"dev",
|
|
2161
|
+
"staging",
|
|
2162
|
+
"prod"
|
|
2163
|
+
])
|
|
2164
|
+
});
|
|
2165
|
+
var zCreateKeyResponse = z.object({
|
|
2166
|
+
id: z.string(),
|
|
2167
|
+
type: z.enum([
|
|
2168
|
+
"server",
|
|
2169
|
+
"client",
|
|
2170
|
+
"admin",
|
|
2171
|
+
"ops"
|
|
2172
|
+
]),
|
|
2173
|
+
env: z.enum([
|
|
2174
|
+
"dev",
|
|
2175
|
+
"staging",
|
|
2176
|
+
"prod"
|
|
2177
|
+
]),
|
|
2178
|
+
key: z.string(),
|
|
2179
|
+
expires_at: z.string().nullable()
|
|
2180
|
+
});
|
|
2181
|
+
var zRevokeKeyResponse = z.object({
|
|
2182
|
+
id: z.string(),
|
|
2183
|
+
revoked: z.literal(true)
|
|
2184
|
+
});
|
|
2185
|
+
var zSearchHit = z.object({
|
|
2186
|
+
type: z.enum([
|
|
2187
|
+
"member",
|
|
2188
|
+
"gate",
|
|
2189
|
+
"experiment",
|
|
2190
|
+
"config",
|
|
2191
|
+
"killswitch",
|
|
2192
|
+
"metric"
|
|
2193
|
+
]),
|
|
2194
|
+
id: z.string(),
|
|
2195
|
+
name: z.string(),
|
|
2196
|
+
title: z.string().nullable(),
|
|
2197
|
+
href: z.string()
|
|
2198
|
+
});
|
|
2199
|
+
var zSearchResponse = z.object({
|
|
2200
|
+
hits: z.array(zSearchHit)
|
|
2201
|
+
});
|
|
2202
|
+
var zProjectId = z.string();
|
|
2203
|
+
var zPaginationLimit = z.int().gte(1).lte(500).default(100);
|
|
2204
|
+
var zPaginationCursor = z.string();
|
|
2205
|
+
var zQ = z.string().max(100);
|
|
2206
|
+
var zListGatesHeaders = z.object({
|
|
2207
|
+
"X-Project-Id": z.string().optional()
|
|
2208
|
+
});
|
|
2209
|
+
var zListGatesQuery = z.object({
|
|
2210
|
+
limit: z.int().gte(1).lte(500).optional().default(100),
|
|
2211
|
+
cursor: z.string().optional(),
|
|
2212
|
+
q: z.string().max(100).optional()
|
|
2213
|
+
});
|
|
2214
|
+
var zCreateGateHeaders = z.object({
|
|
2215
|
+
"X-Project-Id": z.string().optional()
|
|
2216
|
+
});
|
|
2217
|
+
var zDeleteGateHeaders = z.object({
|
|
2218
|
+
"X-Project-Id": z.string().optional()
|
|
2219
|
+
});
|
|
2220
|
+
var zDeleteGatePath = z.object({
|
|
2221
|
+
id: zResourceId
|
|
2222
|
+
});
|
|
2223
|
+
var zUpdateGateHeaders = z.object({
|
|
2224
|
+
"X-Project-Id": z.string().optional()
|
|
2225
|
+
});
|
|
2226
|
+
var zUpdateGatePath = z.object({
|
|
2227
|
+
id: zResourceId
|
|
2228
|
+
});
|
|
2229
|
+
var zEnableGateHeaders = z.object({
|
|
2230
|
+
"X-Project-Id": z.string().optional()
|
|
2231
|
+
});
|
|
2232
|
+
var zEnableGatePath = z.object({
|
|
2233
|
+
id: zResourceId
|
|
2234
|
+
});
|
|
2235
|
+
var zDisableGateHeaders = z.object({
|
|
2236
|
+
"X-Project-Id": z.string().optional()
|
|
2237
|
+
});
|
|
2238
|
+
var zDisableGatePath = z.object({
|
|
2239
|
+
id: zResourceId
|
|
2240
|
+
});
|
|
2241
|
+
var zListExperimentsHeaders = z.object({
|
|
2242
|
+
"X-Project-Id": z.string().optional()
|
|
2243
|
+
});
|
|
2244
|
+
var zListExperimentsQuery = z.object({
|
|
2245
|
+
limit: z.int().gte(1).lte(500).optional().default(100),
|
|
2246
|
+
cursor: z.string().optional(),
|
|
2247
|
+
status: z.string().optional(),
|
|
2248
|
+
q: z.string().max(100).optional()
|
|
2249
|
+
});
|
|
2250
|
+
var zCreateExperimentHeaders = z.object({
|
|
2251
|
+
"X-Project-Id": z.string().optional()
|
|
2252
|
+
});
|
|
2253
|
+
var zDeleteExperimentHeaders = z.object({
|
|
2254
|
+
"X-Project-Id": z.string().optional()
|
|
2255
|
+
});
|
|
2256
|
+
var zDeleteExperimentPath = z.object({
|
|
2257
|
+
id: zResourceId
|
|
2258
|
+
});
|
|
2259
|
+
var zGetExperimentHeaders = z.object({
|
|
2260
|
+
"X-Project-Id": z.string().optional()
|
|
2261
|
+
});
|
|
2262
|
+
var zGetExperimentPath = z.object({
|
|
2263
|
+
id: zResourceId
|
|
2264
|
+
});
|
|
2265
|
+
var zUpdateExperimentHeaders = z.object({
|
|
2266
|
+
"X-Project-Id": z.string().optional()
|
|
2267
|
+
});
|
|
2268
|
+
var zUpdateExperimentPath = z.object({
|
|
2269
|
+
id: zResourceId
|
|
2270
|
+
});
|
|
2271
|
+
var zSetExperimentStatusHeaders = z.object({
|
|
2272
|
+
"X-Project-Id": z.string().optional()
|
|
2273
|
+
});
|
|
2274
|
+
var zSetExperimentStatusPath = z.object({
|
|
2275
|
+
id: zResourceId
|
|
2276
|
+
});
|
|
2277
|
+
var zSetExperimentMetricsHeaders = z.object({
|
|
2278
|
+
"X-Project-Id": z.string().optional()
|
|
2279
|
+
});
|
|
2280
|
+
var zSetExperimentMetricsPath = z.object({
|
|
2281
|
+
id: zResourceId
|
|
2282
|
+
});
|
|
2283
|
+
var zGetExperimentResultsHeaders = z.object({
|
|
2284
|
+
"X-Project-Id": z.string().optional()
|
|
2285
|
+
});
|
|
2286
|
+
var zGetExperimentResultsPath = z.object({
|
|
2287
|
+
id: zResourceId
|
|
2288
|
+
});
|
|
2289
|
+
var zGetExperimentTimeseriesHeaders = z.object({
|
|
2290
|
+
"X-Project-Id": z.string().optional()
|
|
2291
|
+
});
|
|
2292
|
+
var zGetExperimentTimeseriesPath = z.object({
|
|
2293
|
+
id: zResourceId
|
|
2294
|
+
});
|
|
2295
|
+
var zGetExperimentTimeseriesQuery = z.object({
|
|
2296
|
+
metric: z.string().optional()
|
|
2297
|
+
});
|
|
2298
|
+
var zReanalyzeExperimentHeaders = z.object({
|
|
2299
|
+
"X-Project-Id": z.string().optional()
|
|
2300
|
+
});
|
|
2301
|
+
var zReanalyzeExperimentPath = z.object({
|
|
2302
|
+
id: zResourceId
|
|
2303
|
+
});
|
|
2304
|
+
var zListConfigsHeaders = z.object({
|
|
2305
|
+
"X-Project-Id": z.string().optional()
|
|
2306
|
+
});
|
|
2307
|
+
var zListConfigsQuery = z.object({
|
|
2308
|
+
limit: z.int().gte(1).lte(500).optional().default(100),
|
|
2309
|
+
cursor: z.string().optional(),
|
|
2310
|
+
q: z.string().max(100).optional()
|
|
2311
|
+
});
|
|
2312
|
+
var zCreateConfigHeaders = z.object({
|
|
2313
|
+
"X-Project-Id": z.string().optional()
|
|
2314
|
+
});
|
|
2315
|
+
var zDeleteConfigHeaders = z.object({
|
|
2316
|
+
"X-Project-Id": z.string().optional()
|
|
2317
|
+
});
|
|
2318
|
+
var zDeleteConfigPath = z.object({
|
|
2319
|
+
id: zResourceId
|
|
2320
|
+
});
|
|
2321
|
+
var zGetConfigHeaders = z.object({
|
|
2322
|
+
"X-Project-Id": z.string().optional()
|
|
2323
|
+
});
|
|
2324
|
+
var zGetConfigPath = z.object({
|
|
2325
|
+
id: zResourceId
|
|
2326
|
+
});
|
|
2327
|
+
var zUpdateConfigHeaders = z.object({
|
|
2328
|
+
"X-Project-Id": z.string().optional()
|
|
2329
|
+
});
|
|
2330
|
+
var zUpdateConfigPath = z.object({
|
|
2331
|
+
id: zResourceId
|
|
2332
|
+
});
|
|
2333
|
+
var zDiscardConfigDraftHeaders = z.object({
|
|
2334
|
+
"X-Project-Id": z.string().optional()
|
|
2335
|
+
});
|
|
2336
|
+
var zDiscardConfigDraftPath = z.object({
|
|
2337
|
+
id: zResourceId
|
|
2338
|
+
});
|
|
2339
|
+
var zSaveConfigDraftHeaders = z.object({
|
|
2340
|
+
"X-Project-Id": z.string().optional()
|
|
2341
|
+
});
|
|
2342
|
+
var zSaveConfigDraftPath = z.object({
|
|
2343
|
+
id: zResourceId
|
|
2344
|
+
});
|
|
2345
|
+
var zPublishConfigDraftHeaders = z.object({
|
|
2346
|
+
"X-Project-Id": z.string().optional()
|
|
2347
|
+
});
|
|
2348
|
+
var zPublishConfigDraftPath = z.object({
|
|
2349
|
+
id: zResourceId
|
|
2350
|
+
});
|
|
2351
|
+
var zListConfigActivityHeaders = z.object({
|
|
2352
|
+
"X-Project-Id": z.string().optional()
|
|
2353
|
+
});
|
|
2354
|
+
var zListConfigActivityPath = z.object({
|
|
2355
|
+
id: zResourceId
|
|
2356
|
+
});
|
|
2357
|
+
var zListConfigActivityQuery = z.object({
|
|
2358
|
+
limit: z.int().gte(1).lte(100).optional().default(20)
|
|
2359
|
+
});
|
|
2360
|
+
var zUpdateConfigSchemaHeaders = z.object({
|
|
2361
|
+
"X-Project-Id": z.string().optional()
|
|
2362
|
+
});
|
|
2363
|
+
var zUpdateConfigSchemaPath = z.object({
|
|
2364
|
+
id: zResourceId
|
|
2365
|
+
});
|
|
2366
|
+
var zListKillswitchesHeaders = z.object({
|
|
2367
|
+
"X-Project-Id": z.string().optional()
|
|
2368
|
+
});
|
|
2369
|
+
var zListKillswitchesQuery = z.object({
|
|
2370
|
+
limit: z.int().gte(1).lte(500).optional().default(100),
|
|
2371
|
+
cursor: z.string().optional(),
|
|
2372
|
+
q: z.string().max(100).optional()
|
|
2373
|
+
});
|
|
2374
|
+
var zCreateKillswitchHeaders = z.object({
|
|
2375
|
+
"X-Project-Id": z.string().optional()
|
|
2376
|
+
});
|
|
2377
|
+
var zDeleteKillswitchHeaders = z.object({
|
|
2378
|
+
"X-Project-Id": z.string().optional()
|
|
2379
|
+
});
|
|
2380
|
+
var zDeleteKillswitchPath = z.object({
|
|
2381
|
+
id: zResourceId
|
|
2382
|
+
});
|
|
2383
|
+
var zGetKillswitchHeaders = z.object({
|
|
2384
|
+
"X-Project-Id": z.string().optional()
|
|
2385
|
+
});
|
|
2386
|
+
var zGetKillswitchPath = z.object({
|
|
2387
|
+
id: zResourceId
|
|
2388
|
+
});
|
|
2389
|
+
var zUpdateKillswitchHeaders = z.object({
|
|
2390
|
+
"X-Project-Id": z.string().optional()
|
|
2391
|
+
});
|
|
2392
|
+
var zUpdateKillswitchPath = z.object({
|
|
2393
|
+
id: zResourceId
|
|
2394
|
+
});
|
|
2395
|
+
var zUnsetKillswitchSwitchHeaders = z.object({
|
|
2396
|
+
"X-Project-Id": z.string().optional()
|
|
2397
|
+
});
|
|
2398
|
+
var zUnsetKillswitchSwitchPath = z.object({
|
|
2399
|
+
id: zResourceId
|
|
2400
|
+
});
|
|
2401
|
+
var zSetKillswitchSwitchHeaders = z.object({
|
|
2402
|
+
"X-Project-Id": z.string().optional()
|
|
2403
|
+
});
|
|
2404
|
+
var zSetKillswitchSwitchPath = z.object({
|
|
2405
|
+
id: zResourceId
|
|
2406
|
+
});
|
|
2407
|
+
var zSetKillswitchValueHeaders = z.object({
|
|
2408
|
+
"X-Project-Id": z.string().optional()
|
|
2409
|
+
});
|
|
2410
|
+
var zSetKillswitchValuePath = z.object({
|
|
2411
|
+
id: zResourceId
|
|
2412
|
+
});
|
|
2413
|
+
var zListUniversesHeaders = z.object({
|
|
2414
|
+
"X-Project-Id": z.string().optional()
|
|
2415
|
+
});
|
|
2416
|
+
var zListUniversesQuery = z.object({
|
|
2417
|
+
limit: z.int().gte(1).lte(500).optional().default(100),
|
|
2418
|
+
cursor: z.string().optional(),
|
|
2419
|
+
q: z.string().max(100).optional()
|
|
2420
|
+
});
|
|
2421
|
+
var zCreateUniverseHeaders = z.object({
|
|
2422
|
+
"X-Project-Id": z.string().optional()
|
|
2423
|
+
});
|
|
2424
|
+
var zDeleteUniverseHeaders = z.object({
|
|
2425
|
+
"X-Project-Id": z.string().optional()
|
|
2426
|
+
});
|
|
2427
|
+
var zDeleteUniversePath = z.object({
|
|
2428
|
+
id: zResourceId
|
|
2429
|
+
});
|
|
2430
|
+
var zUpdateUniverseHeaders = z.object({
|
|
2431
|
+
"X-Project-Id": z.string().optional()
|
|
2432
|
+
});
|
|
2433
|
+
var zUpdateUniversePath = z.object({
|
|
2434
|
+
id: zResourceId
|
|
2435
|
+
});
|
|
2436
|
+
var zListGateTemplatesHeaders = z.object({
|
|
2437
|
+
"X-Project-Id": z.string().optional()
|
|
2438
|
+
});
|
|
2439
|
+
var zListGateTemplatesQuery = z.object({
|
|
2440
|
+
q: z.string().max(100).optional(),
|
|
2441
|
+
query: z.string().optional()
|
|
2442
|
+
});
|
|
2443
|
+
var zCreateGateTemplateHeaders = z.object({
|
|
2444
|
+
"X-Project-Id": z.string().optional()
|
|
2445
|
+
});
|
|
2446
|
+
var zDeleteGateTemplateHeaders = z.object({
|
|
2447
|
+
"X-Project-Id": z.string().optional()
|
|
2448
|
+
});
|
|
2449
|
+
var zDeleteGateTemplatePath = z.object({
|
|
2450
|
+
id: zResourceId
|
|
2451
|
+
});
|
|
2452
|
+
var zGetGateTemplateHeaders = z.object({
|
|
2453
|
+
"X-Project-Id": z.string().optional()
|
|
2454
|
+
});
|
|
2455
|
+
var zGetGateTemplatePath = z.object({
|
|
2456
|
+
id: zResourceId
|
|
2457
|
+
});
|
|
2458
|
+
var zUpdateGateTemplateHeaders = z.object({
|
|
2459
|
+
"X-Project-Id": z.string().optional()
|
|
2460
|
+
});
|
|
2461
|
+
var zUpdateGateTemplatePath = z.object({
|
|
2462
|
+
id: zResourceId
|
|
2463
|
+
});
|
|
2464
|
+
var zListAttributesHeaders = z.object({
|
|
2465
|
+
"X-Project-Id": z.string().optional()
|
|
2466
|
+
});
|
|
2467
|
+
var zListAttributesQuery = z.object({
|
|
2468
|
+
q: z.string().max(100).optional()
|
|
2469
|
+
});
|
|
2470
|
+
var zCreateAttributeHeaders = z.object({
|
|
2471
|
+
"X-Project-Id": z.string().optional()
|
|
2472
|
+
});
|
|
2473
|
+
var zDeleteAttributeHeaders = z.object({
|
|
2474
|
+
"X-Project-Id": z.string().optional()
|
|
2475
|
+
});
|
|
2476
|
+
var zDeleteAttributePath = z.object({
|
|
2477
|
+
id: zResourceId
|
|
2478
|
+
});
|
|
2479
|
+
var zGetAttributeHeaders = z.object({
|
|
2480
|
+
"X-Project-Id": z.string().optional()
|
|
2481
|
+
});
|
|
2482
|
+
var zGetAttributePath = z.object({
|
|
2483
|
+
id: zResourceId
|
|
2484
|
+
});
|
|
2485
|
+
var zUpdateAttributeHeaders = z.object({
|
|
2486
|
+
"X-Project-Id": z.string().optional()
|
|
2487
|
+
});
|
|
2488
|
+
var zUpdateAttributePath = z.object({
|
|
2489
|
+
id: zResourceId
|
|
2490
|
+
});
|
|
2491
|
+
var zListMetricsHeaders = z.object({
|
|
2492
|
+
"X-Project-Id": z.string().optional()
|
|
2493
|
+
});
|
|
2494
|
+
var zListMetricsQuery = z.object({
|
|
2495
|
+
q: z.string().max(100).optional()
|
|
2496
|
+
});
|
|
2497
|
+
var zCreateMetricHeaders = z.object({
|
|
2498
|
+
"X-Project-Id": z.string().optional()
|
|
2499
|
+
});
|
|
2500
|
+
var zDeleteMetricHeaders = z.object({
|
|
2501
|
+
"X-Project-Id": z.string().optional()
|
|
2502
|
+
});
|
|
2503
|
+
var zDeleteMetricPath = z.object({
|
|
2504
|
+
id: zResourceId
|
|
2505
|
+
});
|
|
2506
|
+
var zGetMetricHeaders = z.object({
|
|
2507
|
+
"X-Project-Id": z.string().optional()
|
|
2508
|
+
});
|
|
2509
|
+
var zGetMetricPath = z.object({
|
|
2510
|
+
id: zResourceId
|
|
2511
|
+
});
|
|
2512
|
+
var zUpdateMetricHeaders = z.object({
|
|
2513
|
+
"X-Project-Id": z.string().optional()
|
|
2514
|
+
});
|
|
2515
|
+
var zUpdateMetricPath = z.object({
|
|
2516
|
+
id: zResourceId
|
|
2517
|
+
});
|
|
2518
|
+
var zListEventsHeaders = z.object({
|
|
2519
|
+
"X-Project-Id": z.string().optional()
|
|
2520
|
+
});
|
|
2521
|
+
var zListEventsQuery = z.object({
|
|
2522
|
+
q: z.string().max(100).optional()
|
|
2523
|
+
});
|
|
2524
|
+
var zCreateEventHeaders = z.object({
|
|
2525
|
+
"X-Project-Id": z.string().optional()
|
|
2526
|
+
});
|
|
2527
|
+
var zDeleteEventHeaders = z.object({
|
|
2528
|
+
"X-Project-Id": z.string().optional()
|
|
2529
|
+
});
|
|
2530
|
+
var zDeleteEventPath = z.object({
|
|
2531
|
+
id: zResourceId
|
|
2532
|
+
});
|
|
2533
|
+
var zGetEventHeaders = z.object({
|
|
2534
|
+
"X-Project-Id": z.string().optional()
|
|
2535
|
+
});
|
|
2536
|
+
var zGetEventPath = z.object({
|
|
2537
|
+
id: zResourceId
|
|
2538
|
+
});
|
|
2539
|
+
var zUpdateEventHeaders = z.object({
|
|
2540
|
+
"X-Project-Id": z.string().optional()
|
|
2541
|
+
});
|
|
2542
|
+
var zUpdateEventPath = z.object({
|
|
2543
|
+
id: zResourceId
|
|
2544
|
+
});
|
|
2545
|
+
var zApproveEventHeaders = z.object({
|
|
2546
|
+
"X-Project-Id": z.string().optional()
|
|
2547
|
+
});
|
|
2548
|
+
var zApproveEventPath = z.object({
|
|
2549
|
+
id: zResourceId
|
|
2550
|
+
});
|
|
2551
|
+
var zListOpsItemsHeaders = z.object({
|
|
2552
|
+
"X-Project-Id": z.string().optional()
|
|
2553
|
+
});
|
|
2554
|
+
var zListOpsItemsQuery = z.object({
|
|
2555
|
+
type: z.union([
|
|
2556
|
+
z.enum([
|
|
2557
|
+
"bug",
|
|
2558
|
+
"feature_request",
|
|
2559
|
+
"error",
|
|
2560
|
+
"alert"
|
|
2561
|
+
]),
|
|
2562
|
+
z.literal("all")
|
|
2563
|
+
]).optional(),
|
|
2564
|
+
status: z.union([
|
|
2565
|
+
zOpsItemStatus,
|
|
2566
|
+
z.literal("all")
|
|
2567
|
+
]).optional(),
|
|
2568
|
+
limit: z.int().gte(1).lte(500).optional()
|
|
2569
|
+
});
|
|
2570
|
+
var zCreateOpsItemHeaders = z.object({
|
|
2571
|
+
"X-Project-Id": z.string().optional()
|
|
2572
|
+
});
|
|
2573
|
+
var zGetOpsItemHeaders = z.object({
|
|
2574
|
+
"X-Project-Id": z.string().optional()
|
|
2575
|
+
});
|
|
2576
|
+
var zGetOpsItemPath = z.object({
|
|
2577
|
+
handle: zResourceId
|
|
2578
|
+
});
|
|
2579
|
+
var zUpdateOpsItemHeaders = z.object({
|
|
2580
|
+
"X-Project-Id": z.string().optional()
|
|
2581
|
+
});
|
|
2582
|
+
var zUpdateOpsItemPath = z.object({
|
|
2583
|
+
handle: zResourceId
|
|
2584
|
+
});
|
|
2585
|
+
var zLinkPrToOpsItemHeaders = z.object({
|
|
2586
|
+
"X-Project-Id": z.string().optional()
|
|
2587
|
+
});
|
|
2588
|
+
var zLinkPrToOpsItemPath = z.object({
|
|
2589
|
+
handle: zResourceId
|
|
2590
|
+
});
|
|
2591
|
+
var zListOpsCommentsHeaders = z.object({
|
|
2592
|
+
"X-Project-Id": z.string().optional()
|
|
2593
|
+
});
|
|
2594
|
+
var zListOpsCommentsPath = z.object({
|
|
2595
|
+
handle: zResourceId
|
|
2596
|
+
});
|
|
2597
|
+
var zCreateOpsCommentHeaders = z.object({
|
|
2598
|
+
"X-Project-Id": z.string().optional()
|
|
2599
|
+
});
|
|
2600
|
+
var zCreateOpsCommentPath = z.object({
|
|
2601
|
+
handle: zResourceId
|
|
2602
|
+
});
|
|
2603
|
+
var zNotifyOpsHeaders = z.object({
|
|
2604
|
+
"X-Project-Id": z.string().optional()
|
|
2605
|
+
});
|
|
2606
|
+
var zListSlackChannelsHeaders = z.object({
|
|
2607
|
+
"X-Project-Id": z.string().optional()
|
|
2608
|
+
});
|
|
2609
|
+
var zListAlertRulesHeaders = z.object({
|
|
2610
|
+
"X-Project-Id": z.string().optional()
|
|
2611
|
+
});
|
|
2612
|
+
var zListAlertRulesQuery = z.object({
|
|
2613
|
+
q: z.string().max(100).optional()
|
|
2614
|
+
});
|
|
2615
|
+
var zCreateAlertRuleHeaders = z.object({
|
|
2616
|
+
"X-Project-Id": z.string().optional()
|
|
2617
|
+
});
|
|
2618
|
+
var zDeleteAlertRuleHeaders = z.object({
|
|
2619
|
+
"X-Project-Id": z.string().optional()
|
|
2620
|
+
});
|
|
2621
|
+
var zDeleteAlertRulePath = z.object({
|
|
2622
|
+
id: zResourceId
|
|
2623
|
+
});
|
|
2624
|
+
var zUpdateAlertRuleHeaders = z.object({
|
|
2625
|
+
"X-Project-Id": z.string().optional()
|
|
2626
|
+
});
|
|
2627
|
+
var zUpdateAlertRulePath = z.object({
|
|
2628
|
+
id: zResourceId
|
|
2629
|
+
});
|
|
2630
|
+
var zGetCurrentProjectHeaders = z.object({
|
|
2631
|
+
"X-Project-Id": z.string().optional()
|
|
2632
|
+
});
|
|
2633
|
+
var zUpsertProjectHeaders = z.object({
|
|
2634
|
+
"X-Project-Id": z.string().optional()
|
|
2635
|
+
});
|
|
2636
|
+
var zUpdateProjectHeaders = z.object({
|
|
2637
|
+
"X-Project-Id": z.string().optional()
|
|
2638
|
+
});
|
|
2639
|
+
var zUpdateProjectPath = z.object({
|
|
2640
|
+
id: zResourceId
|
|
2641
|
+
});
|
|
2642
|
+
var zListI18nProfilesHeaders = z.object({
|
|
2643
|
+
"X-Project-Id": z.string().optional()
|
|
2644
|
+
});
|
|
2645
|
+
var zCreateI18nProfileHeaders = z.object({
|
|
2646
|
+
"X-Project-Id": z.string().optional()
|
|
2647
|
+
});
|
|
2648
|
+
var zListI18nKeysHeaders = z.object({
|
|
2649
|
+
"X-Project-Id": z.string().optional()
|
|
2650
|
+
});
|
|
2651
|
+
var zListI18nKeysQuery = z.object({
|
|
2652
|
+
profile_id: z.string().optional(),
|
|
2653
|
+
prefix: z.string().optional(),
|
|
2654
|
+
q: z.string().max(100).optional(),
|
|
2655
|
+
limit: z.int().gte(1).lte(500).optional(),
|
|
2656
|
+
offset: z.int().gte(0).optional().default(0)
|
|
2657
|
+
});
|
|
2658
|
+
var zPushI18nKeysHeaders = z.object({
|
|
2659
|
+
"X-Project-Id": z.string().optional()
|
|
2660
|
+
});
|
|
2661
|
+
var zUpdateI18nKeyHeaders = z.object({
|
|
2662
|
+
"X-Project-Id": z.string().optional()
|
|
2663
|
+
});
|
|
2664
|
+
var zUpdateI18nKeyPath = z.object({
|
|
2665
|
+
id: zResourceId
|
|
2666
|
+
});
|
|
2667
|
+
var zListI18nDraftsHeaders = z.object({
|
|
2668
|
+
"X-Project-Id": z.string().optional()
|
|
2669
|
+
});
|
|
2670
|
+
var zCreateI18nDraftHeaders = z.object({
|
|
2671
|
+
"X-Project-Id": z.string().optional()
|
|
2672
|
+
});
|
|
2673
|
+
var zUpdateI18nDraftHeaders = z.object({
|
|
2674
|
+
"X-Project-Id": z.string().optional()
|
|
2675
|
+
});
|
|
2676
|
+
var zUpdateI18nDraftPath = z.object({
|
|
2677
|
+
draftId: zResourceId
|
|
2678
|
+
});
|
|
2679
|
+
var zPublishI18nProfileHeaders = z.object({
|
|
2680
|
+
"X-Project-Id": z.string().optional()
|
|
2681
|
+
});
|
|
2682
|
+
var zPublishI18nProfilePath = z.object({
|
|
2683
|
+
profileId: zResourceId
|
|
2684
|
+
});
|
|
2685
|
+
var zSetI18nLabelHeaders = z.object({
|
|
2686
|
+
"X-Project-Id": z.string().optional()
|
|
2687
|
+
});
|
|
2688
|
+
var zListErrorsHeaders = z.object({
|
|
2689
|
+
"X-Project-Id": z.string().optional()
|
|
2690
|
+
});
|
|
2691
|
+
var zListErrorsQuery = z.object({
|
|
2692
|
+
status: z.enum([
|
|
2693
|
+
"open",
|
|
2694
|
+
"resolved",
|
|
2695
|
+
"ignored",
|
|
2696
|
+
"all"
|
|
2697
|
+
]).optional().default("all"),
|
|
2698
|
+
q: z.string().max(200).optional(),
|
|
2699
|
+
limit: z.int().gte(1).lte(500).optional().default(200)
|
|
2700
|
+
});
|
|
2701
|
+
var zGetErrorHeaders = z.object({
|
|
2702
|
+
"X-Project-Id": z.string().optional()
|
|
2703
|
+
});
|
|
2704
|
+
var zGetErrorPath = z.object({
|
|
2705
|
+
id: zResourceId
|
|
2706
|
+
});
|
|
2707
|
+
var zUpdateErrorStatusHeaders = z.object({
|
|
2708
|
+
"X-Project-Id": z.string().optional()
|
|
2709
|
+
});
|
|
2710
|
+
var zUpdateErrorStatusPath = z.object({
|
|
2711
|
+
id: zResourceId
|
|
2712
|
+
});
|
|
2713
|
+
var zFileErrorTicketHeaders = z.object({
|
|
2714
|
+
"X-Project-Id": z.string().optional()
|
|
2715
|
+
});
|
|
2716
|
+
var zFileErrorTicketPath = z.object({
|
|
2717
|
+
id: zResourceId
|
|
2718
|
+
});
|
|
2719
|
+
var zGetErrorSeriesHeaders = z.object({
|
|
2720
|
+
"X-Project-Id": z.string().optional()
|
|
2721
|
+
});
|
|
2722
|
+
var zGetErrorSeriesPath = z.object({
|
|
2723
|
+
id: zResourceId
|
|
2724
|
+
});
|
|
2725
|
+
var zListConnectorsHeaders = z.object({
|
|
2726
|
+
"X-Project-Id": z.string().optional()
|
|
2727
|
+
});
|
|
2728
|
+
var zListConnectorsQuery = z.object({
|
|
2729
|
+
q: z.string().max(100).optional()
|
|
2730
|
+
});
|
|
2731
|
+
var zCreateConnectorHeaders = z.object({
|
|
2732
|
+
"X-Project-Id": z.string().optional()
|
|
2733
|
+
});
|
|
2734
|
+
var zDeleteConnectorHeaders = z.object({
|
|
2735
|
+
"X-Project-Id": z.string().optional()
|
|
2736
|
+
});
|
|
2737
|
+
var zDeleteConnectorPath = z.object({
|
|
2738
|
+
id: zResourceId
|
|
2739
|
+
});
|
|
2740
|
+
var zGetConnectorHeaders = z.object({
|
|
2741
|
+
"X-Project-Id": z.string().optional()
|
|
2742
|
+
});
|
|
2743
|
+
var zGetConnectorPath = z.object({
|
|
2744
|
+
id: zResourceId
|
|
2745
|
+
});
|
|
2746
|
+
var zUpdateConnectorHeaders = z.object({
|
|
2747
|
+
"X-Project-Id": z.string().optional()
|
|
2748
|
+
});
|
|
2749
|
+
var zUpdateConnectorPath = z.object({
|
|
2750
|
+
id: zResourceId
|
|
2751
|
+
});
|
|
2752
|
+
var zFireConnectorHeaders = z.object({
|
|
2753
|
+
"X-Project-Id": z.string().optional()
|
|
2754
|
+
});
|
|
2755
|
+
var zFireConnectorPath = z.object({
|
|
2756
|
+
id: zResourceId
|
|
2757
|
+
});
|
|
2758
|
+
var zTestConnectorHeaders = z.object({
|
|
2759
|
+
"X-Project-Id": z.string().optional()
|
|
2760
|
+
});
|
|
2761
|
+
var zTestConnectorPath = z.object({
|
|
2762
|
+
id: zResourceId
|
|
2763
|
+
});
|
|
2764
|
+
var zUpdateTriggerConnectorHeaders = z.object({
|
|
2765
|
+
"X-Project-Id": z.string().optional()
|
|
2766
|
+
});
|
|
2767
|
+
var zUpdateTriggerConnectorPath = z.object({
|
|
2768
|
+
id: zResourceId
|
|
2769
|
+
});
|
|
2770
|
+
var zCreateTriggerConnectorHeaders = z.object({
|
|
2771
|
+
"X-Project-Id": z.string().optional()
|
|
2772
|
+
});
|
|
2773
|
+
var zListKeysHeaders = z.object({
|
|
2774
|
+
"X-Project-Id": z.string().optional()
|
|
2775
|
+
});
|
|
2776
|
+
var zListKeysQuery = z.object({
|
|
2777
|
+
limit: z.int().gte(1).lte(500).optional().default(100),
|
|
2778
|
+
cursor: z.string().optional(),
|
|
2779
|
+
q: z.string().max(100).optional()
|
|
2780
|
+
});
|
|
2781
|
+
var zCreateKeyHeaders = z.object({
|
|
2782
|
+
"X-Project-Id": z.string().optional()
|
|
2783
|
+
});
|
|
2784
|
+
var zRevokeKeyHeaders = z.object({
|
|
2785
|
+
"X-Project-Id": z.string().optional()
|
|
2786
|
+
});
|
|
2787
|
+
var zRevokeKeyPath = z.object({
|
|
2788
|
+
id: zResourceId
|
|
2789
|
+
});
|
|
2790
|
+
var zSearchResourcesHeaders = z.object({
|
|
2791
|
+
"X-Project-Id": z.string().optional()
|
|
2792
|
+
});
|
|
2793
|
+
var zSearchResourcesQuery = z.object({
|
|
2794
|
+
q: z.string().optional()
|
|
2795
|
+
});
|
|
2796
|
+
|
|
2797
|
+
// src/forms.ts
|
|
2798
|
+
var bugFormSchema = zCreateBugRequest.omit({ type: true });
|
|
2799
|
+
var featureFormSchema = zCreateFeatureRequestRequest.omit({ type: true });
|
|
2800
|
+
function firstIssuePerField(error) {
|
|
2801
|
+
const out = {};
|
|
2802
|
+
for (const issue of error.issues) {
|
|
2803
|
+
const field = String(_nullishCoalesce(issue.path[0], () => ( "")));
|
|
2804
|
+
if (field && !(field in out)) out[field] = issue.message;
|
|
2805
|
+
}
|
|
2806
|
+
return out;
|
|
2807
|
+
}
|
|
2808
|
+
function validateBugForm(values) {
|
|
2809
|
+
const r = bugFormSchema.safeParse(values);
|
|
2810
|
+
if (r.success) return { ok: true, value: r.data };
|
|
2811
|
+
return { ok: false, errors: firstIssuePerField(r.error) };
|
|
2812
|
+
}
|
|
2813
|
+
function validateFeatureForm(values) {
|
|
2814
|
+
const r = featureFormSchema.safeParse(values);
|
|
2815
|
+
if (r.success) return { ok: true, value: r.data };
|
|
2816
|
+
return { ok: false, errors: firstIssuePerField(r.error) };
|
|
2817
|
+
}
|
|
2818
|
+
function bugFormToPublicInput(value, extra) {
|
|
2819
|
+
return {
|
|
2820
|
+
title: value.title,
|
|
2821
|
+
...value.actualResult ? { error: value.actualResult } : {},
|
|
2822
|
+
...value.stepsToReproduce ? { description: value.stepsToReproduce } : {},
|
|
2823
|
+
...value.reporterEmail ? { reporterEmail: value.reporterEmail } : {},
|
|
2824
|
+
..._optionalChain([extra, 'optionalAccess', _ => _.step]) ? { step: extra.step } : {},
|
|
2825
|
+
..._nullishCoalesce(_optionalChain([extra, 'optionalAccess', _2 => _2.context]), () => ( value.context)) ? { context: { ..._nullishCoalesce(value.context, () => ( {})), ..._nullishCoalesce(_optionalChain([extra, 'optionalAccess', _3 => _3.context]), () => ( {})) } } : {}
|
|
2826
|
+
};
|
|
2827
|
+
}
|
|
2828
|
+
function featureFormToPublicInput(value, extra) {
|
|
2829
|
+
return {
|
|
2830
|
+
title: value.title,
|
|
2831
|
+
...value.description ? { description: value.description } : {},
|
|
2832
|
+
...value.useCase ? { useCase: value.useCase } : {},
|
|
2833
|
+
...value.reporterEmail ? { reporterEmail: value.reporterEmail } : {},
|
|
2834
|
+
..._optionalChain([extra, 'optionalAccess', _4 => _4.step]) ? { step: extra.step } : {},
|
|
2835
|
+
..._nullishCoalesce(_optionalChain([extra, 'optionalAccess', _5 => _5.context]), () => ( value.context)) ? { context: { ..._nullishCoalesce(value.context, () => ( {})), ..._nullishCoalesce(_optionalChain([extra, 'optionalAccess', _6 => _6.context]), () => ( {})) } } : {}
|
|
2836
|
+
};
|
|
2837
|
+
}
|
|
2838
|
+
|
|
2839
|
+
|
|
2840
|
+
|
|
2841
|
+
|
|
2842
|
+
|
|
2843
|
+
|
|
2844
|
+
|
|
2845
|
+
|
|
2846
|
+
|
|
2847
|
+
|
|
2848
|
+
exports.zCreateBugRequest = zCreateBugRequest; exports.zCreateFeatureRequestRequest = zCreateFeatureRequestRequest; exports.bugFormSchema = bugFormSchema; exports.featureFormSchema = featureFormSchema; exports.validateBugForm = validateBugForm; exports.validateFeatureForm = validateFeatureForm; exports.bugFormToPublicInput = bugFormToPublicInput; exports.featureFormToPublicInput = featureFormToPublicInput;
|