@@ -17,6 +17,16 @@ import {
1717export class Builds extends APIResource {
1818 outputs : OutputsAPI . Outputs = new OutputsAPI . Outputs ( this . _client ) ;
1919
20+ /**
21+ * Create a build by uploading a spec along with some other info
22+ */
23+ create ( body : BuildCreateParams , options ?: Core . RequestOptions ) : Core . APIPromise < void > {
24+ return this . _client . post (
25+ '/api/spec' ,
26+ Core . multipartFormRequestOptions ( { body, ...options , headers : { Accept : '*/*' , ...options ?. headers } } ) ,
27+ ) ;
28+ }
29+
2030 /**
2131 * Retrieve a list of builds for a project
2232 */
@@ -31,6 +41,43 @@ export interface BuildResponse {
3141
3242export type BuildListResponse = Array < BuildResponse > ;
3343
44+ export interface BuildCreateParams {
45+ /**
46+ * The OpenAPI spec to upload
47+ */
48+ oasSpec : Core . Uploadable ;
49+
50+ /**
51+ * The name of the project to create the build in
52+ */
53+ project : string ;
54+
55+ /**
56+ * The name of the Stainless branch to upload the spec to
57+ */
58+ branch ?: string ;
59+
60+ /**
61+ * The commit message to use in any resultant commits to the SDK repo
62+ */
63+ commitMessage ?: string ;
64+
65+ /**
66+ * Whether or not to use an LLM to automatically guess config changes
67+ */
68+ guessConfig ?: boolean ;
69+
70+ /**
71+ * The ID of the parent build
72+ */
73+ parentBuildId ?: string ;
74+
75+ /**
76+ * The Stainless Config to upload
77+ */
78+ stainlessConfig ?: Core . Uploadable ;
79+ }
80+
3481export interface BuildListParams {
3582 /**
3683 * Project name
@@ -59,6 +106,7 @@ export declare namespace Builds {
59106 export {
60107 type BuildResponse as BuildResponse ,
61108 type BuildListResponse as BuildListResponse ,
109+ type BuildCreateParams as BuildCreateParams ,
62110 type BuildListParams as BuildListParams ,
63111 } ;
64112
0 commit comments