Skip to content

Commit 85674f4

Browse files
chore: generate
1 parent f2525a6 commit 85674f4

3 files changed

Lines changed: 91 additions & 78 deletions

File tree

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,10 @@ import type {
105105
PtyRemoveResponses,
106106
PtyUpdateErrors,
107107
PtyUpdateResponses,
108-
QuestionAnswer,
109108
QuestionListResponses,
110109
QuestionRejectErrors,
111110
QuestionRejectResponses,
111+
QuestionReply,
112112
QuestionReplyErrors,
113113
QuestionReplyResponses,
114114
SessionAbortErrors,
@@ -2738,7 +2738,7 @@ export class Question extends HeyApiClient {
27382738
requestID: string
27392739
directory?: string
27402740
workspace?: string
2741-
answers?: Array<QuestionAnswer>
2741+
questionReply?: QuestionReply
27422742
},
27432743
options?: Options<never, ThrowOnError>,
27442744
) {
@@ -2750,7 +2750,7 @@ export class Question extends HeyApiClient {
27502750
{ in: "path", key: "requestID" },
27512751
{ in: "query", key: "directory" },
27522752
{ in: "query", key: "workspace" },
2753-
{ in: "body", key: "answers" },
2753+
{ key: "questionReply", map: "body" },
27542754
],
27552755
},
27562756
],

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

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -264,17 +264,19 @@ export type QuestionInfo = {
264264
custom?: boolean
265265
}
266266

267+
export type QuestionTool = {
268+
messageID: string
269+
callID: string
270+
}
271+
267272
export type QuestionRequest = {
268273
id: string
269274
sessionID: string
270275
/**
271276
* Questions to ask
272277
*/
273278
questions: Array<QuestionInfo>
274-
tool?: {
275-
messageID: string
276-
callID: string
277-
}
279+
tool?: QuestionTool
278280
}
279281

280282
export type EventQuestionAsked = {
@@ -284,21 +286,25 @@ export type EventQuestionAsked = {
284286

285287
export type QuestionAnswer = Array<string>
286288

289+
export type QuestionReplied = {
290+
sessionID: string
291+
requestID: string
292+
answers: Array<QuestionAnswer>
293+
}
294+
287295
export type EventQuestionReplied = {
288296
type: "question.replied"
289-
properties: {
290-
sessionID: string
291-
requestID: string
292-
answers: Array<QuestionAnswer>
293-
}
297+
properties: QuestionReplied
298+
}
299+
300+
export type QuestionRejected = {
301+
sessionID: string
302+
requestID: string
294303
}
295304

296305
export type EventQuestionRejected = {
297306
type: "question.rejected"
298-
properties: {
299-
sessionID: string
300-
requestID: string
301-
}
307+
properties: QuestionRejected
302308
}
303309

304310
export type Todo = {
@@ -1919,6 +1925,13 @@ export type SubtaskPartInput = {
19191925
command?: string
19201926
}
19211927

1928+
export type QuestionReply = {
1929+
/**
1930+
* User answers in order of questions (each answer is an array of selected labels)
1931+
*/
1932+
answers: Array<QuestionAnswer>
1933+
}
1934+
19221935
export type ProviderAuthMethod = {
19231936
type: "oauth" | "api"
19241937
label: string
@@ -4246,12 +4259,7 @@ export type QuestionListResponses = {
42464259
export type QuestionListResponse = QuestionListResponses[keyof QuestionListResponses]
42474260

42484261
export type QuestionReplyData = {
4249-
body?: {
4250-
/**
4251-
* User answers in order of questions (each answer is an array of selected labels)
4252-
*/
4253-
answers: Array<QuestionAnswer>
4254-
}
4262+
body?: QuestionReply
42554263
path: {
42564264
requestID: string
42574265
}

packages/sdk/openapi.json

Lines changed: 61 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -4769,17 +4769,7 @@
47694769
"content": {
47704770
"application/json": {
47714771
"schema": {
4772-
"type": "object",
4773-
"properties": {
4774-
"answers": {
4775-
"description": "User answers in order of questions (each answer is an array of selected labels)",
4776-
"type": "array",
4777-
"items": {
4778-
"$ref": "#/components/schemas/QuestionAnswer"
4779-
}
4780-
}
4781-
},
4782-
"required": ["answers"]
4772+
"$ref": "#/components/schemas/QuestionReply"
47834773
}
47844774
}
47854775
}
@@ -7859,16 +7849,26 @@
78597849
},
78607850
"required": ["question", "header", "options"]
78617851
},
7852+
"QuestionTool": {
7853+
"type": "object",
7854+
"properties": {
7855+
"messageID": {
7856+
"type": "string"
7857+
},
7858+
"callID": {
7859+
"type": "string"
7860+
}
7861+
},
7862+
"required": ["messageID", "callID"]
7863+
},
78627864
"QuestionRequest": {
78637865
"type": "object",
78647866
"properties": {
78657867
"id": {
7866-
"type": "string",
7867-
"pattern": "^que.*"
7868+
"type": "string"
78687869
},
78697870
"sessionID": {
7870-
"type": "string",
7871-
"pattern": "^ses.*"
7871+
"type": "string"
78727872
},
78737873
"questions": {
78747874
"description": "Questions to ask",
@@ -7878,17 +7878,7 @@
78787878
}
78797879
},
78807880
"tool": {
7881-
"type": "object",
7882-
"properties": {
7883-
"messageID": {
7884-
"type": "string",
7885-
"pattern": "^msg.*"
7886-
},
7887-
"callID": {
7888-
"type": "string"
7889-
}
7890-
},
7891-
"required": ["messageID", "callID"]
7881+
"$ref": "#/components/schemas/QuestionTool"
78927882
}
78937883
},
78947884
"required": ["id", "sessionID", "questions"]
@@ -7912,6 +7902,24 @@
79127902
"type": "string"
79137903
}
79147904
},
7905+
"QuestionReplied": {
7906+
"type": "object",
7907+
"properties": {
7908+
"sessionID": {
7909+
"type": "string"
7910+
},
7911+
"requestID": {
7912+
"type": "string"
7913+
},
7914+
"answers": {
7915+
"type": "array",
7916+
"items": {
7917+
"$ref": "#/components/schemas/QuestionAnswer"
7918+
}
7919+
}
7920+
},
7921+
"required": ["sessionID", "requestID", "answers"]
7922+
},
79157923
"Event.question.replied": {
79167924
"type": "object",
79177925
"properties": {
@@ -7920,28 +7928,23 @@
79207928
"const": "question.replied"
79217929
},
79227930
"properties": {
7923-
"type": "object",
7924-
"properties": {
7925-
"sessionID": {
7926-
"type": "string",
7927-
"pattern": "^ses.*"
7928-
},
7929-
"requestID": {
7930-
"type": "string",
7931-
"pattern": "^que.*"
7932-
},
7933-
"answers": {
7934-
"type": "array",
7935-
"items": {
7936-
"$ref": "#/components/schemas/QuestionAnswer"
7937-
}
7938-
}
7939-
},
7940-
"required": ["sessionID", "requestID", "answers"]
7931+
"$ref": "#/components/schemas/QuestionReplied"
79417932
}
79427933
},
79437934
"required": ["type", "properties"]
79447935
},
7936+
"QuestionRejected": {
7937+
"type": "object",
7938+
"properties": {
7939+
"sessionID": {
7940+
"type": "string"
7941+
},
7942+
"requestID": {
7943+
"type": "string"
7944+
}
7945+
},
7946+
"required": ["sessionID", "requestID"]
7947+
},
79457948
"Event.question.rejected": {
79467949
"type": "object",
79477950
"properties": {
@@ -7950,18 +7953,7 @@
79507953
"const": "question.rejected"
79517954
},
79527955
"properties": {
7953-
"type": "object",
7954-
"properties": {
7955-
"sessionID": {
7956-
"type": "string",
7957-
"pattern": "^ses.*"
7958-
},
7959-
"requestID": {
7960-
"type": "string",
7961-
"pattern": "^que.*"
7962-
}
7963-
},
7964-
"required": ["sessionID", "requestID"]
7956+
"$ref": "#/components/schemas/QuestionRejected"
79657957
}
79667958
},
79677959
"required": ["type", "properties"]
@@ -12369,6 +12361,19 @@
1236912361
},
1237012362
"required": ["type", "prompt", "description", "agent"]
1237112363
},
12364+
"QuestionReply": {
12365+
"type": "object",
12366+
"properties": {
12367+
"answers": {
12368+
"description": "User answers in order of questions (each answer is an array of selected labels)",
12369+
"type": "array",
12370+
"items": {
12371+
"$ref": "#/components/schemas/QuestionAnswer"
12372+
}
12373+
}
12374+
},
12375+
"required": ["answers"]
12376+
},
1237212377
"ProviderAuthMethod": {
1237312378
"type": "object",
1237412379
"properties": {

0 commit comments

Comments
 (0)