fix workspace warp sdk null id

This commit is contained in:
LukeParkerDev 2026-05-05 11:51:49 +10:00
parent 2740d398fa
commit 047fdd65f2
3 changed files with 6 additions and 2 deletions

View file

@ -146,6 +146,10 @@ function matchLegacyOpenApi(input: Record<string, unknown>) {
if (properties?.branch) properties.branch = { anyOf: [properties.branch, { type: "null" }] }
if (properties?.extra) properties.extra = { anyOf: [properties.extra, { type: "null" }] }
}
if (path === "/experimental/workspace/warp" && method === "post") {
const properties = operation.requestBody.content?.["application/json"]?.schema?.properties
if (properties?.id) properties.id = nullable(properties.id)
}
}
for (const response of Object.values(operation.responses ?? {})) {
for (const content of Object.values(response.content ?? {})) {

View file

@ -1019,7 +1019,7 @@ export class Workspace extends HeyApiClient {
parameters?: {
directory?: string
workspace?: string
id?: string
id?: string | null
sessionID?: string
},
options?: Options<never, ThrowOnError>,

View file

@ -6665,7 +6665,7 @@ export type ExperimentalWorkspaceRemoveResponse =
export type ExperimentalWorkspaceWarpData = {
body?: {
id: string
id: string | null
sessionID: string
}
path?: never