@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/genai.d.ts +812 -85
- package/dist/index.cjs +348 -203
- package/dist/index.mjs +348 -203
- package/dist/index.mjs.map +1 -1
- package/dist/node/index.cjs +348 -200
- package/dist/node/index.mjs +348 -200
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/node.d.ts +812 -85
- package/dist/tokenizer/node.cjs +100 -0
- package/dist/tokenizer/node.d.ts +5 -1
- package/dist/tokenizer/node.mjs +100 -0
- package/dist/tokenizer/node.mjs.map +1 -1
- package/dist/vertex_internal/index.cjs +103 -2
- package/dist/vertex_internal/index.cjs.map +1 -1
- package/dist/vertex_internal/index.d.ts +169 -3
- package/dist/vertex_internal/index.js +103 -2
- package/dist/vertex_internal/index.js.map +1 -1
- package/dist/web/index.mjs +349 -200
- package/dist/web/index.mjs.map +1 -1
- package/dist/web/web.d.ts +812 -85
- package/package.json +1 -1
package/dist/node/node.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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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:
|
|
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
|
|
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
|
|
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
|
|
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. */
|
|
@@ -5262,7 +5370,11 @@ export declare class GoogleGenAI {
|
|
|
5262
5370
|
readonly tunings: Tunings;
|
|
5263
5371
|
readonly fileSearchStores: FileSearchStores;
|
|
5264
5372
|
private _interactions;
|
|
5373
|
+
private _webhooks;
|
|
5374
|
+
private _nextGenClient;
|
|
5375
|
+
private getNextGenClient;
|
|
5265
5376
|
get interactions(): Interactions;
|
|
5377
|
+
get webhooks(): Webhooks;
|
|
5266
5378
|
constructor(options: GoogleGenAIOptions);
|
|
5267
5379
|
}
|
|
5268
5380
|
|
|
@@ -5391,8 +5503,8 @@ declare namespace GoogleMapsResult {
|
|
|
5391
5503
|
*/
|
|
5392
5504
|
place_id?: string;
|
|
5393
5505
|
/**
|
|
5394
|
-
* Snippets of reviews that are used to generate answers about the
|
|
5395
|
-
*
|
|
5506
|
+
* Snippets of reviews that are used to generate answers about the features of a
|
|
5507
|
+
* given place in Google Maps.
|
|
5396
5508
|
*/
|
|
5397
5509
|
review_snippets?: Array<Place.ReviewSnippet>;
|
|
5398
5510
|
/**
|
|
@@ -5402,8 +5514,8 @@ declare namespace GoogleMapsResult {
|
|
|
5402
5514
|
}
|
|
5403
5515
|
namespace Place {
|
|
5404
5516
|
/**
|
|
5405
|
-
* Encapsulates a snippet of a user review that answers a question about
|
|
5406
|
-
*
|
|
5517
|
+
* Encapsulates a snippet of a user review that answers a question about the
|
|
5518
|
+
* features of a specific place in Google Maps.
|
|
5407
5519
|
*/
|
|
5408
5520
|
interface ReviewSnippet {
|
|
5409
5521
|
/**
|
|
@@ -5489,7 +5601,7 @@ declare interface GoogleSearchCallContent {
|
|
|
5489
5601
|
/**
|
|
5490
5602
|
* The type of search grounding enabled.
|
|
5491
5603
|
*/
|
|
5492
|
-
search_type?: 'web_search' | 'image_search';
|
|
5604
|
+
search_type?: 'web_search' | 'image_search' | 'enterprise_web_search';
|
|
5493
5605
|
/**
|
|
5494
5606
|
* A signature hash for backend validation.
|
|
5495
5607
|
*/
|
|
@@ -6235,8 +6347,8 @@ declare interface Interaction {
|
|
|
6235
6347
|
*/
|
|
6236
6348
|
id: string;
|
|
6237
6349
|
/**
|
|
6238
|
-
* Required. Output only. The time at which the response was created in ISO 8601
|
|
6239
|
-
* (YYYY-MM-DDThh:mm:ssZ).
|
|
6350
|
+
* Required. Output only. The time at which the response was created in ISO 8601
|
|
6351
|
+
* format (YYYY-MM-DDThh:mm:ssZ).
|
|
6240
6352
|
*/
|
|
6241
6353
|
created: string;
|
|
6242
6354
|
/**
|
|
@@ -6244,8 +6356,8 @@ declare interface Interaction {
|
|
|
6244
6356
|
*/
|
|
6245
6357
|
status: 'in_progress' | 'requires_action' | 'completed' | 'failed' | 'cancelled' | 'incomplete';
|
|
6246
6358
|
/**
|
|
6247
|
-
* Required. Output only. The time at which the response was last updated in ISO
|
|
6248
|
-
* (YYYY-MM-DDThh:mm:ssZ).
|
|
6359
|
+
* Required. Output only. The time at which the response was last updated in ISO
|
|
6360
|
+
* 8601 format (YYYY-MM-DDThh:mm:ssZ).
|
|
6249
6361
|
*/
|
|
6250
6362
|
updated: string;
|
|
6251
6363
|
/**
|
|
@@ -6273,8 +6385,8 @@ declare interface Interaction {
|
|
|
6273
6385
|
*/
|
|
6274
6386
|
previous_interaction_id?: string;
|
|
6275
6387
|
/**
|
|
6276
|
-
* Enforces that the generated response is a JSON object that complies with
|
|
6277
|
-
*
|
|
6388
|
+
* Enforces that the generated response is a JSON object that complies with the
|
|
6389
|
+
* JSON schema specified in this field.
|
|
6278
6390
|
*/
|
|
6279
6391
|
response_format?: unknown;
|
|
6280
6392
|
/**
|
|
@@ -6284,7 +6396,7 @@ declare interface Interaction {
|
|
|
6284
6396
|
/**
|
|
6285
6397
|
* The requested modalities of the response (TEXT, IMAGE, AUDIO).
|
|
6286
6398
|
*/
|
|
6287
|
-
response_modalities?: Array<'text' | 'image' | 'audio'>;
|
|
6399
|
+
response_modalities?: Array<'text' | 'image' | 'audio' | 'video' | 'document'>;
|
|
6288
6400
|
/**
|
|
6289
6401
|
* Output only. The role of the interaction.
|
|
6290
6402
|
*/
|
|
@@ -6305,6 +6417,11 @@ declare interface Interaction {
|
|
|
6305
6417
|
* Output only. Statistics on the interaction request's token usage.
|
|
6306
6418
|
*/
|
|
6307
6419
|
usage?: Usage;
|
|
6420
|
+
/**
|
|
6421
|
+
* Optional. Webhook configuration for receiving notifications when the interaction
|
|
6422
|
+
* completes.
|
|
6423
|
+
*/
|
|
6424
|
+
webhook_config?: WebhookConfig_2;
|
|
6308
6425
|
}
|
|
6309
6426
|
|
|
6310
6427
|
declare interface InteractionCancelParams {
|
|
@@ -6317,13 +6434,12 @@ declare interface InteractionCancelParams {
|
|
|
6317
6434
|
declare interface InteractionCompleteEvent {
|
|
6318
6435
|
event_type: 'interaction.complete';
|
|
6319
6436
|
/**
|
|
6320
|
-
* Required. The completed interaction with empty outputs to reduce the payload
|
|
6321
|
-
* Use the preceding ContentDelta events for the actual output.
|
|
6437
|
+
* Required. The completed interaction with empty outputs to reduce the payload
|
|
6438
|
+
* size. Use the preceding ContentDelta events for the actual output.
|
|
6322
6439
|
*/
|
|
6323
6440
|
interaction: Interaction;
|
|
6324
6441
|
/**
|
|
6325
|
-
* The event_id token to be used to resume the interaction stream, from
|
|
6326
|
-
* this event.
|
|
6442
|
+
* The event_id token to be used to resume the interaction stream, from this event.
|
|
6327
6443
|
*/
|
|
6328
6444
|
event_id?: string;
|
|
6329
6445
|
}
|
|
@@ -6356,25 +6472,30 @@ declare interface InteractionGetParamsBase {
|
|
|
6356
6472
|
*/
|
|
6357
6473
|
include_input?: boolean;
|
|
6358
6474
|
/**
|
|
6359
|
-
* Query param: Optional. If set, resumes the interaction stream from the next
|
|
6475
|
+
* Query param: Optional. If set, resumes the interaction stream from the next
|
|
6476
|
+
* chunk after the event marked by the event id. Can only be used if `stream` is
|
|
6477
|
+
* true.
|
|
6360
6478
|
*/
|
|
6361
6479
|
last_event_id?: string;
|
|
6362
6480
|
/**
|
|
6363
|
-
* Query param: If set to true, the generated content will be streamed
|
|
6481
|
+
* Query param: If set to true, the generated content will be streamed
|
|
6482
|
+
* incrementally.
|
|
6364
6483
|
*/
|
|
6365
6484
|
stream?: boolean;
|
|
6366
6485
|
}
|
|
6367
6486
|
|
|
6368
6487
|
declare interface InteractionGetParamsNonStreaming extends InteractionGetParamsBase {
|
|
6369
6488
|
/**
|
|
6370
|
-
* Query param: If set to true, the generated content will be streamed
|
|
6489
|
+
* Query param: If set to true, the generated content will be streamed
|
|
6490
|
+
* incrementally.
|
|
6371
6491
|
*/
|
|
6372
6492
|
stream?: false;
|
|
6373
6493
|
}
|
|
6374
6494
|
|
|
6375
6495
|
declare interface InteractionGetParamsStreaming extends InteractionGetParamsBase {
|
|
6376
6496
|
/**
|
|
6377
|
-
* Query param: If set to true, the generated content will be streamed
|
|
6497
|
+
* Query param: If set to true, the generated content will be streamed
|
|
6498
|
+
* incrementally.
|
|
6378
6499
|
*/
|
|
6379
6500
|
stream: true;
|
|
6380
6501
|
}
|
|
@@ -6383,7 +6504,7 @@ export declare class Interactions extends BaseInteractions {
|
|
|
6383
6504
|
}
|
|
6384
6505
|
|
|
6385
6506
|
export declare namespace Interactions {
|
|
6386
|
-
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, };
|
|
6507
|
+
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, };
|
|
6387
6508
|
}
|
|
6388
6509
|
|
|
6389
6510
|
declare namespace InteractionsAPI {
|
|
@@ -6445,6 +6566,7 @@ declare namespace InteractionsAPI {
|
|
|
6445
6566
|
URLContextResultContent,
|
|
6446
6567
|
Usage,
|
|
6447
6568
|
VideoContent,
|
|
6569
|
+
WebhookConfig_2 as WebhookConfig,
|
|
6448
6570
|
InteractionDeleteResponse,
|
|
6449
6571
|
InteractionCreateParams,
|
|
6450
6572
|
BaseCreateModelInteractionParams,
|
|
@@ -6471,8 +6593,7 @@ declare interface InteractionStartEvent {
|
|
|
6471
6593
|
*/
|
|
6472
6594
|
interaction: Interaction;
|
|
6473
6595
|
/**
|
|
6474
|
-
* The event_id token to be used to resume the interaction stream, from
|
|
6475
|
-
* this event.
|
|
6596
|
+
* The event_id token to be used to resume the interaction stream, from this event.
|
|
6476
6597
|
*/
|
|
6477
6598
|
event_id?: string;
|
|
6478
6599
|
}
|
|
@@ -6482,8 +6603,7 @@ declare interface InteractionStatusUpdate {
|
|
|
6482
6603
|
interaction_id: string;
|
|
6483
6604
|
status: 'in_progress' | 'requires_action' | 'completed' | 'failed' | 'cancelled' | 'incomplete';
|
|
6484
6605
|
/**
|
|
6485
|
-
* The event_id token to be used to resume the interaction stream, from
|
|
6486
|
-
* this event.
|
|
6606
|
+
* The event_id token to be used to resume the interaction stream, from this event.
|
|
6487
6607
|
*/
|
|
6488
6608
|
event_id?: string;
|
|
6489
6609
|
}
|
|
@@ -7000,6 +7120,12 @@ export declare interface LiveClientSetup {
|
|
|
7000
7120
|
vad_signal to indicate the start and end of speech. This allows the server
|
|
7001
7121
|
to process the audio more efficiently. */
|
|
7002
7122
|
explicitVadSignal?: boolean;
|
|
7123
|
+
/** Configures the avatar model behavior. */
|
|
7124
|
+
avatarConfig?: AvatarConfig;
|
|
7125
|
+
/** Safety settings in the request to block unsafe content in the
|
|
7126
|
+
response.
|
|
7127
|
+
*/
|
|
7128
|
+
safetySettings?: SafetySetting[];
|
|
7003
7129
|
}
|
|
7004
7130
|
|
|
7005
7131
|
/** Client generated response to a `ToolCall` received from the server.
|
|
@@ -7106,6 +7232,12 @@ export declare interface LiveConnectConfig {
|
|
|
7106
7232
|
vad_signal to indicate the start and end of speech. This allows the server
|
|
7107
7233
|
to process the audio more efficiently. */
|
|
7108
7234
|
explicitVadSignal?: boolean;
|
|
7235
|
+
/** Configures the avatar model behavior. */
|
|
7236
|
+
avatarConfig?: AvatarConfig;
|
|
7237
|
+
/** Safety settings in the request to block unsafe content in the
|
|
7238
|
+
response.
|
|
7239
|
+
*/
|
|
7240
|
+
safetySettings?: SafetySetting[];
|
|
7109
7241
|
}
|
|
7110
7242
|
|
|
7111
7243
|
/** Config for LiveConnectConstraints for Auth Token creation. */
|
|
@@ -7807,7 +7939,11 @@ export declare enum Modality {
|
|
|
7807
7939
|
/**
|
|
7808
7940
|
* Indicates the model should return audio.
|
|
7809
7941
|
*/
|
|
7810
|
-
AUDIO = "AUDIO"
|
|
7942
|
+
AUDIO = "AUDIO",
|
|
7943
|
+
/**
|
|
7944
|
+
* Indicates the model should return video.
|
|
7945
|
+
*/
|
|
7946
|
+
VIDEO = "VIDEO"
|
|
7811
7947
|
}
|
|
7812
7948
|
|
|
7813
7949
|
/** Represents token counting info for a single modality. */
|
|
@@ -7874,7 +8010,8 @@ export declare interface Model {
|
|
|
7874
8010
|
}
|
|
7875
8011
|
|
|
7876
8012
|
/**
|
|
7877
|
-
* The model that will complete your prompt.\n\nSee
|
|
8013
|
+
* The model that will complete your prompt.\n\nSee
|
|
8014
|
+
* [models](https://ai.google.dev/gemini-api/docs/models) for additional details.
|
|
7878
8015
|
*/
|
|
7879
8016
|
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 & {});
|
|
7880
8017
|
|
|
@@ -8137,29 +8274,15 @@ export declare class Models extends BaseModule {
|
|
|
8137
8274
|
/**
|
|
8138
8275
|
* Recontextualizes an image.
|
|
8139
8276
|
*
|
|
8140
|
-
* There
|
|
8141
|
-
* 1)
|
|
8142
|
-
* and contexts.
|
|
8143
|
-
* 2) Virtual Try-On: Generate images of persons modeling fashion products.
|
|
8277
|
+
* There is one type of recontextualization currently supported:
|
|
8278
|
+
* 1) Virtual Try-On: Generate images of persons modeling fashion products.
|
|
8144
8279
|
*
|
|
8145
8280
|
* @param params - The parameters for recontextualizing an image.
|
|
8146
8281
|
* @return The response from the API.
|
|
8147
8282
|
*
|
|
8148
8283
|
* @example
|
|
8149
8284
|
* ```ts
|
|
8150
|
-
* const
|
|
8151
|
-
* model: 'imagen-product-recontext-preview-06-30',
|
|
8152
|
-
* source: {
|
|
8153
|
-
* prompt: 'In a modern kitchen setting.',
|
|
8154
|
-
* productImages: [productImage],
|
|
8155
|
-
* },
|
|
8156
|
-
* config: {
|
|
8157
|
-
* numberOfImages: 1,
|
|
8158
|
-
* },
|
|
8159
|
-
* });
|
|
8160
|
-
* console.log(response1?.generatedImages?.[0]?.image?.imageBytes);
|
|
8161
|
-
*
|
|
8162
|
-
* const response2 = await ai.models.recontextImage({
|
|
8285
|
+
* const response = await ai.models.recontextImage({
|
|
8163
8286
|
* model: 'virtual-try-on-001',
|
|
8164
8287
|
* source: {
|
|
8165
8288
|
* personImage: personImage,
|
|
@@ -8169,7 +8292,7 @@ export declare class Models extends BaseModule {
|
|
|
8169
8292
|
* numberOfImages: 1,
|
|
8170
8293
|
* },
|
|
8171
8294
|
* });
|
|
8172
|
-
* console.log(
|
|
8295
|
+
* console.log(response?.generatedImages?.[0]?.image?.imageBytes);
|
|
8173
8296
|
* ```
|
|
8174
8297
|
*/
|
|
8175
8298
|
recontextImage(params: types.RecontextImageParameters): Promise<types.RecontextImageResponse>;
|
|
@@ -8828,8 +8951,8 @@ declare interface PlaceCitation {
|
|
|
8828
8951
|
*/
|
|
8829
8952
|
place_id?: string;
|
|
8830
8953
|
/**
|
|
8831
|
-
* Snippets of reviews that are used to generate answers about the
|
|
8832
|
-
*
|
|
8954
|
+
* Snippets of reviews that are used to generate answers about the features of a
|
|
8955
|
+
* given place in Google Maps.
|
|
8833
8956
|
*/
|
|
8834
8957
|
review_snippets?: Array<PlaceCitation.ReviewSnippet>;
|
|
8835
8958
|
/**
|
|
@@ -8846,8 +8969,8 @@ declare interface PlaceCitation {
|
|
|
8846
8969
|
|
|
8847
8970
|
declare namespace PlaceCitation {
|
|
8848
8971
|
/**
|
|
8849
|
-
* Encapsulates a snippet of a user review that answers a question about
|
|
8850
|
-
*
|
|
8972
|
+
* Encapsulates a snippet of a user review that answers a question about the
|
|
8973
|
+
* features of a specific place in Google Maps.
|
|
8851
8974
|
*/
|
|
8852
8975
|
interface ReviewSnippet {
|
|
8853
8976
|
/**
|
|
@@ -10335,7 +10458,7 @@ export declare interface Tool {
|
|
|
10335
10458
|
/**
|
|
10336
10459
|
* A tool that can be used by the model.
|
|
10337
10460
|
*/
|
|
10338
|
-
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;
|
|
10461
|
+
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;
|
|
10339
10462
|
|
|
10340
10463
|
declare namespace Tool_2 {
|
|
10341
10464
|
/**
|
|
@@ -10384,8 +10507,7 @@ declare namespace Tool_2 {
|
|
|
10384
10507
|
*/
|
|
10385
10508
|
name?: string;
|
|
10386
10509
|
/**
|
|
10387
|
-
* The full URL for the MCPServer endpoint.
|
|
10388
|
-
* Example: "https://api.example.com/mcp"
|
|
10510
|
+
* The full URL for the MCPServer endpoint. Example: "https://api.example.com/mcp"
|
|
10389
10511
|
*/
|
|
10390
10512
|
url?: string;
|
|
10391
10513
|
}
|
|
@@ -10397,7 +10519,7 @@ declare namespace Tool_2 {
|
|
|
10397
10519
|
/**
|
|
10398
10520
|
* The types of search grounding to enable.
|
|
10399
10521
|
*/
|
|
10400
|
-
search_types?: Array<'web_search' | 'image_search'>;
|
|
10522
|
+
search_types?: Array<'web_search' | 'image_search' | 'enterprise_web_search'>;
|
|
10401
10523
|
}
|
|
10402
10524
|
/**
|
|
10403
10525
|
* A tool that can be used by the model to search files.
|
|
@@ -10436,6 +10558,35 @@ declare namespace Tool_2 {
|
|
|
10436
10558
|
*/
|
|
10437
10559
|
longitude?: number;
|
|
10438
10560
|
}
|
|
10561
|
+
/**
|
|
10562
|
+
* A tool that can be used by the model to retrieve files.
|
|
10563
|
+
*/
|
|
10564
|
+
interface Retrieval {
|
|
10565
|
+
type: 'retrieval';
|
|
10566
|
+
/**
|
|
10567
|
+
* The types of file retrieval to enable.
|
|
10568
|
+
*/
|
|
10569
|
+
retrieval_types?: Array<'vertex_ai_search'>;
|
|
10570
|
+
/**
|
|
10571
|
+
* Used to specify configuration for VertexAISearch.
|
|
10572
|
+
*/
|
|
10573
|
+
vertex_ai_search_config?: Retrieval.VertexAISearchConfig;
|
|
10574
|
+
}
|
|
10575
|
+
namespace Retrieval {
|
|
10576
|
+
/**
|
|
10577
|
+
* Used to specify configuration for VertexAISearch.
|
|
10578
|
+
*/
|
|
10579
|
+
interface VertexAISearchConfig {
|
|
10580
|
+
/**
|
|
10581
|
+
* Optional. Used to specify Vertex AI Search datastores.
|
|
10582
|
+
*/
|
|
10583
|
+
datastores?: Array<string>;
|
|
10584
|
+
/**
|
|
10585
|
+
* Optional. Used to specify Vertex AI Search engine.
|
|
10586
|
+
*/
|
|
10587
|
+
engine?: string;
|
|
10588
|
+
}
|
|
10589
|
+
}
|
|
10439
10590
|
}
|
|
10440
10591
|
|
|
10441
10592
|
/** A predicted server-side `ToolCall` returned from the model.
|
|
@@ -10876,8 +11027,7 @@ export declare interface TuningValidationDataset {
|
|
|
10876
11027
|
declare interface Turn {
|
|
10877
11028
|
content?: Array<Content_2> | string;
|
|
10878
11029
|
/**
|
|
10879
|
-
* The originator of this turn. Must be user for input or model for
|
|
10880
|
-
* model output.
|
|
11030
|
+
* The originator of this turn. Must be user for input or model for model output.
|
|
10881
11031
|
*/
|
|
10882
11032
|
role?: string;
|
|
10883
11033
|
}
|
|
@@ -10899,7 +11049,103 @@ export declare enum TurnCompleteReason {
|
|
|
10899
11049
|
/**
|
|
10900
11050
|
* Needs more input from the user.
|
|
10901
11051
|
*/
|
|
10902
|
-
NEED_MORE_INPUT = "NEED_MORE_INPUT"
|
|
11052
|
+
NEED_MORE_INPUT = "NEED_MORE_INPUT",
|
|
11053
|
+
/**
|
|
11054
|
+
* Input content is prohibited.
|
|
11055
|
+
*/
|
|
11056
|
+
PROHIBITED_INPUT_CONTENT = "PROHIBITED_INPUT_CONTENT",
|
|
11057
|
+
/**
|
|
11058
|
+
* Input image contains prohibited content.
|
|
11059
|
+
*/
|
|
11060
|
+
IMAGE_PROHIBITED_INPUT_CONTENT = "IMAGE_PROHIBITED_INPUT_CONTENT",
|
|
11061
|
+
/**
|
|
11062
|
+
* Input text contains prominent person reference.
|
|
11063
|
+
*/
|
|
11064
|
+
INPUT_TEXT_CONTAIN_PROMINENT_PERSON_PROHIBITED = "INPUT_TEXT_CONTAIN_PROMINENT_PERSON_PROHIBITED",
|
|
11065
|
+
/**
|
|
11066
|
+
* Input image contains celebrity.
|
|
11067
|
+
*/
|
|
11068
|
+
INPUT_IMAGE_CELEBRITY = "INPUT_IMAGE_CELEBRITY",
|
|
11069
|
+
/**
|
|
11070
|
+
* Input image contains photo realistic child.
|
|
11071
|
+
*/
|
|
11072
|
+
INPUT_IMAGE_PHOTO_REALISTIC_CHILD_PROHIBITED = "INPUT_IMAGE_PHOTO_REALISTIC_CHILD_PROHIBITED",
|
|
11073
|
+
/**
|
|
11074
|
+
* Input text contains NCII content.
|
|
11075
|
+
*/
|
|
11076
|
+
INPUT_TEXT_NCII_PROHIBITED = "INPUT_TEXT_NCII_PROHIBITED",
|
|
11077
|
+
/**
|
|
11078
|
+
* Other input safety issue.
|
|
11079
|
+
*/
|
|
11080
|
+
INPUT_OTHER = "INPUT_OTHER",
|
|
11081
|
+
/**
|
|
11082
|
+
* Input contains IP violation.
|
|
11083
|
+
*/
|
|
11084
|
+
INPUT_IP_PROHIBITED = "INPUT_IP_PROHIBITED",
|
|
11085
|
+
/**
|
|
11086
|
+
* Input matched blocklist.
|
|
11087
|
+
*/
|
|
11088
|
+
BLOCKLIST = "BLOCKLIST",
|
|
11089
|
+
/**
|
|
11090
|
+
* Input is unsafe for image generation.
|
|
11091
|
+
*/
|
|
11092
|
+
UNSAFE_PROMPT_FOR_IMAGE_GENERATION = "UNSAFE_PROMPT_FOR_IMAGE_GENERATION",
|
|
11093
|
+
/**
|
|
11094
|
+
* Generated image failed safety check.
|
|
11095
|
+
*/
|
|
11096
|
+
GENERATED_IMAGE_SAFETY = "GENERATED_IMAGE_SAFETY",
|
|
11097
|
+
/**
|
|
11098
|
+
* Generated content failed safety check.
|
|
11099
|
+
*/
|
|
11100
|
+
GENERATED_CONTENT_SAFETY = "GENERATED_CONTENT_SAFETY",
|
|
11101
|
+
/**
|
|
11102
|
+
* Generated audio failed safety check.
|
|
11103
|
+
*/
|
|
11104
|
+
GENERATED_AUDIO_SAFETY = "GENERATED_AUDIO_SAFETY",
|
|
11105
|
+
/**
|
|
11106
|
+
* Generated video failed safety check.
|
|
11107
|
+
*/
|
|
11108
|
+
GENERATED_VIDEO_SAFETY = "GENERATED_VIDEO_SAFETY",
|
|
11109
|
+
/**
|
|
11110
|
+
* Generated content is prohibited.
|
|
11111
|
+
*/
|
|
11112
|
+
GENERATED_CONTENT_PROHIBITED = "GENERATED_CONTENT_PROHIBITED",
|
|
11113
|
+
/**
|
|
11114
|
+
* Generated content matched blocklist.
|
|
11115
|
+
*/
|
|
11116
|
+
GENERATED_CONTENT_BLOCKLIST = "GENERATED_CONTENT_BLOCKLIST",
|
|
11117
|
+
/**
|
|
11118
|
+
* Generated image is prohibited.
|
|
11119
|
+
*/
|
|
11120
|
+
GENERATED_IMAGE_PROHIBITED = "GENERATED_IMAGE_PROHIBITED",
|
|
11121
|
+
/**
|
|
11122
|
+
* Generated image contains celebrity.
|
|
11123
|
+
*/
|
|
11124
|
+
GENERATED_IMAGE_CELEBRITY = "GENERATED_IMAGE_CELEBRITY",
|
|
11125
|
+
/**
|
|
11126
|
+
* Generated image contains prominent people detected by rewriter.
|
|
11127
|
+
*/
|
|
11128
|
+
GENERATED_IMAGE_PROMINENT_PEOPLE_DETECTED_BY_REWRITER = "GENERATED_IMAGE_PROMINENT_PEOPLE_DETECTED_BY_REWRITER",
|
|
11129
|
+
/**
|
|
11130
|
+
* Generated image contains identifiable people.
|
|
11131
|
+
*/
|
|
11132
|
+
GENERATED_IMAGE_IDENTIFIABLE_PEOPLE = "GENERATED_IMAGE_IDENTIFIABLE_PEOPLE",
|
|
11133
|
+
/**
|
|
11134
|
+
* Generated image contains minors.
|
|
11135
|
+
*/
|
|
11136
|
+
GENERATED_IMAGE_MINORS = "GENERATED_IMAGE_MINORS",
|
|
11137
|
+
/**
|
|
11138
|
+
* Generated image contains IP violation.
|
|
11139
|
+
*/
|
|
11140
|
+
OUTPUT_IMAGE_IP_PROHIBITED = "OUTPUT_IMAGE_IP_PROHIBITED",
|
|
11141
|
+
/**
|
|
11142
|
+
* Other generated content issue.
|
|
11143
|
+
*/
|
|
11144
|
+
GENERATED_OTHER = "GENERATED_OTHER",
|
|
11145
|
+
/**
|
|
11146
|
+
* Max regeneration attempts reached.
|
|
11147
|
+
*/
|
|
11148
|
+
MAX_REGENERATION_REACHED = "MAX_REGENERATION_REACHED"
|
|
10903
11149
|
}
|
|
10904
11150
|
|
|
10905
11151
|
/** Options about which input is included in the user's turn. */
|
|
@@ -11212,6 +11458,7 @@ declare namespace types {
|
|
|
11212
11458
|
GenerateVideosSource,
|
|
11213
11459
|
VideoGenerationReferenceImage,
|
|
11214
11460
|
VideoGenerationMask,
|
|
11461
|
+
WebhookConfig,
|
|
11215
11462
|
GenerateVideosConfig,
|
|
11216
11463
|
GenerateVideosParameters,
|
|
11217
11464
|
GeneratedVideo,
|
|
@@ -11403,19 +11650,21 @@ declare namespace types {
|
|
|
11403
11650
|
ContextWindowCompressionConfig,
|
|
11404
11651
|
AudioTranscriptionConfig,
|
|
11405
11652
|
ProactivityConfig,
|
|
11653
|
+
CustomizedAvatar,
|
|
11654
|
+
AvatarConfig,
|
|
11406
11655
|
LiveClientSetup,
|
|
11407
11656
|
LiveClientContent,
|
|
11408
11657
|
ActivityStart,
|
|
11409
11658
|
ActivityEnd,
|
|
11410
11659
|
LiveClientRealtimeInput,
|
|
11411
11660
|
LiveClientToolResponse,
|
|
11412
|
-
LiveSendRealtimeInputParameters,
|
|
11413
11661
|
LiveClientMessage,
|
|
11414
11662
|
LiveConnectConfig,
|
|
11415
11663
|
LiveConnectParameters,
|
|
11416
11664
|
CreateChatParameters,
|
|
11417
11665
|
SendMessageParameters,
|
|
11418
11666
|
LiveSendClientContentParameters,
|
|
11667
|
+
LiveSendRealtimeInputParameters,
|
|
11419
11668
|
LiveSendToolResponseParameters,
|
|
11420
11669
|
LiveMusicClientSetup,
|
|
11421
11670
|
WeightedPrompt,
|
|
@@ -11926,7 +12175,7 @@ declare namespace Usage {
|
|
|
11926
12175
|
/**
|
|
11927
12176
|
* The modality associated with the token count.
|
|
11928
12177
|
*/
|
|
11929
|
-
modality?: 'text' | 'image' | 'audio';
|
|
12178
|
+
modality?: 'text' | 'image' | 'audio' | 'video' | 'document';
|
|
11930
12179
|
/**
|
|
11931
12180
|
* Number of tokens for the modality.
|
|
11932
12181
|
*/
|
|
@@ -11939,7 +12188,7 @@ declare namespace Usage {
|
|
|
11939
12188
|
/**
|
|
11940
12189
|
* The modality associated with the token count.
|
|
11941
12190
|
*/
|
|
11942
|
-
modality?: 'text' | 'image' | 'audio';
|
|
12191
|
+
modality?: 'text' | 'image' | 'audio' | 'video' | 'document';
|
|
11943
12192
|
/**
|
|
11944
12193
|
* Number of tokens for the modality.
|
|
11945
12194
|
*/
|
|
@@ -11952,7 +12201,7 @@ declare namespace Usage {
|
|
|
11952
12201
|
/**
|
|
11953
12202
|
* The modality associated with the token count.
|
|
11954
12203
|
*/
|
|
11955
|
-
modality?: 'text' | 'image' | 'audio';
|
|
12204
|
+
modality?: 'text' | 'image' | 'audio' | 'video' | 'document';
|
|
11956
12205
|
/**
|
|
11957
12206
|
* Number of tokens for the modality.
|
|
11958
12207
|
*/
|
|
@@ -11965,7 +12214,7 @@ declare namespace Usage {
|
|
|
11965
12214
|
/**
|
|
11966
12215
|
* The modality associated with the token count.
|
|
11967
12216
|
*/
|
|
11968
|
-
modality?: 'text' | 'image' | 'audio';
|
|
12217
|
+
modality?: 'text' | 'image' | 'audio' | 'video' | 'document';
|
|
11969
12218
|
/**
|
|
11970
12219
|
* Number of tokens for the modality.
|
|
11971
12220
|
*/
|
|
@@ -12240,6 +12489,484 @@ export declare interface VoiceConfig {
|
|
|
12240
12489
|
prebuiltVoiceConfig?: PrebuiltVoiceConfig;
|
|
12241
12490
|
}
|
|
12242
12491
|
|
|
12492
|
+
/** Configuration for webhook notifications.
|
|
12493
|
+
|
|
12494
|
+
Used to configure webhook endpoints that will receive notifications
|
|
12495
|
+
when long-running operations (e.g., batch jobs, video generation) complete. */
|
|
12496
|
+
export declare interface WebhookConfig {
|
|
12497
|
+
/** The webhook URIs to receive notifications. If set, these
|
|
12498
|
+
webhook URIs will be used instead of the registered webhooks. */
|
|
12499
|
+
uris?: string[];
|
|
12500
|
+
/** User metadata that will be included in each webhook event
|
|
12501
|
+
notification. Use this to attach custom key-value data to correlate
|
|
12502
|
+
webhook events with your internal systems. */
|
|
12503
|
+
userMetadata?: Record<string, unknown>;
|
|
12504
|
+
}
|
|
12505
|
+
|
|
12506
|
+
/**
|
|
12507
|
+
* Message for configuring webhook events for a request.
|
|
12508
|
+
*/
|
|
12509
|
+
declare interface WebhookConfig_2 {
|
|
12510
|
+
/**
|
|
12511
|
+
* Optional. If set, these webhook URIs will be used for webhook events instead of
|
|
12512
|
+
* the registered webhooks.
|
|
12513
|
+
*/
|
|
12514
|
+
uris?: Array<string>;
|
|
12515
|
+
/**
|
|
12516
|
+
* Optional. The user metadata that will be returned on each event emission to the
|
|
12517
|
+
* webhooks.
|
|
12518
|
+
*/
|
|
12519
|
+
user_metadata?: {
|
|
12520
|
+
[key: string]: unknown;
|
|
12521
|
+
};
|
|
12522
|
+
}
|
|
12523
|
+
|
|
12524
|
+
declare interface WebhookCreateParams {
|
|
12525
|
+
/**
|
|
12526
|
+
* Path param: Which version of the API to use.
|
|
12527
|
+
*/
|
|
12528
|
+
api_version?: string;
|
|
12529
|
+
/**
|
|
12530
|
+
* Body param: Required. The events that the webhook is subscribed to. Available
|
|
12531
|
+
* events:
|
|
12532
|
+
*
|
|
12533
|
+
* - batch.succeeded
|
|
12534
|
+
* - batch.cancelled
|
|
12535
|
+
* - batch.expired
|
|
12536
|
+
* - batch.failed
|
|
12537
|
+
* - interaction.requires_action
|
|
12538
|
+
* - interaction.completed
|
|
12539
|
+
* - interaction.failed
|
|
12540
|
+
* - interaction.cancelled
|
|
12541
|
+
* - video.generated
|
|
12542
|
+
*/
|
|
12543
|
+
subscribed_events: Array<'batch.succeeded' | 'batch.cancelled' | 'batch.expired' | 'batch.failed' | 'interaction.requires_action' | 'interaction.completed' | 'interaction.failed' | 'interaction.cancelled' | 'video.generated' | (string & {})>;
|
|
12544
|
+
/**
|
|
12545
|
+
* Body param: Required. The URI to which webhook events will be sent.
|
|
12546
|
+
*/
|
|
12547
|
+
uri: string;
|
|
12548
|
+
/**
|
|
12549
|
+
* Query param: Optional. The webhook_id to use for the webhook. If not specified,
|
|
12550
|
+
* the server will generate a unique ID.
|
|
12551
|
+
*/
|
|
12552
|
+
webhook_id?: string;
|
|
12553
|
+
/**
|
|
12554
|
+
* Body param: Identifier. The name of the webhook. Format: `webhooks/{webhook_id}`
|
|
12555
|
+
*/
|
|
12556
|
+
name?: string;
|
|
12557
|
+
/**
|
|
12558
|
+
* Body param: The state of the webhook.
|
|
12559
|
+
*/
|
|
12560
|
+
state?: 'enabled' | 'disabled' | 'disabled_due_to_failed_deliveries';
|
|
12561
|
+
}
|
|
12562
|
+
|
|
12563
|
+
/**
|
|
12564
|
+
* A Webhook resource.
|
|
12565
|
+
*/
|
|
12566
|
+
declare interface WebhookCreateResponse {
|
|
12567
|
+
/**
|
|
12568
|
+
* Required. The events that the webhook is subscribed to. Available events:
|
|
12569
|
+
*
|
|
12570
|
+
* - batch.succeeded
|
|
12571
|
+
* - batch.cancelled
|
|
12572
|
+
* - batch.expired
|
|
12573
|
+
* - batch.failed
|
|
12574
|
+
* - interaction.requires_action
|
|
12575
|
+
* - interaction.completed
|
|
12576
|
+
* - interaction.failed
|
|
12577
|
+
* - interaction.cancelled
|
|
12578
|
+
* - video.generated
|
|
12579
|
+
*/
|
|
12580
|
+
subscribed_events: Array<'batch.succeeded' | 'batch.cancelled' | 'batch.expired' | 'batch.failed' | 'interaction.requires_action' | 'interaction.completed' | 'interaction.failed' | 'interaction.cancelled' | 'video.generated' | (string & {})>;
|
|
12581
|
+
/**
|
|
12582
|
+
* Required. The URI to which webhook events will be sent.
|
|
12583
|
+
*/
|
|
12584
|
+
uri: string;
|
|
12585
|
+
/**
|
|
12586
|
+
* Output only. The timestamp when the webhook was created.
|
|
12587
|
+
*/
|
|
12588
|
+
create_time?: string;
|
|
12589
|
+
/**
|
|
12590
|
+
* Identifier. The name of the webhook. Format: `webhooks/{webhook_id}`
|
|
12591
|
+
*/
|
|
12592
|
+
name?: string;
|
|
12593
|
+
/**
|
|
12594
|
+
* Output only. The new signing secret for the webhook. Only populated on create.
|
|
12595
|
+
*/
|
|
12596
|
+
new_signing_secret?: string;
|
|
12597
|
+
/**
|
|
12598
|
+
* Output only. The signing secrets associated with this webhook.
|
|
12599
|
+
*/
|
|
12600
|
+
signing_secrets?: Array<WebhookCreateResponse.SigningSecret>;
|
|
12601
|
+
/**
|
|
12602
|
+
* The state of the webhook.
|
|
12603
|
+
*/
|
|
12604
|
+
state?: 'enabled' | 'disabled' | 'disabled_due_to_failed_deliveries';
|
|
12605
|
+
/**
|
|
12606
|
+
* Output only. The timestamp when the webhook was last updated.
|
|
12607
|
+
*/
|
|
12608
|
+
update_time?: string;
|
|
12609
|
+
}
|
|
12610
|
+
|
|
12611
|
+
declare namespace WebhookCreateResponse {
|
|
12612
|
+
/**
|
|
12613
|
+
* Represents a signing secret used to verify webhook payloads.
|
|
12614
|
+
*/
|
|
12615
|
+
interface SigningSecret {
|
|
12616
|
+
/**
|
|
12617
|
+
* Output only. The expiration date of the signing secret.
|
|
12618
|
+
*/
|
|
12619
|
+
expire_time?: string;
|
|
12620
|
+
/**
|
|
12621
|
+
* Output only. The truncated version of the signing secret.
|
|
12622
|
+
*/
|
|
12623
|
+
truncated_secret?: string;
|
|
12624
|
+
}
|
|
12625
|
+
}
|
|
12626
|
+
|
|
12627
|
+
declare interface WebhookDeleteParams {
|
|
12628
|
+
/**
|
|
12629
|
+
* Which version of the API to use.
|
|
12630
|
+
*/
|
|
12631
|
+
api_version?: string;
|
|
12632
|
+
}
|
|
12633
|
+
|
|
12634
|
+
/**
|
|
12635
|
+
* A generic empty message that you can re-use to avoid defining duplicated empty
|
|
12636
|
+
* messages in your APIs. A typical example is to use it as the request or the
|
|
12637
|
+
* response type of an API method. For instance:
|
|
12638
|
+
*
|
|
12639
|
+
* service Foo {
|
|
12640
|
+
* rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
|
|
12641
|
+
* }
|
|
12642
|
+
*/
|
|
12643
|
+
declare interface WebhookDeleteResponse {
|
|
12644
|
+
}
|
|
12645
|
+
|
|
12646
|
+
declare interface WebhookListParams {
|
|
12647
|
+
/**
|
|
12648
|
+
* Path param: Which version of the API to use.
|
|
12649
|
+
*/
|
|
12650
|
+
api_version?: string;
|
|
12651
|
+
/**
|
|
12652
|
+
* Query param: Optional. The maximum number of webhooks to return. The service may
|
|
12653
|
+
* return fewer than this value. If unspecified, at most 50 webhooks will be
|
|
12654
|
+
* returned. The maximum value is 1000.
|
|
12655
|
+
*/
|
|
12656
|
+
page_size?: number;
|
|
12657
|
+
/**
|
|
12658
|
+
* Query param: Optional. A page token, received from a previous `ListWebhooks`
|
|
12659
|
+
* call. Provide this to retrieve the subsequent page.
|
|
12660
|
+
*/
|
|
12661
|
+
page_token?: string;
|
|
12662
|
+
}
|
|
12663
|
+
|
|
12664
|
+
/**
|
|
12665
|
+
* Response message for WebhookService.ListWebhooks.
|
|
12666
|
+
*/
|
|
12667
|
+
declare interface WebhookListResponse {
|
|
12668
|
+
/**
|
|
12669
|
+
* A token, which can be sent as `page_token` to retrieve the next page. If this
|
|
12670
|
+
* field is omitted, there are no subsequent pages.
|
|
12671
|
+
*/
|
|
12672
|
+
next_page_token?: string;
|
|
12673
|
+
/**
|
|
12674
|
+
* The webhooks.
|
|
12675
|
+
*/
|
|
12676
|
+
webhooks?: Array<WebhookListResponse.Webhook>;
|
|
12677
|
+
}
|
|
12678
|
+
|
|
12679
|
+
declare namespace WebhookListResponse {
|
|
12680
|
+
/**
|
|
12681
|
+
* A Webhook resource.
|
|
12682
|
+
*/
|
|
12683
|
+
interface Webhook {
|
|
12684
|
+
/**
|
|
12685
|
+
* Required. The events that the webhook is subscribed to. Available events:
|
|
12686
|
+
*
|
|
12687
|
+
* - batch.succeeded
|
|
12688
|
+
* - batch.cancelled
|
|
12689
|
+
* - batch.expired
|
|
12690
|
+
* - batch.failed
|
|
12691
|
+
* - interaction.requires_action
|
|
12692
|
+
* - interaction.completed
|
|
12693
|
+
* - interaction.failed
|
|
12694
|
+
* - interaction.cancelled
|
|
12695
|
+
* - video.generated
|
|
12696
|
+
*/
|
|
12697
|
+
subscribed_events: Array<'batch.succeeded' | 'batch.cancelled' | 'batch.expired' | 'batch.failed' | 'interaction.requires_action' | 'interaction.completed' | 'interaction.failed' | 'interaction.cancelled' | 'video.generated' | (string & {})>;
|
|
12698
|
+
/**
|
|
12699
|
+
* Required. The URI to which webhook events will be sent.
|
|
12700
|
+
*/
|
|
12701
|
+
uri: string;
|
|
12702
|
+
/**
|
|
12703
|
+
* Output only. The timestamp when the webhook was created.
|
|
12704
|
+
*/
|
|
12705
|
+
create_time?: string;
|
|
12706
|
+
/**
|
|
12707
|
+
* Identifier. The name of the webhook. Format: `webhooks/{webhook_id}`
|
|
12708
|
+
*/
|
|
12709
|
+
name?: string;
|
|
12710
|
+
/**
|
|
12711
|
+
* Output only. The new signing secret for the webhook. Only populated on create.
|
|
12712
|
+
*/
|
|
12713
|
+
new_signing_secret?: string;
|
|
12714
|
+
/**
|
|
12715
|
+
* Output only. The signing secrets associated with this webhook.
|
|
12716
|
+
*/
|
|
12717
|
+
signing_secrets?: Array<Webhook.SigningSecret>;
|
|
12718
|
+
/**
|
|
12719
|
+
* The state of the webhook.
|
|
12720
|
+
*/
|
|
12721
|
+
state?: 'enabled' | 'disabled' | 'disabled_due_to_failed_deliveries';
|
|
12722
|
+
/**
|
|
12723
|
+
* Output only. The timestamp when the webhook was last updated.
|
|
12724
|
+
*/
|
|
12725
|
+
update_time?: string;
|
|
12726
|
+
}
|
|
12727
|
+
namespace Webhook {
|
|
12728
|
+
/**
|
|
12729
|
+
* Represents a signing secret used to verify webhook payloads.
|
|
12730
|
+
*/
|
|
12731
|
+
interface SigningSecret {
|
|
12732
|
+
/**
|
|
12733
|
+
* Output only. The expiration date of the signing secret.
|
|
12734
|
+
*/
|
|
12735
|
+
expire_time?: string;
|
|
12736
|
+
/**
|
|
12737
|
+
* Output only. The truncated version of the signing secret.
|
|
12738
|
+
*/
|
|
12739
|
+
truncated_secret?: string;
|
|
12740
|
+
}
|
|
12741
|
+
}
|
|
12742
|
+
}
|
|
12743
|
+
|
|
12744
|
+
declare interface WebhookPingParams {
|
|
12745
|
+
/**
|
|
12746
|
+
* Path param: Which version of the API to use.
|
|
12747
|
+
*/
|
|
12748
|
+
api_version?: string;
|
|
12749
|
+
/**
|
|
12750
|
+
* Body param: Request message for WebhookService.PingWebhook.
|
|
12751
|
+
*/
|
|
12752
|
+
body?: WebhookPingParams.Body;
|
|
12753
|
+
}
|
|
12754
|
+
|
|
12755
|
+
declare namespace WebhookPingParams {
|
|
12756
|
+
/**
|
|
12757
|
+
* Request message for WebhookService.PingWebhook.
|
|
12758
|
+
*/
|
|
12759
|
+
interface Body {
|
|
12760
|
+
}
|
|
12761
|
+
}
|
|
12762
|
+
|
|
12763
|
+
/**
|
|
12764
|
+
* Response message for WebhookService.PingWebhook.
|
|
12765
|
+
*/
|
|
12766
|
+
declare interface WebhookPingResponse {
|
|
12767
|
+
}
|
|
12768
|
+
|
|
12769
|
+
declare interface WebhookRetrieveParams {
|
|
12770
|
+
/**
|
|
12771
|
+
* Which version of the API to use.
|
|
12772
|
+
*/
|
|
12773
|
+
api_version?: string;
|
|
12774
|
+
}
|
|
12775
|
+
|
|
12776
|
+
/**
|
|
12777
|
+
* A Webhook resource.
|
|
12778
|
+
*/
|
|
12779
|
+
declare interface WebhookRetrieveResponse {
|
|
12780
|
+
/**
|
|
12781
|
+
* Required. The events that the webhook is subscribed to. Available events:
|
|
12782
|
+
*
|
|
12783
|
+
* - batch.succeeded
|
|
12784
|
+
* - batch.cancelled
|
|
12785
|
+
* - batch.expired
|
|
12786
|
+
* - batch.failed
|
|
12787
|
+
* - interaction.requires_action
|
|
12788
|
+
* - interaction.completed
|
|
12789
|
+
* - interaction.failed
|
|
12790
|
+
* - interaction.cancelled
|
|
12791
|
+
* - video.generated
|
|
12792
|
+
*/
|
|
12793
|
+
subscribed_events: Array<'batch.succeeded' | 'batch.cancelled' | 'batch.expired' | 'batch.failed' | 'interaction.requires_action' | 'interaction.completed' | 'interaction.failed' | 'interaction.cancelled' | 'video.generated' | (string & {})>;
|
|
12794
|
+
/**
|
|
12795
|
+
* Required. The URI to which webhook events will be sent.
|
|
12796
|
+
*/
|
|
12797
|
+
uri: string;
|
|
12798
|
+
/**
|
|
12799
|
+
* Output only. The timestamp when the webhook was created.
|
|
12800
|
+
*/
|
|
12801
|
+
create_time?: string;
|
|
12802
|
+
/**
|
|
12803
|
+
* Identifier. The name of the webhook. Format: `webhooks/{webhook_id}`
|
|
12804
|
+
*/
|
|
12805
|
+
name?: string;
|
|
12806
|
+
/**
|
|
12807
|
+
* Output only. The new signing secret for the webhook. Only populated on create.
|
|
12808
|
+
*/
|
|
12809
|
+
new_signing_secret?: string;
|
|
12810
|
+
/**
|
|
12811
|
+
* Output only. The signing secrets associated with this webhook.
|
|
12812
|
+
*/
|
|
12813
|
+
signing_secrets?: Array<WebhookRetrieveResponse.SigningSecret>;
|
|
12814
|
+
/**
|
|
12815
|
+
* The state of the webhook.
|
|
12816
|
+
*/
|
|
12817
|
+
state?: 'enabled' | 'disabled' | 'disabled_due_to_failed_deliveries';
|
|
12818
|
+
/**
|
|
12819
|
+
* Output only. The timestamp when the webhook was last updated.
|
|
12820
|
+
*/
|
|
12821
|
+
update_time?: string;
|
|
12822
|
+
}
|
|
12823
|
+
|
|
12824
|
+
declare namespace WebhookRetrieveResponse {
|
|
12825
|
+
/**
|
|
12826
|
+
* Represents a signing secret used to verify webhook payloads.
|
|
12827
|
+
*/
|
|
12828
|
+
interface SigningSecret {
|
|
12829
|
+
/**
|
|
12830
|
+
* Output only. The expiration date of the signing secret.
|
|
12831
|
+
*/
|
|
12832
|
+
expire_time?: string;
|
|
12833
|
+
/**
|
|
12834
|
+
* Output only. The truncated version of the signing secret.
|
|
12835
|
+
*/
|
|
12836
|
+
truncated_secret?: string;
|
|
12837
|
+
}
|
|
12838
|
+
}
|
|
12839
|
+
|
|
12840
|
+
declare interface WebhookRotateSigningSecretParams {
|
|
12841
|
+
/**
|
|
12842
|
+
* Path param: Which version of the API to use.
|
|
12843
|
+
*/
|
|
12844
|
+
api_version?: string;
|
|
12845
|
+
/**
|
|
12846
|
+
* Body param: Optional. The revocation behavior for previous signing secrets.
|
|
12847
|
+
*/
|
|
12848
|
+
revocation_behavior?: 'revoke_previous_secrets_after_h24' | 'revoke_previous_secrets_immediately';
|
|
12849
|
+
}
|
|
12850
|
+
|
|
12851
|
+
/**
|
|
12852
|
+
* Response message for WebhookService.RotateSigningSecret.
|
|
12853
|
+
*/
|
|
12854
|
+
declare interface WebhookRotateSigningSecretResponse {
|
|
12855
|
+
/**
|
|
12856
|
+
* Output only. The newly generated signing secret.
|
|
12857
|
+
*/
|
|
12858
|
+
secret?: string;
|
|
12859
|
+
}
|
|
12860
|
+
|
|
12861
|
+
export declare class Webhooks extends BaseWebhooks {
|
|
12862
|
+
}
|
|
12863
|
+
|
|
12864
|
+
export declare namespace Webhooks {
|
|
12865
|
+
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, };
|
|
12866
|
+
}
|
|
12867
|
+
|
|
12868
|
+
declare interface WebhookUpdateParams {
|
|
12869
|
+
/**
|
|
12870
|
+
* Path param: Which version of the API to use.
|
|
12871
|
+
*/
|
|
12872
|
+
api_version?: string;
|
|
12873
|
+
/**
|
|
12874
|
+
* Body param: Required. The events that the webhook is subscribed to. Available
|
|
12875
|
+
* events:
|
|
12876
|
+
*
|
|
12877
|
+
* - batch.succeeded
|
|
12878
|
+
* - batch.cancelled
|
|
12879
|
+
* - batch.expired
|
|
12880
|
+
* - batch.failed
|
|
12881
|
+
* - interaction.requires_action
|
|
12882
|
+
* - interaction.completed
|
|
12883
|
+
* - interaction.failed
|
|
12884
|
+
* - interaction.cancelled
|
|
12885
|
+
* - video.generated
|
|
12886
|
+
*/
|
|
12887
|
+
subscribed_events: Array<'batch.succeeded' | 'batch.cancelled' | 'batch.expired' | 'batch.failed' | 'interaction.requires_action' | 'interaction.completed' | 'interaction.failed' | 'interaction.cancelled' | 'video.generated' | (string & {})>;
|
|
12888
|
+
/**
|
|
12889
|
+
* Body param: Required. The URI to which webhook events will be sent.
|
|
12890
|
+
*/
|
|
12891
|
+
uri: string;
|
|
12892
|
+
/**
|
|
12893
|
+
* Query param: Optional. The list of fields to update.
|
|
12894
|
+
*/
|
|
12895
|
+
update_mask?: string;
|
|
12896
|
+
/**
|
|
12897
|
+
* Body param: Identifier. The name of the webhook. Format: `webhooks/{webhook_id}`
|
|
12898
|
+
*/
|
|
12899
|
+
name?: string;
|
|
12900
|
+
/**
|
|
12901
|
+
* Body param: The state of the webhook.
|
|
12902
|
+
*/
|
|
12903
|
+
state?: 'enabled' | 'disabled' | 'disabled_due_to_failed_deliveries';
|
|
12904
|
+
}
|
|
12905
|
+
|
|
12906
|
+
/**
|
|
12907
|
+
* A Webhook resource.
|
|
12908
|
+
*/
|
|
12909
|
+
declare interface WebhookUpdateResponse {
|
|
12910
|
+
/**
|
|
12911
|
+
* Required. The events that the webhook is subscribed to. Available events:
|
|
12912
|
+
*
|
|
12913
|
+
* - batch.succeeded
|
|
12914
|
+
* - batch.cancelled
|
|
12915
|
+
* - batch.expired
|
|
12916
|
+
* - batch.failed
|
|
12917
|
+
* - interaction.requires_action
|
|
12918
|
+
* - interaction.completed
|
|
12919
|
+
* - interaction.failed
|
|
12920
|
+
* - interaction.cancelled
|
|
12921
|
+
* - video.generated
|
|
12922
|
+
*/
|
|
12923
|
+
subscribed_events: Array<'batch.succeeded' | 'batch.cancelled' | 'batch.expired' | 'batch.failed' | 'interaction.requires_action' | 'interaction.completed' | 'interaction.failed' | 'interaction.cancelled' | 'video.generated' | (string & {})>;
|
|
12924
|
+
/**
|
|
12925
|
+
* Required. The URI to which webhook events will be sent.
|
|
12926
|
+
*/
|
|
12927
|
+
uri: string;
|
|
12928
|
+
/**
|
|
12929
|
+
* Output only. The timestamp when the webhook was created.
|
|
12930
|
+
*/
|
|
12931
|
+
create_time?: string;
|
|
12932
|
+
/**
|
|
12933
|
+
* Identifier. The name of the webhook. Format: `webhooks/{webhook_id}`
|
|
12934
|
+
*/
|
|
12935
|
+
name?: string;
|
|
12936
|
+
/**
|
|
12937
|
+
* Output only. The new signing secret for the webhook. Only populated on create.
|
|
12938
|
+
*/
|
|
12939
|
+
new_signing_secret?: string;
|
|
12940
|
+
/**
|
|
12941
|
+
* Output only. The signing secrets associated with this webhook.
|
|
12942
|
+
*/
|
|
12943
|
+
signing_secrets?: Array<WebhookUpdateResponse.SigningSecret>;
|
|
12944
|
+
/**
|
|
12945
|
+
* The state of the webhook.
|
|
12946
|
+
*/
|
|
12947
|
+
state?: 'enabled' | 'disabled' | 'disabled_due_to_failed_deliveries';
|
|
12948
|
+
/**
|
|
12949
|
+
* Output only. The timestamp when the webhook was last updated.
|
|
12950
|
+
*/
|
|
12951
|
+
update_time?: string;
|
|
12952
|
+
}
|
|
12953
|
+
|
|
12954
|
+
declare namespace WebhookUpdateResponse {
|
|
12955
|
+
/**
|
|
12956
|
+
* Represents a signing secret used to verify webhook payloads.
|
|
12957
|
+
*/
|
|
12958
|
+
interface SigningSecret {
|
|
12959
|
+
/**
|
|
12960
|
+
* Output only. The expiration date of the signing secret.
|
|
12961
|
+
*/
|
|
12962
|
+
expire_time?: string;
|
|
12963
|
+
/**
|
|
12964
|
+
* Output only. The truncated version of the signing secret.
|
|
12965
|
+
*/
|
|
12966
|
+
truncated_secret?: string;
|
|
12967
|
+
}
|
|
12968
|
+
}
|
|
12969
|
+
|
|
12243
12970
|
/** Standard web search for grounding and related configurations. Only text results are returned. */
|
|
12244
12971
|
export declare interface WebSearch {
|
|
12245
12972
|
}
|