# Builds ## List project builds `client.builds.list(BuildListParamsparams?, RequestOptionsoptions?): Page` **get** `/v0/builds` List user-triggered builds for a given project. An optional revision can be specified to filter by config commit SHA, or hashes of file contents. ### Parameters - `params: BuildListParams` - `project?: string` Project name - `branch?: string` Branch name - `cursor?: string` Pagination cursor from a previous response. - `limit?: number` Maximum number of builds to return, defaults to 10 (maximum: 100). - `revision?: string | Record` A config commit SHA used for the build - `string` - `Record` - `hash: string` File content hash ### Returns - `Build` - `id: string` Build ID - `config_commit: string` - `created_at: string` - `documented_spec: UnionMember0 | UnionMember1 | null` - `UnionMember0` - `content: string` - `type: "content"` - `"content"` - `UnionMember1` - `expires: string` - `type: "url"` - `"url"` - `url: string` - `object: "build"` - `"build"` - `org: string` - `project: string` - `targets: Targets` - `cli?: BuildTarget` - `commit: NotStarted | Queued | InProgress | Completed` - `NotStarted` - `status: "not_started"` - `"not_started"` - `Queued` - `status: "queued"` - `"queued"` - `InProgress` - `status: "in_progress"` - `"in_progress"` - `Completed` - `commit: Commit | null` - `repo: Repo` - `branch: string` - `host: string` - `name: string` - `owner: string` - `sha: string` - `stats: Stats | null` - `additions: number` - `deletions: number` - `total: number` - `tree_oid: string | null` - `completed: Completed` deprecated - `commit: Commit | null` - `completed_at: string` - `conclusion: "error" | "warning" | "note" | 9 more` - `"error"` - `"warning"` - `"note"` - `"success"` - `"merge_conflict"` - `"upstream_merge_conflict"` - `"fatal"` - `"payment_required"` - `"cancelled"` - `"timed_out"` - `"noop"` - `"version_bump"` - `merge_conflict_pr: MergeConflictPr | null` - `number: number` - `repo: Repo` - `host: string` - `name: string` - `owner: string` - `completed_at: string` - `conclusion: "error" | "warning" | "note" | 9 more` - `"error"` - `"warning"` - `"note"` - `"success"` - `"merge_conflict"` - `"upstream_merge_conflict"` - `"fatal"` - `"payment_required"` - `"cancelled"` - `"timed_out"` - `"noop"` - `"version_bump"` - `merge_conflict_pr: MergeConflictPr | null` - `number: number` - `repo: Repo` - `host: string` - `name: string` - `owner: string` - `status: "completed"` - `"completed"` - `install_url: string | null` - `object: "build_target"` - `"build_target"` - `status: "not_started" | "codegen" | "postgen" | "completed"` - `"not_started"` - `"codegen"` - `"postgen"` - `"completed"` - `build?: CheckStep` - `NotStarted` - `status: "not_started"` - `"not_started"` - `Queued` - `status: "queued"` - `"queued"` - `url: string | null` - `InProgress` - `status: "in_progress"` - `"in_progress"` - `url: string | null` - `Completed` - `completed: Completed` deprecated - `conclusion: "success" | "failure" | "skipped" | 4 more` - `"success"` - `"failure"` - `"skipped"` - `"cancelled"` - `"action_required"` - `"neutral"` - `"timed_out"` - `url: string | null` - `conclusion: "success" | "failure" | "skipped" | 4 more` - `"success"` - `"failure"` - `"skipped"` - `"cancelled"` - `"action_required"` - `"neutral"` - `"timed_out"` - `status: "completed"` - `"completed"` - `url: string | null` - `lint?: CheckStep` - `test?: CheckStep` - `csharp?: BuildTarget` - `go?: BuildTarget` - `java?: BuildTarget` - `kotlin?: BuildTarget` - `node?: BuildTarget` - `openapi?: BuildTarget` - `php?: BuildTarget` - `python?: BuildTarget` - `ruby?: BuildTarget` - `sql?: BuildTarget` - `terraform?: BuildTarget` - `typescript?: BuildTarget` - `updated_at: string` ### Example ```typescript import Stainless from '@stainless-api/sdk'; const client = new Stainless({ apiKey: process.env['STAINLESS_API_KEY'], // This is the default and can be omitted }); // Automatically fetches more pages as needed. for await (const build of client.builds.list({ project: 'project' })) { console.log(build.id); } ``` #### Response ```json { "data": [ { "id": "id", "config_commit": "config_commit", "created_at": "2019-12-27T18:11:19.117Z", "documented_spec": { "content": "content", "type": "content" }, "object": "build", "org": "org", "project": "project", "targets": { "cli": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "csharp": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "go": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "java": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "kotlin": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "node": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "openapi": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "php": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "python": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "ruby": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "sql": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "terraform": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "typescript": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } } }, "updated_at": "2019-12-27T18:11:19.117Z" } ], "has_more": true, "next_cursor": "next_cursor" } ``` ## Create build `client.builds.create(BuildCreateParamsparams, RequestOptionsoptions?): Build` **post** `/v0/builds` Create a build, on top of a project branch, against a given input revision. The project branch will be modified so that its latest set of config files points to the one specified by the input revision. ### Parameters - `params: BuildCreateParams` - `project?: string` Project name - `revision: string | Record` Specifies what to build: a branch name, commit SHA, merge command ("base..head"), or file contents. - `string` - `Record` - `Content` - `content: string` File content - `URL` - `url: string` URL to fetch file content from - `allow_empty?: boolean` Whether to allow empty commits (no changes). Defaults to false. - `branch?: string` The project branch to use for the build. If not specified, the branch is inferred from the `revision`, and will 400 when that is not possible. - `commit_message?: string` Optional commit message to use when creating a new commit. - `enable_ai_commit_message?: boolean` Whether to generate AI-powered commit messages for the build. Cannot be combined with `commit_message` or `target_commit_messages`. - `target_commit_messages?: TargetCommitMessages` Optional commit messages to use for each SDK when making a new commit. SDKs not represented in this object will fallback to the optional `commit_message` parameter, or will fallback further to the default commit message. - `cli?: string` - `csharp?: string` - `go?: string` - `java?: string` - `kotlin?: string` - `node?: string` - `openapi?: string` - `php?: string` - `python?: string` - `ruby?: string` - `sql?: string` - `terraform?: string` - `typescript?: string` - `targets?: Array` Optional list of SDK targets to build. If not specified, all configured targets will be built. - `"node"` - `"typescript"` - `"python"` - `"go"` - `"java"` - `"kotlin"` - `"ruby"` - `"terraform"` - `"cli"` - `"php"` - `"csharp"` - `"sql"` - `"openapi"` ### Returns - `Build` - `id: string` Build ID - `config_commit: string` - `created_at: string` - `documented_spec: UnionMember0 | UnionMember1 | null` - `UnionMember0` - `content: string` - `type: "content"` - `"content"` - `UnionMember1` - `expires: string` - `type: "url"` - `"url"` - `url: string` - `object: "build"` - `"build"` - `org: string` - `project: string` - `targets: Targets` - `cli?: BuildTarget` - `commit: NotStarted | Queued | InProgress | Completed` - `NotStarted` - `status: "not_started"` - `"not_started"` - `Queued` - `status: "queued"` - `"queued"` - `InProgress` - `status: "in_progress"` - `"in_progress"` - `Completed` - `commit: Commit | null` - `repo: Repo` - `branch: string` - `host: string` - `name: string` - `owner: string` - `sha: string` - `stats: Stats | null` - `additions: number` - `deletions: number` - `total: number` - `tree_oid: string | null` - `completed: Completed` deprecated - `commit: Commit | null` - `completed_at: string` - `conclusion: "error" | "warning" | "note" | 9 more` - `"error"` - `"warning"` - `"note"` - `"success"` - `"merge_conflict"` - `"upstream_merge_conflict"` - `"fatal"` - `"payment_required"` - `"cancelled"` - `"timed_out"` - `"noop"` - `"version_bump"` - `merge_conflict_pr: MergeConflictPr | null` - `number: number` - `repo: Repo` - `host: string` - `name: string` - `owner: string` - `completed_at: string` - `conclusion: "error" | "warning" | "note" | 9 more` - `"error"` - `"warning"` - `"note"` - `"success"` - `"merge_conflict"` - `"upstream_merge_conflict"` - `"fatal"` - `"payment_required"` - `"cancelled"` - `"timed_out"` - `"noop"` - `"version_bump"` - `merge_conflict_pr: MergeConflictPr | null` - `number: number` - `repo: Repo` - `host: string` - `name: string` - `owner: string` - `status: "completed"` - `"completed"` - `install_url: string | null` - `object: "build_target"` - `"build_target"` - `status: "not_started" | "codegen" | "postgen" | "completed"` - `"not_started"` - `"codegen"` - `"postgen"` - `"completed"` - `build?: CheckStep` - `NotStarted` - `status: "not_started"` - `"not_started"` - `Queued` - `status: "queued"` - `"queued"` - `url: string | null` - `InProgress` - `status: "in_progress"` - `"in_progress"` - `url: string | null` - `Completed` - `completed: Completed` deprecated - `conclusion: "success" | "failure" | "skipped" | 4 more` - `"success"` - `"failure"` - `"skipped"` - `"cancelled"` - `"action_required"` - `"neutral"` - `"timed_out"` - `url: string | null` - `conclusion: "success" | "failure" | "skipped" | 4 more` - `"success"` - `"failure"` - `"skipped"` - `"cancelled"` - `"action_required"` - `"neutral"` - `"timed_out"` - `status: "completed"` - `"completed"` - `url: string | null` - `lint?: CheckStep` - `test?: CheckStep` - `csharp?: BuildTarget` - `go?: BuildTarget` - `java?: BuildTarget` - `kotlin?: BuildTarget` - `node?: BuildTarget` - `openapi?: BuildTarget` - `php?: BuildTarget` - `python?: BuildTarget` - `ruby?: BuildTarget` - `sql?: BuildTarget` - `terraform?: BuildTarget` - `typescript?: BuildTarget` - `updated_at: string` ### Example ```typescript import Stainless from '@stainless-api/sdk'; const client = new Stainless({ apiKey: process.env['STAINLESS_API_KEY'], // This is the default and can be omitted }); const build = await client.builds.create({ project: 'project', revision: 'string' }); console.log(build.id); ``` #### Response ```json { "id": "id", "config_commit": "config_commit", "created_at": "2019-12-27T18:11:19.117Z", "documented_spec": { "content": "content", "type": "content" }, "object": "build", "org": "org", "project": "project", "targets": { "cli": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "csharp": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "go": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "java": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "kotlin": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "node": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "openapi": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "php": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "python": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "ruby": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "sql": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "terraform": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "typescript": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } } }, "updated_at": "2019-12-27T18:11:19.117Z" } ``` ## Retrieve build `client.builds.retrieve(stringbuildID, RequestOptionsoptions?): Build` **get** `/v0/builds/{buildId}` Retrieve a build by its ID. ### Parameters - `buildID: string` Build ID ### Returns - `Build` - `id: string` Build ID - `config_commit: string` - `created_at: string` - `documented_spec: UnionMember0 | UnionMember1 | null` - `UnionMember0` - `content: string` - `type: "content"` - `"content"` - `UnionMember1` - `expires: string` - `type: "url"` - `"url"` - `url: string` - `object: "build"` - `"build"` - `org: string` - `project: string` - `targets: Targets` - `cli?: BuildTarget` - `commit: NotStarted | Queued | InProgress | Completed` - `NotStarted` - `status: "not_started"` - `"not_started"` - `Queued` - `status: "queued"` - `"queued"` - `InProgress` - `status: "in_progress"` - `"in_progress"` - `Completed` - `commit: Commit | null` - `repo: Repo` - `branch: string` - `host: string` - `name: string` - `owner: string` - `sha: string` - `stats: Stats | null` - `additions: number` - `deletions: number` - `total: number` - `tree_oid: string | null` - `completed: Completed` deprecated - `commit: Commit | null` - `completed_at: string` - `conclusion: "error" | "warning" | "note" | 9 more` - `"error"` - `"warning"` - `"note"` - `"success"` - `"merge_conflict"` - `"upstream_merge_conflict"` - `"fatal"` - `"payment_required"` - `"cancelled"` - `"timed_out"` - `"noop"` - `"version_bump"` - `merge_conflict_pr: MergeConflictPr | null` - `number: number` - `repo: Repo` - `host: string` - `name: string` - `owner: string` - `completed_at: string` - `conclusion: "error" | "warning" | "note" | 9 more` - `"error"` - `"warning"` - `"note"` - `"success"` - `"merge_conflict"` - `"upstream_merge_conflict"` - `"fatal"` - `"payment_required"` - `"cancelled"` - `"timed_out"` - `"noop"` - `"version_bump"` - `merge_conflict_pr: MergeConflictPr | null` - `number: number` - `repo: Repo` - `host: string` - `name: string` - `owner: string` - `status: "completed"` - `"completed"` - `install_url: string | null` - `object: "build_target"` - `"build_target"` - `status: "not_started" | "codegen" | "postgen" | "completed"` - `"not_started"` - `"codegen"` - `"postgen"` - `"completed"` - `build?: CheckStep` - `NotStarted` - `status: "not_started"` - `"not_started"` - `Queued` - `status: "queued"` - `"queued"` - `url: string | null` - `InProgress` - `status: "in_progress"` - `"in_progress"` - `url: string | null` - `Completed` - `completed: Completed` deprecated - `conclusion: "success" | "failure" | "skipped" | 4 more` - `"success"` - `"failure"` - `"skipped"` - `"cancelled"` - `"action_required"` - `"neutral"` - `"timed_out"` - `url: string | null` - `conclusion: "success" | "failure" | "skipped" | 4 more` - `"success"` - `"failure"` - `"skipped"` - `"cancelled"` - `"action_required"` - `"neutral"` - `"timed_out"` - `status: "completed"` - `"completed"` - `url: string | null` - `lint?: CheckStep` - `test?: CheckStep` - `csharp?: BuildTarget` - `go?: BuildTarget` - `java?: BuildTarget` - `kotlin?: BuildTarget` - `node?: BuildTarget` - `openapi?: BuildTarget` - `php?: BuildTarget` - `python?: BuildTarget` - `ruby?: BuildTarget` - `sql?: BuildTarget` - `terraform?: BuildTarget` - `typescript?: BuildTarget` - `updated_at: string` ### Example ```typescript import Stainless from '@stainless-api/sdk'; const client = new Stainless({ apiKey: process.env['STAINLESS_API_KEY'], // This is the default and can be omitted }); const build = await client.builds.retrieve('buildId'); console.log(build.id); ``` #### Response ```json { "id": "id", "config_commit": "config_commit", "created_at": "2019-12-27T18:11:19.117Z", "documented_spec": { "content": "content", "type": "content" }, "object": "build", "org": "org", "project": "project", "targets": { "cli": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "csharp": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "go": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "java": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "kotlin": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "node": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "openapi": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "php": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "python": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "ruby": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "sql": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "terraform": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "typescript": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } } }, "updated_at": "2019-12-27T18:11:19.117Z" } ``` ## Creates two comparable builds `client.builds.compare(BuildCompareParamsparams, RequestOptionsoptions?): BuildCompareResponse` **post** `/v0/builds/compare` Create two builds whose outputs can be directly compared with each other. Created builds _modify_ their project branches so that their latest sets of config files point to the ones specified by the input revision. This endpoint is useful because a build has more inputs than the set of config files it uses, so comparing two builds directly may return spurious differences. Builds made via this endpoint are guaranteed to have differences arising from the set of config files, and any custom code. ### Parameters - `params: BuildCompareParams` - `base: Base` Parameters for the base build - `branch: string` Branch to use. When using a branch name as revision, this must match or be omitted. - `revision: string | Record` Specifies what to build: a branch name, a commit SHA, or file contents. - `string` - `Record` - `Content` - `content: string` File content - `URL` - `url: string` URL to fetch file content from - `commit_message?: string` Optional commit message to use when creating a new commit. - `head: Head` Parameters for the head build - `branch: string` Branch to use. When using a branch name as revision, this must match or be omitted. - `revision: string | Record` Specifies what to build: a branch name, a commit SHA, or file contents. - `string` - `Record` - `Content` - `URL` - `commit_message?: string` Optional commit message to use when creating a new commit. - `project?: string` Project name - `targets?: Array` Optional list of SDK targets to build. If not specified, all configured targets will be built. - `"node"` - `"typescript"` - `"python"` - `"go"` - `"java"` - `"kotlin"` - `"ruby"` - `"terraform"` - `"cli"` - `"php"` - `"csharp"` - `"sql"` - `"openapi"` ### Returns - `BuildCompareResponse` - `base: Build` - `id: string` Build ID - `config_commit: string` - `created_at: string` - `documented_spec: UnionMember0 | UnionMember1 | null` - `UnionMember0` - `content: string` - `type: "content"` - `"content"` - `UnionMember1` - `expires: string` - `type: "url"` - `"url"` - `url: string` - `object: "build"` - `"build"` - `org: string` - `project: string` - `targets: Targets` - `cli?: BuildTarget` - `commit: NotStarted | Queued | InProgress | Completed` - `NotStarted` - `status: "not_started"` - `"not_started"` - `Queued` - `status: "queued"` - `"queued"` - `InProgress` - `status: "in_progress"` - `"in_progress"` - `Completed` - `commit: Commit | null` - `repo: Repo` - `branch: string` - `host: string` - `name: string` - `owner: string` - `sha: string` - `stats: Stats | null` - `additions: number` - `deletions: number` - `total: number` - `tree_oid: string | null` - `completed: Completed` deprecated - `commit: Commit | null` - `completed_at: string` - `conclusion: "error" | "warning" | "note" | 9 more` - `"error"` - `"warning"` - `"note"` - `"success"` - `"merge_conflict"` - `"upstream_merge_conflict"` - `"fatal"` - `"payment_required"` - `"cancelled"` - `"timed_out"` - `"noop"` - `"version_bump"` - `merge_conflict_pr: MergeConflictPr | null` - `number: number` - `repo: Repo` - `host: string` - `name: string` - `owner: string` - `completed_at: string` - `conclusion: "error" | "warning" | "note" | 9 more` - `"error"` - `"warning"` - `"note"` - `"success"` - `"merge_conflict"` - `"upstream_merge_conflict"` - `"fatal"` - `"payment_required"` - `"cancelled"` - `"timed_out"` - `"noop"` - `"version_bump"` - `merge_conflict_pr: MergeConflictPr | null` - `number: number` - `repo: Repo` - `host: string` - `name: string` - `owner: string` - `status: "completed"` - `"completed"` - `install_url: string | null` - `object: "build_target"` - `"build_target"` - `status: "not_started" | "codegen" | "postgen" | "completed"` - `"not_started"` - `"codegen"` - `"postgen"` - `"completed"` - `build?: CheckStep` - `NotStarted` - `status: "not_started"` - `"not_started"` - `Queued` - `status: "queued"` - `"queued"` - `url: string | null` - `InProgress` - `status: "in_progress"` - `"in_progress"` - `url: string | null` - `Completed` - `completed: Completed` deprecated - `conclusion: "success" | "failure" | "skipped" | 4 more` - `"success"` - `"failure"` - `"skipped"` - `"cancelled"` - `"action_required"` - `"neutral"` - `"timed_out"` - `url: string | null` - `conclusion: "success" | "failure" | "skipped" | 4 more` - `"success"` - `"failure"` - `"skipped"` - `"cancelled"` - `"action_required"` - `"neutral"` - `"timed_out"` - `status: "completed"` - `"completed"` - `url: string | null` - `lint?: CheckStep` - `test?: CheckStep` - `csharp?: BuildTarget` - `go?: BuildTarget` - `java?: BuildTarget` - `kotlin?: BuildTarget` - `node?: BuildTarget` - `openapi?: BuildTarget` - `php?: BuildTarget` - `python?: BuildTarget` - `ruby?: BuildTarget` - `sql?: BuildTarget` - `terraform?: BuildTarget` - `typescript?: BuildTarget` - `updated_at: string` - `head: Build` ### Example ```typescript import Stainless from '@stainless-api/sdk'; const client = new Stainless({ apiKey: process.env['STAINLESS_API_KEY'], // This is the default and can be omitted }); const response = await client.builds.compare({ base: { branch: 'branch', revision: 'string' }, head: { branch: 'branch', revision: 'string' }, project: 'project', }); console.log(response.base); ``` #### Response ```json { "base": { "id": "id", "config_commit": "config_commit", "created_at": "2019-12-27T18:11:19.117Z", "documented_spec": { "content": "content", "type": "content" }, "object": "build", "org": "org", "project": "project", "targets": { "cli": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "csharp": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "go": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "java": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "kotlin": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "node": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "openapi": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "php": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "python": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "ruby": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "sql": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "terraform": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "typescript": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } } }, "updated_at": "2019-12-27T18:11:19.117Z" }, "head": { "id": "id", "config_commit": "config_commit", "created_at": "2019-12-27T18:11:19.117Z", "documented_spec": { "content": "content", "type": "content" }, "object": "build", "org": "org", "project": "project", "targets": { "cli": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "csharp": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "go": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "java": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "kotlin": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "node": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "openapi": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "php": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "python": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "ruby": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "sql": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "terraform": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "typescript": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } } }, "updated_at": "2019-12-27T18:11:19.117Z" } } ``` ## Domain Types ### Build - `Build` - `id: string` Build ID - `config_commit: string` - `created_at: string` - `documented_spec: UnionMember0 | UnionMember1 | null` - `UnionMember0` - `content: string` - `type: "content"` - `"content"` - `UnionMember1` - `expires: string` - `type: "url"` - `"url"` - `url: string` - `object: "build"` - `"build"` - `org: string` - `project: string` - `targets: Targets` - `cli?: BuildTarget` - `commit: NotStarted | Queued | InProgress | Completed` - `NotStarted` - `status: "not_started"` - `"not_started"` - `Queued` - `status: "queued"` - `"queued"` - `InProgress` - `status: "in_progress"` - `"in_progress"` - `Completed` - `commit: Commit | null` - `repo: Repo` - `branch: string` - `host: string` - `name: string` - `owner: string` - `sha: string` - `stats: Stats | null` - `additions: number` - `deletions: number` - `total: number` - `tree_oid: string | null` - `completed: Completed` deprecated - `commit: Commit | null` - `completed_at: string` - `conclusion: "error" | "warning" | "note" | 9 more` - `"error"` - `"warning"` - `"note"` - `"success"` - `"merge_conflict"` - `"upstream_merge_conflict"` - `"fatal"` - `"payment_required"` - `"cancelled"` - `"timed_out"` - `"noop"` - `"version_bump"` - `merge_conflict_pr: MergeConflictPr | null` - `number: number` - `repo: Repo` - `host: string` - `name: string` - `owner: string` - `completed_at: string` - `conclusion: "error" | "warning" | "note" | 9 more` - `"error"` - `"warning"` - `"note"` - `"success"` - `"merge_conflict"` - `"upstream_merge_conflict"` - `"fatal"` - `"payment_required"` - `"cancelled"` - `"timed_out"` - `"noop"` - `"version_bump"` - `merge_conflict_pr: MergeConflictPr | null` - `number: number` - `repo: Repo` - `host: string` - `name: string` - `owner: string` - `status: "completed"` - `"completed"` - `install_url: string | null` - `object: "build_target"` - `"build_target"` - `status: "not_started" | "codegen" | "postgen" | "completed"` - `"not_started"` - `"codegen"` - `"postgen"` - `"completed"` - `build?: CheckStep` - `NotStarted` - `status: "not_started"` - `"not_started"` - `Queued` - `status: "queued"` - `"queued"` - `url: string | null` - `InProgress` - `status: "in_progress"` - `"in_progress"` - `url: string | null` - `Completed` - `completed: Completed` deprecated - `conclusion: "success" | "failure" | "skipped" | 4 more` - `"success"` - `"failure"` - `"skipped"` - `"cancelled"` - `"action_required"` - `"neutral"` - `"timed_out"` - `url: string | null` - `conclusion: "success" | "failure" | "skipped" | 4 more` - `"success"` - `"failure"` - `"skipped"` - `"cancelled"` - `"action_required"` - `"neutral"` - `"timed_out"` - `status: "completed"` - `"completed"` - `url: string | null` - `lint?: CheckStep` - `test?: CheckStep` - `csharp?: BuildTarget` - `go?: BuildTarget` - `java?: BuildTarget` - `kotlin?: BuildTarget` - `node?: BuildTarget` - `openapi?: BuildTarget` - `php?: BuildTarget` - `python?: BuildTarget` - `ruby?: BuildTarget` - `sql?: BuildTarget` - `terraform?: BuildTarget` - `typescript?: BuildTarget` - `updated_at: string` ### Build Target - `BuildTarget` - `commit: NotStarted | Queued | InProgress | Completed` - `NotStarted` - `status: "not_started"` - `"not_started"` - `Queued` - `status: "queued"` - `"queued"` - `InProgress` - `status: "in_progress"` - `"in_progress"` - `Completed` - `commit: Commit | null` - `repo: Repo` - `branch: string` - `host: string` - `name: string` - `owner: string` - `sha: string` - `stats: Stats | null` - `additions: number` - `deletions: number` - `total: number` - `tree_oid: string | null` - `completed: Completed` deprecated - `commit: Commit | null` - `completed_at: string` - `conclusion: "error" | "warning" | "note" | 9 more` - `"error"` - `"warning"` - `"note"` - `"success"` - `"merge_conflict"` - `"upstream_merge_conflict"` - `"fatal"` - `"payment_required"` - `"cancelled"` - `"timed_out"` - `"noop"` - `"version_bump"` - `merge_conflict_pr: MergeConflictPr | null` - `number: number` - `repo: Repo` - `host: string` - `name: string` - `owner: string` - `completed_at: string` - `conclusion: "error" | "warning" | "note" | 9 more` - `"error"` - `"warning"` - `"note"` - `"success"` - `"merge_conflict"` - `"upstream_merge_conflict"` - `"fatal"` - `"payment_required"` - `"cancelled"` - `"timed_out"` - `"noop"` - `"version_bump"` - `merge_conflict_pr: MergeConflictPr | null` - `number: number` - `repo: Repo` - `host: string` - `name: string` - `owner: string` - `status: "completed"` - `"completed"` - `install_url: string | null` - `object: "build_target"` - `"build_target"` - `status: "not_started" | "codegen" | "postgen" | "completed"` - `"not_started"` - `"codegen"` - `"postgen"` - `"completed"` - `build?: CheckStep` - `NotStarted` - `status: "not_started"` - `"not_started"` - `Queued` - `status: "queued"` - `"queued"` - `url: string | null` - `InProgress` - `status: "in_progress"` - `"in_progress"` - `url: string | null` - `Completed` - `completed: Completed` deprecated - `conclusion: "success" | "failure" | "skipped" | 4 more` - `"success"` - `"failure"` - `"skipped"` - `"cancelled"` - `"action_required"` - `"neutral"` - `"timed_out"` - `url: string | null` - `conclusion: "success" | "failure" | "skipped" | 4 more` - `"success"` - `"failure"` - `"skipped"` - `"cancelled"` - `"action_required"` - `"neutral"` - `"timed_out"` - `status: "completed"` - `"completed"` - `url: string | null` - `lint?: CheckStep` - `test?: CheckStep` ### Check Step - `CheckStep = NotStarted | Queued | InProgress | Completed` - `NotStarted` - `status: "not_started"` - `"not_started"` - `Queued` - `status: "queued"` - `"queued"` - `url: string | null` - `InProgress` - `status: "in_progress"` - `"in_progress"` - `url: string | null` - `Completed` - `completed: Completed` deprecated - `conclusion: "success" | "failure" | "skipped" | 4 more` - `"success"` - `"failure"` - `"skipped"` - `"cancelled"` - `"action_required"` - `"neutral"` - `"timed_out"` - `url: string | null` - `conclusion: "success" | "failure" | "skipped" | 4 more` - `"success"` - `"failure"` - `"skipped"` - `"cancelled"` - `"action_required"` - `"neutral"` - `"timed_out"` - `status: "completed"` - `"completed"` - `url: string | null` ### Build Compare Response - `BuildCompareResponse` - `base: Build` - `id: string` Build ID - `config_commit: string` - `created_at: string` - `documented_spec: UnionMember0 | UnionMember1 | null` - `UnionMember0` - `content: string` - `type: "content"` - `"content"` - `UnionMember1` - `expires: string` - `type: "url"` - `"url"` - `url: string` - `object: "build"` - `"build"` - `org: string` - `project: string` - `targets: Targets` - `cli?: BuildTarget` - `commit: NotStarted | Queued | InProgress | Completed` - `NotStarted` - `status: "not_started"` - `"not_started"` - `Queued` - `status: "queued"` - `"queued"` - `InProgress` - `status: "in_progress"` - `"in_progress"` - `Completed` - `commit: Commit | null` - `repo: Repo` - `branch: string` - `host: string` - `name: string` - `owner: string` - `sha: string` - `stats: Stats | null` - `additions: number` - `deletions: number` - `total: number` - `tree_oid: string | null` - `completed: Completed` deprecated - `commit: Commit | null` - `completed_at: string` - `conclusion: "error" | "warning" | "note" | 9 more` - `"error"` - `"warning"` - `"note"` - `"success"` - `"merge_conflict"` - `"upstream_merge_conflict"` - `"fatal"` - `"payment_required"` - `"cancelled"` - `"timed_out"` - `"noop"` - `"version_bump"` - `merge_conflict_pr: MergeConflictPr | null` - `number: number` - `repo: Repo` - `host: string` - `name: string` - `owner: string` - `completed_at: string` - `conclusion: "error" | "warning" | "note" | 9 more` - `"error"` - `"warning"` - `"note"` - `"success"` - `"merge_conflict"` - `"upstream_merge_conflict"` - `"fatal"` - `"payment_required"` - `"cancelled"` - `"timed_out"` - `"noop"` - `"version_bump"` - `merge_conflict_pr: MergeConflictPr | null` - `number: number` - `repo: Repo` - `host: string` - `name: string` - `owner: string` - `status: "completed"` - `"completed"` - `install_url: string | null` - `object: "build_target"` - `"build_target"` - `status: "not_started" | "codegen" | "postgen" | "completed"` - `"not_started"` - `"codegen"` - `"postgen"` - `"completed"` - `build?: CheckStep` - `NotStarted` - `status: "not_started"` - `"not_started"` - `Queued` - `status: "queued"` - `"queued"` - `url: string | null` - `InProgress` - `status: "in_progress"` - `"in_progress"` - `url: string | null` - `Completed` - `completed: Completed` deprecated - `conclusion: "success" | "failure" | "skipped" | 4 more` - `"success"` - `"failure"` - `"skipped"` - `"cancelled"` - `"action_required"` - `"neutral"` - `"timed_out"` - `url: string | null` - `conclusion: "success" | "failure" | "skipped" | 4 more` - `"success"` - `"failure"` - `"skipped"` - `"cancelled"` - `"action_required"` - `"neutral"` - `"timed_out"` - `status: "completed"` - `"completed"` - `url: string | null` - `lint?: CheckStep` - `test?: CheckStep` - `csharp?: BuildTarget` - `go?: BuildTarget` - `java?: BuildTarget` - `kotlin?: BuildTarget` - `node?: BuildTarget` - `openapi?: BuildTarget` - `php?: BuildTarget` - `python?: BuildTarget` - `ruby?: BuildTarget` - `sql?: BuildTarget` - `terraform?: BuildTarget` - `typescript?: BuildTarget` - `updated_at: string` - `head: Build` # Diagnostics ## Get diagnostics for a build `client.builds.diagnostics.list(stringbuildID, DiagnosticListParamsquery?, RequestOptionsoptions?): Page` **get** `/v0/builds/{buildId}/diagnostics` Get the list of diagnostics for a given build. If no language targets are specified, diagnostics for all languages are returned. ### Parameters - `buildID: string` Build ID - `query: DiagnosticListParams` - `cursor?: string` Pagination cursor from a previous response - `limit?: number` Maximum number of diagnostics to return, defaults to 100 (maximum: 100) - `severity?: "fatal" | "error" | "warning" | "note"` Includes the given severity and above (fatal > error > warning > note). - `"fatal"` - `"error"` - `"warning"` - `"note"` - `targets?: string` Optional comma-delimited list of language targets to filter diagnostics by ### Returns - `BuildDiagnostic` - `code: string` The kind of diagnostic. - `ignored: boolean` Whether the diagnostic is ignored in the Stainless config. - `level: "fatal" | "error" | "warning" | "note"` The severity of the diagnostic. - `"fatal"` - `"error"` - `"warning"` - `"note"` - `message: string` A description of the diagnostic. - `more: BuildDiagnosticMore | null` - `Markdown` - `markdown: string` - `type: "markdown"` - `"markdown"` - `Raw` - `raw: string` - `type: "raw"` - `"raw"` - `config_ref?: string` A JSON pointer to a relevant field in the Stainless config. - `oas_ref?: string` A JSON pointer to a relevant field in the OpenAPI spec. ### Example ```typescript import Stainless from '@stainless-api/sdk'; const client = new Stainless({ apiKey: process.env['STAINLESS_API_KEY'], // This is the default and can be omitted }); // Automatically fetches more pages as needed. for await (const buildDiagnostic of client.builds.diagnostics.list('buildId')) { console.log(buildDiagnostic.code); } ``` #### Response ```json { "data": [ { "code": "code", "ignored": true, "level": "fatal", "message": "message", "more": { "markdown": "markdown", "type": "markdown" }, "config_ref": "config_ref", "oas_ref": "oas_ref" } ], "has_more": true, "next_cursor": "next_cursor" } ``` ## Domain Types ### Build Diagnostic - `BuildDiagnostic` - `code: string` The kind of diagnostic. - `ignored: boolean` Whether the diagnostic is ignored in the Stainless config. - `level: "fatal" | "error" | "warning" | "note"` The severity of the diagnostic. - `"fatal"` - `"error"` - `"warning"` - `"note"` - `message: string` A description of the diagnostic. - `more: BuildDiagnosticMore | null` - `Markdown` - `markdown: string` - `type: "markdown"` - `"markdown"` - `Raw` - `raw: string` - `type: "raw"` - `"raw"` - `config_ref?: string` A JSON pointer to a relevant field in the Stainless config. - `oas_ref?: string` A JSON pointer to a relevant field in the OpenAPI spec. ### Build Diagnostic More - `BuildDiagnosticMore = Markdown | Raw` - `Markdown` - `markdown: string` - `type: "markdown"` - `"markdown"` - `Raw` - `raw: string` - `type: "raw"` - `"raw"` # Target Outputs ## Download build target output `client.builds.targetOutputs.retrieve(TargetOutputRetrieveParamsquery, RequestOptionsoptions?): TargetOutputRetrieveResponse` **get** `/v0/build_target_outputs` Retrieve a method to download an output for a given build target. If the requested type of output is `source`, and the requested output method is `url`, a download link to a tarball of the source files is returned. If the requested output method is `git`, a Git remote, ref, and access token (if necessary) is returned. Otherwise, the possible types of outputs are specific to the requested target, and the output method _must_ be `url`. See the documentation for `type` for more information. ### Parameters - `query: TargetOutputRetrieveParams` - `build_id: string` Build ID - `target: "node" | "typescript" | "python" | 10 more` SDK language target name - `"node"` - `"typescript"` - `"python"` - `"go"` - `"java"` - `"kotlin"` - `"ruby"` - `"terraform"` - `"cli"` - `"php"` - `"csharp"` - `"sql"` - `"openapi"` - `type: "source" | "dist" | "wheel" | 4 more` - `"source"` - `"dist"` - `"wheel"` - `"openapi-with-transforms"` - `"openapi-with-code-samples"` - `"openapi-sdk-spec"` - `"file"` - `output?: "url" | "git"` Output format: url (download URL) or git (temporary access token). - `"url"` - `"git"` - `path_?: string` The path of the file to get when used with "type": "file". ### Returns - `TargetOutputRetrieveResponse = URL | Git` - `URL` - `output: "url"` - `"url"` - `target: Target` - `"node"` - `"typescript"` - `"python"` - `"go"` - `"java"` - `"kotlin"` - `"ruby"` - `"terraform"` - `"cli"` - `"php"` - `"csharp"` - `"sql"` - `"openapi"` - `type: "source" | "dist" | "wheel" | 4 more` - `"source"` - `"dist"` - `"wheel"` - `"openapi-with-transforms"` - `"openapi-with-code-samples"` - `"openapi-sdk-spec"` - `"file"` - `url: string` URL for direct download - `path?: string` The path of the file, which is only present when using with the type "file" option. - `Git` - `token: string` Temporary GitHub access token - `output: "git"` - `"git"` - `ref: string` Git reference (commit SHA, branch, or tag) - `target: Target` - `type: "source" | "dist" | "wheel" | 4 more` - `"source"` - `"dist"` - `"wheel"` - `"openapi-with-transforms"` - `"openapi-with-code-samples"` - `"openapi-sdk-spec"` - `"file"` - `url: string` URL to git remote ### Example ```typescript import Stainless from '@stainless-api/sdk'; const client = new Stainless({ apiKey: process.env['STAINLESS_API_KEY'], // This is the default and can be omitted }); const targetOutput = await client.builds.targetOutputs.retrieve({ build_id: 'build_id', target: 'node', type: 'source', }); console.log(targetOutput); ``` #### Response ```json { "output": "url", "target": "node", "type": "source", "url": "url", "path": "path" } ``` ## Domain Types ### Target Output Retrieve Response - `TargetOutputRetrieveResponse = URL | Git` - `URL` - `output: "url"` - `"url"` - `target: Target` - `"node"` - `"typescript"` - `"python"` - `"go"` - `"java"` - `"kotlin"` - `"ruby"` - `"terraform"` - `"cli"` - `"php"` - `"csharp"` - `"sql"` - `"openapi"` - `type: "source" | "dist" | "wheel" | 4 more` - `"source"` - `"dist"` - `"wheel"` - `"openapi-with-transforms"` - `"openapi-with-code-samples"` - `"openapi-sdk-spec"` - `"file"` - `url: string` URL for direct download - `path?: string` The path of the file, which is only present when using with the type "file" option. - `Git` - `token: string` Temporary GitHub access token - `output: "git"` - `"git"` - `ref: string` Git reference (commit SHA, branch, or tag) - `target: Target` - `type: "source" | "dist" | "wheel" | 4 more` - `"source"` - `"dist"` - `"wheel"` - `"openapi-with-transforms"` - `"openapi-with-code-samples"` - `"openapi-sdk-spec"` - `"file"` - `url: string` URL to git remote