Skip to content

Commit 5b89d3b

Browse files
fix(api): align types of input items / output items for typescript
1 parent 470f91f commit 5b89d3b

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 123
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-ca24bc4d8125b5153514ce643c4e3220f25971b7d67ca384d56d493c72c0d977.yml
3-
openapi_spec_hash: c6f048c7b3d29f4de48fde0e845ba33f
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-a7e92d12ebe89ca019a7ac5b29759064eefa2c38fe08d03516f2620e66abb32b.yml
3+
openapi_spec_hash: acbc703b2739447abc6312b2d753631c
44
config_hash: b876221dfb213df9f0a999e75d38a65e

responses/response.go

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1326,6 +1326,9 @@ type ResponseApplyPatchToolCall struct {
13261326
ID string `json:"id,required"`
13271327
// The unique ID of the apply patch tool call generated by the model.
13281328
CallID string `json:"call_id,required"`
1329+
// One of the create_file, delete_file, or update_file operations applied via
1330+
// apply_patch.
1331+
Operation ResponseApplyPatchToolCallOperationUnion `json:"operation,required"`
13291332
// The status of the apply patch tool call. One of `in_progress` or `completed`.
13301333
//
13311334
// Any of "in_progress", "completed".
@@ -1334,17 +1337,14 @@ type ResponseApplyPatchToolCall struct {
13341337
Type constant.ApplyPatchCall `json:"type,required"`
13351338
// The ID of the entity that created this tool call.
13361339
CreatedBy string `json:"created_by"`
1337-
// One of the create_file, delete_file, or update_file operations applied via
1338-
// apply_patch.
1339-
Operation ResponseApplyPatchToolCallOperationUnion `json:"operation"`
13401340
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
13411341
JSON struct {
13421342
ID respjson.Field
13431343
CallID respjson.Field
1344+
Operation respjson.Field
13441345
Status respjson.Field
13451346
Type respjson.Field
13461347
CreatedBy respjson.Field
1347-
Operation respjson.Field
13481348
ExtraFields map[string]respjson.Field
13491349
raw string
13501350
} `json:"-"`
@@ -1358,14 +1358,6 @@ func (r *ResponseApplyPatchToolCall) UnmarshalJSON(data []byte) error {
13581358

13591359
func (ResponseApplyPatchToolCall) ImplConversationItemUnion() {}
13601360

1361-
// The status of the apply patch tool call. One of `in_progress` or `completed`.
1362-
type ResponseApplyPatchToolCallStatus string
1363-
1364-
const (
1365-
ResponseApplyPatchToolCallStatusInProgress ResponseApplyPatchToolCallStatus = "in_progress"
1366-
ResponseApplyPatchToolCallStatusCompleted ResponseApplyPatchToolCallStatus = "completed"
1367-
)
1368-
13691361
// ResponseApplyPatchToolCallOperationUnion contains all possible properties and
13701362
// values from [ResponseApplyPatchToolCallOperationCreateFile],
13711363
// [ResponseApplyPatchToolCallOperationDeleteFile],
@@ -1511,15 +1503,21 @@ func (r *ResponseApplyPatchToolCallOperationUpdateFile) UnmarshalJSON(data []byt
15111503
return apijson.UnmarshalRoot(data, r)
15121504
}
15131505

1506+
// The status of the apply patch tool call. One of `in_progress` or `completed`.
1507+
type ResponseApplyPatchToolCallStatus string
1508+
1509+
const (
1510+
ResponseApplyPatchToolCallStatusInProgress ResponseApplyPatchToolCallStatus = "in_progress"
1511+
ResponseApplyPatchToolCallStatusCompleted ResponseApplyPatchToolCallStatus = "completed"
1512+
)
1513+
15141514
// The output emitted by an apply patch tool call.
15151515
type ResponseApplyPatchToolCallOutput struct {
15161516
// The unique ID of the apply patch tool call output. Populated when this item is
15171517
// returned via API.
15181518
ID string `json:"id,required"`
15191519
// The unique ID of the apply patch tool call generated by the model.
15201520
CallID string `json:"call_id,required"`
1521-
// Optional textual output returned by the apply patch tool.
1522-
Output string `json:"output,required"`
15231521
// The status of the apply patch tool call output. One of `completed` or `failed`.
15241522
//
15251523
// Any of "completed", "failed".
@@ -1528,14 +1526,16 @@ type ResponseApplyPatchToolCallOutput struct {
15281526
Type constant.ApplyPatchCallOutput `json:"type,required"`
15291527
// The ID of the entity that created this tool call output.
15301528
CreatedBy string `json:"created_by"`
1529+
// Optional textual output returned by the apply patch tool.
1530+
Output string `json:"output,nullable"`
15311531
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
15321532
JSON struct {
15331533
ID respjson.Field
15341534
CallID respjson.Field
1535-
Output respjson.Field
15361535
Status respjson.Field
15371536
Type respjson.Field
15381537
CreatedBy respjson.Field
1538+
Output respjson.Field
15391539
ExtraFields map[string]respjson.Field
15401540
raw string
15411541
} `json:"-"`
@@ -8096,7 +8096,7 @@ type ResponseInputItemApplyPatchCallOutput struct {
80968096
ID string `json:"id,nullable"`
80978097
// Optional human-readable log text from the apply patch tool (e.g., patch results
80988098
// or errors).
8099-
Output string `json:"output"`
8099+
Output string `json:"output,nullable"`
81008100
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
81018101
JSON struct {
81028102
CallID respjson.Field

0 commit comments

Comments
 (0)