@fabricorg/experiments-api-protocol 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3139 @@
1
+ import { z } from 'zod';
2
+
3
+ /**
4
+ * Each endpoint declares method, path template, request schema, and response
5
+ * schema. The server registers handlers against this table; the api-client
6
+ * derives its method signatures from it. Drift between client and server is
7
+ * impossible by construction.
8
+ */
9
+ interface EndpointDef<TParams extends z.ZodTypeAny = z.ZodTypeAny, TResponse extends z.ZodTypeAny = z.ZodTypeAny> {
10
+ method: 'GET' | 'POST' | 'DELETE';
11
+ /** Path with `:param` placeholders, e.g. `/v1/orgs/:orgId/experiments`. */
12
+ path: string;
13
+ /** Request schema. For GET, used to validate query params; otherwise body. */
14
+ params: TParams;
15
+ response: TResponse;
16
+ /** True if this endpoint mutates state — server applies idempotency cache. */
17
+ mutates: boolean;
18
+ /** Required role on the active org. `null` = any authenticated session. */
19
+ requiresRole: 'owner' | 'admin' | 'experimenter' | 'viewer' | null;
20
+ }
21
+ declare const TenantSelf: z.ZodObject<{
22
+ organization: z.ZodObject<{
23
+ id: z.ZodString;
24
+ name: z.ZodString;
25
+ slug: z.ZodString;
26
+ createdAt: z.ZodString;
27
+ }, "strip", z.ZodTypeAny, {
28
+ id: string;
29
+ name: string;
30
+ slug: string;
31
+ createdAt: string;
32
+ }, {
33
+ id: string;
34
+ name: string;
35
+ slug: string;
36
+ createdAt: string;
37
+ }>;
38
+ member: z.ZodObject<{
39
+ role: z.ZodEnum<["owner", "admin", "experimenter", "viewer"]>;
40
+ }, "strip", z.ZodTypeAny, {
41
+ role: "owner" | "admin" | "experimenter" | "viewer";
42
+ }, {
43
+ role: "owner" | "admin" | "experimenter" | "viewer";
44
+ }>;
45
+ user: z.ZodObject<{
46
+ id: z.ZodString;
47
+ email: z.ZodString;
48
+ name: z.ZodNullable<z.ZodString>;
49
+ }, "strip", z.ZodTypeAny, {
50
+ id: string;
51
+ name: string | null;
52
+ email: string;
53
+ }, {
54
+ id: string;
55
+ name: string | null;
56
+ email: string;
57
+ }>;
58
+ }, "strip", z.ZodTypeAny, {
59
+ organization: {
60
+ id: string;
61
+ name: string;
62
+ slug: string;
63
+ createdAt: string;
64
+ };
65
+ member: {
66
+ role: "owner" | "admin" | "experimenter" | "viewer";
67
+ };
68
+ user: {
69
+ id: string;
70
+ name: string | null;
71
+ email: string;
72
+ };
73
+ }, {
74
+ organization: {
75
+ id: string;
76
+ name: string;
77
+ slug: string;
78
+ createdAt: string;
79
+ };
80
+ member: {
81
+ role: "owner" | "admin" | "experimenter" | "viewer";
82
+ };
83
+ user: {
84
+ id: string;
85
+ name: string | null;
86
+ email: string;
87
+ };
88
+ }>;
89
+ type TenantSelf = z.infer<typeof TenantSelf>;
90
+ declare const ExperimentSummary: z.ZodObject<{
91
+ id: z.ZodString;
92
+ name: z.ZodString;
93
+ state: z.ZodEnum<["draft", "review", "approved", "running", "paused", "killed", "concluded", "archived"]>;
94
+ updatedAt: z.ZodString;
95
+ }, "strip", z.ZodTypeAny, {
96
+ id: string;
97
+ name: string;
98
+ state: "draft" | "review" | "approved" | "running" | "paused" | "killed" | "concluded" | "archived";
99
+ updatedAt: string;
100
+ }, {
101
+ id: string;
102
+ name: string;
103
+ state: "draft" | "review" | "approved" | "running" | "paused" | "killed" | "concluded" | "archived";
104
+ updatedAt: string;
105
+ }>;
106
+ type ExperimentSummary = z.infer<typeof ExperimentSummary>;
107
+ declare const ExperimentListResponse: z.ZodObject<{
108
+ experiments: z.ZodArray<z.ZodObject<{
109
+ id: z.ZodString;
110
+ name: z.ZodString;
111
+ state: z.ZodEnum<["draft", "review", "approved", "running", "paused", "killed", "concluded", "archived"]>;
112
+ updatedAt: z.ZodString;
113
+ }, "strip", z.ZodTypeAny, {
114
+ id: string;
115
+ name: string;
116
+ state: "draft" | "review" | "approved" | "running" | "paused" | "killed" | "concluded" | "archived";
117
+ updatedAt: string;
118
+ }, {
119
+ id: string;
120
+ name: string;
121
+ state: "draft" | "review" | "approved" | "running" | "paused" | "killed" | "concluded" | "archived";
122
+ updatedAt: string;
123
+ }>, "many">;
124
+ }, "strip", z.ZodTypeAny, {
125
+ experiments: {
126
+ id: string;
127
+ name: string;
128
+ state: "draft" | "review" | "approved" | "running" | "paused" | "killed" | "concluded" | "archived";
129
+ updatedAt: string;
130
+ }[];
131
+ }, {
132
+ experiments: {
133
+ id: string;
134
+ name: string;
135
+ state: "draft" | "review" | "approved" | "running" | "paused" | "killed" | "concluded" | "archived";
136
+ updatedAt: string;
137
+ }[];
138
+ }>;
139
+ type ExperimentListResponse = z.infer<typeof ExperimentListResponse>;
140
+ declare const CreateExperimentInput: z.ZodObject<{
141
+ id: z.ZodString;
142
+ name: z.ZodString;
143
+ description: z.ZodOptional<z.ZodString>;
144
+ salt: z.ZodOptional<z.ZodString>;
145
+ sampleRate: z.ZodOptional<z.ZodNumber>;
146
+ holdback: z.ZodOptional<z.ZodNumber>;
147
+ audience: z.ZodOptional<z.ZodObject<{
148
+ sampleRate: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
149
+ rule: z.ZodOptional<z.ZodOptional<z.ZodType<unknown, z.ZodTypeDef, unknown>>>;
150
+ }, "strip", z.ZodTypeAny, {
151
+ sampleRate?: number | undefined;
152
+ rule?: unknown;
153
+ }, {
154
+ sampleRate?: number | undefined;
155
+ rule?: unknown;
156
+ }>>;
157
+ variants: z.ZodArray<z.ZodObject<{
158
+ key: z.ZodString;
159
+ name: z.ZodString;
160
+ weight: z.ZodOptional<z.ZodNumber>;
161
+ js: z.ZodOptional<z.ZodString>;
162
+ css: z.ZodOptional<z.ZodString>;
163
+ domOps: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"op", [z.ZodObject<{
164
+ op: z.ZodLiteral<"replaceText">;
165
+ selector: z.ZodString;
166
+ value: z.ZodString;
167
+ waitForMs: z.ZodOptional<z.ZodNumber>;
168
+ }, "strip", z.ZodTypeAny, {
169
+ value: string;
170
+ op: "replaceText";
171
+ selector: string;
172
+ waitForMs?: number | undefined;
173
+ }, {
174
+ value: string;
175
+ op: "replaceText";
176
+ selector: string;
177
+ waitForMs?: number | undefined;
178
+ }>, z.ZodObject<{
179
+ op: z.ZodLiteral<"replaceHTML">;
180
+ selector: z.ZodString;
181
+ value: z.ZodString;
182
+ waitForMs: z.ZodOptional<z.ZodNumber>;
183
+ }, "strip", z.ZodTypeAny, {
184
+ value: string;
185
+ op: "replaceHTML";
186
+ selector: string;
187
+ waitForMs?: number | undefined;
188
+ }, {
189
+ value: string;
190
+ op: "replaceHTML";
191
+ selector: string;
192
+ waitForMs?: number | undefined;
193
+ }>, z.ZodObject<{
194
+ op: z.ZodLiteral<"setAttr">;
195
+ selector: z.ZodString;
196
+ name: z.ZodString;
197
+ value: z.ZodString;
198
+ waitForMs: z.ZodOptional<z.ZodNumber>;
199
+ }, "strip", z.ZodTypeAny, {
200
+ value: string;
201
+ op: "setAttr";
202
+ selector: string;
203
+ name: string;
204
+ waitForMs?: number | undefined;
205
+ }, {
206
+ value: string;
207
+ op: "setAttr";
208
+ selector: string;
209
+ name: string;
210
+ waitForMs?: number | undefined;
211
+ }>, z.ZodObject<{
212
+ op: z.ZodLiteral<"addClass">;
213
+ selector: z.ZodString;
214
+ value: z.ZodString;
215
+ waitForMs: z.ZodOptional<z.ZodNumber>;
216
+ }, "strip", z.ZodTypeAny, {
217
+ value: string;
218
+ op: "addClass";
219
+ selector: string;
220
+ waitForMs?: number | undefined;
221
+ }, {
222
+ value: string;
223
+ op: "addClass";
224
+ selector: string;
225
+ waitForMs?: number | undefined;
226
+ }>, z.ZodObject<{
227
+ op: z.ZodLiteral<"removeClass">;
228
+ selector: z.ZodString;
229
+ value: z.ZodString;
230
+ waitForMs: z.ZodOptional<z.ZodNumber>;
231
+ }, "strip", z.ZodTypeAny, {
232
+ value: string;
233
+ op: "removeClass";
234
+ selector: string;
235
+ waitForMs?: number | undefined;
236
+ }, {
237
+ value: string;
238
+ op: "removeClass";
239
+ selector: string;
240
+ waitForMs?: number | undefined;
241
+ }>, z.ZodObject<{
242
+ op: z.ZodLiteral<"setStyle">;
243
+ selector: z.ZodString;
244
+ name: z.ZodString;
245
+ value: z.ZodString;
246
+ waitForMs: z.ZodOptional<z.ZodNumber>;
247
+ }, "strip", z.ZodTypeAny, {
248
+ value: string;
249
+ op: "setStyle";
250
+ selector: string;
251
+ name: string;
252
+ waitForMs?: number | undefined;
253
+ }, {
254
+ value: string;
255
+ op: "setStyle";
256
+ selector: string;
257
+ name: string;
258
+ waitForMs?: number | undefined;
259
+ }>, z.ZodObject<{
260
+ op: z.ZodLiteral<"remove">;
261
+ selector: z.ZodString;
262
+ waitForMs: z.ZodOptional<z.ZodNumber>;
263
+ }, "strip", z.ZodTypeAny, {
264
+ op: "remove";
265
+ selector: string;
266
+ waitForMs?: number | undefined;
267
+ }, {
268
+ op: "remove";
269
+ selector: string;
270
+ waitForMs?: number | undefined;
271
+ }>, z.ZodObject<{
272
+ op: z.ZodLiteral<"injectCSS">;
273
+ value: z.ZodString;
274
+ }, "strip", z.ZodTypeAny, {
275
+ value: string;
276
+ op: "injectCSS";
277
+ }, {
278
+ value: string;
279
+ op: "injectCSS";
280
+ }>, z.ZodObject<{
281
+ op: z.ZodLiteral<"injectHTML">;
282
+ selector: z.ZodString;
283
+ position: z.ZodEnum<["beforeend", "afterbegin", "beforebegin", "afterend"]>;
284
+ value: z.ZodString;
285
+ waitForMs: z.ZodOptional<z.ZodNumber>;
286
+ }, "strip", z.ZodTypeAny, {
287
+ value: string;
288
+ op: "injectHTML";
289
+ selector: string;
290
+ position: "beforeend" | "afterbegin" | "beforebegin" | "afterend";
291
+ waitForMs?: number | undefined;
292
+ }, {
293
+ value: string;
294
+ op: "injectHTML";
295
+ selector: string;
296
+ position: "beforeend" | "afterbegin" | "beforebegin" | "afterend";
297
+ waitForMs?: number | undefined;
298
+ }>]>, "many">>;
299
+ recipeSampleRate: z.ZodOptional<z.ZodNumber>;
300
+ payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
301
+ }, "strip", z.ZodTypeAny, {
302
+ name: string;
303
+ key: string;
304
+ weight?: number | undefined;
305
+ js?: string | undefined;
306
+ css?: string | undefined;
307
+ domOps?: ({
308
+ value: string;
309
+ op: "replaceText";
310
+ selector: string;
311
+ waitForMs?: number | undefined;
312
+ } | {
313
+ value: string;
314
+ op: "replaceHTML";
315
+ selector: string;
316
+ waitForMs?: number | undefined;
317
+ } | {
318
+ value: string;
319
+ op: "setAttr";
320
+ selector: string;
321
+ name: string;
322
+ waitForMs?: number | undefined;
323
+ } | {
324
+ value: string;
325
+ op: "addClass";
326
+ selector: string;
327
+ waitForMs?: number | undefined;
328
+ } | {
329
+ value: string;
330
+ op: "removeClass";
331
+ selector: string;
332
+ waitForMs?: number | undefined;
333
+ } | {
334
+ value: string;
335
+ op: "setStyle";
336
+ selector: string;
337
+ name: string;
338
+ waitForMs?: number | undefined;
339
+ } | {
340
+ op: "remove";
341
+ selector: string;
342
+ waitForMs?: number | undefined;
343
+ } | {
344
+ value: string;
345
+ op: "injectCSS";
346
+ } | {
347
+ value: string;
348
+ op: "injectHTML";
349
+ selector: string;
350
+ position: "beforeend" | "afterbegin" | "beforebegin" | "afterend";
351
+ waitForMs?: number | undefined;
352
+ })[] | undefined;
353
+ recipeSampleRate?: number | undefined;
354
+ payload?: Record<string, unknown> | undefined;
355
+ }, {
356
+ name: string;
357
+ key: string;
358
+ weight?: number | undefined;
359
+ js?: string | undefined;
360
+ css?: string | undefined;
361
+ domOps?: ({
362
+ value: string;
363
+ op: "replaceText";
364
+ selector: string;
365
+ waitForMs?: number | undefined;
366
+ } | {
367
+ value: string;
368
+ op: "replaceHTML";
369
+ selector: string;
370
+ waitForMs?: number | undefined;
371
+ } | {
372
+ value: string;
373
+ op: "setAttr";
374
+ selector: string;
375
+ name: string;
376
+ waitForMs?: number | undefined;
377
+ } | {
378
+ value: string;
379
+ op: "addClass";
380
+ selector: string;
381
+ waitForMs?: number | undefined;
382
+ } | {
383
+ value: string;
384
+ op: "removeClass";
385
+ selector: string;
386
+ waitForMs?: number | undefined;
387
+ } | {
388
+ value: string;
389
+ op: "setStyle";
390
+ selector: string;
391
+ name: string;
392
+ waitForMs?: number | undefined;
393
+ } | {
394
+ op: "remove";
395
+ selector: string;
396
+ waitForMs?: number | undefined;
397
+ } | {
398
+ value: string;
399
+ op: "injectCSS";
400
+ } | {
401
+ value: string;
402
+ op: "injectHTML";
403
+ selector: string;
404
+ position: "beforeend" | "afterbegin" | "beforebegin" | "afterend";
405
+ waitForMs?: number | undefined;
406
+ })[] | undefined;
407
+ recipeSampleRate?: number | undefined;
408
+ payload?: Record<string, unknown> | undefined;
409
+ }>, "many">;
410
+ divertTo: z.ZodOptional<z.ZodString>;
411
+ manualExposure: z.ZodOptional<z.ZodBoolean>;
412
+ trigger: z.ZodOptional<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
413
+ kind: z.ZodLiteral<"auto">;
414
+ }, "strip", z.ZodTypeAny, {
415
+ kind: "auto";
416
+ }, {
417
+ kind: "auto";
418
+ }>, z.ZodObject<{
419
+ kind: z.ZodLiteral<"urlMatch">;
420
+ pattern: z.ZodString;
421
+ regex: z.ZodOptional<z.ZodBoolean>;
422
+ }, "strip", z.ZodTypeAny, {
423
+ kind: "urlMatch";
424
+ pattern: string;
425
+ regex?: boolean | undefined;
426
+ }, {
427
+ kind: "urlMatch";
428
+ pattern: string;
429
+ regex?: boolean | undefined;
430
+ }>, z.ZodObject<{
431
+ kind: z.ZodLiteral<"waitForSelector">;
432
+ selector: z.ZodString;
433
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
434
+ }, "strip", z.ZodTypeAny, {
435
+ selector: string;
436
+ kind: "waitForSelector";
437
+ timeoutMs: number;
438
+ }, {
439
+ selector: string;
440
+ kind: "waitForSelector";
441
+ timeoutMs?: number | undefined;
442
+ }>, z.ZodObject<{
443
+ kind: z.ZodLiteral<"event">;
444
+ name: z.ZodString;
445
+ }, "strip", z.ZodTypeAny, {
446
+ name: string;
447
+ kind: "event";
448
+ }, {
449
+ name: string;
450
+ kind: "event";
451
+ }>]>>;
452
+ sharedJs: z.ZodOptional<z.ZodString>;
453
+ sharedCss: z.ZodOptional<z.ZodString>;
454
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
455
+ metrics: z.ZodOptional<z.ZodArray<z.ZodObject<{
456
+ key: z.ZodString;
457
+ name: z.ZodString;
458
+ kind: z.ZodEnum<["conversion", "count", "sum"]>;
459
+ eventName: z.ZodString;
460
+ isPrimary: z.ZodOptional<z.ZodBoolean>;
461
+ isGuardrail: z.ZodOptional<z.ZodBoolean>;
462
+ }, "strip", z.ZodTypeAny, {
463
+ name: string;
464
+ key: string;
465
+ kind: "conversion" | "count" | "sum";
466
+ eventName: string;
467
+ isPrimary?: boolean | undefined;
468
+ isGuardrail?: boolean | undefined;
469
+ }, {
470
+ name: string;
471
+ key: string;
472
+ kind: "conversion" | "count" | "sum";
473
+ eventName: string;
474
+ isPrimary?: boolean | undefined;
475
+ isGuardrail?: boolean | undefined;
476
+ }>, "many">>;
477
+ }, "strip", z.ZodTypeAny, {
478
+ name: string;
479
+ id: string;
480
+ variants: {
481
+ name: string;
482
+ key: string;
483
+ weight?: number | undefined;
484
+ js?: string | undefined;
485
+ css?: string | undefined;
486
+ domOps?: ({
487
+ value: string;
488
+ op: "replaceText";
489
+ selector: string;
490
+ waitForMs?: number | undefined;
491
+ } | {
492
+ value: string;
493
+ op: "replaceHTML";
494
+ selector: string;
495
+ waitForMs?: number | undefined;
496
+ } | {
497
+ value: string;
498
+ op: "setAttr";
499
+ selector: string;
500
+ name: string;
501
+ waitForMs?: number | undefined;
502
+ } | {
503
+ value: string;
504
+ op: "addClass";
505
+ selector: string;
506
+ waitForMs?: number | undefined;
507
+ } | {
508
+ value: string;
509
+ op: "removeClass";
510
+ selector: string;
511
+ waitForMs?: number | undefined;
512
+ } | {
513
+ value: string;
514
+ op: "setStyle";
515
+ selector: string;
516
+ name: string;
517
+ waitForMs?: number | undefined;
518
+ } | {
519
+ op: "remove";
520
+ selector: string;
521
+ waitForMs?: number | undefined;
522
+ } | {
523
+ value: string;
524
+ op: "injectCSS";
525
+ } | {
526
+ value: string;
527
+ op: "injectHTML";
528
+ selector: string;
529
+ position: "beforeend" | "afterbegin" | "beforebegin" | "afterend";
530
+ waitForMs?: number | undefined;
531
+ })[] | undefined;
532
+ recipeSampleRate?: number | undefined;
533
+ payload?: Record<string, unknown> | undefined;
534
+ }[];
535
+ sampleRate?: number | undefined;
536
+ description?: string | undefined;
537
+ salt?: string | undefined;
538
+ audience?: {
539
+ sampleRate?: number | undefined;
540
+ rule?: unknown;
541
+ } | undefined;
542
+ metrics?: {
543
+ name: string;
544
+ key: string;
545
+ kind: "conversion" | "count" | "sum";
546
+ eventName: string;
547
+ isPrimary?: boolean | undefined;
548
+ isGuardrail?: boolean | undefined;
549
+ }[] | undefined;
550
+ trigger?: {
551
+ kind: "auto";
552
+ } | {
553
+ kind: "urlMatch";
554
+ pattern: string;
555
+ regex?: boolean | undefined;
556
+ } | {
557
+ selector: string;
558
+ kind: "waitForSelector";
559
+ timeoutMs: number;
560
+ } | {
561
+ name: string;
562
+ kind: "event";
563
+ } | undefined;
564
+ manualExposure?: boolean | undefined;
565
+ divertTo?: string | undefined;
566
+ sharedJs?: string | undefined;
567
+ sharedCss?: string | undefined;
568
+ metadata?: Record<string, unknown> | undefined;
569
+ holdback?: number | undefined;
570
+ }, {
571
+ name: string;
572
+ id: string;
573
+ variants: {
574
+ name: string;
575
+ key: string;
576
+ weight?: number | undefined;
577
+ js?: string | undefined;
578
+ css?: string | undefined;
579
+ domOps?: ({
580
+ value: string;
581
+ op: "replaceText";
582
+ selector: string;
583
+ waitForMs?: number | undefined;
584
+ } | {
585
+ value: string;
586
+ op: "replaceHTML";
587
+ selector: string;
588
+ waitForMs?: number | undefined;
589
+ } | {
590
+ value: string;
591
+ op: "setAttr";
592
+ selector: string;
593
+ name: string;
594
+ waitForMs?: number | undefined;
595
+ } | {
596
+ value: string;
597
+ op: "addClass";
598
+ selector: string;
599
+ waitForMs?: number | undefined;
600
+ } | {
601
+ value: string;
602
+ op: "removeClass";
603
+ selector: string;
604
+ waitForMs?: number | undefined;
605
+ } | {
606
+ value: string;
607
+ op: "setStyle";
608
+ selector: string;
609
+ name: string;
610
+ waitForMs?: number | undefined;
611
+ } | {
612
+ op: "remove";
613
+ selector: string;
614
+ waitForMs?: number | undefined;
615
+ } | {
616
+ value: string;
617
+ op: "injectCSS";
618
+ } | {
619
+ value: string;
620
+ op: "injectHTML";
621
+ selector: string;
622
+ position: "beforeend" | "afterbegin" | "beforebegin" | "afterend";
623
+ waitForMs?: number | undefined;
624
+ })[] | undefined;
625
+ recipeSampleRate?: number | undefined;
626
+ payload?: Record<string, unknown> | undefined;
627
+ }[];
628
+ sampleRate?: number | undefined;
629
+ description?: string | undefined;
630
+ salt?: string | undefined;
631
+ audience?: {
632
+ sampleRate?: number | undefined;
633
+ rule?: unknown;
634
+ } | undefined;
635
+ metrics?: {
636
+ name: string;
637
+ key: string;
638
+ kind: "conversion" | "count" | "sum";
639
+ eventName: string;
640
+ isPrimary?: boolean | undefined;
641
+ isGuardrail?: boolean | undefined;
642
+ }[] | undefined;
643
+ trigger?: {
644
+ kind: "auto";
645
+ } | {
646
+ kind: "urlMatch";
647
+ pattern: string;
648
+ regex?: boolean | undefined;
649
+ } | {
650
+ selector: string;
651
+ kind: "waitForSelector";
652
+ timeoutMs?: number | undefined;
653
+ } | {
654
+ name: string;
655
+ kind: "event";
656
+ } | undefined;
657
+ manualExposure?: boolean | undefined;
658
+ divertTo?: string | undefined;
659
+ sharedJs?: string | undefined;
660
+ sharedCss?: string | undefined;
661
+ metadata?: Record<string, unknown> | undefined;
662
+ holdback?: number | undefined;
663
+ }>;
664
+ type CreateExperimentInput = z.infer<typeof CreateExperimentInput>;
665
+ declare const CreateExperimentResponse: z.ZodObject<{
666
+ experimentId: z.ZodString;
667
+ idempotent: z.ZodOptional<z.ZodBoolean>;
668
+ }, "strip", z.ZodTypeAny, {
669
+ experimentId: string;
670
+ idempotent?: boolean | undefined;
671
+ }, {
672
+ experimentId: string;
673
+ idempotent?: boolean | undefined;
674
+ }>;
675
+ type CreateExperimentResponse = z.infer<typeof CreateExperimentResponse>;
676
+ /**
677
+ * Aggregate row per variant for a given metric over an optional time window.
678
+ * Sourced from the warehouse adapter (Databricks in prod, Local in dev).
679
+ */
680
+ declare const AggregateRow: z.ZodObject<{
681
+ variantKey: z.ZodString;
682
+ exposureCount: z.ZodNumber;
683
+ conversionCount: z.ZodNumber;
684
+ conversionSum: z.ZodNumber;
685
+ failureCount: z.ZodDefault<z.ZodNumber>;
686
+ }, "strip", z.ZodTypeAny, {
687
+ variantKey: string;
688
+ exposureCount: number;
689
+ conversionCount: number;
690
+ conversionSum: number;
691
+ failureCount: number;
692
+ }, {
693
+ variantKey: string;
694
+ exposureCount: number;
695
+ conversionCount: number;
696
+ conversionSum: number;
697
+ failureCount?: number | undefined;
698
+ }>;
699
+ type AggregateRow = z.infer<typeof AggregateRow>;
700
+ declare const AggregateInput: z.ZodObject<{
701
+ metric: z.ZodString;
702
+ fromIso: z.ZodOptional<z.ZodString>;
703
+ untilIso: z.ZodOptional<z.ZodString>;
704
+ }, "strip", z.ZodTypeAny, {
705
+ metric: string;
706
+ fromIso?: string | undefined;
707
+ untilIso?: string | undefined;
708
+ }, {
709
+ metric: string;
710
+ fromIso?: string | undefined;
711
+ untilIso?: string | undefined;
712
+ }>;
713
+ type AggregateInput = z.infer<typeof AggregateInput>;
714
+ declare const AggregateResponse: z.ZodObject<{
715
+ experimentId: z.ZodString;
716
+ metric: z.ZodString;
717
+ rows: z.ZodArray<z.ZodObject<{
718
+ variantKey: z.ZodString;
719
+ exposureCount: z.ZodNumber;
720
+ conversionCount: z.ZodNumber;
721
+ conversionSum: z.ZodNumber;
722
+ failureCount: z.ZodDefault<z.ZodNumber>;
723
+ }, "strip", z.ZodTypeAny, {
724
+ variantKey: string;
725
+ exposureCount: number;
726
+ conversionCount: number;
727
+ conversionSum: number;
728
+ failureCount: number;
729
+ }, {
730
+ variantKey: string;
731
+ exposureCount: number;
732
+ conversionCount: number;
733
+ conversionSum: number;
734
+ failureCount?: number | undefined;
735
+ }>, "many">;
736
+ /** ISO datetime — when this aggregate was computed. SDKs may cache by this. */
737
+ computedAt: z.ZodString;
738
+ }, "strip", z.ZodTypeAny, {
739
+ experimentId: string;
740
+ metric: string;
741
+ rows: {
742
+ variantKey: string;
743
+ exposureCount: number;
744
+ conversionCount: number;
745
+ conversionSum: number;
746
+ failureCount: number;
747
+ }[];
748
+ computedAt: string;
749
+ }, {
750
+ experimentId: string;
751
+ metric: string;
752
+ rows: {
753
+ variantKey: string;
754
+ exposureCount: number;
755
+ conversionCount: number;
756
+ conversionSum: number;
757
+ failureCount?: number | undefined;
758
+ }[];
759
+ computedAt: string;
760
+ }>;
761
+ type AggregateResponse = z.infer<typeof AggregateResponse>;
762
+ declare const InvokeActionInput: z.ZodObject<{
763
+ actionId: z.ZodEnum<["experiment.create", "experiment.submit_for_review", "experiment.approve", "experiment.start", "experiment.pause", "experiment.resume", "experiment.kill", "experiment.declare_winner", "experiment.update", "experiment.guardrail_breach"]>;
764
+ params: z.ZodRecord<z.ZodString, z.ZodUnknown>;
765
+ /** Optional client-supplied idempotency key. */
766
+ idempotencyKey: z.ZodOptional<z.ZodString>;
767
+ }, "strip", z.ZodTypeAny, {
768
+ params: Record<string, unknown>;
769
+ actionId: "experiment.create" | "experiment.submit_for_review" | "experiment.approve" | "experiment.start" | "experiment.pause" | "experiment.resume" | "experiment.kill" | "experiment.declare_winner" | "experiment.update" | "experiment.guardrail_breach";
770
+ idempotencyKey?: string | undefined;
771
+ }, {
772
+ params: Record<string, unknown>;
773
+ actionId: "experiment.create" | "experiment.submit_for_review" | "experiment.approve" | "experiment.start" | "experiment.pause" | "experiment.resume" | "experiment.kill" | "experiment.declare_winner" | "experiment.update" | "experiment.guardrail_breach";
774
+ idempotencyKey?: string | undefined;
775
+ }>;
776
+ type InvokeActionInput = z.infer<typeof InvokeActionInput>;
777
+ declare const InvokeActionResponse: z.ZodObject<{
778
+ success: z.ZodBoolean;
779
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
780
+ error: z.ZodOptional<z.ZodString>;
781
+ }, "strip", z.ZodTypeAny, {
782
+ success: boolean;
783
+ data?: Record<string, unknown> | undefined;
784
+ error?: string | undefined;
785
+ }, {
786
+ success: boolean;
787
+ data?: Record<string, unknown> | undefined;
788
+ error?: string | undefined;
789
+ }>;
790
+ type InvokeActionResponse = z.infer<typeof InvokeActionResponse>;
791
+ /** Result of pushing the signed manifest to the Cloudflare manifest-worker. */
792
+ declare const EdgePushResult: z.ZodObject<{
793
+ pushed: z.ZodBoolean;
794
+ reason: z.ZodOptional<z.ZodString>;
795
+ status: z.ZodOptional<z.ZodNumber>;
796
+ }, "strip", z.ZodTypeAny, {
797
+ pushed: boolean;
798
+ status?: number | undefined;
799
+ reason?: string | undefined;
800
+ }, {
801
+ pushed: boolean;
802
+ status?: number | undefined;
803
+ reason?: string | undefined;
804
+ }>;
805
+ type EdgePushResult = z.infer<typeof EdgePushResult>;
806
+ declare const PublishManifestResponse: z.ZodObject<{
807
+ manifestVersion: z.ZodNumber;
808
+ contentHash: z.ZodString;
809
+ experimentCount: z.ZodNumber;
810
+ /** Edge push status. `pushed: false` with `reason: 'unconfigured'` is normal in local dev. */
811
+ edgePush: z.ZodObject<{
812
+ pushed: z.ZodBoolean;
813
+ reason: z.ZodOptional<z.ZodString>;
814
+ status: z.ZodOptional<z.ZodNumber>;
815
+ }, "strip", z.ZodTypeAny, {
816
+ pushed: boolean;
817
+ status?: number | undefined;
818
+ reason?: string | undefined;
819
+ }, {
820
+ pushed: boolean;
821
+ status?: number | undefined;
822
+ reason?: string | undefined;
823
+ }>;
824
+ }, "strip", z.ZodTypeAny, {
825
+ manifestVersion: number;
826
+ contentHash: string;
827
+ experimentCount: number;
828
+ edgePush: {
829
+ pushed: boolean;
830
+ status?: number | undefined;
831
+ reason?: string | undefined;
832
+ };
833
+ }, {
834
+ manifestVersion: number;
835
+ contentHash: string;
836
+ experimentCount: number;
837
+ edgePush: {
838
+ pushed: boolean;
839
+ status?: number | undefined;
840
+ reason?: string | undefined;
841
+ };
842
+ }>;
843
+ type PublishManifestResponse = z.infer<typeof PublishManifestResponse>;
844
+ declare const ManifestKey: z.ZodObject<{
845
+ keyId: z.ZodString;
846
+ publicKeyHex: z.ZodString;
847
+ status: z.ZodEnum<["active", "retiring", "retired"]>;
848
+ createdAt: z.ZodString;
849
+ retiredAt: z.ZodNullable<z.ZodString>;
850
+ }, "strip", z.ZodTypeAny, {
851
+ status: "active" | "retiring" | "retired";
852
+ createdAt: string;
853
+ keyId: string;
854
+ publicKeyHex: string;
855
+ retiredAt: string | null;
856
+ }, {
857
+ status: "active" | "retiring" | "retired";
858
+ createdAt: string;
859
+ keyId: string;
860
+ publicKeyHex: string;
861
+ retiredAt: string | null;
862
+ }>;
863
+ type ManifestKey = z.infer<typeof ManifestKey>;
864
+ declare const ManifestKeysResponse: z.ZodObject<{
865
+ keys: z.ZodArray<z.ZodObject<{
866
+ keyId: z.ZodString;
867
+ publicKeyHex: z.ZodString;
868
+ status: z.ZodEnum<["active", "retiring", "retired"]>;
869
+ createdAt: z.ZodString;
870
+ retiredAt: z.ZodNullable<z.ZodString>;
871
+ }, "strip", z.ZodTypeAny, {
872
+ status: "active" | "retiring" | "retired";
873
+ createdAt: string;
874
+ keyId: string;
875
+ publicKeyHex: string;
876
+ retiredAt: string | null;
877
+ }, {
878
+ status: "active" | "retiring" | "retired";
879
+ createdAt: string;
880
+ keyId: string;
881
+ publicKeyHex: string;
882
+ retiredAt: string | null;
883
+ }>, "many">;
884
+ }, "strip", z.ZodTypeAny, {
885
+ keys: {
886
+ status: "active" | "retiring" | "retired";
887
+ createdAt: string;
888
+ keyId: string;
889
+ publicKeyHex: string;
890
+ retiredAt: string | null;
891
+ }[];
892
+ }, {
893
+ keys: {
894
+ status: "active" | "retiring" | "retired";
895
+ createdAt: string;
896
+ keyId: string;
897
+ publicKeyHex: string;
898
+ retiredAt: string | null;
899
+ }[];
900
+ }>;
901
+ type ManifestKeysResponse = z.infer<typeof ManifestKeysResponse>;
902
+ declare const PreviewSignInput: z.ZodObject<{
903
+ experimentId: z.ZodString;
904
+ variantKey: z.ZodString;
905
+ /** Token TTL in seconds. Clamped server-side to [60, 3600]; default 900. */
906
+ ttlSeconds: z.ZodOptional<z.ZodNumber>;
907
+ }, "strip", z.ZodTypeAny, {
908
+ experimentId: string;
909
+ variantKey: string;
910
+ ttlSeconds?: number | undefined;
911
+ }, {
912
+ experimentId: string;
913
+ variantKey: string;
914
+ ttlSeconds?: number | undefined;
915
+ }>;
916
+ type PreviewSignInput = z.infer<typeof PreviewSignInput>;
917
+ declare const PreviewSignResponse: z.ZodObject<{
918
+ token: z.ZodString;
919
+ /** ISO datetime when the token expires. */
920
+ expiresAt: z.ZodString;
921
+ /** ID of the public JWKS key used to sign — exposed for debugging only. */
922
+ keyId: z.ZodString;
923
+ /** Unique JWT id for audit/debugging and future replay controls. */
924
+ jti: z.ZodString;
925
+ }, "strip", z.ZodTypeAny, {
926
+ keyId: string;
927
+ token: string;
928
+ expiresAt: string;
929
+ jti: string;
930
+ }, {
931
+ keyId: string;
932
+ token: string;
933
+ expiresAt: string;
934
+ jti: string;
935
+ }>;
936
+ type PreviewSignResponse = z.infer<typeof PreviewSignResponse>;
937
+ declare const AuditEvent: z.ZodObject<{
938
+ id: z.ZodString;
939
+ type: z.ZodString;
940
+ experimentId: z.ZodString;
941
+ actorId: z.ZodString;
942
+ at: z.ZodString;
943
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
944
+ }, "strip", z.ZodTypeAny, {
945
+ type: string;
946
+ at: string;
947
+ id: string;
948
+ experimentId: string;
949
+ actorId: string;
950
+ payload: Record<string, unknown>;
951
+ }, {
952
+ type: string;
953
+ at: string;
954
+ id: string;
955
+ experimentId: string;
956
+ actorId: string;
957
+ payload: Record<string, unknown>;
958
+ }>;
959
+ type AuditEvent = z.infer<typeof AuditEvent>;
960
+ declare const AuditListResponse: z.ZodObject<{
961
+ events: z.ZodArray<z.ZodObject<{
962
+ id: z.ZodString;
963
+ type: z.ZodString;
964
+ experimentId: z.ZodString;
965
+ actorId: z.ZodString;
966
+ at: z.ZodString;
967
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
968
+ }, "strip", z.ZodTypeAny, {
969
+ type: string;
970
+ at: string;
971
+ id: string;
972
+ experimentId: string;
973
+ actorId: string;
974
+ payload: Record<string, unknown>;
975
+ }, {
976
+ type: string;
977
+ at: string;
978
+ id: string;
979
+ experimentId: string;
980
+ actorId: string;
981
+ payload: Record<string, unknown>;
982
+ }>, "many">;
983
+ }, "strip", z.ZodTypeAny, {
984
+ events: {
985
+ type: string;
986
+ at: string;
987
+ id: string;
988
+ experimentId: string;
989
+ actorId: string;
990
+ payload: Record<string, unknown>;
991
+ }[];
992
+ }, {
993
+ events: {
994
+ type: string;
995
+ at: string;
996
+ id: string;
997
+ experimentId: string;
998
+ actorId: string;
999
+ payload: Record<string, unknown>;
1000
+ }[];
1001
+ }>;
1002
+ type AuditListResponse = z.infer<typeof AuditListResponse>;
1003
+ declare const AuditExport: z.ZodObject<{
1004
+ id: z.ZodString;
1005
+ destinationKind: z.ZodEnum<["s3", "r2", "splunk-hec"]>;
1006
+ status: z.ZodEnum<["active", "paused", "failed"]>;
1007
+ lastCursorAt: z.ZodNullable<z.ZodString>;
1008
+ }, "strip", z.ZodTypeAny, {
1009
+ status: "paused" | "active" | "failed";
1010
+ id: string;
1011
+ destinationKind: "s3" | "r2" | "splunk-hec";
1012
+ lastCursorAt: string | null;
1013
+ }, {
1014
+ status: "paused" | "active" | "failed";
1015
+ id: string;
1016
+ destinationKind: "s3" | "r2" | "splunk-hec";
1017
+ lastCursorAt: string | null;
1018
+ }>;
1019
+ declare const AuditExportListResponse: z.ZodObject<{
1020
+ exports: z.ZodArray<z.ZodObject<{
1021
+ id: z.ZodString;
1022
+ destinationKind: z.ZodEnum<["s3", "r2", "splunk-hec"]>;
1023
+ status: z.ZodEnum<["active", "paused", "failed"]>;
1024
+ lastCursorAt: z.ZodNullable<z.ZodString>;
1025
+ }, "strip", z.ZodTypeAny, {
1026
+ status: "paused" | "active" | "failed";
1027
+ id: string;
1028
+ destinationKind: "s3" | "r2" | "splunk-hec";
1029
+ lastCursorAt: string | null;
1030
+ }, {
1031
+ status: "paused" | "active" | "failed";
1032
+ id: string;
1033
+ destinationKind: "s3" | "r2" | "splunk-hec";
1034
+ lastCursorAt: string | null;
1035
+ }>, "many">;
1036
+ }, "strip", z.ZodTypeAny, {
1037
+ exports: {
1038
+ status: "paused" | "active" | "failed";
1039
+ id: string;
1040
+ destinationKind: "s3" | "r2" | "splunk-hec";
1041
+ lastCursorAt: string | null;
1042
+ }[];
1043
+ }, {
1044
+ exports: {
1045
+ status: "paused" | "active" | "failed";
1046
+ id: string;
1047
+ destinationKind: "s3" | "r2" | "splunk-hec";
1048
+ lastCursorAt: string | null;
1049
+ }[];
1050
+ }>;
1051
+ declare const CreateAuditExportInput: z.ZodObject<{
1052
+ destinationKind: z.ZodEnum<["s3", "r2", "splunk-hec"]>;
1053
+ /** Free-form config; encrypted at rest. Schema enforced by destination kind. */
1054
+ config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1055
+ }, "strip", z.ZodTypeAny, {
1056
+ destinationKind: "s3" | "r2" | "splunk-hec";
1057
+ config: Record<string, unknown>;
1058
+ }, {
1059
+ destinationKind: "s3" | "r2" | "splunk-hec";
1060
+ config: Record<string, unknown>;
1061
+ }>;
1062
+ declare const ApiKeySummary: z.ZodObject<{
1063
+ id: z.ZodString;
1064
+ name: z.ZodString;
1065
+ prefix: z.ZodString;
1066
+ role: z.ZodEnum<["owner", "admin", "experimenter", "viewer"]>;
1067
+ scopes: z.ZodArray<z.ZodEnum<["read", "write", "admin"]>, "many">;
1068
+ createdAt: z.ZodString;
1069
+ lastUsedAt: z.ZodNullable<z.ZodString>;
1070
+ expiresAt: z.ZodNullable<z.ZodString>;
1071
+ }, "strip", z.ZodTypeAny, {
1072
+ id: string;
1073
+ name: string;
1074
+ createdAt: string;
1075
+ role: "owner" | "admin" | "experimenter" | "viewer";
1076
+ expiresAt: string | null;
1077
+ prefix: string;
1078
+ scopes: ("admin" | "read" | "write")[];
1079
+ lastUsedAt: string | null;
1080
+ }, {
1081
+ id: string;
1082
+ name: string;
1083
+ createdAt: string;
1084
+ role: "owner" | "admin" | "experimenter" | "viewer";
1085
+ expiresAt: string | null;
1086
+ prefix: string;
1087
+ scopes: ("admin" | "read" | "write")[];
1088
+ lastUsedAt: string | null;
1089
+ }>;
1090
+ declare const ApiKeyListResponse: z.ZodObject<{
1091
+ keys: z.ZodArray<z.ZodObject<{
1092
+ id: z.ZodString;
1093
+ name: z.ZodString;
1094
+ prefix: z.ZodString;
1095
+ role: z.ZodEnum<["owner", "admin", "experimenter", "viewer"]>;
1096
+ scopes: z.ZodArray<z.ZodEnum<["read", "write", "admin"]>, "many">;
1097
+ createdAt: z.ZodString;
1098
+ lastUsedAt: z.ZodNullable<z.ZodString>;
1099
+ expiresAt: z.ZodNullable<z.ZodString>;
1100
+ }, "strip", z.ZodTypeAny, {
1101
+ id: string;
1102
+ name: string;
1103
+ createdAt: string;
1104
+ role: "owner" | "admin" | "experimenter" | "viewer";
1105
+ expiresAt: string | null;
1106
+ prefix: string;
1107
+ scopes: ("admin" | "read" | "write")[];
1108
+ lastUsedAt: string | null;
1109
+ }, {
1110
+ id: string;
1111
+ name: string;
1112
+ createdAt: string;
1113
+ role: "owner" | "admin" | "experimenter" | "viewer";
1114
+ expiresAt: string | null;
1115
+ prefix: string;
1116
+ scopes: ("admin" | "read" | "write")[];
1117
+ lastUsedAt: string | null;
1118
+ }>, "many">;
1119
+ }, "strip", z.ZodTypeAny, {
1120
+ keys: {
1121
+ id: string;
1122
+ name: string;
1123
+ createdAt: string;
1124
+ role: "owner" | "admin" | "experimenter" | "viewer";
1125
+ expiresAt: string | null;
1126
+ prefix: string;
1127
+ scopes: ("admin" | "read" | "write")[];
1128
+ lastUsedAt: string | null;
1129
+ }[];
1130
+ }, {
1131
+ keys: {
1132
+ id: string;
1133
+ name: string;
1134
+ createdAt: string;
1135
+ role: "owner" | "admin" | "experimenter" | "viewer";
1136
+ expiresAt: string | null;
1137
+ prefix: string;
1138
+ scopes: ("admin" | "read" | "write")[];
1139
+ lastUsedAt: string | null;
1140
+ }[];
1141
+ }>;
1142
+ declare const CreateApiKeyInput: z.ZodObject<{
1143
+ name: z.ZodString;
1144
+ /** ISO datetime of expiry; null for non-expiring (not recommended in prod). */
1145
+ expiresAt: z.ZodNullable<z.ZodString>;
1146
+ /** Role assigned to the key. Defaults to the creator's role. */
1147
+ role: z.ZodOptional<z.ZodEnum<["owner", "admin", "experimenter", "viewer"]>>;
1148
+ /** Permission scopes assigned to the key. Defaults are derived from role. */
1149
+ scopes: z.ZodOptional<z.ZodArray<z.ZodEnum<["read", "write", "admin"]>, "many">>;
1150
+ }, "strip", z.ZodTypeAny, {
1151
+ name: string;
1152
+ expiresAt: string | null;
1153
+ role?: "owner" | "admin" | "experimenter" | "viewer" | undefined;
1154
+ scopes?: ("admin" | "read" | "write")[] | undefined;
1155
+ }, {
1156
+ name: string;
1157
+ expiresAt: string | null;
1158
+ role?: "owner" | "admin" | "experimenter" | "viewer" | undefined;
1159
+ scopes?: ("admin" | "read" | "write")[] | undefined;
1160
+ }>;
1161
+ type CreateApiKeyInput = z.infer<typeof CreateApiKeyInput>;
1162
+ declare const CreateApiKeyResponse: z.ZodObject<{
1163
+ id: z.ZodString;
1164
+ name: z.ZodString;
1165
+ prefix: z.ZodString;
1166
+ role: z.ZodEnum<["owner", "admin", "experimenter", "viewer"]>;
1167
+ scopes: z.ZodArray<z.ZodEnum<["read", "write", "admin"]>, "many">;
1168
+ createdAt: z.ZodString;
1169
+ lastUsedAt: z.ZodNullable<z.ZodString>;
1170
+ expiresAt: z.ZodNullable<z.ZodString>;
1171
+ } & {
1172
+ /** Plaintext key, returned exactly once at creation time. */
1173
+ key: z.ZodString;
1174
+ }, "strip", z.ZodTypeAny, {
1175
+ id: string;
1176
+ name: string;
1177
+ createdAt: string;
1178
+ role: "owner" | "admin" | "experimenter" | "viewer";
1179
+ expiresAt: string | null;
1180
+ prefix: string;
1181
+ scopes: ("admin" | "read" | "write")[];
1182
+ lastUsedAt: string | null;
1183
+ key: string;
1184
+ }, {
1185
+ id: string;
1186
+ name: string;
1187
+ createdAt: string;
1188
+ role: "owner" | "admin" | "experimenter" | "viewer";
1189
+ expiresAt: string | null;
1190
+ prefix: string;
1191
+ scopes: ("admin" | "read" | "write")[];
1192
+ lastUsedAt: string | null;
1193
+ key: string;
1194
+ }>;
1195
+ type CreateApiKeyResponse = z.infer<typeof CreateApiKeyResponse>;
1196
+ declare const SamlConfig: z.ZodEffects<z.ZodObject<{
1197
+ enabled: z.ZodBoolean;
1198
+ connectionId: z.ZodNullable<z.ZodString>;
1199
+ issuer: z.ZodNullable<z.ZodString>;
1200
+ ssoUrl: z.ZodNullable<z.ZodString>;
1201
+ certificate: z.ZodNullable<z.ZodString>;
1202
+ }, "strip", z.ZodTypeAny, {
1203
+ enabled: boolean;
1204
+ connectionId: string | null;
1205
+ issuer: string | null;
1206
+ ssoUrl: string | null;
1207
+ certificate: string | null;
1208
+ }, {
1209
+ enabled: boolean;
1210
+ connectionId: string | null;
1211
+ issuer: string | null;
1212
+ ssoUrl: string | null;
1213
+ certificate: string | null;
1214
+ }>, {
1215
+ enabled: boolean;
1216
+ connectionId: string | null;
1217
+ issuer: string | null;
1218
+ ssoUrl: string | null;
1219
+ certificate: string | null;
1220
+ }, {
1221
+ enabled: boolean;
1222
+ connectionId: string | null;
1223
+ issuer: string | null;
1224
+ ssoUrl: string | null;
1225
+ certificate: string | null;
1226
+ }>;
1227
+ type SamlConfig = z.infer<typeof SamlConfig>;
1228
+ declare const endpoints: {
1229
+ 'tenants.me': {
1230
+ method: "GET";
1231
+ path: string;
1232
+ params: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
1233
+ response: z.ZodObject<{
1234
+ organization: z.ZodObject<{
1235
+ id: z.ZodString;
1236
+ name: z.ZodString;
1237
+ slug: z.ZodString;
1238
+ createdAt: z.ZodString;
1239
+ }, "strip", z.ZodTypeAny, {
1240
+ id: string;
1241
+ name: string;
1242
+ slug: string;
1243
+ createdAt: string;
1244
+ }, {
1245
+ id: string;
1246
+ name: string;
1247
+ slug: string;
1248
+ createdAt: string;
1249
+ }>;
1250
+ member: z.ZodObject<{
1251
+ role: z.ZodEnum<["owner", "admin", "experimenter", "viewer"]>;
1252
+ }, "strip", z.ZodTypeAny, {
1253
+ role: "owner" | "admin" | "experimenter" | "viewer";
1254
+ }, {
1255
+ role: "owner" | "admin" | "experimenter" | "viewer";
1256
+ }>;
1257
+ user: z.ZodObject<{
1258
+ id: z.ZodString;
1259
+ email: z.ZodString;
1260
+ name: z.ZodNullable<z.ZodString>;
1261
+ }, "strip", z.ZodTypeAny, {
1262
+ id: string;
1263
+ name: string | null;
1264
+ email: string;
1265
+ }, {
1266
+ id: string;
1267
+ name: string | null;
1268
+ email: string;
1269
+ }>;
1270
+ }, "strip", z.ZodTypeAny, {
1271
+ organization: {
1272
+ id: string;
1273
+ name: string;
1274
+ slug: string;
1275
+ createdAt: string;
1276
+ };
1277
+ member: {
1278
+ role: "owner" | "admin" | "experimenter" | "viewer";
1279
+ };
1280
+ user: {
1281
+ id: string;
1282
+ name: string | null;
1283
+ email: string;
1284
+ };
1285
+ }, {
1286
+ organization: {
1287
+ id: string;
1288
+ name: string;
1289
+ slug: string;
1290
+ createdAt: string;
1291
+ };
1292
+ member: {
1293
+ role: "owner" | "admin" | "experimenter" | "viewer";
1294
+ };
1295
+ user: {
1296
+ id: string;
1297
+ name: string | null;
1298
+ email: string;
1299
+ };
1300
+ }>;
1301
+ mutates: false;
1302
+ requiresRole: null;
1303
+ };
1304
+ 'experiments.list': {
1305
+ method: "GET";
1306
+ path: string;
1307
+ params: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
1308
+ response: z.ZodObject<{
1309
+ experiments: z.ZodArray<z.ZodObject<{
1310
+ id: z.ZodString;
1311
+ name: z.ZodString;
1312
+ state: z.ZodEnum<["draft", "review", "approved", "running", "paused", "killed", "concluded", "archived"]>;
1313
+ updatedAt: z.ZodString;
1314
+ }, "strip", z.ZodTypeAny, {
1315
+ id: string;
1316
+ name: string;
1317
+ state: "draft" | "review" | "approved" | "running" | "paused" | "killed" | "concluded" | "archived";
1318
+ updatedAt: string;
1319
+ }, {
1320
+ id: string;
1321
+ name: string;
1322
+ state: "draft" | "review" | "approved" | "running" | "paused" | "killed" | "concluded" | "archived";
1323
+ updatedAt: string;
1324
+ }>, "many">;
1325
+ }, "strip", z.ZodTypeAny, {
1326
+ experiments: {
1327
+ id: string;
1328
+ name: string;
1329
+ state: "draft" | "review" | "approved" | "running" | "paused" | "killed" | "concluded" | "archived";
1330
+ updatedAt: string;
1331
+ }[];
1332
+ }, {
1333
+ experiments: {
1334
+ id: string;
1335
+ name: string;
1336
+ state: "draft" | "review" | "approved" | "running" | "paused" | "killed" | "concluded" | "archived";
1337
+ updatedAt: string;
1338
+ }[];
1339
+ }>;
1340
+ mutates: false;
1341
+ requiresRole: "viewer";
1342
+ };
1343
+ 'experiments.create': {
1344
+ method: "POST";
1345
+ path: string;
1346
+ params: z.ZodObject<{
1347
+ id: z.ZodString;
1348
+ name: z.ZodString;
1349
+ description: z.ZodOptional<z.ZodString>;
1350
+ salt: z.ZodOptional<z.ZodString>;
1351
+ sampleRate: z.ZodOptional<z.ZodNumber>;
1352
+ holdback: z.ZodOptional<z.ZodNumber>;
1353
+ audience: z.ZodOptional<z.ZodObject<{
1354
+ sampleRate: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
1355
+ rule: z.ZodOptional<z.ZodOptional<z.ZodType<unknown, z.ZodTypeDef, unknown>>>;
1356
+ }, "strip", z.ZodTypeAny, {
1357
+ sampleRate?: number | undefined;
1358
+ rule?: unknown;
1359
+ }, {
1360
+ sampleRate?: number | undefined;
1361
+ rule?: unknown;
1362
+ }>>;
1363
+ variants: z.ZodArray<z.ZodObject<{
1364
+ key: z.ZodString;
1365
+ name: z.ZodString;
1366
+ weight: z.ZodOptional<z.ZodNumber>;
1367
+ js: z.ZodOptional<z.ZodString>;
1368
+ css: z.ZodOptional<z.ZodString>;
1369
+ domOps: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"op", [z.ZodObject<{
1370
+ op: z.ZodLiteral<"replaceText">;
1371
+ selector: z.ZodString;
1372
+ value: z.ZodString;
1373
+ waitForMs: z.ZodOptional<z.ZodNumber>;
1374
+ }, "strip", z.ZodTypeAny, {
1375
+ value: string;
1376
+ op: "replaceText";
1377
+ selector: string;
1378
+ waitForMs?: number | undefined;
1379
+ }, {
1380
+ value: string;
1381
+ op: "replaceText";
1382
+ selector: string;
1383
+ waitForMs?: number | undefined;
1384
+ }>, z.ZodObject<{
1385
+ op: z.ZodLiteral<"replaceHTML">;
1386
+ selector: z.ZodString;
1387
+ value: z.ZodString;
1388
+ waitForMs: z.ZodOptional<z.ZodNumber>;
1389
+ }, "strip", z.ZodTypeAny, {
1390
+ value: string;
1391
+ op: "replaceHTML";
1392
+ selector: string;
1393
+ waitForMs?: number | undefined;
1394
+ }, {
1395
+ value: string;
1396
+ op: "replaceHTML";
1397
+ selector: string;
1398
+ waitForMs?: number | undefined;
1399
+ }>, z.ZodObject<{
1400
+ op: z.ZodLiteral<"setAttr">;
1401
+ selector: z.ZodString;
1402
+ name: z.ZodString;
1403
+ value: z.ZodString;
1404
+ waitForMs: z.ZodOptional<z.ZodNumber>;
1405
+ }, "strip", z.ZodTypeAny, {
1406
+ value: string;
1407
+ op: "setAttr";
1408
+ selector: string;
1409
+ name: string;
1410
+ waitForMs?: number | undefined;
1411
+ }, {
1412
+ value: string;
1413
+ op: "setAttr";
1414
+ selector: string;
1415
+ name: string;
1416
+ waitForMs?: number | undefined;
1417
+ }>, z.ZodObject<{
1418
+ op: z.ZodLiteral<"addClass">;
1419
+ selector: z.ZodString;
1420
+ value: z.ZodString;
1421
+ waitForMs: z.ZodOptional<z.ZodNumber>;
1422
+ }, "strip", z.ZodTypeAny, {
1423
+ value: string;
1424
+ op: "addClass";
1425
+ selector: string;
1426
+ waitForMs?: number | undefined;
1427
+ }, {
1428
+ value: string;
1429
+ op: "addClass";
1430
+ selector: string;
1431
+ waitForMs?: number | undefined;
1432
+ }>, z.ZodObject<{
1433
+ op: z.ZodLiteral<"removeClass">;
1434
+ selector: z.ZodString;
1435
+ value: z.ZodString;
1436
+ waitForMs: z.ZodOptional<z.ZodNumber>;
1437
+ }, "strip", z.ZodTypeAny, {
1438
+ value: string;
1439
+ op: "removeClass";
1440
+ selector: string;
1441
+ waitForMs?: number | undefined;
1442
+ }, {
1443
+ value: string;
1444
+ op: "removeClass";
1445
+ selector: string;
1446
+ waitForMs?: number | undefined;
1447
+ }>, z.ZodObject<{
1448
+ op: z.ZodLiteral<"setStyle">;
1449
+ selector: z.ZodString;
1450
+ name: z.ZodString;
1451
+ value: z.ZodString;
1452
+ waitForMs: z.ZodOptional<z.ZodNumber>;
1453
+ }, "strip", z.ZodTypeAny, {
1454
+ value: string;
1455
+ op: "setStyle";
1456
+ selector: string;
1457
+ name: string;
1458
+ waitForMs?: number | undefined;
1459
+ }, {
1460
+ value: string;
1461
+ op: "setStyle";
1462
+ selector: string;
1463
+ name: string;
1464
+ waitForMs?: number | undefined;
1465
+ }>, z.ZodObject<{
1466
+ op: z.ZodLiteral<"remove">;
1467
+ selector: z.ZodString;
1468
+ waitForMs: z.ZodOptional<z.ZodNumber>;
1469
+ }, "strip", z.ZodTypeAny, {
1470
+ op: "remove";
1471
+ selector: string;
1472
+ waitForMs?: number | undefined;
1473
+ }, {
1474
+ op: "remove";
1475
+ selector: string;
1476
+ waitForMs?: number | undefined;
1477
+ }>, z.ZodObject<{
1478
+ op: z.ZodLiteral<"injectCSS">;
1479
+ value: z.ZodString;
1480
+ }, "strip", z.ZodTypeAny, {
1481
+ value: string;
1482
+ op: "injectCSS";
1483
+ }, {
1484
+ value: string;
1485
+ op: "injectCSS";
1486
+ }>, z.ZodObject<{
1487
+ op: z.ZodLiteral<"injectHTML">;
1488
+ selector: z.ZodString;
1489
+ position: z.ZodEnum<["beforeend", "afterbegin", "beforebegin", "afterend"]>;
1490
+ value: z.ZodString;
1491
+ waitForMs: z.ZodOptional<z.ZodNumber>;
1492
+ }, "strip", z.ZodTypeAny, {
1493
+ value: string;
1494
+ op: "injectHTML";
1495
+ selector: string;
1496
+ position: "beforeend" | "afterbegin" | "beforebegin" | "afterend";
1497
+ waitForMs?: number | undefined;
1498
+ }, {
1499
+ value: string;
1500
+ op: "injectHTML";
1501
+ selector: string;
1502
+ position: "beforeend" | "afterbegin" | "beforebegin" | "afterend";
1503
+ waitForMs?: number | undefined;
1504
+ }>]>, "many">>;
1505
+ recipeSampleRate: z.ZodOptional<z.ZodNumber>;
1506
+ payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1507
+ }, "strip", z.ZodTypeAny, {
1508
+ name: string;
1509
+ key: string;
1510
+ weight?: number | undefined;
1511
+ js?: string | undefined;
1512
+ css?: string | undefined;
1513
+ domOps?: ({
1514
+ value: string;
1515
+ op: "replaceText";
1516
+ selector: string;
1517
+ waitForMs?: number | undefined;
1518
+ } | {
1519
+ value: string;
1520
+ op: "replaceHTML";
1521
+ selector: string;
1522
+ waitForMs?: number | undefined;
1523
+ } | {
1524
+ value: string;
1525
+ op: "setAttr";
1526
+ selector: string;
1527
+ name: string;
1528
+ waitForMs?: number | undefined;
1529
+ } | {
1530
+ value: string;
1531
+ op: "addClass";
1532
+ selector: string;
1533
+ waitForMs?: number | undefined;
1534
+ } | {
1535
+ value: string;
1536
+ op: "removeClass";
1537
+ selector: string;
1538
+ waitForMs?: number | undefined;
1539
+ } | {
1540
+ value: string;
1541
+ op: "setStyle";
1542
+ selector: string;
1543
+ name: string;
1544
+ waitForMs?: number | undefined;
1545
+ } | {
1546
+ op: "remove";
1547
+ selector: string;
1548
+ waitForMs?: number | undefined;
1549
+ } | {
1550
+ value: string;
1551
+ op: "injectCSS";
1552
+ } | {
1553
+ value: string;
1554
+ op: "injectHTML";
1555
+ selector: string;
1556
+ position: "beforeend" | "afterbegin" | "beforebegin" | "afterend";
1557
+ waitForMs?: number | undefined;
1558
+ })[] | undefined;
1559
+ recipeSampleRate?: number | undefined;
1560
+ payload?: Record<string, unknown> | undefined;
1561
+ }, {
1562
+ name: string;
1563
+ key: string;
1564
+ weight?: number | undefined;
1565
+ js?: string | undefined;
1566
+ css?: string | undefined;
1567
+ domOps?: ({
1568
+ value: string;
1569
+ op: "replaceText";
1570
+ selector: string;
1571
+ waitForMs?: number | undefined;
1572
+ } | {
1573
+ value: string;
1574
+ op: "replaceHTML";
1575
+ selector: string;
1576
+ waitForMs?: number | undefined;
1577
+ } | {
1578
+ value: string;
1579
+ op: "setAttr";
1580
+ selector: string;
1581
+ name: string;
1582
+ waitForMs?: number | undefined;
1583
+ } | {
1584
+ value: string;
1585
+ op: "addClass";
1586
+ selector: string;
1587
+ waitForMs?: number | undefined;
1588
+ } | {
1589
+ value: string;
1590
+ op: "removeClass";
1591
+ selector: string;
1592
+ waitForMs?: number | undefined;
1593
+ } | {
1594
+ value: string;
1595
+ op: "setStyle";
1596
+ selector: string;
1597
+ name: string;
1598
+ waitForMs?: number | undefined;
1599
+ } | {
1600
+ op: "remove";
1601
+ selector: string;
1602
+ waitForMs?: number | undefined;
1603
+ } | {
1604
+ value: string;
1605
+ op: "injectCSS";
1606
+ } | {
1607
+ value: string;
1608
+ op: "injectHTML";
1609
+ selector: string;
1610
+ position: "beforeend" | "afterbegin" | "beforebegin" | "afterend";
1611
+ waitForMs?: number | undefined;
1612
+ })[] | undefined;
1613
+ recipeSampleRate?: number | undefined;
1614
+ payload?: Record<string, unknown> | undefined;
1615
+ }>, "many">;
1616
+ divertTo: z.ZodOptional<z.ZodString>;
1617
+ manualExposure: z.ZodOptional<z.ZodBoolean>;
1618
+ trigger: z.ZodOptional<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
1619
+ kind: z.ZodLiteral<"auto">;
1620
+ }, "strip", z.ZodTypeAny, {
1621
+ kind: "auto";
1622
+ }, {
1623
+ kind: "auto";
1624
+ }>, z.ZodObject<{
1625
+ kind: z.ZodLiteral<"urlMatch">;
1626
+ pattern: z.ZodString;
1627
+ regex: z.ZodOptional<z.ZodBoolean>;
1628
+ }, "strip", z.ZodTypeAny, {
1629
+ kind: "urlMatch";
1630
+ pattern: string;
1631
+ regex?: boolean | undefined;
1632
+ }, {
1633
+ kind: "urlMatch";
1634
+ pattern: string;
1635
+ regex?: boolean | undefined;
1636
+ }>, z.ZodObject<{
1637
+ kind: z.ZodLiteral<"waitForSelector">;
1638
+ selector: z.ZodString;
1639
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
1640
+ }, "strip", z.ZodTypeAny, {
1641
+ selector: string;
1642
+ kind: "waitForSelector";
1643
+ timeoutMs: number;
1644
+ }, {
1645
+ selector: string;
1646
+ kind: "waitForSelector";
1647
+ timeoutMs?: number | undefined;
1648
+ }>, z.ZodObject<{
1649
+ kind: z.ZodLiteral<"event">;
1650
+ name: z.ZodString;
1651
+ }, "strip", z.ZodTypeAny, {
1652
+ name: string;
1653
+ kind: "event";
1654
+ }, {
1655
+ name: string;
1656
+ kind: "event";
1657
+ }>]>>;
1658
+ sharedJs: z.ZodOptional<z.ZodString>;
1659
+ sharedCss: z.ZodOptional<z.ZodString>;
1660
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1661
+ metrics: z.ZodOptional<z.ZodArray<z.ZodObject<{
1662
+ key: z.ZodString;
1663
+ name: z.ZodString;
1664
+ kind: z.ZodEnum<["conversion", "count", "sum"]>;
1665
+ eventName: z.ZodString;
1666
+ isPrimary: z.ZodOptional<z.ZodBoolean>;
1667
+ isGuardrail: z.ZodOptional<z.ZodBoolean>;
1668
+ }, "strip", z.ZodTypeAny, {
1669
+ name: string;
1670
+ key: string;
1671
+ kind: "conversion" | "count" | "sum";
1672
+ eventName: string;
1673
+ isPrimary?: boolean | undefined;
1674
+ isGuardrail?: boolean | undefined;
1675
+ }, {
1676
+ name: string;
1677
+ key: string;
1678
+ kind: "conversion" | "count" | "sum";
1679
+ eventName: string;
1680
+ isPrimary?: boolean | undefined;
1681
+ isGuardrail?: boolean | undefined;
1682
+ }>, "many">>;
1683
+ }, "strip", z.ZodTypeAny, {
1684
+ name: string;
1685
+ id: string;
1686
+ variants: {
1687
+ name: string;
1688
+ key: string;
1689
+ weight?: number | undefined;
1690
+ js?: string | undefined;
1691
+ css?: string | undefined;
1692
+ domOps?: ({
1693
+ value: string;
1694
+ op: "replaceText";
1695
+ selector: string;
1696
+ waitForMs?: number | undefined;
1697
+ } | {
1698
+ value: string;
1699
+ op: "replaceHTML";
1700
+ selector: string;
1701
+ waitForMs?: number | undefined;
1702
+ } | {
1703
+ value: string;
1704
+ op: "setAttr";
1705
+ selector: string;
1706
+ name: string;
1707
+ waitForMs?: number | undefined;
1708
+ } | {
1709
+ value: string;
1710
+ op: "addClass";
1711
+ selector: string;
1712
+ waitForMs?: number | undefined;
1713
+ } | {
1714
+ value: string;
1715
+ op: "removeClass";
1716
+ selector: string;
1717
+ waitForMs?: number | undefined;
1718
+ } | {
1719
+ value: string;
1720
+ op: "setStyle";
1721
+ selector: string;
1722
+ name: string;
1723
+ waitForMs?: number | undefined;
1724
+ } | {
1725
+ op: "remove";
1726
+ selector: string;
1727
+ waitForMs?: number | undefined;
1728
+ } | {
1729
+ value: string;
1730
+ op: "injectCSS";
1731
+ } | {
1732
+ value: string;
1733
+ op: "injectHTML";
1734
+ selector: string;
1735
+ position: "beforeend" | "afterbegin" | "beforebegin" | "afterend";
1736
+ waitForMs?: number | undefined;
1737
+ })[] | undefined;
1738
+ recipeSampleRate?: number | undefined;
1739
+ payload?: Record<string, unknown> | undefined;
1740
+ }[];
1741
+ sampleRate?: number | undefined;
1742
+ description?: string | undefined;
1743
+ salt?: string | undefined;
1744
+ audience?: {
1745
+ sampleRate?: number | undefined;
1746
+ rule?: unknown;
1747
+ } | undefined;
1748
+ metrics?: {
1749
+ name: string;
1750
+ key: string;
1751
+ kind: "conversion" | "count" | "sum";
1752
+ eventName: string;
1753
+ isPrimary?: boolean | undefined;
1754
+ isGuardrail?: boolean | undefined;
1755
+ }[] | undefined;
1756
+ trigger?: {
1757
+ kind: "auto";
1758
+ } | {
1759
+ kind: "urlMatch";
1760
+ pattern: string;
1761
+ regex?: boolean | undefined;
1762
+ } | {
1763
+ selector: string;
1764
+ kind: "waitForSelector";
1765
+ timeoutMs: number;
1766
+ } | {
1767
+ name: string;
1768
+ kind: "event";
1769
+ } | undefined;
1770
+ manualExposure?: boolean | undefined;
1771
+ divertTo?: string | undefined;
1772
+ sharedJs?: string | undefined;
1773
+ sharedCss?: string | undefined;
1774
+ metadata?: Record<string, unknown> | undefined;
1775
+ holdback?: number | undefined;
1776
+ }, {
1777
+ name: string;
1778
+ id: string;
1779
+ variants: {
1780
+ name: string;
1781
+ key: string;
1782
+ weight?: number | undefined;
1783
+ js?: string | undefined;
1784
+ css?: string | undefined;
1785
+ domOps?: ({
1786
+ value: string;
1787
+ op: "replaceText";
1788
+ selector: string;
1789
+ waitForMs?: number | undefined;
1790
+ } | {
1791
+ value: string;
1792
+ op: "replaceHTML";
1793
+ selector: string;
1794
+ waitForMs?: number | undefined;
1795
+ } | {
1796
+ value: string;
1797
+ op: "setAttr";
1798
+ selector: string;
1799
+ name: string;
1800
+ waitForMs?: number | undefined;
1801
+ } | {
1802
+ value: string;
1803
+ op: "addClass";
1804
+ selector: string;
1805
+ waitForMs?: number | undefined;
1806
+ } | {
1807
+ value: string;
1808
+ op: "removeClass";
1809
+ selector: string;
1810
+ waitForMs?: number | undefined;
1811
+ } | {
1812
+ value: string;
1813
+ op: "setStyle";
1814
+ selector: string;
1815
+ name: string;
1816
+ waitForMs?: number | undefined;
1817
+ } | {
1818
+ op: "remove";
1819
+ selector: string;
1820
+ waitForMs?: number | undefined;
1821
+ } | {
1822
+ value: string;
1823
+ op: "injectCSS";
1824
+ } | {
1825
+ value: string;
1826
+ op: "injectHTML";
1827
+ selector: string;
1828
+ position: "beforeend" | "afterbegin" | "beforebegin" | "afterend";
1829
+ waitForMs?: number | undefined;
1830
+ })[] | undefined;
1831
+ recipeSampleRate?: number | undefined;
1832
+ payload?: Record<string, unknown> | undefined;
1833
+ }[];
1834
+ sampleRate?: number | undefined;
1835
+ description?: string | undefined;
1836
+ salt?: string | undefined;
1837
+ audience?: {
1838
+ sampleRate?: number | undefined;
1839
+ rule?: unknown;
1840
+ } | undefined;
1841
+ metrics?: {
1842
+ name: string;
1843
+ key: string;
1844
+ kind: "conversion" | "count" | "sum";
1845
+ eventName: string;
1846
+ isPrimary?: boolean | undefined;
1847
+ isGuardrail?: boolean | undefined;
1848
+ }[] | undefined;
1849
+ trigger?: {
1850
+ kind: "auto";
1851
+ } | {
1852
+ kind: "urlMatch";
1853
+ pattern: string;
1854
+ regex?: boolean | undefined;
1855
+ } | {
1856
+ selector: string;
1857
+ kind: "waitForSelector";
1858
+ timeoutMs?: number | undefined;
1859
+ } | {
1860
+ name: string;
1861
+ kind: "event";
1862
+ } | undefined;
1863
+ manualExposure?: boolean | undefined;
1864
+ divertTo?: string | undefined;
1865
+ sharedJs?: string | undefined;
1866
+ sharedCss?: string | undefined;
1867
+ metadata?: Record<string, unknown> | undefined;
1868
+ holdback?: number | undefined;
1869
+ }>;
1870
+ response: z.ZodObject<{
1871
+ experimentId: z.ZodString;
1872
+ idempotent: z.ZodOptional<z.ZodBoolean>;
1873
+ }, "strip", z.ZodTypeAny, {
1874
+ experimentId: string;
1875
+ idempotent?: boolean | undefined;
1876
+ }, {
1877
+ experimentId: string;
1878
+ idempotent?: boolean | undefined;
1879
+ }>;
1880
+ mutates: true;
1881
+ requiresRole: "experimenter";
1882
+ };
1883
+ 'experiments.get': {
1884
+ method: "GET";
1885
+ path: string;
1886
+ params: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
1887
+ response: z.ZodObject<{
1888
+ id: z.ZodString;
1889
+ name: z.ZodString;
1890
+ description: z.ZodOptional<z.ZodString>;
1891
+ state: z.ZodEnum<["draft", "review", "approved", "running", "paused", "killed", "concluded", "archived"]>;
1892
+ salt: z.ZodString;
1893
+ audience: z.ZodObject<{
1894
+ sampleRate: z.ZodDefault<z.ZodNumber>;
1895
+ rule: z.ZodOptional<z.ZodType<unknown, z.ZodTypeDef, unknown>>;
1896
+ }, "strip", z.ZodTypeAny, {
1897
+ sampleRate: number;
1898
+ rule?: unknown;
1899
+ }, {
1900
+ sampleRate?: number | undefined;
1901
+ rule?: unknown;
1902
+ }>;
1903
+ variants: z.ZodArray<z.ZodObject<{
1904
+ key: z.ZodString;
1905
+ name: z.ZodString;
1906
+ weight: z.ZodOptional<z.ZodNumber>;
1907
+ js: z.ZodOptional<z.ZodString>;
1908
+ css: z.ZodOptional<z.ZodString>;
1909
+ domOps: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"op", [z.ZodObject<{
1910
+ op: z.ZodLiteral<"replaceText">;
1911
+ selector: z.ZodString;
1912
+ value: z.ZodString;
1913
+ waitForMs: z.ZodOptional<z.ZodNumber>;
1914
+ }, "strip", z.ZodTypeAny, {
1915
+ value: string;
1916
+ op: "replaceText";
1917
+ selector: string;
1918
+ waitForMs?: number | undefined;
1919
+ }, {
1920
+ value: string;
1921
+ op: "replaceText";
1922
+ selector: string;
1923
+ waitForMs?: number | undefined;
1924
+ }>, z.ZodObject<{
1925
+ op: z.ZodLiteral<"replaceHTML">;
1926
+ selector: z.ZodString;
1927
+ value: z.ZodString;
1928
+ waitForMs: z.ZodOptional<z.ZodNumber>;
1929
+ }, "strip", z.ZodTypeAny, {
1930
+ value: string;
1931
+ op: "replaceHTML";
1932
+ selector: string;
1933
+ waitForMs?: number | undefined;
1934
+ }, {
1935
+ value: string;
1936
+ op: "replaceHTML";
1937
+ selector: string;
1938
+ waitForMs?: number | undefined;
1939
+ }>, z.ZodObject<{
1940
+ op: z.ZodLiteral<"setAttr">;
1941
+ selector: z.ZodString;
1942
+ name: z.ZodString;
1943
+ value: z.ZodString;
1944
+ waitForMs: z.ZodOptional<z.ZodNumber>;
1945
+ }, "strip", z.ZodTypeAny, {
1946
+ value: string;
1947
+ op: "setAttr";
1948
+ selector: string;
1949
+ name: string;
1950
+ waitForMs?: number | undefined;
1951
+ }, {
1952
+ value: string;
1953
+ op: "setAttr";
1954
+ selector: string;
1955
+ name: string;
1956
+ waitForMs?: number | undefined;
1957
+ }>, z.ZodObject<{
1958
+ op: z.ZodLiteral<"addClass">;
1959
+ selector: z.ZodString;
1960
+ value: z.ZodString;
1961
+ waitForMs: z.ZodOptional<z.ZodNumber>;
1962
+ }, "strip", z.ZodTypeAny, {
1963
+ value: string;
1964
+ op: "addClass";
1965
+ selector: string;
1966
+ waitForMs?: number | undefined;
1967
+ }, {
1968
+ value: string;
1969
+ op: "addClass";
1970
+ selector: string;
1971
+ waitForMs?: number | undefined;
1972
+ }>, z.ZodObject<{
1973
+ op: z.ZodLiteral<"removeClass">;
1974
+ selector: z.ZodString;
1975
+ value: z.ZodString;
1976
+ waitForMs: z.ZodOptional<z.ZodNumber>;
1977
+ }, "strip", z.ZodTypeAny, {
1978
+ value: string;
1979
+ op: "removeClass";
1980
+ selector: string;
1981
+ waitForMs?: number | undefined;
1982
+ }, {
1983
+ value: string;
1984
+ op: "removeClass";
1985
+ selector: string;
1986
+ waitForMs?: number | undefined;
1987
+ }>, z.ZodObject<{
1988
+ op: z.ZodLiteral<"setStyle">;
1989
+ selector: z.ZodString;
1990
+ name: z.ZodString;
1991
+ value: z.ZodString;
1992
+ waitForMs: z.ZodOptional<z.ZodNumber>;
1993
+ }, "strip", z.ZodTypeAny, {
1994
+ value: string;
1995
+ op: "setStyle";
1996
+ selector: string;
1997
+ name: string;
1998
+ waitForMs?: number | undefined;
1999
+ }, {
2000
+ value: string;
2001
+ op: "setStyle";
2002
+ selector: string;
2003
+ name: string;
2004
+ waitForMs?: number | undefined;
2005
+ }>, z.ZodObject<{
2006
+ op: z.ZodLiteral<"remove">;
2007
+ selector: z.ZodString;
2008
+ waitForMs: z.ZodOptional<z.ZodNumber>;
2009
+ }, "strip", z.ZodTypeAny, {
2010
+ op: "remove";
2011
+ selector: string;
2012
+ waitForMs?: number | undefined;
2013
+ }, {
2014
+ op: "remove";
2015
+ selector: string;
2016
+ waitForMs?: number | undefined;
2017
+ }>, z.ZodObject<{
2018
+ op: z.ZodLiteral<"injectCSS">;
2019
+ value: z.ZodString;
2020
+ }, "strip", z.ZodTypeAny, {
2021
+ value: string;
2022
+ op: "injectCSS";
2023
+ }, {
2024
+ value: string;
2025
+ op: "injectCSS";
2026
+ }>, z.ZodObject<{
2027
+ op: z.ZodLiteral<"injectHTML">;
2028
+ selector: z.ZodString;
2029
+ position: z.ZodEnum<["beforeend", "afterbegin", "beforebegin", "afterend"]>;
2030
+ value: z.ZodString;
2031
+ waitForMs: z.ZodOptional<z.ZodNumber>;
2032
+ }, "strip", z.ZodTypeAny, {
2033
+ value: string;
2034
+ op: "injectHTML";
2035
+ selector: string;
2036
+ position: "beforeend" | "afterbegin" | "beforebegin" | "afterend";
2037
+ waitForMs?: number | undefined;
2038
+ }, {
2039
+ value: string;
2040
+ op: "injectHTML";
2041
+ selector: string;
2042
+ position: "beforeend" | "afterbegin" | "beforebegin" | "afterend";
2043
+ waitForMs?: number | undefined;
2044
+ }>]>, "many">>;
2045
+ recipeSampleRate: z.ZodOptional<z.ZodNumber>;
2046
+ payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2047
+ }, "strip", z.ZodTypeAny, {
2048
+ name: string;
2049
+ key: string;
2050
+ weight?: number | undefined;
2051
+ js?: string | undefined;
2052
+ css?: string | undefined;
2053
+ domOps?: ({
2054
+ value: string;
2055
+ op: "replaceText";
2056
+ selector: string;
2057
+ waitForMs?: number | undefined;
2058
+ } | {
2059
+ value: string;
2060
+ op: "replaceHTML";
2061
+ selector: string;
2062
+ waitForMs?: number | undefined;
2063
+ } | {
2064
+ value: string;
2065
+ op: "setAttr";
2066
+ selector: string;
2067
+ name: string;
2068
+ waitForMs?: number | undefined;
2069
+ } | {
2070
+ value: string;
2071
+ op: "addClass";
2072
+ selector: string;
2073
+ waitForMs?: number | undefined;
2074
+ } | {
2075
+ value: string;
2076
+ op: "removeClass";
2077
+ selector: string;
2078
+ waitForMs?: number | undefined;
2079
+ } | {
2080
+ value: string;
2081
+ op: "setStyle";
2082
+ selector: string;
2083
+ name: string;
2084
+ waitForMs?: number | undefined;
2085
+ } | {
2086
+ op: "remove";
2087
+ selector: string;
2088
+ waitForMs?: number | undefined;
2089
+ } | {
2090
+ value: string;
2091
+ op: "injectCSS";
2092
+ } | {
2093
+ value: string;
2094
+ op: "injectHTML";
2095
+ selector: string;
2096
+ position: "beforeend" | "afterbegin" | "beforebegin" | "afterend";
2097
+ waitForMs?: number | undefined;
2098
+ })[] | undefined;
2099
+ recipeSampleRate?: number | undefined;
2100
+ payload?: Record<string, unknown> | undefined;
2101
+ }, {
2102
+ name: string;
2103
+ key: string;
2104
+ weight?: number | undefined;
2105
+ js?: string | undefined;
2106
+ css?: string | undefined;
2107
+ domOps?: ({
2108
+ value: string;
2109
+ op: "replaceText";
2110
+ selector: string;
2111
+ waitForMs?: number | undefined;
2112
+ } | {
2113
+ value: string;
2114
+ op: "replaceHTML";
2115
+ selector: string;
2116
+ waitForMs?: number | undefined;
2117
+ } | {
2118
+ value: string;
2119
+ op: "setAttr";
2120
+ selector: string;
2121
+ name: string;
2122
+ waitForMs?: number | undefined;
2123
+ } | {
2124
+ value: string;
2125
+ op: "addClass";
2126
+ selector: string;
2127
+ waitForMs?: number | undefined;
2128
+ } | {
2129
+ value: string;
2130
+ op: "removeClass";
2131
+ selector: string;
2132
+ waitForMs?: number | undefined;
2133
+ } | {
2134
+ value: string;
2135
+ op: "setStyle";
2136
+ selector: string;
2137
+ name: string;
2138
+ waitForMs?: number | undefined;
2139
+ } | {
2140
+ op: "remove";
2141
+ selector: string;
2142
+ waitForMs?: number | undefined;
2143
+ } | {
2144
+ value: string;
2145
+ op: "injectCSS";
2146
+ } | {
2147
+ value: string;
2148
+ op: "injectHTML";
2149
+ selector: string;
2150
+ position: "beforeend" | "afterbegin" | "beforebegin" | "afterend";
2151
+ waitForMs?: number | undefined;
2152
+ })[] | undefined;
2153
+ recipeSampleRate?: number | undefined;
2154
+ payload?: Record<string, unknown> | undefined;
2155
+ }>, "many">;
2156
+ metrics: z.ZodDefault<z.ZodArray<z.ZodObject<{
2157
+ key: z.ZodString;
2158
+ name: z.ZodString;
2159
+ kind: z.ZodEnum<["conversion", "count", "sum"]>;
2160
+ eventName: z.ZodString;
2161
+ isPrimary: z.ZodDefault<z.ZodBoolean>;
2162
+ isGuardrail: z.ZodDefault<z.ZodBoolean>;
2163
+ }, "strip", z.ZodTypeAny, {
2164
+ name: string;
2165
+ key: string;
2166
+ kind: "conversion" | "count" | "sum";
2167
+ eventName: string;
2168
+ isPrimary: boolean;
2169
+ isGuardrail: boolean;
2170
+ }, {
2171
+ name: string;
2172
+ key: string;
2173
+ kind: "conversion" | "count" | "sum";
2174
+ eventName: string;
2175
+ isPrimary?: boolean | undefined;
2176
+ isGuardrail?: boolean | undefined;
2177
+ }>, "many">>;
2178
+ trigger: z.ZodOptional<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
2179
+ kind: z.ZodLiteral<"auto">;
2180
+ }, "strip", z.ZodTypeAny, {
2181
+ kind: "auto";
2182
+ }, {
2183
+ kind: "auto";
2184
+ }>, z.ZodObject<{
2185
+ kind: z.ZodLiteral<"urlMatch">;
2186
+ pattern: z.ZodString;
2187
+ regex: z.ZodOptional<z.ZodBoolean>;
2188
+ }, "strip", z.ZodTypeAny, {
2189
+ kind: "urlMatch";
2190
+ pattern: string;
2191
+ regex?: boolean | undefined;
2192
+ }, {
2193
+ kind: "urlMatch";
2194
+ pattern: string;
2195
+ regex?: boolean | undefined;
2196
+ }>, z.ZodObject<{
2197
+ kind: z.ZodLiteral<"waitForSelector">;
2198
+ selector: z.ZodString;
2199
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
2200
+ }, "strip", z.ZodTypeAny, {
2201
+ selector: string;
2202
+ kind: "waitForSelector";
2203
+ timeoutMs: number;
2204
+ }, {
2205
+ selector: string;
2206
+ kind: "waitForSelector";
2207
+ timeoutMs?: number | undefined;
2208
+ }>, z.ZodObject<{
2209
+ kind: z.ZodLiteral<"event">;
2210
+ name: z.ZodString;
2211
+ }, "strip", z.ZodTypeAny, {
2212
+ name: string;
2213
+ kind: "event";
2214
+ }, {
2215
+ name: string;
2216
+ kind: "event";
2217
+ }>]>>;
2218
+ manualExposure: z.ZodOptional<z.ZodBoolean>;
2219
+ divertTo: z.ZodOptional<z.ZodString>;
2220
+ sharedJs: z.ZodOptional<z.ZodString>;
2221
+ sharedCss: z.ZodOptional<z.ZodString>;
2222
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2223
+ approval: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2224
+ approverId: z.ZodString;
2225
+ approvedAt: z.ZodString;
2226
+ note: z.ZodOptional<z.ZodString>;
2227
+ }, "strip", z.ZodTypeAny, {
2228
+ approverId: string;
2229
+ approvedAt: string;
2230
+ note?: string | undefined;
2231
+ }, {
2232
+ approverId: string;
2233
+ approvedAt: string;
2234
+ note?: string | undefined;
2235
+ }>>>;
2236
+ killReason: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2237
+ ownerId: z.ZodString;
2238
+ tenantId: z.ZodDefault<z.ZodString>;
2239
+ createdAt: z.ZodString;
2240
+ updatedAt: z.ZodString;
2241
+ startedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2242
+ endedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2243
+ }, "strip", z.ZodTypeAny, {
2244
+ name: string;
2245
+ id: string;
2246
+ state: "draft" | "review" | "approved" | "running" | "paused" | "killed" | "concluded" | "archived";
2247
+ salt: string;
2248
+ audience: {
2249
+ sampleRate: number;
2250
+ rule?: unknown;
2251
+ };
2252
+ variants: {
2253
+ name: string;
2254
+ key: string;
2255
+ weight?: number | undefined;
2256
+ js?: string | undefined;
2257
+ css?: string | undefined;
2258
+ domOps?: ({
2259
+ value: string;
2260
+ op: "replaceText";
2261
+ selector: string;
2262
+ waitForMs?: number | undefined;
2263
+ } | {
2264
+ value: string;
2265
+ op: "replaceHTML";
2266
+ selector: string;
2267
+ waitForMs?: number | undefined;
2268
+ } | {
2269
+ value: string;
2270
+ op: "setAttr";
2271
+ selector: string;
2272
+ name: string;
2273
+ waitForMs?: number | undefined;
2274
+ } | {
2275
+ value: string;
2276
+ op: "addClass";
2277
+ selector: string;
2278
+ waitForMs?: number | undefined;
2279
+ } | {
2280
+ value: string;
2281
+ op: "removeClass";
2282
+ selector: string;
2283
+ waitForMs?: number | undefined;
2284
+ } | {
2285
+ value: string;
2286
+ op: "setStyle";
2287
+ selector: string;
2288
+ name: string;
2289
+ waitForMs?: number | undefined;
2290
+ } | {
2291
+ op: "remove";
2292
+ selector: string;
2293
+ waitForMs?: number | undefined;
2294
+ } | {
2295
+ value: string;
2296
+ op: "injectCSS";
2297
+ } | {
2298
+ value: string;
2299
+ op: "injectHTML";
2300
+ selector: string;
2301
+ position: "beforeend" | "afterbegin" | "beforebegin" | "afterend";
2302
+ waitForMs?: number | undefined;
2303
+ })[] | undefined;
2304
+ recipeSampleRate?: number | undefined;
2305
+ payload?: Record<string, unknown> | undefined;
2306
+ }[];
2307
+ metrics: {
2308
+ name: string;
2309
+ key: string;
2310
+ kind: "conversion" | "count" | "sum";
2311
+ eventName: string;
2312
+ isPrimary: boolean;
2313
+ isGuardrail: boolean;
2314
+ }[];
2315
+ approval: {
2316
+ approverId: string;
2317
+ approvedAt: string;
2318
+ note?: string | undefined;
2319
+ } | null;
2320
+ killReason: string | null;
2321
+ ownerId: string;
2322
+ tenantId: string;
2323
+ createdAt: string;
2324
+ updatedAt: string;
2325
+ startedAt: string | null;
2326
+ endedAt: string | null;
2327
+ description?: string | undefined;
2328
+ trigger?: {
2329
+ kind: "auto";
2330
+ } | {
2331
+ kind: "urlMatch";
2332
+ pattern: string;
2333
+ regex?: boolean | undefined;
2334
+ } | {
2335
+ selector: string;
2336
+ kind: "waitForSelector";
2337
+ timeoutMs: number;
2338
+ } | {
2339
+ name: string;
2340
+ kind: "event";
2341
+ } | undefined;
2342
+ manualExposure?: boolean | undefined;
2343
+ divertTo?: string | undefined;
2344
+ sharedJs?: string | undefined;
2345
+ sharedCss?: string | undefined;
2346
+ metadata?: Record<string, unknown> | undefined;
2347
+ }, {
2348
+ name: string;
2349
+ id: string;
2350
+ state: "draft" | "review" | "approved" | "running" | "paused" | "killed" | "concluded" | "archived";
2351
+ salt: string;
2352
+ audience: {
2353
+ sampleRate?: number | undefined;
2354
+ rule?: unknown;
2355
+ };
2356
+ variants: {
2357
+ name: string;
2358
+ key: string;
2359
+ weight?: number | undefined;
2360
+ js?: string | undefined;
2361
+ css?: string | undefined;
2362
+ domOps?: ({
2363
+ value: string;
2364
+ op: "replaceText";
2365
+ selector: string;
2366
+ waitForMs?: number | undefined;
2367
+ } | {
2368
+ value: string;
2369
+ op: "replaceHTML";
2370
+ selector: string;
2371
+ waitForMs?: number | undefined;
2372
+ } | {
2373
+ value: string;
2374
+ op: "setAttr";
2375
+ selector: string;
2376
+ name: string;
2377
+ waitForMs?: number | undefined;
2378
+ } | {
2379
+ value: string;
2380
+ op: "addClass";
2381
+ selector: string;
2382
+ waitForMs?: number | undefined;
2383
+ } | {
2384
+ value: string;
2385
+ op: "removeClass";
2386
+ selector: string;
2387
+ waitForMs?: number | undefined;
2388
+ } | {
2389
+ value: string;
2390
+ op: "setStyle";
2391
+ selector: string;
2392
+ name: string;
2393
+ waitForMs?: number | undefined;
2394
+ } | {
2395
+ op: "remove";
2396
+ selector: string;
2397
+ waitForMs?: number | undefined;
2398
+ } | {
2399
+ value: string;
2400
+ op: "injectCSS";
2401
+ } | {
2402
+ value: string;
2403
+ op: "injectHTML";
2404
+ selector: string;
2405
+ position: "beforeend" | "afterbegin" | "beforebegin" | "afterend";
2406
+ waitForMs?: number | undefined;
2407
+ })[] | undefined;
2408
+ recipeSampleRate?: number | undefined;
2409
+ payload?: Record<string, unknown> | undefined;
2410
+ }[];
2411
+ ownerId: string;
2412
+ createdAt: string;
2413
+ updatedAt: string;
2414
+ description?: string | undefined;
2415
+ metrics?: {
2416
+ name: string;
2417
+ key: string;
2418
+ kind: "conversion" | "count" | "sum";
2419
+ eventName: string;
2420
+ isPrimary?: boolean | undefined;
2421
+ isGuardrail?: boolean | undefined;
2422
+ }[] | undefined;
2423
+ trigger?: {
2424
+ kind: "auto";
2425
+ } | {
2426
+ kind: "urlMatch";
2427
+ pattern: string;
2428
+ regex?: boolean | undefined;
2429
+ } | {
2430
+ selector: string;
2431
+ kind: "waitForSelector";
2432
+ timeoutMs?: number | undefined;
2433
+ } | {
2434
+ name: string;
2435
+ kind: "event";
2436
+ } | undefined;
2437
+ manualExposure?: boolean | undefined;
2438
+ divertTo?: string | undefined;
2439
+ sharedJs?: string | undefined;
2440
+ sharedCss?: string | undefined;
2441
+ metadata?: Record<string, unknown> | undefined;
2442
+ approval?: {
2443
+ approverId: string;
2444
+ approvedAt: string;
2445
+ note?: string | undefined;
2446
+ } | null | undefined;
2447
+ killReason?: string | null | undefined;
2448
+ tenantId?: string | undefined;
2449
+ startedAt?: string | null | undefined;
2450
+ endedAt?: string | null | undefined;
2451
+ }>;
2452
+ mutates: false;
2453
+ requiresRole: "viewer";
2454
+ };
2455
+ 'experiments.invokeAction': {
2456
+ method: "POST";
2457
+ path: string;
2458
+ params: z.ZodObject<{
2459
+ actionId: z.ZodEnum<["experiment.create", "experiment.submit_for_review", "experiment.approve", "experiment.start", "experiment.pause", "experiment.resume", "experiment.kill", "experiment.declare_winner", "experiment.update", "experiment.guardrail_breach"]>;
2460
+ params: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2461
+ /** Optional client-supplied idempotency key. */
2462
+ idempotencyKey: z.ZodOptional<z.ZodString>;
2463
+ }, "strip", z.ZodTypeAny, {
2464
+ params: Record<string, unknown>;
2465
+ actionId: "experiment.create" | "experiment.submit_for_review" | "experiment.approve" | "experiment.start" | "experiment.pause" | "experiment.resume" | "experiment.kill" | "experiment.declare_winner" | "experiment.update" | "experiment.guardrail_breach";
2466
+ idempotencyKey?: string | undefined;
2467
+ }, {
2468
+ params: Record<string, unknown>;
2469
+ actionId: "experiment.create" | "experiment.submit_for_review" | "experiment.approve" | "experiment.start" | "experiment.pause" | "experiment.resume" | "experiment.kill" | "experiment.declare_winner" | "experiment.update" | "experiment.guardrail_breach";
2470
+ idempotencyKey?: string | undefined;
2471
+ }>;
2472
+ response: z.ZodObject<{
2473
+ success: z.ZodBoolean;
2474
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2475
+ error: z.ZodOptional<z.ZodString>;
2476
+ }, "strip", z.ZodTypeAny, {
2477
+ success: boolean;
2478
+ data?: Record<string, unknown> | undefined;
2479
+ error?: string | undefined;
2480
+ }, {
2481
+ success: boolean;
2482
+ data?: Record<string, unknown> | undefined;
2483
+ error?: string | undefined;
2484
+ }>;
2485
+ mutates: true;
2486
+ requiresRole: "experimenter";
2487
+ };
2488
+ 'experiments.aggregate': {
2489
+ method: "GET";
2490
+ path: string;
2491
+ params: z.ZodObject<{
2492
+ metric: z.ZodString;
2493
+ fromIso: z.ZodOptional<z.ZodString>;
2494
+ untilIso: z.ZodOptional<z.ZodString>;
2495
+ }, "strip", z.ZodTypeAny, {
2496
+ metric: string;
2497
+ fromIso?: string | undefined;
2498
+ untilIso?: string | undefined;
2499
+ }, {
2500
+ metric: string;
2501
+ fromIso?: string | undefined;
2502
+ untilIso?: string | undefined;
2503
+ }>;
2504
+ response: z.ZodObject<{
2505
+ experimentId: z.ZodString;
2506
+ metric: z.ZodString;
2507
+ rows: z.ZodArray<z.ZodObject<{
2508
+ variantKey: z.ZodString;
2509
+ exposureCount: z.ZodNumber;
2510
+ conversionCount: z.ZodNumber;
2511
+ conversionSum: z.ZodNumber;
2512
+ failureCount: z.ZodDefault<z.ZodNumber>;
2513
+ }, "strip", z.ZodTypeAny, {
2514
+ variantKey: string;
2515
+ exposureCount: number;
2516
+ conversionCount: number;
2517
+ conversionSum: number;
2518
+ failureCount: number;
2519
+ }, {
2520
+ variantKey: string;
2521
+ exposureCount: number;
2522
+ conversionCount: number;
2523
+ conversionSum: number;
2524
+ failureCount?: number | undefined;
2525
+ }>, "many">;
2526
+ /** ISO datetime — when this aggregate was computed. SDKs may cache by this. */
2527
+ computedAt: z.ZodString;
2528
+ }, "strip", z.ZodTypeAny, {
2529
+ experimentId: string;
2530
+ metric: string;
2531
+ rows: {
2532
+ variantKey: string;
2533
+ exposureCount: number;
2534
+ conversionCount: number;
2535
+ conversionSum: number;
2536
+ failureCount: number;
2537
+ }[];
2538
+ computedAt: string;
2539
+ }, {
2540
+ experimentId: string;
2541
+ metric: string;
2542
+ rows: {
2543
+ variantKey: string;
2544
+ exposureCount: number;
2545
+ conversionCount: number;
2546
+ conversionSum: number;
2547
+ failureCount?: number | undefined;
2548
+ }[];
2549
+ computedAt: string;
2550
+ }>;
2551
+ mutates: false;
2552
+ requiresRole: "viewer";
2553
+ };
2554
+ 'manifests.publish': {
2555
+ method: "POST";
2556
+ path: string;
2557
+ params: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
2558
+ response: z.ZodObject<{
2559
+ manifestVersion: z.ZodNumber;
2560
+ contentHash: z.ZodString;
2561
+ experimentCount: z.ZodNumber;
2562
+ /** Edge push status. `pushed: false` with `reason: 'unconfigured'` is normal in local dev. */
2563
+ edgePush: z.ZodObject<{
2564
+ pushed: z.ZodBoolean;
2565
+ reason: z.ZodOptional<z.ZodString>;
2566
+ status: z.ZodOptional<z.ZodNumber>;
2567
+ }, "strip", z.ZodTypeAny, {
2568
+ pushed: boolean;
2569
+ status?: number | undefined;
2570
+ reason?: string | undefined;
2571
+ }, {
2572
+ pushed: boolean;
2573
+ status?: number | undefined;
2574
+ reason?: string | undefined;
2575
+ }>;
2576
+ }, "strip", z.ZodTypeAny, {
2577
+ manifestVersion: number;
2578
+ contentHash: string;
2579
+ experimentCount: number;
2580
+ edgePush: {
2581
+ pushed: boolean;
2582
+ status?: number | undefined;
2583
+ reason?: string | undefined;
2584
+ };
2585
+ }, {
2586
+ manifestVersion: number;
2587
+ contentHash: string;
2588
+ experimentCount: number;
2589
+ edgePush: {
2590
+ pushed: boolean;
2591
+ status?: number | undefined;
2592
+ reason?: string | undefined;
2593
+ };
2594
+ }>;
2595
+ mutates: true;
2596
+ requiresRole: "experimenter";
2597
+ };
2598
+ 'manifests.getKeys': {
2599
+ method: "GET";
2600
+ path: string;
2601
+ params: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
2602
+ response: z.ZodObject<{
2603
+ keys: z.ZodArray<z.ZodObject<{
2604
+ keyId: z.ZodString;
2605
+ publicKeyHex: z.ZodString;
2606
+ status: z.ZodEnum<["active", "retiring", "retired"]>;
2607
+ createdAt: z.ZodString;
2608
+ retiredAt: z.ZodNullable<z.ZodString>;
2609
+ }, "strip", z.ZodTypeAny, {
2610
+ status: "active" | "retiring" | "retired";
2611
+ createdAt: string;
2612
+ keyId: string;
2613
+ publicKeyHex: string;
2614
+ retiredAt: string | null;
2615
+ }, {
2616
+ status: "active" | "retiring" | "retired";
2617
+ createdAt: string;
2618
+ keyId: string;
2619
+ publicKeyHex: string;
2620
+ retiredAt: string | null;
2621
+ }>, "many">;
2622
+ }, "strip", z.ZodTypeAny, {
2623
+ keys: {
2624
+ status: "active" | "retiring" | "retired";
2625
+ createdAt: string;
2626
+ keyId: string;
2627
+ publicKeyHex: string;
2628
+ retiredAt: string | null;
2629
+ }[];
2630
+ }, {
2631
+ keys: {
2632
+ status: "active" | "retiring" | "retired";
2633
+ createdAt: string;
2634
+ keyId: string;
2635
+ publicKeyHex: string;
2636
+ retiredAt: string | null;
2637
+ }[];
2638
+ }>;
2639
+ mutates: false;
2640
+ requiresRole: "admin";
2641
+ };
2642
+ 'manifests.rotateKey': {
2643
+ method: "POST";
2644
+ path: string;
2645
+ params: z.ZodObject<{
2646
+ keyId: z.ZodString;
2647
+ }, "strip", z.ZodTypeAny, {
2648
+ keyId: string;
2649
+ }, {
2650
+ keyId: string;
2651
+ }>;
2652
+ response: z.ZodObject<{
2653
+ keyId: z.ZodString;
2654
+ publicKeyHex: z.ZodString;
2655
+ status: z.ZodEnum<["active", "retiring", "retired"]>;
2656
+ createdAt: z.ZodString;
2657
+ retiredAt: z.ZodNullable<z.ZodString>;
2658
+ }, "strip", z.ZodTypeAny, {
2659
+ status: "active" | "retiring" | "retired";
2660
+ createdAt: string;
2661
+ keyId: string;
2662
+ publicKeyHex: string;
2663
+ retiredAt: string | null;
2664
+ }, {
2665
+ status: "active" | "retiring" | "retired";
2666
+ createdAt: string;
2667
+ keyId: string;
2668
+ publicKeyHex: string;
2669
+ retiredAt: string | null;
2670
+ }>;
2671
+ mutates: true;
2672
+ requiresRole: "admin";
2673
+ };
2674
+ 'manifests.retireKey': {
2675
+ method: "POST";
2676
+ path: string;
2677
+ params: z.ZodObject<{
2678
+ keyId: z.ZodString;
2679
+ }, "strip", z.ZodTypeAny, {
2680
+ keyId: string;
2681
+ }, {
2682
+ keyId: string;
2683
+ }>;
2684
+ response: z.ZodObject<{
2685
+ keyId: z.ZodString;
2686
+ publicKeyHex: z.ZodString;
2687
+ status: z.ZodEnum<["active", "retiring", "retired"]>;
2688
+ createdAt: z.ZodString;
2689
+ retiredAt: z.ZodNullable<z.ZodString>;
2690
+ }, "strip", z.ZodTypeAny, {
2691
+ status: "active" | "retiring" | "retired";
2692
+ createdAt: string;
2693
+ keyId: string;
2694
+ publicKeyHex: string;
2695
+ retiredAt: string | null;
2696
+ }, {
2697
+ status: "active" | "retiring" | "retired";
2698
+ createdAt: string;
2699
+ keyId: string;
2700
+ publicKeyHex: string;
2701
+ retiredAt: string | null;
2702
+ }>;
2703
+ mutates: true;
2704
+ requiresRole: "admin";
2705
+ };
2706
+ 'preview.sign': {
2707
+ method: "POST";
2708
+ path: string;
2709
+ params: z.ZodObject<{
2710
+ experimentId: z.ZodString;
2711
+ variantKey: z.ZodString;
2712
+ /** Token TTL in seconds. Clamped server-side to [60, 3600]; default 900. */
2713
+ ttlSeconds: z.ZodOptional<z.ZodNumber>;
2714
+ }, "strip", z.ZodTypeAny, {
2715
+ experimentId: string;
2716
+ variantKey: string;
2717
+ ttlSeconds?: number | undefined;
2718
+ }, {
2719
+ experimentId: string;
2720
+ variantKey: string;
2721
+ ttlSeconds?: number | undefined;
2722
+ }>;
2723
+ response: z.ZodObject<{
2724
+ token: z.ZodString;
2725
+ /** ISO datetime when the token expires. */
2726
+ expiresAt: z.ZodString;
2727
+ /** ID of the public JWKS key used to sign — exposed for debugging only. */
2728
+ keyId: z.ZodString;
2729
+ /** Unique JWT id for audit/debugging and future replay controls. */
2730
+ jti: z.ZodString;
2731
+ }, "strip", z.ZodTypeAny, {
2732
+ keyId: string;
2733
+ token: string;
2734
+ expiresAt: string;
2735
+ jti: string;
2736
+ }, {
2737
+ keyId: string;
2738
+ token: string;
2739
+ expiresAt: string;
2740
+ jti: string;
2741
+ }>;
2742
+ mutates: true;
2743
+ requiresRole: "experimenter";
2744
+ };
2745
+ 'audit.list': {
2746
+ method: "GET";
2747
+ path: string;
2748
+ params: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
2749
+ response: z.ZodObject<{
2750
+ events: z.ZodArray<z.ZodObject<{
2751
+ id: z.ZodString;
2752
+ type: z.ZodString;
2753
+ experimentId: z.ZodString;
2754
+ actorId: z.ZodString;
2755
+ at: z.ZodString;
2756
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2757
+ }, "strip", z.ZodTypeAny, {
2758
+ type: string;
2759
+ at: string;
2760
+ id: string;
2761
+ experimentId: string;
2762
+ actorId: string;
2763
+ payload: Record<string, unknown>;
2764
+ }, {
2765
+ type: string;
2766
+ at: string;
2767
+ id: string;
2768
+ experimentId: string;
2769
+ actorId: string;
2770
+ payload: Record<string, unknown>;
2771
+ }>, "many">;
2772
+ }, "strip", z.ZodTypeAny, {
2773
+ events: {
2774
+ type: string;
2775
+ at: string;
2776
+ id: string;
2777
+ experimentId: string;
2778
+ actorId: string;
2779
+ payload: Record<string, unknown>;
2780
+ }[];
2781
+ }, {
2782
+ events: {
2783
+ type: string;
2784
+ at: string;
2785
+ id: string;
2786
+ experimentId: string;
2787
+ actorId: string;
2788
+ payload: Record<string, unknown>;
2789
+ }[];
2790
+ }>;
2791
+ mutates: false;
2792
+ requiresRole: "viewer";
2793
+ };
2794
+ 'audit.exports.list': {
2795
+ method: "GET";
2796
+ path: string;
2797
+ params: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
2798
+ response: z.ZodObject<{
2799
+ exports: z.ZodArray<z.ZodObject<{
2800
+ id: z.ZodString;
2801
+ destinationKind: z.ZodEnum<["s3", "r2", "splunk-hec"]>;
2802
+ status: z.ZodEnum<["active", "paused", "failed"]>;
2803
+ lastCursorAt: z.ZodNullable<z.ZodString>;
2804
+ }, "strip", z.ZodTypeAny, {
2805
+ status: "paused" | "active" | "failed";
2806
+ id: string;
2807
+ destinationKind: "s3" | "r2" | "splunk-hec";
2808
+ lastCursorAt: string | null;
2809
+ }, {
2810
+ status: "paused" | "active" | "failed";
2811
+ id: string;
2812
+ destinationKind: "s3" | "r2" | "splunk-hec";
2813
+ lastCursorAt: string | null;
2814
+ }>, "many">;
2815
+ }, "strip", z.ZodTypeAny, {
2816
+ exports: {
2817
+ status: "paused" | "active" | "failed";
2818
+ id: string;
2819
+ destinationKind: "s3" | "r2" | "splunk-hec";
2820
+ lastCursorAt: string | null;
2821
+ }[];
2822
+ }, {
2823
+ exports: {
2824
+ status: "paused" | "active" | "failed";
2825
+ id: string;
2826
+ destinationKind: "s3" | "r2" | "splunk-hec";
2827
+ lastCursorAt: string | null;
2828
+ }[];
2829
+ }>;
2830
+ mutates: false;
2831
+ requiresRole: "admin";
2832
+ };
2833
+ 'audit.exports.create': {
2834
+ method: "POST";
2835
+ path: string;
2836
+ params: z.ZodObject<{
2837
+ destinationKind: z.ZodEnum<["s3", "r2", "splunk-hec"]>;
2838
+ /** Free-form config; encrypted at rest. Schema enforced by destination kind. */
2839
+ config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2840
+ }, "strip", z.ZodTypeAny, {
2841
+ destinationKind: "s3" | "r2" | "splunk-hec";
2842
+ config: Record<string, unknown>;
2843
+ }, {
2844
+ destinationKind: "s3" | "r2" | "splunk-hec";
2845
+ config: Record<string, unknown>;
2846
+ }>;
2847
+ response: z.ZodObject<{
2848
+ id: z.ZodString;
2849
+ destinationKind: z.ZodEnum<["s3", "r2", "splunk-hec"]>;
2850
+ status: z.ZodEnum<["active", "paused", "failed"]>;
2851
+ lastCursorAt: z.ZodNullable<z.ZodString>;
2852
+ }, "strip", z.ZodTypeAny, {
2853
+ status: "paused" | "active" | "failed";
2854
+ id: string;
2855
+ destinationKind: "s3" | "r2" | "splunk-hec";
2856
+ lastCursorAt: string | null;
2857
+ }, {
2858
+ status: "paused" | "active" | "failed";
2859
+ id: string;
2860
+ destinationKind: "s3" | "r2" | "splunk-hec";
2861
+ lastCursorAt: string | null;
2862
+ }>;
2863
+ mutates: true;
2864
+ requiresRole: "admin";
2865
+ };
2866
+ 'audit.exports.delete': {
2867
+ method: "DELETE";
2868
+ path: string;
2869
+ params: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
2870
+ response: z.ZodObject<{
2871
+ ok: z.ZodLiteral<true>;
2872
+ }, "strip", z.ZodTypeAny, {
2873
+ ok: true;
2874
+ }, {
2875
+ ok: true;
2876
+ }>;
2877
+ mutates: true;
2878
+ requiresRole: "admin";
2879
+ };
2880
+ 'apiKeys.list': {
2881
+ method: "GET";
2882
+ path: string;
2883
+ params: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
2884
+ response: z.ZodObject<{
2885
+ keys: z.ZodArray<z.ZodObject<{
2886
+ id: z.ZodString;
2887
+ name: z.ZodString;
2888
+ prefix: z.ZodString;
2889
+ role: z.ZodEnum<["owner", "admin", "experimenter", "viewer"]>;
2890
+ scopes: z.ZodArray<z.ZodEnum<["read", "write", "admin"]>, "many">;
2891
+ createdAt: z.ZodString;
2892
+ lastUsedAt: z.ZodNullable<z.ZodString>;
2893
+ expiresAt: z.ZodNullable<z.ZodString>;
2894
+ }, "strip", z.ZodTypeAny, {
2895
+ id: string;
2896
+ name: string;
2897
+ createdAt: string;
2898
+ role: "owner" | "admin" | "experimenter" | "viewer";
2899
+ expiresAt: string | null;
2900
+ prefix: string;
2901
+ scopes: ("admin" | "read" | "write")[];
2902
+ lastUsedAt: string | null;
2903
+ }, {
2904
+ id: string;
2905
+ name: string;
2906
+ createdAt: string;
2907
+ role: "owner" | "admin" | "experimenter" | "viewer";
2908
+ expiresAt: string | null;
2909
+ prefix: string;
2910
+ scopes: ("admin" | "read" | "write")[];
2911
+ lastUsedAt: string | null;
2912
+ }>, "many">;
2913
+ }, "strip", z.ZodTypeAny, {
2914
+ keys: {
2915
+ id: string;
2916
+ name: string;
2917
+ createdAt: string;
2918
+ role: "owner" | "admin" | "experimenter" | "viewer";
2919
+ expiresAt: string | null;
2920
+ prefix: string;
2921
+ scopes: ("admin" | "read" | "write")[];
2922
+ lastUsedAt: string | null;
2923
+ }[];
2924
+ }, {
2925
+ keys: {
2926
+ id: string;
2927
+ name: string;
2928
+ createdAt: string;
2929
+ role: "owner" | "admin" | "experimenter" | "viewer";
2930
+ expiresAt: string | null;
2931
+ prefix: string;
2932
+ scopes: ("admin" | "read" | "write")[];
2933
+ lastUsedAt: string | null;
2934
+ }[];
2935
+ }>;
2936
+ mutates: false;
2937
+ requiresRole: "admin";
2938
+ };
2939
+ 'apiKeys.create': {
2940
+ method: "POST";
2941
+ path: string;
2942
+ params: z.ZodObject<{
2943
+ name: z.ZodString;
2944
+ /** ISO datetime of expiry; null for non-expiring (not recommended in prod). */
2945
+ expiresAt: z.ZodNullable<z.ZodString>;
2946
+ /** Role assigned to the key. Defaults to the creator's role. */
2947
+ role: z.ZodOptional<z.ZodEnum<["owner", "admin", "experimenter", "viewer"]>>;
2948
+ /** Permission scopes assigned to the key. Defaults are derived from role. */
2949
+ scopes: z.ZodOptional<z.ZodArray<z.ZodEnum<["read", "write", "admin"]>, "many">>;
2950
+ }, "strip", z.ZodTypeAny, {
2951
+ name: string;
2952
+ expiresAt: string | null;
2953
+ role?: "owner" | "admin" | "experimenter" | "viewer" | undefined;
2954
+ scopes?: ("admin" | "read" | "write")[] | undefined;
2955
+ }, {
2956
+ name: string;
2957
+ expiresAt: string | null;
2958
+ role?: "owner" | "admin" | "experimenter" | "viewer" | undefined;
2959
+ scopes?: ("admin" | "read" | "write")[] | undefined;
2960
+ }>;
2961
+ response: z.ZodObject<{
2962
+ id: z.ZodString;
2963
+ name: z.ZodString;
2964
+ prefix: z.ZodString;
2965
+ role: z.ZodEnum<["owner", "admin", "experimenter", "viewer"]>;
2966
+ scopes: z.ZodArray<z.ZodEnum<["read", "write", "admin"]>, "many">;
2967
+ createdAt: z.ZodString;
2968
+ lastUsedAt: z.ZodNullable<z.ZodString>;
2969
+ expiresAt: z.ZodNullable<z.ZodString>;
2970
+ } & {
2971
+ /** Plaintext key, returned exactly once at creation time. */
2972
+ key: z.ZodString;
2973
+ }, "strip", z.ZodTypeAny, {
2974
+ id: string;
2975
+ name: string;
2976
+ createdAt: string;
2977
+ role: "owner" | "admin" | "experimenter" | "viewer";
2978
+ expiresAt: string | null;
2979
+ prefix: string;
2980
+ scopes: ("admin" | "read" | "write")[];
2981
+ lastUsedAt: string | null;
2982
+ key: string;
2983
+ }, {
2984
+ id: string;
2985
+ name: string;
2986
+ createdAt: string;
2987
+ role: "owner" | "admin" | "experimenter" | "viewer";
2988
+ expiresAt: string | null;
2989
+ prefix: string;
2990
+ scopes: ("admin" | "read" | "write")[];
2991
+ lastUsedAt: string | null;
2992
+ key: string;
2993
+ }>;
2994
+ mutates: true;
2995
+ requiresRole: "admin";
2996
+ };
2997
+ 'apiKeys.revoke': {
2998
+ method: "DELETE";
2999
+ path: string;
3000
+ params: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
3001
+ response: z.ZodObject<{
3002
+ ok: z.ZodLiteral<true>;
3003
+ }, "strip", z.ZodTypeAny, {
3004
+ ok: true;
3005
+ }, {
3006
+ ok: true;
3007
+ }>;
3008
+ mutates: true;
3009
+ requiresRole: "admin";
3010
+ };
3011
+ 'saml.get': {
3012
+ method: "GET";
3013
+ path: string;
3014
+ params: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
3015
+ response: z.ZodEffects<z.ZodObject<{
3016
+ enabled: z.ZodBoolean;
3017
+ connectionId: z.ZodNullable<z.ZodString>;
3018
+ issuer: z.ZodNullable<z.ZodString>;
3019
+ ssoUrl: z.ZodNullable<z.ZodString>;
3020
+ certificate: z.ZodNullable<z.ZodString>;
3021
+ }, "strip", z.ZodTypeAny, {
3022
+ enabled: boolean;
3023
+ connectionId: string | null;
3024
+ issuer: string | null;
3025
+ ssoUrl: string | null;
3026
+ certificate: string | null;
3027
+ }, {
3028
+ enabled: boolean;
3029
+ connectionId: string | null;
3030
+ issuer: string | null;
3031
+ ssoUrl: string | null;
3032
+ certificate: string | null;
3033
+ }>, {
3034
+ enabled: boolean;
3035
+ connectionId: string | null;
3036
+ issuer: string | null;
3037
+ ssoUrl: string | null;
3038
+ certificate: string | null;
3039
+ }, {
3040
+ enabled: boolean;
3041
+ connectionId: string | null;
3042
+ issuer: string | null;
3043
+ ssoUrl: string | null;
3044
+ certificate: string | null;
3045
+ }>;
3046
+ mutates: false;
3047
+ requiresRole: "owner";
3048
+ };
3049
+ 'saml.update': {
3050
+ method: "POST";
3051
+ path: string;
3052
+ params: z.ZodEffects<z.ZodObject<{
3053
+ enabled: z.ZodBoolean;
3054
+ connectionId: z.ZodNullable<z.ZodString>;
3055
+ issuer: z.ZodNullable<z.ZodString>;
3056
+ ssoUrl: z.ZodNullable<z.ZodString>;
3057
+ certificate: z.ZodNullable<z.ZodString>;
3058
+ }, "strip", z.ZodTypeAny, {
3059
+ enabled: boolean;
3060
+ connectionId: string | null;
3061
+ issuer: string | null;
3062
+ ssoUrl: string | null;
3063
+ certificate: string | null;
3064
+ }, {
3065
+ enabled: boolean;
3066
+ connectionId: string | null;
3067
+ issuer: string | null;
3068
+ ssoUrl: string | null;
3069
+ certificate: string | null;
3070
+ }>, {
3071
+ enabled: boolean;
3072
+ connectionId: string | null;
3073
+ issuer: string | null;
3074
+ ssoUrl: string | null;
3075
+ certificate: string | null;
3076
+ }, {
3077
+ enabled: boolean;
3078
+ connectionId: string | null;
3079
+ issuer: string | null;
3080
+ ssoUrl: string | null;
3081
+ certificate: string | null;
3082
+ }>;
3083
+ response: z.ZodEffects<z.ZodObject<{
3084
+ enabled: z.ZodBoolean;
3085
+ connectionId: z.ZodNullable<z.ZodString>;
3086
+ issuer: z.ZodNullable<z.ZodString>;
3087
+ ssoUrl: z.ZodNullable<z.ZodString>;
3088
+ certificate: z.ZodNullable<z.ZodString>;
3089
+ }, "strip", z.ZodTypeAny, {
3090
+ enabled: boolean;
3091
+ connectionId: string | null;
3092
+ issuer: string | null;
3093
+ ssoUrl: string | null;
3094
+ certificate: string | null;
3095
+ }, {
3096
+ enabled: boolean;
3097
+ connectionId: string | null;
3098
+ issuer: string | null;
3099
+ ssoUrl: string | null;
3100
+ certificate: string | null;
3101
+ }>, {
3102
+ enabled: boolean;
3103
+ connectionId: string | null;
3104
+ issuer: string | null;
3105
+ ssoUrl: string | null;
3106
+ certificate: string | null;
3107
+ }, {
3108
+ enabled: boolean;
3109
+ connectionId: string | null;
3110
+ issuer: string | null;
3111
+ ssoUrl: string | null;
3112
+ certificate: string | null;
3113
+ }>;
3114
+ mutates: true;
3115
+ requiresRole: "owner";
3116
+ };
3117
+ };
3118
+ type EndpointName = keyof typeof endpoints;
3119
+ type EndpointParams<E extends EndpointName> = z.infer<(typeof endpoints)[E]['params']>;
3120
+ type EndpointResponse<E extends EndpointName> = z.infer<(typeof endpoints)[E]['response']>;
3121
+ /** Substitute path parameters in a path template. */
3122
+ declare function buildPath(template: string, pathParams: Record<string, string>): string;
3123
+
3124
+ declare const ApiError: z.ZodObject<{
3125
+ code: z.ZodEnum<["UNAUTHENTICATED", "FORBIDDEN", "NOT_FOUND", "VALIDATION_FAILED", "CONFLICT", "RATE_LIMITED", "INTERNAL"]>;
3126
+ message: z.ZodString;
3127
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3128
+ }, "strip", z.ZodTypeAny, {
3129
+ code: "UNAUTHENTICATED" | "FORBIDDEN" | "NOT_FOUND" | "VALIDATION_FAILED" | "CONFLICT" | "RATE_LIMITED" | "INTERNAL";
3130
+ message: string;
3131
+ details?: Record<string, unknown> | undefined;
3132
+ }, {
3133
+ code: "UNAUTHENTICATED" | "FORBIDDEN" | "NOT_FOUND" | "VALIDATION_FAILED" | "CONFLICT" | "RATE_LIMITED" | "INTERNAL";
3134
+ message: string;
3135
+ details?: Record<string, unknown> | undefined;
3136
+ }>;
3137
+ type ApiError = z.infer<typeof ApiError>;
3138
+
3139
+ export { AggregateInput, AggregateResponse, AggregateRow, ApiError, ApiKeyListResponse, ApiKeySummary, AuditEvent, AuditExport, AuditExportListResponse, AuditListResponse, CreateApiKeyInput, CreateApiKeyResponse, CreateAuditExportInput, CreateExperimentInput, CreateExperimentResponse, EdgePushResult, type EndpointDef, type EndpointName, type EndpointParams, type EndpointResponse, ExperimentListResponse, ExperimentSummary, InvokeActionInput, InvokeActionResponse, ManifestKey, ManifestKeysResponse, PreviewSignInput, PreviewSignResponse, PublishManifestResponse, SamlConfig, TenantSelf, buildPath, endpoints };