@google/genai 1.48.0 → 1.50.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/web/web.d.ts CHANGED
@@ -465,6 +465,10 @@ export declare interface AudioChunk {
465
465
  */
466
466
  declare interface AudioContent {
467
467
  type: 'audio';
468
+ /**
469
+ * The number of audio channels.
470
+ */
471
+ channels?: number;
468
472
  /**
469
473
  * The audio content.
470
474
  */
@@ -472,7 +476,11 @@ declare interface AudioContent {
472
476
  /**
473
477
  * The mime type of the audio.
474
478
  */
475
- mime_type?: 'audio/wav' | 'audio/mp3' | 'audio/aiff' | 'audio/aac' | 'audio/ogg' | 'audio/flac' | 'audio/mpeg' | 'audio/m4a';
479
+ mime_type?: 'audio/wav' | 'audio/mp3' | 'audio/aiff' | 'audio/aac' | 'audio/ogg' | 'audio/flac' | 'audio/mpeg' | 'audio/m4a' | 'audio/l16' | 'audio/opus' | 'audio/alaw' | 'audio/mulaw';
480
+ /**
481
+ * The sample rate of the audio.
482
+ */
483
+ rate?: number;
476
484
  /**
477
485
  * The URI of the audio.
478
486
  */
@@ -624,6 +632,18 @@ export declare interface AutomaticFunctionCallingConfig {
624
632
  ignoreCallHistory?: boolean;
625
633
  }
626
634
 
635
+ /** Configures the avatar to be used in the session. */
636
+ export declare interface AvatarConfig {
637
+ /** Pre-built avatar id. */
638
+ avatarName?: string;
639
+ /** Customized avatar appearance with a reference image. */
640
+ customizedAvatar?: CustomizedAvatar;
641
+ /** The bitrate of compressed audio. */
642
+ audioBitrateBps?: number;
643
+ /** The bitrate of compressed video output. */
644
+ videoBitrateBps?: number;
645
+ }
646
+
627
647
  declare class BadRequestError extends APIError<400, Headers> {
628
648
  }
629
649
 
@@ -653,24 +673,26 @@ declare interface BaseCreateAgentInteractionParams {
653
673
  */
654
674
  previous_interaction_id?: string;
655
675
  /**
656
- * Body param: Enforces that the generated response is a JSON object that complies with
657
- * the JSON schema specified in this field.
676
+ * Body param: Enforces that the generated response is a JSON object that complies
677
+ * with the JSON schema specified in this field.
658
678
  */
659
679
  response_format?: unknown;
660
680
  /**
661
- * Body param: The mime type of the response. This is required if response_format is set.
681
+ * Body param: The mime type of the response. This is required if response_format
682
+ * is set.
662
683
  */
663
684
  response_mime_type?: string;
664
685
  /**
665
686
  * Body param: The requested modalities of the response (TEXT, IMAGE, AUDIO).
666
687
  */
667
- response_modalities?: Array<'text' | 'image' | 'audio'>;
688
+ response_modalities?: Array<'text' | 'image' | 'audio' | 'video' | 'document'>;
668
689
  /**
669
690
  * Body param: The service tier for the interaction.
670
691
  */
671
692
  service_tier?: 'flex' | 'standard' | 'priority';
672
693
  /**
673
- * Body param: Input only. Whether to store the response and request for later retrieval.
694
+ * Body param: Input only. Whether to store the response and request for later
695
+ * retrieval.
674
696
  */
675
697
  store?: boolean;
676
698
  /**
@@ -685,6 +707,11 @@ declare interface BaseCreateAgentInteractionParams {
685
707
  * Body param: A list of tool declarations the model may call during interaction.
686
708
  */
687
709
  tools?: Array<Tool_2>;
710
+ /**
711
+ * Body param: Optional. Webhook configuration for receiving notifications when the
712
+ * interaction completes.
713
+ */
714
+ webhook_config?: WebhookConfig_2;
688
715
  }
689
716
 
690
717
  declare interface BaseCreateModelInteractionParams {
@@ -713,24 +740,26 @@ declare interface BaseCreateModelInteractionParams {
713
740
  */
714
741
  previous_interaction_id?: string;
715
742
  /**
716
- * Body param: Enforces that the generated response is a JSON object that complies with
717
- * the JSON schema specified in this field.
743
+ * Body param: Enforces that the generated response is a JSON object that complies
744
+ * with the JSON schema specified in this field.
718
745
  */
719
746
  response_format?: unknown;
720
747
  /**
721
- * Body param: The mime type of the response. This is required if response_format is set.
748
+ * Body param: The mime type of the response. This is required if response_format
749
+ * is set.
722
750
  */
723
751
  response_mime_type?: string;
724
752
  /**
725
753
  * Body param: The requested modalities of the response (TEXT, IMAGE, AUDIO).
726
754
  */
727
- response_modalities?: Array<'text' | 'image' | 'audio'>;
755
+ response_modalities?: Array<'text' | 'image' | 'audio' | 'video' | 'document'>;
728
756
  /**
729
757
  * Body param: The service tier for the interaction.
730
758
  */
731
759
  service_tier?: 'flex' | 'standard' | 'priority';
732
760
  /**
733
- * Body param: Input only. Whether to store the response and request for later retrieval.
761
+ * Body param: Input only. Whether to store the response and request for later
762
+ * retrieval.
734
763
  */
735
764
  store?: boolean;
736
765
  /**
@@ -745,6 +774,11 @@ declare interface BaseCreateModelInteractionParams {
745
774
  * Body param: A list of tool declarations the model may call during interaction.
746
775
  */
747
776
  tools?: Array<Tool_2>;
777
+ /**
778
+ * Body param: Optional. Webhook configuration for receiving notifications when the
779
+ * interaction completes.
780
+ */
781
+ webhook_config?: WebhookConfig_2;
748
782
  }
749
783
 
750
784
  /**
@@ -846,7 +880,7 @@ declare class BaseInteractions extends APIResource {
846
880
  * ```ts
847
881
  * const interaction = await client.interactions.create({
848
882
  * api_version: 'api_version',
849
- * input: [{ text: 'text', type: 'text' }],
883
+ * input: { text: 'text', type: 'text' },
850
884
  * model: 'gemini-2.5-computer-use-preview-10-2025',
851
885
  * });
852
886
  * ```
@@ -868,7 +902,8 @@ declare class BaseInteractions extends APIResource {
868
902
  */
869
903
  delete(id: string, params?: InteractionDeleteParams | null | undefined, options?: RequestOptions): APIPromise<unknown>;
870
904
  /**
871
- * Cancels an interaction by id. This only applies to background interactions that are still running.
905
+ * Cancels an interaction by id. This only applies to background interactions that
906
+ * are still running.
872
907
  *
873
908
  * @example
874
909
  * ```ts
@@ -879,7 +914,8 @@ declare class BaseInteractions extends APIResource {
879
914
  */
880
915
  cancel(id: string, params?: InteractionCancelParams | null | undefined, options?: RequestOptions): APIPromise<Interaction>;
881
916
  /**
882
- * Retrieves the full details of a single interaction based on its `Interaction.id`.
917
+ * Retrieves the full details of a single interaction based on its
918
+ * `Interaction.id`.
883
919
  *
884
920
  * @example
885
921
  * ```ts
@@ -909,6 +945,38 @@ export declare interface BaseUrlParameters {
909
945
  vertexUrl?: string;
910
946
  }
911
947
 
948
+ declare class BaseWebhooks extends APIResource {
949
+ static readonly _key: readonly ['webhooks'];
950
+ /**
951
+ * Creates a new Webhook.
952
+ */
953
+ create(params: WebhookCreateParams, options?: RequestOptions): APIPromise<WebhookCreateResponse>;
954
+ /**
955
+ * Gets a specific Webhook.
956
+ */
957
+ retrieve(id: string, params?: WebhookRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<WebhookRetrieveResponse>;
958
+ /**
959
+ * Updates an existing Webhook.
960
+ */
961
+ update(id: string, params: WebhookUpdateParams, options?: RequestOptions): APIPromise<WebhookUpdateResponse>;
962
+ /**
963
+ * Lists all Webhooks.
964
+ */
965
+ list(params?: WebhookListParams | null | undefined, options?: RequestOptions): APIPromise<WebhookListResponse>;
966
+ /**
967
+ * Deletes a Webhook.
968
+ */
969
+ delete(id: string, params?: WebhookDeleteParams | null | undefined, options?: RequestOptions): APIPromise<WebhookDeleteResponse>;
970
+ /**
971
+ * Sends a ping event to a Webhook.
972
+ */
973
+ ping(id: string, params?: WebhookPingParams | null | undefined, options?: RequestOptions): APIPromise<WebhookPingResponse>;
974
+ /**
975
+ * Generates a new signing secret for a Webhook.
976
+ */
977
+ rotateSigningSecret(id: string, params?: WebhookRotateSigningSecretParams | null | undefined, options?: RequestOptions): APIPromise<WebhookRotateSigningSecretResponse>;
978
+ }
979
+
912
980
  export declare class Batches extends BaseModule {
913
981
  private readonly apiClient;
914
982
  constructor(apiClient: ApiClient);
@@ -1665,7 +1733,7 @@ declare interface ClientOptions {
1665
1733
  /**
1666
1734
  * The adapter to the parent API client instance (for accessing auth, project, location)
1667
1735
  */
1668
- clientAdapter: GeminiNextGenAPIClientAdapter;
1736
+ clientAdapter?: GeminiNextGenAPIClientAdapter | undefined;
1669
1737
  }
1670
1738
 
1671
1739
  /**
@@ -1828,8 +1896,7 @@ declare interface ContentDelta {
1828
1896
  event_type: 'content.delta';
1829
1897
  index: number;
1830
1898
  /**
1831
- * The event_id token to be used to resume the interaction stream, from
1832
- * this event.
1899
+ * The event_id token to be used to resume the interaction stream, from this event.
1833
1900
  */
1834
1901
  event_id?: string;
1835
1902
  }
@@ -1851,8 +1918,16 @@ declare namespace ContentDelta {
1851
1918
  }
1852
1919
  interface Audio {
1853
1920
  type: 'audio';
1921
+ /**
1922
+ * The number of audio channels.
1923
+ */
1924
+ channels?: number;
1854
1925
  data?: string;
1855
- mime_type?: 'audio/wav' | 'audio/mp3' | 'audio/aiff' | 'audio/aac' | 'audio/ogg' | 'audio/flac' | 'audio/mpeg' | 'audio/m4a';
1926
+ mime_type?: 'audio/wav' | 'audio/mp3' | 'audio/aiff' | 'audio/aac' | 'audio/ogg' | 'audio/flac' | 'audio/mpeg' | 'audio/m4a' | 'audio/l16' | 'audio/opus' | 'audio/alaw' | 'audio/mulaw';
1927
+ /**
1928
+ * The sample rate of the audio.
1929
+ */
1930
+ rate?: number;
1856
1931
  uri?: string;
1857
1932
  }
1858
1933
  interface Document {
@@ -2149,8 +2224,7 @@ declare interface ContentStart {
2149
2224
  event_type: 'content.start';
2150
2225
  index: number;
2151
2226
  /**
2152
- * The event_id token to be used to resume the interaction stream, from
2153
- * this event.
2227
+ * The event_id token to be used to resume the interaction stream, from this event.
2154
2228
  */
2155
2229
  event_id?: string;
2156
2230
  }
@@ -2159,8 +2233,7 @@ declare interface ContentStop {
2159
2233
  event_type: 'content.stop';
2160
2234
  index: number;
2161
2235
  /**
2162
- * The event_id token to be used to resume the interaction stream, from
2163
- * this event.
2236
+ * The event_id token to be used to resume the interaction stream, from this event.
2164
2237
  */
2165
2238
  event_id?: string;
2166
2239
  }
@@ -2338,6 +2411,10 @@ export declare interface CreateBatchJobConfig {
2338
2411
  "gs://path/to/output/data" or "bq://projectId.bqDatasetId.bqTableId".
2339
2412
  */
2340
2413
  dest?: BatchJobDestinationUnion;
2414
+ /** Webhook configuration for receiving notifications when the batch
2415
+ operation completes.
2416
+ */
2417
+ webhookConfig?: WebhookConfig;
2341
2418
  }
2342
2419
 
2343
2420
  /** Config for batches.create parameters. */
@@ -2665,6 +2742,16 @@ export declare interface CustomCodeExecutionResult {
2665
2742
  score?: number;
2666
2743
  }
2667
2744
 
2745
+ /** Configures the customized avatar to be used in the session. */
2746
+ export declare interface CustomizedAvatar {
2747
+ /** The mime type of the reference image, e.g., "image/jpeg". */
2748
+ imageMimeType?: string;
2749
+ /** The data of the reference image. The dimensions of the reference
2750
+ image should be 9:16 (portrait) with a minimum resolution of 704x1280.
2751
+ * @remarks Encoded as base64 string. */
2752
+ imageData?: string;
2753
+ }
2754
+
2668
2755
  /** User provided metadata stored as key-value pairs. This data type is not supported in Vertex AI. */
2669
2756
  export declare interface CustomMetadata {
2670
2757
  /** Required. The key of the metadata to store. */
@@ -2742,10 +2829,21 @@ export declare interface DatasetStats {
2742
2829
  */
2743
2830
  declare interface DeepResearchAgentConfig {
2744
2831
  type: 'deep-research';
2832
+ /**
2833
+ * Enables human-in-the-loop planning for the Deep Research agent. If set to true,
2834
+ * the Deep Research agent will provide a research plan in its response. The agent
2835
+ * will then proceed only if the user confirms the plan in the next turn. Relevant
2836
+ * issue: b/482352502.
2837
+ */
2838
+ collaborative_planning?: boolean;
2745
2839
  /**
2746
2840
  * Whether to include thought summaries in the response.
2747
2841
  */
2748
2842
  thinking_summaries?: 'auto' | 'none';
2843
+ /**
2844
+ * Whether to include visualizations in the response.
2845
+ */
2846
+ visualization?: 'off' | 'auto';
2749
2847
  }
2750
2848
 
2751
2849
  /** Optional parameters for models.get method. */
@@ -3257,6 +3355,14 @@ export declare interface EmbedContentConfig {
3257
3355
  will lead to an INVALID_ARGUMENT error, similar to other text APIs.
3258
3356
  */
3259
3357
  autoTruncate?: boolean;
3358
+ /** Vertex API only. Whether to enable OCR for document content.
3359
+ Only applicable to Gemini Embedding 2 models.
3360
+ */
3361
+ documentOcr?: boolean;
3362
+ /** Vertex API only. Whether to extract audio from video content.
3363
+ Only applicable to Gemini Embedding 2 models.
3364
+ */
3365
+ audioTrackExtraction?: boolean;
3260
3366
  }
3261
3367
 
3262
3368
  /** Request-level metadata for the Vertex Embed Content API. */
@@ -3399,8 +3505,7 @@ declare interface ErrorEvent_2 {
3399
3505
  */
3400
3506
  error?: ErrorEvent_2.Error;
3401
3507
  /**
3402
- * The event_id token to be used to resume the interaction stream, from
3403
- * this event.
3508
+ * The event_id token to be used to resume the interaction stream, from this event.
3404
3509
  */
3405
3510
  event_id?: string;
3406
3511
  }
@@ -4841,6 +4946,9 @@ export declare interface GenerateVideosConfig {
4841
4946
  compressionQuality?: VideoCompressionQuality;
4842
4947
  /** User specified labels to track billing usage. */
4843
4948
  labels?: Record<string, string>;
4949
+ /** Webhook configuration for receiving notifications when the
4950
+ video generation operation completes. */
4951
+ webhookConfig?: WebhookConfig;
4844
4952
  }
4845
4953
 
4846
4954
  /** A video generation operation. */
@@ -5255,7 +5363,11 @@ export declare class GoogleGenAI {
5255
5363
  readonly tunings: Tunings;
5256
5364
  readonly fileSearchStores: FileSearchStores;
5257
5365
  private _interactions;
5366
+ private _webhooks;
5367
+ private _nextGenClient;
5368
+ private getNextGenClient;
5258
5369
  get interactions(): Interactions;
5370
+ get webhooks(): Webhooks;
5259
5371
  constructor(options: GoogleGenAIOptions);
5260
5372
  }
5261
5373
 
@@ -5384,8 +5496,8 @@ declare namespace GoogleMapsResult {
5384
5496
  */
5385
5497
  place_id?: string;
5386
5498
  /**
5387
- * Snippets of reviews that are used to generate answers about the
5388
- * features of a given place in Google Maps.
5499
+ * Snippets of reviews that are used to generate answers about the features of a
5500
+ * given place in Google Maps.
5389
5501
  */
5390
5502
  review_snippets?: Array<Place.ReviewSnippet>;
5391
5503
  /**
@@ -5395,8 +5507,8 @@ declare namespace GoogleMapsResult {
5395
5507
  }
5396
5508
  namespace Place {
5397
5509
  /**
5398
- * Encapsulates a snippet of a user review that answers a question about
5399
- * the features of a specific place in Google Maps.
5510
+ * Encapsulates a snippet of a user review that answers a question about the
5511
+ * features of a specific place in Google Maps.
5400
5512
  */
5401
5513
  interface ReviewSnippet {
5402
5514
  /**
@@ -5482,7 +5594,7 @@ declare interface GoogleSearchCallContent {
5482
5594
  /**
5483
5595
  * The type of search grounding enabled.
5484
5596
  */
5485
- search_type?: 'web_search' | 'image_search';
5597
+ search_type?: 'web_search' | 'image_search' | 'enterprise_web_search';
5486
5598
  /**
5487
5599
  * A signature hash for backend validation.
5488
5600
  */
@@ -6228,8 +6340,8 @@ declare interface Interaction {
6228
6340
  */
6229
6341
  id: string;
6230
6342
  /**
6231
- * Required. Output only. The time at which the response was created in ISO 8601 format
6232
- * (YYYY-MM-DDThh:mm:ssZ).
6343
+ * Required. Output only. The time at which the response was created in ISO 8601
6344
+ * format (YYYY-MM-DDThh:mm:ssZ).
6233
6345
  */
6234
6346
  created: string;
6235
6347
  /**
@@ -6237,8 +6349,8 @@ declare interface Interaction {
6237
6349
  */
6238
6350
  status: 'in_progress' | 'requires_action' | 'completed' | 'failed' | 'cancelled' | 'incomplete';
6239
6351
  /**
6240
- * Required. Output only. The time at which the response was last updated in ISO 8601 format
6241
- * (YYYY-MM-DDThh:mm:ssZ).
6352
+ * Required. Output only. The time at which the response was last updated in ISO
6353
+ * 8601 format (YYYY-MM-DDThh:mm:ssZ).
6242
6354
  */
6243
6355
  updated: string;
6244
6356
  /**
@@ -6266,8 +6378,8 @@ declare interface Interaction {
6266
6378
  */
6267
6379
  previous_interaction_id?: string;
6268
6380
  /**
6269
- * Enforces that the generated response is a JSON object that complies with
6270
- * the JSON schema specified in this field.
6381
+ * Enforces that the generated response is a JSON object that complies with the
6382
+ * JSON schema specified in this field.
6271
6383
  */
6272
6384
  response_format?: unknown;
6273
6385
  /**
@@ -6277,7 +6389,7 @@ declare interface Interaction {
6277
6389
  /**
6278
6390
  * The requested modalities of the response (TEXT, IMAGE, AUDIO).
6279
6391
  */
6280
- response_modalities?: Array<'text' | 'image' | 'audio'>;
6392
+ response_modalities?: Array<'text' | 'image' | 'audio' | 'video' | 'document'>;
6281
6393
  /**
6282
6394
  * Output only. The role of the interaction.
6283
6395
  */
@@ -6298,6 +6410,11 @@ declare interface Interaction {
6298
6410
  * Output only. Statistics on the interaction request's token usage.
6299
6411
  */
6300
6412
  usage?: Usage;
6413
+ /**
6414
+ * Optional. Webhook configuration for receiving notifications when the interaction
6415
+ * completes.
6416
+ */
6417
+ webhook_config?: WebhookConfig_2;
6301
6418
  }
6302
6419
 
6303
6420
  declare interface InteractionCancelParams {
@@ -6310,13 +6427,12 @@ declare interface InteractionCancelParams {
6310
6427
  declare interface InteractionCompleteEvent {
6311
6428
  event_type: 'interaction.complete';
6312
6429
  /**
6313
- * Required. The completed interaction with empty outputs to reduce the payload size.
6314
- * Use the preceding ContentDelta events for the actual output.
6430
+ * Required. The completed interaction with empty outputs to reduce the payload
6431
+ * size. Use the preceding ContentDelta events for the actual output.
6315
6432
  */
6316
6433
  interaction: Interaction;
6317
6434
  /**
6318
- * The event_id token to be used to resume the interaction stream, from
6319
- * this event.
6435
+ * The event_id token to be used to resume the interaction stream, from this event.
6320
6436
  */
6321
6437
  event_id?: string;
6322
6438
  }
@@ -6349,25 +6465,30 @@ declare interface InteractionGetParamsBase {
6349
6465
  */
6350
6466
  include_input?: boolean;
6351
6467
  /**
6352
- * Query param: Optional. If set, resumes the interaction stream from the next chunk after the event marked by the event id. Can only be used if `stream` is true.
6468
+ * Query param: Optional. If set, resumes the interaction stream from the next
6469
+ * chunk after the event marked by the event id. Can only be used if `stream` is
6470
+ * true.
6353
6471
  */
6354
6472
  last_event_id?: string;
6355
6473
  /**
6356
- * Query param: If set to true, the generated content will be streamed incrementally.
6474
+ * Query param: If set to true, the generated content will be streamed
6475
+ * incrementally.
6357
6476
  */
6358
6477
  stream?: boolean;
6359
6478
  }
6360
6479
 
6361
6480
  declare interface InteractionGetParamsNonStreaming extends InteractionGetParamsBase {
6362
6481
  /**
6363
- * Query param: If set to true, the generated content will be streamed incrementally.
6482
+ * Query param: If set to true, the generated content will be streamed
6483
+ * incrementally.
6364
6484
  */
6365
6485
  stream?: false;
6366
6486
  }
6367
6487
 
6368
6488
  declare interface InteractionGetParamsStreaming extends InteractionGetParamsBase {
6369
6489
  /**
6370
- * Query param: If set to true, the generated content will be streamed incrementally.
6490
+ * Query param: If set to true, the generated content will be streamed
6491
+ * incrementally.
6371
6492
  */
6372
6493
  stream: true;
6373
6494
  }
@@ -6376,7 +6497,7 @@ export declare class Interactions extends BaseInteractions {
6376
6497
  }
6377
6498
 
6378
6499
  export declare namespace Interactions {
6379
- export { type AllowedTools as AllowedTools, type Annotation as Annotation, type AudioContent as AudioContent, type CodeExecutionCallArguments as CodeExecutionCallArguments, type CodeExecutionCallContent as CodeExecutionCallContent, type CodeExecutionResultContent as CodeExecutionResultContent, type Content_2 as Content, type ContentDelta as ContentDelta, type ContentStart as ContentStart, type ContentStop as ContentStop, type DeepResearchAgentConfig as DeepResearchAgentConfig, type DocumentContent as DocumentContent, type DynamicAgentConfig as DynamicAgentConfig, type ErrorEvent_2 as ErrorEvent, type FileCitation as FileCitation, type FileSearchCallContent as FileSearchCallContent, type FileSearchResultContent as FileSearchResultContent, type Function_2 as Function, type FunctionCallContent as FunctionCallContent, type FunctionResultContent as FunctionResultContent, type GenerationConfig_2 as GenerationConfig, type GoogleMapsCallArguments as GoogleMapsCallArguments, type GoogleMapsCallContent as GoogleMapsCallContent, type GoogleMapsResult as GoogleMapsResult, type GoogleMapsResultContent as GoogleMapsResultContent, type GoogleSearchCallArguments as GoogleSearchCallArguments, type GoogleSearchCallContent as GoogleSearchCallContent, type GoogleSearchResult as GoogleSearchResult, type GoogleSearchResultContent as GoogleSearchResultContent, type ImageConfig_2 as ImageConfig, type ImageContent as ImageContent, type Interaction as Interaction, type InteractionCompleteEvent as InteractionCompleteEvent, type InteractionSSEEvent as InteractionSSEEvent, type InteractionStartEvent as InteractionStartEvent, type InteractionStatusUpdate as InteractionStatusUpdate, type MCPServerToolCallContent as MCPServerToolCallContent, type MCPServerToolResultContent as MCPServerToolResultContent, type Model_2 as Model, type PlaceCitation as PlaceCitation, type SpeechConfig_2 as SpeechConfig, type TextContent as TextContent, type ThinkingLevel_2 as ThinkingLevel, type ThoughtContent as ThoughtContent, type Tool_2 as Tool, type ToolChoiceConfig as ToolChoiceConfig, type ToolChoiceType as ToolChoiceType, type Turn as Turn, type URLCitation as URLCitation, type URLContextCallArguments as URLContextCallArguments, type URLContextCallContent as URLContextCallContent, type URLContextResult as URLContextResult, type URLContextResultContent as URLContextResultContent, type Usage as Usage, type VideoContent as VideoContent, type InteractionDeleteResponse as InteractionDeleteResponse, type InteractionCreateParams as InteractionCreateParams, type CreateModelInteractionParamsNonStreaming as CreateModelInteractionParamsNonStreaming, type CreateModelInteractionParamsStreaming as CreateModelInteractionParamsStreaming, type CreateAgentInteractionParamsNonStreaming as CreateAgentInteractionParamsNonStreaming, type CreateAgentInteractionParamsStreaming as CreateAgentInteractionParamsStreaming, type InteractionDeleteParams as InteractionDeleteParams, type InteractionCancelParams as InteractionCancelParams, type InteractionGetParams as InteractionGetParams, type InteractionGetParamsNonStreaming as InteractionGetParamsNonStreaming, type InteractionGetParamsStreaming as InteractionGetParamsStreaming, };
6500
+ export { type AllowedTools as AllowedTools, type Annotation as Annotation, type AudioContent as AudioContent, type CodeExecutionCallArguments as CodeExecutionCallArguments, type CodeExecutionCallContent as CodeExecutionCallContent, type CodeExecutionResultContent as CodeExecutionResultContent, type Content_2 as Content, type ContentDelta as ContentDelta, type ContentStart as ContentStart, type ContentStop as ContentStop, type DeepResearchAgentConfig as DeepResearchAgentConfig, type DocumentContent as DocumentContent, type DynamicAgentConfig as DynamicAgentConfig, type ErrorEvent_2 as ErrorEvent, type FileCitation as FileCitation, type FileSearchCallContent as FileSearchCallContent, type FileSearchResultContent as FileSearchResultContent, type Function_2 as Function, type FunctionCallContent as FunctionCallContent, type FunctionResultContent as FunctionResultContent, type GenerationConfig_2 as GenerationConfig, type GoogleMapsCallArguments as GoogleMapsCallArguments, type GoogleMapsCallContent as GoogleMapsCallContent, type GoogleMapsResult as GoogleMapsResult, type GoogleMapsResultContent as GoogleMapsResultContent, type GoogleSearchCallArguments as GoogleSearchCallArguments, type GoogleSearchCallContent as GoogleSearchCallContent, type GoogleSearchResult as GoogleSearchResult, type GoogleSearchResultContent as GoogleSearchResultContent, type ImageConfig_2 as ImageConfig, type ImageContent as ImageContent, type Interaction as Interaction, type InteractionCompleteEvent as InteractionCompleteEvent, type InteractionSSEEvent as InteractionSSEEvent, type InteractionStartEvent as InteractionStartEvent, type InteractionStatusUpdate as InteractionStatusUpdate, type MCPServerToolCallContent as MCPServerToolCallContent, type MCPServerToolResultContent as MCPServerToolResultContent, type Model_2 as Model, type PlaceCitation as PlaceCitation, type SpeechConfig_2 as SpeechConfig, type TextContent as TextContent, type ThinkingLevel_2 as ThinkingLevel, type ThoughtContent as ThoughtContent, type Tool_2 as Tool, type ToolChoiceConfig as ToolChoiceConfig, type ToolChoiceType as ToolChoiceType, type Turn as Turn, type URLCitation as URLCitation, type URLContextCallArguments as URLContextCallArguments, type URLContextCallContent as URLContextCallContent, type URLContextResult as URLContextResult, type URLContextResultContent as URLContextResultContent, type Usage as Usage, type VideoContent as VideoContent, type WebhookConfig_2 as WebhookConfig, type InteractionDeleteResponse as InteractionDeleteResponse, type InteractionCreateParams as InteractionCreateParams, type CreateModelInteractionParamsNonStreaming as CreateModelInteractionParamsNonStreaming, type CreateModelInteractionParamsStreaming as CreateModelInteractionParamsStreaming, type CreateAgentInteractionParamsNonStreaming as CreateAgentInteractionParamsNonStreaming, type CreateAgentInteractionParamsStreaming as CreateAgentInteractionParamsStreaming, type InteractionDeleteParams as InteractionDeleteParams, type InteractionCancelParams as InteractionCancelParams, type InteractionGetParams as InteractionGetParams, type InteractionGetParamsNonStreaming as InteractionGetParamsNonStreaming, type InteractionGetParamsStreaming as InteractionGetParamsStreaming, };
6380
6501
  }
6381
6502
 
6382
6503
  declare namespace InteractionsAPI {
@@ -6438,6 +6559,7 @@ declare namespace InteractionsAPI {
6438
6559
  URLContextResultContent,
6439
6560
  Usage,
6440
6561
  VideoContent,
6562
+ WebhookConfig_2 as WebhookConfig,
6441
6563
  InteractionDeleteResponse,
6442
6564
  InteractionCreateParams,
6443
6565
  BaseCreateModelInteractionParams,
@@ -6464,8 +6586,7 @@ declare interface InteractionStartEvent {
6464
6586
  */
6465
6587
  interaction: Interaction;
6466
6588
  /**
6467
- * The event_id token to be used to resume the interaction stream, from
6468
- * this event.
6589
+ * The event_id token to be used to resume the interaction stream, from this event.
6469
6590
  */
6470
6591
  event_id?: string;
6471
6592
  }
@@ -6475,8 +6596,7 @@ declare interface InteractionStatusUpdate {
6475
6596
  interaction_id: string;
6476
6597
  status: 'in_progress' | 'requires_action' | 'completed' | 'failed' | 'cancelled' | 'incomplete';
6477
6598
  /**
6478
- * The event_id token to be used to resume the interaction stream, from
6479
- * this event.
6599
+ * The event_id token to be used to resume the interaction stream, from this event.
6480
6600
  */
6481
6601
  event_id?: string;
6482
6602
  }
@@ -6993,6 +7113,12 @@ export declare interface LiveClientSetup {
6993
7113
  vad_signal to indicate the start and end of speech. This allows the server
6994
7114
  to process the audio more efficiently. */
6995
7115
  explicitVadSignal?: boolean;
7116
+ /** Configures the avatar model behavior. */
7117
+ avatarConfig?: AvatarConfig;
7118
+ /** Safety settings in the request to block unsafe content in the
7119
+ response.
7120
+ */
7121
+ safetySettings?: SafetySetting[];
6996
7122
  }
6997
7123
 
6998
7124
  /** Client generated response to a `ToolCall` received from the server.
@@ -7099,6 +7225,12 @@ export declare interface LiveConnectConfig {
7099
7225
  vad_signal to indicate the start and end of speech. This allows the server
7100
7226
  to process the audio more efficiently. */
7101
7227
  explicitVadSignal?: boolean;
7228
+ /** Configures the avatar model behavior. */
7229
+ avatarConfig?: AvatarConfig;
7230
+ /** Safety settings in the request to block unsafe content in the
7231
+ response.
7232
+ */
7233
+ safetySettings?: SafetySetting[];
7102
7234
  }
7103
7235
 
7104
7236
  /** Config for LiveConnectConstraints for Auth Token creation. */
@@ -7800,7 +7932,11 @@ export declare enum Modality {
7800
7932
  /**
7801
7933
  * Indicates the model should return audio.
7802
7934
  */
7803
- AUDIO = "AUDIO"
7935
+ AUDIO = "AUDIO",
7936
+ /**
7937
+ * Indicates the model should return video.
7938
+ */
7939
+ VIDEO = "VIDEO"
7804
7940
  }
7805
7941
 
7806
7942
  /** Represents token counting info for a single modality. */
@@ -7867,7 +8003,8 @@ export declare interface Model {
7867
8003
  }
7868
8004
 
7869
8005
  /**
7870
- * The model that will complete your prompt.\n\nSee [models](https://ai.google.dev/gemini-api/docs/models) for additional details.
8006
+ * The model that will complete your prompt.\n\nSee
8007
+ * [models](https://ai.google.dev/gemini-api/docs/models) for additional details.
7871
8008
  */
7872
8009
  declare type Model_2 = 'gemini-2.5-computer-use-preview-10-2025' | 'gemini-2.5-flash' | 'gemini-2.5-flash-image' | 'gemini-2.5-flash-lite' | 'gemini-2.5-flash-lite-preview-09-2025' | 'gemini-2.5-flash-native-audio-preview-12-2025' | 'gemini-2.5-flash-preview-09-2025' | 'gemini-2.5-flash-preview-tts' | 'gemini-2.5-pro' | 'gemini-2.5-pro-preview-tts' | 'gemini-3-flash-preview' | 'gemini-3-pro-image-preview' | 'gemini-3-pro-preview' | 'gemini-3.1-pro-preview' | 'gemini-3.1-flash-image-preview' | 'gemini-3.1-flash-lite-preview' | 'lyria-3-clip-preview' | 'lyria-3-pro-preview' | (string & {});
7873
8010
 
@@ -8130,29 +8267,15 @@ export declare class Models extends BaseModule {
8130
8267
  /**
8131
8268
  * Recontextualizes an image.
8132
8269
  *
8133
- * There are two types of recontextualization currently supported:
8134
- * 1) Imagen Product Recontext - Generate images of products in new scenes
8135
- * and contexts.
8136
- * 2) Virtual Try-On: Generate images of persons modeling fashion products.
8270
+ * There is one type of recontextualization currently supported:
8271
+ * 1) Virtual Try-On: Generate images of persons modeling fashion products.
8137
8272
  *
8138
8273
  * @param params - The parameters for recontextualizing an image.
8139
8274
  * @return The response from the API.
8140
8275
  *
8141
8276
  * @example
8142
8277
  * ```ts
8143
- * const response1 = await ai.models.recontextImage({
8144
- * model: 'imagen-product-recontext-preview-06-30',
8145
- * source: {
8146
- * prompt: 'In a modern kitchen setting.',
8147
- * productImages: [productImage],
8148
- * },
8149
- * config: {
8150
- * numberOfImages: 1,
8151
- * },
8152
- * });
8153
- * console.log(response1?.generatedImages?.[0]?.image?.imageBytes);
8154
- *
8155
- * const response2 = await ai.models.recontextImage({
8278
+ * const response = await ai.models.recontextImage({
8156
8279
  * model: 'virtual-try-on-001',
8157
8280
  * source: {
8158
8281
  * personImage: personImage,
@@ -8162,7 +8285,7 @@ export declare class Models extends BaseModule {
8162
8285
  * numberOfImages: 1,
8163
8286
  * },
8164
8287
  * });
8165
- * console.log(response2?.generatedImages?.[0]?.image?.imageBytes);
8288
+ * console.log(response?.generatedImages?.[0]?.image?.imageBytes);
8166
8289
  * ```
8167
8290
  */
8168
8291
  recontextImage(params: types.RecontextImageParameters): Promise<types.RecontextImageResponse>;
@@ -8821,8 +8944,8 @@ declare interface PlaceCitation {
8821
8944
  */
8822
8945
  place_id?: string;
8823
8946
  /**
8824
- * Snippets of reviews that are used to generate answers about the
8825
- * features of a given place in Google Maps.
8947
+ * Snippets of reviews that are used to generate answers about the features of a
8948
+ * given place in Google Maps.
8826
8949
  */
8827
8950
  review_snippets?: Array<PlaceCitation.ReviewSnippet>;
8828
8951
  /**
@@ -8839,8 +8962,8 @@ declare interface PlaceCitation {
8839
8962
 
8840
8963
  declare namespace PlaceCitation {
8841
8964
  /**
8842
- * Encapsulates a snippet of a user review that answers a question about
8843
- * the features of a specific place in Google Maps.
8965
+ * Encapsulates a snippet of a user review that answers a question about the
8966
+ * features of a specific place in Google Maps.
8844
8967
  */
8845
8968
  interface ReviewSnippet {
8846
8969
  /**
@@ -10328,7 +10451,7 @@ export declare interface Tool {
10328
10451
  /**
10329
10452
  * A tool that can be used by the model.
10330
10453
  */
10331
- declare type Tool_2 = Function_2 | Tool_2.CodeExecution | Tool_2.URLContext | Tool_2.ComputerUse | Tool_2.MCPServer | Tool_2.GoogleSearch | Tool_2.FileSearch | Tool_2.GoogleMaps;
10454
+ declare type Tool_2 = Function_2 | Tool_2.CodeExecution | Tool_2.URLContext | Tool_2.ComputerUse | Tool_2.MCPServer | Tool_2.GoogleSearch | Tool_2.FileSearch | Tool_2.GoogleMaps | Tool_2.Retrieval;
10332
10455
 
10333
10456
  declare namespace Tool_2 {
10334
10457
  /**
@@ -10377,8 +10500,7 @@ declare namespace Tool_2 {
10377
10500
  */
10378
10501
  name?: string;
10379
10502
  /**
10380
- * The full URL for the MCPServer endpoint.
10381
- * Example: "https://api.example.com/mcp"
10503
+ * The full URL for the MCPServer endpoint. Example: "https://api.example.com/mcp"
10382
10504
  */
10383
10505
  url?: string;
10384
10506
  }
@@ -10390,7 +10512,7 @@ declare namespace Tool_2 {
10390
10512
  /**
10391
10513
  * The types of search grounding to enable.
10392
10514
  */
10393
- search_types?: Array<'web_search' | 'image_search'>;
10515
+ search_types?: Array<'web_search' | 'image_search' | 'enterprise_web_search'>;
10394
10516
  }
10395
10517
  /**
10396
10518
  * A tool that can be used by the model to search files.
@@ -10429,6 +10551,35 @@ declare namespace Tool_2 {
10429
10551
  */
10430
10552
  longitude?: number;
10431
10553
  }
10554
+ /**
10555
+ * A tool that can be used by the model to retrieve files.
10556
+ */
10557
+ interface Retrieval {
10558
+ type: 'retrieval';
10559
+ /**
10560
+ * The types of file retrieval to enable.
10561
+ */
10562
+ retrieval_types?: Array<'vertex_ai_search'>;
10563
+ /**
10564
+ * Used to specify configuration for VertexAISearch.
10565
+ */
10566
+ vertex_ai_search_config?: Retrieval.VertexAISearchConfig;
10567
+ }
10568
+ namespace Retrieval {
10569
+ /**
10570
+ * Used to specify configuration for VertexAISearch.
10571
+ */
10572
+ interface VertexAISearchConfig {
10573
+ /**
10574
+ * Optional. Used to specify Vertex AI Search datastores.
10575
+ */
10576
+ datastores?: Array<string>;
10577
+ /**
10578
+ * Optional. Used to specify Vertex AI Search engine.
10579
+ */
10580
+ engine?: string;
10581
+ }
10582
+ }
10432
10583
  }
10433
10584
 
10434
10585
  /** A predicted server-side `ToolCall` returned from the model.
@@ -10869,8 +11020,7 @@ export declare interface TuningValidationDataset {
10869
11020
  declare interface Turn {
10870
11021
  content?: Array<Content_2> | string;
10871
11022
  /**
10872
- * The originator of this turn. Must be user for input or model for
10873
- * model output.
11023
+ * The originator of this turn. Must be user for input or model for model output.
10874
11024
  */
10875
11025
  role?: string;
10876
11026
  }
@@ -10892,7 +11042,103 @@ export declare enum TurnCompleteReason {
10892
11042
  /**
10893
11043
  * Needs more input from the user.
10894
11044
  */
10895
- NEED_MORE_INPUT = "NEED_MORE_INPUT"
11045
+ NEED_MORE_INPUT = "NEED_MORE_INPUT",
11046
+ /**
11047
+ * Input content is prohibited.
11048
+ */
11049
+ PROHIBITED_INPUT_CONTENT = "PROHIBITED_INPUT_CONTENT",
11050
+ /**
11051
+ * Input image contains prohibited content.
11052
+ */
11053
+ IMAGE_PROHIBITED_INPUT_CONTENT = "IMAGE_PROHIBITED_INPUT_CONTENT",
11054
+ /**
11055
+ * Input text contains prominent person reference.
11056
+ */
11057
+ INPUT_TEXT_CONTAIN_PROMINENT_PERSON_PROHIBITED = "INPUT_TEXT_CONTAIN_PROMINENT_PERSON_PROHIBITED",
11058
+ /**
11059
+ * Input image contains celebrity.
11060
+ */
11061
+ INPUT_IMAGE_CELEBRITY = "INPUT_IMAGE_CELEBRITY",
11062
+ /**
11063
+ * Input image contains photo realistic child.
11064
+ */
11065
+ INPUT_IMAGE_PHOTO_REALISTIC_CHILD_PROHIBITED = "INPUT_IMAGE_PHOTO_REALISTIC_CHILD_PROHIBITED",
11066
+ /**
11067
+ * Input text contains NCII content.
11068
+ */
11069
+ INPUT_TEXT_NCII_PROHIBITED = "INPUT_TEXT_NCII_PROHIBITED",
11070
+ /**
11071
+ * Other input safety issue.
11072
+ */
11073
+ INPUT_OTHER = "INPUT_OTHER",
11074
+ /**
11075
+ * Input contains IP violation.
11076
+ */
11077
+ INPUT_IP_PROHIBITED = "INPUT_IP_PROHIBITED",
11078
+ /**
11079
+ * Input matched blocklist.
11080
+ */
11081
+ BLOCKLIST = "BLOCKLIST",
11082
+ /**
11083
+ * Input is unsafe for image generation.
11084
+ */
11085
+ UNSAFE_PROMPT_FOR_IMAGE_GENERATION = "UNSAFE_PROMPT_FOR_IMAGE_GENERATION",
11086
+ /**
11087
+ * Generated image failed safety check.
11088
+ */
11089
+ GENERATED_IMAGE_SAFETY = "GENERATED_IMAGE_SAFETY",
11090
+ /**
11091
+ * Generated content failed safety check.
11092
+ */
11093
+ GENERATED_CONTENT_SAFETY = "GENERATED_CONTENT_SAFETY",
11094
+ /**
11095
+ * Generated audio failed safety check.
11096
+ */
11097
+ GENERATED_AUDIO_SAFETY = "GENERATED_AUDIO_SAFETY",
11098
+ /**
11099
+ * Generated video failed safety check.
11100
+ */
11101
+ GENERATED_VIDEO_SAFETY = "GENERATED_VIDEO_SAFETY",
11102
+ /**
11103
+ * Generated content is prohibited.
11104
+ */
11105
+ GENERATED_CONTENT_PROHIBITED = "GENERATED_CONTENT_PROHIBITED",
11106
+ /**
11107
+ * Generated content matched blocklist.
11108
+ */
11109
+ GENERATED_CONTENT_BLOCKLIST = "GENERATED_CONTENT_BLOCKLIST",
11110
+ /**
11111
+ * Generated image is prohibited.
11112
+ */
11113
+ GENERATED_IMAGE_PROHIBITED = "GENERATED_IMAGE_PROHIBITED",
11114
+ /**
11115
+ * Generated image contains celebrity.
11116
+ */
11117
+ GENERATED_IMAGE_CELEBRITY = "GENERATED_IMAGE_CELEBRITY",
11118
+ /**
11119
+ * Generated image contains prominent people detected by rewriter.
11120
+ */
11121
+ GENERATED_IMAGE_PROMINENT_PEOPLE_DETECTED_BY_REWRITER = "GENERATED_IMAGE_PROMINENT_PEOPLE_DETECTED_BY_REWRITER",
11122
+ /**
11123
+ * Generated image contains identifiable people.
11124
+ */
11125
+ GENERATED_IMAGE_IDENTIFIABLE_PEOPLE = "GENERATED_IMAGE_IDENTIFIABLE_PEOPLE",
11126
+ /**
11127
+ * Generated image contains minors.
11128
+ */
11129
+ GENERATED_IMAGE_MINORS = "GENERATED_IMAGE_MINORS",
11130
+ /**
11131
+ * Generated image contains IP violation.
11132
+ */
11133
+ OUTPUT_IMAGE_IP_PROHIBITED = "OUTPUT_IMAGE_IP_PROHIBITED",
11134
+ /**
11135
+ * Other generated content issue.
11136
+ */
11137
+ GENERATED_OTHER = "GENERATED_OTHER",
11138
+ /**
11139
+ * Max regeneration attempts reached.
11140
+ */
11141
+ MAX_REGENERATION_REACHED = "MAX_REGENERATION_REACHED"
10896
11142
  }
10897
11143
 
10898
11144
  /** Options about which input is included in the user's turn. */
@@ -11205,6 +11451,7 @@ declare namespace types {
11205
11451
  GenerateVideosSource,
11206
11452
  VideoGenerationReferenceImage,
11207
11453
  VideoGenerationMask,
11454
+ WebhookConfig,
11208
11455
  GenerateVideosConfig,
11209
11456
  GenerateVideosParameters,
11210
11457
  GeneratedVideo,
@@ -11396,19 +11643,21 @@ declare namespace types {
11396
11643
  ContextWindowCompressionConfig,
11397
11644
  AudioTranscriptionConfig,
11398
11645
  ProactivityConfig,
11646
+ CustomizedAvatar,
11647
+ AvatarConfig,
11399
11648
  LiveClientSetup,
11400
11649
  LiveClientContent,
11401
11650
  ActivityStart,
11402
11651
  ActivityEnd,
11403
11652
  LiveClientRealtimeInput,
11404
11653
  LiveClientToolResponse,
11405
- LiveSendRealtimeInputParameters,
11406
11654
  LiveClientMessage,
11407
11655
  LiveConnectConfig,
11408
11656
  LiveConnectParameters,
11409
11657
  CreateChatParameters,
11410
11658
  SendMessageParameters,
11411
11659
  LiveSendClientContentParameters,
11660
+ LiveSendRealtimeInputParameters,
11412
11661
  LiveSendToolResponseParameters,
11413
11662
  LiveMusicClientSetup,
11414
11663
  WeightedPrompt,
@@ -11919,7 +12168,7 @@ declare namespace Usage {
11919
12168
  /**
11920
12169
  * The modality associated with the token count.
11921
12170
  */
11922
- modality?: 'text' | 'image' | 'audio';
12171
+ modality?: 'text' | 'image' | 'audio' | 'video' | 'document';
11923
12172
  /**
11924
12173
  * Number of tokens for the modality.
11925
12174
  */
@@ -11932,7 +12181,7 @@ declare namespace Usage {
11932
12181
  /**
11933
12182
  * The modality associated with the token count.
11934
12183
  */
11935
- modality?: 'text' | 'image' | 'audio';
12184
+ modality?: 'text' | 'image' | 'audio' | 'video' | 'document';
11936
12185
  /**
11937
12186
  * Number of tokens for the modality.
11938
12187
  */
@@ -11945,7 +12194,7 @@ declare namespace Usage {
11945
12194
  /**
11946
12195
  * The modality associated with the token count.
11947
12196
  */
11948
- modality?: 'text' | 'image' | 'audio';
12197
+ modality?: 'text' | 'image' | 'audio' | 'video' | 'document';
11949
12198
  /**
11950
12199
  * Number of tokens for the modality.
11951
12200
  */
@@ -11958,7 +12207,7 @@ declare namespace Usage {
11958
12207
  /**
11959
12208
  * The modality associated with the token count.
11960
12209
  */
11961
- modality?: 'text' | 'image' | 'audio';
12210
+ modality?: 'text' | 'image' | 'audio' | 'video' | 'document';
11962
12211
  /**
11963
12212
  * Number of tokens for the modality.
11964
12213
  */
@@ -12233,6 +12482,484 @@ export declare interface VoiceConfig {
12233
12482
  prebuiltVoiceConfig?: PrebuiltVoiceConfig;
12234
12483
  }
12235
12484
 
12485
+ /** Configuration for webhook notifications.
12486
+
12487
+ Used to configure webhook endpoints that will receive notifications
12488
+ when long-running operations (e.g., batch jobs, video generation) complete. */
12489
+ export declare interface WebhookConfig {
12490
+ /** The webhook URIs to receive notifications. If set, these
12491
+ webhook URIs will be used instead of the registered webhooks. */
12492
+ uris?: string[];
12493
+ /** User metadata that will be included in each webhook event
12494
+ notification. Use this to attach custom key-value data to correlate
12495
+ webhook events with your internal systems. */
12496
+ userMetadata?: Record<string, unknown>;
12497
+ }
12498
+
12499
+ /**
12500
+ * Message for configuring webhook events for a request.
12501
+ */
12502
+ declare interface WebhookConfig_2 {
12503
+ /**
12504
+ * Optional. If set, these webhook URIs will be used for webhook events instead of
12505
+ * the registered webhooks.
12506
+ */
12507
+ uris?: Array<string>;
12508
+ /**
12509
+ * Optional. The user metadata that will be returned on each event emission to the
12510
+ * webhooks.
12511
+ */
12512
+ user_metadata?: {
12513
+ [key: string]: unknown;
12514
+ };
12515
+ }
12516
+
12517
+ declare interface WebhookCreateParams {
12518
+ /**
12519
+ * Path param: Which version of the API to use.
12520
+ */
12521
+ api_version?: string;
12522
+ /**
12523
+ * Body param: Required. The events that the webhook is subscribed to. Available
12524
+ * events:
12525
+ *
12526
+ * - batch.succeeded
12527
+ * - batch.cancelled
12528
+ * - batch.expired
12529
+ * - batch.failed
12530
+ * - interaction.requires_action
12531
+ * - interaction.completed
12532
+ * - interaction.failed
12533
+ * - interaction.cancelled
12534
+ * - video.generated
12535
+ */
12536
+ subscribed_events: Array<'batch.succeeded' | 'batch.cancelled' | 'batch.expired' | 'batch.failed' | 'interaction.requires_action' | 'interaction.completed' | 'interaction.failed' | 'interaction.cancelled' | 'video.generated' | (string & {})>;
12537
+ /**
12538
+ * Body param: Required. The URI to which webhook events will be sent.
12539
+ */
12540
+ uri: string;
12541
+ /**
12542
+ * Query param: Optional. The webhook_id to use for the webhook. If not specified,
12543
+ * the server will generate a unique ID.
12544
+ */
12545
+ webhook_id?: string;
12546
+ /**
12547
+ * Body param: Identifier. The name of the webhook. Format: `webhooks/{webhook_id}`
12548
+ */
12549
+ name?: string;
12550
+ /**
12551
+ * Body param: The state of the webhook.
12552
+ */
12553
+ state?: 'enabled' | 'disabled' | 'disabled_due_to_failed_deliveries';
12554
+ }
12555
+
12556
+ /**
12557
+ * A Webhook resource.
12558
+ */
12559
+ declare interface WebhookCreateResponse {
12560
+ /**
12561
+ * Required. The events that the webhook is subscribed to. Available events:
12562
+ *
12563
+ * - batch.succeeded
12564
+ * - batch.cancelled
12565
+ * - batch.expired
12566
+ * - batch.failed
12567
+ * - interaction.requires_action
12568
+ * - interaction.completed
12569
+ * - interaction.failed
12570
+ * - interaction.cancelled
12571
+ * - video.generated
12572
+ */
12573
+ subscribed_events: Array<'batch.succeeded' | 'batch.cancelled' | 'batch.expired' | 'batch.failed' | 'interaction.requires_action' | 'interaction.completed' | 'interaction.failed' | 'interaction.cancelled' | 'video.generated' | (string & {})>;
12574
+ /**
12575
+ * Required. The URI to which webhook events will be sent.
12576
+ */
12577
+ uri: string;
12578
+ /**
12579
+ * Output only. The timestamp when the webhook was created.
12580
+ */
12581
+ create_time?: string;
12582
+ /**
12583
+ * Identifier. The name of the webhook. Format: `webhooks/{webhook_id}`
12584
+ */
12585
+ name?: string;
12586
+ /**
12587
+ * Output only. The new signing secret for the webhook. Only populated on create.
12588
+ */
12589
+ new_signing_secret?: string;
12590
+ /**
12591
+ * Output only. The signing secrets associated with this webhook.
12592
+ */
12593
+ signing_secrets?: Array<WebhookCreateResponse.SigningSecret>;
12594
+ /**
12595
+ * The state of the webhook.
12596
+ */
12597
+ state?: 'enabled' | 'disabled' | 'disabled_due_to_failed_deliveries';
12598
+ /**
12599
+ * Output only. The timestamp when the webhook was last updated.
12600
+ */
12601
+ update_time?: string;
12602
+ }
12603
+
12604
+ declare namespace WebhookCreateResponse {
12605
+ /**
12606
+ * Represents a signing secret used to verify webhook payloads.
12607
+ */
12608
+ interface SigningSecret {
12609
+ /**
12610
+ * Output only. The expiration date of the signing secret.
12611
+ */
12612
+ expire_time?: string;
12613
+ /**
12614
+ * Output only. The truncated version of the signing secret.
12615
+ */
12616
+ truncated_secret?: string;
12617
+ }
12618
+ }
12619
+
12620
+ declare interface WebhookDeleteParams {
12621
+ /**
12622
+ * Which version of the API to use.
12623
+ */
12624
+ api_version?: string;
12625
+ }
12626
+
12627
+ /**
12628
+ * A generic empty message that you can re-use to avoid defining duplicated empty
12629
+ * messages in your APIs. A typical example is to use it as the request or the
12630
+ * response type of an API method. For instance:
12631
+ *
12632
+ * service Foo {
12633
+ * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
12634
+ * }
12635
+ */
12636
+ declare interface WebhookDeleteResponse {
12637
+ }
12638
+
12639
+ declare interface WebhookListParams {
12640
+ /**
12641
+ * Path param: Which version of the API to use.
12642
+ */
12643
+ api_version?: string;
12644
+ /**
12645
+ * Query param: Optional. The maximum number of webhooks to return. The service may
12646
+ * return fewer than this value. If unspecified, at most 50 webhooks will be
12647
+ * returned. The maximum value is 1000.
12648
+ */
12649
+ page_size?: number;
12650
+ /**
12651
+ * Query param: Optional. A page token, received from a previous `ListWebhooks`
12652
+ * call. Provide this to retrieve the subsequent page.
12653
+ */
12654
+ page_token?: string;
12655
+ }
12656
+
12657
+ /**
12658
+ * Response message for WebhookService.ListWebhooks.
12659
+ */
12660
+ declare interface WebhookListResponse {
12661
+ /**
12662
+ * A token, which can be sent as `page_token` to retrieve the next page. If this
12663
+ * field is omitted, there are no subsequent pages.
12664
+ */
12665
+ next_page_token?: string;
12666
+ /**
12667
+ * The webhooks.
12668
+ */
12669
+ webhooks?: Array<WebhookListResponse.Webhook>;
12670
+ }
12671
+
12672
+ declare namespace WebhookListResponse {
12673
+ /**
12674
+ * A Webhook resource.
12675
+ */
12676
+ interface Webhook {
12677
+ /**
12678
+ * Required. The events that the webhook is subscribed to. Available events:
12679
+ *
12680
+ * - batch.succeeded
12681
+ * - batch.cancelled
12682
+ * - batch.expired
12683
+ * - batch.failed
12684
+ * - interaction.requires_action
12685
+ * - interaction.completed
12686
+ * - interaction.failed
12687
+ * - interaction.cancelled
12688
+ * - video.generated
12689
+ */
12690
+ subscribed_events: Array<'batch.succeeded' | 'batch.cancelled' | 'batch.expired' | 'batch.failed' | 'interaction.requires_action' | 'interaction.completed' | 'interaction.failed' | 'interaction.cancelled' | 'video.generated' | (string & {})>;
12691
+ /**
12692
+ * Required. The URI to which webhook events will be sent.
12693
+ */
12694
+ uri: string;
12695
+ /**
12696
+ * Output only. The timestamp when the webhook was created.
12697
+ */
12698
+ create_time?: string;
12699
+ /**
12700
+ * Identifier. The name of the webhook. Format: `webhooks/{webhook_id}`
12701
+ */
12702
+ name?: string;
12703
+ /**
12704
+ * Output only. The new signing secret for the webhook. Only populated on create.
12705
+ */
12706
+ new_signing_secret?: string;
12707
+ /**
12708
+ * Output only. The signing secrets associated with this webhook.
12709
+ */
12710
+ signing_secrets?: Array<Webhook.SigningSecret>;
12711
+ /**
12712
+ * The state of the webhook.
12713
+ */
12714
+ state?: 'enabled' | 'disabled' | 'disabled_due_to_failed_deliveries';
12715
+ /**
12716
+ * Output only. The timestamp when the webhook was last updated.
12717
+ */
12718
+ update_time?: string;
12719
+ }
12720
+ namespace Webhook {
12721
+ /**
12722
+ * Represents a signing secret used to verify webhook payloads.
12723
+ */
12724
+ interface SigningSecret {
12725
+ /**
12726
+ * Output only. The expiration date of the signing secret.
12727
+ */
12728
+ expire_time?: string;
12729
+ /**
12730
+ * Output only. The truncated version of the signing secret.
12731
+ */
12732
+ truncated_secret?: string;
12733
+ }
12734
+ }
12735
+ }
12736
+
12737
+ declare interface WebhookPingParams {
12738
+ /**
12739
+ * Path param: Which version of the API to use.
12740
+ */
12741
+ api_version?: string;
12742
+ /**
12743
+ * Body param: Request message for WebhookService.PingWebhook.
12744
+ */
12745
+ body?: WebhookPingParams.Body;
12746
+ }
12747
+
12748
+ declare namespace WebhookPingParams {
12749
+ /**
12750
+ * Request message for WebhookService.PingWebhook.
12751
+ */
12752
+ interface Body {
12753
+ }
12754
+ }
12755
+
12756
+ /**
12757
+ * Response message for WebhookService.PingWebhook.
12758
+ */
12759
+ declare interface WebhookPingResponse {
12760
+ }
12761
+
12762
+ declare interface WebhookRetrieveParams {
12763
+ /**
12764
+ * Which version of the API to use.
12765
+ */
12766
+ api_version?: string;
12767
+ }
12768
+
12769
+ /**
12770
+ * A Webhook resource.
12771
+ */
12772
+ declare interface WebhookRetrieveResponse {
12773
+ /**
12774
+ * Required. The events that the webhook is subscribed to. Available events:
12775
+ *
12776
+ * - batch.succeeded
12777
+ * - batch.cancelled
12778
+ * - batch.expired
12779
+ * - batch.failed
12780
+ * - interaction.requires_action
12781
+ * - interaction.completed
12782
+ * - interaction.failed
12783
+ * - interaction.cancelled
12784
+ * - video.generated
12785
+ */
12786
+ subscribed_events: Array<'batch.succeeded' | 'batch.cancelled' | 'batch.expired' | 'batch.failed' | 'interaction.requires_action' | 'interaction.completed' | 'interaction.failed' | 'interaction.cancelled' | 'video.generated' | (string & {})>;
12787
+ /**
12788
+ * Required. The URI to which webhook events will be sent.
12789
+ */
12790
+ uri: string;
12791
+ /**
12792
+ * Output only. The timestamp when the webhook was created.
12793
+ */
12794
+ create_time?: string;
12795
+ /**
12796
+ * Identifier. The name of the webhook. Format: `webhooks/{webhook_id}`
12797
+ */
12798
+ name?: string;
12799
+ /**
12800
+ * Output only. The new signing secret for the webhook. Only populated on create.
12801
+ */
12802
+ new_signing_secret?: string;
12803
+ /**
12804
+ * Output only. The signing secrets associated with this webhook.
12805
+ */
12806
+ signing_secrets?: Array<WebhookRetrieveResponse.SigningSecret>;
12807
+ /**
12808
+ * The state of the webhook.
12809
+ */
12810
+ state?: 'enabled' | 'disabled' | 'disabled_due_to_failed_deliveries';
12811
+ /**
12812
+ * Output only. The timestamp when the webhook was last updated.
12813
+ */
12814
+ update_time?: string;
12815
+ }
12816
+
12817
+ declare namespace WebhookRetrieveResponse {
12818
+ /**
12819
+ * Represents a signing secret used to verify webhook payloads.
12820
+ */
12821
+ interface SigningSecret {
12822
+ /**
12823
+ * Output only. The expiration date of the signing secret.
12824
+ */
12825
+ expire_time?: string;
12826
+ /**
12827
+ * Output only. The truncated version of the signing secret.
12828
+ */
12829
+ truncated_secret?: string;
12830
+ }
12831
+ }
12832
+
12833
+ declare interface WebhookRotateSigningSecretParams {
12834
+ /**
12835
+ * Path param: Which version of the API to use.
12836
+ */
12837
+ api_version?: string;
12838
+ /**
12839
+ * Body param: Optional. The revocation behavior for previous signing secrets.
12840
+ */
12841
+ revocation_behavior?: 'revoke_previous_secrets_after_h24' | 'revoke_previous_secrets_immediately';
12842
+ }
12843
+
12844
+ /**
12845
+ * Response message for WebhookService.RotateSigningSecret.
12846
+ */
12847
+ declare interface WebhookRotateSigningSecretResponse {
12848
+ /**
12849
+ * Output only. The newly generated signing secret.
12850
+ */
12851
+ secret?: string;
12852
+ }
12853
+
12854
+ export declare class Webhooks extends BaseWebhooks {
12855
+ }
12856
+
12857
+ export declare namespace Webhooks {
12858
+ export { type WebhookCreateResponse as WebhookCreateResponse, type WebhookRetrieveResponse as WebhookRetrieveResponse, type WebhookUpdateResponse as WebhookUpdateResponse, type WebhookListResponse as WebhookListResponse, type WebhookDeleteResponse as WebhookDeleteResponse, type WebhookPingResponse as WebhookPingResponse, type WebhookRotateSigningSecretResponse as WebhookRotateSigningSecretResponse, type WebhookCreateParams as WebhookCreateParams, type WebhookRetrieveParams as WebhookRetrieveParams, type WebhookUpdateParams as WebhookUpdateParams, type WebhookListParams as WebhookListParams, type WebhookDeleteParams as WebhookDeleteParams, type WebhookPingParams as WebhookPingParams, type WebhookRotateSigningSecretParams as WebhookRotateSigningSecretParams, };
12859
+ }
12860
+
12861
+ declare interface WebhookUpdateParams {
12862
+ /**
12863
+ * Path param: Which version of the API to use.
12864
+ */
12865
+ api_version?: string;
12866
+ /**
12867
+ * Body param: Required. The events that the webhook is subscribed to. Available
12868
+ * events:
12869
+ *
12870
+ * - batch.succeeded
12871
+ * - batch.cancelled
12872
+ * - batch.expired
12873
+ * - batch.failed
12874
+ * - interaction.requires_action
12875
+ * - interaction.completed
12876
+ * - interaction.failed
12877
+ * - interaction.cancelled
12878
+ * - video.generated
12879
+ */
12880
+ subscribed_events: Array<'batch.succeeded' | 'batch.cancelled' | 'batch.expired' | 'batch.failed' | 'interaction.requires_action' | 'interaction.completed' | 'interaction.failed' | 'interaction.cancelled' | 'video.generated' | (string & {})>;
12881
+ /**
12882
+ * Body param: Required. The URI to which webhook events will be sent.
12883
+ */
12884
+ uri: string;
12885
+ /**
12886
+ * Query param: Optional. The list of fields to update.
12887
+ */
12888
+ update_mask?: string;
12889
+ /**
12890
+ * Body param: Identifier. The name of the webhook. Format: `webhooks/{webhook_id}`
12891
+ */
12892
+ name?: string;
12893
+ /**
12894
+ * Body param: The state of the webhook.
12895
+ */
12896
+ state?: 'enabled' | 'disabled' | 'disabled_due_to_failed_deliveries';
12897
+ }
12898
+
12899
+ /**
12900
+ * A Webhook resource.
12901
+ */
12902
+ declare interface WebhookUpdateResponse {
12903
+ /**
12904
+ * Required. The events that the webhook is subscribed to. Available events:
12905
+ *
12906
+ * - batch.succeeded
12907
+ * - batch.cancelled
12908
+ * - batch.expired
12909
+ * - batch.failed
12910
+ * - interaction.requires_action
12911
+ * - interaction.completed
12912
+ * - interaction.failed
12913
+ * - interaction.cancelled
12914
+ * - video.generated
12915
+ */
12916
+ subscribed_events: Array<'batch.succeeded' | 'batch.cancelled' | 'batch.expired' | 'batch.failed' | 'interaction.requires_action' | 'interaction.completed' | 'interaction.failed' | 'interaction.cancelled' | 'video.generated' | (string & {})>;
12917
+ /**
12918
+ * Required. The URI to which webhook events will be sent.
12919
+ */
12920
+ uri: string;
12921
+ /**
12922
+ * Output only. The timestamp when the webhook was created.
12923
+ */
12924
+ create_time?: string;
12925
+ /**
12926
+ * Identifier. The name of the webhook. Format: `webhooks/{webhook_id}`
12927
+ */
12928
+ name?: string;
12929
+ /**
12930
+ * Output only. The new signing secret for the webhook. Only populated on create.
12931
+ */
12932
+ new_signing_secret?: string;
12933
+ /**
12934
+ * Output only. The signing secrets associated with this webhook.
12935
+ */
12936
+ signing_secrets?: Array<WebhookUpdateResponse.SigningSecret>;
12937
+ /**
12938
+ * The state of the webhook.
12939
+ */
12940
+ state?: 'enabled' | 'disabled' | 'disabled_due_to_failed_deliveries';
12941
+ /**
12942
+ * Output only. The timestamp when the webhook was last updated.
12943
+ */
12944
+ update_time?: string;
12945
+ }
12946
+
12947
+ declare namespace WebhookUpdateResponse {
12948
+ /**
12949
+ * Represents a signing secret used to verify webhook payloads.
12950
+ */
12951
+ interface SigningSecret {
12952
+ /**
12953
+ * Output only. The expiration date of the signing secret.
12954
+ */
12955
+ expire_time?: string;
12956
+ /**
12957
+ * Output only. The truncated version of the signing secret.
12958
+ */
12959
+ truncated_secret?: string;
12960
+ }
12961
+ }
12962
+
12236
12963
  /** Standard web search for grounding and related configurations. Only text results are returned. */
12237
12964
  export declare interface WebSearch {
12238
12965
  }