@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/genai.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. */
|
|
@@ -5250,7 +5358,11 @@ export declare class GoogleGenAI {
|
|
|
5250
5358
|
readonly tunings: Tunings;
|
|
5251
5359
|
readonly fileSearchStores: FileSearchStores;
|
|
5252
5360
|
private _interactions;
|
|
5361
|
+
private _webhooks;
|
|
5362
|
+
private _nextGenClient;
|
|
5363
|
+
private getNextGenClient;
|
|
5253
5364
|
get interactions(): Interactions;
|
|
5365
|
+
get webhooks(): Webhooks;
|
|
5254
5366
|
constructor(options: GoogleGenAIOptions);
|
|
5255
5367
|
}
|
|
5256
5368
|
|
|
@@ -5379,8 +5491,8 @@ declare namespace GoogleMapsResult {
|
|
|
5379
5491
|
*/
|
|
5380
5492
|
place_id?: string;
|
|
5381
5493
|
/**
|
|
5382
|
-
* Snippets of reviews that are used to generate answers about the
|
|
5383
|
-
*
|
|
5494
|
+
* Snippets of reviews that are used to generate answers about the features of a
|
|
5495
|
+
* given place in Google Maps.
|
|
5384
5496
|
*/
|
|
5385
5497
|
review_snippets?: Array<Place.ReviewSnippet>;
|
|
5386
5498
|
/**
|
|
@@ -5390,8 +5502,8 @@ declare namespace GoogleMapsResult {
|
|
|
5390
5502
|
}
|
|
5391
5503
|
namespace Place {
|
|
5392
5504
|
/**
|
|
5393
|
-
* Encapsulates a snippet of a user review that answers a question about
|
|
5394
|
-
*
|
|
5505
|
+
* Encapsulates a snippet of a user review that answers a question about the
|
|
5506
|
+
* features of a specific place in Google Maps.
|
|
5395
5507
|
*/
|
|
5396
5508
|
interface ReviewSnippet {
|
|
5397
5509
|
/**
|
|
@@ -5477,7 +5589,7 @@ declare interface GoogleSearchCallContent {
|
|
|
5477
5589
|
/**
|
|
5478
5590
|
* The type of search grounding enabled.
|
|
5479
5591
|
*/
|
|
5480
|
-
search_type?: 'web_search' | 'image_search';
|
|
5592
|
+
search_type?: 'web_search' | 'image_search' | 'enterprise_web_search';
|
|
5481
5593
|
/**
|
|
5482
5594
|
* A signature hash for backend validation.
|
|
5483
5595
|
*/
|
|
@@ -6223,8 +6335,8 @@ declare interface Interaction {
|
|
|
6223
6335
|
*/
|
|
6224
6336
|
id: string;
|
|
6225
6337
|
/**
|
|
6226
|
-
* Required. Output only. The time at which the response was created in ISO 8601
|
|
6227
|
-
* (YYYY-MM-DDThh:mm:ssZ).
|
|
6338
|
+
* Required. Output only. The time at which the response was created in ISO 8601
|
|
6339
|
+
* format (YYYY-MM-DDThh:mm:ssZ).
|
|
6228
6340
|
*/
|
|
6229
6341
|
created: string;
|
|
6230
6342
|
/**
|
|
@@ -6232,8 +6344,8 @@ declare interface Interaction {
|
|
|
6232
6344
|
*/
|
|
6233
6345
|
status: 'in_progress' | 'requires_action' | 'completed' | 'failed' | 'cancelled' | 'incomplete';
|
|
6234
6346
|
/**
|
|
6235
|
-
* Required. Output only. The time at which the response was last updated in ISO
|
|
6236
|
-
* (YYYY-MM-DDThh:mm:ssZ).
|
|
6347
|
+
* Required. Output only. The time at which the response was last updated in ISO
|
|
6348
|
+
* 8601 format (YYYY-MM-DDThh:mm:ssZ).
|
|
6237
6349
|
*/
|
|
6238
6350
|
updated: string;
|
|
6239
6351
|
/**
|
|
@@ -6261,8 +6373,8 @@ declare interface Interaction {
|
|
|
6261
6373
|
*/
|
|
6262
6374
|
previous_interaction_id?: string;
|
|
6263
6375
|
/**
|
|
6264
|
-
* Enforces that the generated response is a JSON object that complies with
|
|
6265
|
-
*
|
|
6376
|
+
* Enforces that the generated response is a JSON object that complies with the
|
|
6377
|
+
* JSON schema specified in this field.
|
|
6266
6378
|
*/
|
|
6267
6379
|
response_format?: unknown;
|
|
6268
6380
|
/**
|
|
@@ -6272,7 +6384,7 @@ declare interface Interaction {
|
|
|
6272
6384
|
/**
|
|
6273
6385
|
* The requested modalities of the response (TEXT, IMAGE, AUDIO).
|
|
6274
6386
|
*/
|
|
6275
|
-
response_modalities?: Array<'text' | 'image' | 'audio'>;
|
|
6387
|
+
response_modalities?: Array<'text' | 'image' | 'audio' | 'video' | 'document'>;
|
|
6276
6388
|
/**
|
|
6277
6389
|
* Output only. The role of the interaction.
|
|
6278
6390
|
*/
|
|
@@ -6293,6 +6405,11 @@ declare interface Interaction {
|
|
|
6293
6405
|
* Output only. Statistics on the interaction request's token usage.
|
|
6294
6406
|
*/
|
|
6295
6407
|
usage?: Usage;
|
|
6408
|
+
/**
|
|
6409
|
+
* Optional. Webhook configuration for receiving notifications when the interaction
|
|
6410
|
+
* completes.
|
|
6411
|
+
*/
|
|
6412
|
+
webhook_config?: WebhookConfig_2;
|
|
6296
6413
|
}
|
|
6297
6414
|
|
|
6298
6415
|
declare interface InteractionCancelParams {
|
|
@@ -6305,13 +6422,12 @@ declare interface InteractionCancelParams {
|
|
|
6305
6422
|
declare interface InteractionCompleteEvent {
|
|
6306
6423
|
event_type: 'interaction.complete';
|
|
6307
6424
|
/**
|
|
6308
|
-
* Required. The completed interaction with empty outputs to reduce the payload
|
|
6309
|
-
* Use the preceding ContentDelta events for the actual output.
|
|
6425
|
+
* Required. The completed interaction with empty outputs to reduce the payload
|
|
6426
|
+
* size. Use the preceding ContentDelta events for the actual output.
|
|
6310
6427
|
*/
|
|
6311
6428
|
interaction: Interaction;
|
|
6312
6429
|
/**
|
|
6313
|
-
* The event_id token to be used to resume the interaction stream, from
|
|
6314
|
-
* this event.
|
|
6430
|
+
* The event_id token to be used to resume the interaction stream, from this event.
|
|
6315
6431
|
*/
|
|
6316
6432
|
event_id?: string;
|
|
6317
6433
|
}
|
|
@@ -6344,25 +6460,30 @@ declare interface InteractionGetParamsBase {
|
|
|
6344
6460
|
*/
|
|
6345
6461
|
include_input?: boolean;
|
|
6346
6462
|
/**
|
|
6347
|
-
* Query param: Optional. If set, resumes the interaction stream from the next
|
|
6463
|
+
* Query param: Optional. If set, resumes the interaction stream from the next
|
|
6464
|
+
* chunk after the event marked by the event id. Can only be used if `stream` is
|
|
6465
|
+
* true.
|
|
6348
6466
|
*/
|
|
6349
6467
|
last_event_id?: string;
|
|
6350
6468
|
/**
|
|
6351
|
-
* Query param: If set to true, the generated content will be streamed
|
|
6469
|
+
* Query param: If set to true, the generated content will be streamed
|
|
6470
|
+
* incrementally.
|
|
6352
6471
|
*/
|
|
6353
6472
|
stream?: boolean;
|
|
6354
6473
|
}
|
|
6355
6474
|
|
|
6356
6475
|
declare interface InteractionGetParamsNonStreaming extends InteractionGetParamsBase {
|
|
6357
6476
|
/**
|
|
6358
|
-
* Query param: If set to true, the generated content will be streamed
|
|
6477
|
+
* Query param: If set to true, the generated content will be streamed
|
|
6478
|
+
* incrementally.
|
|
6359
6479
|
*/
|
|
6360
6480
|
stream?: false;
|
|
6361
6481
|
}
|
|
6362
6482
|
|
|
6363
6483
|
declare interface InteractionGetParamsStreaming extends InteractionGetParamsBase {
|
|
6364
6484
|
/**
|
|
6365
|
-
* Query param: If set to true, the generated content will be streamed
|
|
6485
|
+
* Query param: If set to true, the generated content will be streamed
|
|
6486
|
+
* incrementally.
|
|
6366
6487
|
*/
|
|
6367
6488
|
stream: true;
|
|
6368
6489
|
}
|
|
@@ -6371,7 +6492,7 @@ export declare class Interactions extends BaseInteractions {
|
|
|
6371
6492
|
}
|
|
6372
6493
|
|
|
6373
6494
|
export declare namespace Interactions {
|
|
6374
|
-
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, };
|
|
6495
|
+
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, };
|
|
6375
6496
|
}
|
|
6376
6497
|
|
|
6377
6498
|
declare namespace InteractionsAPI {
|
|
@@ -6433,6 +6554,7 @@ declare namespace InteractionsAPI {
|
|
|
6433
6554
|
URLContextResultContent,
|
|
6434
6555
|
Usage,
|
|
6435
6556
|
VideoContent,
|
|
6557
|
+
WebhookConfig_2 as WebhookConfig,
|
|
6436
6558
|
InteractionDeleteResponse,
|
|
6437
6559
|
InteractionCreateParams,
|
|
6438
6560
|
BaseCreateModelInteractionParams,
|
|
@@ -6459,8 +6581,7 @@ declare interface InteractionStartEvent {
|
|
|
6459
6581
|
*/
|
|
6460
6582
|
interaction: Interaction;
|
|
6461
6583
|
/**
|
|
6462
|
-
* The event_id token to be used to resume the interaction stream, from
|
|
6463
|
-
* this event.
|
|
6584
|
+
* The event_id token to be used to resume the interaction stream, from this event.
|
|
6464
6585
|
*/
|
|
6465
6586
|
event_id?: string;
|
|
6466
6587
|
}
|
|
@@ -6470,8 +6591,7 @@ declare interface InteractionStatusUpdate {
|
|
|
6470
6591
|
interaction_id: string;
|
|
6471
6592
|
status: 'in_progress' | 'requires_action' | 'completed' | 'failed' | 'cancelled' | 'incomplete';
|
|
6472
6593
|
/**
|
|
6473
|
-
* The event_id token to be used to resume the interaction stream, from
|
|
6474
|
-
* this event.
|
|
6594
|
+
* The event_id token to be used to resume the interaction stream, from this event.
|
|
6475
6595
|
*/
|
|
6476
6596
|
event_id?: string;
|
|
6477
6597
|
}
|
|
@@ -6988,6 +7108,12 @@ export declare interface LiveClientSetup {
|
|
|
6988
7108
|
vad_signal to indicate the start and end of speech. This allows the server
|
|
6989
7109
|
to process the audio more efficiently. */
|
|
6990
7110
|
explicitVadSignal?: boolean;
|
|
7111
|
+
/** Configures the avatar model behavior. */
|
|
7112
|
+
avatarConfig?: AvatarConfig;
|
|
7113
|
+
/** Safety settings in the request to block unsafe content in the
|
|
7114
|
+
response.
|
|
7115
|
+
*/
|
|
7116
|
+
safetySettings?: SafetySetting[];
|
|
6991
7117
|
}
|
|
6992
7118
|
|
|
6993
7119
|
/** Client generated response to a `ToolCall` received from the server.
|
|
@@ -7094,6 +7220,12 @@ export declare interface LiveConnectConfig {
|
|
|
7094
7220
|
vad_signal to indicate the start and end of speech. This allows the server
|
|
7095
7221
|
to process the audio more efficiently. */
|
|
7096
7222
|
explicitVadSignal?: boolean;
|
|
7223
|
+
/** Configures the avatar model behavior. */
|
|
7224
|
+
avatarConfig?: AvatarConfig;
|
|
7225
|
+
/** Safety settings in the request to block unsafe content in the
|
|
7226
|
+
response.
|
|
7227
|
+
*/
|
|
7228
|
+
safetySettings?: SafetySetting[];
|
|
7097
7229
|
}
|
|
7098
7230
|
|
|
7099
7231
|
/** Config for LiveConnectConstraints for Auth Token creation. */
|
|
@@ -7795,7 +7927,11 @@ export declare enum Modality {
|
|
|
7795
7927
|
/**
|
|
7796
7928
|
* Indicates the model should return audio.
|
|
7797
7929
|
*/
|
|
7798
|
-
AUDIO = "AUDIO"
|
|
7930
|
+
AUDIO = "AUDIO",
|
|
7931
|
+
/**
|
|
7932
|
+
* Indicates the model should return video.
|
|
7933
|
+
*/
|
|
7934
|
+
VIDEO = "VIDEO"
|
|
7799
7935
|
}
|
|
7800
7936
|
|
|
7801
7937
|
/** Represents token counting info for a single modality. */
|
|
@@ -7862,7 +7998,8 @@ export declare interface Model {
|
|
|
7862
7998
|
}
|
|
7863
7999
|
|
|
7864
8000
|
/**
|
|
7865
|
-
* The model that will complete your prompt.\n\nSee
|
|
8001
|
+
* The model that will complete your prompt.\n\nSee
|
|
8002
|
+
* [models](https://ai.google.dev/gemini-api/docs/models) for additional details.
|
|
7866
8003
|
*/
|
|
7867
8004
|
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 & {});
|
|
7868
8005
|
|
|
@@ -8125,29 +8262,15 @@ export declare class Models extends BaseModule {
|
|
|
8125
8262
|
/**
|
|
8126
8263
|
* Recontextualizes an image.
|
|
8127
8264
|
*
|
|
8128
|
-
* There
|
|
8129
|
-
* 1)
|
|
8130
|
-
* and contexts.
|
|
8131
|
-
* 2) Virtual Try-On: Generate images of persons modeling fashion products.
|
|
8265
|
+
* There is one type of recontextualization currently supported:
|
|
8266
|
+
* 1) Virtual Try-On: Generate images of persons modeling fashion products.
|
|
8132
8267
|
*
|
|
8133
8268
|
* @param params - The parameters for recontextualizing an image.
|
|
8134
8269
|
* @return The response from the API.
|
|
8135
8270
|
*
|
|
8136
8271
|
* @example
|
|
8137
8272
|
* ```ts
|
|
8138
|
-
* const
|
|
8139
|
-
* model: 'imagen-product-recontext-preview-06-30',
|
|
8140
|
-
* source: {
|
|
8141
|
-
* prompt: 'In a modern kitchen setting.',
|
|
8142
|
-
* productImages: [productImage],
|
|
8143
|
-
* },
|
|
8144
|
-
* config: {
|
|
8145
|
-
* numberOfImages: 1,
|
|
8146
|
-
* },
|
|
8147
|
-
* });
|
|
8148
|
-
* console.log(response1?.generatedImages?.[0]?.image?.imageBytes);
|
|
8149
|
-
*
|
|
8150
|
-
* const response2 = await ai.models.recontextImage({
|
|
8273
|
+
* const response = await ai.models.recontextImage({
|
|
8151
8274
|
* model: 'virtual-try-on-001',
|
|
8152
8275
|
* source: {
|
|
8153
8276
|
* personImage: personImage,
|
|
@@ -8157,7 +8280,7 @@ export declare class Models extends BaseModule {
|
|
|
8157
8280
|
* numberOfImages: 1,
|
|
8158
8281
|
* },
|
|
8159
8282
|
* });
|
|
8160
|
-
* console.log(
|
|
8283
|
+
* console.log(response?.generatedImages?.[0]?.image?.imageBytes);
|
|
8161
8284
|
* ```
|
|
8162
8285
|
*/
|
|
8163
8286
|
recontextImage(params: types.RecontextImageParameters): Promise<types.RecontextImageResponse>;
|
|
@@ -8816,8 +8939,8 @@ declare interface PlaceCitation {
|
|
|
8816
8939
|
*/
|
|
8817
8940
|
place_id?: string;
|
|
8818
8941
|
/**
|
|
8819
|
-
* Snippets of reviews that are used to generate answers about the
|
|
8820
|
-
*
|
|
8942
|
+
* Snippets of reviews that are used to generate answers about the features of a
|
|
8943
|
+
* given place in Google Maps.
|
|
8821
8944
|
*/
|
|
8822
8945
|
review_snippets?: Array<PlaceCitation.ReviewSnippet>;
|
|
8823
8946
|
/**
|
|
@@ -8834,8 +8957,8 @@ declare interface PlaceCitation {
|
|
|
8834
8957
|
|
|
8835
8958
|
declare namespace PlaceCitation {
|
|
8836
8959
|
/**
|
|
8837
|
-
* Encapsulates a snippet of a user review that answers a question about
|
|
8838
|
-
*
|
|
8960
|
+
* Encapsulates a snippet of a user review that answers a question about the
|
|
8961
|
+
* features of a specific place in Google Maps.
|
|
8839
8962
|
*/
|
|
8840
8963
|
interface ReviewSnippet {
|
|
8841
8964
|
/**
|
|
@@ -10323,7 +10446,7 @@ export declare interface Tool {
|
|
|
10323
10446
|
/**
|
|
10324
10447
|
* A tool that can be used by the model.
|
|
10325
10448
|
*/
|
|
10326
|
-
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;
|
|
10449
|
+
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;
|
|
10327
10450
|
|
|
10328
10451
|
declare namespace Tool_2 {
|
|
10329
10452
|
/**
|
|
@@ -10372,8 +10495,7 @@ declare namespace Tool_2 {
|
|
|
10372
10495
|
*/
|
|
10373
10496
|
name?: string;
|
|
10374
10497
|
/**
|
|
10375
|
-
* The full URL for the MCPServer endpoint.
|
|
10376
|
-
* Example: "https://api.example.com/mcp"
|
|
10498
|
+
* The full URL for the MCPServer endpoint. Example: "https://api.example.com/mcp"
|
|
10377
10499
|
*/
|
|
10378
10500
|
url?: string;
|
|
10379
10501
|
}
|
|
@@ -10385,7 +10507,7 @@ declare namespace Tool_2 {
|
|
|
10385
10507
|
/**
|
|
10386
10508
|
* The types of search grounding to enable.
|
|
10387
10509
|
*/
|
|
10388
|
-
search_types?: Array<'web_search' | 'image_search'>;
|
|
10510
|
+
search_types?: Array<'web_search' | 'image_search' | 'enterprise_web_search'>;
|
|
10389
10511
|
}
|
|
10390
10512
|
/**
|
|
10391
10513
|
* A tool that can be used by the model to search files.
|
|
@@ -10424,6 +10546,35 @@ declare namespace Tool_2 {
|
|
|
10424
10546
|
*/
|
|
10425
10547
|
longitude?: number;
|
|
10426
10548
|
}
|
|
10549
|
+
/**
|
|
10550
|
+
* A tool that can be used by the model to retrieve files.
|
|
10551
|
+
*/
|
|
10552
|
+
interface Retrieval {
|
|
10553
|
+
type: 'retrieval';
|
|
10554
|
+
/**
|
|
10555
|
+
* The types of file retrieval to enable.
|
|
10556
|
+
*/
|
|
10557
|
+
retrieval_types?: Array<'vertex_ai_search'>;
|
|
10558
|
+
/**
|
|
10559
|
+
* Used to specify configuration for VertexAISearch.
|
|
10560
|
+
*/
|
|
10561
|
+
vertex_ai_search_config?: Retrieval.VertexAISearchConfig;
|
|
10562
|
+
}
|
|
10563
|
+
namespace Retrieval {
|
|
10564
|
+
/**
|
|
10565
|
+
* Used to specify configuration for VertexAISearch.
|
|
10566
|
+
*/
|
|
10567
|
+
interface VertexAISearchConfig {
|
|
10568
|
+
/**
|
|
10569
|
+
* Optional. Used to specify Vertex AI Search datastores.
|
|
10570
|
+
*/
|
|
10571
|
+
datastores?: Array<string>;
|
|
10572
|
+
/**
|
|
10573
|
+
* Optional. Used to specify Vertex AI Search engine.
|
|
10574
|
+
*/
|
|
10575
|
+
engine?: string;
|
|
10576
|
+
}
|
|
10577
|
+
}
|
|
10427
10578
|
}
|
|
10428
10579
|
|
|
10429
10580
|
/** A predicted server-side `ToolCall` returned from the model.
|
|
@@ -10864,8 +11015,7 @@ export declare interface TuningValidationDataset {
|
|
|
10864
11015
|
declare interface Turn {
|
|
10865
11016
|
content?: Array<Content_2> | string;
|
|
10866
11017
|
/**
|
|
10867
|
-
* The originator of this turn. Must be user for input or model for
|
|
10868
|
-
* model output.
|
|
11018
|
+
* The originator of this turn. Must be user for input or model for model output.
|
|
10869
11019
|
*/
|
|
10870
11020
|
role?: string;
|
|
10871
11021
|
}
|
|
@@ -10887,7 +11037,103 @@ export declare enum TurnCompleteReason {
|
|
|
10887
11037
|
/**
|
|
10888
11038
|
* Needs more input from the user.
|
|
10889
11039
|
*/
|
|
10890
|
-
NEED_MORE_INPUT = "NEED_MORE_INPUT"
|
|
11040
|
+
NEED_MORE_INPUT = "NEED_MORE_INPUT",
|
|
11041
|
+
/**
|
|
11042
|
+
* Input content is prohibited.
|
|
11043
|
+
*/
|
|
11044
|
+
PROHIBITED_INPUT_CONTENT = "PROHIBITED_INPUT_CONTENT",
|
|
11045
|
+
/**
|
|
11046
|
+
* Input image contains prohibited content.
|
|
11047
|
+
*/
|
|
11048
|
+
IMAGE_PROHIBITED_INPUT_CONTENT = "IMAGE_PROHIBITED_INPUT_CONTENT",
|
|
11049
|
+
/**
|
|
11050
|
+
* Input text contains prominent person reference.
|
|
11051
|
+
*/
|
|
11052
|
+
INPUT_TEXT_CONTAIN_PROMINENT_PERSON_PROHIBITED = "INPUT_TEXT_CONTAIN_PROMINENT_PERSON_PROHIBITED",
|
|
11053
|
+
/**
|
|
11054
|
+
* Input image contains celebrity.
|
|
11055
|
+
*/
|
|
11056
|
+
INPUT_IMAGE_CELEBRITY = "INPUT_IMAGE_CELEBRITY",
|
|
11057
|
+
/**
|
|
11058
|
+
* Input image contains photo realistic child.
|
|
11059
|
+
*/
|
|
11060
|
+
INPUT_IMAGE_PHOTO_REALISTIC_CHILD_PROHIBITED = "INPUT_IMAGE_PHOTO_REALISTIC_CHILD_PROHIBITED",
|
|
11061
|
+
/**
|
|
11062
|
+
* Input text contains NCII content.
|
|
11063
|
+
*/
|
|
11064
|
+
INPUT_TEXT_NCII_PROHIBITED = "INPUT_TEXT_NCII_PROHIBITED",
|
|
11065
|
+
/**
|
|
11066
|
+
* Other input safety issue.
|
|
11067
|
+
*/
|
|
11068
|
+
INPUT_OTHER = "INPUT_OTHER",
|
|
11069
|
+
/**
|
|
11070
|
+
* Input contains IP violation.
|
|
11071
|
+
*/
|
|
11072
|
+
INPUT_IP_PROHIBITED = "INPUT_IP_PROHIBITED",
|
|
11073
|
+
/**
|
|
11074
|
+
* Input matched blocklist.
|
|
11075
|
+
*/
|
|
11076
|
+
BLOCKLIST = "BLOCKLIST",
|
|
11077
|
+
/**
|
|
11078
|
+
* Input is unsafe for image generation.
|
|
11079
|
+
*/
|
|
11080
|
+
UNSAFE_PROMPT_FOR_IMAGE_GENERATION = "UNSAFE_PROMPT_FOR_IMAGE_GENERATION",
|
|
11081
|
+
/**
|
|
11082
|
+
* Generated image failed safety check.
|
|
11083
|
+
*/
|
|
11084
|
+
GENERATED_IMAGE_SAFETY = "GENERATED_IMAGE_SAFETY",
|
|
11085
|
+
/**
|
|
11086
|
+
* Generated content failed safety check.
|
|
11087
|
+
*/
|
|
11088
|
+
GENERATED_CONTENT_SAFETY = "GENERATED_CONTENT_SAFETY",
|
|
11089
|
+
/**
|
|
11090
|
+
* Generated audio failed safety check.
|
|
11091
|
+
*/
|
|
11092
|
+
GENERATED_AUDIO_SAFETY = "GENERATED_AUDIO_SAFETY",
|
|
11093
|
+
/**
|
|
11094
|
+
* Generated video failed safety check.
|
|
11095
|
+
*/
|
|
11096
|
+
GENERATED_VIDEO_SAFETY = "GENERATED_VIDEO_SAFETY",
|
|
11097
|
+
/**
|
|
11098
|
+
* Generated content is prohibited.
|
|
11099
|
+
*/
|
|
11100
|
+
GENERATED_CONTENT_PROHIBITED = "GENERATED_CONTENT_PROHIBITED",
|
|
11101
|
+
/**
|
|
11102
|
+
* Generated content matched blocklist.
|
|
11103
|
+
*/
|
|
11104
|
+
GENERATED_CONTENT_BLOCKLIST = "GENERATED_CONTENT_BLOCKLIST",
|
|
11105
|
+
/**
|
|
11106
|
+
* Generated image is prohibited.
|
|
11107
|
+
*/
|
|
11108
|
+
GENERATED_IMAGE_PROHIBITED = "GENERATED_IMAGE_PROHIBITED",
|
|
11109
|
+
/**
|
|
11110
|
+
* Generated image contains celebrity.
|
|
11111
|
+
*/
|
|
11112
|
+
GENERATED_IMAGE_CELEBRITY = "GENERATED_IMAGE_CELEBRITY",
|
|
11113
|
+
/**
|
|
11114
|
+
* Generated image contains prominent people detected by rewriter.
|
|
11115
|
+
*/
|
|
11116
|
+
GENERATED_IMAGE_PROMINENT_PEOPLE_DETECTED_BY_REWRITER = "GENERATED_IMAGE_PROMINENT_PEOPLE_DETECTED_BY_REWRITER",
|
|
11117
|
+
/**
|
|
11118
|
+
* Generated image contains identifiable people.
|
|
11119
|
+
*/
|
|
11120
|
+
GENERATED_IMAGE_IDENTIFIABLE_PEOPLE = "GENERATED_IMAGE_IDENTIFIABLE_PEOPLE",
|
|
11121
|
+
/**
|
|
11122
|
+
* Generated image contains minors.
|
|
11123
|
+
*/
|
|
11124
|
+
GENERATED_IMAGE_MINORS = "GENERATED_IMAGE_MINORS",
|
|
11125
|
+
/**
|
|
11126
|
+
* Generated image contains IP violation.
|
|
11127
|
+
*/
|
|
11128
|
+
OUTPUT_IMAGE_IP_PROHIBITED = "OUTPUT_IMAGE_IP_PROHIBITED",
|
|
11129
|
+
/**
|
|
11130
|
+
* Other generated content issue.
|
|
11131
|
+
*/
|
|
11132
|
+
GENERATED_OTHER = "GENERATED_OTHER",
|
|
11133
|
+
/**
|
|
11134
|
+
* Max regeneration attempts reached.
|
|
11135
|
+
*/
|
|
11136
|
+
MAX_REGENERATION_REACHED = "MAX_REGENERATION_REACHED"
|
|
10891
11137
|
}
|
|
10892
11138
|
|
|
10893
11139
|
/** Options about which input is included in the user's turn. */
|
|
@@ -11200,6 +11446,7 @@ declare namespace types {
|
|
|
11200
11446
|
GenerateVideosSource,
|
|
11201
11447
|
VideoGenerationReferenceImage,
|
|
11202
11448
|
VideoGenerationMask,
|
|
11449
|
+
WebhookConfig,
|
|
11203
11450
|
GenerateVideosConfig,
|
|
11204
11451
|
GenerateVideosParameters,
|
|
11205
11452
|
GeneratedVideo,
|
|
@@ -11391,19 +11638,21 @@ declare namespace types {
|
|
|
11391
11638
|
ContextWindowCompressionConfig,
|
|
11392
11639
|
AudioTranscriptionConfig,
|
|
11393
11640
|
ProactivityConfig,
|
|
11641
|
+
CustomizedAvatar,
|
|
11642
|
+
AvatarConfig,
|
|
11394
11643
|
LiveClientSetup,
|
|
11395
11644
|
LiveClientContent,
|
|
11396
11645
|
ActivityStart,
|
|
11397
11646
|
ActivityEnd,
|
|
11398
11647
|
LiveClientRealtimeInput,
|
|
11399
11648
|
LiveClientToolResponse,
|
|
11400
|
-
LiveSendRealtimeInputParameters,
|
|
11401
11649
|
LiveClientMessage,
|
|
11402
11650
|
LiveConnectConfig,
|
|
11403
11651
|
LiveConnectParameters,
|
|
11404
11652
|
CreateChatParameters,
|
|
11405
11653
|
SendMessageParameters,
|
|
11406
11654
|
LiveSendClientContentParameters,
|
|
11655
|
+
LiveSendRealtimeInputParameters,
|
|
11407
11656
|
LiveSendToolResponseParameters,
|
|
11408
11657
|
LiveMusicClientSetup,
|
|
11409
11658
|
WeightedPrompt,
|
|
@@ -11914,7 +12163,7 @@ declare namespace Usage {
|
|
|
11914
12163
|
/**
|
|
11915
12164
|
* The modality associated with the token count.
|
|
11916
12165
|
*/
|
|
11917
|
-
modality?: 'text' | 'image' | 'audio';
|
|
12166
|
+
modality?: 'text' | 'image' | 'audio' | 'video' | 'document';
|
|
11918
12167
|
/**
|
|
11919
12168
|
* Number of tokens for the modality.
|
|
11920
12169
|
*/
|
|
@@ -11927,7 +12176,7 @@ declare namespace Usage {
|
|
|
11927
12176
|
/**
|
|
11928
12177
|
* The modality associated with the token count.
|
|
11929
12178
|
*/
|
|
11930
|
-
modality?: 'text' | 'image' | 'audio';
|
|
12179
|
+
modality?: 'text' | 'image' | 'audio' | 'video' | 'document';
|
|
11931
12180
|
/**
|
|
11932
12181
|
* Number of tokens for the modality.
|
|
11933
12182
|
*/
|
|
@@ -11940,7 +12189,7 @@ declare namespace Usage {
|
|
|
11940
12189
|
/**
|
|
11941
12190
|
* The modality associated with the token count.
|
|
11942
12191
|
*/
|
|
11943
|
-
modality?: 'text' | 'image' | 'audio';
|
|
12192
|
+
modality?: 'text' | 'image' | 'audio' | 'video' | 'document';
|
|
11944
12193
|
/**
|
|
11945
12194
|
* Number of tokens for the modality.
|
|
11946
12195
|
*/
|
|
@@ -11953,7 +12202,7 @@ declare namespace Usage {
|
|
|
11953
12202
|
/**
|
|
11954
12203
|
* The modality associated with the token count.
|
|
11955
12204
|
*/
|
|
11956
|
-
modality?: 'text' | 'image' | 'audio';
|
|
12205
|
+
modality?: 'text' | 'image' | 'audio' | 'video' | 'document';
|
|
11957
12206
|
/**
|
|
11958
12207
|
* Number of tokens for the modality.
|
|
11959
12208
|
*/
|
|
@@ -12228,6 +12477,484 @@ export declare interface VoiceConfig {
|
|
|
12228
12477
|
prebuiltVoiceConfig?: PrebuiltVoiceConfig;
|
|
12229
12478
|
}
|
|
12230
12479
|
|
|
12480
|
+
/** Configuration for webhook notifications.
|
|
12481
|
+
|
|
12482
|
+
Used to configure webhook endpoints that will receive notifications
|
|
12483
|
+
when long-running operations (e.g., batch jobs, video generation) complete. */
|
|
12484
|
+
export declare interface WebhookConfig {
|
|
12485
|
+
/** The webhook URIs to receive notifications. If set, these
|
|
12486
|
+
webhook URIs will be used instead of the registered webhooks. */
|
|
12487
|
+
uris?: string[];
|
|
12488
|
+
/** User metadata that will be included in each webhook event
|
|
12489
|
+
notification. Use this to attach custom key-value data to correlate
|
|
12490
|
+
webhook events with your internal systems. */
|
|
12491
|
+
userMetadata?: Record<string, unknown>;
|
|
12492
|
+
}
|
|
12493
|
+
|
|
12494
|
+
/**
|
|
12495
|
+
* Message for configuring webhook events for a request.
|
|
12496
|
+
*/
|
|
12497
|
+
declare interface WebhookConfig_2 {
|
|
12498
|
+
/**
|
|
12499
|
+
* Optional. If set, these webhook URIs will be used for webhook events instead of
|
|
12500
|
+
* the registered webhooks.
|
|
12501
|
+
*/
|
|
12502
|
+
uris?: Array<string>;
|
|
12503
|
+
/**
|
|
12504
|
+
* Optional. The user metadata that will be returned on each event emission to the
|
|
12505
|
+
* webhooks.
|
|
12506
|
+
*/
|
|
12507
|
+
user_metadata?: {
|
|
12508
|
+
[key: string]: unknown;
|
|
12509
|
+
};
|
|
12510
|
+
}
|
|
12511
|
+
|
|
12512
|
+
declare interface WebhookCreateParams {
|
|
12513
|
+
/**
|
|
12514
|
+
* Path param: Which version of the API to use.
|
|
12515
|
+
*/
|
|
12516
|
+
api_version?: string;
|
|
12517
|
+
/**
|
|
12518
|
+
* Body param: Required. The events that the webhook is subscribed to. Available
|
|
12519
|
+
* events:
|
|
12520
|
+
*
|
|
12521
|
+
* - batch.succeeded
|
|
12522
|
+
* - batch.cancelled
|
|
12523
|
+
* - batch.expired
|
|
12524
|
+
* - batch.failed
|
|
12525
|
+
* - interaction.requires_action
|
|
12526
|
+
* - interaction.completed
|
|
12527
|
+
* - interaction.failed
|
|
12528
|
+
* - interaction.cancelled
|
|
12529
|
+
* - video.generated
|
|
12530
|
+
*/
|
|
12531
|
+
subscribed_events: Array<'batch.succeeded' | 'batch.cancelled' | 'batch.expired' | 'batch.failed' | 'interaction.requires_action' | 'interaction.completed' | 'interaction.failed' | 'interaction.cancelled' | 'video.generated' | (string & {})>;
|
|
12532
|
+
/**
|
|
12533
|
+
* Body param: Required. The URI to which webhook events will be sent.
|
|
12534
|
+
*/
|
|
12535
|
+
uri: string;
|
|
12536
|
+
/**
|
|
12537
|
+
* Query param: Optional. The webhook_id to use for the webhook. If not specified,
|
|
12538
|
+
* the server will generate a unique ID.
|
|
12539
|
+
*/
|
|
12540
|
+
webhook_id?: string;
|
|
12541
|
+
/**
|
|
12542
|
+
* Body param: Identifier. The name of the webhook. Format: `webhooks/{webhook_id}`
|
|
12543
|
+
*/
|
|
12544
|
+
name?: string;
|
|
12545
|
+
/**
|
|
12546
|
+
* Body param: The state of the webhook.
|
|
12547
|
+
*/
|
|
12548
|
+
state?: 'enabled' | 'disabled' | 'disabled_due_to_failed_deliveries';
|
|
12549
|
+
}
|
|
12550
|
+
|
|
12551
|
+
/**
|
|
12552
|
+
* A Webhook resource.
|
|
12553
|
+
*/
|
|
12554
|
+
declare interface WebhookCreateResponse {
|
|
12555
|
+
/**
|
|
12556
|
+
* Required. The events that the webhook is subscribed to. Available events:
|
|
12557
|
+
*
|
|
12558
|
+
* - batch.succeeded
|
|
12559
|
+
* - batch.cancelled
|
|
12560
|
+
* - batch.expired
|
|
12561
|
+
* - batch.failed
|
|
12562
|
+
* - interaction.requires_action
|
|
12563
|
+
* - interaction.completed
|
|
12564
|
+
* - interaction.failed
|
|
12565
|
+
* - interaction.cancelled
|
|
12566
|
+
* - video.generated
|
|
12567
|
+
*/
|
|
12568
|
+
subscribed_events: Array<'batch.succeeded' | 'batch.cancelled' | 'batch.expired' | 'batch.failed' | 'interaction.requires_action' | 'interaction.completed' | 'interaction.failed' | 'interaction.cancelled' | 'video.generated' | (string & {})>;
|
|
12569
|
+
/**
|
|
12570
|
+
* Required. The URI to which webhook events will be sent.
|
|
12571
|
+
*/
|
|
12572
|
+
uri: string;
|
|
12573
|
+
/**
|
|
12574
|
+
* Output only. The timestamp when the webhook was created.
|
|
12575
|
+
*/
|
|
12576
|
+
create_time?: string;
|
|
12577
|
+
/**
|
|
12578
|
+
* Identifier. The name of the webhook. Format: `webhooks/{webhook_id}`
|
|
12579
|
+
*/
|
|
12580
|
+
name?: string;
|
|
12581
|
+
/**
|
|
12582
|
+
* Output only. The new signing secret for the webhook. Only populated on create.
|
|
12583
|
+
*/
|
|
12584
|
+
new_signing_secret?: string;
|
|
12585
|
+
/**
|
|
12586
|
+
* Output only. The signing secrets associated with this webhook.
|
|
12587
|
+
*/
|
|
12588
|
+
signing_secrets?: Array<WebhookCreateResponse.SigningSecret>;
|
|
12589
|
+
/**
|
|
12590
|
+
* The state of the webhook.
|
|
12591
|
+
*/
|
|
12592
|
+
state?: 'enabled' | 'disabled' | 'disabled_due_to_failed_deliveries';
|
|
12593
|
+
/**
|
|
12594
|
+
* Output only. The timestamp when the webhook was last updated.
|
|
12595
|
+
*/
|
|
12596
|
+
update_time?: string;
|
|
12597
|
+
}
|
|
12598
|
+
|
|
12599
|
+
declare namespace WebhookCreateResponse {
|
|
12600
|
+
/**
|
|
12601
|
+
* Represents a signing secret used to verify webhook payloads.
|
|
12602
|
+
*/
|
|
12603
|
+
interface SigningSecret {
|
|
12604
|
+
/**
|
|
12605
|
+
* Output only. The expiration date of the signing secret.
|
|
12606
|
+
*/
|
|
12607
|
+
expire_time?: string;
|
|
12608
|
+
/**
|
|
12609
|
+
* Output only. The truncated version of the signing secret.
|
|
12610
|
+
*/
|
|
12611
|
+
truncated_secret?: string;
|
|
12612
|
+
}
|
|
12613
|
+
}
|
|
12614
|
+
|
|
12615
|
+
declare interface WebhookDeleteParams {
|
|
12616
|
+
/**
|
|
12617
|
+
* Which version of the API to use.
|
|
12618
|
+
*/
|
|
12619
|
+
api_version?: string;
|
|
12620
|
+
}
|
|
12621
|
+
|
|
12622
|
+
/**
|
|
12623
|
+
* A generic empty message that you can re-use to avoid defining duplicated empty
|
|
12624
|
+
* messages in your APIs. A typical example is to use it as the request or the
|
|
12625
|
+
* response type of an API method. For instance:
|
|
12626
|
+
*
|
|
12627
|
+
* service Foo {
|
|
12628
|
+
* rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
|
|
12629
|
+
* }
|
|
12630
|
+
*/
|
|
12631
|
+
declare interface WebhookDeleteResponse {
|
|
12632
|
+
}
|
|
12633
|
+
|
|
12634
|
+
declare interface WebhookListParams {
|
|
12635
|
+
/**
|
|
12636
|
+
* Path param: Which version of the API to use.
|
|
12637
|
+
*/
|
|
12638
|
+
api_version?: string;
|
|
12639
|
+
/**
|
|
12640
|
+
* Query param: Optional. The maximum number of webhooks to return. The service may
|
|
12641
|
+
* return fewer than this value. If unspecified, at most 50 webhooks will be
|
|
12642
|
+
* returned. The maximum value is 1000.
|
|
12643
|
+
*/
|
|
12644
|
+
page_size?: number;
|
|
12645
|
+
/**
|
|
12646
|
+
* Query param: Optional. A page token, received from a previous `ListWebhooks`
|
|
12647
|
+
* call. Provide this to retrieve the subsequent page.
|
|
12648
|
+
*/
|
|
12649
|
+
page_token?: string;
|
|
12650
|
+
}
|
|
12651
|
+
|
|
12652
|
+
/**
|
|
12653
|
+
* Response message for WebhookService.ListWebhooks.
|
|
12654
|
+
*/
|
|
12655
|
+
declare interface WebhookListResponse {
|
|
12656
|
+
/**
|
|
12657
|
+
* A token, which can be sent as `page_token` to retrieve the next page. If this
|
|
12658
|
+
* field is omitted, there are no subsequent pages.
|
|
12659
|
+
*/
|
|
12660
|
+
next_page_token?: string;
|
|
12661
|
+
/**
|
|
12662
|
+
* The webhooks.
|
|
12663
|
+
*/
|
|
12664
|
+
webhooks?: Array<WebhookListResponse.Webhook>;
|
|
12665
|
+
}
|
|
12666
|
+
|
|
12667
|
+
declare namespace WebhookListResponse {
|
|
12668
|
+
/**
|
|
12669
|
+
* A Webhook resource.
|
|
12670
|
+
*/
|
|
12671
|
+
interface Webhook {
|
|
12672
|
+
/**
|
|
12673
|
+
* Required. The events that the webhook is subscribed to. Available events:
|
|
12674
|
+
*
|
|
12675
|
+
* - batch.succeeded
|
|
12676
|
+
* - batch.cancelled
|
|
12677
|
+
* - batch.expired
|
|
12678
|
+
* - batch.failed
|
|
12679
|
+
* - interaction.requires_action
|
|
12680
|
+
* - interaction.completed
|
|
12681
|
+
* - interaction.failed
|
|
12682
|
+
* - interaction.cancelled
|
|
12683
|
+
* - video.generated
|
|
12684
|
+
*/
|
|
12685
|
+
subscribed_events: Array<'batch.succeeded' | 'batch.cancelled' | 'batch.expired' | 'batch.failed' | 'interaction.requires_action' | 'interaction.completed' | 'interaction.failed' | 'interaction.cancelled' | 'video.generated' | (string & {})>;
|
|
12686
|
+
/**
|
|
12687
|
+
* Required. The URI to which webhook events will be sent.
|
|
12688
|
+
*/
|
|
12689
|
+
uri: string;
|
|
12690
|
+
/**
|
|
12691
|
+
* Output only. The timestamp when the webhook was created.
|
|
12692
|
+
*/
|
|
12693
|
+
create_time?: string;
|
|
12694
|
+
/**
|
|
12695
|
+
* Identifier. The name of the webhook. Format: `webhooks/{webhook_id}`
|
|
12696
|
+
*/
|
|
12697
|
+
name?: string;
|
|
12698
|
+
/**
|
|
12699
|
+
* Output only. The new signing secret for the webhook. Only populated on create.
|
|
12700
|
+
*/
|
|
12701
|
+
new_signing_secret?: string;
|
|
12702
|
+
/**
|
|
12703
|
+
* Output only. The signing secrets associated with this webhook.
|
|
12704
|
+
*/
|
|
12705
|
+
signing_secrets?: Array<Webhook.SigningSecret>;
|
|
12706
|
+
/**
|
|
12707
|
+
* The state of the webhook.
|
|
12708
|
+
*/
|
|
12709
|
+
state?: 'enabled' | 'disabled' | 'disabled_due_to_failed_deliveries';
|
|
12710
|
+
/**
|
|
12711
|
+
* Output only. The timestamp when the webhook was last updated.
|
|
12712
|
+
*/
|
|
12713
|
+
update_time?: string;
|
|
12714
|
+
}
|
|
12715
|
+
namespace Webhook {
|
|
12716
|
+
/**
|
|
12717
|
+
* Represents a signing secret used to verify webhook payloads.
|
|
12718
|
+
*/
|
|
12719
|
+
interface SigningSecret {
|
|
12720
|
+
/**
|
|
12721
|
+
* Output only. The expiration date of the signing secret.
|
|
12722
|
+
*/
|
|
12723
|
+
expire_time?: string;
|
|
12724
|
+
/**
|
|
12725
|
+
* Output only. The truncated version of the signing secret.
|
|
12726
|
+
*/
|
|
12727
|
+
truncated_secret?: string;
|
|
12728
|
+
}
|
|
12729
|
+
}
|
|
12730
|
+
}
|
|
12731
|
+
|
|
12732
|
+
declare interface WebhookPingParams {
|
|
12733
|
+
/**
|
|
12734
|
+
* Path param: Which version of the API to use.
|
|
12735
|
+
*/
|
|
12736
|
+
api_version?: string;
|
|
12737
|
+
/**
|
|
12738
|
+
* Body param: Request message for WebhookService.PingWebhook.
|
|
12739
|
+
*/
|
|
12740
|
+
body?: WebhookPingParams.Body;
|
|
12741
|
+
}
|
|
12742
|
+
|
|
12743
|
+
declare namespace WebhookPingParams {
|
|
12744
|
+
/**
|
|
12745
|
+
* Request message for WebhookService.PingWebhook.
|
|
12746
|
+
*/
|
|
12747
|
+
interface Body {
|
|
12748
|
+
}
|
|
12749
|
+
}
|
|
12750
|
+
|
|
12751
|
+
/**
|
|
12752
|
+
* Response message for WebhookService.PingWebhook.
|
|
12753
|
+
*/
|
|
12754
|
+
declare interface WebhookPingResponse {
|
|
12755
|
+
}
|
|
12756
|
+
|
|
12757
|
+
declare interface WebhookRetrieveParams {
|
|
12758
|
+
/**
|
|
12759
|
+
* Which version of the API to use.
|
|
12760
|
+
*/
|
|
12761
|
+
api_version?: string;
|
|
12762
|
+
}
|
|
12763
|
+
|
|
12764
|
+
/**
|
|
12765
|
+
* A Webhook resource.
|
|
12766
|
+
*/
|
|
12767
|
+
declare interface WebhookRetrieveResponse {
|
|
12768
|
+
/**
|
|
12769
|
+
* Required. The events that the webhook is subscribed to. Available events:
|
|
12770
|
+
*
|
|
12771
|
+
* - batch.succeeded
|
|
12772
|
+
* - batch.cancelled
|
|
12773
|
+
* - batch.expired
|
|
12774
|
+
* - batch.failed
|
|
12775
|
+
* - interaction.requires_action
|
|
12776
|
+
* - interaction.completed
|
|
12777
|
+
* - interaction.failed
|
|
12778
|
+
* - interaction.cancelled
|
|
12779
|
+
* - video.generated
|
|
12780
|
+
*/
|
|
12781
|
+
subscribed_events: Array<'batch.succeeded' | 'batch.cancelled' | 'batch.expired' | 'batch.failed' | 'interaction.requires_action' | 'interaction.completed' | 'interaction.failed' | 'interaction.cancelled' | 'video.generated' | (string & {})>;
|
|
12782
|
+
/**
|
|
12783
|
+
* Required. The URI to which webhook events will be sent.
|
|
12784
|
+
*/
|
|
12785
|
+
uri: string;
|
|
12786
|
+
/**
|
|
12787
|
+
* Output only. The timestamp when the webhook was created.
|
|
12788
|
+
*/
|
|
12789
|
+
create_time?: string;
|
|
12790
|
+
/**
|
|
12791
|
+
* Identifier. The name of the webhook. Format: `webhooks/{webhook_id}`
|
|
12792
|
+
*/
|
|
12793
|
+
name?: string;
|
|
12794
|
+
/**
|
|
12795
|
+
* Output only. The new signing secret for the webhook. Only populated on create.
|
|
12796
|
+
*/
|
|
12797
|
+
new_signing_secret?: string;
|
|
12798
|
+
/**
|
|
12799
|
+
* Output only. The signing secrets associated with this webhook.
|
|
12800
|
+
*/
|
|
12801
|
+
signing_secrets?: Array<WebhookRetrieveResponse.SigningSecret>;
|
|
12802
|
+
/**
|
|
12803
|
+
* The state of the webhook.
|
|
12804
|
+
*/
|
|
12805
|
+
state?: 'enabled' | 'disabled' | 'disabled_due_to_failed_deliveries';
|
|
12806
|
+
/**
|
|
12807
|
+
* Output only. The timestamp when the webhook was last updated.
|
|
12808
|
+
*/
|
|
12809
|
+
update_time?: string;
|
|
12810
|
+
}
|
|
12811
|
+
|
|
12812
|
+
declare namespace WebhookRetrieveResponse {
|
|
12813
|
+
/**
|
|
12814
|
+
* Represents a signing secret used to verify webhook payloads.
|
|
12815
|
+
*/
|
|
12816
|
+
interface SigningSecret {
|
|
12817
|
+
/**
|
|
12818
|
+
* Output only. The expiration date of the signing secret.
|
|
12819
|
+
*/
|
|
12820
|
+
expire_time?: string;
|
|
12821
|
+
/**
|
|
12822
|
+
* Output only. The truncated version of the signing secret.
|
|
12823
|
+
*/
|
|
12824
|
+
truncated_secret?: string;
|
|
12825
|
+
}
|
|
12826
|
+
}
|
|
12827
|
+
|
|
12828
|
+
declare interface WebhookRotateSigningSecretParams {
|
|
12829
|
+
/**
|
|
12830
|
+
* Path param: Which version of the API to use.
|
|
12831
|
+
*/
|
|
12832
|
+
api_version?: string;
|
|
12833
|
+
/**
|
|
12834
|
+
* Body param: Optional. The revocation behavior for previous signing secrets.
|
|
12835
|
+
*/
|
|
12836
|
+
revocation_behavior?: 'revoke_previous_secrets_after_h24' | 'revoke_previous_secrets_immediately';
|
|
12837
|
+
}
|
|
12838
|
+
|
|
12839
|
+
/**
|
|
12840
|
+
* Response message for WebhookService.RotateSigningSecret.
|
|
12841
|
+
*/
|
|
12842
|
+
declare interface WebhookRotateSigningSecretResponse {
|
|
12843
|
+
/**
|
|
12844
|
+
* Output only. The newly generated signing secret.
|
|
12845
|
+
*/
|
|
12846
|
+
secret?: string;
|
|
12847
|
+
}
|
|
12848
|
+
|
|
12849
|
+
export declare class Webhooks extends BaseWebhooks {
|
|
12850
|
+
}
|
|
12851
|
+
|
|
12852
|
+
export declare namespace Webhooks {
|
|
12853
|
+
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, };
|
|
12854
|
+
}
|
|
12855
|
+
|
|
12856
|
+
declare interface WebhookUpdateParams {
|
|
12857
|
+
/**
|
|
12858
|
+
* Path param: Which version of the API to use.
|
|
12859
|
+
*/
|
|
12860
|
+
api_version?: string;
|
|
12861
|
+
/**
|
|
12862
|
+
* Body param: Required. The events that the webhook is subscribed to. Available
|
|
12863
|
+
* events:
|
|
12864
|
+
*
|
|
12865
|
+
* - batch.succeeded
|
|
12866
|
+
* - batch.cancelled
|
|
12867
|
+
* - batch.expired
|
|
12868
|
+
* - batch.failed
|
|
12869
|
+
* - interaction.requires_action
|
|
12870
|
+
* - interaction.completed
|
|
12871
|
+
* - interaction.failed
|
|
12872
|
+
* - interaction.cancelled
|
|
12873
|
+
* - video.generated
|
|
12874
|
+
*/
|
|
12875
|
+
subscribed_events: Array<'batch.succeeded' | 'batch.cancelled' | 'batch.expired' | 'batch.failed' | 'interaction.requires_action' | 'interaction.completed' | 'interaction.failed' | 'interaction.cancelled' | 'video.generated' | (string & {})>;
|
|
12876
|
+
/**
|
|
12877
|
+
* Body param: Required. The URI to which webhook events will be sent.
|
|
12878
|
+
*/
|
|
12879
|
+
uri: string;
|
|
12880
|
+
/**
|
|
12881
|
+
* Query param: Optional. The list of fields to update.
|
|
12882
|
+
*/
|
|
12883
|
+
update_mask?: string;
|
|
12884
|
+
/**
|
|
12885
|
+
* Body param: Identifier. The name of the webhook. Format: `webhooks/{webhook_id}`
|
|
12886
|
+
*/
|
|
12887
|
+
name?: string;
|
|
12888
|
+
/**
|
|
12889
|
+
* Body param: The state of the webhook.
|
|
12890
|
+
*/
|
|
12891
|
+
state?: 'enabled' | 'disabled' | 'disabled_due_to_failed_deliveries';
|
|
12892
|
+
}
|
|
12893
|
+
|
|
12894
|
+
/**
|
|
12895
|
+
* A Webhook resource.
|
|
12896
|
+
*/
|
|
12897
|
+
declare interface WebhookUpdateResponse {
|
|
12898
|
+
/**
|
|
12899
|
+
* Required. The events that the webhook is subscribed to. Available events:
|
|
12900
|
+
*
|
|
12901
|
+
* - batch.succeeded
|
|
12902
|
+
* - batch.cancelled
|
|
12903
|
+
* - batch.expired
|
|
12904
|
+
* - batch.failed
|
|
12905
|
+
* - interaction.requires_action
|
|
12906
|
+
* - interaction.completed
|
|
12907
|
+
* - interaction.failed
|
|
12908
|
+
* - interaction.cancelled
|
|
12909
|
+
* - video.generated
|
|
12910
|
+
*/
|
|
12911
|
+
subscribed_events: Array<'batch.succeeded' | 'batch.cancelled' | 'batch.expired' | 'batch.failed' | 'interaction.requires_action' | 'interaction.completed' | 'interaction.failed' | 'interaction.cancelled' | 'video.generated' | (string & {})>;
|
|
12912
|
+
/**
|
|
12913
|
+
* Required. The URI to which webhook events will be sent.
|
|
12914
|
+
*/
|
|
12915
|
+
uri: string;
|
|
12916
|
+
/**
|
|
12917
|
+
* Output only. The timestamp when the webhook was created.
|
|
12918
|
+
*/
|
|
12919
|
+
create_time?: string;
|
|
12920
|
+
/**
|
|
12921
|
+
* Identifier. The name of the webhook. Format: `webhooks/{webhook_id}`
|
|
12922
|
+
*/
|
|
12923
|
+
name?: string;
|
|
12924
|
+
/**
|
|
12925
|
+
* Output only. The new signing secret for the webhook. Only populated on create.
|
|
12926
|
+
*/
|
|
12927
|
+
new_signing_secret?: string;
|
|
12928
|
+
/**
|
|
12929
|
+
* Output only. The signing secrets associated with this webhook.
|
|
12930
|
+
*/
|
|
12931
|
+
signing_secrets?: Array<WebhookUpdateResponse.SigningSecret>;
|
|
12932
|
+
/**
|
|
12933
|
+
* The state of the webhook.
|
|
12934
|
+
*/
|
|
12935
|
+
state?: 'enabled' | 'disabled' | 'disabled_due_to_failed_deliveries';
|
|
12936
|
+
/**
|
|
12937
|
+
* Output only. The timestamp when the webhook was last updated.
|
|
12938
|
+
*/
|
|
12939
|
+
update_time?: string;
|
|
12940
|
+
}
|
|
12941
|
+
|
|
12942
|
+
declare namespace WebhookUpdateResponse {
|
|
12943
|
+
/**
|
|
12944
|
+
* Represents a signing secret used to verify webhook payloads.
|
|
12945
|
+
*/
|
|
12946
|
+
interface SigningSecret {
|
|
12947
|
+
/**
|
|
12948
|
+
* Output only. The expiration date of the signing secret.
|
|
12949
|
+
*/
|
|
12950
|
+
expire_time?: string;
|
|
12951
|
+
/**
|
|
12952
|
+
* Output only. The truncated version of the signing secret.
|
|
12953
|
+
*/
|
|
12954
|
+
truncated_secret?: string;
|
|
12955
|
+
}
|
|
12956
|
+
}
|
|
12957
|
+
|
|
12231
12958
|
/** Standard web search for grounding and related configurations. Only text results are returned. */
|
|
12232
12959
|
export declare interface WebSearch {
|
|
12233
12960
|
}
|