@google/genai 2.10.0 → 2.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/genai.d.ts +1623 -595
- package/dist/index.cjs +1296 -179
- package/dist/index.mjs +1292 -180
- package/dist/index.mjs.map +1 -1
- package/dist/node/index.cjs +1347 -230
- package/dist/node/index.mjs +1343 -231
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/node.d.ts +1623 -595
- package/dist/tokenizer/node.cjs +157 -53
- package/dist/tokenizer/node.d.ts +204 -4
- package/dist/tokenizer/node.mjs +157 -53
- package/dist/tokenizer/node.mjs.map +1 -1
- package/dist/vertex_internal/index.cjs +158 -54
- package/dist/vertex_internal/index.cjs.map +1 -1
- package/dist/vertex_internal/index.d.ts +308 -67
- package/dist/vertex_internal/index.js +158 -54
- package/dist/vertex_internal/index.js.map +1 -1
- package/dist/web/index.mjs +1343 -231
- package/dist/web/index.mjs.map +1 -1
- package/dist/web/web.d.ts +1623 -595
- package/package.json +2 -9
package/dist/web/index.mjs
CHANGED
|
@@ -832,7 +832,7 @@ var PhishBlockThreshold;
|
|
|
832
832
|
*/
|
|
833
833
|
PhishBlockThreshold["BLOCK_ONLY_EXTREMELY_HIGH"] = "BLOCK_ONLY_EXTREMELY_HIGH";
|
|
834
834
|
})(PhishBlockThreshold || (PhishBlockThreshold = {}));
|
|
835
|
-
/** Specifies the function Behavior.
|
|
835
|
+
/** Specifies the function Behavior. If not specified, the system keeps the current function call behavior. This field is currently only supported by the BidiGenerateContent method. */
|
|
836
836
|
var Behavior;
|
|
837
837
|
(function (Behavior) {
|
|
838
838
|
/**
|
|
@@ -1346,6 +1346,110 @@ var Modality;
|
|
|
1346
1346
|
*/
|
|
1347
1347
|
Modality["VIDEO"] = "VIDEO";
|
|
1348
1348
|
})(Modality || (Modality = {}));
|
|
1349
|
+
/** Delivery mode for the generated content. */
|
|
1350
|
+
var Delivery;
|
|
1351
|
+
(function (Delivery) {
|
|
1352
|
+
/**
|
|
1353
|
+
* Default value. This value is unused.
|
|
1354
|
+
*/
|
|
1355
|
+
Delivery["DELIVERY_UNSPECIFIED"] = "DELIVERY_UNSPECIFIED";
|
|
1356
|
+
/**
|
|
1357
|
+
* Generated bytes are returned inline in the response.
|
|
1358
|
+
*/
|
|
1359
|
+
Delivery["INLINE"] = "INLINE";
|
|
1360
|
+
/**
|
|
1361
|
+
* Generated content is stored and a URI is returned.
|
|
1362
|
+
*/
|
|
1363
|
+
Delivery["URI"] = "URI";
|
|
1364
|
+
})(Delivery || (Delivery = {}));
|
|
1365
|
+
/** The aspect ratio for the image output. */
|
|
1366
|
+
var AspectRatio;
|
|
1367
|
+
(function (AspectRatio) {
|
|
1368
|
+
/**
|
|
1369
|
+
* Default value. This value is unused.
|
|
1370
|
+
*/
|
|
1371
|
+
AspectRatio["ASPECT_RATIO_UNSPECIFIED"] = "ASPECT_RATIO_UNSPECIFIED";
|
|
1372
|
+
/**
|
|
1373
|
+
* 1:1 aspect ratio.
|
|
1374
|
+
*/
|
|
1375
|
+
AspectRatio["ASPECT_RATIO_ONE_BY_ONE"] = "ASPECT_RATIO_ONE_BY_ONE";
|
|
1376
|
+
/**
|
|
1377
|
+
* 2:3 aspect ratio.
|
|
1378
|
+
*/
|
|
1379
|
+
AspectRatio["ASPECT_RATIO_TWO_BY_THREE"] = "ASPECT_RATIO_TWO_BY_THREE";
|
|
1380
|
+
/**
|
|
1381
|
+
* 3:2 aspect ratio.
|
|
1382
|
+
*/
|
|
1383
|
+
AspectRatio["ASPECT_RATIO_THREE_BY_TWO"] = "ASPECT_RATIO_THREE_BY_TWO";
|
|
1384
|
+
/**
|
|
1385
|
+
* 3:4 aspect ratio.
|
|
1386
|
+
*/
|
|
1387
|
+
AspectRatio["ASPECT_RATIO_THREE_BY_FOUR"] = "ASPECT_RATIO_THREE_BY_FOUR";
|
|
1388
|
+
/**
|
|
1389
|
+
* 4:3 aspect ratio.
|
|
1390
|
+
*/
|
|
1391
|
+
AspectRatio["ASPECT_RATIO_FOUR_BY_THREE"] = "ASPECT_RATIO_FOUR_BY_THREE";
|
|
1392
|
+
/**
|
|
1393
|
+
* 4:5 aspect ratio.
|
|
1394
|
+
*/
|
|
1395
|
+
AspectRatio["ASPECT_RATIO_FOUR_BY_FIVE"] = "ASPECT_RATIO_FOUR_BY_FIVE";
|
|
1396
|
+
/**
|
|
1397
|
+
* 5:4 aspect ratio.
|
|
1398
|
+
*/
|
|
1399
|
+
AspectRatio["ASPECT_RATIO_FIVE_BY_FOUR"] = "ASPECT_RATIO_FIVE_BY_FOUR";
|
|
1400
|
+
/**
|
|
1401
|
+
* 9:16 aspect ratio.
|
|
1402
|
+
*/
|
|
1403
|
+
AspectRatio["ASPECT_RATIO_NINE_BY_SIXTEEN"] = "ASPECT_RATIO_NINE_BY_SIXTEEN";
|
|
1404
|
+
/**
|
|
1405
|
+
* 16:9 aspect ratio.
|
|
1406
|
+
*/
|
|
1407
|
+
AspectRatio["ASPECT_RATIO_SIXTEEN_BY_NINE"] = "ASPECT_RATIO_SIXTEEN_BY_NINE";
|
|
1408
|
+
/**
|
|
1409
|
+
* 21:9 aspect ratio.
|
|
1410
|
+
*/
|
|
1411
|
+
AspectRatio["ASPECT_RATIO_TWENTY_ONE_BY_NINE"] = "ASPECT_RATIO_TWENTY_ONE_BY_NINE";
|
|
1412
|
+
/**
|
|
1413
|
+
* 1:8 aspect ratio.
|
|
1414
|
+
*/
|
|
1415
|
+
AspectRatio["ASPECT_RATIO_ONE_BY_EIGHT"] = "ASPECT_RATIO_ONE_BY_EIGHT";
|
|
1416
|
+
/**
|
|
1417
|
+
* 8:1 aspect ratio.
|
|
1418
|
+
*/
|
|
1419
|
+
AspectRatio["ASPECT_RATIO_EIGHT_BY_ONE"] = "ASPECT_RATIO_EIGHT_BY_ONE";
|
|
1420
|
+
/**
|
|
1421
|
+
* 1:4 aspect ratio.
|
|
1422
|
+
*/
|
|
1423
|
+
AspectRatio["ASPECT_RATIO_ONE_BY_FOUR"] = "ASPECT_RATIO_ONE_BY_FOUR";
|
|
1424
|
+
/**
|
|
1425
|
+
* 4:1 aspect ratio.
|
|
1426
|
+
*/
|
|
1427
|
+
AspectRatio["ASPECT_RATIO_FOUR_BY_ONE"] = "ASPECT_RATIO_FOUR_BY_ONE";
|
|
1428
|
+
})(AspectRatio || (AspectRatio = {}));
|
|
1429
|
+
/** The size of the image output. */
|
|
1430
|
+
var ImageSize;
|
|
1431
|
+
(function (ImageSize) {
|
|
1432
|
+
/**
|
|
1433
|
+
* Default value. This value is unused.
|
|
1434
|
+
*/
|
|
1435
|
+
ImageSize["IMAGE_SIZE_UNSPECIFIED"] = "IMAGE_SIZE_UNSPECIFIED";
|
|
1436
|
+
/**
|
|
1437
|
+
* 512px image size.
|
|
1438
|
+
*/
|
|
1439
|
+
ImageSize["IMAGE_SIZE_FIVE_TWELVE"] = "IMAGE_SIZE_FIVE_TWELVE";
|
|
1440
|
+
/**
|
|
1441
|
+
* 1K image size.
|
|
1442
|
+
*/
|
|
1443
|
+
ImageSize["IMAGE_SIZE_ONE_K"] = "IMAGE_SIZE_ONE_K";
|
|
1444
|
+
/**
|
|
1445
|
+
* 2K image size.
|
|
1446
|
+
*/
|
|
1447
|
+
ImageSize["IMAGE_SIZE_TWO_K"] = "IMAGE_SIZE_TWO_K";
|
|
1448
|
+
/**
|
|
1449
|
+
* 4K image size.
|
|
1450
|
+
*/
|
|
1451
|
+
ImageSize["IMAGE_SIZE_FOUR_K"] = "IMAGE_SIZE_FOUR_K";
|
|
1452
|
+
})(ImageSize || (ImageSize = {}));
|
|
1349
1453
|
/** Tuning mode. This enum is not supported in Gemini API. */
|
|
1350
1454
|
var TuningMode;
|
|
1351
1455
|
(function (TuningMode) {
|
|
@@ -1394,6 +1498,58 @@ var AdapterSize;
|
|
|
1394
1498
|
*/
|
|
1395
1499
|
AdapterSize["ADAPTER_SIZE_THIRTY_TWO"] = "ADAPTER_SIZE_THIRTY_TWO";
|
|
1396
1500
|
})(AdapterSize || (AdapterSize = {}));
|
|
1501
|
+
/** Defines the type for parsing sample response. This enum is not supported in Gemini API. */
|
|
1502
|
+
var ResponseParseType;
|
|
1503
|
+
(function (ResponseParseType) {
|
|
1504
|
+
/**
|
|
1505
|
+
* Default value. Fallback to IDENTITY
|
|
1506
|
+
*/
|
|
1507
|
+
ResponseParseType["RESPONSE_PARSE_TYPE_UNSPECIFIED"] = "RESPONSE_PARSE_TYPE_UNSPECIFIED";
|
|
1508
|
+
/**
|
|
1509
|
+
* Returns the sample response as is.
|
|
1510
|
+
*/
|
|
1511
|
+
ResponseParseType["IDENTITY"] = "IDENTITY";
|
|
1512
|
+
/**
|
|
1513
|
+
* Uses regex to extract the important part of sample response. Similar to [GoogleSQL](https://cloud.google.com/bigquery/docs/reference/standard-sql/string_functions#regexp_extract) `REGEX_EXTRACT(response, regex_extract_expression)`, but different in that if there are multiple matches, the last match will be returned.
|
|
1514
|
+
*/
|
|
1515
|
+
ResponseParseType["REGEX_EXTRACT"] = "REGEX_EXTRACT";
|
|
1516
|
+
})(ResponseParseType || (ResponseParseType = {}));
|
|
1517
|
+
/** Match operation to use for evaluating rewards. This enum is not supported in Gemini API. */
|
|
1518
|
+
var MatchOperation;
|
|
1519
|
+
(function (MatchOperation) {
|
|
1520
|
+
/**
|
|
1521
|
+
* Default value. A user error will be returned if not set.
|
|
1522
|
+
*/
|
|
1523
|
+
MatchOperation["MATCH_OPERATION_UNSPECIFIED"] = "MATCH_OPERATION_UNSPECIFIED";
|
|
1524
|
+
/**
|
|
1525
|
+
* Equivalent to [GoogleSQL](https://cloud.google.com/bigquery/docs/reference/standard-sql/string_functions#regexp_contains) `REGEX_CONTAINS(target, expression)`.
|
|
1526
|
+
*/
|
|
1527
|
+
MatchOperation["REGEX_CONTAINS"] = "REGEX_CONTAINS";
|
|
1528
|
+
/**
|
|
1529
|
+
* The match operation returns `true` if expression is a substring of the target.
|
|
1530
|
+
*/
|
|
1531
|
+
MatchOperation["PARTIAL_MATCH"] = "PARTIAL_MATCH";
|
|
1532
|
+
/**
|
|
1533
|
+
* The match operation returns `true` expression is an exact match of the target.
|
|
1534
|
+
*/
|
|
1535
|
+
MatchOperation["EXACT_MATCH"] = "EXACT_MATCH";
|
|
1536
|
+
})(MatchOperation || (MatchOperation = {}));
|
|
1537
|
+
/** Represents how much to think for the tuning job. */
|
|
1538
|
+
var ReinforcementTuningThinkingLevel;
|
|
1539
|
+
(function (ReinforcementTuningThinkingLevel) {
|
|
1540
|
+
/**
|
|
1541
|
+
* Unspecified thinking level.
|
|
1542
|
+
*/
|
|
1543
|
+
ReinforcementTuningThinkingLevel["REINFORCEMENT_TUNING_THINKING_LEVEL_UNSPECIFIED"] = "REINFORCEMENT_TUNING_THINKING_LEVEL_UNSPECIFIED";
|
|
1544
|
+
/**
|
|
1545
|
+
* Little to no thinking.
|
|
1546
|
+
*/
|
|
1547
|
+
ReinforcementTuningThinkingLevel["MINIMAL"] = "MINIMAL";
|
|
1548
|
+
/**
|
|
1549
|
+
* High thinking level.
|
|
1550
|
+
*/
|
|
1551
|
+
ReinforcementTuningThinkingLevel["HIGH"] = "HIGH";
|
|
1552
|
+
})(ReinforcementTuningThinkingLevel || (ReinforcementTuningThinkingLevel = {}));
|
|
1397
1553
|
/** Job state. */
|
|
1398
1554
|
var JobState;
|
|
1399
1555
|
(function (JobState) {
|
|
@@ -1878,58 +2034,6 @@ var ImageResizeMode;
|
|
|
1878
2034
|
*/
|
|
1879
2035
|
ImageResizeMode["PAD"] = "PAD";
|
|
1880
2036
|
})(ImageResizeMode || (ImageResizeMode = {}));
|
|
1881
|
-
/** Defines how to parse sample response. */
|
|
1882
|
-
var ResponseParseType;
|
|
1883
|
-
(function (ResponseParseType) {
|
|
1884
|
-
/**
|
|
1885
|
-
* Default value. This value is unused.
|
|
1886
|
-
*/
|
|
1887
|
-
ResponseParseType["RESPONSE_PARSE_TYPE_UNSPECIFIED"] = "RESPONSE_PARSE_TYPE_UNSPECIFIED";
|
|
1888
|
-
/**
|
|
1889
|
-
* Use the sample response as is.
|
|
1890
|
-
*/
|
|
1891
|
-
ResponseParseType["IDENTITY"] = "IDENTITY";
|
|
1892
|
-
/**
|
|
1893
|
-
* Use regex to extract the important part of sample response.
|
|
1894
|
-
*/
|
|
1895
|
-
ResponseParseType["REGEX_EXTRACT"] = "REGEX_EXTRACT";
|
|
1896
|
-
})(ResponseParseType || (ResponseParseType = {}));
|
|
1897
|
-
/** Match operation to use for evaluation. */
|
|
1898
|
-
var MatchOperation;
|
|
1899
|
-
(function (MatchOperation) {
|
|
1900
|
-
/**
|
|
1901
|
-
* Default value. This value is unused.
|
|
1902
|
-
*/
|
|
1903
|
-
MatchOperation["MATCH_OPERATION_UNSPECIFIED"] = "MATCH_OPERATION_UNSPECIFIED";
|
|
1904
|
-
/**
|
|
1905
|
-
* Equivalent to GoogleSQL `REGEX_CONTAINS(target, expression)`.
|
|
1906
|
-
*/
|
|
1907
|
-
MatchOperation["REGEX_CONTAINS"] = "REGEX_CONTAINS";
|
|
1908
|
-
/**
|
|
1909
|
-
* `expression` is a substring of target.
|
|
1910
|
-
*/
|
|
1911
|
-
MatchOperation["PARTIAL_MATCH"] = "PARTIAL_MATCH";
|
|
1912
|
-
/**
|
|
1913
|
-
* `expression` is an exact match of target.
|
|
1914
|
-
*/
|
|
1915
|
-
MatchOperation["EXACT_MATCH"] = "EXACT_MATCH";
|
|
1916
|
-
})(MatchOperation || (MatchOperation = {}));
|
|
1917
|
-
/** Represents how much to think for the tuning job. */
|
|
1918
|
-
var ReinforcementTuningThinkingLevel;
|
|
1919
|
-
(function (ReinforcementTuningThinkingLevel) {
|
|
1920
|
-
/**
|
|
1921
|
-
* Unspecified thinking level.
|
|
1922
|
-
*/
|
|
1923
|
-
ReinforcementTuningThinkingLevel["REINFORCEMENT_TUNING_THINKING_LEVEL_UNSPECIFIED"] = "REINFORCEMENT_TUNING_THINKING_LEVEL_UNSPECIFIED";
|
|
1924
|
-
/**
|
|
1925
|
-
* Little to no thinking.
|
|
1926
|
-
*/
|
|
1927
|
-
ReinforcementTuningThinkingLevel["MINIMAL"] = "MINIMAL";
|
|
1928
|
-
/**
|
|
1929
|
-
* High thinking level.
|
|
1930
|
-
*/
|
|
1931
|
-
ReinforcementTuningThinkingLevel["HIGH"] = "HIGH";
|
|
1932
|
-
})(ReinforcementTuningThinkingLevel || (ReinforcementTuningThinkingLevel = {}));
|
|
1933
2037
|
/** Enum representing the tuning method. */
|
|
1934
2038
|
var TuningMethod;
|
|
1935
2039
|
(function (TuningMethod) {
|
|
@@ -2726,6 +2830,21 @@ class ListModelsResponse {
|
|
|
2726
2830
|
}
|
|
2727
2831
|
class DeleteModelResponse {
|
|
2728
2832
|
}
|
|
2833
|
+
/** Configuration for audio-specific output formatting. */
|
|
2834
|
+
class AudioResponseFormat {
|
|
2835
|
+
}
|
|
2836
|
+
/** Configuration for image-specific output formatting. */
|
|
2837
|
+
class ImageResponseFormat {
|
|
2838
|
+
}
|
|
2839
|
+
/** Configuration for text-specific output formatting. */
|
|
2840
|
+
class TextResponseFormat {
|
|
2841
|
+
}
|
|
2842
|
+
/** Configuration for video-specific output formatting. This data type is not supported in Gemini API. */
|
|
2843
|
+
class VideoResponseFormat {
|
|
2844
|
+
}
|
|
2845
|
+
/** Configuration for the model to configure output formatting and delivery. This data type is not supported in Gemini API. */
|
|
2846
|
+
class ResponseFormat {
|
|
2847
|
+
}
|
|
2729
2848
|
/** Response for counting tokens. */
|
|
2730
2849
|
class CountTokensResponse {
|
|
2731
2850
|
}
|
|
@@ -2754,10 +2873,10 @@ class GenerateVideosOperation {
|
|
|
2754
2873
|
return operation;
|
|
2755
2874
|
}
|
|
2756
2875
|
}
|
|
2757
|
-
/** Defines how to parse sample response for reinforcement tuning. */
|
|
2876
|
+
/** Defines how to parse sample response config for reinforcement tuning. The parsed response (i.e., substring) will be passed to the reward functions. For example, the input prompt might be: > "Perform step-by-step thoughts first to problem A, finally output answer in the <ans> </ans> block." The sample response from the model under tuning might look like: > "<ans>Yes</ans>" Here, users can define the following parse config: ``` { "parseType": "REGEX_EXTRACT", "regexExtractExpression": ".*(.*?)" } ``` The resulting parsed response would be `"Yes"` and will be passed to the reward functions for evaluating rewards. This data type is not supported in Gemini API. */
|
|
2758
2877
|
class ReinforcementTuningParseResponseConfig {
|
|
2759
2878
|
}
|
|
2760
|
-
/** Scores responses by directly converting parsed autorater response to float reward
|
|
2879
|
+
/** Scores responses by directly converting the parsed autorater response to a float reward. Note: Reward is clipped to be within `[-1, 1]`, i.e., `reward = max(min(reward, 1.0), -1.0)`. This data type is not supported in Gemini API. */
|
|
2761
2880
|
class ReinforcementTuningAutoraterScorerParsedResponseConversionScorer {
|
|
2762
2881
|
}
|
|
2763
2882
|
/** The results from an evaluation run performed by the EvaluationService. This data type is not supported in Gemini API. */
|
|
@@ -5197,6 +5316,9 @@ function toolToMldev$4(fromObject) {
|
|
|
5197
5316
|
}
|
|
5198
5317
|
setValueByPath(toObject, ['mcpServers'], transformedList);
|
|
5199
5318
|
}
|
|
5319
|
+
if (getValueByPath(fromObject, ['exaAiSearch']) !== undefined) {
|
|
5320
|
+
throw new Error('exaAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
5321
|
+
}
|
|
5200
5322
|
return toObject;
|
|
5201
5323
|
}
|
|
5202
5324
|
function vertexMultimodalDatasetDestinationFromVertex(fromObject) {
|
|
@@ -6667,6 +6789,9 @@ function toolToMldev$3(fromObject) {
|
|
|
6667
6789
|
}
|
|
6668
6790
|
setValueByPath(toObject, ['mcpServers'], transformedList);
|
|
6669
6791
|
}
|
|
6792
|
+
if (getValueByPath(fromObject, ['exaAiSearch']) !== undefined) {
|
|
6793
|
+
throw new Error('exaAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
6794
|
+
}
|
|
6670
6795
|
return toObject;
|
|
6671
6796
|
}
|
|
6672
6797
|
function toolToVertex$2(fromObject) {
|
|
@@ -6740,6 +6865,10 @@ function toolToVertex$2(fromObject) {
|
|
|
6740
6865
|
}
|
|
6741
6866
|
setValueByPath(toObject, ['mcpServers'], transformedList);
|
|
6742
6867
|
}
|
|
6868
|
+
const fromExaAiSearch = getValueByPath(fromObject, ['exaAiSearch']);
|
|
6869
|
+
if (fromExaAiSearch != null) {
|
|
6870
|
+
setValueByPath(toObject, ['exaAiSearch'], fromExaAiSearch);
|
|
6871
|
+
}
|
|
6743
6872
|
return toObject;
|
|
6744
6873
|
}
|
|
6745
6874
|
function updateCachedContentConfigToMldev(fromObject, parentObject) {
|
|
@@ -8314,7 +8443,7 @@ function generationConfigToVertex$1(fromObject) {
|
|
|
8314
8443
|
}
|
|
8315
8444
|
const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
|
|
8316
8445
|
if (fromSpeechConfig != null) {
|
|
8317
|
-
setValueByPath(toObject, ['speechConfig'], fromSpeechConfig);
|
|
8446
|
+
setValueByPath(toObject, ['speechConfig'], speechConfigToVertex$1(fromSpeechConfig));
|
|
8318
8447
|
}
|
|
8319
8448
|
const fromStopSequences = getValueByPath(fromObject, [
|
|
8320
8449
|
'stopSequences',
|
|
@@ -8344,6 +8473,21 @@ function generationConfigToVertex$1(fromObject) {
|
|
|
8344
8473
|
undefined) {
|
|
8345
8474
|
throw new Error('enableEnhancedCivicAnswers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
8346
8475
|
}
|
|
8476
|
+
const fromResponseFormat = getValueByPath(fromObject, [
|
|
8477
|
+
'responseFormat',
|
|
8478
|
+
]);
|
|
8479
|
+
if (fromResponseFormat != null) {
|
|
8480
|
+
let transformedList = fromResponseFormat;
|
|
8481
|
+
if (Array.isArray(transformedList)) {
|
|
8482
|
+
transformedList = transformedList.map((item) => {
|
|
8483
|
+
return item;
|
|
8484
|
+
});
|
|
8485
|
+
}
|
|
8486
|
+
setValueByPath(toObject, ['responseFormat'], transformedList);
|
|
8487
|
+
}
|
|
8488
|
+
if (getValueByPath(fromObject, ['translationConfig']) !== undefined) {
|
|
8489
|
+
throw new Error('translationConfig parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
8490
|
+
}
|
|
8347
8491
|
return toObject;
|
|
8348
8492
|
}
|
|
8349
8493
|
function googleMapsToMldev$2(fromObject) {
|
|
@@ -8557,7 +8701,7 @@ function liveConnectConfigToVertex(fromObject, parentObject) {
|
|
|
8557
8701
|
}
|
|
8558
8702
|
const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
|
|
8559
8703
|
if (parentObject !== undefined && fromSpeechConfig != null) {
|
|
8560
|
-
setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], tLiveSpeechConfig(fromSpeechConfig));
|
|
8704
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], speechConfigToVertex$1(tLiveSpeechConfig(fromSpeechConfig)));
|
|
8561
8705
|
}
|
|
8562
8706
|
const fromThinkingConfig = getValueByPath(fromObject, [
|
|
8563
8707
|
'thinkingConfig',
|
|
@@ -8846,6 +8990,22 @@ function mcpServerToVertex$1(fromObject) {
|
|
|
8846
8990
|
}
|
|
8847
8991
|
return toObject;
|
|
8848
8992
|
}
|
|
8993
|
+
function multiSpeakerVoiceConfigToVertex$1(fromObject) {
|
|
8994
|
+
const toObject = {};
|
|
8995
|
+
const fromSpeakerVoiceConfigs = getValueByPath(fromObject, [
|
|
8996
|
+
'speakerVoiceConfigs',
|
|
8997
|
+
]);
|
|
8998
|
+
if (fromSpeakerVoiceConfigs != null) {
|
|
8999
|
+
let transformedList = fromSpeakerVoiceConfigs;
|
|
9000
|
+
if (Array.isArray(transformedList)) {
|
|
9001
|
+
transformedList = transformedList.map((item) => {
|
|
9002
|
+
return speakerVoiceConfigToVertex$1(item);
|
|
9003
|
+
});
|
|
9004
|
+
}
|
|
9005
|
+
setValueByPath(toObject, ['speakerVoiceConfigs'], transformedList);
|
|
9006
|
+
}
|
|
9007
|
+
return toObject;
|
|
9008
|
+
}
|
|
8849
9009
|
function partToMldev$2(fromObject) {
|
|
8850
9010
|
const toObject = {};
|
|
8851
9011
|
const fromMediaResolution = getValueByPath(fromObject, [
|
|
@@ -8987,6 +9147,26 @@ function partToVertex$2(fromObject) {
|
|
|
8987
9147
|
}
|
|
8988
9148
|
return toObject;
|
|
8989
9149
|
}
|
|
9150
|
+
function replicatedVoiceConfigToVertex$1(fromObject) {
|
|
9151
|
+
const toObject = {};
|
|
9152
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
9153
|
+
if (fromMimeType != null) {
|
|
9154
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
9155
|
+
}
|
|
9156
|
+
const fromVoiceSampleAudio = getValueByPath(fromObject, [
|
|
9157
|
+
'voiceSampleAudio',
|
|
9158
|
+
]);
|
|
9159
|
+
if (fromVoiceSampleAudio != null) {
|
|
9160
|
+
setValueByPath(toObject, ['voiceSampleAudio'], fromVoiceSampleAudio);
|
|
9161
|
+
}
|
|
9162
|
+
if (getValueByPath(fromObject, ['consentAudio']) !== undefined) {
|
|
9163
|
+
throw new Error('consentAudio parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
9164
|
+
}
|
|
9165
|
+
if (getValueByPath(fromObject, ['voiceConsentSignature']) !== undefined) {
|
|
9166
|
+
throw new Error('voiceConsentSignature parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
9167
|
+
}
|
|
9168
|
+
return toObject;
|
|
9169
|
+
}
|
|
8990
9170
|
function safetySettingToMldev$2(fromObject) {
|
|
8991
9171
|
const toObject = {};
|
|
8992
9172
|
const fromCategory = getValueByPath(fromObject, ['category']);
|
|
@@ -9013,6 +9193,36 @@ function sessionResumptionConfigToMldev$1(fromObject) {
|
|
|
9013
9193
|
}
|
|
9014
9194
|
return toObject;
|
|
9015
9195
|
}
|
|
9196
|
+
function speakerVoiceConfigToVertex$1(fromObject) {
|
|
9197
|
+
const toObject = {};
|
|
9198
|
+
const fromSpeaker = getValueByPath(fromObject, ['speaker']);
|
|
9199
|
+
if (fromSpeaker != null) {
|
|
9200
|
+
setValueByPath(toObject, ['speaker'], fromSpeaker);
|
|
9201
|
+
}
|
|
9202
|
+
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
9203
|
+
if (fromVoiceConfig != null) {
|
|
9204
|
+
setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex$1(fromVoiceConfig));
|
|
9205
|
+
}
|
|
9206
|
+
return toObject;
|
|
9207
|
+
}
|
|
9208
|
+
function speechConfigToVertex$1(fromObject) {
|
|
9209
|
+
const toObject = {};
|
|
9210
|
+
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
9211
|
+
if (fromVoiceConfig != null) {
|
|
9212
|
+
setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex$1(fromVoiceConfig));
|
|
9213
|
+
}
|
|
9214
|
+
const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
|
|
9215
|
+
if (fromLanguageCode != null) {
|
|
9216
|
+
setValueByPath(toObject, ['languageCode'], fromLanguageCode);
|
|
9217
|
+
}
|
|
9218
|
+
const fromMultiSpeakerVoiceConfig = getValueByPath(fromObject, [
|
|
9219
|
+
'multiSpeakerVoiceConfig',
|
|
9220
|
+
]);
|
|
9221
|
+
if (fromMultiSpeakerVoiceConfig != null) {
|
|
9222
|
+
setValueByPath(toObject, ['multiSpeakerVoiceConfig'], multiSpeakerVoiceConfigToVertex$1(fromMultiSpeakerVoiceConfig));
|
|
9223
|
+
}
|
|
9224
|
+
return toObject;
|
|
9225
|
+
}
|
|
9016
9226
|
function toolToMldev$2(fromObject) {
|
|
9017
9227
|
const toObject = {};
|
|
9018
9228
|
if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
|
|
@@ -9078,6 +9288,9 @@ function toolToMldev$2(fromObject) {
|
|
|
9078
9288
|
}
|
|
9079
9289
|
setValueByPath(toObject, ['mcpServers'], transformedList);
|
|
9080
9290
|
}
|
|
9291
|
+
if (getValueByPath(fromObject, ['exaAiSearch']) !== undefined) {
|
|
9292
|
+
throw new Error('exaAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
9293
|
+
}
|
|
9081
9294
|
return toObject;
|
|
9082
9295
|
}
|
|
9083
9296
|
function toolToVertex$1(fromObject) {
|
|
@@ -9151,6 +9364,10 @@ function toolToVertex$1(fromObject) {
|
|
|
9151
9364
|
}
|
|
9152
9365
|
setValueByPath(toObject, ['mcpServers'], transformedList);
|
|
9153
9366
|
}
|
|
9367
|
+
const fromExaAiSearch = getValueByPath(fromObject, ['exaAiSearch']);
|
|
9368
|
+
if (fromExaAiSearch != null) {
|
|
9369
|
+
setValueByPath(toObject, ['exaAiSearch'], fromExaAiSearch);
|
|
9370
|
+
}
|
|
9154
9371
|
return toObject;
|
|
9155
9372
|
}
|
|
9156
9373
|
function usageMetadataFromVertex(fromObject) {
|
|
@@ -9257,6 +9474,22 @@ function voiceActivityFromVertex(fromObject) {
|
|
|
9257
9474
|
}
|
|
9258
9475
|
return toObject;
|
|
9259
9476
|
}
|
|
9477
|
+
function voiceConfigToVertex$1(fromObject) {
|
|
9478
|
+
const toObject = {};
|
|
9479
|
+
const fromReplicatedVoiceConfig = getValueByPath(fromObject, [
|
|
9480
|
+
'replicatedVoiceConfig',
|
|
9481
|
+
]);
|
|
9482
|
+
if (fromReplicatedVoiceConfig != null) {
|
|
9483
|
+
setValueByPath(toObject, ['replicatedVoiceConfig'], replicatedVoiceConfigToVertex$1(fromReplicatedVoiceConfig));
|
|
9484
|
+
}
|
|
9485
|
+
const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [
|
|
9486
|
+
'prebuiltVoiceConfig',
|
|
9487
|
+
]);
|
|
9488
|
+
if (fromPrebuiltVoiceConfig != null) {
|
|
9489
|
+
setValueByPath(toObject, ['prebuiltVoiceConfig'], fromPrebuiltVoiceConfig);
|
|
9490
|
+
}
|
|
9491
|
+
return toObject;
|
|
9492
|
+
}
|
|
9260
9493
|
|
|
9261
9494
|
/**
|
|
9262
9495
|
* @license
|
|
@@ -9477,6 +9710,18 @@ function contentEmbeddingStatisticsFromVertex(fromObject, _rootObject) {
|
|
|
9477
9710
|
if (fromTokenCount != null) {
|
|
9478
9711
|
setValueByPath(toObject, ['tokenCount'], fromTokenCount);
|
|
9479
9712
|
}
|
|
9713
|
+
const fromTokensDetails = getValueByPath(fromObject, [
|
|
9714
|
+
'tokensDetails',
|
|
9715
|
+
]);
|
|
9716
|
+
if (fromTokensDetails != null) {
|
|
9717
|
+
let transformedList = fromTokensDetails;
|
|
9718
|
+
if (Array.isArray(transformedList)) {
|
|
9719
|
+
transformedList = transformedList.map((item) => {
|
|
9720
|
+
return item;
|
|
9721
|
+
});
|
|
9722
|
+
}
|
|
9723
|
+
setValueByPath(toObject, ['tokensDetails'], transformedList);
|
|
9724
|
+
}
|
|
9480
9725
|
return toObject;
|
|
9481
9726
|
}
|
|
9482
9727
|
function contentToMldev$1(fromObject, rootObject) {
|
|
@@ -10106,6 +10351,10 @@ function embedContentResponseFromVertex(fromObject, rootObject) {
|
|
|
10106
10351
|
usageMetadata['promptTokenCount']) {
|
|
10107
10352
|
stats.tokenCount = usageMetadata['promptTokenCount'];
|
|
10108
10353
|
}
|
|
10354
|
+
if (usageMetadata &&
|
|
10355
|
+
usageMetadata['promptTokensDetails']) {
|
|
10356
|
+
stats.tokensDetails = usageMetadata['promptTokensDetails'];
|
|
10357
|
+
}
|
|
10109
10358
|
if (truncated) {
|
|
10110
10359
|
stats.truncated = truncated;
|
|
10111
10360
|
}
|
|
@@ -10510,7 +10759,7 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject, root
|
|
|
10510
10759
|
}
|
|
10511
10760
|
const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
|
|
10512
10761
|
if (fromSpeechConfig != null) {
|
|
10513
|
-
setValueByPath(toObject, ['speechConfig'], tSpeechConfig(fromSpeechConfig));
|
|
10762
|
+
setValueByPath(toObject, ['speechConfig'], speechConfigToVertex(tSpeechConfig(fromSpeechConfig)));
|
|
10514
10763
|
}
|
|
10515
10764
|
const fromAudioTimestamp = getValueByPath(fromObject, [
|
|
10516
10765
|
'audioTimestamp',
|
|
@@ -11397,7 +11646,7 @@ function generatedVideoFromVertex(fromObject, rootObject) {
|
|
|
11397
11646
|
}
|
|
11398
11647
|
return toObject;
|
|
11399
11648
|
}
|
|
11400
|
-
function generationConfigToVertex(fromObject,
|
|
11649
|
+
function generationConfigToVertex(fromObject, rootObject) {
|
|
11401
11650
|
const toObject = {};
|
|
11402
11651
|
const fromModelSelectionConfig = getValueByPath(fromObject, [
|
|
11403
11652
|
'modelSelectionConfig',
|
|
@@ -11493,7 +11742,7 @@ function generationConfigToVertex(fromObject, _rootObject) {
|
|
|
11493
11742
|
}
|
|
11494
11743
|
const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
|
|
11495
11744
|
if (fromSpeechConfig != null) {
|
|
11496
|
-
setValueByPath(toObject, ['speechConfig'], fromSpeechConfig);
|
|
11745
|
+
setValueByPath(toObject, ['speechConfig'], speechConfigToVertex(fromSpeechConfig));
|
|
11497
11746
|
}
|
|
11498
11747
|
const fromStopSequences = getValueByPath(fromObject, [
|
|
11499
11748
|
'stopSequences',
|
|
@@ -11523,6 +11772,21 @@ function generationConfigToVertex(fromObject, _rootObject) {
|
|
|
11523
11772
|
undefined) {
|
|
11524
11773
|
throw new Error('enableEnhancedCivicAnswers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
11525
11774
|
}
|
|
11775
|
+
const fromResponseFormat = getValueByPath(fromObject, [
|
|
11776
|
+
'responseFormat',
|
|
11777
|
+
]);
|
|
11778
|
+
if (fromResponseFormat != null) {
|
|
11779
|
+
let transformedList = fromResponseFormat;
|
|
11780
|
+
if (Array.isArray(transformedList)) {
|
|
11781
|
+
transformedList = transformedList.map((item) => {
|
|
11782
|
+
return item;
|
|
11783
|
+
});
|
|
11784
|
+
}
|
|
11785
|
+
setValueByPath(toObject, ['responseFormat'], transformedList);
|
|
11786
|
+
}
|
|
11787
|
+
if (getValueByPath(fromObject, ['translationConfig']) !== undefined) {
|
|
11788
|
+
throw new Error('translationConfig parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
11789
|
+
}
|
|
11526
11790
|
return toObject;
|
|
11527
11791
|
}
|
|
11528
11792
|
function getModelParametersToMldev(apiClient, fromObject, _rootObject) {
|
|
@@ -11960,6 +12224,22 @@ function modelFromVertex(fromObject, rootObject) {
|
|
|
11960
12224
|
}
|
|
11961
12225
|
return toObject;
|
|
11962
12226
|
}
|
|
12227
|
+
function multiSpeakerVoiceConfigToVertex(fromObject, rootObject) {
|
|
12228
|
+
const toObject = {};
|
|
12229
|
+
const fromSpeakerVoiceConfigs = getValueByPath(fromObject, [
|
|
12230
|
+
'speakerVoiceConfigs',
|
|
12231
|
+
]);
|
|
12232
|
+
if (fromSpeakerVoiceConfigs != null) {
|
|
12233
|
+
let transformedList = fromSpeakerVoiceConfigs;
|
|
12234
|
+
if (Array.isArray(transformedList)) {
|
|
12235
|
+
transformedList = transformedList.map((item) => {
|
|
12236
|
+
return speakerVoiceConfigToVertex(item);
|
|
12237
|
+
});
|
|
12238
|
+
}
|
|
12239
|
+
setValueByPath(toObject, ['speakerVoiceConfigs'], transformedList);
|
|
12240
|
+
}
|
|
12241
|
+
return toObject;
|
|
12242
|
+
}
|
|
11963
12243
|
function partToMldev$1(fromObject, rootObject) {
|
|
11964
12244
|
const toObject = {};
|
|
11965
12245
|
const fromMediaResolution = getValueByPath(fromObject, [
|
|
@@ -12269,6 +12549,26 @@ function referenceImageAPIInternalToVertex(fromObject, rootObject) {
|
|
|
12269
12549
|
}
|
|
12270
12550
|
return toObject;
|
|
12271
12551
|
}
|
|
12552
|
+
function replicatedVoiceConfigToVertex(fromObject, _rootObject) {
|
|
12553
|
+
const toObject = {};
|
|
12554
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
12555
|
+
if (fromMimeType != null) {
|
|
12556
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
12557
|
+
}
|
|
12558
|
+
const fromVoiceSampleAudio = getValueByPath(fromObject, [
|
|
12559
|
+
'voiceSampleAudio',
|
|
12560
|
+
]);
|
|
12561
|
+
if (fromVoiceSampleAudio != null) {
|
|
12562
|
+
setValueByPath(toObject, ['voiceSampleAudio'], fromVoiceSampleAudio);
|
|
12563
|
+
}
|
|
12564
|
+
if (getValueByPath(fromObject, ['consentAudio']) !== undefined) {
|
|
12565
|
+
throw new Error('consentAudio parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
12566
|
+
}
|
|
12567
|
+
if (getValueByPath(fromObject, ['voiceConsentSignature']) !== undefined) {
|
|
12568
|
+
throw new Error('voiceConsentSignature parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
12569
|
+
}
|
|
12570
|
+
return toObject;
|
|
12571
|
+
}
|
|
12272
12572
|
function safetyAttributesFromMldev(fromObject, _rootObject) {
|
|
12273
12573
|
const toObject = {};
|
|
12274
12574
|
const fromCategories = getValueByPath(fromObject, [
|
|
@@ -12418,6 +12718,36 @@ function segmentImageSourceToVertex(fromObject, parentObject, rootObject) {
|
|
|
12418
12718
|
}
|
|
12419
12719
|
return toObject;
|
|
12420
12720
|
}
|
|
12721
|
+
function speakerVoiceConfigToVertex(fromObject, rootObject) {
|
|
12722
|
+
const toObject = {};
|
|
12723
|
+
const fromSpeaker = getValueByPath(fromObject, ['speaker']);
|
|
12724
|
+
if (fromSpeaker != null) {
|
|
12725
|
+
setValueByPath(toObject, ['speaker'], fromSpeaker);
|
|
12726
|
+
}
|
|
12727
|
+
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
12728
|
+
if (fromVoiceConfig != null) {
|
|
12729
|
+
setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex(fromVoiceConfig));
|
|
12730
|
+
}
|
|
12731
|
+
return toObject;
|
|
12732
|
+
}
|
|
12733
|
+
function speechConfigToVertex(fromObject, rootObject) {
|
|
12734
|
+
const toObject = {};
|
|
12735
|
+
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
12736
|
+
if (fromVoiceConfig != null) {
|
|
12737
|
+
setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex(fromVoiceConfig));
|
|
12738
|
+
}
|
|
12739
|
+
const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
|
|
12740
|
+
if (fromLanguageCode != null) {
|
|
12741
|
+
setValueByPath(toObject, ['languageCode'], fromLanguageCode);
|
|
12742
|
+
}
|
|
12743
|
+
const fromMultiSpeakerVoiceConfig = getValueByPath(fromObject, [
|
|
12744
|
+
'multiSpeakerVoiceConfig',
|
|
12745
|
+
]);
|
|
12746
|
+
if (fromMultiSpeakerVoiceConfig != null) {
|
|
12747
|
+
setValueByPath(toObject, ['multiSpeakerVoiceConfig'], multiSpeakerVoiceConfigToVertex(fromMultiSpeakerVoiceConfig));
|
|
12748
|
+
}
|
|
12749
|
+
return toObject;
|
|
12750
|
+
}
|
|
12421
12751
|
function toolConfigToMldev(fromObject, rootObject) {
|
|
12422
12752
|
const toObject = {};
|
|
12423
12753
|
const fromRetrievalConfig = getValueByPath(fromObject, [
|
|
@@ -12523,6 +12853,9 @@ function toolToMldev$1(fromObject, rootObject) {
|
|
|
12523
12853
|
}
|
|
12524
12854
|
setValueByPath(toObject, ['mcpServers'], transformedList);
|
|
12525
12855
|
}
|
|
12856
|
+
if (getValueByPath(fromObject, ['exaAiSearch']) !== undefined) {
|
|
12857
|
+
throw new Error('exaAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
12858
|
+
}
|
|
12526
12859
|
return toObject;
|
|
12527
12860
|
}
|
|
12528
12861
|
function toolToVertex(fromObject, rootObject) {
|
|
@@ -12596,6 +12929,10 @@ function toolToVertex(fromObject, rootObject) {
|
|
|
12596
12929
|
}
|
|
12597
12930
|
setValueByPath(toObject, ['mcpServers'], transformedList);
|
|
12598
12931
|
}
|
|
12932
|
+
const fromExaAiSearch = getValueByPath(fromObject, ['exaAiSearch']);
|
|
12933
|
+
if (fromExaAiSearch != null) {
|
|
12934
|
+
setValueByPath(toObject, ['exaAiSearch'], fromExaAiSearch);
|
|
12935
|
+
}
|
|
12599
12936
|
return toObject;
|
|
12600
12937
|
}
|
|
12601
12938
|
function tunedModelInfoFromMldev(fromObject, _rootObject) {
|
|
@@ -12907,9 +13244,25 @@ function videoToVertex(fromObject, _rootObject) {
|
|
|
12907
13244
|
}
|
|
12908
13245
|
return toObject;
|
|
12909
13246
|
}
|
|
12910
|
-
|
|
12911
|
-
|
|
12912
|
-
|
|
13247
|
+
function voiceConfigToVertex(fromObject, rootObject) {
|
|
13248
|
+
const toObject = {};
|
|
13249
|
+
const fromReplicatedVoiceConfig = getValueByPath(fromObject, [
|
|
13250
|
+
'replicatedVoiceConfig',
|
|
13251
|
+
]);
|
|
13252
|
+
if (fromReplicatedVoiceConfig != null) {
|
|
13253
|
+
setValueByPath(toObject, ['replicatedVoiceConfig'], replicatedVoiceConfigToVertex(fromReplicatedVoiceConfig));
|
|
13254
|
+
}
|
|
13255
|
+
const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [
|
|
13256
|
+
'prebuiltVoiceConfig',
|
|
13257
|
+
]);
|
|
13258
|
+
if (fromPrebuiltVoiceConfig != null) {
|
|
13259
|
+
setValueByPath(toObject, ['prebuiltVoiceConfig'], fromPrebuiltVoiceConfig);
|
|
13260
|
+
}
|
|
13261
|
+
return toObject;
|
|
13262
|
+
}
|
|
13263
|
+
|
|
13264
|
+
/**
|
|
13265
|
+
* @license
|
|
12913
13266
|
* Copyright 2025 Google LLC
|
|
12914
13267
|
* SPDX-License-Identifier: Apache-2.0
|
|
12915
13268
|
*/
|
|
@@ -13157,7 +13510,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
|
|
|
13157
13510
|
const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
|
|
13158
13511
|
const USER_AGENT_HEADER = 'User-Agent';
|
|
13159
13512
|
const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
|
|
13160
|
-
const SDK_VERSION = '2.
|
|
13513
|
+
const SDK_VERSION = '2.12.0'; // x-release-please-version
|
|
13161
13514
|
const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
|
|
13162
13515
|
const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
|
|
13163
13516
|
const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
|
|
@@ -14411,10 +14764,27 @@ class Live {
|
|
|
14411
14764
|
onopenResolve({});
|
|
14412
14765
|
};
|
|
14413
14766
|
const apiClient = this.apiClient;
|
|
14767
|
+
let sessionResolved = false;
|
|
14768
|
+
const messageQueue = [];
|
|
14769
|
+
let setupCompleteResolve = () => { };
|
|
14770
|
+
const setupCompletePromise = new Promise((resolve) => {
|
|
14771
|
+
setupCompleteResolve = resolve;
|
|
14772
|
+
});
|
|
14414
14773
|
const websocketCallbacks = {
|
|
14415
14774
|
onopen: onopenAwaitedCallback,
|
|
14416
14775
|
onmessage: (event) => {
|
|
14417
|
-
void handleWebSocketMessage(apiClient,
|
|
14776
|
+
void handleWebSocketMessage(apiClient, (msg) => {
|
|
14777
|
+
if (msg.setupComplete && !session.setupComplete) {
|
|
14778
|
+
session.setupComplete = msg.setupComplete;
|
|
14779
|
+
setupCompleteResolve({});
|
|
14780
|
+
}
|
|
14781
|
+
if (sessionResolved) {
|
|
14782
|
+
callbacks.onmessage(msg);
|
|
14783
|
+
}
|
|
14784
|
+
else {
|
|
14785
|
+
messageQueue.push(msg);
|
|
14786
|
+
}
|
|
14787
|
+
}, event);
|
|
14418
14788
|
},
|
|
14419
14789
|
onerror: (_a = callbacks === null || callbacks === void 0 ? void 0 : callbacks.onerror) !== null && _a !== void 0 ? _a : function (e) {
|
|
14420
14790
|
},
|
|
@@ -14476,8 +14846,14 @@ class Live {
|
|
|
14476
14846
|
clientMessage = liveConnectParametersToMldev(this.apiClient, liveConnectParameters);
|
|
14477
14847
|
}
|
|
14478
14848
|
delete clientMessage['config'];
|
|
14849
|
+
const session = new Session(conn, this.apiClient);
|
|
14479
14850
|
conn.send(JSON.stringify(clientMessage));
|
|
14480
|
-
|
|
14851
|
+
await setupCompletePromise;
|
|
14852
|
+
sessionResolved = true;
|
|
14853
|
+
for (const msg of messageQueue) {
|
|
14854
|
+
callbacks.onmessage(msg);
|
|
14855
|
+
}
|
|
14856
|
+
return session;
|
|
14481
14857
|
}
|
|
14482
14858
|
// TODO: b/416041229 - Abstract this method to a common place.
|
|
14483
14859
|
isCallableTool(tool) {
|
|
@@ -17006,6 +17382,9 @@ function toolToMldev(fromObject) {
|
|
|
17006
17382
|
}
|
|
17007
17383
|
setValueByPath(toObject, ['mcpServers'], transformedList);
|
|
17008
17384
|
}
|
|
17385
|
+
if (getValueByPath(fromObject, ['exaAiSearch']) !== undefined) {
|
|
17386
|
+
throw new Error('exaAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
17387
|
+
}
|
|
17009
17388
|
return toObject;
|
|
17010
17389
|
}
|
|
17011
17390
|
|
|
@@ -17857,17 +18236,14 @@ function env() {
|
|
|
17857
18236
|
* Populates global parameters with environment variables.
|
|
17858
18237
|
*/
|
|
17859
18238
|
function fillGlobals(options) {
|
|
17860
|
-
var _a, _b
|
|
18239
|
+
var _a, _b;
|
|
17861
18240
|
const clone = Object.assign({}, options);
|
|
17862
18241
|
const envVars = env();
|
|
17863
18242
|
if (typeof envVars.GOOGLE_GENAI_API_VERSION !== "undefined") {
|
|
17864
18243
|
(_a = clone.api_version) !== null && _a !== void 0 ? _a : (clone.api_version = envVars.GOOGLE_GENAI_API_VERSION);
|
|
17865
18244
|
}
|
|
17866
|
-
if (typeof envVars.GOOGLE_GENAI_API_REVISION !== "undefined") {
|
|
17867
|
-
(_b = clone.api_revision) !== null && _b !== void 0 ? _b : (clone.api_revision = envVars.GOOGLE_GENAI_API_REVISION);
|
|
17868
|
-
}
|
|
17869
18245
|
if (typeof envVars.GOOGLE_GENAI_USER_PROJECT !== "undefined") {
|
|
17870
|
-
(
|
|
18246
|
+
(_b = clone.user_project) !== null && _b !== void 0 ? _b : (clone.user_project = envVars.GOOGLE_GENAI_USER_PROJECT);
|
|
17871
18247
|
}
|
|
17872
18248
|
return clone;
|
|
17873
18249
|
}
|
|
@@ -17879,7 +18255,6 @@ function fillGlobals(options) {
|
|
|
17879
18255
|
*
|
|
17880
18256
|
* g3-prettier-ignore-file
|
|
17881
18257
|
*/
|
|
17882
|
-
const GOOGLE_GENAI_API_REVISION = "2026-05-20";
|
|
17883
18258
|
class GoogleGenAISecurityProvider {
|
|
17884
18259
|
constructor(options) {
|
|
17885
18260
|
this.options = options;
|
|
@@ -17897,7 +18272,6 @@ class GoogleGenAIAuthHook {
|
|
|
17897
18272
|
}
|
|
17898
18273
|
async beforeRequest(hookCtx, request) {
|
|
17899
18274
|
applyDefaultHeaders(request.headers, getStaticDefaultHeaders(hookCtx.security_source));
|
|
17900
|
-
applyApiRevision(hookCtx, request.headers);
|
|
17901
18275
|
applyUserProject(hookCtx, request.headers);
|
|
17902
18276
|
if (hasAuthHeaders(request.headers)) {
|
|
17903
18277
|
return request;
|
|
@@ -17977,12 +18351,6 @@ function applyDefaultHeaders(target, source) {
|
|
|
17977
18351
|
}
|
|
17978
18352
|
}
|
|
17979
18353
|
}
|
|
17980
|
-
function applyApiRevision(hookCtx, headers) {
|
|
17981
|
-
var _a;
|
|
17982
|
-
if (headers.get("api-revision") === null) {
|
|
17983
|
-
headers.set("Api-Revision", (_a = hookCtx.options.api_revision) !== null && _a !== void 0 ? _a : GOOGLE_GENAI_API_REVISION);
|
|
17984
|
-
}
|
|
17985
|
-
}
|
|
17986
18354
|
function applyUserProject(hookCtx, headers) {
|
|
17987
18355
|
if (hookCtx.options.user_project !== undefined &&
|
|
17988
18356
|
headers.get("x-goog-user-project") === null) {
|
|
@@ -18514,7 +18882,7 @@ function serverURLFromOptions(options) {
|
|
|
18514
18882
|
return new URL(u);
|
|
18515
18883
|
}
|
|
18516
18884
|
const SDK_METADATA = {
|
|
18517
|
-
userAgent: "speakeasy-sdk/typescript 2.4.1-preview.4 2.
|
|
18885
|
+
userAgent: "speakeasy-sdk/typescript 2.4.1-preview.4 2.913.3 v1beta @google/genai",
|
|
18518
18886
|
};
|
|
18519
18887
|
|
|
18520
18888
|
/**
|
|
@@ -20155,9 +20523,9 @@ function unwrapAsAPIPromise(p) {
|
|
|
20155
20523
|
* Creates a new Agent (Typed version for SDK).
|
|
20156
20524
|
*/
|
|
20157
20525
|
function agentsCreate(client, body, api_version, options) {
|
|
20158
|
-
return new APIPromise($do$
|
|
20526
|
+
return new APIPromise($do$l(client, body, api_version, options));
|
|
20159
20527
|
}
|
|
20160
|
-
async function $do$
|
|
20528
|
+
async function $do$l(client, body, api_version, options) {
|
|
20161
20529
|
var _a, _b, _c;
|
|
20162
20530
|
const input = {
|
|
20163
20531
|
body: body,
|
|
@@ -20240,9 +20608,9 @@ async function $do$e(client, body, api_version, options) {
|
|
|
20240
20608
|
* Deletes an Agent.
|
|
20241
20609
|
*/
|
|
20242
20610
|
function agentsDelete(client, id, api_version, options) {
|
|
20243
|
-
return new APIPromise($do$
|
|
20611
|
+
return new APIPromise($do$k(client, id, api_version, options));
|
|
20244
20612
|
}
|
|
20245
|
-
async function $do$
|
|
20613
|
+
async function $do$k(client, id, api_version, options) {
|
|
20246
20614
|
var _a, _b, _c;
|
|
20247
20615
|
const input = {
|
|
20248
20616
|
id: id,
|
|
@@ -20328,9 +20696,9 @@ async function $do$d(client, id, api_version, options) {
|
|
|
20328
20696
|
* Gets a specific Agent.
|
|
20329
20697
|
*/
|
|
20330
20698
|
function agentsGet(client, id, api_version, options) {
|
|
20331
|
-
return new APIPromise($do$
|
|
20699
|
+
return new APIPromise($do$j(client, id, api_version, options));
|
|
20332
20700
|
}
|
|
20333
|
-
async function $do$
|
|
20701
|
+
async function $do$j(client, id, api_version, options) {
|
|
20334
20702
|
var _a, _b, _c;
|
|
20335
20703
|
const input = {
|
|
20336
20704
|
id: id,
|
|
@@ -20416,9 +20784,9 @@ async function $do$c(client, id, api_version, options) {
|
|
|
20416
20784
|
* Lists all Agents.
|
|
20417
20785
|
*/
|
|
20418
20786
|
function agentsList(client, api_version, page_size, page_token, parent, options) {
|
|
20419
|
-
return new APIPromise($do$
|
|
20787
|
+
return new APIPromise($do$i(client, api_version, page_size, page_token, parent, options));
|
|
20420
20788
|
}
|
|
20421
|
-
async function $do$
|
|
20789
|
+
async function $do$i(client, api_version, page_size, page_token, parent, options) {
|
|
20422
20790
|
var _a, _b, _c;
|
|
20423
20791
|
const input = {
|
|
20424
20792
|
api_version: api_version,
|
|
@@ -20690,9 +21058,9 @@ class GetInteractionByIdClientError extends GoogleGenAiError {
|
|
|
20690
21058
|
* Cancels an interaction by id. This only applies to background interactions that are still running.
|
|
20691
21059
|
*/
|
|
20692
21060
|
function interactionsCancel(client, id, api_version, options) {
|
|
20693
|
-
return new APIPromise($do$
|
|
21061
|
+
return new APIPromise($do$h(client, id, api_version, options));
|
|
20694
21062
|
}
|
|
20695
|
-
async function $do$
|
|
21063
|
+
async function $do$h(client, id, api_version, options) {
|
|
20696
21064
|
var _a, _b, _c;
|
|
20697
21065
|
const input = {
|
|
20698
21066
|
id: id,
|
|
@@ -20778,9 +21146,9 @@ async function $do$a(client, id, api_version, options) {
|
|
|
20778
21146
|
* g3-prettier-ignore-file
|
|
20779
21147
|
*/
|
|
20780
21148
|
function interactionsCreate(client, body, api_version, options) {
|
|
20781
|
-
return new APIPromise($do$
|
|
21149
|
+
return new APIPromise($do$g(client, body, api_version, options));
|
|
20782
21150
|
}
|
|
20783
|
-
async function $do$
|
|
21151
|
+
async function $do$g(client, body, api_version, options) {
|
|
20784
21152
|
var _a, _b, _c, _d;
|
|
20785
21153
|
const input = {
|
|
20786
21154
|
body: body,
|
|
@@ -20872,9 +21240,9 @@ async function $do$9(client, body, api_version, options) {
|
|
|
20872
21240
|
* Deletes the interaction by id.
|
|
20873
21241
|
*/
|
|
20874
21242
|
function interactionsDelete(client, id, api_version, options) {
|
|
20875
|
-
return new APIPromise($do$
|
|
21243
|
+
return new APIPromise($do$f(client, id, api_version, options));
|
|
20876
21244
|
}
|
|
20877
|
-
async function $do$
|
|
21245
|
+
async function $do$f(client, id, api_version, options) {
|
|
20878
21246
|
var _a, _b, _c;
|
|
20879
21247
|
const input = {
|
|
20880
21248
|
id: id,
|
|
@@ -20960,9 +21328,9 @@ async function $do$8(client, id, api_version, options) {
|
|
|
20960
21328
|
* g3-prettier-ignore-file
|
|
20961
21329
|
*/
|
|
20962
21330
|
function interactionsGet(client, id, stream, last_event_id, include_input, api_version, options) {
|
|
20963
|
-
return new APIPromise($do$
|
|
21331
|
+
return new APIPromise($do$e(client, id, stream, last_event_id, include_input, api_version, options));
|
|
20964
21332
|
}
|
|
20965
|
-
async function $do$
|
|
21333
|
+
async function $do$e(client, id, stream, last_event_id, include_input, api_version, options) {
|
|
20966
21334
|
var _a, _b, _c;
|
|
20967
21335
|
const input = {
|
|
20968
21336
|
id: id,
|
|
@@ -21095,12 +21463,12 @@ class Interactions extends ClientSDK {
|
|
|
21095
21463
|
* g3-prettier-ignore-file
|
|
21096
21464
|
*/
|
|
21097
21465
|
/**
|
|
21098
|
-
* Creates a new
|
|
21466
|
+
* Creates a new trigger that will invoke the specified agent on the given cron schedule.
|
|
21099
21467
|
*/
|
|
21100
|
-
function
|
|
21101
|
-
return new APIPromise($do$
|
|
21468
|
+
function triggersCreate(client, body, api_version, options) {
|
|
21469
|
+
return new APIPromise($do$d(client, body, api_version, options));
|
|
21102
21470
|
}
|
|
21103
|
-
async function $do$
|
|
21471
|
+
async function $do$d(client, body, api_version, options) {
|
|
21104
21472
|
var _a, _b, _c;
|
|
21105
21473
|
const input = {
|
|
21106
21474
|
body: body,
|
|
@@ -21111,7 +21479,7 @@ async function $do$6(client, body, api_version, options) {
|
|
|
21111
21479
|
const pathParams = {
|
|
21112
21480
|
api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
|
|
21113
21481
|
};
|
|
21114
|
-
const path = pathToFunc("/{api_version}/
|
|
21482
|
+
const path = pathToFunc("/{api_version}/triggers")(pathParams);
|
|
21115
21483
|
const headers = new Headers(compactMap({
|
|
21116
21484
|
"Content-Type": "application/json",
|
|
21117
21485
|
Accept: "application/json",
|
|
@@ -21121,7 +21489,7 @@ async function $do$6(client, body, api_version, options) {
|
|
|
21121
21489
|
const context = {
|
|
21122
21490
|
options: client._options,
|
|
21123
21491
|
base_url: (_c = (_b = options === null || options === void 0 ? void 0 : options.server_url) !== null && _b !== void 0 ? _b : client._baseURL) !== null && _c !== void 0 ? _c : "",
|
|
21124
|
-
operation_id: "
|
|
21492
|
+
operation_id: "CreateTrigger",
|
|
21125
21493
|
o_auth2_scopes: null,
|
|
21126
21494
|
resolved_security: requestSecurity,
|
|
21127
21495
|
security_source: client._options.security,
|
|
@@ -21165,7 +21533,7 @@ async function $do$6(client, body, api_version, options) {
|
|
|
21165
21533
|
return [doResult, { status: "request-error", request: req }];
|
|
21166
21534
|
}
|
|
21167
21535
|
const response = doResult.value;
|
|
21168
|
-
const [result] = await match(
|
|
21536
|
+
const [result] = await match(json(200), fail("4XX"), fail("5XX"))(response, req);
|
|
21169
21537
|
if (!result.ok) {
|
|
21170
21538
|
return [result, { status: "complete", request: req, response }];
|
|
21171
21539
|
}
|
|
@@ -21180,12 +21548,12 @@ async function $do$6(client, body, api_version, options) {
|
|
|
21180
21548
|
* g3-prettier-ignore-file
|
|
21181
21549
|
*/
|
|
21182
21550
|
/**
|
|
21183
|
-
* Deletes a
|
|
21551
|
+
* Deletes a trigger.
|
|
21184
21552
|
*/
|
|
21185
|
-
function
|
|
21186
|
-
return new APIPromise($do$
|
|
21553
|
+
function triggersDelete(client, id, api_version, options) {
|
|
21554
|
+
return new APIPromise($do$c(client, id, api_version, options));
|
|
21187
21555
|
}
|
|
21188
|
-
async function $do$
|
|
21556
|
+
async function $do$c(client, id, api_version, options) {
|
|
21189
21557
|
var _a, _b, _c;
|
|
21190
21558
|
const input = {
|
|
21191
21559
|
id: id,
|
|
@@ -21200,7 +21568,7 @@ async function $do$5(client, id, api_version, options) {
|
|
|
21200
21568
|
charEncoding: "percent",
|
|
21201
21569
|
}),
|
|
21202
21570
|
};
|
|
21203
|
-
const path = pathToFunc("/{api_version}/
|
|
21571
|
+
const path = pathToFunc("/{api_version}/triggers/{id}")(pathParams);
|
|
21204
21572
|
const headers = new Headers(compactMap({
|
|
21205
21573
|
Accept: "application/json",
|
|
21206
21574
|
}));
|
|
@@ -21209,7 +21577,7 @@ async function $do$5(client, id, api_version, options) {
|
|
|
21209
21577
|
const context = {
|
|
21210
21578
|
options: client._options,
|
|
21211
21579
|
base_url: (_c = (_b = options === null || options === void 0 ? void 0 : options.server_url) !== null && _b !== void 0 ? _b : client._baseURL) !== null && _c !== void 0 ? _c : "",
|
|
21212
|
-
operation_id: "
|
|
21580
|
+
operation_id: "DeleteTrigger",
|
|
21213
21581
|
o_auth2_scopes: null,
|
|
21214
21582
|
resolved_security: requestSecurity,
|
|
21215
21583
|
security_source: client._options.security,
|
|
@@ -21253,7 +21621,7 @@ async function $do$5(client, id, api_version, options) {
|
|
|
21253
21621
|
return [doResult, { status: "request-error", request: req }];
|
|
21254
21622
|
}
|
|
21255
21623
|
const response = doResult.value;
|
|
21256
|
-
const [result] = await match(
|
|
21624
|
+
const [result] = await match(json(200), fail("4XX"), fail("5XX"))(response, req);
|
|
21257
21625
|
if (!result.ok) {
|
|
21258
21626
|
return [result, { status: "complete", request: req, response }];
|
|
21259
21627
|
}
|
|
@@ -21268,12 +21636,12 @@ async function $do$5(client, id, api_version, options) {
|
|
|
21268
21636
|
* g3-prettier-ignore-file
|
|
21269
21637
|
*/
|
|
21270
21638
|
/**
|
|
21271
|
-
* Gets a
|
|
21639
|
+
* Gets details of a single trigger.
|
|
21272
21640
|
*/
|
|
21273
|
-
function
|
|
21274
|
-
return new APIPromise($do$
|
|
21641
|
+
function triggersGet(client, id, api_version, options) {
|
|
21642
|
+
return new APIPromise($do$b(client, id, api_version, options));
|
|
21275
21643
|
}
|
|
21276
|
-
async function $do$
|
|
21644
|
+
async function $do$b(client, id, api_version, options) {
|
|
21277
21645
|
var _a, _b, _c;
|
|
21278
21646
|
const input = {
|
|
21279
21647
|
id: id,
|
|
@@ -21288,7 +21656,7 @@ async function $do$4(client, id, api_version, options) {
|
|
|
21288
21656
|
charEncoding: "percent",
|
|
21289
21657
|
}),
|
|
21290
21658
|
};
|
|
21291
|
-
const path = pathToFunc("/{api_version}/
|
|
21659
|
+
const path = pathToFunc("/{api_version}/triggers/{id}")(pathParams);
|
|
21292
21660
|
const headers = new Headers(compactMap({
|
|
21293
21661
|
Accept: "application/json",
|
|
21294
21662
|
}));
|
|
@@ -21297,7 +21665,7 @@ async function $do$4(client, id, api_version, options) {
|
|
|
21297
21665
|
const context = {
|
|
21298
21666
|
options: client._options,
|
|
21299
21667
|
base_url: (_c = (_b = options === null || options === void 0 ? void 0 : options.server_url) !== null && _b !== void 0 ? _b : client._baseURL) !== null && _c !== void 0 ? _c : "",
|
|
21300
|
-
operation_id: "
|
|
21668
|
+
operation_id: "GetTrigger",
|
|
21301
21669
|
o_auth2_scopes: null,
|
|
21302
21670
|
resolved_security: requestSecurity,
|
|
21303
21671
|
security_source: client._options.security,
|
|
@@ -21341,7 +21709,7 @@ async function $do$4(client, id, api_version, options) {
|
|
|
21341
21709
|
return [doResult, { status: "request-error", request: req }];
|
|
21342
21710
|
}
|
|
21343
21711
|
const response = doResult.value;
|
|
21344
|
-
const [result] = await match(
|
|
21712
|
+
const [result] = await match(json(200), fail("4XX"), fail("5XX"))(response, req);
|
|
21345
21713
|
if (!result.ok) {
|
|
21346
21714
|
return [result, { status: "complete", request: req, response }];
|
|
21347
21715
|
}
|
|
@@ -21356,14 +21724,15 @@ async function $do$4(client, id, api_version, options) {
|
|
|
21356
21724
|
* g3-prettier-ignore-file
|
|
21357
21725
|
*/
|
|
21358
21726
|
/**
|
|
21359
|
-
* Lists
|
|
21727
|
+
* Lists executions for a trigger.
|
|
21360
21728
|
*/
|
|
21361
|
-
function
|
|
21362
|
-
return new APIPromise($do$
|
|
21729
|
+
function triggersListExecutions(client, trigger_id, api_version, page_size, page_token, options) {
|
|
21730
|
+
return new APIPromise($do$a(client, trigger_id, api_version, page_size, page_token, options));
|
|
21363
21731
|
}
|
|
21364
|
-
async function $do$
|
|
21732
|
+
async function $do$a(client, trigger_id, api_version, page_size, page_token, options) {
|
|
21365
21733
|
var _a, _b, _c;
|
|
21366
21734
|
const input = {
|
|
21735
|
+
trigger_id: trigger_id,
|
|
21367
21736
|
api_version: api_version,
|
|
21368
21737
|
page_size: page_size,
|
|
21369
21738
|
page_token: page_token,
|
|
@@ -21371,12 +21740,16 @@ async function $do$3(client, api_version, page_size, page_token, options) {
|
|
|
21371
21740
|
const payload = input;
|
|
21372
21741
|
const body = null;
|
|
21373
21742
|
const pathParams = {
|
|
21374
|
-
api_version: encodeSimple("api_version", (_a = payload
|
|
21743
|
+
api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
|
|
21744
|
+
trigger_id: encodeSimple("trigger_id", payload.trigger_id, {
|
|
21745
|
+
explode: false,
|
|
21746
|
+
charEncoding: "percent",
|
|
21747
|
+
}),
|
|
21375
21748
|
};
|
|
21376
|
-
const path = pathToFunc("/{api_version}/
|
|
21749
|
+
const path = pathToFunc("/{api_version}/triggers/{trigger_id}/executions")(pathParams);
|
|
21377
21750
|
const query = encodeFormQuery({
|
|
21378
|
-
"page_size": payload
|
|
21379
|
-
"page_token": payload
|
|
21751
|
+
"page_size": payload.page_size,
|
|
21752
|
+
"page_token": payload.page_token,
|
|
21380
21753
|
});
|
|
21381
21754
|
const headers = new Headers(compactMap({
|
|
21382
21755
|
Accept: "application/json",
|
|
@@ -21386,7 +21759,7 @@ async function $do$3(client, api_version, page_size, page_token, options) {
|
|
|
21386
21759
|
const context = {
|
|
21387
21760
|
options: client._options,
|
|
21388
21761
|
base_url: (_c = (_b = options === null || options === void 0 ? void 0 : options.server_url) !== null && _b !== void 0 ? _b : client._baseURL) !== null && _c !== void 0 ? _c : "",
|
|
21389
|
-
operation_id: "
|
|
21762
|
+
operation_id: "ListTriggerExecutions",
|
|
21390
21763
|
o_auth2_scopes: null,
|
|
21391
21764
|
resolved_security: requestSecurity,
|
|
21392
21765
|
security_source: client._options.security,
|
|
@@ -21431,7 +21804,7 @@ async function $do$3(client, api_version, page_size, page_token, options) {
|
|
|
21431
21804
|
return [doResult, { status: "request-error", request: req }];
|
|
21432
21805
|
}
|
|
21433
21806
|
const response = doResult.value;
|
|
21434
|
-
const [result] = await match(
|
|
21807
|
+
const [result] = await match(json(200), fail("4XX"), fail("5XX"))(response, req);
|
|
21435
21808
|
if (!result.ok) {
|
|
21436
21809
|
return [result, { status: "complete", request: req, response }];
|
|
21437
21810
|
}
|
|
@@ -21446,30 +21819,31 @@ async function $do$3(client, api_version, page_size, page_token, options) {
|
|
|
21446
21819
|
* g3-prettier-ignore-file
|
|
21447
21820
|
*/
|
|
21448
21821
|
/**
|
|
21449
|
-
*
|
|
21822
|
+
* Lists triggers for a project.
|
|
21450
21823
|
*/
|
|
21451
|
-
function
|
|
21452
|
-
return new APIPromise($do$
|
|
21824
|
+
function triggersList(client, api_version, filter, page_size, page_token, options) {
|
|
21825
|
+
return new APIPromise($do$9(client, api_version, filter, page_size, page_token, options));
|
|
21453
21826
|
}
|
|
21454
|
-
async function $do$
|
|
21827
|
+
async function $do$9(client, api_version, filter, page_size, page_token, options) {
|
|
21455
21828
|
var _a, _b, _c;
|
|
21456
21829
|
const input = {
|
|
21457
|
-
id: id,
|
|
21458
21830
|
api_version: api_version,
|
|
21459
|
-
|
|
21831
|
+
filter: filter,
|
|
21832
|
+
page_size: page_size,
|
|
21833
|
+
page_token: page_token,
|
|
21460
21834
|
};
|
|
21461
21835
|
const payload = input;
|
|
21462
|
-
const body
|
|
21836
|
+
const body = null;
|
|
21463
21837
|
const pathParams = {
|
|
21464
|
-
api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
|
|
21465
|
-
id: encodeSimple("id", payload.id, {
|
|
21466
|
-
explode: false,
|
|
21467
|
-
charEncoding: "percent",
|
|
21468
|
-
}),
|
|
21838
|
+
api_version: encodeSimple("api_version", (_a = payload === null || payload === void 0 ? void 0 : payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
|
|
21469
21839
|
};
|
|
21470
|
-
const path = pathToFunc("/{api_version}/
|
|
21840
|
+
const path = pathToFunc("/{api_version}/triggers")(pathParams);
|
|
21841
|
+
const query = encodeFormQuery({
|
|
21842
|
+
"filter": payload === null || payload === void 0 ? void 0 : payload.filter,
|
|
21843
|
+
"page_size": payload === null || payload === void 0 ? void 0 : payload.page_size,
|
|
21844
|
+
"page_token": payload === null || payload === void 0 ? void 0 : payload.page_token,
|
|
21845
|
+
});
|
|
21471
21846
|
const headers = new Headers(compactMap({
|
|
21472
|
-
"Content-Type": "application/json",
|
|
21473
21847
|
Accept: "application/json",
|
|
21474
21848
|
}));
|
|
21475
21849
|
const securityInput = await extractSecurity(client._options.security);
|
|
@@ -21477,7 +21851,7 @@ async function $do$2(client, id, api_version, body, options) {
|
|
|
21477
21851
|
const context = {
|
|
21478
21852
|
options: client._options,
|
|
21479
21853
|
base_url: (_c = (_b = options === null || options === void 0 ? void 0 : options.server_url) !== null && _b !== void 0 ? _b : client._baseURL) !== null && _c !== void 0 ? _c : "",
|
|
21480
|
-
operation_id: "
|
|
21854
|
+
operation_id: "ListTriggers",
|
|
21481
21855
|
o_auth2_scopes: null,
|
|
21482
21856
|
resolved_security: requestSecurity,
|
|
21483
21857
|
security_source: client._options.security,
|
|
@@ -21499,11 +21873,12 @@ async function $do$2(client, id, api_version, body, options) {
|
|
|
21499
21873
|
};
|
|
21500
21874
|
const requestRes = client._createRequest(context, {
|
|
21501
21875
|
security: requestSecurity,
|
|
21502
|
-
method: "
|
|
21876
|
+
method: "GET",
|
|
21503
21877
|
baseURL: options === null || options === void 0 ? void 0 : options.server_url,
|
|
21504
21878
|
path: path,
|
|
21505
21879
|
headers: headers,
|
|
21506
|
-
|
|
21880
|
+
query: query,
|
|
21881
|
+
body: body,
|
|
21507
21882
|
userAgent: client._options.user_agent,
|
|
21508
21883
|
timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
|
|
21509
21884
|
}, options);
|
|
@@ -21521,7 +21896,7 @@ async function $do$2(client, id, api_version, body, options) {
|
|
|
21521
21896
|
return [doResult, { status: "request-error", request: req }];
|
|
21522
21897
|
}
|
|
21523
21898
|
const response = doResult.value;
|
|
21524
|
-
const [result] = await match(
|
|
21899
|
+
const [result] = await match(json(200), fail("4XX"), fail("5XX"))(response, req);
|
|
21525
21900
|
if (!result.ok) {
|
|
21526
21901
|
return [result, { status: "complete", request: req, response }];
|
|
21527
21902
|
}
|
|
@@ -21536,30 +21911,28 @@ async function $do$2(client, id, api_version, body, options) {
|
|
|
21536
21911
|
* g3-prettier-ignore-file
|
|
21537
21912
|
*/
|
|
21538
21913
|
/**
|
|
21539
|
-
*
|
|
21914
|
+
* Runs a trigger immediately.
|
|
21540
21915
|
*/
|
|
21541
|
-
function
|
|
21542
|
-
return new APIPromise($do$
|
|
21916
|
+
function triggersRun(client, trigger_id, api_version, options) {
|
|
21917
|
+
return new APIPromise($do$8(client, trigger_id, api_version, options));
|
|
21543
21918
|
}
|
|
21544
|
-
async function $do$
|
|
21919
|
+
async function $do$8(client, trigger_id, api_version, options) {
|
|
21545
21920
|
var _a, _b, _c;
|
|
21546
21921
|
const input = {
|
|
21547
|
-
|
|
21922
|
+
trigger_id: trigger_id,
|
|
21548
21923
|
api_version: api_version,
|
|
21549
|
-
body: body,
|
|
21550
21924
|
};
|
|
21551
21925
|
const payload = input;
|
|
21552
|
-
const body
|
|
21926
|
+
const body = null;
|
|
21553
21927
|
const pathParams = {
|
|
21554
21928
|
api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
|
|
21555
|
-
|
|
21929
|
+
trigger_id: encodeSimple("trigger_id", payload.trigger_id, {
|
|
21556
21930
|
explode: false,
|
|
21557
21931
|
charEncoding: "percent",
|
|
21558
21932
|
}),
|
|
21559
21933
|
};
|
|
21560
|
-
const path = pathToFunc("/{api_version}/
|
|
21934
|
+
const path = pathToFunc("/{api_version}/triggers/{trigger_id}/executions")(pathParams);
|
|
21561
21935
|
const headers = new Headers(compactMap({
|
|
21562
|
-
"Content-Type": "application/json",
|
|
21563
21936
|
Accept: "application/json",
|
|
21564
21937
|
}));
|
|
21565
21938
|
const securityInput = await extractSecurity(client._options.security);
|
|
@@ -21567,7 +21940,7 @@ async function $do$1(client, id, api_version, body, options) {
|
|
|
21567
21940
|
const context = {
|
|
21568
21941
|
options: client._options,
|
|
21569
21942
|
base_url: (_c = (_b = options === null || options === void 0 ? void 0 : options.server_url) !== null && _b !== void 0 ? _b : client._baseURL) !== null && _c !== void 0 ? _c : "",
|
|
21570
|
-
operation_id: "
|
|
21943
|
+
operation_id: "RunTrigger",
|
|
21571
21944
|
o_auth2_scopes: null,
|
|
21572
21945
|
resolved_security: requestSecurity,
|
|
21573
21946
|
security_source: client._options.security,
|
|
@@ -21593,7 +21966,7 @@ async function $do$1(client, id, api_version, body, options) {
|
|
|
21593
21966
|
baseURL: options === null || options === void 0 ? void 0 : options.server_url,
|
|
21594
21967
|
path: path,
|
|
21595
21968
|
headers: headers,
|
|
21596
|
-
body: body
|
|
21969
|
+
body: body,
|
|
21597
21970
|
userAgent: client._options.user_agent,
|
|
21598
21971
|
timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
|
|
21599
21972
|
}, options);
|
|
@@ -21611,7 +21984,7 @@ async function $do$1(client, id, api_version, body, options) {
|
|
|
21611
21984
|
return [doResult, { status: "request-error", request: req }];
|
|
21612
21985
|
}
|
|
21613
21986
|
const response = doResult.value;
|
|
21614
|
-
const [result] = await match(
|
|
21987
|
+
const [result] = await match(json(200), fail("4XX"), fail("5XX"))(response, req);
|
|
21615
21988
|
if (!result.ok) {
|
|
21616
21989
|
return [result, { status: "complete", request: req, response }];
|
|
21617
21990
|
}
|
|
@@ -21626,18 +21999,17 @@ async function $do$1(client, id, api_version, body, options) {
|
|
|
21626
21999
|
* g3-prettier-ignore-file
|
|
21627
22000
|
*/
|
|
21628
22001
|
/**
|
|
21629
|
-
* Updates
|
|
22002
|
+
* Updates a trigger.
|
|
21630
22003
|
*/
|
|
21631
|
-
function
|
|
21632
|
-
return new APIPromise($do(client, id,
|
|
22004
|
+
function triggersUpdate(client, id, body, api_version, options) {
|
|
22005
|
+
return new APIPromise($do$7(client, id, body, api_version, options));
|
|
21633
22006
|
}
|
|
21634
|
-
async function $do(client, id,
|
|
22007
|
+
async function $do$7(client, id, body, api_version, options) {
|
|
21635
22008
|
var _a, _b, _c;
|
|
21636
22009
|
const input = {
|
|
21637
22010
|
id: id,
|
|
21638
|
-
api_version: api_version,
|
|
21639
|
-
update_mask: update_mask,
|
|
21640
22011
|
body: body,
|
|
22012
|
+
api_version: api_version,
|
|
21641
22013
|
};
|
|
21642
22014
|
const payload = input;
|
|
21643
22015
|
const body$ = encodeJSON("body", payload.body, { explode: true });
|
|
@@ -21648,10 +22020,7 @@ async function $do(client, id, api_version, update_mask, body, options) {
|
|
|
21648
22020
|
charEncoding: "percent",
|
|
21649
22021
|
}),
|
|
21650
22022
|
};
|
|
21651
|
-
const path = pathToFunc("/{api_version}/
|
|
21652
|
-
const query = encodeFormQuery({
|
|
21653
|
-
"update_mask": payload.update_mask,
|
|
21654
|
-
});
|
|
22023
|
+
const path = pathToFunc("/{api_version}/triggers/{id}")(pathParams);
|
|
21655
22024
|
const headers = new Headers(compactMap({
|
|
21656
22025
|
"Content-Type": "application/json",
|
|
21657
22026
|
Accept: "application/json",
|
|
@@ -21661,7 +22030,7 @@ async function $do(client, id, api_version, update_mask, body, options) {
|
|
|
21661
22030
|
const context = {
|
|
21662
22031
|
options: client._options,
|
|
21663
22032
|
base_url: (_c = (_b = options === null || options === void 0 ? void 0 : options.server_url) !== null && _b !== void 0 ? _b : client._baseURL) !== null && _c !== void 0 ? _c : "",
|
|
21664
|
-
operation_id: "
|
|
22033
|
+
operation_id: "UpdateTrigger",
|
|
21665
22034
|
o_auth2_scopes: null,
|
|
21666
22035
|
resolved_security: requestSecurity,
|
|
21667
22036
|
security_source: client._options.security,
|
|
@@ -21687,7 +22056,6 @@ async function $do(client, id, api_version, update_mask, body, options) {
|
|
|
21687
22056
|
baseURL: options === null || options === void 0 ? void 0 : options.server_url,
|
|
21688
22057
|
path: path,
|
|
21689
22058
|
headers: headers,
|
|
21690
|
-
query: query,
|
|
21691
22059
|
body: body$,
|
|
21692
22060
|
userAgent: client._options.user_agent,
|
|
21693
22061
|
timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
|
|
@@ -21706,7 +22074,7 @@ async function $do(client, id, api_version, update_mask, body, options) {
|
|
|
21706
22074
|
return [doResult, { status: "request-error", request: req }];
|
|
21707
22075
|
}
|
|
21708
22076
|
const response = doResult.value;
|
|
21709
|
-
const [result] = await match(
|
|
22077
|
+
const [result] = await match(json(200), fail("4XX"), fail("5XX"))(response, req);
|
|
21710
22078
|
if (!result.ok) {
|
|
21711
22079
|
return [result, { status: "complete", request: req, response }];
|
|
21712
22080
|
}
|
|
@@ -21720,53 +22088,50 @@ async function $do(client, id, api_version, update_mask, body, options) {
|
|
|
21720
22088
|
*
|
|
21721
22089
|
* g3-prettier-ignore-file
|
|
21722
22090
|
*/
|
|
21723
|
-
class
|
|
22091
|
+
class Triggers extends ClientSDK {
|
|
21724
22092
|
/**
|
|
21725
|
-
* Creates a new
|
|
22093
|
+
* Creates a new trigger that will invoke the specified agent on the given cron schedule.
|
|
21726
22094
|
*/
|
|
21727
22095
|
create(params, options) {
|
|
21728
22096
|
const { api_version } = params, body = __rest(params, ["api_version"]);
|
|
21729
|
-
return unwrapAsAPIPromise(
|
|
22097
|
+
return unwrapAsAPIPromise(triggersCreate(this, body, api_version, options));
|
|
21730
22098
|
}
|
|
21731
22099
|
/**
|
|
21732
|
-
* Lists
|
|
22100
|
+
* Lists triggers for a project.
|
|
21733
22101
|
*/
|
|
21734
22102
|
list(params, options) {
|
|
21735
|
-
return unwrapAsAPIPromise(
|
|
22103
|
+
return unwrapAsAPIPromise(triggersList(this, params === null || params === void 0 ? void 0 : params.api_version, params === null || params === void 0 ? void 0 : params.filter, params === null || params === void 0 ? void 0 : params.page_size, params === null || params === void 0 ? void 0 : params.page_token, options));
|
|
21736
22104
|
}
|
|
21737
22105
|
/**
|
|
21738
|
-
* Gets a
|
|
22106
|
+
* Gets details of a single trigger.
|
|
21739
22107
|
*/
|
|
21740
22108
|
get(id, params, options) {
|
|
21741
|
-
return unwrapAsAPIPromise(
|
|
22109
|
+
return unwrapAsAPIPromise(triggersGet(this, id, params === null || params === void 0 ? void 0 : params.api_version, options));
|
|
21742
22110
|
}
|
|
21743
22111
|
/**
|
|
21744
|
-
* Updates
|
|
22112
|
+
* Updates a trigger.
|
|
21745
22113
|
*/
|
|
21746
22114
|
update(id, params, options) {
|
|
21747
|
-
const
|
|
21748
|
-
|
|
21749
|
-
? undefined
|
|
21750
|
-
: body$body;
|
|
21751
|
-
return unwrapAsAPIPromise(webhooksUpdate(this, id, api_version, update_mask, body, options));
|
|
22115
|
+
const { api_version } = params, body = __rest(params, ["api_version"]);
|
|
22116
|
+
return unwrapAsAPIPromise(triggersUpdate(this, id, body, api_version, options));
|
|
21752
22117
|
}
|
|
21753
22118
|
/**
|
|
21754
|
-
* Deletes a
|
|
22119
|
+
* Deletes a trigger.
|
|
21755
22120
|
*/
|
|
21756
22121
|
delete(id, params, options) {
|
|
21757
|
-
return unwrapAsAPIPromise(
|
|
22122
|
+
return unwrapAsAPIPromise(triggersDelete(this, id, params === null || params === void 0 ? void 0 : params.api_version, options));
|
|
21758
22123
|
}
|
|
21759
22124
|
/**
|
|
21760
|
-
*
|
|
22125
|
+
* Runs a trigger immediately.
|
|
21761
22126
|
*/
|
|
21762
|
-
|
|
21763
|
-
return unwrapAsAPIPromise(
|
|
22127
|
+
run(trigger_id, params, options) {
|
|
22128
|
+
return unwrapAsAPIPromise(triggersRun(this, trigger_id, params === null || params === void 0 ? void 0 : params.api_version, options));
|
|
21764
22129
|
}
|
|
21765
22130
|
/**
|
|
21766
|
-
*
|
|
22131
|
+
* Lists executions for a trigger.
|
|
21767
22132
|
*/
|
|
21768
|
-
|
|
21769
|
-
return unwrapAsAPIPromise(
|
|
22133
|
+
listExecutions(trigger_id, params, options) {
|
|
22134
|
+
return unwrapAsAPIPromise(triggersListExecutions(this, trigger_id, params === null || params === void 0 ? void 0 : params.api_version, params === null || params === void 0 ? void 0 : params.page_size, params === null || params === void 0 ? void 0 : params.page_token, options));
|
|
21770
22135
|
}
|
|
21771
22136
|
}
|
|
21772
22137
|
|
|
@@ -21777,23 +22142,83 @@ class Webhooks extends ClientSDK {
|
|
|
21777
22142
|
*
|
|
21778
22143
|
* g3-prettier-ignore-file
|
|
21779
22144
|
*/
|
|
21780
|
-
|
|
21781
|
-
*
|
|
22145
|
+
/**
|
|
22146
|
+
* Creates a new Webhook.
|
|
21782
22147
|
*/
|
|
21783
|
-
|
|
21784
|
-
|
|
21785
|
-
|
|
21786
|
-
|
|
22148
|
+
function webhooksCreate(client, body, api_version, options) {
|
|
22149
|
+
return new APIPromise($do$6(client, body, api_version, options));
|
|
22150
|
+
}
|
|
22151
|
+
async function $do$6(client, body, api_version, options) {
|
|
22152
|
+
var _a, _b, _c;
|
|
22153
|
+
const input = {
|
|
22154
|
+
body: body,
|
|
22155
|
+
api_version: api_version,
|
|
22156
|
+
};
|
|
22157
|
+
const payload = input;
|
|
22158
|
+
const body$ = encodeJSON("body", payload.body, { explode: true });
|
|
22159
|
+
const pathParams = {
|
|
22160
|
+
api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
|
|
22161
|
+
};
|
|
22162
|
+
const path = pathToFunc("/{api_version}/webhooks")(pathParams);
|
|
22163
|
+
const headers = new Headers(compactMap({
|
|
22164
|
+
"Content-Type": "application/json",
|
|
22165
|
+
Accept: "application/json",
|
|
22166
|
+
}));
|
|
22167
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
22168
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
22169
|
+
const context = {
|
|
22170
|
+
options: client._options,
|
|
22171
|
+
base_url: (_c = (_b = options === null || options === void 0 ? void 0 : options.server_url) !== null && _b !== void 0 ? _b : client._baseURL) !== null && _c !== void 0 ? _c : "",
|
|
22172
|
+
operation_id: "CreateWebhook",
|
|
22173
|
+
o_auth2_scopes: null,
|
|
22174
|
+
resolved_security: requestSecurity,
|
|
22175
|
+
security_source: client._options.security,
|
|
22176
|
+
retry_config: (options === null || options === void 0 ? void 0 : options.retries)
|
|
22177
|
+
|| client._options.retry_config
|
|
22178
|
+
|| {
|
|
22179
|
+
strategy: "attempt-count-backoff",
|
|
22180
|
+
backoff: {
|
|
22181
|
+
initialInterval: 500,
|
|
22182
|
+
maxInterval: 8000,
|
|
22183
|
+
exponent: 2,
|
|
22184
|
+
maxElapsedTime: 30000,
|
|
22185
|
+
},
|
|
22186
|
+
retryConnectionErrors: true,
|
|
22187
|
+
maxRetries: 4,
|
|
22188
|
+
}
|
|
22189
|
+
|| { strategy: "none" },
|
|
22190
|
+
retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
|
|
22191
|
+
};
|
|
22192
|
+
const requestRes = client._createRequest(context, {
|
|
22193
|
+
security: requestSecurity,
|
|
22194
|
+
method: "POST",
|
|
22195
|
+
baseURL: options === null || options === void 0 ? void 0 : options.server_url,
|
|
22196
|
+
path: path,
|
|
22197
|
+
headers: headers,
|
|
22198
|
+
body: body$,
|
|
22199
|
+
userAgent: client._options.user_agent,
|
|
22200
|
+
timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
|
|
22201
|
+
}, options);
|
|
22202
|
+
if (!requestRes.ok) {
|
|
22203
|
+
return [requestRes, { status: "invalid" }];
|
|
21787
22204
|
}
|
|
21788
|
-
|
|
21789
|
-
|
|
21790
|
-
|
|
22205
|
+
const req = requestRes.value;
|
|
22206
|
+
const doResult = await client._do(req, {
|
|
22207
|
+
context,
|
|
22208
|
+
isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
|
|
22209
|
+
retryConfig: context.retry_config,
|
|
22210
|
+
retryCodes: context.retry_codes,
|
|
22211
|
+
});
|
|
22212
|
+
if (!doResult.ok) {
|
|
22213
|
+
return [doResult, { status: "request-error", request: req }];
|
|
21791
22214
|
}
|
|
21792
|
-
|
|
21793
|
-
|
|
21794
|
-
|
|
22215
|
+
const response = doResult.value;
|
|
22216
|
+
const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
|
|
22217
|
+
if (!result.ok) {
|
|
22218
|
+
return [result, { status: "complete", request: req, response }];
|
|
21795
22219
|
}
|
|
21796
|
-
};
|
|
22220
|
+
return [result, { status: "complete", request: req, response }];
|
|
22221
|
+
}
|
|
21797
22222
|
|
|
21798
22223
|
/**
|
|
21799
22224
|
* @license
|
|
@@ -21802,33 +22227,660 @@ let GoogleGenAI$1 = class GoogleGenAI extends ClientSDK {
|
|
|
21802
22227
|
*
|
|
21803
22228
|
* g3-prettier-ignore-file
|
|
21804
22229
|
*/
|
|
21805
|
-
|
|
21806
|
-
|
|
21807
|
-
|
|
21808
|
-
|
|
21809
|
-
|
|
21810
|
-
const serverURL = parentClient.getBaseUrl();
|
|
21811
|
-
if (!serverURL) {
|
|
21812
|
-
throw new Error("Base URL must be set.");
|
|
21813
|
-
}
|
|
21814
|
-
return serverURL.replace(/\/+$/, "");
|
|
21815
|
-
}
|
|
21816
|
-
function getGoogleGenAIAPIVersion(parentClient) {
|
|
21817
|
-
const apiVersion = trimSlashes(parentClient.getApiVersion());
|
|
21818
|
-
const project = parentClient.getProject();
|
|
21819
|
-
const location = parentClient.getLocation();
|
|
21820
|
-
if (parentClient.isVertexAI() && apiVersion && project && location) {
|
|
21821
|
-
return (`${apiVersion}/projects/${encodeURIComponent(project)}` +
|
|
21822
|
-
`/locations/${encodeURIComponent(location)}`);
|
|
21823
|
-
}
|
|
21824
|
-
return apiVersion;
|
|
22230
|
+
/**
|
|
22231
|
+
* Deletes a Webhook.
|
|
22232
|
+
*/
|
|
22233
|
+
function webhooksDelete(client, id, api_version, options) {
|
|
22234
|
+
return new APIPromise($do$5(client, id, api_version, options));
|
|
21825
22235
|
}
|
|
21826
|
-
function
|
|
21827
|
-
var _a, _b, _c
|
|
21828
|
-
const
|
|
21829
|
-
|
|
22236
|
+
async function $do$5(client, id, api_version, options) {
|
|
22237
|
+
var _a, _b, _c;
|
|
22238
|
+
const input = {
|
|
22239
|
+
id: id,
|
|
22240
|
+
api_version: api_version,
|
|
22241
|
+
};
|
|
22242
|
+
const payload = input;
|
|
22243
|
+
const body = null;
|
|
22244
|
+
const pathParams = {
|
|
22245
|
+
api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
|
|
22246
|
+
id: encodeSimple("id", payload.id, {
|
|
22247
|
+
explode: false,
|
|
22248
|
+
charEncoding: "percent",
|
|
22249
|
+
}),
|
|
22250
|
+
};
|
|
22251
|
+
const path = pathToFunc("/{api_version}/webhooks/{id}")(pathParams);
|
|
22252
|
+
const headers = new Headers(compactMap({
|
|
22253
|
+
Accept: "application/json",
|
|
22254
|
+
}));
|
|
22255
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
22256
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
22257
|
+
const context = {
|
|
22258
|
+
options: client._options,
|
|
22259
|
+
base_url: (_c = (_b = options === null || options === void 0 ? void 0 : options.server_url) !== null && _b !== void 0 ? _b : client._baseURL) !== null && _c !== void 0 ? _c : "",
|
|
22260
|
+
operation_id: "DeleteWebhook",
|
|
22261
|
+
o_auth2_scopes: null,
|
|
22262
|
+
resolved_security: requestSecurity,
|
|
22263
|
+
security_source: client._options.security,
|
|
22264
|
+
retry_config: (options === null || options === void 0 ? void 0 : options.retries)
|
|
22265
|
+
|| client._options.retry_config
|
|
22266
|
+
|| {
|
|
22267
|
+
strategy: "attempt-count-backoff",
|
|
22268
|
+
backoff: {
|
|
22269
|
+
initialInterval: 500,
|
|
22270
|
+
maxInterval: 8000,
|
|
22271
|
+
exponent: 2,
|
|
22272
|
+
maxElapsedTime: 30000,
|
|
22273
|
+
},
|
|
22274
|
+
retryConnectionErrors: true,
|
|
22275
|
+
maxRetries: 4,
|
|
22276
|
+
}
|
|
22277
|
+
|| { strategy: "none" },
|
|
22278
|
+
retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
|
|
22279
|
+
};
|
|
22280
|
+
const requestRes = client._createRequest(context, {
|
|
22281
|
+
security: requestSecurity,
|
|
22282
|
+
method: "DELETE",
|
|
22283
|
+
baseURL: options === null || options === void 0 ? void 0 : options.server_url,
|
|
22284
|
+
path: path,
|
|
22285
|
+
headers: headers,
|
|
22286
|
+
body: body,
|
|
22287
|
+
userAgent: client._options.user_agent,
|
|
22288
|
+
timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
|
|
22289
|
+
}, options);
|
|
22290
|
+
if (!requestRes.ok) {
|
|
22291
|
+
return [requestRes, { status: "invalid" }];
|
|
22292
|
+
}
|
|
22293
|
+
const req = requestRes.value;
|
|
22294
|
+
const doResult = await client._do(req, {
|
|
22295
|
+
context,
|
|
22296
|
+
isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
|
|
22297
|
+
retryConfig: context.retry_config,
|
|
22298
|
+
retryCodes: context.retry_codes,
|
|
22299
|
+
});
|
|
22300
|
+
if (!doResult.ok) {
|
|
22301
|
+
return [doResult, { status: "request-error", request: req }];
|
|
22302
|
+
}
|
|
22303
|
+
const response = doResult.value;
|
|
22304
|
+
const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
|
|
22305
|
+
if (!result.ok) {
|
|
22306
|
+
return [result, { status: "complete", request: req, response }];
|
|
22307
|
+
}
|
|
22308
|
+
return [result, { status: "complete", request: req, response }];
|
|
22309
|
+
}
|
|
22310
|
+
|
|
22311
|
+
/**
|
|
22312
|
+
* @license
|
|
22313
|
+
* Copyright 2026 Google LLC
|
|
22314
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
22315
|
+
*
|
|
22316
|
+
* g3-prettier-ignore-file
|
|
22317
|
+
*/
|
|
22318
|
+
/**
|
|
22319
|
+
* Gets a specific Webhook.
|
|
22320
|
+
*/
|
|
22321
|
+
function webhooksGet(client, id, api_version, options) {
|
|
22322
|
+
return new APIPromise($do$4(client, id, api_version, options));
|
|
22323
|
+
}
|
|
22324
|
+
async function $do$4(client, id, api_version, options) {
|
|
22325
|
+
var _a, _b, _c;
|
|
22326
|
+
const input = {
|
|
22327
|
+
id: id,
|
|
22328
|
+
api_version: api_version,
|
|
22329
|
+
};
|
|
22330
|
+
const payload = input;
|
|
22331
|
+
const body = null;
|
|
22332
|
+
const pathParams = {
|
|
22333
|
+
api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
|
|
22334
|
+
id: encodeSimple("id", payload.id, {
|
|
22335
|
+
explode: false,
|
|
22336
|
+
charEncoding: "percent",
|
|
22337
|
+
}),
|
|
22338
|
+
};
|
|
22339
|
+
const path = pathToFunc("/{api_version}/webhooks/{id}")(pathParams);
|
|
22340
|
+
const headers = new Headers(compactMap({
|
|
22341
|
+
Accept: "application/json",
|
|
22342
|
+
}));
|
|
22343
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
22344
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
22345
|
+
const context = {
|
|
22346
|
+
options: client._options,
|
|
22347
|
+
base_url: (_c = (_b = options === null || options === void 0 ? void 0 : options.server_url) !== null && _b !== void 0 ? _b : client._baseURL) !== null && _c !== void 0 ? _c : "",
|
|
22348
|
+
operation_id: "GetWebhook",
|
|
22349
|
+
o_auth2_scopes: null,
|
|
22350
|
+
resolved_security: requestSecurity,
|
|
22351
|
+
security_source: client._options.security,
|
|
22352
|
+
retry_config: (options === null || options === void 0 ? void 0 : options.retries)
|
|
22353
|
+
|| client._options.retry_config
|
|
22354
|
+
|| {
|
|
22355
|
+
strategy: "attempt-count-backoff",
|
|
22356
|
+
backoff: {
|
|
22357
|
+
initialInterval: 500,
|
|
22358
|
+
maxInterval: 8000,
|
|
22359
|
+
exponent: 2,
|
|
22360
|
+
maxElapsedTime: 30000,
|
|
22361
|
+
},
|
|
22362
|
+
retryConnectionErrors: true,
|
|
22363
|
+
maxRetries: 4,
|
|
22364
|
+
}
|
|
22365
|
+
|| { strategy: "none" },
|
|
22366
|
+
retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
|
|
22367
|
+
};
|
|
22368
|
+
const requestRes = client._createRequest(context, {
|
|
22369
|
+
security: requestSecurity,
|
|
22370
|
+
method: "GET",
|
|
22371
|
+
baseURL: options === null || options === void 0 ? void 0 : options.server_url,
|
|
22372
|
+
path: path,
|
|
22373
|
+
headers: headers,
|
|
22374
|
+
body: body,
|
|
22375
|
+
userAgent: client._options.user_agent,
|
|
22376
|
+
timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
|
|
22377
|
+
}, options);
|
|
22378
|
+
if (!requestRes.ok) {
|
|
22379
|
+
return [requestRes, { status: "invalid" }];
|
|
22380
|
+
}
|
|
22381
|
+
const req = requestRes.value;
|
|
22382
|
+
const doResult = await client._do(req, {
|
|
22383
|
+
context,
|
|
22384
|
+
isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
|
|
22385
|
+
retryConfig: context.retry_config,
|
|
22386
|
+
retryCodes: context.retry_codes,
|
|
22387
|
+
});
|
|
22388
|
+
if (!doResult.ok) {
|
|
22389
|
+
return [doResult, { status: "request-error", request: req }];
|
|
22390
|
+
}
|
|
22391
|
+
const response = doResult.value;
|
|
22392
|
+
const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
|
|
22393
|
+
if (!result.ok) {
|
|
22394
|
+
return [result, { status: "complete", request: req, response }];
|
|
22395
|
+
}
|
|
22396
|
+
return [result, { status: "complete", request: req, response }];
|
|
22397
|
+
}
|
|
22398
|
+
|
|
22399
|
+
/**
|
|
22400
|
+
* @license
|
|
22401
|
+
* Copyright 2026 Google LLC
|
|
22402
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
22403
|
+
*
|
|
22404
|
+
* g3-prettier-ignore-file
|
|
22405
|
+
*/
|
|
22406
|
+
/**
|
|
22407
|
+
* Lists all Webhooks.
|
|
22408
|
+
*/
|
|
22409
|
+
function webhooksList(client, api_version, page_size, page_token, options) {
|
|
22410
|
+
return new APIPromise($do$3(client, api_version, page_size, page_token, options));
|
|
22411
|
+
}
|
|
22412
|
+
async function $do$3(client, api_version, page_size, page_token, options) {
|
|
22413
|
+
var _a, _b, _c;
|
|
22414
|
+
const input = {
|
|
22415
|
+
api_version: api_version,
|
|
22416
|
+
page_size: page_size,
|
|
22417
|
+
page_token: page_token,
|
|
22418
|
+
};
|
|
22419
|
+
const payload = input;
|
|
22420
|
+
const body = null;
|
|
22421
|
+
const pathParams = {
|
|
22422
|
+
api_version: encodeSimple("api_version", (_a = payload === null || payload === void 0 ? void 0 : payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
|
|
22423
|
+
};
|
|
22424
|
+
const path = pathToFunc("/{api_version}/webhooks")(pathParams);
|
|
22425
|
+
const query = encodeFormQuery({
|
|
22426
|
+
"page_size": payload === null || payload === void 0 ? void 0 : payload.page_size,
|
|
22427
|
+
"page_token": payload === null || payload === void 0 ? void 0 : payload.page_token,
|
|
22428
|
+
});
|
|
22429
|
+
const headers = new Headers(compactMap({
|
|
22430
|
+
Accept: "application/json",
|
|
22431
|
+
}));
|
|
22432
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
22433
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
22434
|
+
const context = {
|
|
22435
|
+
options: client._options,
|
|
22436
|
+
base_url: (_c = (_b = options === null || options === void 0 ? void 0 : options.server_url) !== null && _b !== void 0 ? _b : client._baseURL) !== null && _c !== void 0 ? _c : "",
|
|
22437
|
+
operation_id: "ListWebhooks",
|
|
22438
|
+
o_auth2_scopes: null,
|
|
22439
|
+
resolved_security: requestSecurity,
|
|
22440
|
+
security_source: client._options.security,
|
|
22441
|
+
retry_config: (options === null || options === void 0 ? void 0 : options.retries)
|
|
22442
|
+
|| client._options.retry_config
|
|
22443
|
+
|| {
|
|
22444
|
+
strategy: "attempt-count-backoff",
|
|
22445
|
+
backoff: {
|
|
22446
|
+
initialInterval: 500,
|
|
22447
|
+
maxInterval: 8000,
|
|
22448
|
+
exponent: 2,
|
|
22449
|
+
maxElapsedTime: 30000,
|
|
22450
|
+
},
|
|
22451
|
+
retryConnectionErrors: true,
|
|
22452
|
+
maxRetries: 4,
|
|
22453
|
+
}
|
|
22454
|
+
|| { strategy: "none" },
|
|
22455
|
+
retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
|
|
22456
|
+
};
|
|
22457
|
+
const requestRes = client._createRequest(context, {
|
|
22458
|
+
security: requestSecurity,
|
|
22459
|
+
method: "GET",
|
|
22460
|
+
baseURL: options === null || options === void 0 ? void 0 : options.server_url,
|
|
22461
|
+
path: path,
|
|
22462
|
+
headers: headers,
|
|
22463
|
+
query: query,
|
|
22464
|
+
body: body,
|
|
22465
|
+
userAgent: client._options.user_agent,
|
|
22466
|
+
timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
|
|
22467
|
+
}, options);
|
|
22468
|
+
if (!requestRes.ok) {
|
|
22469
|
+
return [requestRes, { status: "invalid" }];
|
|
22470
|
+
}
|
|
22471
|
+
const req = requestRes.value;
|
|
22472
|
+
const doResult = await client._do(req, {
|
|
22473
|
+
context,
|
|
22474
|
+
isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
|
|
22475
|
+
retryConfig: context.retry_config,
|
|
22476
|
+
retryCodes: context.retry_codes,
|
|
22477
|
+
});
|
|
22478
|
+
if (!doResult.ok) {
|
|
22479
|
+
return [doResult, { status: "request-error", request: req }];
|
|
22480
|
+
}
|
|
22481
|
+
const response = doResult.value;
|
|
22482
|
+
const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
|
|
22483
|
+
if (!result.ok) {
|
|
22484
|
+
return [result, { status: "complete", request: req, response }];
|
|
22485
|
+
}
|
|
22486
|
+
return [result, { status: "complete", request: req, response }];
|
|
22487
|
+
}
|
|
22488
|
+
|
|
22489
|
+
/**
|
|
22490
|
+
* @license
|
|
22491
|
+
* Copyright 2026 Google LLC
|
|
22492
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
22493
|
+
*
|
|
22494
|
+
* g3-prettier-ignore-file
|
|
22495
|
+
*/
|
|
22496
|
+
/**
|
|
22497
|
+
* Sends a ping event to a Webhook.
|
|
22498
|
+
*/
|
|
22499
|
+
function webhooksPing(client, id, api_version, body, options) {
|
|
22500
|
+
return new APIPromise($do$2(client, id, api_version, body, options));
|
|
22501
|
+
}
|
|
22502
|
+
async function $do$2(client, id, api_version, body, options) {
|
|
22503
|
+
var _a, _b, _c;
|
|
22504
|
+
const input = {
|
|
22505
|
+
id: id,
|
|
22506
|
+
api_version: api_version,
|
|
22507
|
+
body: body,
|
|
22508
|
+
};
|
|
22509
|
+
const payload = input;
|
|
22510
|
+
const body$ = encodeJSON("body", payload.body, { explode: true });
|
|
22511
|
+
const pathParams = {
|
|
22512
|
+
api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
|
|
22513
|
+
id: encodeSimple("id", payload.id, {
|
|
22514
|
+
explode: false,
|
|
22515
|
+
charEncoding: "percent",
|
|
22516
|
+
}),
|
|
22517
|
+
};
|
|
22518
|
+
const path = pathToFunc("/{api_version}/webhooks/{id}:ping")(pathParams);
|
|
22519
|
+
const headers = new Headers(compactMap({
|
|
22520
|
+
"Content-Type": "application/json",
|
|
22521
|
+
Accept: "application/json",
|
|
22522
|
+
}));
|
|
22523
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
22524
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
22525
|
+
const context = {
|
|
22526
|
+
options: client._options,
|
|
22527
|
+
base_url: (_c = (_b = options === null || options === void 0 ? void 0 : options.server_url) !== null && _b !== void 0 ? _b : client._baseURL) !== null && _c !== void 0 ? _c : "",
|
|
22528
|
+
operation_id: "PingWebhook",
|
|
22529
|
+
o_auth2_scopes: null,
|
|
22530
|
+
resolved_security: requestSecurity,
|
|
22531
|
+
security_source: client._options.security,
|
|
22532
|
+
retry_config: (options === null || options === void 0 ? void 0 : options.retries)
|
|
22533
|
+
|| client._options.retry_config
|
|
22534
|
+
|| {
|
|
22535
|
+
strategy: "attempt-count-backoff",
|
|
22536
|
+
backoff: {
|
|
22537
|
+
initialInterval: 500,
|
|
22538
|
+
maxInterval: 8000,
|
|
22539
|
+
exponent: 2,
|
|
22540
|
+
maxElapsedTime: 30000,
|
|
22541
|
+
},
|
|
22542
|
+
retryConnectionErrors: true,
|
|
22543
|
+
maxRetries: 4,
|
|
22544
|
+
}
|
|
22545
|
+
|| { strategy: "none" },
|
|
22546
|
+
retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
|
|
22547
|
+
};
|
|
22548
|
+
const requestRes = client._createRequest(context, {
|
|
22549
|
+
security: requestSecurity,
|
|
22550
|
+
method: "POST",
|
|
22551
|
+
baseURL: options === null || options === void 0 ? void 0 : options.server_url,
|
|
22552
|
+
path: path,
|
|
22553
|
+
headers: headers,
|
|
22554
|
+
body: body$,
|
|
22555
|
+
userAgent: client._options.user_agent,
|
|
22556
|
+
timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
|
|
22557
|
+
}, options);
|
|
22558
|
+
if (!requestRes.ok) {
|
|
22559
|
+
return [requestRes, { status: "invalid" }];
|
|
22560
|
+
}
|
|
22561
|
+
const req = requestRes.value;
|
|
22562
|
+
const doResult = await client._do(req, {
|
|
22563
|
+
context,
|
|
22564
|
+
isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
|
|
22565
|
+
retryConfig: context.retry_config,
|
|
22566
|
+
retryCodes: context.retry_codes,
|
|
22567
|
+
});
|
|
22568
|
+
if (!doResult.ok) {
|
|
22569
|
+
return [doResult, { status: "request-error", request: req }];
|
|
22570
|
+
}
|
|
22571
|
+
const response = doResult.value;
|
|
22572
|
+
const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
|
|
22573
|
+
if (!result.ok) {
|
|
22574
|
+
return [result, { status: "complete", request: req, response }];
|
|
22575
|
+
}
|
|
22576
|
+
return [result, { status: "complete", request: req, response }];
|
|
22577
|
+
}
|
|
22578
|
+
|
|
22579
|
+
/**
|
|
22580
|
+
* @license
|
|
22581
|
+
* Copyright 2026 Google LLC
|
|
22582
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
22583
|
+
*
|
|
22584
|
+
* g3-prettier-ignore-file
|
|
22585
|
+
*/
|
|
22586
|
+
/**
|
|
22587
|
+
* Generates a new signing secret for a Webhook.
|
|
22588
|
+
*/
|
|
22589
|
+
function webhooksRotateSigningSecret(client, id, api_version, body, options) {
|
|
22590
|
+
return new APIPromise($do$1(client, id, api_version, body, options));
|
|
22591
|
+
}
|
|
22592
|
+
async function $do$1(client, id, api_version, body, options) {
|
|
22593
|
+
var _a, _b, _c;
|
|
22594
|
+
const input = {
|
|
22595
|
+
id: id,
|
|
22596
|
+
api_version: api_version,
|
|
22597
|
+
body: body,
|
|
22598
|
+
};
|
|
22599
|
+
const payload = input;
|
|
22600
|
+
const body$ = encodeJSON("body", payload.body, { explode: true });
|
|
22601
|
+
const pathParams = {
|
|
22602
|
+
api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
|
|
22603
|
+
id: encodeSimple("id", payload.id, {
|
|
22604
|
+
explode: false,
|
|
22605
|
+
charEncoding: "percent",
|
|
22606
|
+
}),
|
|
22607
|
+
};
|
|
22608
|
+
const path = pathToFunc("/{api_version}/webhooks/{id}:rotateSigningSecret")(pathParams);
|
|
22609
|
+
const headers = new Headers(compactMap({
|
|
22610
|
+
"Content-Type": "application/json",
|
|
22611
|
+
Accept: "application/json",
|
|
22612
|
+
}));
|
|
22613
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
22614
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
22615
|
+
const context = {
|
|
22616
|
+
options: client._options,
|
|
22617
|
+
base_url: (_c = (_b = options === null || options === void 0 ? void 0 : options.server_url) !== null && _b !== void 0 ? _b : client._baseURL) !== null && _c !== void 0 ? _c : "",
|
|
22618
|
+
operation_id: "RotateSigningSecret",
|
|
22619
|
+
o_auth2_scopes: null,
|
|
22620
|
+
resolved_security: requestSecurity,
|
|
22621
|
+
security_source: client._options.security,
|
|
22622
|
+
retry_config: (options === null || options === void 0 ? void 0 : options.retries)
|
|
22623
|
+
|| client._options.retry_config
|
|
22624
|
+
|| {
|
|
22625
|
+
strategy: "attempt-count-backoff",
|
|
22626
|
+
backoff: {
|
|
22627
|
+
initialInterval: 500,
|
|
22628
|
+
maxInterval: 8000,
|
|
22629
|
+
exponent: 2,
|
|
22630
|
+
maxElapsedTime: 30000,
|
|
22631
|
+
},
|
|
22632
|
+
retryConnectionErrors: true,
|
|
22633
|
+
maxRetries: 4,
|
|
22634
|
+
}
|
|
22635
|
+
|| { strategy: "none" },
|
|
22636
|
+
retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
|
|
22637
|
+
};
|
|
22638
|
+
const requestRes = client._createRequest(context, {
|
|
22639
|
+
security: requestSecurity,
|
|
22640
|
+
method: "POST",
|
|
22641
|
+
baseURL: options === null || options === void 0 ? void 0 : options.server_url,
|
|
22642
|
+
path: path,
|
|
22643
|
+
headers: headers,
|
|
22644
|
+
body: body$,
|
|
22645
|
+
userAgent: client._options.user_agent,
|
|
22646
|
+
timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
|
|
22647
|
+
}, options);
|
|
22648
|
+
if (!requestRes.ok) {
|
|
22649
|
+
return [requestRes, { status: "invalid" }];
|
|
22650
|
+
}
|
|
22651
|
+
const req = requestRes.value;
|
|
22652
|
+
const doResult = await client._do(req, {
|
|
22653
|
+
context,
|
|
22654
|
+
isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
|
|
22655
|
+
retryConfig: context.retry_config,
|
|
22656
|
+
retryCodes: context.retry_codes,
|
|
22657
|
+
});
|
|
22658
|
+
if (!doResult.ok) {
|
|
22659
|
+
return [doResult, { status: "request-error", request: req }];
|
|
22660
|
+
}
|
|
22661
|
+
const response = doResult.value;
|
|
22662
|
+
const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
|
|
22663
|
+
if (!result.ok) {
|
|
22664
|
+
return [result, { status: "complete", request: req, response }];
|
|
22665
|
+
}
|
|
22666
|
+
return [result, { status: "complete", request: req, response }];
|
|
22667
|
+
}
|
|
22668
|
+
|
|
22669
|
+
/**
|
|
22670
|
+
* @license
|
|
22671
|
+
* Copyright 2026 Google LLC
|
|
22672
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
22673
|
+
*
|
|
22674
|
+
* g3-prettier-ignore-file
|
|
22675
|
+
*/
|
|
22676
|
+
/**
|
|
22677
|
+
* Updates an existing Webhook.
|
|
22678
|
+
*/
|
|
22679
|
+
function webhooksUpdate(client, id, api_version, update_mask, body, options) {
|
|
22680
|
+
return new APIPromise($do(client, id, api_version, update_mask, body, options));
|
|
22681
|
+
}
|
|
22682
|
+
async function $do(client, id, api_version, update_mask, body, options) {
|
|
22683
|
+
var _a, _b, _c;
|
|
22684
|
+
const input = {
|
|
22685
|
+
id: id,
|
|
22686
|
+
api_version: api_version,
|
|
22687
|
+
update_mask: update_mask,
|
|
22688
|
+
body: body,
|
|
22689
|
+
};
|
|
22690
|
+
const payload = input;
|
|
22691
|
+
const body$ = encodeJSON("body", payload.body, { explode: true });
|
|
22692
|
+
const pathParams = {
|
|
22693
|
+
api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
|
|
22694
|
+
id: encodeSimple("id", payload.id, {
|
|
22695
|
+
explode: false,
|
|
22696
|
+
charEncoding: "percent",
|
|
22697
|
+
}),
|
|
22698
|
+
};
|
|
22699
|
+
const path = pathToFunc("/{api_version}/webhooks/{id}")(pathParams);
|
|
22700
|
+
const query = encodeFormQuery({
|
|
22701
|
+
"update_mask": payload.update_mask,
|
|
22702
|
+
});
|
|
22703
|
+
const headers = new Headers(compactMap({
|
|
22704
|
+
"Content-Type": "application/json",
|
|
22705
|
+
Accept: "application/json",
|
|
22706
|
+
}));
|
|
22707
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
22708
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
22709
|
+
const context = {
|
|
22710
|
+
options: client._options,
|
|
22711
|
+
base_url: (_c = (_b = options === null || options === void 0 ? void 0 : options.server_url) !== null && _b !== void 0 ? _b : client._baseURL) !== null && _c !== void 0 ? _c : "",
|
|
22712
|
+
operation_id: "UpdateWebhook",
|
|
22713
|
+
o_auth2_scopes: null,
|
|
22714
|
+
resolved_security: requestSecurity,
|
|
22715
|
+
security_source: client._options.security,
|
|
22716
|
+
retry_config: (options === null || options === void 0 ? void 0 : options.retries)
|
|
22717
|
+
|| client._options.retry_config
|
|
22718
|
+
|| {
|
|
22719
|
+
strategy: "attempt-count-backoff",
|
|
22720
|
+
backoff: {
|
|
22721
|
+
initialInterval: 500,
|
|
22722
|
+
maxInterval: 8000,
|
|
22723
|
+
exponent: 2,
|
|
22724
|
+
maxElapsedTime: 30000,
|
|
22725
|
+
},
|
|
22726
|
+
retryConnectionErrors: true,
|
|
22727
|
+
maxRetries: 4,
|
|
22728
|
+
}
|
|
22729
|
+
|| { strategy: "none" },
|
|
22730
|
+
retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
|
|
22731
|
+
};
|
|
22732
|
+
const requestRes = client._createRequest(context, {
|
|
22733
|
+
security: requestSecurity,
|
|
22734
|
+
method: "PATCH",
|
|
22735
|
+
baseURL: options === null || options === void 0 ? void 0 : options.server_url,
|
|
22736
|
+
path: path,
|
|
22737
|
+
headers: headers,
|
|
22738
|
+
query: query,
|
|
22739
|
+
body: body$,
|
|
22740
|
+
userAgent: client._options.user_agent,
|
|
22741
|
+
timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
|
|
22742
|
+
}, options);
|
|
22743
|
+
if (!requestRes.ok) {
|
|
22744
|
+
return [requestRes, { status: "invalid" }];
|
|
22745
|
+
}
|
|
22746
|
+
const req = requestRes.value;
|
|
22747
|
+
const doResult = await client._do(req, {
|
|
22748
|
+
context,
|
|
22749
|
+
isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
|
|
22750
|
+
retryConfig: context.retry_config,
|
|
22751
|
+
retryCodes: context.retry_codes,
|
|
22752
|
+
});
|
|
22753
|
+
if (!doResult.ok) {
|
|
22754
|
+
return [doResult, { status: "request-error", request: req }];
|
|
22755
|
+
}
|
|
22756
|
+
const response = doResult.value;
|
|
22757
|
+
const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
|
|
22758
|
+
if (!result.ok) {
|
|
22759
|
+
return [result, { status: "complete", request: req, response }];
|
|
22760
|
+
}
|
|
22761
|
+
return [result, { status: "complete", request: req, response }];
|
|
22762
|
+
}
|
|
22763
|
+
|
|
22764
|
+
/**
|
|
22765
|
+
* @license
|
|
22766
|
+
* Copyright 2026 Google LLC
|
|
22767
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
22768
|
+
*
|
|
22769
|
+
* g3-prettier-ignore-file
|
|
22770
|
+
*/
|
|
22771
|
+
class Webhooks extends ClientSDK {
|
|
22772
|
+
/**
|
|
22773
|
+
* Creates a new Webhook.
|
|
22774
|
+
*/
|
|
22775
|
+
create(params, options) {
|
|
22776
|
+
const { api_version } = params, body = __rest(params, ["api_version"]);
|
|
22777
|
+
return unwrapAsAPIPromise(webhooksCreate(this, body, api_version, options));
|
|
22778
|
+
}
|
|
22779
|
+
/**
|
|
22780
|
+
* Lists all Webhooks.
|
|
22781
|
+
*/
|
|
22782
|
+
list(params, options) {
|
|
22783
|
+
return unwrapAsAPIPromise(webhooksList(this, params === null || params === void 0 ? void 0 : params.api_version, params === null || params === void 0 ? void 0 : params.page_size, params === null || params === void 0 ? void 0 : params.page_token, options));
|
|
22784
|
+
}
|
|
22785
|
+
/**
|
|
22786
|
+
* Gets a specific Webhook.
|
|
22787
|
+
*/
|
|
22788
|
+
get(id, params, options) {
|
|
22789
|
+
return unwrapAsAPIPromise(webhooksGet(this, id, params === null || params === void 0 ? void 0 : params.api_version, options));
|
|
22790
|
+
}
|
|
22791
|
+
/**
|
|
22792
|
+
* Updates an existing Webhook.
|
|
22793
|
+
*/
|
|
22794
|
+
update(id, params, options) {
|
|
22795
|
+
const _a = params !== null && params !== void 0 ? params : {}, { api_version, update_mask } = _a, body$body = __rest(_a, ["api_version", "update_mask"]);
|
|
22796
|
+
const body = params === undefined || Object.keys(body$body).length === 0
|
|
22797
|
+
? undefined
|
|
22798
|
+
: body$body;
|
|
22799
|
+
return unwrapAsAPIPromise(webhooksUpdate(this, id, api_version, update_mask, body, options));
|
|
22800
|
+
}
|
|
22801
|
+
/**
|
|
22802
|
+
* Deletes a Webhook.
|
|
22803
|
+
*/
|
|
22804
|
+
delete(id, params, options) {
|
|
22805
|
+
return unwrapAsAPIPromise(webhooksDelete(this, id, params === null || params === void 0 ? void 0 : params.api_version, options));
|
|
22806
|
+
}
|
|
22807
|
+
/**
|
|
22808
|
+
* Generates a new signing secret for a Webhook.
|
|
22809
|
+
*/
|
|
22810
|
+
rotateSigningSecret(id, api_version, body, options) {
|
|
22811
|
+
return unwrapAsAPIPromise(webhooksRotateSigningSecret(this, id, api_version, body, options));
|
|
22812
|
+
}
|
|
22813
|
+
/**
|
|
22814
|
+
* Sends a ping event to a Webhook.
|
|
22815
|
+
*/
|
|
22816
|
+
ping(id, api_version, body, options) {
|
|
22817
|
+
return unwrapAsAPIPromise(webhooksPing(this, id, api_version, body, options));
|
|
22818
|
+
}
|
|
22819
|
+
}
|
|
22820
|
+
|
|
22821
|
+
/**
|
|
22822
|
+
* @license
|
|
22823
|
+
* Copyright 2026 Google LLC
|
|
22824
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
22825
|
+
*
|
|
22826
|
+
* g3-prettier-ignore-file
|
|
22827
|
+
*/
|
|
22828
|
+
/*
|
|
22829
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
22830
|
+
*/
|
|
22831
|
+
let GoogleGenAI$1 = class GoogleGenAI extends ClientSDK {
|
|
22832
|
+
get interactions() {
|
|
22833
|
+
var _a;
|
|
22834
|
+
return ((_a = this._interactions) !== null && _a !== void 0 ? _a : (this._interactions = new Interactions(this._options)));
|
|
22835
|
+
}
|
|
22836
|
+
get webhooks() {
|
|
22837
|
+
var _a;
|
|
22838
|
+
return ((_a = this._webhooks) !== null && _a !== void 0 ? _a : (this._webhooks = new Webhooks(this._options)));
|
|
22839
|
+
}
|
|
22840
|
+
get agents() {
|
|
22841
|
+
var _a;
|
|
22842
|
+
return ((_a = this._agents) !== null && _a !== void 0 ? _a : (this._agents = new Agents(this._options)));
|
|
22843
|
+
}
|
|
22844
|
+
get triggers() {
|
|
22845
|
+
var _a;
|
|
22846
|
+
return ((_a = this._triggers) !== null && _a !== void 0 ? _a : (this._triggers = new Triggers(this._options)));
|
|
22847
|
+
}
|
|
22848
|
+
};
|
|
22849
|
+
|
|
22850
|
+
/**
|
|
22851
|
+
* @license
|
|
22852
|
+
* Copyright 2026 Google LLC
|
|
22853
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
22854
|
+
*
|
|
22855
|
+
* g3-prettier-ignore-file
|
|
22856
|
+
*/
|
|
22857
|
+
const LEGACY_LYRIA_MODELS = new Set([
|
|
22858
|
+
"lyria-3-pro-preview",
|
|
22859
|
+
"lyria-3-clip-preview",
|
|
22860
|
+
]);
|
|
22861
|
+
function getGoogleGenAIServerURL(parentClient) {
|
|
22862
|
+
const serverURL = parentClient.getBaseUrl();
|
|
22863
|
+
if (!serverURL) {
|
|
22864
|
+
throw new Error("Base URL must be set.");
|
|
22865
|
+
}
|
|
22866
|
+
return serverURL.replace(/\/+$/, "");
|
|
22867
|
+
}
|
|
22868
|
+
function getGoogleGenAIAPIVersion(parentClient) {
|
|
22869
|
+
const apiVersion = trimSlashes(parentClient.getApiVersion());
|
|
22870
|
+
const project = parentClient.getProject();
|
|
22871
|
+
const location = parentClient.getLocation();
|
|
22872
|
+
if (parentClient.isVertexAI() && apiVersion && project && location) {
|
|
22873
|
+
return (`${apiVersion}/projects/${encodeURIComponent(project)}` +
|
|
22874
|
+
`/locations/${encodeURIComponent(location)}`);
|
|
22875
|
+
}
|
|
22876
|
+
return apiVersion;
|
|
22877
|
+
}
|
|
22878
|
+
function buildGoogleGenAIClient(parentClient, options = {}) {
|
|
22879
|
+
var _a, _b, _c, _d, _e;
|
|
22880
|
+
const sdk = new GoogleGenAI$1(Object.assign(Object.assign({}, options), { api_version: (_a = options.api_version) !== null && _a !== void 0 ? _a : getGoogleGenAIAPIVersion(parentClient), security: (_b = options.security) !== null && _b !== void 0 ? _b : new GoogleGenAISecurityProvider({
|
|
22881
|
+
defaultHeaders: Object.assign(Object.assign({}, (_c = parentClient.getDefaultHeaders) === null || _c === void 0 ? void 0 : _c.call(parentClient)), (_d = parentClient.getHeaders) === null || _d === void 0 ? void 0 : _d.call(parentClient)),
|
|
21830
22882
|
getAuthHeaders: (url) => parentClient.getAuthHeaders(url),
|
|
21831
|
-
}), server_url: (
|
|
22883
|
+
}), server_url: (_e = options.server_url) !== null && _e !== void 0 ? _e : getGoogleGenAIServerURL(parentClient) }));
|
|
21832
22884
|
return sdk;
|
|
21833
22885
|
}
|
|
21834
22886
|
class GeminiNextGenInteractions {
|
|
@@ -21935,6 +22987,46 @@ class GeminiNextGenWebhooks {
|
|
|
21935
22987
|
return this.sdk;
|
|
21936
22988
|
}
|
|
21937
22989
|
}
|
|
22990
|
+
class GeminiNextGenTriggers {
|
|
22991
|
+
constructor(parentClient) {
|
|
22992
|
+
this.parentClient = parentClient;
|
|
22993
|
+
}
|
|
22994
|
+
async create(params, options) {
|
|
22995
|
+
const { api_version } = params, body = __rest(params, ["api_version"]);
|
|
22996
|
+
return unwrapWithSdkHttpResponse(triggersCreate(this.getClient(api_version), body, api_version, toGoogleGenAIRequestOptions(options)));
|
|
22997
|
+
}
|
|
22998
|
+
async list(params = {}, options) {
|
|
22999
|
+
const { api_version, filter, pageSize, pageToken } = params !== null && params !== void 0 ? params : {};
|
|
23000
|
+
return unwrapWithSdkHttpResponse(triggersList(this.getClient(api_version), api_version, filter, pageSize, pageToken, toGoogleGenAIRequestOptions(options)));
|
|
23001
|
+
}
|
|
23002
|
+
async get(id, params = {}, options) {
|
|
23003
|
+
return unwrapWithSdkHttpResponse(triggersGet(this.getClient(params === null || params === void 0 ? void 0 : params.api_version), id, params === null || params === void 0 ? void 0 : params.api_version, toGoogleGenAIRequestOptions(options)));
|
|
23004
|
+
}
|
|
23005
|
+
async update(id, params, options) {
|
|
23006
|
+
const { api_version } = params, body = __rest(params, ["api_version"]);
|
|
23007
|
+
return unwrapWithSdkHttpResponse(triggersUpdate(this.getClient(api_version), id, body, api_version, toGoogleGenAIRequestOptions(options)));
|
|
23008
|
+
}
|
|
23009
|
+
async delete(id, params = {}, options) {
|
|
23010
|
+
return unwrapWithSdkHttpResponse(triggersDelete(this.getClient(params === null || params === void 0 ? void 0 : params.api_version), id, params === null || params === void 0 ? void 0 : params.api_version, toGoogleGenAIRequestOptions(options)));
|
|
23011
|
+
}
|
|
23012
|
+
async run(trigger_id, params = {}, options) {
|
|
23013
|
+
return unwrapWithSdkHttpResponse(triggersRun(this.getClient(params === null || params === void 0 ? void 0 : params.api_version), trigger_id, params === null || params === void 0 ? void 0 : params.api_version, toGoogleGenAIRequestOptions(options)));
|
|
23014
|
+
}
|
|
23015
|
+
async listExecutions(trigger_id, params = {}, options) {
|
|
23016
|
+
const { api_version, pageSize, pageToken } = params !== null && params !== void 0 ? params : {};
|
|
23017
|
+
return unwrapWithSdkHttpResponse(triggersListExecutions(this.getClient(api_version), trigger_id, api_version, pageSize, pageToken, toGoogleGenAIRequestOptions(options)));
|
|
23018
|
+
}
|
|
23019
|
+
getClient(apiVersion) {
|
|
23020
|
+
var _a;
|
|
23021
|
+
if (apiVersion) {
|
|
23022
|
+
return buildGoogleGenAIClient(this.parentClient, {
|
|
23023
|
+
api_version: apiVersion,
|
|
23024
|
+
});
|
|
23025
|
+
}
|
|
23026
|
+
(_a = this.sdk) !== null && _a !== void 0 ? _a : (this.sdk = buildGoogleGenAIClient(this.parentClient));
|
|
23027
|
+
return this.sdk;
|
|
23028
|
+
}
|
|
23029
|
+
}
|
|
21938
23030
|
function trimSlashes(value) {
|
|
21939
23031
|
return value.replace(/^\/+|\/+$/g, "");
|
|
21940
23032
|
}
|
|
@@ -22984,6 +24076,18 @@ function generationConfigFromVertex(fromObject, _rootObject) {
|
|
|
22984
24076
|
if (fromTopP != null) {
|
|
22985
24077
|
setValueByPath(toObject, ['topP'], fromTopP);
|
|
22986
24078
|
}
|
|
24079
|
+
const fromResponseFormat = getValueByPath(fromObject, [
|
|
24080
|
+
'responseFormat',
|
|
24081
|
+
]);
|
|
24082
|
+
if (fromResponseFormat != null) {
|
|
24083
|
+
let transformedList = fromResponseFormat;
|
|
24084
|
+
if (Array.isArray(transformedList)) {
|
|
24085
|
+
transformedList = transformedList.map((item) => {
|
|
24086
|
+
return item;
|
|
24087
|
+
});
|
|
24088
|
+
}
|
|
24089
|
+
setValueByPath(toObject, ['responseFormat'], transformedList);
|
|
24090
|
+
}
|
|
22987
24091
|
return toObject;
|
|
22988
24092
|
}
|
|
22989
24093
|
function getTuningJobParametersToMldev(fromObject, _rootObject) {
|
|
@@ -24233,6 +25337,14 @@ class GoogleGenAI {
|
|
|
24233
25337
|
this._agents = new GeminiNextGenAgents(this.apiClient);
|
|
24234
25338
|
return this._agents;
|
|
24235
25339
|
}
|
|
25340
|
+
get triggers() {
|
|
25341
|
+
if (this._triggers !== undefined) {
|
|
25342
|
+
return this._triggers;
|
|
25343
|
+
}
|
|
25344
|
+
console.warn('GoogleGenAI.triggers: Triggers usage is experimental and may change in future versions.');
|
|
25345
|
+
this._triggers = new GeminiNextGenTriggers(this.apiClient);
|
|
25346
|
+
return this._triggers;
|
|
25347
|
+
}
|
|
24236
25348
|
constructor(options) {
|
|
24237
25349
|
var _a;
|
|
24238
25350
|
if (options.apiKey == null) {
|
|
@@ -24281,5 +25393,5 @@ class GoogleGenAI {
|
|
|
24281
25393
|
}
|
|
24282
25394
|
}
|
|
24283
25395
|
|
|
24284
|
-
export { ActivityHandling, AdapterSize, AggregationMetric, ApiError, ApiSpec, AuthType, Batches, Behavior, BlockedReason, Caches, CancelTuningJobResponse, Chat, Chats, ComputeTokensResponse, ContentReferenceImage, ControlReferenceImage, ControlReferenceType, CountTokensResponse, CreateFileResponse, DeleteCachedContentResponse, DeleteFileResponse, DeleteModelResponse, DocumentState, DynamicRetrievalConfigMode, EditImageResponse, EditMode, EmbedContentResponse, EmbeddingApiType, EndSensitivity, Environment, EvaluateDatasetResponse, FeatureSelectionPreference, FileSource, FileState, Files, FinishReason, FunctionCallingConfigMode, FunctionResponse, FunctionResponseBlob, FunctionResponseFileData, FunctionResponsePart, FunctionResponseScheduling, GenerateContentResponse, GenerateContentResponsePromptFeedback, GenerateContentResponseUsageMetadata, GenerateImagesResponse, GenerateVideosOperation, GenerateVideosResponse, GoogleGenAI, HarmBlockMethod, HarmBlockThreshold, HarmCategory, HarmProbability, HarmSeverity, HttpElementLocation, HttpResponse, ImagePromptLanguage, ImageResizeMode, ImportFileOperation, ImportFileResponse, InlinedEmbedContentResponse, InlinedResponse, JobState, Language, ListBatchJobsResponse, ListCachedContentsResponse, ListDocumentsResponse, ListFileSearchStoresResponse, ListFilesResponse, ListModelsResponse, ListTuningJobsResponse, Live, LiveClientToolResponse, LiveMusicPlaybackControl, LiveMusicServerMessage, LiveSendToolResponseParameters, LiveServerMessage, MaskReferenceImage, MaskReferenceMode, MatchOperation, MediaModality, MediaResolution, Modality, ModelStage, Models, MusicGenerationMode, Operations, Outcome, PagedItem, Pager, PairwiseChoice, PartMediaResolutionLevel, PersonGeneration, PhishBlockThreshold, ProminentPeople, RawReferenceImage, RecontextImageResponse, RegisterFilesResponse, ReinforcementTuningAutoraterScorerParsedResponseConversionScorer, ReinforcementTuningParseResponseConfig, ReinforcementTuningThinkingLevel, ReplayResponse, ResourceScope, ResponseParseType, SafetyFilterLevel, SafetyPolicy, Scale, SegmentImageResponse, SegmentMode, ServiceTier, Session, SingleEmbedContentResponse, StartSensitivity, StyleReferenceImage, SubjectReferenceImage, SubjectReferenceType, ThinkingLevel, Tokens, ToolResponse, ToolType, TrafficType, TuningJobState, TuningMethod, TuningMode, TuningSpeed, TuningTask, TurnCompleteReason, TurnCoverage, Type, UploadToFileSearchStoreOperation, UploadToFileSearchStoreResponse, UploadToFileSearchStoreResumableResponse, UpscaleImageResponse, UrlRetrievalStatus, VadSignalType, ValidateRewardResponse, VideoCompressionQuality, VideoGenerationMaskMode, VideoGenerationReferenceType, VideoOrientation, VoiceActivityType, createFunctionResponsePartFromBase64, createFunctionResponsePartFromUri, createModelContent, createPartFromBase64, createPartFromCodeExecutionResult, createPartFromExecutableCode, createPartFromFunctionCall, createPartFromFunctionResponse, createPartFromText, createPartFromUri, createUserContent, mcpToTool, setDefaultBaseUrls };
|
|
25396
|
+
export { ActivityHandling, AdapterSize, AggregationMetric, ApiError, ApiSpec, AspectRatio, AudioResponseFormat, AuthType, Batches, Behavior, BlockedReason, Caches, CancelTuningJobResponse, Chat, Chats, ComputeTokensResponse, ContentReferenceImage, ControlReferenceImage, ControlReferenceType, CountTokensResponse, CreateFileResponse, DeleteCachedContentResponse, DeleteFileResponse, DeleteModelResponse, Delivery, DocumentState, DynamicRetrievalConfigMode, EditImageResponse, EditMode, EmbedContentResponse, EmbeddingApiType, EndSensitivity, Environment, EvaluateDatasetResponse, FeatureSelectionPreference, FileSource, FileState, Files, FinishReason, FunctionCallingConfigMode, FunctionResponse, FunctionResponseBlob, FunctionResponseFileData, FunctionResponsePart, FunctionResponseScheduling, GenerateContentResponse, GenerateContentResponsePromptFeedback, GenerateContentResponseUsageMetadata, GenerateImagesResponse, GenerateVideosOperation, GenerateVideosResponse, GoogleGenAI, HarmBlockMethod, HarmBlockThreshold, HarmCategory, HarmProbability, HarmSeverity, HttpElementLocation, HttpResponse, ImagePromptLanguage, ImageResizeMode, ImageResponseFormat, ImageSize, ImportFileOperation, ImportFileResponse, InlinedEmbedContentResponse, InlinedResponse, JobState, Language, ListBatchJobsResponse, ListCachedContentsResponse, ListDocumentsResponse, ListFileSearchStoresResponse, ListFilesResponse, ListModelsResponse, ListTuningJobsResponse, Live, LiveClientToolResponse, LiveMusicPlaybackControl, LiveMusicServerMessage, LiveSendToolResponseParameters, LiveServerMessage, MaskReferenceImage, MaskReferenceMode, MatchOperation, MediaModality, MediaResolution, Modality, ModelStage, Models, MusicGenerationMode, Operations, Outcome, PagedItem, Pager, PairwiseChoice, PartMediaResolutionLevel, PersonGeneration, PhishBlockThreshold, ProminentPeople, RawReferenceImage, RecontextImageResponse, RegisterFilesResponse, ReinforcementTuningAutoraterScorerParsedResponseConversionScorer, ReinforcementTuningParseResponseConfig, ReinforcementTuningThinkingLevel, ReplayResponse, ResourceScope, ResponseFormat, ResponseParseType, SafetyFilterLevel, SafetyPolicy, Scale, SegmentImageResponse, SegmentMode, ServiceTier, Session, SingleEmbedContentResponse, StartSensitivity, StyleReferenceImage, SubjectReferenceImage, SubjectReferenceType, TextResponseFormat, ThinkingLevel, Tokens, ToolResponse, ToolType, TrafficType, TuningJobState, TuningMethod, TuningMode, TuningSpeed, TuningTask, TurnCompleteReason, TurnCoverage, Type, UploadToFileSearchStoreOperation, UploadToFileSearchStoreResponse, UploadToFileSearchStoreResumableResponse, UpscaleImageResponse, UrlRetrievalStatus, VadSignalType, ValidateRewardResponse, VideoCompressionQuality, VideoGenerationMaskMode, VideoGenerationReferenceType, VideoOrientation, VideoResponseFormat, VoiceActivityType, createFunctionResponsePartFromBase64, createFunctionResponsePartFromUri, createModelContent, createPartFromBase64, createPartFromCodeExecutionResult, createPartFromExecutableCode, createPartFromFunctionCall, createPartFromFunctionResponse, createPartFromText, createPartFromUri, createUserContent, mcpToTool, setDefaultBaseUrls };
|
|
24285
25397
|
//# sourceMappingURL=index.mjs.map
|