Skip to content

Commit a6f23cb

Browse files
chore: generate
1 parent 0540751 commit a6f23cb

3 files changed

Lines changed: 97 additions & 97 deletions

File tree

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

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -2845,6 +2845,38 @@ export class File extends HeyApiClient {
28452845
}
28462846
}
28472847

2848+
export class Event extends HeyApiClient {
2849+
/**
2850+
* Subscribe to events
2851+
*
2852+
* Get events
2853+
*/
2854+
public subscribe<ThrowOnError extends boolean = false>(
2855+
parameters?: {
2856+
directory?: string
2857+
workspace?: string
2858+
},
2859+
options?: Options<never, ThrowOnError>,
2860+
) {
2861+
const params = buildClientParams(
2862+
[parameters],
2863+
[
2864+
{
2865+
args: [
2866+
{ in: "query", key: "directory" },
2867+
{ in: "query", key: "workspace" },
2868+
],
2869+
},
2870+
],
2871+
)
2872+
return (options?.client ?? this.client).sse.get<EventSubscribeResponses, unknown, ThrowOnError>({
2873+
url: "/event",
2874+
...options,
2875+
...params,
2876+
})
2877+
}
2878+
}
2879+
28482880
export class Auth2 extends HeyApiClient {
28492881
/**
28502882
* Remove MCP OAuth
@@ -3866,38 +3898,6 @@ export class Formatter extends HeyApiClient {
38663898
}
38673899
}
38683900

3869-
export class Event extends HeyApiClient {
3870-
/**
3871-
* Subscribe to events
3872-
*
3873-
* Get events
3874-
*/
3875-
public subscribe<ThrowOnError extends boolean = false>(
3876-
parameters?: {
3877-
directory?: string
3878-
workspace?: string
3879-
},
3880-
options?: Options<never, ThrowOnError>,
3881-
) {
3882-
const params = buildClientParams(
3883-
[parameters],
3884-
[
3885-
{
3886-
args: [
3887-
{ in: "query", key: "directory" },
3888-
{ in: "query", key: "workspace" },
3889-
],
3890-
},
3891-
],
3892-
)
3893-
return (options?.client ?? this.client).sse.get<EventSubscribeResponses, unknown, ThrowOnError>({
3894-
url: "/event",
3895-
...options,
3896-
...params,
3897-
})
3898-
}
3899-
}
3900-
39013901
export class OpencodeClient extends HeyApiClient {
39023902
public static readonly __registry = new HeyApiRegistry<OpencodeClient>()
39033903

@@ -3981,6 +3981,11 @@ export class OpencodeClient extends HeyApiClient {
39813981
return (this._file ??= new File({ client: this.client }))
39823982
}
39833983

3984+
private _event?: Event
3985+
get event(): Event {
3986+
return (this._event ??= new Event({ client: this.client }))
3987+
}
3988+
39843989
private _mcp?: Mcp
39853990
get mcp(): Mcp {
39863991
return (this._mcp ??= new Mcp({ client: this.client }))
@@ -4025,9 +4030,4 @@ export class OpencodeClient extends HeyApiClient {
40254030
get formatter(): Formatter {
40264031
return (this._formatter ??= new Formatter({ client: this.client }))
40274032
}
4028-
4029-
private _event?: Event
4030-
get event(): Event {
4031-
return (this._event ??= new Event({ client: this.client }))
4032-
}
40334033
}

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

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4229,6 +4229,25 @@ export type FileStatusResponses = {
42294229

42304230
export type FileStatusResponse = FileStatusResponses[keyof FileStatusResponses]
42314231

4232+
export type EventSubscribeData = {
4233+
body?: never
4234+
path?: never
4235+
query?: {
4236+
directory?: string
4237+
workspace?: string
4238+
}
4239+
url: "/event"
4240+
}
4241+
4242+
export type EventSubscribeResponses = {
4243+
/**
4244+
* Event stream
4245+
*/
4246+
200: Event
4247+
}
4248+
4249+
export type EventSubscribeResponse = EventSubscribeResponses[keyof EventSubscribeResponses]
4250+
42324251
export type McpStatusData = {
42334252
body?: never
42344253
path?: never
@@ -4979,22 +4998,3 @@ export type FormatterStatusResponses = {
49794998
}
49804999

49815000
export type FormatterStatusResponse = FormatterStatusResponses[keyof FormatterStatusResponses]
4982-
4983-
export type EventSubscribeData = {
4984-
body?: never
4985-
path?: never
4986-
query?: {
4987-
directory?: string
4988-
workspace?: string
4989-
}
4990-
url: "/event"
4991-
}
4992-
4993-
export type EventSubscribeResponses = {
4994-
/**
4995-
* Event stream
4996-
*/
4997-
200: Event
4998-
}
4999-
5000-
export type EventSubscribeResponse = EventSubscribeResponses[keyof EventSubscribeResponses]

packages/sdk/openapi.json

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -5243,6 +5243,47 @@
52435243
]
52445244
}
52455245
},
5246+
"/event": {
5247+
"get": {
5248+
"operationId": "event.subscribe",
5249+
"parameters": [
5250+
{
5251+
"in": "query",
5252+
"name": "directory",
5253+
"schema": {
5254+
"type": "string"
5255+
}
5256+
},
5257+
{
5258+
"in": "query",
5259+
"name": "workspace",
5260+
"schema": {
5261+
"type": "string"
5262+
}
5263+
}
5264+
],
5265+
"summary": "Subscribe to events",
5266+
"description": "Get events",
5267+
"responses": {
5268+
"200": {
5269+
"description": "Event stream",
5270+
"content": {
5271+
"text/event-stream": {
5272+
"schema": {
5273+
"$ref": "#/components/schemas/Event"
5274+
}
5275+
}
5276+
}
5277+
}
5278+
},
5279+
"x-codeSamples": [
5280+
{
5281+
"lang": "js",
5282+
"source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
5283+
}
5284+
]
5285+
}
5286+
},
52465287
"/mcp": {
52475288
"get": {
52485289
"operationId": "mcp.status",
@@ -6894,47 +6935,6 @@
68946935
}
68956936
]
68966937
}
6897-
},
6898-
"/event": {
6899-
"get": {
6900-
"operationId": "event.subscribe",
6901-
"parameters": [
6902-
{
6903-
"in": "query",
6904-
"name": "directory",
6905-
"schema": {
6906-
"type": "string"
6907-
}
6908-
},
6909-
{
6910-
"in": "query",
6911-
"name": "workspace",
6912-
"schema": {
6913-
"type": "string"
6914-
}
6915-
}
6916-
],
6917-
"summary": "Subscribe to events",
6918-
"description": "Get events",
6919-
"responses": {
6920-
"200": {
6921-
"description": "Event stream",
6922-
"content": {
6923-
"text/event-stream": {
6924-
"schema": {
6925-
"$ref": "#/components/schemas/Event"
6926-
}
6927-
}
6928-
}
6929-
}
6930-
},
6931-
"x-codeSamples": [
6932-
{
6933-
"lang": "js",
6934-
"source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
6935-
}
6936-
]
6937-
}
69386938
}
69396939
},
69406940
"components": {

0 commit comments

Comments
 (0)