@google/genai 1.50.0 → 1.51.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/README.md +12 -12
- package/dist/genai.d.ts +230 -358
- package/dist/index.cjs +164 -148
- package/dist/index.mjs +165 -149
- package/dist/index.mjs.map +1 -1
- package/dist/node/index.cjs +192 -158
- package/dist/node/index.mjs +193 -159
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/node.d.ts +230 -358
- package/dist/tokenizer/node.cjs +15 -1
- package/dist/tokenizer/node.d.ts +1 -1
- package/dist/tokenizer/node.mjs +15 -1
- package/dist/tokenizer/node.mjs.map +1 -1
- package/dist/vertex_internal/index.cjs +16 -2
- package/dist/vertex_internal/index.cjs.map +1 -1
- package/dist/vertex_internal/index.d.ts +75 -24
- package/dist/vertex_internal/index.js +16 -2
- package/dist/vertex_internal/index.js.map +1 -1
- package/dist/web/index.mjs +158 -147
- package/dist/web/index.mjs.map +1 -1
- package/dist/web/web.d.ts +230 -358
- package/package.json +6 -1
package/dist/node/node.d.ts
CHANGED
|
@@ -480,7 +480,7 @@ declare interface AudioContent {
|
|
|
480
480
|
/**
|
|
481
481
|
* The sample rate of the audio.
|
|
482
482
|
*/
|
|
483
|
-
|
|
483
|
+
sample_rate?: number;
|
|
484
484
|
/**
|
|
485
485
|
* The URI of the audio.
|
|
486
486
|
*/
|
|
@@ -655,7 +655,7 @@ declare interface BaseCreateAgentInteractionParams {
|
|
|
655
655
|
/**
|
|
656
656
|
* Body param: The name of the `Agent` used for generating the interaction.
|
|
657
657
|
*/
|
|
658
|
-
agent:
|
|
658
|
+
agent: 'deep-research-pro-preview-12-2025' | 'deep-research-preview-04-2026' | 'deep-research-max-preview-04-2026' | (string & {});
|
|
659
659
|
/**
|
|
660
660
|
* Body param: The input for the interaction.
|
|
661
661
|
*/
|
|
@@ -950,15 +950,11 @@ declare class BaseWebhooks extends APIResource {
|
|
|
950
950
|
/**
|
|
951
951
|
* Creates a new Webhook.
|
|
952
952
|
*/
|
|
953
|
-
create(params: WebhookCreateParams, options?: RequestOptions): APIPromise<
|
|
954
|
-
/**
|
|
955
|
-
* Gets a specific Webhook.
|
|
956
|
-
*/
|
|
957
|
-
retrieve(id: string, params?: WebhookRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<WebhookRetrieveResponse>;
|
|
953
|
+
create(params: WebhookCreateParams, options?: RequestOptions): APIPromise<Webhook>;
|
|
958
954
|
/**
|
|
959
955
|
* Updates an existing Webhook.
|
|
960
956
|
*/
|
|
961
|
-
update(id: string, params
|
|
957
|
+
update(id: string, params?: WebhookUpdateParams | null | undefined, options?: RequestOptions): APIPromise<Webhook>;
|
|
962
958
|
/**
|
|
963
959
|
* Lists all Webhooks.
|
|
964
960
|
*/
|
|
@@ -967,6 +963,10 @@ declare class BaseWebhooks extends APIResource {
|
|
|
967
963
|
* Deletes a Webhook.
|
|
968
964
|
*/
|
|
969
965
|
delete(id: string, params?: WebhookDeleteParams | null | undefined, options?: RequestOptions): APIPromise<WebhookDeleteResponse>;
|
|
966
|
+
/**
|
|
967
|
+
* Gets a specific Webhook.
|
|
968
|
+
*/
|
|
969
|
+
get(id: string, params?: WebhookGetParams | null | undefined, options?: RequestOptions): APIPromise<Webhook>;
|
|
970
970
|
/**
|
|
971
971
|
* Sends a ping event to a Webhook.
|
|
972
972
|
*/
|
|
@@ -1107,7 +1107,7 @@ export declare interface BatchJob {
|
|
|
1107
1107
|
createTime?: string;
|
|
1108
1108
|
/** Output only. Time when the Job for the first time entered the `JOB_STATE_RUNNING` state. */
|
|
1109
1109
|
startTime?: string;
|
|
1110
|
-
/** The time when the BatchJob was completed. This field is for
|
|
1110
|
+
/** The time when the BatchJob was completed. This field is for Gemini Enterprise Agent Platform only.
|
|
1111
1111
|
*/
|
|
1112
1112
|
endTime?: string;
|
|
1113
1113
|
/** The time when the BatchJob was last updated.
|
|
@@ -1116,21 +1116,24 @@ export declare interface BatchJob {
|
|
|
1116
1116
|
/** The name of the model that produces the predictions via the BatchJob.
|
|
1117
1117
|
*/
|
|
1118
1118
|
model?: string;
|
|
1119
|
-
/** Configuration for the input data. This field is for
|
|
1119
|
+
/** Configuration for the input data. This field is for Gemini Enterprise Agent Platform only.
|
|
1120
1120
|
*/
|
|
1121
1121
|
src?: BatchJobSource;
|
|
1122
1122
|
/** Configuration for the output data.
|
|
1123
1123
|
*/
|
|
1124
1124
|
dest?: BatchJobDestination;
|
|
1125
|
-
/** Statistics on completed and failed prediction instances. This field is for
|
|
1125
|
+
/** Statistics on completed and failed prediction instances. This field is for Gemini Enterprise Agent Platform only.
|
|
1126
1126
|
*/
|
|
1127
1127
|
completionStats?: CompletionStats;
|
|
1128
|
+
/** Information further describing the output of this job. Output only.
|
|
1129
|
+
*/
|
|
1130
|
+
outputInfo?: BatchJobOutputInfo;
|
|
1128
1131
|
}
|
|
1129
1132
|
|
|
1130
1133
|
/** Config for `des` parameter. */
|
|
1131
1134
|
export declare interface BatchJobDestination {
|
|
1132
1135
|
/** Storage format of the output files. Must be one of:
|
|
1133
|
-
'jsonl', 'bigquery'.
|
|
1136
|
+
'jsonl', 'bigquery', 'vertex-dataset'.
|
|
1134
1137
|
*/
|
|
1135
1138
|
format?: string;
|
|
1136
1139
|
/** The Google Cloud Storage URI to the output file.
|
|
@@ -1156,14 +1159,27 @@ export declare interface BatchJobDestination {
|
|
|
1156
1159
|
the input requests.
|
|
1157
1160
|
*/
|
|
1158
1161
|
inlinedEmbedContentResponses?: InlinedEmbedContentResponse[];
|
|
1162
|
+
/** This field is experimental and may change in future versions. The Vertex AI dataset destination.
|
|
1163
|
+
*/
|
|
1164
|
+
vertexDataset?: VertexMultimodalDatasetDestination;
|
|
1159
1165
|
}
|
|
1160
1166
|
|
|
1161
1167
|
export declare type BatchJobDestinationUnion = BatchJobDestination | string;
|
|
1162
1168
|
|
|
1169
|
+
/** Represents the `output_info` field in batch jobs. */
|
|
1170
|
+
export declare interface BatchJobOutputInfo {
|
|
1171
|
+
/** This field is experimental and may change in future versions. The Vertex AI dataset name containing the output data. */
|
|
1172
|
+
vertexMultimodalDatasetName?: string;
|
|
1173
|
+
/** The full path of the Cloud Storage directory created, into which the prediction output is written. */
|
|
1174
|
+
gcsOutputDirectory?: string;
|
|
1175
|
+
/** The name of the BigQuery table created, in `predictions_<timestamp>` format, into which the prediction output is written. */
|
|
1176
|
+
bigqueryOutputTable?: string;
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1163
1179
|
/** Config for `src` parameter. */
|
|
1164
1180
|
export declare interface BatchJobSource {
|
|
1165
1181
|
/** Storage format of the input files. Must be one of:
|
|
1166
|
-
'jsonl', 'bigquery'.
|
|
1182
|
+
'jsonl', 'bigquery', 'vertex-dataset'.
|
|
1167
1183
|
*/
|
|
1168
1184
|
format?: string;
|
|
1169
1185
|
/** The Google Cloud Storage URIs to input files.
|
|
@@ -1179,6 +1195,9 @@ export declare interface BatchJobSource {
|
|
|
1179
1195
|
/** The Gemini Developer API's inlined input data to run batch job.
|
|
1180
1196
|
*/
|
|
1181
1197
|
inlinedRequests?: InlinedRequest[];
|
|
1198
|
+
/** This field is experimental and may change in future versions. The Vertex AI dataset resource name to use as input. Must be of type multimodal.
|
|
1199
|
+
*/
|
|
1200
|
+
vertexDatasetName?: string;
|
|
1182
1201
|
}
|
|
1183
1202
|
|
|
1184
1203
|
export declare type BatchJobSourceUnion = BatchJobSource | InlinedRequest[] | string;
|
|
@@ -1322,7 +1341,7 @@ export declare class Caches extends BaseModule {
|
|
|
1322
1341
|
* @remarks
|
|
1323
1342
|
* Context caching is only supported for specific models. See [Gemini
|
|
1324
1343
|
* Developer API reference](https://ai.google.dev/gemini-api/docs/caching?lang=node/context-cac)
|
|
1325
|
-
* and [
|
|
1344
|
+
* and [Gemini Enterprise Agent Platform reference](https://cloud.google.com/vertex-ai/generative-ai/docs/context-cache/context-cache-overview#supported_models)
|
|
1326
1345
|
* for more information.
|
|
1327
1346
|
*
|
|
1328
1347
|
* @param params - The parameters for the create request.
|
|
@@ -1925,9 +1944,13 @@ declare namespace ContentDelta {
|
|
|
1925
1944
|
data?: string;
|
|
1926
1945
|
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
1946
|
/**
|
|
1928
|
-
*
|
|
1947
|
+
* @deprecated Deprecated. Use sample_rate instead. The value is ignored.
|
|
1929
1948
|
*/
|
|
1930
1949
|
rate?: number;
|
|
1950
|
+
/**
|
|
1951
|
+
* The sample rate of the audio.
|
|
1952
|
+
*/
|
|
1953
|
+
sample_rate?: number;
|
|
1931
1954
|
uri?: string;
|
|
1932
1955
|
}
|
|
1933
1956
|
interface Document {
|
|
@@ -2134,24 +2157,13 @@ declare namespace ContentDelta {
|
|
|
2134
2157
|
* Required. ID to match the ID from the function call block.
|
|
2135
2158
|
*/
|
|
2136
2159
|
call_id: string;
|
|
2137
|
-
result: Array<
|
|
2160
|
+
result: Array<unknown>;
|
|
2138
2161
|
type: 'file_search_result';
|
|
2139
2162
|
/**
|
|
2140
2163
|
* A signature hash for backend validation.
|
|
2141
2164
|
*/
|
|
2142
2165
|
signature?: string;
|
|
2143
2166
|
}
|
|
2144
|
-
namespace FileSearchResult {
|
|
2145
|
-
/**
|
|
2146
|
-
* The result of the File Search.
|
|
2147
|
-
*/
|
|
2148
|
-
interface Result {
|
|
2149
|
-
/**
|
|
2150
|
-
* User provided metadata about the FileSearchResult.
|
|
2151
|
-
*/
|
|
2152
|
-
custom_metadata?: Array<unknown>;
|
|
2153
|
-
}
|
|
2154
|
-
}
|
|
2155
2167
|
interface GoogleMapsResult {
|
|
2156
2168
|
/**
|
|
2157
2169
|
* Required. ID to match the ID from the function call block.
|
|
@@ -2181,7 +2193,7 @@ export declare interface ContentEmbedding {
|
|
|
2181
2193
|
/** A list of floats representing an embedding.
|
|
2182
2194
|
*/
|
|
2183
2195
|
values?: number[];
|
|
2184
|
-
/**
|
|
2196
|
+
/** Gemini Enterprise Agent Platform only. Statistics of the input text associated with this
|
|
2185
2197
|
embedding.
|
|
2186
2198
|
*/
|
|
2187
2199
|
statistics?: ContentEmbeddingStatistics;
|
|
@@ -2189,11 +2201,11 @@ export declare interface ContentEmbedding {
|
|
|
2189
2201
|
|
|
2190
2202
|
/** Statistics of the input text associated with the result of content embedding. */
|
|
2191
2203
|
export declare interface ContentEmbeddingStatistics {
|
|
2192
|
-
/**
|
|
2204
|
+
/** Gemini Enterprise Agent Platform only. If the input text was truncated due to having
|
|
2193
2205
|
a length longer than the allowed maximum input.
|
|
2194
2206
|
*/
|
|
2195
2207
|
truncated?: boolean;
|
|
2196
|
-
/**
|
|
2208
|
+
/** Gemini Enterprise Agent Platform only. Number of tokens of the input text.
|
|
2197
2209
|
*/
|
|
2198
2210
|
tokenCount?: number;
|
|
2199
2211
|
}
|
|
@@ -2687,9 +2699,9 @@ export declare interface CreateTuningJobConfig {
|
|
|
2687
2699
|
adapterSize?: AdapterSize;
|
|
2688
2700
|
/** Tuning mode for tuning. */
|
|
2689
2701
|
tuningMode?: TuningMode;
|
|
2690
|
-
/** Custom base model for tuning. This is only supported for OSS models in
|
|
2702
|
+
/** Custom base model for tuning. This is only supported for OSS models in Gemini Enterprise Agent Platform. */
|
|
2691
2703
|
customBaseModel?: string;
|
|
2692
|
-
/** The batch size hyperparameter for tuning. This is only supported for OSS models in
|
|
2704
|
+
/** The batch size hyperparameter for tuning. This is only supported for OSS models in Gemini Enterprise Agent Platform. */
|
|
2693
2705
|
batchSize?: number;
|
|
2694
2706
|
/** The learning rate for tuning. OSS models only. Mutually exclusive with learning_rate_multiplier. */
|
|
2695
2707
|
learningRate?: number;
|
|
@@ -3027,7 +3039,8 @@ export declare interface DistillationHyperParameters {
|
|
|
3027
3039
|
/** Optional. Multiplier for adjusting the default learning rate. */
|
|
3028
3040
|
learningRateMultiplier?: number;
|
|
3029
3041
|
/** The batch size hyperparameter for tuning.
|
|
3030
|
-
This is only supported for OSS models in
|
|
3042
|
+
This is only supported for OSS models in Gemini Enterprise Agent Platform.
|
|
3043
|
+
*/
|
|
3031
3044
|
batchSize?: number;
|
|
3032
3045
|
/** The learning rate for tuning. OSS models only. */
|
|
3033
3046
|
learningRate?: number;
|
|
@@ -3347,27 +3360,27 @@ export declare interface EmbedContentConfig {
|
|
|
3347
3360
|
using the earlier model (`models/embedding-001`).
|
|
3348
3361
|
*/
|
|
3349
3362
|
outputDimensionality?: number;
|
|
3350
|
-
/**
|
|
3363
|
+
/** Gemini Enterprise Agent Platform only. The MIME type of the input.
|
|
3351
3364
|
*/
|
|
3352
3365
|
mimeType?: string;
|
|
3353
|
-
/**
|
|
3366
|
+
/** Gemini Enterprise Agent Platform only. Whether to silently truncate inputs longer than
|
|
3354
3367
|
the max sequence length. If this option is set to false, oversized inputs
|
|
3355
3368
|
will lead to an INVALID_ARGUMENT error, similar to other text APIs.
|
|
3356
3369
|
*/
|
|
3357
3370
|
autoTruncate?: boolean;
|
|
3358
|
-
/**
|
|
3371
|
+
/** Gemini Enterprise Agent Platform only. Whether to enable OCR for document content.
|
|
3359
3372
|
Only applicable to Gemini Embedding 2 models.
|
|
3360
3373
|
*/
|
|
3361
3374
|
documentOcr?: boolean;
|
|
3362
|
-
/**
|
|
3375
|
+
/** Gemini Enterprise Agent Platform only. Whether to extract audio from video content.
|
|
3363
3376
|
Only applicable to Gemini Embedding 2 models.
|
|
3364
3377
|
*/
|
|
3365
3378
|
audioTrackExtraction?: boolean;
|
|
3366
3379
|
}
|
|
3367
3380
|
|
|
3368
|
-
/** Request-level metadata for the
|
|
3381
|
+
/** Request-level metadata for the Gemini Enterprise Agent Platform Embed Content API. */
|
|
3369
3382
|
export declare interface EmbedContentMetadata {
|
|
3370
|
-
/**
|
|
3383
|
+
/** Gemini Enterprise Agent Platform only. The total number of billable characters included
|
|
3371
3384
|
in the request.
|
|
3372
3385
|
*/
|
|
3373
3386
|
billableCharacterCount?: number;
|
|
@@ -3397,7 +3410,7 @@ export declare interface EmbedContentParametersPrivate {
|
|
|
3397
3410
|
/** The single content to embed. Only the `parts.text` fields will be counted.
|
|
3398
3411
|
*/
|
|
3399
3412
|
content?: ContentUnion;
|
|
3400
|
-
/** The
|
|
3413
|
+
/** The Gemini Enterprise Agent Platform embedding API to use.
|
|
3401
3414
|
*/
|
|
3402
3415
|
embeddingApiType?: EmbeddingApiType;
|
|
3403
3416
|
/** Configuration that contains optional parameters.
|
|
@@ -3413,12 +3426,12 @@ export declare class EmbedContentResponse {
|
|
|
3413
3426
|
the batch request.
|
|
3414
3427
|
*/
|
|
3415
3428
|
embeddings?: ContentEmbedding[];
|
|
3416
|
-
/**
|
|
3429
|
+
/** Gemini Enterprise Agent Platform only. Metadata about the request.
|
|
3417
3430
|
*/
|
|
3418
3431
|
metadata?: EmbedContentMetadata;
|
|
3419
3432
|
}
|
|
3420
3433
|
|
|
3421
|
-
/** Enum representing the
|
|
3434
|
+
/** Enum representing the Gemini Enterprise Agent Platform embedding API to use. */
|
|
3422
3435
|
export declare enum EmbeddingApiType {
|
|
3423
3436
|
/**
|
|
3424
3437
|
* predict API endpoint (default)
|
|
@@ -3701,6 +3714,12 @@ export { File_2 as File }
|
|
|
3701
3714
|
*/
|
|
3702
3715
|
declare interface FileCitation {
|
|
3703
3716
|
type: 'file_citation';
|
|
3717
|
+
/**
|
|
3718
|
+
* User provided metadata about the retrieved context.
|
|
3719
|
+
*/
|
|
3720
|
+
custom_metadata?: {
|
|
3721
|
+
[key: string]: unknown;
|
|
3722
|
+
};
|
|
3704
3723
|
/**
|
|
3705
3724
|
* The URI of the file.
|
|
3706
3725
|
*/
|
|
@@ -3713,6 +3732,14 @@ declare interface FileCitation {
|
|
|
3713
3732
|
* The name of the file.
|
|
3714
3733
|
*/
|
|
3715
3734
|
file_name?: string;
|
|
3735
|
+
/**
|
|
3736
|
+
* Media ID in-case of image citations, if applicable.
|
|
3737
|
+
*/
|
|
3738
|
+
media_id?: string;
|
|
3739
|
+
/**
|
|
3740
|
+
* Page number of the cited document, if applicable.
|
|
3741
|
+
*/
|
|
3742
|
+
page_number?: number;
|
|
3716
3743
|
/**
|
|
3717
3744
|
* Source attributed for a portion of the text.
|
|
3718
3745
|
*/
|
|
@@ -3755,7 +3782,7 @@ export declare class Files extends BaseModule {
|
|
|
3755
3782
|
list: (params?: types.ListFilesParameters) => Promise<Pager<types.File>>;
|
|
3756
3783
|
/**
|
|
3757
3784
|
* Uploads a file asynchronously to the Gemini API.
|
|
3758
|
-
* This method is not available in Vertex AI.
|
|
3785
|
+
* This method is not available in Gemini Enterprise Agent Platform (previously known as Vertex AI).
|
|
3759
3786
|
* Supported upload sources:
|
|
3760
3787
|
* - Node.js: File path (string) or Blob object.
|
|
3761
3788
|
* - Browser: Blob object (e.g., File).
|
|
@@ -3781,7 +3808,7 @@ export declare class Files extends BaseModule {
|
|
|
3781
3808
|
* @see {@link types.UploadFileParameters#config} for the optional
|
|
3782
3809
|
* config in the parameters.
|
|
3783
3810
|
* @return A promise that resolves to a `types.File` object.
|
|
3784
|
-
* @throws An error if called on a Vertex AI client.
|
|
3811
|
+
* @throws An error if called on a Gemini Enterprise Agent Platform (previously known as Vertex AI) client.
|
|
3785
3812
|
* @throws An error if the `mimeType` is not provided and can not be inferred,
|
|
3786
3813
|
* the `mimeType` can be provided in the `params.config` parameter.
|
|
3787
3814
|
* @throws An error occurs if a suitable upload location cannot be established.
|
|
@@ -3888,29 +3915,17 @@ declare interface FileSearchResultContent {
|
|
|
3888
3915
|
* Required. ID to match the ID from the function call block.
|
|
3889
3916
|
*/
|
|
3890
3917
|
call_id: string;
|
|
3918
|
+
type: 'file_search_result';
|
|
3891
3919
|
/**
|
|
3892
|
-
*
|
|
3920
|
+
* Optional. The results of the File Search.
|
|
3893
3921
|
*/
|
|
3894
|
-
result
|
|
3895
|
-
type: 'file_search_result';
|
|
3922
|
+
result?: Array<unknown>;
|
|
3896
3923
|
/**
|
|
3897
3924
|
* A signature hash for backend validation.
|
|
3898
3925
|
*/
|
|
3899
3926
|
signature?: string;
|
|
3900
3927
|
}
|
|
3901
3928
|
|
|
3902
|
-
declare namespace FileSearchResultContent {
|
|
3903
|
-
/**
|
|
3904
|
-
* The result of the File Search.
|
|
3905
|
-
*/
|
|
3906
|
-
interface Result {
|
|
3907
|
-
/**
|
|
3908
|
-
* User provided metadata about the FileSearchResult.
|
|
3909
|
-
*/
|
|
3910
|
-
custom_metadata?: Array<unknown>;
|
|
3911
|
-
}
|
|
3912
|
-
}
|
|
3913
|
-
|
|
3914
3929
|
/** A collection of Documents. */
|
|
3915
3930
|
export declare interface FileSearchStore {
|
|
3916
3931
|
/** The resource name of the FileSearchStore. Example: `fileSearchStores/my-file-search-store-123` */
|
|
@@ -3953,7 +3968,7 @@ declare class FileSearchStores extends BaseModule {
|
|
|
3953
3968
|
list: (params?: types.ListFileSearchStoresParameters) => Promise<Pager<types.FileSearchStore>>;
|
|
3954
3969
|
/**
|
|
3955
3970
|
* Uploads a file asynchronously to a given File Search Store.
|
|
3956
|
-
* This method is not available in Vertex AI.
|
|
3971
|
+
* This method is not available in Gemini Enterprise Agent Platform (previously known as Vertex AI).
|
|
3957
3972
|
* Supported upload sources:
|
|
3958
3973
|
* - Node.js: File path (string) or Blob object.
|
|
3959
3974
|
* - Browser: Blob object (e.g., File).
|
|
@@ -3972,7 +3987,7 @@ declare class FileSearchStores extends BaseModule {
|
|
|
3972
3987
|
* @see {@link types.UploadToFileSearchStoreParameters#config} for the optional
|
|
3973
3988
|
* config in the parameters.
|
|
3974
3989
|
* @return A promise that resolves to a long running operation.
|
|
3975
|
-
* @throws An error if called on a Vertex AI client.
|
|
3990
|
+
* @throws An error if called on a Gemini Enterprise Agent Platform (previously known as Vertex AI) client.
|
|
3976
3991
|
* @throws An error if the `mimeType` is not provided and can not be inferred,
|
|
3977
3992
|
* the `mimeType` can be provided in the `params.config` parameter.
|
|
3978
3993
|
* @throws An error occurs if a suitable upload location cannot be established.
|
|
@@ -4568,7 +4583,7 @@ export declare interface GenerateContentConfig {
|
|
|
4568
4583
|
*/
|
|
4569
4584
|
imageConfig?: ImageConfig;
|
|
4570
4585
|
/** Enables enhanced civic answers. It may not be available for all
|
|
4571
|
-
models. This field is not supported in
|
|
4586
|
+
models. This field is not supported in Gemini Enterprise Agent Platform.
|
|
4572
4587
|
*/
|
|
4573
4588
|
enableEnhancedCivicAnswers?: boolean;
|
|
4574
4589
|
/** Settings for prompt and response sanitization using the Model Armor
|
|
@@ -4949,6 +4964,8 @@ export declare interface GenerateVideosConfig {
|
|
|
4949
4964
|
/** Webhook configuration for receiving notifications when the
|
|
4950
4965
|
video generation operation completes. */
|
|
4951
4966
|
webhookConfig?: WebhookConfig;
|
|
4967
|
+
/** Resize mode of the image input for video generation. */
|
|
4968
|
+
resizeMode?: ImageResizeMode;
|
|
4952
4969
|
}
|
|
4953
4970
|
|
|
4954
4971
|
/** A video generation operation. */
|
|
@@ -5388,8 +5405,23 @@ export declare interface GoogleGenAIOptions {
|
|
|
5388
5405
|
* Optional. Determines whether to use the Vertex AI or the Gemini API.
|
|
5389
5406
|
*
|
|
5390
5407
|
* @remarks
|
|
5408
|
+
* When true, the {@link https://cloud.google.com/vertex-ai/docs/reference/rest | Gemini Enterprise Agent Platform API} will used.
|
|
5409
|
+
* When false, the {@link https://ai.google.dev/api | Gemini API} will be used.
|
|
5410
|
+
* When both enterprise and vertexai are set, and they have different values,
|
|
5411
|
+
* an Error will be thrown.
|
|
5412
|
+
*
|
|
5413
|
+
* If unset, default SDK behavior is to use the Gemini API service.
|
|
5414
|
+
*/
|
|
5415
|
+
enterprise?: boolean;
|
|
5416
|
+
/**
|
|
5417
|
+
* Optional. Determines whether to use the Vertex AI (now Gemini Enterprise Agent Platform) or the Gemini API.
|
|
5418
|
+
* The `enterprise` flag is recommended instead.
|
|
5419
|
+
*
|
|
5420
|
+
* @remarks
|
|
5391
5421
|
* When true, the {@link https://cloud.google.com/vertex-ai/docs/reference/rest | Vertex AI API} will used.
|
|
5392
5422
|
* When false, the {@link https://ai.google.dev/api | Gemini API} will be used.
|
|
5423
|
+
* When both enterprise and vertexai are set, and they have different values,
|
|
5424
|
+
* an Error will be thrown.
|
|
5393
5425
|
*
|
|
5394
5426
|
* If unset, default SDK behavior is to use the Gemini API service.
|
|
5395
5427
|
*/
|
|
@@ -5792,6 +5824,8 @@ export declare interface GroundingChunkRetrievedContext {
|
|
|
5792
5824
|
customMetadata?: GroundingChunkCustomMetadata[];
|
|
5793
5825
|
/** Optional. Name of the `FileSearchStore` containing the document. Example: `fileSearchStores/123`. This field is not supported in Vertex AI. */
|
|
5794
5826
|
fileSearchStore?: string;
|
|
5827
|
+
/** Optional. Page number of the retrieved context. This field is not supported in Vertex AI. */
|
|
5828
|
+
pageNumber?: number;
|
|
5795
5829
|
}
|
|
5796
5830
|
|
|
5797
5831
|
/** A list of string values. This data type is not supported in Vertex AI. */
|
|
@@ -6052,7 +6086,7 @@ export declare interface HttpOptions {
|
|
|
6052
6086
|
timeout?: number;
|
|
6053
6087
|
/** Extra parameters to add to the request body.
|
|
6054
6088
|
The structure must match the backend API's request structure.
|
|
6055
|
-
-
|
|
6089
|
+
- Gemini Enterprise Agent Platform backend API docs: https://cloud.google.com/vertex-ai/docs/reference/rest
|
|
6056
6090
|
- GeminiAPI backend API docs: https://ai.google.dev/api/rest */
|
|
6057
6091
|
extraBody?: Record<string, unknown>;
|
|
6058
6092
|
/** HTTP retry options for the request. */
|
|
@@ -6240,6 +6274,20 @@ export declare enum ImagePromptLanguage {
|
|
|
6240
6274
|
es = "es"
|
|
6241
6275
|
}
|
|
6242
6276
|
|
|
6277
|
+
/** Resize mode for the image input for video generation. */
|
|
6278
|
+
export declare enum ImageResizeMode {
|
|
6279
|
+
/**
|
|
6280
|
+
* Crop the image to fit the correct aspect ratio (so we lose parts
|
|
6281
|
+
of the image in the process).
|
|
6282
|
+
*/
|
|
6283
|
+
CROP = "CROP",
|
|
6284
|
+
/**
|
|
6285
|
+
* Pad the image to fit the correct aspect ratio (so we don't lose
|
|
6286
|
+
any parts of the image in the process).
|
|
6287
|
+
*/
|
|
6288
|
+
PAD = "PAD"
|
|
6289
|
+
}
|
|
6290
|
+
|
|
6243
6291
|
/** Image search for grounding and related configurations. */
|
|
6244
6292
|
export declare interface ImageSearch {
|
|
6245
6293
|
}
|
|
@@ -6363,7 +6411,7 @@ declare interface Interaction {
|
|
|
6363
6411
|
/**
|
|
6364
6412
|
* The name of the `Agent` used for generating the interaction.
|
|
6365
6413
|
*/
|
|
6366
|
-
agent?:
|
|
6414
|
+
agent?: 'deep-research-pro-preview-12-2025' | 'deep-research-preview-04-2026' | 'deep-research-max-preview-04-2026' | (string & {});
|
|
6367
6415
|
/**
|
|
6368
6416
|
* Configuration parameters for the agent interaction.
|
|
6369
6417
|
*/
|
|
@@ -8013,7 +8061,7 @@ export declare interface Model {
|
|
|
8013
8061
|
* The model that will complete your prompt.\n\nSee
|
|
8014
8062
|
* [models](https://ai.google.dev/gemini-api/docs/models) for additional details.
|
|
8015
8063
|
*/
|
|
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 & {});
|
|
8064
|
+
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' | 'gemini-3.1-flash-tts-preview' | 'lyria-3-clip-preview' | 'lyria-3-pro-preview' | (string & {});
|
|
8017
8065
|
|
|
8018
8066
|
/** Configuration for Model Armor. Model Armor is a Google Cloud service that provides safety and security filtering for prompts and responses. It helps protect your AI applications from risks such as harmful content, sensitive data leakage, and prompt injection attacks. This data type is not supported in Gemini API. */
|
|
8019
8067
|
export declare interface ModelArmorConfig {
|
|
@@ -8051,7 +8099,7 @@ export declare class Models extends BaseModule {
|
|
|
8051
8099
|
/**
|
|
8052
8100
|
* Makes an API request to generate content with a given model.
|
|
8053
8101
|
*
|
|
8054
|
-
* For the `model` parameter, supported formats for
|
|
8102
|
+
* For the `model` parameter, supported formats for Gemini Enterprise Agent Platform API include:
|
|
8055
8103
|
* - The Gemini model ID, for example: 'gemini-2.0-flash'
|
|
8056
8104
|
* - The full resource name starts with 'projects/', for example:
|
|
8057
8105
|
* 'projects/my-project-id/locations/us-central1/publishers/google/models/gemini-2.0-flash'
|
|
@@ -8099,7 +8147,7 @@ export declare class Models extends BaseModule {
|
|
|
8099
8147
|
* Makes an API request to generate content with a given model and yields the
|
|
8100
8148
|
* response in chunks.
|
|
8101
8149
|
*
|
|
8102
|
-
* For the `model` parameter, supported formats for
|
|
8150
|
+
* For the `model` parameter, supported formats for Gemini Enterprise Agent Platform API include:
|
|
8103
8151
|
* - The Gemini model ID, for example: 'gemini-2.0-flash'
|
|
8104
8152
|
* - The full resource name starts with 'projects/', for example:
|
|
8105
8153
|
* 'projects/my-project-id/locations/us-central1/publishers/google/models/gemini-2.0-flash'
|
|
@@ -8190,7 +8238,7 @@ export declare class Models extends BaseModule {
|
|
|
8190
8238
|
editImage: (params: types.EditImageParameters) => Promise<types.EditImageResponse>;
|
|
8191
8239
|
/**
|
|
8192
8240
|
* Upscales an image based on an image, upscale factor, and configuration.
|
|
8193
|
-
* Only supported in
|
|
8241
|
+
* Only supported in Gemini Enterprise Agent Platform currently.
|
|
8194
8242
|
*
|
|
8195
8243
|
* @param params - The parameters for upscaling an image.
|
|
8196
8244
|
* @return The response from the API.
|
|
@@ -9961,6 +10009,20 @@ export declare interface SessionResumptionConfig {
|
|
|
9961
10009
|
*/
|
|
9962
10010
|
export declare function setDefaultBaseUrls(baseUrlParams: BaseUrlParameters): void;
|
|
9963
10011
|
|
|
10012
|
+
/**
|
|
10013
|
+
* Represents a signing secret used to verify webhook payloads.
|
|
10014
|
+
*/
|
|
10015
|
+
declare interface SigningSecret {
|
|
10016
|
+
/**
|
|
10017
|
+
* Output only. The expiration date of the signing secret.
|
|
10018
|
+
*/
|
|
10019
|
+
expire_time?: string;
|
|
10020
|
+
/**
|
|
10021
|
+
* Output only. The truncated version of the signing secret.
|
|
10022
|
+
*/
|
|
10023
|
+
truncated_secret?: string;
|
|
10024
|
+
}
|
|
10025
|
+
|
|
9964
10026
|
/** Config for `response` parameter. */
|
|
9965
10027
|
export declare class SingleEmbedContentResponse {
|
|
9966
10028
|
/** The response to the request.
|
|
@@ -10769,7 +10831,7 @@ export declare interface TunedModelInfo {
|
|
|
10769
10831
|
export declare interface TuningDataset {
|
|
10770
10832
|
/** GCS URI of the file containing training dataset in JSONL format. */
|
|
10771
10833
|
gcsUri?: string;
|
|
10772
|
-
/** The resource name of the Vertex Multimodal Dataset that is used as training dataset. Example: 'projects/my-project-id-or-number/locations/my-location/datasets/my-dataset-id'. */
|
|
10834
|
+
/** The resource name of the Gemini Enterprise Agent Platform (previously known as Vertex AI) Multimodal Dataset that is used as training dataset. Example: 'projects/my-project-id-or-number/locations/my-location/datasets/my-dataset-id'. */
|
|
10773
10835
|
vertexDatasetResource?: string;
|
|
10774
10836
|
/** Inline examples with simple input/output text. */
|
|
10775
10837
|
examples?: TuningExample[];
|
|
@@ -11020,7 +11082,7 @@ export declare enum TuningTask {
|
|
|
11020
11082
|
export declare interface TuningValidationDataset {
|
|
11021
11083
|
/** GCS URI of the file containing validation dataset in JSONL format. */
|
|
11022
11084
|
gcsUri?: string;
|
|
11023
|
-
/** The resource name of the Vertex Multimodal Dataset that is used as validation dataset. Example: 'projects/my-project-id-or-number/locations/my-location/datasets/my-dataset-id'. */
|
|
11085
|
+
/** The resource name of the Gemini Enterprise Agent Platform (previously known as Vertex AI) Multimodal Dataset that is used as validation dataset. Example: 'projects/my-project-id-or-number/locations/my-location/datasets/my-dataset-id'. */
|
|
11024
11086
|
vertexDatasetResource?: string;
|
|
11025
11087
|
}
|
|
11026
11088
|
|
|
@@ -11268,6 +11330,7 @@ declare namespace types {
|
|
|
11268
11330
|
VideoGenerationReferenceType,
|
|
11269
11331
|
VideoGenerationMaskMode,
|
|
11270
11332
|
VideoCompressionQuality,
|
|
11333
|
+
ImageResizeMode,
|
|
11271
11334
|
TuningMethod,
|
|
11272
11335
|
FileState,
|
|
11273
11336
|
FileSource,
|
|
@@ -11585,6 +11648,7 @@ declare namespace types {
|
|
|
11585
11648
|
RegisterFilesResponse,
|
|
11586
11649
|
InlinedRequest,
|
|
11587
11650
|
BatchJobSource,
|
|
11651
|
+
VertexMultimodalDatasetDestination,
|
|
11588
11652
|
JobError,
|
|
11589
11653
|
InlinedResponse,
|
|
11590
11654
|
SingleEmbedContentResponse,
|
|
@@ -11592,6 +11656,7 @@ declare namespace types {
|
|
|
11592
11656
|
BatchJobDestination,
|
|
11593
11657
|
CreateBatchJobConfig,
|
|
11594
11658
|
CreateBatchJobParameters,
|
|
11659
|
+
BatchJobOutputInfo,
|
|
11595
11660
|
CompletionStats,
|
|
11596
11661
|
BatchJob,
|
|
11597
11662
|
EmbedContentBatch,
|
|
@@ -12128,6 +12193,10 @@ declare interface Usage {
|
|
|
12128
12193
|
* A breakdown of cached token usage by modality.
|
|
12129
12194
|
*/
|
|
12130
12195
|
cached_tokens_by_modality?: Array<Usage.CachedTokensByModality>;
|
|
12196
|
+
/**
|
|
12197
|
+
* Grounding tool count.
|
|
12198
|
+
*/
|
|
12199
|
+
grounding_tool_count?: Array<Usage.GroundingToolCount>;
|
|
12131
12200
|
/**
|
|
12132
12201
|
* A breakdown of input token usage by modality.
|
|
12133
12202
|
*/
|
|
@@ -12181,6 +12250,19 @@ declare namespace Usage {
|
|
|
12181
12250
|
*/
|
|
12182
12251
|
tokens?: number;
|
|
12183
12252
|
}
|
|
12253
|
+
/**
|
|
12254
|
+
* The number of grounding tool counts.
|
|
12255
|
+
*/
|
|
12256
|
+
interface GroundingToolCount {
|
|
12257
|
+
/**
|
|
12258
|
+
* The number of grounding tool counts.
|
|
12259
|
+
*/
|
|
12260
|
+
count?: number;
|
|
12261
|
+
/**
|
|
12262
|
+
* The grounding tool type associated with the count.
|
|
12263
|
+
*/
|
|
12264
|
+
type?: 'google_search' | 'google_maps' | 'retrieval';
|
|
12265
|
+
}
|
|
12184
12266
|
/**
|
|
12185
12267
|
* The token count for a single response modality.
|
|
12186
12268
|
*/
|
|
@@ -12309,6 +12391,16 @@ export declare interface VertexAISearchDataStoreSpec {
|
|
|
12309
12391
|
filter?: string;
|
|
12310
12392
|
}
|
|
12311
12393
|
|
|
12394
|
+
/** This class is experimental and may change in future versions.
|
|
12395
|
+
|
|
12396
|
+
The specification for an output Vertex AI multimodal dataset. */
|
|
12397
|
+
export declare interface VertexMultimodalDatasetDestination {
|
|
12398
|
+
/** The BigQuery destination for the multimodal dataset. */
|
|
12399
|
+
bigqueryDestination?: string;
|
|
12400
|
+
/** The display name of the multimodal dataset. */
|
|
12401
|
+
displayName?: string;
|
|
12402
|
+
}
|
|
12403
|
+
|
|
12312
12404
|
/** Retrieve from Vertex RAG Store for grounding. This data type is not supported in Gemini API. */
|
|
12313
12405
|
export declare interface VertexRagStore {
|
|
12314
12406
|
/** Optional. Deprecated. Please use rag_resources instead. */
|
|
@@ -12489,6 +12581,56 @@ export declare interface VoiceConfig {
|
|
|
12489
12581
|
prebuiltVoiceConfig?: PrebuiltVoiceConfig;
|
|
12490
12582
|
}
|
|
12491
12583
|
|
|
12584
|
+
/**
|
|
12585
|
+
* A Webhook resource.
|
|
12586
|
+
*/
|
|
12587
|
+
declare interface Webhook {
|
|
12588
|
+
/**
|
|
12589
|
+
* Required. The events that the webhook is subscribed to. Available events:
|
|
12590
|
+
*
|
|
12591
|
+
* - batch.succeeded
|
|
12592
|
+
* - batch.expired
|
|
12593
|
+
* - batch.failed
|
|
12594
|
+
* - interaction.requires_action
|
|
12595
|
+
* - interaction.completed
|
|
12596
|
+
* - interaction.failed
|
|
12597
|
+
* - video.generated
|
|
12598
|
+
*/
|
|
12599
|
+
subscribed_events: Array<'batch.succeeded' | 'batch.expired' | 'batch.failed' | 'interaction.requires_action' | 'interaction.completed' | 'interaction.failed' | 'video.generated' | (string & {})>;
|
|
12600
|
+
/**
|
|
12601
|
+
* Required. The URI to which webhook events will be sent.
|
|
12602
|
+
*/
|
|
12603
|
+
uri: string;
|
|
12604
|
+
/**
|
|
12605
|
+
* Output only. The ID of the webhook.
|
|
12606
|
+
*/
|
|
12607
|
+
id?: string;
|
|
12608
|
+
/**
|
|
12609
|
+
* Output only. The timestamp when the webhook was created.
|
|
12610
|
+
*/
|
|
12611
|
+
create_time?: string;
|
|
12612
|
+
/**
|
|
12613
|
+
* Optional. The user-provided name of the webhook.
|
|
12614
|
+
*/
|
|
12615
|
+
name?: string;
|
|
12616
|
+
/**
|
|
12617
|
+
* Output only. The new signing secret for the webhook. Only populated on create.
|
|
12618
|
+
*/
|
|
12619
|
+
new_signing_secret?: string;
|
|
12620
|
+
/**
|
|
12621
|
+
* Output only. The signing secrets associated with this webhook.
|
|
12622
|
+
*/
|
|
12623
|
+
signing_secrets?: Array<SigningSecret>;
|
|
12624
|
+
/**
|
|
12625
|
+
* Output only. The state of the webhook.
|
|
12626
|
+
*/
|
|
12627
|
+
state?: 'enabled' | 'disabled' | 'disabled_due_to_failed_deliveries';
|
|
12628
|
+
/**
|
|
12629
|
+
* Output only. The timestamp when the webhook was last updated.
|
|
12630
|
+
*/
|
|
12631
|
+
update_time?: string;
|
|
12632
|
+
}
|
|
12633
|
+
|
|
12492
12634
|
/** Configuration for webhook notifications.
|
|
12493
12635
|
|
|
12494
12636
|
Used to configure webhook endpoints that will receive notifications
|
|
@@ -12531,97 +12673,22 @@ declare interface WebhookCreateParams {
|
|
|
12531
12673
|
* events:
|
|
12532
12674
|
*
|
|
12533
12675
|
* - batch.succeeded
|
|
12534
|
-
* - batch.cancelled
|
|
12535
12676
|
* - batch.expired
|
|
12536
12677
|
* - batch.failed
|
|
12537
12678
|
* - interaction.requires_action
|
|
12538
12679
|
* - interaction.completed
|
|
12539
12680
|
* - interaction.failed
|
|
12540
|
-
* - interaction.cancelled
|
|
12541
12681
|
* - video.generated
|
|
12542
12682
|
*/
|
|
12543
|
-
subscribed_events: Array<'batch.succeeded' | 'batch.
|
|
12683
|
+
subscribed_events: Array<'batch.succeeded' | 'batch.expired' | 'batch.failed' | 'interaction.requires_action' | 'interaction.completed' | 'interaction.failed' | 'video.generated' | (string & {})>;
|
|
12544
12684
|
/**
|
|
12545
12685
|
* Body param: Required. The URI to which webhook events will be sent.
|
|
12546
12686
|
*/
|
|
12547
12687
|
uri: string;
|
|
12548
12688
|
/**
|
|
12549
|
-
*
|
|
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}`
|
|
12689
|
+
* Body param: Optional. The user-provided name of the webhook.
|
|
12555
12690
|
*/
|
|
12556
12691
|
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
12692
|
}
|
|
12626
12693
|
|
|
12627
12694
|
declare interface WebhookDeleteParams {
|
|
@@ -12643,6 +12710,13 @@ declare interface WebhookDeleteParams {
|
|
|
12643
12710
|
declare interface WebhookDeleteResponse {
|
|
12644
12711
|
}
|
|
12645
12712
|
|
|
12713
|
+
declare interface WebhookGetParams {
|
|
12714
|
+
/**
|
|
12715
|
+
* Which version of the API to use.
|
|
12716
|
+
*/
|
|
12717
|
+
api_version?: string;
|
|
12718
|
+
}
|
|
12719
|
+
|
|
12646
12720
|
declare interface WebhookListParams {
|
|
12647
12721
|
/**
|
|
12648
12722
|
* Path param: Which version of the API to use.
|
|
@@ -12673,72 +12747,7 @@ declare interface WebhookListResponse {
|
|
|
12673
12747
|
/**
|
|
12674
12748
|
* The webhooks.
|
|
12675
12749
|
*/
|
|
12676
|
-
webhooks?: Array<
|
|
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
|
-
}
|
|
12750
|
+
webhooks?: Array<Webhook>;
|
|
12742
12751
|
}
|
|
12743
12752
|
|
|
12744
12753
|
declare interface WebhookPingParams {
|
|
@@ -12766,77 +12775,6 @@ declare namespace WebhookPingParams {
|
|
|
12766
12775
|
declare interface WebhookPingResponse {
|
|
12767
12776
|
}
|
|
12768
12777
|
|
|
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
12778
|
declare interface WebhookRotateSigningSecretParams {
|
|
12841
12779
|
/**
|
|
12842
12780
|
* Path param: Which version of the API to use.
|
|
@@ -12862,7 +12800,7 @@ export declare class Webhooks extends BaseWebhooks {
|
|
|
12862
12800
|
}
|
|
12863
12801
|
|
|
12864
12802
|
export declare namespace Webhooks {
|
|
12865
|
-
export { type
|
|
12803
|
+
export { type SigningSecret as SigningSecret, type Webhook as Webhook, type WebhookListResponse as WebhookListResponse, type WebhookDeleteResponse as WebhookDeleteResponse, type WebhookPingResponse as WebhookPingResponse, type WebhookRotateSigningSecretResponse as WebhookRotateSigningSecretResponse, type WebhookCreateParams as WebhookCreateParams, type WebhookUpdateParams as WebhookUpdateParams, type WebhookListParams as WebhookListParams, type WebhookDeleteParams as WebhookDeleteParams, type WebhookGetParams as WebhookGetParams, type WebhookPingParams as WebhookPingParams, type WebhookRotateSigningSecretParams as WebhookRotateSigningSecretParams, };
|
|
12866
12804
|
}
|
|
12867
12805
|
|
|
12868
12806
|
declare interface WebhookUpdateParams {
|
|
@@ -12870,101 +12808,35 @@ declare interface WebhookUpdateParams {
|
|
|
12870
12808
|
* Path param: Which version of the API to use.
|
|
12871
12809
|
*/
|
|
12872
12810
|
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
12811
|
/**
|
|
12893
12812
|
* Query param: Optional. The list of fields to update.
|
|
12894
12813
|
*/
|
|
12895
12814
|
update_mask?: string;
|
|
12896
12815
|
/**
|
|
12897
|
-
* Body param:
|
|
12816
|
+
* Body param: Optional. The user-provided name of the webhook.
|
|
12898
12817
|
*/
|
|
12899
12818
|
name?: string;
|
|
12900
12819
|
/**
|
|
12901
|
-
* Body param: The state of the webhook.
|
|
12820
|
+
* Body param: Optional. The state of the webhook.
|
|
12902
12821
|
*/
|
|
12903
12822
|
state?: 'enabled' | 'disabled' | 'disabled_due_to_failed_deliveries';
|
|
12904
|
-
}
|
|
12905
|
-
|
|
12906
|
-
/**
|
|
12907
|
-
* A Webhook resource.
|
|
12908
|
-
*/
|
|
12909
|
-
declare interface WebhookUpdateResponse {
|
|
12910
12823
|
/**
|
|
12911
|
-
*
|
|
12824
|
+
* Body param: Optional. The events that the webhook is subscribed to. Available
|
|
12825
|
+
* events:
|
|
12912
12826
|
*
|
|
12913
12827
|
* - batch.succeeded
|
|
12914
|
-
* - batch.cancelled
|
|
12915
12828
|
* - batch.expired
|
|
12916
12829
|
* - batch.failed
|
|
12917
12830
|
* - interaction.requires_action
|
|
12918
12831
|
* - interaction.completed
|
|
12919
12832
|
* - interaction.failed
|
|
12920
|
-
* - interaction.cancelled
|
|
12921
12833
|
* - video.generated
|
|
12922
12834
|
*/
|
|
12923
|
-
subscribed_events
|
|
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 {
|
|
12835
|
+
subscribed_events?: Array<'batch.succeeded' | 'batch.expired' | 'batch.failed' | 'interaction.requires_action' | 'interaction.completed' | 'interaction.failed' | 'video.generated' | (string & {})>;
|
|
12955
12836
|
/**
|
|
12956
|
-
*
|
|
12837
|
+
* Body param: Optional. The URI to which webhook events will be sent.
|
|
12957
12838
|
*/
|
|
12958
|
-
|
|
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
|
-
}
|
|
12839
|
+
uri?: string;
|
|
12968
12840
|
}
|
|
12969
12841
|
|
|
12970
12842
|
/** Standard web search for grounding and related configurations. Only text results are returned. */
|