@shipeasy/openapi 1.2.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +29 -7
- package/dist/resources/experiments.d.ts +6 -30
- package/dist/resources/experiments.js +6 -1
- package/dist/resources/gates.d.ts +95 -0
- package/dist/resources/gates.js +23 -6
- package/dist/resources/index.d.ts +101 -30
- package/dist/resources/index.js +29 -7
- package/dist/schemas/experiments.d.ts +4 -20
- package/dist/schemas/experiments.js +6 -1
- package/dist/schemas/gates.d.ts +83 -1
- package/dist/schemas/gates.js +24 -6
- package/dist/schemas/index.d.ts +1 -1
- package/dist/schemas/index.js +30 -7
- package/openapi.json +319 -51
- package/package.json +1 -1
|
@@ -80,6 +80,8 @@ declare const RESOURCE_REGISTRY: readonly [{
|
|
|
80
80
|
semver_gte: "semver_gte";
|
|
81
81
|
semver_lt: "semver_lt";
|
|
82
82
|
semver_lte: "semver_lte";
|
|
83
|
+
gate_pass: "gate_pass";
|
|
84
|
+
exp_in: "exp_in";
|
|
83
85
|
}>;
|
|
84
86
|
value: zod.ZodUnknown;
|
|
85
87
|
}, zod_v4_core.$strip>>>;
|
|
@@ -110,9 +112,20 @@ declare const RESOURCE_REGISTRY: readonly [{
|
|
|
110
112
|
semver_gte: "semver_gte";
|
|
111
113
|
semver_lt: "semver_lt";
|
|
112
114
|
semver_lte: "semver_lte";
|
|
115
|
+
gate_pass: "gate_pass";
|
|
116
|
+
exp_in: "exp_in";
|
|
113
117
|
}>;
|
|
114
118
|
value: zod.ZodUnknown;
|
|
115
119
|
}, zod_v4_core.$strip>>>;
|
|
120
|
+
rolloutPct: zod.ZodOptional<zod.ZodNumber>;
|
|
121
|
+
bucketBy: zod.ZodOptional<zod.ZodString>;
|
|
122
|
+
salt: zod.ZodOptional<zod.ZodString>;
|
|
123
|
+
ramp: zod.ZodOptional<zod.ZodObject<{
|
|
124
|
+
from: zod.ZodNumber;
|
|
125
|
+
to: zod.ZodNumber;
|
|
126
|
+
startAt: zod.ZodNumber;
|
|
127
|
+
durationMs: zod.ZodNumber;
|
|
128
|
+
}, zod_v4_core.$strip>>;
|
|
116
129
|
locked: zod.ZodOptional<zod.ZodBoolean>;
|
|
117
130
|
}, zod_v4_core.$strip>, zod.ZodObject<{
|
|
118
131
|
id: zod.ZodString;
|
|
@@ -122,6 +135,12 @@ declare const RESOURCE_REGISTRY: readonly [{
|
|
|
122
135
|
rolloutPct: zod.ZodNumber;
|
|
123
136
|
bucketBy: zod.ZodOptional<zod.ZodString>;
|
|
124
137
|
salt: zod.ZodOptional<zod.ZodString>;
|
|
138
|
+
ramp: zod.ZodOptional<zod.ZodObject<{
|
|
139
|
+
from: zod.ZodNumber;
|
|
140
|
+
to: zod.ZodNumber;
|
|
141
|
+
startAt: zod.ZodNumber;
|
|
142
|
+
durationMs: zod.ZodNumber;
|
|
143
|
+
}, zod_v4_core.$strip>>;
|
|
125
144
|
locked: zod.ZodOptional<zod.ZodBoolean>;
|
|
126
145
|
}, zod_v4_core.$strip>], "type">>>>;
|
|
127
146
|
}, zod_v4_core.$strip>;
|
|
@@ -150,6 +169,8 @@ declare const RESOURCE_REGISTRY: readonly [{
|
|
|
150
169
|
semver_gte: "semver_gte";
|
|
151
170
|
semver_lt: "semver_lt";
|
|
152
171
|
semver_lte: "semver_lte";
|
|
172
|
+
gate_pass: "gate_pass";
|
|
173
|
+
exp_in: "exp_in";
|
|
153
174
|
}>;
|
|
154
175
|
value: zod.ZodUnknown;
|
|
155
176
|
}, zod_v4_core.$strip>>>;
|
|
@@ -180,9 +201,20 @@ declare const RESOURCE_REGISTRY: readonly [{
|
|
|
180
201
|
semver_gte: "semver_gte";
|
|
181
202
|
semver_lt: "semver_lt";
|
|
182
203
|
semver_lte: "semver_lte";
|
|
204
|
+
gate_pass: "gate_pass";
|
|
205
|
+
exp_in: "exp_in";
|
|
183
206
|
}>;
|
|
184
207
|
value: zod.ZodUnknown;
|
|
185
208
|
}, zod_v4_core.$strip>>>;
|
|
209
|
+
rolloutPct: zod.ZodOptional<zod.ZodNumber>;
|
|
210
|
+
bucketBy: zod.ZodOptional<zod.ZodString>;
|
|
211
|
+
salt: zod.ZodOptional<zod.ZodString>;
|
|
212
|
+
ramp: zod.ZodOptional<zod.ZodObject<{
|
|
213
|
+
from: zod.ZodNumber;
|
|
214
|
+
to: zod.ZodNumber;
|
|
215
|
+
startAt: zod.ZodNumber;
|
|
216
|
+
durationMs: zod.ZodNumber;
|
|
217
|
+
}, zod_v4_core.$strip>>;
|
|
186
218
|
locked: zod.ZodOptional<zod.ZodBoolean>;
|
|
187
219
|
}, zod_v4_core.$strip>, zod.ZodObject<{
|
|
188
220
|
id: zod.ZodString;
|
|
@@ -192,6 +224,12 @@ declare const RESOURCE_REGISTRY: readonly [{
|
|
|
192
224
|
rolloutPct: zod.ZodNumber;
|
|
193
225
|
bucketBy: zod.ZodOptional<zod.ZodString>;
|
|
194
226
|
salt: zod.ZodOptional<zod.ZodString>;
|
|
227
|
+
ramp: zod.ZodOptional<zod.ZodObject<{
|
|
228
|
+
from: zod.ZodNumber;
|
|
229
|
+
to: zod.ZodNumber;
|
|
230
|
+
startAt: zod.ZodNumber;
|
|
231
|
+
durationMs: zod.ZodNumber;
|
|
232
|
+
}, zod_v4_core.$strip>>;
|
|
195
233
|
locked: zod.ZodOptional<zod.ZodBoolean>;
|
|
196
234
|
}, zod_v4_core.$strip>], "type">>>>;
|
|
197
235
|
}, zod_v4_core.$strip>;
|
|
@@ -232,6 +270,8 @@ declare const RESOURCE_REGISTRY: readonly [{
|
|
|
232
270
|
semver_gte: "semver_gte";
|
|
233
271
|
semver_lt: "semver_lt";
|
|
234
272
|
semver_lte: "semver_lte";
|
|
273
|
+
gate_pass: "gate_pass";
|
|
274
|
+
exp_in: "exp_in";
|
|
235
275
|
}>;
|
|
236
276
|
value: zod.ZodUnknown;
|
|
237
277
|
}, zod_v4_core.$strip>>>;
|
|
@@ -267,9 +307,20 @@ declare const RESOURCE_REGISTRY: readonly [{
|
|
|
267
307
|
semver_gte: "semver_gte";
|
|
268
308
|
semver_lt: "semver_lt";
|
|
269
309
|
semver_lte: "semver_lte";
|
|
310
|
+
gate_pass: "gate_pass";
|
|
311
|
+
exp_in: "exp_in";
|
|
270
312
|
}>;
|
|
271
313
|
value: zod.ZodUnknown;
|
|
272
314
|
}, zod_v4_core.$strip>>>;
|
|
315
|
+
rolloutPct: zod.ZodOptional<zod.ZodNumber>;
|
|
316
|
+
bucketBy: zod.ZodOptional<zod.ZodString>;
|
|
317
|
+
salt: zod.ZodOptional<zod.ZodString>;
|
|
318
|
+
ramp: zod.ZodOptional<zod.ZodObject<{
|
|
319
|
+
from: zod.ZodNumber;
|
|
320
|
+
to: zod.ZodNumber;
|
|
321
|
+
startAt: zod.ZodNumber;
|
|
322
|
+
durationMs: zod.ZodNumber;
|
|
323
|
+
}, zod_v4_core.$strip>>;
|
|
273
324
|
locked: zod.ZodOptional<zod.ZodBoolean>;
|
|
274
325
|
}, zod_v4_core.$strip>, zod.ZodObject<{
|
|
275
326
|
id: zod.ZodString;
|
|
@@ -279,6 +330,12 @@ declare const RESOURCE_REGISTRY: readonly [{
|
|
|
279
330
|
rolloutPct: zod.ZodNumber;
|
|
280
331
|
bucketBy: zod.ZodOptional<zod.ZodString>;
|
|
281
332
|
salt: zod.ZodOptional<zod.ZodString>;
|
|
333
|
+
ramp: zod.ZodOptional<zod.ZodObject<{
|
|
334
|
+
from: zod.ZodNumber;
|
|
335
|
+
to: zod.ZodNumber;
|
|
336
|
+
startAt: zod.ZodNumber;
|
|
337
|
+
durationMs: zod.ZodNumber;
|
|
338
|
+
}, zod_v4_core.$strip>>;
|
|
282
339
|
locked: zod.ZodOptional<zod.ZodBoolean>;
|
|
283
340
|
}, zod_v4_core.$strip>], "type">>>>;
|
|
284
341
|
updatedAt: zod.ZodString;
|
|
@@ -348,6 +405,8 @@ declare const RESOURCE_REGISTRY: readonly [{
|
|
|
348
405
|
semver_gte: "semver_gte";
|
|
349
406
|
semver_lt: "semver_lt";
|
|
350
407
|
semver_lte: "semver_lte";
|
|
408
|
+
gate_pass: "gate_pass";
|
|
409
|
+
exp_in: "exp_in";
|
|
351
410
|
}>;
|
|
352
411
|
value: zod.ZodUnknown;
|
|
353
412
|
}, zod_v4_core.$strip>>>;
|
|
@@ -378,9 +437,20 @@ declare const RESOURCE_REGISTRY: readonly [{
|
|
|
378
437
|
semver_gte: "semver_gte";
|
|
379
438
|
semver_lt: "semver_lt";
|
|
380
439
|
semver_lte: "semver_lte";
|
|
440
|
+
gate_pass: "gate_pass";
|
|
441
|
+
exp_in: "exp_in";
|
|
381
442
|
}>;
|
|
382
443
|
value: zod.ZodUnknown;
|
|
383
444
|
}, zod_v4_core.$strip>>>;
|
|
445
|
+
rolloutPct: zod.ZodOptional<zod.ZodNumber>;
|
|
446
|
+
bucketBy: zod.ZodOptional<zod.ZodString>;
|
|
447
|
+
salt: zod.ZodOptional<zod.ZodString>;
|
|
448
|
+
ramp: zod.ZodOptional<zod.ZodObject<{
|
|
449
|
+
from: zod.ZodNumber;
|
|
450
|
+
to: zod.ZodNumber;
|
|
451
|
+
startAt: zod.ZodNumber;
|
|
452
|
+
durationMs: zod.ZodNumber;
|
|
453
|
+
}, zod_v4_core.$strip>>;
|
|
384
454
|
locked: zod.ZodOptional<zod.ZodBoolean>;
|
|
385
455
|
}, zod_v4_core.$strip>, zod.ZodObject<{
|
|
386
456
|
id: zod.ZodString;
|
|
@@ -390,6 +460,12 @@ declare const RESOURCE_REGISTRY: readonly [{
|
|
|
390
460
|
rolloutPct: zod.ZodNumber;
|
|
391
461
|
bucketBy: zod.ZodOptional<zod.ZodString>;
|
|
392
462
|
salt: zod.ZodOptional<zod.ZodString>;
|
|
463
|
+
ramp: zod.ZodOptional<zod.ZodObject<{
|
|
464
|
+
from: zod.ZodNumber;
|
|
465
|
+
to: zod.ZodNumber;
|
|
466
|
+
startAt: zod.ZodNumber;
|
|
467
|
+
durationMs: zod.ZodNumber;
|
|
468
|
+
}, zod_v4_core.$strip>>;
|
|
393
469
|
locked: zod.ZodOptional<zod.ZodBoolean>;
|
|
394
470
|
}, zod_v4_core.$strip>], "type">>>>;
|
|
395
471
|
}, zod_v4_core.$strip>;
|
|
@@ -515,6 +591,8 @@ declare const RESOURCE_REGISTRY: readonly [{
|
|
|
515
591
|
semver_gte: "semver_gte";
|
|
516
592
|
semver_lt: "semver_lt";
|
|
517
593
|
semver_lte: "semver_lte";
|
|
594
|
+
gate_pass: "gate_pass";
|
|
595
|
+
exp_in: "exp_in";
|
|
518
596
|
}>;
|
|
519
597
|
value: zod.ZodUnknown;
|
|
520
598
|
}, zod_v4_core.$strip>>>;
|
|
@@ -545,9 +623,20 @@ declare const RESOURCE_REGISTRY: readonly [{
|
|
|
545
623
|
semver_gte: "semver_gte";
|
|
546
624
|
semver_lt: "semver_lt";
|
|
547
625
|
semver_lte: "semver_lte";
|
|
626
|
+
gate_pass: "gate_pass";
|
|
627
|
+
exp_in: "exp_in";
|
|
548
628
|
}>;
|
|
549
629
|
value: zod.ZodUnknown;
|
|
550
630
|
}, zod_v4_core.$strip>>>;
|
|
631
|
+
rolloutPct: zod.ZodOptional<zod.ZodNumber>;
|
|
632
|
+
bucketBy: zod.ZodOptional<zod.ZodString>;
|
|
633
|
+
salt: zod.ZodOptional<zod.ZodString>;
|
|
634
|
+
ramp: zod.ZodOptional<zod.ZodObject<{
|
|
635
|
+
from: zod.ZodNumber;
|
|
636
|
+
to: zod.ZodNumber;
|
|
637
|
+
startAt: zod.ZodNumber;
|
|
638
|
+
durationMs: zod.ZodNumber;
|
|
639
|
+
}, zod_v4_core.$strip>>;
|
|
551
640
|
locked: zod.ZodOptional<zod.ZodBoolean>;
|
|
552
641
|
}, zod_v4_core.$strip>, zod.ZodObject<{
|
|
553
642
|
id: zod.ZodString;
|
|
@@ -557,6 +646,12 @@ declare const RESOURCE_REGISTRY: readonly [{
|
|
|
557
646
|
rolloutPct: zod.ZodNumber;
|
|
558
647
|
bucketBy: zod.ZodOptional<zod.ZodString>;
|
|
559
648
|
salt: zod.ZodOptional<zod.ZodString>;
|
|
649
|
+
ramp: zod.ZodOptional<zod.ZodObject<{
|
|
650
|
+
from: zod.ZodNumber;
|
|
651
|
+
to: zod.ZodNumber;
|
|
652
|
+
startAt: zod.ZodNumber;
|
|
653
|
+
durationMs: zod.ZodNumber;
|
|
654
|
+
}, zod_v4_core.$strip>>;
|
|
560
655
|
locked: zod.ZodOptional<zod.ZodBoolean>;
|
|
561
656
|
}, zod_v4_core.$strip>], "type">>>>;
|
|
562
657
|
}, zod_v4_core.$strip>;
|
|
@@ -709,11 +804,7 @@ declare const RESOURCE_REGISTRY: readonly [{
|
|
|
709
804
|
tag: zod.ZodDefault<zod.ZodNullable<zod.ZodString>>;
|
|
710
805
|
owner_email: zod.ZodDefault<zod.ZodNullable<zod.ZodString>>;
|
|
711
806
|
audience: zod.ZodDefault<zod.ZodNullable<zod.ZodString>>;
|
|
712
|
-
bucket_by: zod.ZodDefault<zod.ZodNullable<zod.
|
|
713
|
-
user_id: "user_id";
|
|
714
|
-
session_id: "session_id";
|
|
715
|
-
device_id: "device_id";
|
|
716
|
-
}>>>;
|
|
807
|
+
bucket_by: zod.ZodDefault<zod.ZodNullable<zod.ZodString>>;
|
|
717
808
|
folder: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
718
809
|
universe: zod.ZodString;
|
|
719
810
|
targeting_gate: zod.ZodDefault<zod.ZodNullable<zod.ZodString>>;
|
|
@@ -749,11 +840,7 @@ declare const RESOURCE_REGISTRY: readonly [{
|
|
|
749
840
|
tag: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
750
841
|
owner_email: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
751
842
|
audience: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
752
|
-
bucket_by: zod.ZodOptional<zod.ZodNullable<zod.
|
|
753
|
-
user_id: "user_id";
|
|
754
|
-
session_id: "session_id";
|
|
755
|
-
device_id: "device_id";
|
|
756
|
-
}>>>;
|
|
843
|
+
bucket_by: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
757
844
|
folder: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
758
845
|
targeting_gate: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
759
846
|
allocation_pct: zod.ZodOptional<zod.ZodNumber>;
|
|
@@ -814,11 +901,7 @@ declare const RESOURCE_REGISTRY: readonly [{
|
|
|
814
901
|
tag: zod.ZodNullable<zod.ZodString>;
|
|
815
902
|
ownerEmail: zod.ZodNullable<zod.ZodString>;
|
|
816
903
|
audience: zod.ZodNullable<zod.ZodString>;
|
|
817
|
-
bucketBy: zod.ZodNullable<zod.
|
|
818
|
-
user_id: "user_id";
|
|
819
|
-
session_id: "session_id";
|
|
820
|
-
device_id: "device_id";
|
|
821
|
-
}>>;
|
|
904
|
+
bucketBy: zod.ZodNullable<zod.ZodString>;
|
|
822
905
|
folder: zod.ZodNullable<zod.ZodString>;
|
|
823
906
|
status: zod.ZodEnum<{
|
|
824
907
|
draft: "draft";
|
|
@@ -901,11 +984,7 @@ declare const RESOURCE_REGISTRY: readonly [{
|
|
|
901
984
|
tag: zod.ZodNullable<zod.ZodString>;
|
|
902
985
|
ownerEmail: zod.ZodNullable<zod.ZodString>;
|
|
903
986
|
audience: zod.ZodNullable<zod.ZodString>;
|
|
904
|
-
bucketBy: zod.ZodNullable<zod.
|
|
905
|
-
user_id: "user_id";
|
|
906
|
-
session_id: "session_id";
|
|
907
|
-
device_id: "device_id";
|
|
908
|
-
}>>;
|
|
987
|
+
bucketBy: zod.ZodNullable<zod.ZodString>;
|
|
909
988
|
folder: zod.ZodNullable<zod.ZodString>;
|
|
910
989
|
status: zod.ZodEnum<{
|
|
911
990
|
draft: "draft";
|
|
@@ -980,11 +1059,7 @@ declare const RESOURCE_REGISTRY: readonly [{
|
|
|
980
1059
|
tag: zod.ZodDefault<zod.ZodNullable<zod.ZodString>>;
|
|
981
1060
|
owner_email: zod.ZodDefault<zod.ZodNullable<zod.ZodString>>;
|
|
982
1061
|
audience: zod.ZodDefault<zod.ZodNullable<zod.ZodString>>;
|
|
983
|
-
bucket_by: zod.ZodDefault<zod.ZodNullable<zod.
|
|
984
|
-
user_id: "user_id";
|
|
985
|
-
session_id: "session_id";
|
|
986
|
-
device_id: "device_id";
|
|
987
|
-
}>>>;
|
|
1062
|
+
bucket_by: zod.ZodDefault<zod.ZodNullable<zod.ZodString>>;
|
|
988
1063
|
folder: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
989
1064
|
universe: zod.ZodString;
|
|
990
1065
|
targeting_gate: zod.ZodDefault<zod.ZodNullable<zod.ZodString>>;
|
|
@@ -1119,11 +1194,7 @@ declare const RESOURCE_REGISTRY: readonly [{
|
|
|
1119
1194
|
tag: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
1120
1195
|
owner_email: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
1121
1196
|
audience: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
1122
|
-
bucket_by: zod.ZodOptional<zod.ZodNullable<zod.
|
|
1123
|
-
user_id: "user_id";
|
|
1124
|
-
session_id: "session_id";
|
|
1125
|
-
device_id: "device_id";
|
|
1126
|
-
}>>>;
|
|
1197
|
+
bucket_by: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
1127
1198
|
folder: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
1128
1199
|
targeting_gate: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
1129
1200
|
allocation_pct: zod.ZodOptional<zod.ZodNumber>;
|
package/dist/resources/index.js
CHANGED
|
@@ -29,12 +29,14 @@ var gateRuleSchema = z2.object({
|
|
|
29
29
|
"semver_gt",
|
|
30
30
|
"semver_gte",
|
|
31
31
|
"semver_lt",
|
|
32
|
-
"semver_lte"
|
|
32
|
+
"semver_lte",
|
|
33
|
+
"gate_pass",
|
|
34
|
+
"exp_in"
|
|
33
35
|
]).describe(
|
|
34
|
-
|
|
36
|
+
'Comparison operator. Equality: `eq`/`neq`. Set membership: `in`/`not_in` (value is an array). Numeric order: `gt`/`gte`/`lt`/`lte`. Semver order: `semver_gt`/`semver_gte`/`semver_lt`/`semver_lte` (value is a dotted version like `4.2.0`). String: `contains` (substring), `regex` (JS-flavour pattern, value is the pattern string). Cross-resource references (evaluated only on the worker hot path, where both KV blobs load): `gate_pass` (`value` is another gate\'s name \u2014 true when that gate passes for the same caller); `exp_in` (`attr` is a running experiment\'s name, `value` is a group name, `"$holdout"`, or `"$any"` \u2014 true when the caller is in that variant / the universe holdout / any variant).'
|
|
35
37
|
),
|
|
36
38
|
value: z2.unknown().describe(
|
|
37
|
-
|
|
39
|
+
'Operand. Shape depends on `op`: scalar for `eq/neq/gt/gte/lt/lte/contains/semver_*`; array of scalars for `in/not_in`; string pattern for `regex`; referenced gate name for `gate_pass`; group name / `"$holdout"` / `"$any"` for `exp_in`.'
|
|
38
40
|
)
|
|
39
41
|
}).describe(
|
|
40
42
|
"Single targeting predicate. A gate's `rules` array is evaluated with AND semantics; use the gatekeeper `stack` for OR / fall-through logic."
|
|
@@ -45,9 +47,17 @@ var gateNameSchema = z2.string().regex(
|
|
|
45
47
|
).max(128).describe(
|
|
46
48
|
"Stable gate key used by SDKs (`Shipeasy.checkGate(user, '<name>')`). Single segment or `folder.name`. Lowercase letters, digits, `_` or `-`; max 128 chars. Immutable after create \u2014 rename = delete + recreate."
|
|
47
49
|
);
|
|
50
|
+
var rampSchema = z2.object({
|
|
51
|
+
from: z2.number().int().min(0).max(1e4).describe("Start of the ramp in basis points (0\u201310000)."),
|
|
52
|
+
to: z2.number().int().min(0).max(1e4).describe("End of the ramp in basis points (0\u201310000)."),
|
|
53
|
+
startAt: z2.number().int().nonnegative().describe("Ramp start, epoch milliseconds (UTC)."),
|
|
54
|
+
durationMs: z2.number().int().positive().describe("Ramp length in milliseconds.")
|
|
55
|
+
}).describe(
|
|
56
|
+
"Linear rollout ramp. The effective rollout % interpolates `from`\u2192`to` over `[startAt, startAt+durationMs]`, clamped outside that window, evaluated against the wall-clock at eval time. Overrides the entry's static `rolloutPct` while present."
|
|
57
|
+
);
|
|
48
58
|
var stackedConditionSchema = z2.object({
|
|
49
59
|
id: z2.string().min(1).describe(
|
|
50
|
-
"Client-supplied stable id for the stack entry (used for React keys, audit diffs)."
|
|
60
|
+
"Client-supplied stable id for the stack entry (used for React keys, audit diffs, and as the default per-condition rollout salt)."
|
|
51
61
|
),
|
|
52
62
|
type: z2.literal("condition").describe("Discriminator. `condition` = rule-based predicate sub-gate."),
|
|
53
63
|
name: z2.string().optional().describe("Human label shown in the dashboard."),
|
|
@@ -56,9 +66,15 @@ var stackedConditionSchema = z2.object({
|
|
|
56
66
|
),
|
|
57
67
|
pass: z2.enum(["all", "any"]).optional().describe("Combinator across `rules`. `all` = AND (default), `any` = OR."),
|
|
58
68
|
rules: z2.array(gateRuleSchema).default([]).describe("Predicates evaluated under `pass`. Empty array = match nothing."),
|
|
69
|
+
rolloutPct: z2.number().int().min(0).max(1e4).optional().describe(
|
|
70
|
+
"Per-condition rollout in basis points. After the rules match, the caller is bucketed at this %; in-bucket \u2192 gate `true`, otherwise fall through to the next entry. Absent \u21D2 10000 (100%, every matching caller passes)."
|
|
71
|
+
),
|
|
72
|
+
bucketBy: z2.string().optional().describe("Attribute used to hash the caller into the per-condition bucket. Default `userID`."),
|
|
73
|
+
salt: z2.string().optional().describe("Per-condition hash salt. Defaults to the entry `id`, then the gate salt."),
|
|
74
|
+
ramp: rampSchema.optional(),
|
|
59
75
|
locked: z2.boolean().optional().describe("If `true`, dashboard hides edit controls (e.g. the trailing public-floor entry).")
|
|
60
76
|
}).describe(
|
|
61
|
-
"Rule-based sub-gate. When
|
|
77
|
+
"Rule-based sub-gate. When the rules match and the caller falls in the per-condition rollout bucket, evaluation short-circuits and the gate returns `true`; otherwise it falls through to the next entry."
|
|
62
78
|
);
|
|
63
79
|
var stackedRolloutSchema = z2.object({
|
|
64
80
|
id: z2.string().min(1).describe("Client-supplied stable id for the stack entry."),
|
|
@@ -74,9 +90,10 @@ var stackedRolloutSchema = z2.object({
|
|
|
74
90
|
salt: z2.string().optional().describe(
|
|
75
91
|
"Per-entry hash salt. Defaults to the gate's salt. Set explicitly to keep two rollouts independent or correlated across gates."
|
|
76
92
|
),
|
|
93
|
+
ramp: rampSchema.optional(),
|
|
77
94
|
locked: z2.boolean().optional().describe("If `true`, dashboard hides edit controls.")
|
|
78
95
|
}).describe(
|
|
79
|
-
"Percentage-rollout sub-gate. Hashes `bucketBy` (default `userID`) with `salt` and returns `true` for `rolloutPct/10000` fraction of callers."
|
|
96
|
+
"Percentage-rollout sub-gate. Hashes `bucketBy` (default `userID`) with `salt` and returns `true` for `rolloutPct/10000` fraction of callers (or the ramp's effective % when `ramp` is set)."
|
|
80
97
|
);
|
|
81
98
|
var stackedGateEntrySchema = z2.discriminatedUnion("type", [stackedConditionSchema, stackedRolloutSchema]).describe(
|
|
82
99
|
"One entry in the ordered gatekeeper stack. Evaluated top-to-bottom; first matching entry decides. Mix `condition` and `rollout` entries to express `internal-only` + `1% beta` + `50% public` in a single gate."
|
|
@@ -530,7 +547,12 @@ var experimentGroupSchema = z5.object({
|
|
|
530
547
|
var paramSchemaSchema = z5.record(z5.string(), z5.enum(["string", "bool", "number"])).describe(
|
|
531
548
|
"Map of param-name \u2192 scalar type. Defines the shape of `groups[].params`. Example: `{ headline: 'string', show_cta: 'bool' }`."
|
|
532
549
|
);
|
|
533
|
-
var bucketBySchema = z5.
|
|
550
|
+
var bucketBySchema = z5.string().min(1).max(128).regex(
|
|
551
|
+
/^[a-zA-Z_][a-zA-Z0-9_]*$/,
|
|
552
|
+
"Must be a user-attribute name (letters, digits, underscore; not starting with a digit)."
|
|
553
|
+
).describe(
|
|
554
|
+
"User-attribute name used as the bucketing key \u2014 e.g. `user_id` (default), `session_id`, `device_id`, or a custom attribute like `company_id` to keep a whole org on one variant. Defaults to `user_id` when omitted."
|
|
555
|
+
);
|
|
534
556
|
var experimentCreateSchema = z5.object({
|
|
535
557
|
name: experimentNameSchema,
|
|
536
558
|
description: z5.string().max(2e3).nullable().default(null).describe("Free-form description. Max 2000 chars, markdown rendered in the dashboard."),
|
|
@@ -16,11 +16,7 @@ declare const paramSchemaSchema: z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
|
16
16
|
number: "number";
|
|
17
17
|
bool: "bool";
|
|
18
18
|
}>>;
|
|
19
|
-
declare const bucketBySchema: z.
|
|
20
|
-
user_id: "user_id";
|
|
21
|
-
session_id: "session_id";
|
|
22
|
-
device_id: "device_id";
|
|
23
|
-
}>;
|
|
19
|
+
declare const bucketBySchema: z.ZodString;
|
|
24
20
|
declare const experimentCreateSchema: z.ZodObject<{
|
|
25
21
|
name: z.ZodString;
|
|
26
22
|
description: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -28,11 +24,7 @@ declare const experimentCreateSchema: z.ZodObject<{
|
|
|
28
24
|
tag: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
29
25
|
owner_email: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
30
26
|
audience: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
31
|
-
bucket_by: z.ZodDefault<z.ZodNullable<z.
|
|
32
|
-
user_id: "user_id";
|
|
33
|
-
session_id: "session_id";
|
|
34
|
-
device_id: "device_id";
|
|
35
|
-
}>>>;
|
|
27
|
+
bucket_by: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
36
28
|
folder: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
37
29
|
universe: z.ZodString;
|
|
38
30
|
targeting_gate: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -68,11 +60,7 @@ declare const experimentUpdateSchema: z.ZodObject<{
|
|
|
68
60
|
tag: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
69
61
|
owner_email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
70
62
|
audience: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
71
|
-
bucket_by: z.ZodOptional<z.ZodNullable<z.
|
|
72
|
-
user_id: "user_id";
|
|
73
|
-
session_id: "session_id";
|
|
74
|
-
device_id: "device_id";
|
|
75
|
-
}>>>;
|
|
63
|
+
bucket_by: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
76
64
|
folder: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
77
65
|
targeting_gate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
78
66
|
allocation_pct: z.ZodOptional<z.ZodNumber>;
|
|
@@ -127,11 +115,7 @@ declare const experimentResponseSchema: z.ZodObject<{
|
|
|
127
115
|
tag: z.ZodNullable<z.ZodString>;
|
|
128
116
|
ownerEmail: z.ZodNullable<z.ZodString>;
|
|
129
117
|
audience: z.ZodNullable<z.ZodString>;
|
|
130
|
-
bucketBy: z.ZodNullable<z.
|
|
131
|
-
user_id: "user_id";
|
|
132
|
-
session_id: "session_id";
|
|
133
|
-
device_id: "device_id";
|
|
134
|
-
}>>;
|
|
118
|
+
bucketBy: z.ZodNullable<z.ZodString>;
|
|
135
119
|
folder: z.ZodNullable<z.ZodString>;
|
|
136
120
|
status: z.ZodEnum<{
|
|
137
121
|
draft: "draft";
|
|
@@ -31,7 +31,12 @@ var experimentGroupSchema = z3.object({
|
|
|
31
31
|
var paramSchemaSchema = z3.record(z3.string(), z3.enum(["string", "bool", "number"])).describe(
|
|
32
32
|
"Map of param-name \u2192 scalar type. Defines the shape of `groups[].params`. Example: `{ headline: 'string', show_cta: 'bool' }`."
|
|
33
33
|
);
|
|
34
|
-
var bucketBySchema = z3.
|
|
34
|
+
var bucketBySchema = z3.string().min(1).max(128).regex(
|
|
35
|
+
/^[a-zA-Z_][a-zA-Z0-9_]*$/,
|
|
36
|
+
"Must be a user-attribute name (letters, digits, underscore; not starting with a digit)."
|
|
37
|
+
).describe(
|
|
38
|
+
"User-attribute name used as the bucketing key \u2014 e.g. `user_id` (default), `session_id`, `device_id`, or a custom attribute like `company_id` to keep a whole org on one variant. Defaults to `user_id` when omitted."
|
|
39
|
+
);
|
|
35
40
|
var experimentCreateSchema = z3.object({
|
|
36
41
|
name: experimentNameSchema,
|
|
37
42
|
description: z3.string().max(2e3).nullable().default(null).describe("Free-form description. Max 2000 chars, markdown rendered in the dashboard."),
|
package/dist/schemas/gates.d.ts
CHANGED
|
@@ -17,10 +17,18 @@ declare const gateRuleSchema: z.ZodObject<{
|
|
|
17
17
|
semver_gte: "semver_gte";
|
|
18
18
|
semver_lt: "semver_lt";
|
|
19
19
|
semver_lte: "semver_lte";
|
|
20
|
+
gate_pass: "gate_pass";
|
|
21
|
+
exp_in: "exp_in";
|
|
20
22
|
}>;
|
|
21
23
|
value: z.ZodUnknown;
|
|
22
24
|
}, z.core.$strip>;
|
|
23
25
|
declare const gateNameSchema: z.ZodString;
|
|
26
|
+
declare const rampSchema: z.ZodObject<{
|
|
27
|
+
from: z.ZodNumber;
|
|
28
|
+
to: z.ZodNumber;
|
|
29
|
+
startAt: z.ZodNumber;
|
|
30
|
+
durationMs: z.ZodNumber;
|
|
31
|
+
}, z.core.$strip>;
|
|
24
32
|
declare const stackedGateEntrySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
25
33
|
id: z.ZodString;
|
|
26
34
|
type: z.ZodLiteral<"condition">;
|
|
@@ -47,9 +55,20 @@ declare const stackedGateEntrySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
47
55
|
semver_gte: "semver_gte";
|
|
48
56
|
semver_lt: "semver_lt";
|
|
49
57
|
semver_lte: "semver_lte";
|
|
58
|
+
gate_pass: "gate_pass";
|
|
59
|
+
exp_in: "exp_in";
|
|
50
60
|
}>;
|
|
51
61
|
value: z.ZodUnknown;
|
|
52
62
|
}, z.core.$strip>>>;
|
|
63
|
+
rolloutPct: z.ZodOptional<z.ZodNumber>;
|
|
64
|
+
bucketBy: z.ZodOptional<z.ZodString>;
|
|
65
|
+
salt: z.ZodOptional<z.ZodString>;
|
|
66
|
+
ramp: z.ZodOptional<z.ZodObject<{
|
|
67
|
+
from: z.ZodNumber;
|
|
68
|
+
to: z.ZodNumber;
|
|
69
|
+
startAt: z.ZodNumber;
|
|
70
|
+
durationMs: z.ZodNumber;
|
|
71
|
+
}, z.core.$strip>>;
|
|
53
72
|
locked: z.ZodOptional<z.ZodBoolean>;
|
|
54
73
|
}, z.core.$strip>, z.ZodObject<{
|
|
55
74
|
id: z.ZodString;
|
|
@@ -59,6 +78,12 @@ declare const stackedGateEntrySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
59
78
|
rolloutPct: z.ZodNumber;
|
|
60
79
|
bucketBy: z.ZodOptional<z.ZodString>;
|
|
61
80
|
salt: z.ZodOptional<z.ZodString>;
|
|
81
|
+
ramp: z.ZodOptional<z.ZodObject<{
|
|
82
|
+
from: z.ZodNumber;
|
|
83
|
+
to: z.ZodNumber;
|
|
84
|
+
startAt: z.ZodNumber;
|
|
85
|
+
durationMs: z.ZodNumber;
|
|
86
|
+
}, z.core.$strip>>;
|
|
62
87
|
locked: z.ZodOptional<z.ZodBoolean>;
|
|
63
88
|
}, z.core.$strip>], "type">;
|
|
64
89
|
declare const gateMetadataPatchSchema: z.ZodObject<{
|
|
@@ -95,6 +120,8 @@ declare const gateCreateSchema: z.ZodObject<{
|
|
|
95
120
|
semver_gte: "semver_gte";
|
|
96
121
|
semver_lt: "semver_lt";
|
|
97
122
|
semver_lte: "semver_lte";
|
|
123
|
+
gate_pass: "gate_pass";
|
|
124
|
+
exp_in: "exp_in";
|
|
98
125
|
}>;
|
|
99
126
|
value: z.ZodUnknown;
|
|
100
127
|
}, z.core.$strip>>>;
|
|
@@ -125,9 +152,20 @@ declare const gateCreateSchema: z.ZodObject<{
|
|
|
125
152
|
semver_gte: "semver_gte";
|
|
126
153
|
semver_lt: "semver_lt";
|
|
127
154
|
semver_lte: "semver_lte";
|
|
155
|
+
gate_pass: "gate_pass";
|
|
156
|
+
exp_in: "exp_in";
|
|
128
157
|
}>;
|
|
129
158
|
value: z.ZodUnknown;
|
|
130
159
|
}, z.core.$strip>>>;
|
|
160
|
+
rolloutPct: z.ZodOptional<z.ZodNumber>;
|
|
161
|
+
bucketBy: z.ZodOptional<z.ZodString>;
|
|
162
|
+
salt: z.ZodOptional<z.ZodString>;
|
|
163
|
+
ramp: z.ZodOptional<z.ZodObject<{
|
|
164
|
+
from: z.ZodNumber;
|
|
165
|
+
to: z.ZodNumber;
|
|
166
|
+
startAt: z.ZodNumber;
|
|
167
|
+
durationMs: z.ZodNumber;
|
|
168
|
+
}, z.core.$strip>>;
|
|
131
169
|
locked: z.ZodOptional<z.ZodBoolean>;
|
|
132
170
|
}, z.core.$strip>, z.ZodObject<{
|
|
133
171
|
id: z.ZodString;
|
|
@@ -137,6 +175,12 @@ declare const gateCreateSchema: z.ZodObject<{
|
|
|
137
175
|
rolloutPct: z.ZodNumber;
|
|
138
176
|
bucketBy: z.ZodOptional<z.ZodString>;
|
|
139
177
|
salt: z.ZodOptional<z.ZodString>;
|
|
178
|
+
ramp: z.ZodOptional<z.ZodObject<{
|
|
179
|
+
from: z.ZodNumber;
|
|
180
|
+
to: z.ZodNumber;
|
|
181
|
+
startAt: z.ZodNumber;
|
|
182
|
+
durationMs: z.ZodNumber;
|
|
183
|
+
}, z.core.$strip>>;
|
|
140
184
|
locked: z.ZodOptional<z.ZodBoolean>;
|
|
141
185
|
}, z.core.$strip>], "type">>>>;
|
|
142
186
|
}, z.core.$strip>;
|
|
@@ -165,6 +209,8 @@ declare const gateUpdateSchema: z.ZodObject<{
|
|
|
165
209
|
semver_gte: "semver_gte";
|
|
166
210
|
semver_lt: "semver_lt";
|
|
167
211
|
semver_lte: "semver_lte";
|
|
212
|
+
gate_pass: "gate_pass";
|
|
213
|
+
exp_in: "exp_in";
|
|
168
214
|
}>;
|
|
169
215
|
value: z.ZodUnknown;
|
|
170
216
|
}, z.core.$strip>>>;
|
|
@@ -195,9 +241,20 @@ declare const gateUpdateSchema: z.ZodObject<{
|
|
|
195
241
|
semver_gte: "semver_gte";
|
|
196
242
|
semver_lt: "semver_lt";
|
|
197
243
|
semver_lte: "semver_lte";
|
|
244
|
+
gate_pass: "gate_pass";
|
|
245
|
+
exp_in: "exp_in";
|
|
198
246
|
}>;
|
|
199
247
|
value: z.ZodUnknown;
|
|
200
248
|
}, z.core.$strip>>>;
|
|
249
|
+
rolloutPct: z.ZodOptional<z.ZodNumber>;
|
|
250
|
+
bucketBy: z.ZodOptional<z.ZodString>;
|
|
251
|
+
salt: z.ZodOptional<z.ZodString>;
|
|
252
|
+
ramp: z.ZodOptional<z.ZodObject<{
|
|
253
|
+
from: z.ZodNumber;
|
|
254
|
+
to: z.ZodNumber;
|
|
255
|
+
startAt: z.ZodNumber;
|
|
256
|
+
durationMs: z.ZodNumber;
|
|
257
|
+
}, z.core.$strip>>;
|
|
201
258
|
locked: z.ZodOptional<z.ZodBoolean>;
|
|
202
259
|
}, z.core.$strip>, z.ZodObject<{
|
|
203
260
|
id: z.ZodString;
|
|
@@ -207,6 +264,12 @@ declare const gateUpdateSchema: z.ZodObject<{
|
|
|
207
264
|
rolloutPct: z.ZodNumber;
|
|
208
265
|
bucketBy: z.ZodOptional<z.ZodString>;
|
|
209
266
|
salt: z.ZodOptional<z.ZodString>;
|
|
267
|
+
ramp: z.ZodOptional<z.ZodObject<{
|
|
268
|
+
from: z.ZodNumber;
|
|
269
|
+
to: z.ZodNumber;
|
|
270
|
+
startAt: z.ZodNumber;
|
|
271
|
+
durationMs: z.ZodNumber;
|
|
272
|
+
}, z.core.$strip>>;
|
|
210
273
|
locked: z.ZodOptional<z.ZodBoolean>;
|
|
211
274
|
}, z.core.$strip>], "type">>>>;
|
|
212
275
|
}, z.core.$strip>;
|
|
@@ -235,6 +298,8 @@ declare const gateResponseSchema: z.ZodObject<{
|
|
|
235
298
|
semver_gte: "semver_gte";
|
|
236
299
|
semver_lt: "semver_lt";
|
|
237
300
|
semver_lte: "semver_lte";
|
|
301
|
+
gate_pass: "gate_pass";
|
|
302
|
+
exp_in: "exp_in";
|
|
238
303
|
}>;
|
|
239
304
|
value: z.ZodUnknown;
|
|
240
305
|
}, z.core.$strip>>>;
|
|
@@ -270,9 +335,20 @@ declare const gateResponseSchema: z.ZodObject<{
|
|
|
270
335
|
semver_gte: "semver_gte";
|
|
271
336
|
semver_lt: "semver_lt";
|
|
272
337
|
semver_lte: "semver_lte";
|
|
338
|
+
gate_pass: "gate_pass";
|
|
339
|
+
exp_in: "exp_in";
|
|
273
340
|
}>;
|
|
274
341
|
value: z.ZodUnknown;
|
|
275
342
|
}, z.core.$strip>>>;
|
|
343
|
+
rolloutPct: z.ZodOptional<z.ZodNumber>;
|
|
344
|
+
bucketBy: z.ZodOptional<z.ZodString>;
|
|
345
|
+
salt: z.ZodOptional<z.ZodString>;
|
|
346
|
+
ramp: z.ZodOptional<z.ZodObject<{
|
|
347
|
+
from: z.ZodNumber;
|
|
348
|
+
to: z.ZodNumber;
|
|
349
|
+
startAt: z.ZodNumber;
|
|
350
|
+
durationMs: z.ZodNumber;
|
|
351
|
+
}, z.core.$strip>>;
|
|
276
352
|
locked: z.ZodOptional<z.ZodBoolean>;
|
|
277
353
|
}, z.core.$strip>, z.ZodObject<{
|
|
278
354
|
id: z.ZodString;
|
|
@@ -282,6 +358,12 @@ declare const gateResponseSchema: z.ZodObject<{
|
|
|
282
358
|
rolloutPct: z.ZodNumber;
|
|
283
359
|
bucketBy: z.ZodOptional<z.ZodString>;
|
|
284
360
|
salt: z.ZodOptional<z.ZodString>;
|
|
361
|
+
ramp: z.ZodOptional<z.ZodObject<{
|
|
362
|
+
from: z.ZodNumber;
|
|
363
|
+
to: z.ZodNumber;
|
|
364
|
+
startAt: z.ZodNumber;
|
|
365
|
+
durationMs: z.ZodNumber;
|
|
366
|
+
}, z.core.$strip>>;
|
|
285
367
|
locked: z.ZodOptional<z.ZodBoolean>;
|
|
286
368
|
}, z.core.$strip>], "type">>>>;
|
|
287
369
|
updatedAt: z.ZodString;
|
|
@@ -301,4 +383,4 @@ declare const gateToggleResponseSchema: z.ZodObject<{
|
|
|
301
383
|
enabled: z.ZodBoolean;
|
|
302
384
|
}, z.core.$strip>;
|
|
303
385
|
|
|
304
|
-
export { type GateCreateInput, type GateUpdateInput, type StackedGateEntryInput, gateCreateResponseSchema, gateCreateSchema, gateDeleteResponseSchema, gateMetadataPatchSchema, gateNameSchema, gateResponseSchema, gateRuleSchema, gateToggleResponseSchema, gateUpdateResponseSchema, gateUpdateSchema, stackedGateEntrySchema };
|
|
386
|
+
export { type GateCreateInput, type GateUpdateInput, type StackedGateEntryInput, gateCreateResponseSchema, gateCreateSchema, gateDeleteResponseSchema, gateMetadataPatchSchema, gateNameSchema, gateResponseSchema, gateRuleSchema, gateToggleResponseSchema, gateUpdateResponseSchema, gateUpdateSchema, rampSchema, stackedGateEntrySchema };
|