@@ -31,13 +31,24 @@ export class Benchmarks extends APIResource {
3131 }
3232
3333 /**
34- * Update a Benchmark with a set of Scenarios.
34+ * Update a Benchmark. Fields that are null will preserve the existing value.
35+ * Fields that are provided (including empty values) will replace the existing
36+ * value entirely.
3537 */
3638 update (
3739 id : string ,
38- body : BenchmarkUpdateParams ,
40+ body ?: BenchmarkUpdateParams ,
41+ options ?: Core . RequestOptions ,
42+ ) : Core . APIPromise < BenchmarkView > ;
43+ update ( id : string , options ?: Core . RequestOptions ) : Core . APIPromise < BenchmarkView > ;
44+ update (
45+ id : string ,
46+ body : BenchmarkUpdateParams | Core . RequestOptions = { } ,
3947 options ?: Core . RequestOptions ,
4048 ) : Core . APIPromise < BenchmarkView > {
49+ if ( isRequestOptions ( body ) ) {
50+ return this . update ( id , { } , body ) ;
51+ }
4152 return this . _client . post ( `/v1/benchmarks/${ id } ` , { body, ...options } ) ;
4253 }
4354
@@ -142,7 +153,7 @@ export class BenchmarkRunViewsBenchmarkRunsCursorIDPage extends BenchmarkRunsCur
142153 */
143154export interface BenchmarkCreateParameters {
144155 /**
145- * The name of the Benchmark. This must be unique .
156+ * The unique name of the Benchmark.
146157 */
147158 name : string ;
148159
@@ -157,13 +168,13 @@ export interface BenchmarkCreateParameters {
157168 description ?: string | null ;
158169
159170 /**
160- * User defined metadata to attach to the benchmark for organization .
171+ * User defined metadata to attach to the benchmark.
161172 */
162173 metadata ?: { [ key : string ] : string } | null ;
163174
164175 /**
165176 * Environment variables required to run the benchmark. If any required variables
166- * are not supplied, the benchmark will fail to start
177+ * are not supplied, the benchmark will fail to start.
167178 */
168179 required_environment_variables ?: Array < string > | null ;
169180
@@ -269,6 +280,52 @@ export interface BenchmarkScenarioUpdateParameters {
269280 scenarios_to_remove ?: Array < string > | null ;
270281}
271282
283+ /**
284+ * BenchmarkUpdateParameters contain the set of parameters to update a Benchmark.
285+ * All fields are optional - null fields preserve existing values, provided fields
286+ * replace entirely.
287+ */
288+ export interface BenchmarkUpdateParameters {
289+ /**
290+ * Attribution information for the benchmark. Pass in empty string to clear.
291+ */
292+ attribution ?: string | null ;
293+
294+ /**
295+ * Detailed description of the benchmark. Pass in empty string to clear.
296+ */
297+ description ?: string | null ;
298+
299+ /**
300+ * User defined metadata to attach to the benchmark. Pass in empty map to clear.
301+ */
302+ metadata ?: { [ key : string ] : string } | null ;
303+
304+ /**
305+ * The unique name of the Benchmark. Cannot be blank.
306+ */
307+ name ?: string | null ;
308+
309+ /**
310+ * Environment variables required to run the benchmark. If any required variables
311+ * are not supplied, the benchmark will fail to start. Pass in empty list to clear.
312+ */
313+ required_environment_variables ?: Array < string > | null ;
314+
315+ /**
316+ * Secrets required to run the benchmark with (environment variable name will be
317+ * mapped to the your user secret by name). If any of these secrets are not
318+ * provided or the mapping is incorrect, the benchmark will fail to start. Pass in
319+ * empty list to clear.
320+ */
321+ required_secret_names ?: Array < string > | null ;
322+
323+ /**
324+ * The Scenario IDs that make up the Benchmark. Pass in empty list to clear.
325+ */
326+ scenario_ids ?: Array < string > | null ;
327+ }
328+
272329/**
273330 * A BenchmarkDefinitionView represents a grouped set of Scenarios that together
274331 * form a Benchmark.
@@ -359,7 +416,7 @@ export interface StartBenchmarkRunParameters {
359416
360417export interface BenchmarkCreateParams {
361418 /**
362- * The name of the Benchmark. This must be unique .
419+ * The unique name of the Benchmark.
363420 */
364421 name : string ;
365422
@@ -374,13 +431,13 @@ export interface BenchmarkCreateParams {
374431 description ?: string | null ;
375432
376433 /**
377- * User defined metadata to attach to the benchmark for organization .
434+ * User defined metadata to attach to the benchmark.
378435 */
379436 metadata ?: { [ key : string ] : string } | null ;
380437
381438 /**
382439 * Environment variables required to run the benchmark. If any required variables
383- * are not supplied, the benchmark will fail to start
440+ * are not supplied, the benchmark will fail to start.
384441 */
385442 required_environment_variables ?: Array < string > | null ;
386443
@@ -399,40 +456,41 @@ export interface BenchmarkCreateParams {
399456
400457export interface BenchmarkUpdateParams {
401458 /**
402- * The name of the Benchmark. This must be unique.
403- */
404- name : string ;
405-
406- /**
407- * Attribution information for the benchmark.
459+ * Attribution information for the benchmark. Pass in empty string to clear.
408460 */
409461 attribution ?: string | null ;
410462
411463 /**
412- * Detailed description of the benchmark.
464+ * Detailed description of the benchmark. Pass in empty string to clear.
413465 */
414466 description ?: string | null ;
415467
416468 /**
417- * User defined metadata to attach to the benchmark for organization .
469+ * User defined metadata to attach to the benchmark. Pass in empty map to clear .
418470 */
419471 metadata ?: { [ key : string ] : string } | null ;
420472
473+ /**
474+ * The unique name of the Benchmark. Cannot be blank.
475+ */
476+ name ?: string | null ;
477+
421478 /**
422479 * Environment variables required to run the benchmark. If any required variables
423- * are not supplied, the benchmark will fail to start
480+ * are not supplied, the benchmark will fail to start. Pass in empty list to clear.
424481 */
425482 required_environment_variables ?: Array < string > | null ;
426483
427484 /**
428485 * Secrets required to run the benchmark with (environment variable name will be
429486 * mapped to the your user secret by name). If any of these secrets are not
430- * provided or the mapping is incorrect, the benchmark will fail to start.
487+ * provided or the mapping is incorrect, the benchmark will fail to start. Pass in
488+ * empty list to clear.
431489 */
432- required_secret_names ?: Array < string > ;
490+ required_secret_names ?: Array < string > | null ;
433491
434492 /**
435- * The Scenario IDs that make up the Benchmark.
493+ * The Scenario IDs that make up the Benchmark. Pass in empty list to clear.
436494 */
437495 scenario_ids ?: Array < string > | null ;
438496}
@@ -501,6 +559,7 @@ export declare namespace Benchmarks {
501559 type BenchmarkRunListView as BenchmarkRunListView ,
502560 type BenchmarkRunView as BenchmarkRunView ,
503561 type BenchmarkScenarioUpdateParameters as BenchmarkScenarioUpdateParameters ,
562+ type BenchmarkUpdateParameters as BenchmarkUpdateParameters ,
504563 type BenchmarkView as BenchmarkView ,
505564 type ScenarioDefinitionListView as ScenarioDefinitionListView ,
506565 type StartBenchmarkRunParameters as StartBenchmarkRunParameters ,
0 commit comments