Skip to content

Commit 6e7c9eb

Browse files
chore: generate
1 parent 8555de8 commit 6e7c9eb

4 files changed

Lines changed: 74 additions & 54 deletions

File tree

packages/opencode/src/cli/cmd/session.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ export const SessionDeleteCommand = effectCmd({
6060
handler: Effect.fn("Cli.session.delete")(function* (args) {
6161
const svc = yield* Session.Service
6262
const sessionID = SessionID.make(args.sessionID)
63-
yield* svc.remove(sessionID).pipe(
64-
Effect.catchIf(NotFoundError.isInstance, () => fail(`Session not found: ${args.sessionID}`)),
65-
)
63+
yield* svc
64+
.remove(sessionID)
65+
.pipe(Effect.catchIf(NotFoundError.isInstance, () => fail(`Session not found: ${args.sessionID}`)))
6666
UI.println(UI.Style.TEXT_SUCCESS_BOLD + `Session ${args.sessionID} deleted` + UI.Style.TEXT_NORMAL)
6767
}),
6868
})

packages/sdk/js/src/v2/gen/sdk.gen.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ import type {
131131
SessionDeleteResponses,
132132
SessionDelivery,
133133
SessionDiffResponses,
134+
SessionForkErrors,
134135
SessionForkResponses,
135136
SessionGetErrors,
136137
SessionGetResponses,
@@ -3320,7 +3321,7 @@ export class Session2 extends HeyApiClient {
33203321
},
33213322
],
33223323
)
3323-
return (options?.client ?? this.client).post<SessionForkResponses, unknown, ThrowOnError>({
3324+
return (options?.client ?? this.client).post<SessionForkResponses, SessionForkErrors, ThrowOnError>({
33243325
url: "/session/{sessionID}/fork",
33253326
...options,
33263327
...params,

packages/sdk/js/src/v2/gen/types.gen.ts

Lines changed: 28 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1561,6 +1561,13 @@ export type McpUnsupportedOAuthError = {
15611561
error: string
15621562
}
15631563

1564+
export type NotFoundError = {
1565+
name: "NotFoundError"
1566+
data: {
1567+
message: string
1568+
}
1569+
}
1570+
15641571
export type EffectHttpApiErrorForbidden = {
15651572
_tag: "Forbidden"
15661573
}
@@ -3224,13 +3231,6 @@ export type BadRequestError = {
32243231
success: false
32253232
}
32263233

3227-
export type NotFoundError = {
3228-
name: "NotFoundError"
3229-
data: {
3230-
message: string
3231-
}
3232-
}
3233-
32343234
export type AuthRemoveData = {
32353235
body?: never
32363236
path: {
@@ -4571,7 +4571,7 @@ export type PtyRemoveData = {
45714571

45724572
export type PtyRemoveErrors = {
45734573
/**
4574-
* Not found
4574+
* NotFoundError
45754575
*/
45764576
404: NotFoundError
45774577
}
@@ -4601,7 +4601,7 @@ export type PtyGetData = {
46014601

46024602
export type PtyGetErrors = {
46034603
/**
4604-
* Not found
4604+
* NotFoundError
46054605
*/
46064606
404: NotFoundError
46074607
}
@@ -4671,7 +4671,7 @@ export type PtyConnectTokenErrors = {
46714671
*/
46724672
403: EffectHttpApiErrorForbidden
46734673
/**
4674-
* Not found
4674+
* NotFoundError
46754675
*/
46764676
404: NotFoundError
46774677
}
@@ -5070,7 +5070,7 @@ export type SessionDeleteErrors = {
50705070
*/
50715071
400: BadRequestError
50725072
/**
5073-
* Not found
5073+
* NotFoundError
50745074
*/
50755075
404: NotFoundError
50765076
}
@@ -5104,7 +5104,7 @@ export type SessionGetErrors = {
51045104
*/
51055105
400: BadRequestError
51065106
/**
5107-
* Not found
5107+
* NotFoundError
51085108
*/
51095109
404: NotFoundError
51105110
}
@@ -5144,7 +5144,7 @@ export type SessionUpdateErrors = {
51445144
*/
51455145
400: BadRequestError
51465146
/**
5147-
* Not found
5147+
* NotFoundError
51485148
*/
51495149
404: NotFoundError
51505150
}
@@ -5270,7 +5270,7 @@ export type SessionMessagesErrors = {
52705270
*/
52715271
400: BadRequestError
52725272
/**
5273-
* Not found
5273+
* NotFoundError
52745274
*/
52755275
404: NotFoundError
52765276
}
@@ -5395,7 +5395,7 @@ export type SessionMessageErrors = {
53955395
*/
53965396
400: BadRequestError
53975397
/**
5398-
* Not found
5398+
* NotFoundError
53995399
*/
54005400
404: NotFoundError
54015401
}
@@ -5428,6 +5428,15 @@ export type SessionForkData = {
54285428
url: "/session/{sessionID}/fork"
54295429
}
54305430

5431+
export type SessionForkErrors = {
5432+
/**
5433+
* NotFoundError
5434+
*/
5435+
404: NotFoundError
5436+
}
5437+
5438+
export type SessionForkError = SessionForkErrors[keyof SessionForkErrors]
5439+
54315440
export type SessionForkResponses = {
54325441
/**
54335442
* 200
@@ -5527,7 +5536,7 @@ export type SessionUnshareErrors = {
55275536
*/
55285537
400: BadRequestError
55295538
/**
5530-
* Not found
5539+
* NotFoundError
55315540
*/
55325541
404: NotFoundError
55335542
}
@@ -5561,7 +5570,7 @@ export type SessionShareErrors = {
55615570
*/
55625571
400: BadRequestError
55635572
/**
5564-
* Not found
5573+
* NotFoundError
55655574
*/
55665575
404: NotFoundError
55675576
}
@@ -5599,7 +5608,7 @@ export type SessionSummarizeErrors = {
55995608
*/
56005609
400: BadRequestError
56015610
/**
5602-
* Not found
5611+
* NotFoundError
56035612
*/
56045613
404: NotFoundError
56055614
}
@@ -6463,7 +6472,7 @@ export type TuiSelectSessionErrors = {
64636472
*/
64646473
400: BadRequestError
64656474
/**
6466-
* Not found
6475+
* NotFoundError
64676476
*/
64686477
404: NotFoundError
64696478
}

packages/sdk/openapi.json

Lines changed: 41 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3241,7 +3241,7 @@
32413241
}
32423242
},
32433243
"404": {
3244-
"description": "Not found",
3244+
"description": "NotFoundError",
32453245
"content": {
32463246
"application/json": {
32473247
"schema": {
@@ -3394,7 +3394,7 @@
33943394
}
33953395
},
33963396
"404": {
3397-
"description": "Not found",
3397+
"description": "NotFoundError",
33983398
"content": {
33993399
"application/json": {
34003400
"schema": {
@@ -3479,7 +3479,7 @@
34793479
}
34803480
},
34813481
"404": {
3482-
"description": "Not found",
3482+
"description": "NotFoundError",
34833483
"content": {
34843484
"application/json": {
34853485
"schema": {
@@ -4454,7 +4454,7 @@
44544454
}
44554455
},
44564456
"404": {
4457-
"description": "Not found",
4457+
"description": "NotFoundError",
44584458
"content": {
44594459
"application/json": {
44604460
"schema": {
@@ -4526,7 +4526,7 @@
45264526
}
45274527
},
45284528
"404": {
4529-
"description": "Not found",
4529+
"description": "NotFoundError",
45304530
"content": {
45314531
"application/json": {
45324532
"schema": {
@@ -4597,7 +4597,7 @@
45974597
}
45984598
},
45994599
"404": {
4600-
"description": "Not found",
4600+
"description": "NotFoundError",
46014601
"content": {
46024602
"application/json": {
46034603
"schema": {
@@ -4952,7 +4952,7 @@
49524952
}
49534953
},
49544954
"404": {
4955-
"description": "Not found",
4955+
"description": "NotFoundError",
49564956
"content": {
49574957
"application/json": {
49584958
"schema": {
@@ -5200,7 +5200,7 @@
52005200
}
52015201
},
52025202
"404": {
5203-
"description": "Not found",
5203+
"description": "NotFoundError",
52045204
"content": {
52055205
"application/json": {
52065206
"schema": {
@@ -5342,6 +5342,16 @@
53425342
}
53435343
}
53445344
}
5345+
},
5346+
"404": {
5347+
"description": "NotFoundError",
5348+
"content": {
5349+
"application/json": {
5350+
"schema": {
5351+
"$ref": "#/components/schemas/NotFoundError"
5352+
}
5353+
}
5354+
}
53455355
}
53465356
},
53475357
"description": "Create a new session by forking an existing session at a specific message point.",
@@ -5592,7 +5602,7 @@
55925602
}
55935603
},
55945604
"404": {
5595-
"description": "Not found",
5605+
"description": "NotFoundError",
55965606
"content": {
55975607
"application/json": {
55985608
"schema": {
@@ -5663,7 +5673,7 @@
56635673
}
56645674
},
56655675
"404": {
5666-
"description": "Not found",
5676+
"description": "NotFoundError",
56675677
"content": {
56685678
"application/json": {
56695679
"schema": {
@@ -5737,7 +5747,7 @@
57375747
}
57385748
},
57395749
"404": {
5740-
"description": "Not found",
5750+
"description": "NotFoundError",
57415751
"content": {
57425752
"application/json": {
57435753
"schema": {
@@ -7897,7 +7907,7 @@
78977907
}
78987908
},
78997909
"404": {
7900-
"description": "Not found",
7910+
"description": "NotFoundError",
79017911
"content": {
79027912
"application/json": {
79037913
"schema": {
@@ -12904,6 +12914,25 @@
1290412914
"required": ["error"],
1290512915
"additionalProperties": false
1290612916
},
12917+
"NotFoundError": {
12918+
"type": "object",
12919+
"required": ["name", "data"],
12920+
"properties": {
12921+
"name": {
12922+
"type": "string",
12923+
"enum": ["NotFoundError"]
12924+
},
12925+
"data": {
12926+
"type": "object",
12927+
"required": ["message"],
12928+
"properties": {
12929+
"message": {
12930+
"type": "string"
12931+
}
12932+
}
12933+
}
12934+
}
12935+
},
1290712936
"effect_HttpApiError_Forbidden": {
1290812937
"type": "object",
1290912938
"properties": {
@@ -18026,25 +18055,6 @@
1802618055
"enum": [false]
1802718056
}
1802818057
}
18029-
},
18030-
"NotFoundError": {
18031-
"type": "object",
18032-
"required": ["name", "data"],
18033-
"properties": {
18034-
"name": {
18035-
"type": "string",
18036-
"enum": ["NotFoundError"]
18037-
},
18038-
"data": {
18039-
"type": "object",
18040-
"required": ["message"],
18041-
"properties": {
18042-
"message": {
18043-
"type": "string"
18044-
}
18045-
}
18046-
}
18047-
}
1804818058
}
1804918059
}
1805018060
},

0 commit comments

Comments
 (0)