@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/web/web.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. */
|
|
@@ -5381,8 +5398,23 @@ export declare interface GoogleGenAIOptions {
|
|
|
5381
5398
|
* Optional. Determines whether to use the Vertex AI or the Gemini API.
|
|
5382
5399
|
*
|
|
5383
5400
|
* @remarks
|
|
5401
|
+
* When true, the {@link https://cloud.google.com/vertex-ai/docs/reference/rest | Gemini Enterprise Agent Platform API} will used.
|
|
5402
|
+
* When false, the {@link https://ai.google.dev/api | Gemini API} will be used.
|
|
5403
|
+
* When both enterprise and vertexai are set, and they have different values,
|
|
5404
|
+
* an Error will be thrown.
|
|
5405
|
+
*
|
|
5406
|
+
* If unset, default SDK behavior is to use the Gemini API service.
|
|
5407
|
+
*/
|
|
5408
|
+
enterprise?: boolean;
|
|
5409
|
+
/**
|
|
5410
|
+
* Optional. Determines whether to use the Vertex AI (now Gemini Enterprise Agent Platform) or the Gemini API.
|
|
5411
|
+
* The `enterprise` flag is recommended instead.
|
|
5412
|
+
*
|
|
5413
|
+
* @remarks
|
|
5384
5414
|
* When true, the {@link https://cloud.google.com/vertex-ai/docs/reference/rest | Vertex AI API} will used.
|
|
5385
5415
|
* When false, the {@link https://ai.google.dev/api | Gemini API} will be used.
|
|
5416
|
+
* When both enterprise and vertexai are set, and they have different values,
|
|
5417
|
+
* an Error will be thrown.
|
|
5386
5418
|
*
|
|
5387
5419
|
* If unset, default SDK behavior is to use the Gemini API service.
|
|
5388
5420
|
*/
|
|
@@ -5785,6 +5817,8 @@ export declare interface GroundingChunkRetrievedContext {
|
|
|
5785
5817
|
customMetadata?: GroundingChunkCustomMetadata[];
|
|
5786
5818
|
/** Optional. Name of the `FileSearchStore` containing the document. Example: `fileSearchStores/123`. This field is not supported in Vertex AI. */
|
|
5787
5819
|
fileSearchStore?: string;
|
|
5820
|
+
/** Optional. Page number of the retrieved context. This field is not supported in Vertex AI. */
|
|
5821
|
+
pageNumber?: number;
|
|
5788
5822
|
}
|
|
5789
5823
|
|
|
5790
5824
|
/** A list of string values. This data type is not supported in Vertex AI. */
|
|
@@ -6045,7 +6079,7 @@ export declare interface HttpOptions {
|
|
|
6045
6079
|
timeout?: number;
|
|
6046
6080
|
/** Extra parameters to add to the request body.
|
|
6047
6081
|
The structure must match the backend API's request structure.
|
|
6048
|
-
-
|
|
6082
|
+
- Gemini Enterprise Agent Platform backend API docs: https://cloud.google.com/vertex-ai/docs/reference/rest
|
|
6049
6083
|
- GeminiAPI backend API docs: https://ai.google.dev/api/rest */
|
|
6050
6084
|
extraBody?: Record<string, unknown>;
|
|
6051
6085
|
/** HTTP retry options for the request. */
|
|
@@ -6233,6 +6267,20 @@ export declare enum ImagePromptLanguage {
|
|
|
6233
6267
|
es = "es"
|
|
6234
6268
|
}
|
|
6235
6269
|
|
|
6270
|
+
/** Resize mode for the image input for video generation. */
|
|
6271
|
+
export declare enum ImageResizeMode {
|
|
6272
|
+
/**
|
|
6273
|
+
* Crop the image to fit the correct aspect ratio (so we lose parts
|
|
6274
|
+
of the image in the process).
|
|
6275
|
+
*/
|
|
6276
|
+
CROP = "CROP",
|
|
6277
|
+
/**
|
|
6278
|
+
* Pad the image to fit the correct aspect ratio (so we don't lose
|
|
6279
|
+
any parts of the image in the process).
|
|
6280
|
+
*/
|
|
6281
|
+
PAD = "PAD"
|
|
6282
|
+
}
|
|
6283
|
+
|
|
6236
6284
|
/** Image search for grounding and related configurations. */
|
|
6237
6285
|
export declare interface ImageSearch {
|
|
6238
6286
|
}
|
|
@@ -6356,7 +6404,7 @@ declare interface Interaction {
|
|
|
6356
6404
|
/**
|
|
6357
6405
|
* The name of the `Agent` used for generating the interaction.
|
|
6358
6406
|
*/
|
|
6359
|
-
agent?:
|
|
6407
|
+
agent?: 'deep-research-pro-preview-12-2025' | 'deep-research-preview-04-2026' | 'deep-research-max-preview-04-2026' | (string & {});
|
|
6360
6408
|
/**
|
|
6361
6409
|
* Configuration parameters for the agent interaction.
|
|
6362
6410
|
*/
|
|
@@ -8006,7 +8054,7 @@ export declare interface Model {
|
|
|
8006
8054
|
* The model that will complete your prompt.\n\nSee
|
|
8007
8055
|
* [models](https://ai.google.dev/gemini-api/docs/models) for additional details.
|
|
8008
8056
|
*/
|
|
8009
|
-
declare type Model_2 = 'gemini-2.5-computer-use-preview-10-2025' | 'gemini-2.5-flash' | 'gemini-2.5-flash-image' | 'gemini-2.5-flash-lite' | 'gemini-2.5-flash-lite-preview-09-2025' | 'gemini-2.5-flash-native-audio-preview-12-2025' | 'gemini-2.5-flash-preview-09-2025' | 'gemini-2.5-flash-preview-tts' | 'gemini-2.5-pro' | 'gemini-2.5-pro-preview-tts' | 'gemini-3-flash-preview' | 'gemini-3-pro-image-preview' | 'gemini-3-pro-preview' | 'gemini-3.1-pro-preview' | 'gemini-3.1-flash-image-preview' | 'gemini-3.1-flash-lite-preview' | 'lyria-3-clip-preview' | 'lyria-3-pro-preview' | (string & {});
|
|
8057
|
+
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 & {});
|
|
8010
8058
|
|
|
8011
8059
|
/** 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. */
|
|
8012
8060
|
export declare interface ModelArmorConfig {
|
|
@@ -8044,7 +8092,7 @@ export declare class Models extends BaseModule {
|
|
|
8044
8092
|
/**
|
|
8045
8093
|
* Makes an API request to generate content with a given model.
|
|
8046
8094
|
*
|
|
8047
|
-
* For the `model` parameter, supported formats for
|
|
8095
|
+
* For the `model` parameter, supported formats for Gemini Enterprise Agent Platform API include:
|
|
8048
8096
|
* - The Gemini model ID, for example: 'gemini-2.0-flash'
|
|
8049
8097
|
* - The full resource name starts with 'projects/', for example:
|
|
8050
8098
|
* 'projects/my-project-id/locations/us-central1/publishers/google/models/gemini-2.0-flash'
|
|
@@ -8092,7 +8140,7 @@ export declare class Models extends BaseModule {
|
|
|
8092
8140
|
* Makes an API request to generate content with a given model and yields the
|
|
8093
8141
|
* response in chunks.
|
|
8094
8142
|
*
|
|
8095
|
-
* For the `model` parameter, supported formats for
|
|
8143
|
+
* For the `model` parameter, supported formats for Gemini Enterprise Agent Platform API include:
|
|
8096
8144
|
* - The Gemini model ID, for example: 'gemini-2.0-flash'
|
|
8097
8145
|
* - The full resource name starts with 'projects/', for example:
|
|
8098
8146
|
* 'projects/my-project-id/locations/us-central1/publishers/google/models/gemini-2.0-flash'
|
|
@@ -8183,7 +8231,7 @@ export declare class Models extends BaseModule {
|
|
|
8183
8231
|
editImage: (params: types.EditImageParameters) => Promise<types.EditImageResponse>;
|
|
8184
8232
|
/**
|
|
8185
8233
|
* Upscales an image based on an image, upscale factor, and configuration.
|
|
8186
|
-
* Only supported in
|
|
8234
|
+
* Only supported in Gemini Enterprise Agent Platform currently.
|
|
8187
8235
|
*
|
|
8188
8236
|
* @param params - The parameters for upscaling an image.
|
|
8189
8237
|
* @return The response from the API.
|
|
@@ -9954,6 +10002,20 @@ export declare interface SessionResumptionConfig {
|
|
|
9954
10002
|
*/
|
|
9955
10003
|
export declare function setDefaultBaseUrls(baseUrlParams: BaseUrlParameters): void;
|
|
9956
10004
|
|
|
10005
|
+
/**
|
|
10006
|
+
* Represents a signing secret used to verify webhook payloads.
|
|
10007
|
+
*/
|
|
10008
|
+
declare interface SigningSecret {
|
|
10009
|
+
/**
|
|
10010
|
+
* Output only. The expiration date of the signing secret.
|
|
10011
|
+
*/
|
|
10012
|
+
expire_time?: string;
|
|
10013
|
+
/**
|
|
10014
|
+
* Output only. The truncated version of the signing secret.
|
|
10015
|
+
*/
|
|
10016
|
+
truncated_secret?: string;
|
|
10017
|
+
}
|
|
10018
|
+
|
|
9957
10019
|
/** Config for `response` parameter. */
|
|
9958
10020
|
export declare class SingleEmbedContentResponse {
|
|
9959
10021
|
/** The response to the request.
|
|
@@ -10762,7 +10824,7 @@ export declare interface TunedModelInfo {
|
|
|
10762
10824
|
export declare interface TuningDataset {
|
|
10763
10825
|
/** GCS URI of the file containing training dataset in JSONL format. */
|
|
10764
10826
|
gcsUri?: string;
|
|
10765
|
-
/** 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'. */
|
|
10827
|
+
/** 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'. */
|
|
10766
10828
|
vertexDatasetResource?: string;
|
|
10767
10829
|
/** Inline examples with simple input/output text. */
|
|
10768
10830
|
examples?: TuningExample[];
|
|
@@ -11013,7 +11075,7 @@ export declare enum TuningTask {
|
|
|
11013
11075
|
export declare interface TuningValidationDataset {
|
|
11014
11076
|
/** GCS URI of the file containing validation dataset in JSONL format. */
|
|
11015
11077
|
gcsUri?: string;
|
|
11016
|
-
/** 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'. */
|
|
11078
|
+
/** 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'. */
|
|
11017
11079
|
vertexDatasetResource?: string;
|
|
11018
11080
|
}
|
|
11019
11081
|
|
|
@@ -11261,6 +11323,7 @@ declare namespace types {
|
|
|
11261
11323
|
VideoGenerationReferenceType,
|
|
11262
11324
|
VideoGenerationMaskMode,
|
|
11263
11325
|
VideoCompressionQuality,
|
|
11326
|
+
ImageResizeMode,
|
|
11264
11327
|
TuningMethod,
|
|
11265
11328
|
FileState,
|
|
11266
11329
|
FileSource,
|
|
@@ -11578,6 +11641,7 @@ declare namespace types {
|
|
|
11578
11641
|
RegisterFilesResponse,
|
|
11579
11642
|
InlinedRequest,
|
|
11580
11643
|
BatchJobSource,
|
|
11644
|
+
VertexMultimodalDatasetDestination,
|
|
11581
11645
|
JobError,
|
|
11582
11646
|
InlinedResponse,
|
|
11583
11647
|
SingleEmbedContentResponse,
|
|
@@ -11585,6 +11649,7 @@ declare namespace types {
|
|
|
11585
11649
|
BatchJobDestination,
|
|
11586
11650
|
CreateBatchJobConfig,
|
|
11587
11651
|
CreateBatchJobParameters,
|
|
11652
|
+
BatchJobOutputInfo,
|
|
11588
11653
|
CompletionStats,
|
|
11589
11654
|
BatchJob,
|
|
11590
11655
|
EmbedContentBatch,
|
|
@@ -12121,6 +12186,10 @@ declare interface Usage {
|
|
|
12121
12186
|
* A breakdown of cached token usage by modality.
|
|
12122
12187
|
*/
|
|
12123
12188
|
cached_tokens_by_modality?: Array<Usage.CachedTokensByModality>;
|
|
12189
|
+
/**
|
|
12190
|
+
* Grounding tool count.
|
|
12191
|
+
*/
|
|
12192
|
+
grounding_tool_count?: Array<Usage.GroundingToolCount>;
|
|
12124
12193
|
/**
|
|
12125
12194
|
* A breakdown of input token usage by modality.
|
|
12126
12195
|
*/
|
|
@@ -12174,6 +12243,19 @@ declare namespace Usage {
|
|
|
12174
12243
|
*/
|
|
12175
12244
|
tokens?: number;
|
|
12176
12245
|
}
|
|
12246
|
+
/**
|
|
12247
|
+
* The number of grounding tool counts.
|
|
12248
|
+
*/
|
|
12249
|
+
interface GroundingToolCount {
|
|
12250
|
+
/**
|
|
12251
|
+
* The number of grounding tool counts.
|
|
12252
|
+
*/
|
|
12253
|
+
count?: number;
|
|
12254
|
+
/**
|
|
12255
|
+
* The grounding tool type associated with the count.
|
|
12256
|
+
*/
|
|
12257
|
+
type?: 'google_search' | 'google_maps' | 'retrieval';
|
|
12258
|
+
}
|
|
12177
12259
|
/**
|
|
12178
12260
|
* The token count for a single response modality.
|
|
12179
12261
|
*/
|
|
@@ -12302,6 +12384,16 @@ export declare interface VertexAISearchDataStoreSpec {
|
|
|
12302
12384
|
filter?: string;
|
|
12303
12385
|
}
|
|
12304
12386
|
|
|
12387
|
+
/** This class is experimental and may change in future versions.
|
|
12388
|
+
|
|
12389
|
+
The specification for an output Vertex AI multimodal dataset. */
|
|
12390
|
+
export declare interface VertexMultimodalDatasetDestination {
|
|
12391
|
+
/** The BigQuery destination for the multimodal dataset. */
|
|
12392
|
+
bigqueryDestination?: string;
|
|
12393
|
+
/** The display name of the multimodal dataset. */
|
|
12394
|
+
displayName?: string;
|
|
12395
|
+
}
|
|
12396
|
+
|
|
12305
12397
|
/** Retrieve from Vertex RAG Store for grounding. This data type is not supported in Gemini API. */
|
|
12306
12398
|
export declare interface VertexRagStore {
|
|
12307
12399
|
/** Optional. Deprecated. Please use rag_resources instead. */
|
|
@@ -12482,6 +12574,56 @@ export declare interface VoiceConfig {
|
|
|
12482
12574
|
prebuiltVoiceConfig?: PrebuiltVoiceConfig;
|
|
12483
12575
|
}
|
|
12484
12576
|
|
|
12577
|
+
/**
|
|
12578
|
+
* A Webhook resource.
|
|
12579
|
+
*/
|
|
12580
|
+
declare interface Webhook {
|
|
12581
|
+
/**
|
|
12582
|
+
* Required. The events that the webhook is subscribed to. Available events:
|
|
12583
|
+
*
|
|
12584
|
+
* - batch.succeeded
|
|
12585
|
+
* - batch.expired
|
|
12586
|
+
* - batch.failed
|
|
12587
|
+
* - interaction.requires_action
|
|
12588
|
+
* - interaction.completed
|
|
12589
|
+
* - interaction.failed
|
|
12590
|
+
* - video.generated
|
|
12591
|
+
*/
|
|
12592
|
+
subscribed_events: Array<'batch.succeeded' | 'batch.expired' | 'batch.failed' | 'interaction.requires_action' | 'interaction.completed' | 'interaction.failed' | 'video.generated' | (string & {})>;
|
|
12593
|
+
/**
|
|
12594
|
+
* Required. The URI to which webhook events will be sent.
|
|
12595
|
+
*/
|
|
12596
|
+
uri: string;
|
|
12597
|
+
/**
|
|
12598
|
+
* Output only. The ID of the webhook.
|
|
12599
|
+
*/
|
|
12600
|
+
id?: string;
|
|
12601
|
+
/**
|
|
12602
|
+
* Output only. The timestamp when the webhook was created.
|
|
12603
|
+
*/
|
|
12604
|
+
create_time?: string;
|
|
12605
|
+
/**
|
|
12606
|
+
* Optional. The user-provided name of the webhook.
|
|
12607
|
+
*/
|
|
12608
|
+
name?: string;
|
|
12609
|
+
/**
|
|
12610
|
+
* Output only. The new signing secret for the webhook. Only populated on create.
|
|
12611
|
+
*/
|
|
12612
|
+
new_signing_secret?: string;
|
|
12613
|
+
/**
|
|
12614
|
+
* Output only. The signing secrets associated with this webhook.
|
|
12615
|
+
*/
|
|
12616
|
+
signing_secrets?: Array<SigningSecret>;
|
|
12617
|
+
/**
|
|
12618
|
+
* Output only. The state of the webhook.
|
|
12619
|
+
*/
|
|
12620
|
+
state?: 'enabled' | 'disabled' | 'disabled_due_to_failed_deliveries';
|
|
12621
|
+
/**
|
|
12622
|
+
* Output only. The timestamp when the webhook was last updated.
|
|
12623
|
+
*/
|
|
12624
|
+
update_time?: string;
|
|
12625
|
+
}
|
|
12626
|
+
|
|
12485
12627
|
/** Configuration for webhook notifications.
|
|
12486
12628
|
|
|
12487
12629
|
Used to configure webhook endpoints that will receive notifications
|
|
@@ -12524,97 +12666,22 @@ declare interface WebhookCreateParams {
|
|
|
12524
12666
|
* events:
|
|
12525
12667
|
*
|
|
12526
12668
|
* - batch.succeeded
|
|
12527
|
-
* - batch.cancelled
|
|
12528
12669
|
* - batch.expired
|
|
12529
12670
|
* - batch.failed
|
|
12530
12671
|
* - interaction.requires_action
|
|
12531
12672
|
* - interaction.completed
|
|
12532
12673
|
* - interaction.failed
|
|
12533
|
-
* - interaction.cancelled
|
|
12534
12674
|
* - video.generated
|
|
12535
12675
|
*/
|
|
12536
|
-
subscribed_events: Array<'batch.succeeded' | 'batch.
|
|
12676
|
+
subscribed_events: Array<'batch.succeeded' | 'batch.expired' | 'batch.failed' | 'interaction.requires_action' | 'interaction.completed' | 'interaction.failed' | 'video.generated' | (string & {})>;
|
|
12537
12677
|
/**
|
|
12538
12678
|
* Body param: Required. The URI to which webhook events will be sent.
|
|
12539
12679
|
*/
|
|
12540
12680
|
uri: string;
|
|
12541
12681
|
/**
|
|
12542
|
-
*
|
|
12543
|
-
* the server will generate a unique ID.
|
|
12544
|
-
*/
|
|
12545
|
-
webhook_id?: string;
|
|
12546
|
-
/**
|
|
12547
|
-
* Body param: Identifier. The name of the webhook. Format: `webhooks/{webhook_id}`
|
|
12682
|
+
* Body param: Optional. The user-provided name of the webhook.
|
|
12548
12683
|
*/
|
|
12549
12684
|
name?: string;
|
|
12550
|
-
/**
|
|
12551
|
-
* Body param: The state of the webhook.
|
|
12552
|
-
*/
|
|
12553
|
-
state?: 'enabled' | 'disabled' | 'disabled_due_to_failed_deliveries';
|
|
12554
|
-
}
|
|
12555
|
-
|
|
12556
|
-
/**
|
|
12557
|
-
* A Webhook resource.
|
|
12558
|
-
*/
|
|
12559
|
-
declare interface WebhookCreateResponse {
|
|
12560
|
-
/**
|
|
12561
|
-
* Required. The events that the webhook is subscribed to. Available events:
|
|
12562
|
-
*
|
|
12563
|
-
* - batch.succeeded
|
|
12564
|
-
* - batch.cancelled
|
|
12565
|
-
* - batch.expired
|
|
12566
|
-
* - batch.failed
|
|
12567
|
-
* - interaction.requires_action
|
|
12568
|
-
* - interaction.completed
|
|
12569
|
-
* - interaction.failed
|
|
12570
|
-
* - interaction.cancelled
|
|
12571
|
-
* - video.generated
|
|
12572
|
-
*/
|
|
12573
|
-
subscribed_events: Array<'batch.succeeded' | 'batch.cancelled' | 'batch.expired' | 'batch.failed' | 'interaction.requires_action' | 'interaction.completed' | 'interaction.failed' | 'interaction.cancelled' | 'video.generated' | (string & {})>;
|
|
12574
|
-
/**
|
|
12575
|
-
* Required. The URI to which webhook events will be sent.
|
|
12576
|
-
*/
|
|
12577
|
-
uri: string;
|
|
12578
|
-
/**
|
|
12579
|
-
* Output only. The timestamp when the webhook was created.
|
|
12580
|
-
*/
|
|
12581
|
-
create_time?: string;
|
|
12582
|
-
/**
|
|
12583
|
-
* Identifier. The name of the webhook. Format: `webhooks/{webhook_id}`
|
|
12584
|
-
*/
|
|
12585
|
-
name?: string;
|
|
12586
|
-
/**
|
|
12587
|
-
* Output only. The new signing secret for the webhook. Only populated on create.
|
|
12588
|
-
*/
|
|
12589
|
-
new_signing_secret?: string;
|
|
12590
|
-
/**
|
|
12591
|
-
* Output only. The signing secrets associated with this webhook.
|
|
12592
|
-
*/
|
|
12593
|
-
signing_secrets?: Array<WebhookCreateResponse.SigningSecret>;
|
|
12594
|
-
/**
|
|
12595
|
-
* The state of the webhook.
|
|
12596
|
-
*/
|
|
12597
|
-
state?: 'enabled' | 'disabled' | 'disabled_due_to_failed_deliveries';
|
|
12598
|
-
/**
|
|
12599
|
-
* Output only. The timestamp when the webhook was last updated.
|
|
12600
|
-
*/
|
|
12601
|
-
update_time?: string;
|
|
12602
|
-
}
|
|
12603
|
-
|
|
12604
|
-
declare namespace WebhookCreateResponse {
|
|
12605
|
-
/**
|
|
12606
|
-
* Represents a signing secret used to verify webhook payloads.
|
|
12607
|
-
*/
|
|
12608
|
-
interface SigningSecret {
|
|
12609
|
-
/**
|
|
12610
|
-
* Output only. The expiration date of the signing secret.
|
|
12611
|
-
*/
|
|
12612
|
-
expire_time?: string;
|
|
12613
|
-
/**
|
|
12614
|
-
* Output only. The truncated version of the signing secret.
|
|
12615
|
-
*/
|
|
12616
|
-
truncated_secret?: string;
|
|
12617
|
-
}
|
|
12618
12685
|
}
|
|
12619
12686
|
|
|
12620
12687
|
declare interface WebhookDeleteParams {
|
|
@@ -12636,6 +12703,13 @@ declare interface WebhookDeleteParams {
|
|
|
12636
12703
|
declare interface WebhookDeleteResponse {
|
|
12637
12704
|
}
|
|
12638
12705
|
|
|
12706
|
+
declare interface WebhookGetParams {
|
|
12707
|
+
/**
|
|
12708
|
+
* Which version of the API to use.
|
|
12709
|
+
*/
|
|
12710
|
+
api_version?: string;
|
|
12711
|
+
}
|
|
12712
|
+
|
|
12639
12713
|
declare interface WebhookListParams {
|
|
12640
12714
|
/**
|
|
12641
12715
|
* Path param: Which version of the API to use.
|
|
@@ -12666,72 +12740,7 @@ declare interface WebhookListResponse {
|
|
|
12666
12740
|
/**
|
|
12667
12741
|
* The webhooks.
|
|
12668
12742
|
*/
|
|
12669
|
-
webhooks?: Array<
|
|
12670
|
-
}
|
|
12671
|
-
|
|
12672
|
-
declare namespace WebhookListResponse {
|
|
12673
|
-
/**
|
|
12674
|
-
* A Webhook resource.
|
|
12675
|
-
*/
|
|
12676
|
-
interface Webhook {
|
|
12677
|
-
/**
|
|
12678
|
-
* Required. The events that the webhook is subscribed to. Available events:
|
|
12679
|
-
*
|
|
12680
|
-
* - batch.succeeded
|
|
12681
|
-
* - batch.cancelled
|
|
12682
|
-
* - batch.expired
|
|
12683
|
-
* - batch.failed
|
|
12684
|
-
* - interaction.requires_action
|
|
12685
|
-
* - interaction.completed
|
|
12686
|
-
* - interaction.failed
|
|
12687
|
-
* - interaction.cancelled
|
|
12688
|
-
* - video.generated
|
|
12689
|
-
*/
|
|
12690
|
-
subscribed_events: Array<'batch.succeeded' | 'batch.cancelled' | 'batch.expired' | 'batch.failed' | 'interaction.requires_action' | 'interaction.completed' | 'interaction.failed' | 'interaction.cancelled' | 'video.generated' | (string & {})>;
|
|
12691
|
-
/**
|
|
12692
|
-
* Required. The URI to which webhook events will be sent.
|
|
12693
|
-
*/
|
|
12694
|
-
uri: string;
|
|
12695
|
-
/**
|
|
12696
|
-
* Output only. The timestamp when the webhook was created.
|
|
12697
|
-
*/
|
|
12698
|
-
create_time?: string;
|
|
12699
|
-
/**
|
|
12700
|
-
* Identifier. The name of the webhook. Format: `webhooks/{webhook_id}`
|
|
12701
|
-
*/
|
|
12702
|
-
name?: string;
|
|
12703
|
-
/**
|
|
12704
|
-
* Output only. The new signing secret for the webhook. Only populated on create.
|
|
12705
|
-
*/
|
|
12706
|
-
new_signing_secret?: string;
|
|
12707
|
-
/**
|
|
12708
|
-
* Output only. The signing secrets associated with this webhook.
|
|
12709
|
-
*/
|
|
12710
|
-
signing_secrets?: Array<Webhook.SigningSecret>;
|
|
12711
|
-
/**
|
|
12712
|
-
* The state of the webhook.
|
|
12713
|
-
*/
|
|
12714
|
-
state?: 'enabled' | 'disabled' | 'disabled_due_to_failed_deliveries';
|
|
12715
|
-
/**
|
|
12716
|
-
* Output only. The timestamp when the webhook was last updated.
|
|
12717
|
-
*/
|
|
12718
|
-
update_time?: string;
|
|
12719
|
-
}
|
|
12720
|
-
namespace Webhook {
|
|
12721
|
-
/**
|
|
12722
|
-
* Represents a signing secret used to verify webhook payloads.
|
|
12723
|
-
*/
|
|
12724
|
-
interface SigningSecret {
|
|
12725
|
-
/**
|
|
12726
|
-
* Output only. The expiration date of the signing secret.
|
|
12727
|
-
*/
|
|
12728
|
-
expire_time?: string;
|
|
12729
|
-
/**
|
|
12730
|
-
* Output only. The truncated version of the signing secret.
|
|
12731
|
-
*/
|
|
12732
|
-
truncated_secret?: string;
|
|
12733
|
-
}
|
|
12734
|
-
}
|
|
12743
|
+
webhooks?: Array<Webhook>;
|
|
12735
12744
|
}
|
|
12736
12745
|
|
|
12737
12746
|
declare interface WebhookPingParams {
|
|
@@ -12759,77 +12768,6 @@ declare namespace WebhookPingParams {
|
|
|
12759
12768
|
declare interface WebhookPingResponse {
|
|
12760
12769
|
}
|
|
12761
12770
|
|
|
12762
|
-
declare interface WebhookRetrieveParams {
|
|
12763
|
-
/**
|
|
12764
|
-
* Which version of the API to use.
|
|
12765
|
-
*/
|
|
12766
|
-
api_version?: string;
|
|
12767
|
-
}
|
|
12768
|
-
|
|
12769
|
-
/**
|
|
12770
|
-
* A Webhook resource.
|
|
12771
|
-
*/
|
|
12772
|
-
declare interface WebhookRetrieveResponse {
|
|
12773
|
-
/**
|
|
12774
|
-
* Required. The events that the webhook is subscribed to. Available events:
|
|
12775
|
-
*
|
|
12776
|
-
* - batch.succeeded
|
|
12777
|
-
* - batch.cancelled
|
|
12778
|
-
* - batch.expired
|
|
12779
|
-
* - batch.failed
|
|
12780
|
-
* - interaction.requires_action
|
|
12781
|
-
* - interaction.completed
|
|
12782
|
-
* - interaction.failed
|
|
12783
|
-
* - interaction.cancelled
|
|
12784
|
-
* - video.generated
|
|
12785
|
-
*/
|
|
12786
|
-
subscribed_events: Array<'batch.succeeded' | 'batch.cancelled' | 'batch.expired' | 'batch.failed' | 'interaction.requires_action' | 'interaction.completed' | 'interaction.failed' | 'interaction.cancelled' | 'video.generated' | (string & {})>;
|
|
12787
|
-
/**
|
|
12788
|
-
* Required. The URI to which webhook events will be sent.
|
|
12789
|
-
*/
|
|
12790
|
-
uri: string;
|
|
12791
|
-
/**
|
|
12792
|
-
* Output only. The timestamp when the webhook was created.
|
|
12793
|
-
*/
|
|
12794
|
-
create_time?: string;
|
|
12795
|
-
/**
|
|
12796
|
-
* Identifier. The name of the webhook. Format: `webhooks/{webhook_id}`
|
|
12797
|
-
*/
|
|
12798
|
-
name?: string;
|
|
12799
|
-
/**
|
|
12800
|
-
* Output only. The new signing secret for the webhook. Only populated on create.
|
|
12801
|
-
*/
|
|
12802
|
-
new_signing_secret?: string;
|
|
12803
|
-
/**
|
|
12804
|
-
* Output only. The signing secrets associated with this webhook.
|
|
12805
|
-
*/
|
|
12806
|
-
signing_secrets?: Array<WebhookRetrieveResponse.SigningSecret>;
|
|
12807
|
-
/**
|
|
12808
|
-
* The state of the webhook.
|
|
12809
|
-
*/
|
|
12810
|
-
state?: 'enabled' | 'disabled' | 'disabled_due_to_failed_deliveries';
|
|
12811
|
-
/**
|
|
12812
|
-
* Output only. The timestamp when the webhook was last updated.
|
|
12813
|
-
*/
|
|
12814
|
-
update_time?: string;
|
|
12815
|
-
}
|
|
12816
|
-
|
|
12817
|
-
declare namespace WebhookRetrieveResponse {
|
|
12818
|
-
/**
|
|
12819
|
-
* Represents a signing secret used to verify webhook payloads.
|
|
12820
|
-
*/
|
|
12821
|
-
interface SigningSecret {
|
|
12822
|
-
/**
|
|
12823
|
-
* Output only. The expiration date of the signing secret.
|
|
12824
|
-
*/
|
|
12825
|
-
expire_time?: string;
|
|
12826
|
-
/**
|
|
12827
|
-
* Output only. The truncated version of the signing secret.
|
|
12828
|
-
*/
|
|
12829
|
-
truncated_secret?: string;
|
|
12830
|
-
}
|
|
12831
|
-
}
|
|
12832
|
-
|
|
12833
12771
|
declare interface WebhookRotateSigningSecretParams {
|
|
12834
12772
|
/**
|
|
12835
12773
|
* Path param: Which version of the API to use.
|
|
@@ -12855,7 +12793,7 @@ export declare class Webhooks extends BaseWebhooks {
|
|
|
12855
12793
|
}
|
|
12856
12794
|
|
|
12857
12795
|
export declare namespace Webhooks {
|
|
12858
|
-
export { type
|
|
12796
|
+
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, };
|
|
12859
12797
|
}
|
|
12860
12798
|
|
|
12861
12799
|
declare interface WebhookUpdateParams {
|
|
@@ -12863,101 +12801,35 @@ declare interface WebhookUpdateParams {
|
|
|
12863
12801
|
* Path param: Which version of the API to use.
|
|
12864
12802
|
*/
|
|
12865
12803
|
api_version?: string;
|
|
12866
|
-
/**
|
|
12867
|
-
* Body param: Required. The events that the webhook is subscribed to. Available
|
|
12868
|
-
* events:
|
|
12869
|
-
*
|
|
12870
|
-
* - batch.succeeded
|
|
12871
|
-
* - batch.cancelled
|
|
12872
|
-
* - batch.expired
|
|
12873
|
-
* - batch.failed
|
|
12874
|
-
* - interaction.requires_action
|
|
12875
|
-
* - interaction.completed
|
|
12876
|
-
* - interaction.failed
|
|
12877
|
-
* - interaction.cancelled
|
|
12878
|
-
* - video.generated
|
|
12879
|
-
*/
|
|
12880
|
-
subscribed_events: Array<'batch.succeeded' | 'batch.cancelled' | 'batch.expired' | 'batch.failed' | 'interaction.requires_action' | 'interaction.completed' | 'interaction.failed' | 'interaction.cancelled' | 'video.generated' | (string & {})>;
|
|
12881
|
-
/**
|
|
12882
|
-
* Body param: Required. The URI to which webhook events will be sent.
|
|
12883
|
-
*/
|
|
12884
|
-
uri: string;
|
|
12885
12804
|
/**
|
|
12886
12805
|
* Query param: Optional. The list of fields to update.
|
|
12887
12806
|
*/
|
|
12888
12807
|
update_mask?: string;
|
|
12889
12808
|
/**
|
|
12890
|
-
* Body param:
|
|
12809
|
+
* Body param: Optional. The user-provided name of the webhook.
|
|
12891
12810
|
*/
|
|
12892
12811
|
name?: string;
|
|
12893
12812
|
/**
|
|
12894
|
-
* Body param: The state of the webhook.
|
|
12813
|
+
* Body param: Optional. The state of the webhook.
|
|
12895
12814
|
*/
|
|
12896
12815
|
state?: 'enabled' | 'disabled' | 'disabled_due_to_failed_deliveries';
|
|
12897
|
-
}
|
|
12898
|
-
|
|
12899
|
-
/**
|
|
12900
|
-
* A Webhook resource.
|
|
12901
|
-
*/
|
|
12902
|
-
declare interface WebhookUpdateResponse {
|
|
12903
12816
|
/**
|
|
12904
|
-
*
|
|
12817
|
+
* Body param: Optional. The events that the webhook is subscribed to. Available
|
|
12818
|
+
* events:
|
|
12905
12819
|
*
|
|
12906
12820
|
* - batch.succeeded
|
|
12907
|
-
* - batch.cancelled
|
|
12908
12821
|
* - batch.expired
|
|
12909
12822
|
* - batch.failed
|
|
12910
12823
|
* - interaction.requires_action
|
|
12911
12824
|
* - interaction.completed
|
|
12912
12825
|
* - interaction.failed
|
|
12913
|
-
* - interaction.cancelled
|
|
12914
12826
|
* - video.generated
|
|
12915
12827
|
*/
|
|
12916
|
-
subscribed_events
|
|
12917
|
-
/**
|
|
12918
|
-
* Required. The URI to which webhook events will be sent.
|
|
12919
|
-
*/
|
|
12920
|
-
uri: string;
|
|
12921
|
-
/**
|
|
12922
|
-
* Output only. The timestamp when the webhook was created.
|
|
12923
|
-
*/
|
|
12924
|
-
create_time?: string;
|
|
12925
|
-
/**
|
|
12926
|
-
* Identifier. The name of the webhook. Format: `webhooks/{webhook_id}`
|
|
12927
|
-
*/
|
|
12928
|
-
name?: string;
|
|
12929
|
-
/**
|
|
12930
|
-
* Output only. The new signing secret for the webhook. Only populated on create.
|
|
12931
|
-
*/
|
|
12932
|
-
new_signing_secret?: string;
|
|
12933
|
-
/**
|
|
12934
|
-
* Output only. The signing secrets associated with this webhook.
|
|
12935
|
-
*/
|
|
12936
|
-
signing_secrets?: Array<WebhookUpdateResponse.SigningSecret>;
|
|
12937
|
-
/**
|
|
12938
|
-
* The state of the webhook.
|
|
12939
|
-
*/
|
|
12940
|
-
state?: 'enabled' | 'disabled' | 'disabled_due_to_failed_deliveries';
|
|
12941
|
-
/**
|
|
12942
|
-
* Output only. The timestamp when the webhook was last updated.
|
|
12943
|
-
*/
|
|
12944
|
-
update_time?: string;
|
|
12945
|
-
}
|
|
12946
|
-
|
|
12947
|
-
declare namespace WebhookUpdateResponse {
|
|
12828
|
+
subscribed_events?: Array<'batch.succeeded' | 'batch.expired' | 'batch.failed' | 'interaction.requires_action' | 'interaction.completed' | 'interaction.failed' | 'video.generated' | (string & {})>;
|
|
12948
12829
|
/**
|
|
12949
|
-
*
|
|
12830
|
+
* Body param: Optional. The URI to which webhook events will be sent.
|
|
12950
12831
|
*/
|
|
12951
|
-
|
|
12952
|
-
/**
|
|
12953
|
-
* Output only. The expiration date of the signing secret.
|
|
12954
|
-
*/
|
|
12955
|
-
expire_time?: string;
|
|
12956
|
-
/**
|
|
12957
|
-
* Output only. The truncated version of the signing secret.
|
|
12958
|
-
*/
|
|
12959
|
-
truncated_secret?: string;
|
|
12960
|
-
}
|
|
12832
|
+
uri?: string;
|
|
12961
12833
|
}
|
|
12962
12834
|
|
|
12963
12835
|
/** Standard web search for grounding and related configurations. Only text results are returned. */
|