Skip to content

Commit 917f24f

Browse files
hkt74copybara-github
authored andcommitted
fix: Breaking change for Interactions, rename ContentDelta unions.
PiperOrigin-RevId: 883221998
1 parent 211cd6b commit 917f24f

File tree

1 file changed

+44
-44
lines changed

1 file changed

+44
-44
lines changed

src/interactions/resources/interactions.ts

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -287,25 +287,25 @@ export type Content =
287287

288288
export interface ContentDelta {
289289
delta:
290-
| ContentDelta.TextDelta
291-
| ContentDelta.ImageDelta
292-
| ContentDelta.AudioDelta
293-
| ContentDelta.DocumentDelta
294-
| ContentDelta.VideoDelta
295-
| ContentDelta.ThoughtSummaryDelta
296-
| ContentDelta.ThoughtSignatureDelta
297-
| ContentDelta.FunctionCallDelta
298-
| ContentDelta.FunctionResultDelta
299-
| ContentDelta.CodeExecutionCallDelta
300-
| ContentDelta.CodeExecutionResultDelta
301-
| ContentDelta.URLContextCallDelta
302-
| ContentDelta.URLContextResultDelta
303-
| ContentDelta.GoogleSearchCallDelta
304-
| ContentDelta.GoogleSearchResultDelta
305-
| ContentDelta.MCPServerToolCallDelta
306-
| ContentDelta.MCPServerToolResultDelta
307-
| ContentDelta.FileSearchCallDelta
308-
| ContentDelta.FileSearchResultDelta;
290+
| ContentDelta.Text
291+
| ContentDelta.Image
292+
| ContentDelta.Audio
293+
| ContentDelta.Document
294+
| ContentDelta.Video
295+
| ContentDelta.ThoughtSummary
296+
| ContentDelta.ThoughtSignature
297+
| ContentDelta.FunctionCall
298+
| ContentDelta.FunctionResult
299+
| ContentDelta.CodeExecutionCall
300+
| ContentDelta.CodeExecutionResult
301+
| ContentDelta.URLContextCall
302+
| ContentDelta.URLContextResult
303+
| ContentDelta.GoogleSearchCall
304+
| ContentDelta.GoogleSearchResult
305+
| ContentDelta.MCPServerToolCall
306+
| ContentDelta.MCPServerToolResult
307+
| ContentDelta.FileSearchCall
308+
| ContentDelta.FileSearchResult;
309309

310310
event_type: 'content.delta';
311311

@@ -318,7 +318,7 @@ export interface ContentDelta {
318318
}
319319

320320
export namespace ContentDelta {
321-
export interface TextDelta {
321+
export interface Text {
322322
text: string;
323323

324324
type: 'text';
@@ -329,7 +329,7 @@ export namespace ContentDelta {
329329
annotations?: Array<InteractionsAPI.Annotation>;
330330
}
331331

332-
export interface ImageDelta {
332+
export interface Image {
333333
type: 'image';
334334

335335
data?: string;
@@ -344,7 +344,7 @@ export namespace ContentDelta {
344344
uri?: string;
345345
}
346346

347-
export interface AudioDelta {
347+
export interface Audio {
348348
type: 'audio';
349349

350350
data?: string;
@@ -354,7 +354,7 @@ export namespace ContentDelta {
354354
uri?: string;
355355
}
356356

357-
export interface DocumentDelta {
357+
export interface Document {
358358
type: 'document';
359359

360360
data?: string;
@@ -364,7 +364,7 @@ export namespace ContentDelta {
364364
uri?: string;
365365
}
366366

367-
export interface VideoDelta {
367+
export interface Video {
368368
type: 'video';
369369

370370
data?: string;
@@ -388,7 +388,7 @@ export namespace ContentDelta {
388388
uri?: string;
389389
}
390390

391-
export interface ThoughtSummaryDelta {
391+
export interface ThoughtSummary {
392392
type: 'thought_summary';
393393

394394
/**
@@ -397,7 +397,7 @@ export namespace ContentDelta {
397397
content?: InteractionsAPI.TextContent | InteractionsAPI.ImageContent;
398398
}
399399

400-
export interface ThoughtSignatureDelta {
400+
export interface ThoughtSignature {
401401
type: 'thought_signature';
402402

403403
/**
@@ -406,7 +406,7 @@ export namespace ContentDelta {
406406
signature?: string;
407407
}
408408

409-
export interface FunctionCallDelta {
409+
export interface FunctionCall {
410410
/**
411411
* A unique ID for this specific tool call.
412412
*/
@@ -419,7 +419,7 @@ export namespace ContentDelta {
419419
type: 'function_call';
420420
}
421421

422-
export interface FunctionResultDelta {
422+
export interface FunctionResult {
423423
/**
424424
* ID to match the ID from the function call block.
425425
*/
@@ -428,7 +428,7 @@ export namespace ContentDelta {
428428
/**
429429
* Tool call result delta.
430430
*/
431-
result: FunctionResultDelta.Items | unknown | string;
431+
result: FunctionResult.Items | unknown | string;
432432

433433
type: 'function_result';
434434

@@ -442,13 +442,13 @@ export namespace ContentDelta {
442442
signature?: string;
443443
}
444444

445-
export namespace FunctionResultDelta {
445+
export namespace FunctionResult {
446446
export interface Items {
447447
items?: Array<InteractionsAPI.TextContent | InteractionsAPI.ImageContent>;
448448
}
449449
}
450450

451-
export interface CodeExecutionCallDelta {
451+
export interface CodeExecutionCall {
452452
/**
453453
* A unique ID for this specific tool call.
454454
*/
@@ -462,7 +462,7 @@ export namespace ContentDelta {
462462
type: 'code_execution_call';
463463
}
464464

465-
export interface CodeExecutionResultDelta {
465+
export interface CodeExecutionResult {
466466
/**
467467
* ID to match the ID from the function call block.
468468
*/
@@ -480,7 +480,7 @@ export namespace ContentDelta {
480480
signature?: string;
481481
}
482482

483-
export interface URLContextCallDelta {
483+
export interface URLContextCall {
484484
/**
485485
* A unique ID for this specific tool call.
486486
*/
@@ -494,7 +494,7 @@ export namespace ContentDelta {
494494
type: 'url_context_call';
495495
}
496496

497-
export interface URLContextResultDelta {
497+
export interface URLContextResult {
498498
/**
499499
* ID to match the ID from the function call block.
500500
*/
@@ -512,7 +512,7 @@ export namespace ContentDelta {
512512
signature?: string;
513513
}
514514

515-
export interface GoogleSearchCallDelta {
515+
export interface GoogleSearchCall {
516516
/**
517517
* A unique ID for this specific tool call.
518518
*/
@@ -526,7 +526,7 @@ export namespace ContentDelta {
526526
type: 'google_search_call';
527527
}
528528

529-
export interface GoogleSearchResultDelta {
529+
export interface GoogleSearchResult {
530530
/**
531531
* ID to match the ID from the function call block.
532532
*/
@@ -544,7 +544,7 @@ export namespace ContentDelta {
544544
signature?: string;
545545
}
546546

547-
export interface MCPServerToolCallDelta {
547+
export interface MCPServerToolCall {
548548
/**
549549
* A unique ID for this specific tool call.
550550
*/
@@ -559,7 +559,7 @@ export namespace ContentDelta {
559559
type: 'mcp_server_tool_call';
560560
}
561561

562-
export interface MCPServerToolResultDelta {
562+
export interface MCPServerToolResult {
563563
/**
564564
* ID to match the ID from the function call block.
565565
*/
@@ -568,7 +568,7 @@ export namespace ContentDelta {
568568
/**
569569
* Tool call result delta.
570570
*/
571-
result: MCPServerToolResultDelta.Items | unknown | string;
571+
result: MCPServerToolResult.Items | unknown | string;
572572

573573
type: 'mcp_server_tool_result';
574574

@@ -582,13 +582,13 @@ export namespace ContentDelta {
582582
signature?: string;
583583
}
584584

585-
export namespace MCPServerToolResultDelta {
585+
export namespace MCPServerToolResult {
586586
export interface Items {
587587
items?: Array<InteractionsAPI.TextContent | InteractionsAPI.ImageContent>;
588588
}
589589
}
590590

591-
export interface FileSearchCallDelta {
591+
export interface FileSearchCall {
592592
/**
593593
* A unique ID for this specific tool call.
594594
*/
@@ -597,23 +597,23 @@ export namespace ContentDelta {
597597
type: 'file_search_call';
598598
}
599599

600-
export interface FileSearchResultDelta {
600+
export interface FileSearchResult {
601601
/**
602602
* ID to match the ID from the function call block.
603603
*/
604604
call_id: string;
605605

606606
type: 'file_search_result';
607607

608-
result?: Array<FileSearchResultDelta.Result>;
608+
result?: Array<FileSearchResult.Result>;
609609

610610
/**
611611
* A signature hash for backend validation.
612612
*/
613613
signature?: string;
614614
}
615615

616-
export namespace FileSearchResultDelta {
616+
export namespace FileSearchResult {
617617
/**
618618
* The result of the File Search.
619619
*/

0 commit comments

Comments
 (0)