@@ -465,9 +465,16 @@ const QueryLinesSchema = Schema.Struct({
465465 lines : Schema . optional ( Schema . String )
466466} )
467467
468+ const ApiErrorEnvelopeSchema = Schema . Struct ( {
469+ command : Schema . optional ( Schema . String ) ,
470+ details : Schema . optional ( Schema . Unknown ) ,
471+ message : Schema . String ,
472+ provider : Schema . optional ( Schema . String ) ,
473+ type : Schema . String
474+ } )
475+
468476const ApiErrorResponseSchema = Schema . Struct ( {
469- error : Schema . String ,
470- message : Schema . String
477+ error : ApiErrorEnvelopeSchema
471478} )
472479
473480const endpoint = {
@@ -486,7 +493,7 @@ const ProjectsGroup = HttpApiGroup.make("projects")
486493 . add (
487494 endpoint . post ( "createProject" , "/projects" )
488495 . setPayload ( CreateProjectRequestSchema )
489- . addSuccess ( ProjectResponseSchema )
496+ . addSuccess ( ProjectResponseSchema , { status : 201 } )
490497 . addSuccess ( CreateProjectAcceptedResponseSchema , { status : 202 } )
491498 )
492499 . add (
@@ -518,7 +525,7 @@ const ProjectPortsGroup = HttpApiGroup.make("projectPorts")
518525 . add (
519526 endpoint . post ( "createProjectPort" ) `/projects/${ ProjectIdParam } /ports`
520527 . setPayload ( ProjectPortForwardRequestSchema )
521- . addSuccess ( ProjectPortForwardResponseSchema )
528+ . addSuccess ( ProjectPortForwardResponseSchema , { status : 201 } )
522529 )
523530 . add (
524531 endpoint . del ( "deleteProjectPort" ) `/projects/${ ProjectIdParam } /ports/${ TargetPortParam } `
@@ -540,15 +547,15 @@ const ProjectDatabasesGroup = HttpApiGroup.make("projectDatabases")
540547 . add (
541548 endpoint . post ( "saveDatabaseProfile" ) `/projects/${ ProjectIdParam } /databases/profiles`
542549 . setPayload ( ProjectDatabaseProfileRequestSchema )
543- . addSuccess ( ProjectDatabaseProfileResponseSchema )
550+ . addSuccess ( ProjectDatabaseProfileResponseSchema , { status : 201 } )
544551 )
545552 . add (
546553 endpoint . del ( "deleteDatabaseProfile" ) `/projects/${ ProjectIdParam } /databases/profiles/${ ProfileIdParam } `
547554 . addSuccess ( EmptyResponseSchema )
548555 )
549556 . add (
550557 endpoint . post ( "exposeDatabaseProfile" ) `/projects/${ ProjectIdParam } /databases/profiles/${ ProfileIdParam } /expose`
551- . addSuccess ( ProjectDatabaseForwardResponseSchema )
558+ . addSuccess ( ProjectDatabaseForwardResponseSchema , { status : 201 } )
552559 )
553560 . add (
554561 endpoint . del ( "deleteDatabaseForward" ) `/projects/${ ProjectIdParam } /databases/profiles/${ ProfileIdParam } /expose`
@@ -624,7 +631,7 @@ const AuthGroup = HttpApiGroup.make("auth")
624631 . add (
625632 endpoint . post ( "authTerminalSession" , "/auth/terminal-sessions" )
626633 . setPayload ( AuthTerminalSessionRequestSchema )
627- . addSuccess ( AuthTerminalSessionResponseSchema )
634+ . addSuccess ( AuthTerminalSessionResponseSchema , { status : 201 } )
628635 )
629636 . add (
630637 endpoint . post ( "codexImport" , "/auth/codex/import" )
@@ -653,7 +660,7 @@ const ProjectAuthGroup = HttpApiGroup.make("projectAuth")
653660const TerminalGroup = HttpApiGroup . make ( "terminal" )
654661 . add (
655662 endpoint . post ( "createTerminalByKey" ) `/projects/by-key/${ ProjectKeyParam } /terminal-sessions`
656- . addSuccess ( TerminalSessionResponseSchema )
663+ . addSuccess ( TerminalSessionResponseSchema , { status : 201 } )
657664 )
658665 . add (
659666 endpoint . post ( "startTerminalByKey" ) `/projects/by-key/${ ProjectKeyParam } /terminal-sessions/start`
0 commit comments