@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/node/index.mjs
CHANGED
|
@@ -840,7 +840,7 @@ var PhishBlockThreshold;
|
|
|
840
840
|
*/
|
|
841
841
|
PhishBlockThreshold["BLOCK_ONLY_EXTREMELY_HIGH"] = "BLOCK_ONLY_EXTREMELY_HIGH";
|
|
842
842
|
})(PhishBlockThreshold || (PhishBlockThreshold = {}));
|
|
843
|
-
/** Specifies the function Behavior.
|
|
843
|
+
/** 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. */
|
|
844
844
|
var Behavior;
|
|
845
845
|
(function (Behavior) {
|
|
846
846
|
/**
|
|
@@ -1354,6 +1354,110 @@ var Modality;
|
|
|
1354
1354
|
*/
|
|
1355
1355
|
Modality["VIDEO"] = "VIDEO";
|
|
1356
1356
|
})(Modality || (Modality = {}));
|
|
1357
|
+
/** Delivery mode for the generated content. */
|
|
1358
|
+
var Delivery;
|
|
1359
|
+
(function (Delivery) {
|
|
1360
|
+
/**
|
|
1361
|
+
* Default value. This value is unused.
|
|
1362
|
+
*/
|
|
1363
|
+
Delivery["DELIVERY_UNSPECIFIED"] = "DELIVERY_UNSPECIFIED";
|
|
1364
|
+
/**
|
|
1365
|
+
* Generated bytes are returned inline in the response.
|
|
1366
|
+
*/
|
|
1367
|
+
Delivery["INLINE"] = "INLINE";
|
|
1368
|
+
/**
|
|
1369
|
+
* Generated content is stored and a URI is returned.
|
|
1370
|
+
*/
|
|
1371
|
+
Delivery["URI"] = "URI";
|
|
1372
|
+
})(Delivery || (Delivery = {}));
|
|
1373
|
+
/** The aspect ratio for the image output. */
|
|
1374
|
+
var AspectRatio;
|
|
1375
|
+
(function (AspectRatio) {
|
|
1376
|
+
/**
|
|
1377
|
+
* Default value. This value is unused.
|
|
1378
|
+
*/
|
|
1379
|
+
AspectRatio["ASPECT_RATIO_UNSPECIFIED"] = "ASPECT_RATIO_UNSPECIFIED";
|
|
1380
|
+
/**
|
|
1381
|
+
* 1:1 aspect ratio.
|
|
1382
|
+
*/
|
|
1383
|
+
AspectRatio["ASPECT_RATIO_ONE_BY_ONE"] = "ASPECT_RATIO_ONE_BY_ONE";
|
|
1384
|
+
/**
|
|
1385
|
+
* 2:3 aspect ratio.
|
|
1386
|
+
*/
|
|
1387
|
+
AspectRatio["ASPECT_RATIO_TWO_BY_THREE"] = "ASPECT_RATIO_TWO_BY_THREE";
|
|
1388
|
+
/**
|
|
1389
|
+
* 3:2 aspect ratio.
|
|
1390
|
+
*/
|
|
1391
|
+
AspectRatio["ASPECT_RATIO_THREE_BY_TWO"] = "ASPECT_RATIO_THREE_BY_TWO";
|
|
1392
|
+
/**
|
|
1393
|
+
* 3:4 aspect ratio.
|
|
1394
|
+
*/
|
|
1395
|
+
AspectRatio["ASPECT_RATIO_THREE_BY_FOUR"] = "ASPECT_RATIO_THREE_BY_FOUR";
|
|
1396
|
+
/**
|
|
1397
|
+
* 4:3 aspect ratio.
|
|
1398
|
+
*/
|
|
1399
|
+
AspectRatio["ASPECT_RATIO_FOUR_BY_THREE"] = "ASPECT_RATIO_FOUR_BY_THREE";
|
|
1400
|
+
/**
|
|
1401
|
+
* 4:5 aspect ratio.
|
|
1402
|
+
*/
|
|
1403
|
+
AspectRatio["ASPECT_RATIO_FOUR_BY_FIVE"] = "ASPECT_RATIO_FOUR_BY_FIVE";
|
|
1404
|
+
/**
|
|
1405
|
+
* 5:4 aspect ratio.
|
|
1406
|
+
*/
|
|
1407
|
+
AspectRatio["ASPECT_RATIO_FIVE_BY_FOUR"] = "ASPECT_RATIO_FIVE_BY_FOUR";
|
|
1408
|
+
/**
|
|
1409
|
+
* 9:16 aspect ratio.
|
|
1410
|
+
*/
|
|
1411
|
+
AspectRatio["ASPECT_RATIO_NINE_BY_SIXTEEN"] = "ASPECT_RATIO_NINE_BY_SIXTEEN";
|
|
1412
|
+
/**
|
|
1413
|
+
* 16:9 aspect ratio.
|
|
1414
|
+
*/
|
|
1415
|
+
AspectRatio["ASPECT_RATIO_SIXTEEN_BY_NINE"] = "ASPECT_RATIO_SIXTEEN_BY_NINE";
|
|
1416
|
+
/**
|
|
1417
|
+
* 21:9 aspect ratio.
|
|
1418
|
+
*/
|
|
1419
|
+
AspectRatio["ASPECT_RATIO_TWENTY_ONE_BY_NINE"] = "ASPECT_RATIO_TWENTY_ONE_BY_NINE";
|
|
1420
|
+
/**
|
|
1421
|
+
* 1:8 aspect ratio.
|
|
1422
|
+
*/
|
|
1423
|
+
AspectRatio["ASPECT_RATIO_ONE_BY_EIGHT"] = "ASPECT_RATIO_ONE_BY_EIGHT";
|
|
1424
|
+
/**
|
|
1425
|
+
* 8:1 aspect ratio.
|
|
1426
|
+
*/
|
|
1427
|
+
AspectRatio["ASPECT_RATIO_EIGHT_BY_ONE"] = "ASPECT_RATIO_EIGHT_BY_ONE";
|
|
1428
|
+
/**
|
|
1429
|
+
* 1:4 aspect ratio.
|
|
1430
|
+
*/
|
|
1431
|
+
AspectRatio["ASPECT_RATIO_ONE_BY_FOUR"] = "ASPECT_RATIO_ONE_BY_FOUR";
|
|
1432
|
+
/**
|
|
1433
|
+
* 4:1 aspect ratio.
|
|
1434
|
+
*/
|
|
1435
|
+
AspectRatio["ASPECT_RATIO_FOUR_BY_ONE"] = "ASPECT_RATIO_FOUR_BY_ONE";
|
|
1436
|
+
})(AspectRatio || (AspectRatio = {}));
|
|
1437
|
+
/** The size of the image output. */
|
|
1438
|
+
var ImageSize;
|
|
1439
|
+
(function (ImageSize) {
|
|
1440
|
+
/**
|
|
1441
|
+
* Default value. This value is unused.
|
|
1442
|
+
*/
|
|
1443
|
+
ImageSize["IMAGE_SIZE_UNSPECIFIED"] = "IMAGE_SIZE_UNSPECIFIED";
|
|
1444
|
+
/**
|
|
1445
|
+
* 512px image size.
|
|
1446
|
+
*/
|
|
1447
|
+
ImageSize["IMAGE_SIZE_FIVE_TWELVE"] = "IMAGE_SIZE_FIVE_TWELVE";
|
|
1448
|
+
/**
|
|
1449
|
+
* 1K image size.
|
|
1450
|
+
*/
|
|
1451
|
+
ImageSize["IMAGE_SIZE_ONE_K"] = "IMAGE_SIZE_ONE_K";
|
|
1452
|
+
/**
|
|
1453
|
+
* 2K image size.
|
|
1454
|
+
*/
|
|
1455
|
+
ImageSize["IMAGE_SIZE_TWO_K"] = "IMAGE_SIZE_TWO_K";
|
|
1456
|
+
/**
|
|
1457
|
+
* 4K image size.
|
|
1458
|
+
*/
|
|
1459
|
+
ImageSize["IMAGE_SIZE_FOUR_K"] = "IMAGE_SIZE_FOUR_K";
|
|
1460
|
+
})(ImageSize || (ImageSize = {}));
|
|
1357
1461
|
/** Tuning mode. This enum is not supported in Gemini API. */
|
|
1358
1462
|
var TuningMode;
|
|
1359
1463
|
(function (TuningMode) {
|
|
@@ -1402,6 +1506,58 @@ var AdapterSize;
|
|
|
1402
1506
|
*/
|
|
1403
1507
|
AdapterSize["ADAPTER_SIZE_THIRTY_TWO"] = "ADAPTER_SIZE_THIRTY_TWO";
|
|
1404
1508
|
})(AdapterSize || (AdapterSize = {}));
|
|
1509
|
+
/** Defines the type for parsing sample response. This enum is not supported in Gemini API. */
|
|
1510
|
+
var ResponseParseType;
|
|
1511
|
+
(function (ResponseParseType) {
|
|
1512
|
+
/**
|
|
1513
|
+
* Default value. Fallback to IDENTITY
|
|
1514
|
+
*/
|
|
1515
|
+
ResponseParseType["RESPONSE_PARSE_TYPE_UNSPECIFIED"] = "RESPONSE_PARSE_TYPE_UNSPECIFIED";
|
|
1516
|
+
/**
|
|
1517
|
+
* Returns the sample response as is.
|
|
1518
|
+
*/
|
|
1519
|
+
ResponseParseType["IDENTITY"] = "IDENTITY";
|
|
1520
|
+
/**
|
|
1521
|
+
* 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.
|
|
1522
|
+
*/
|
|
1523
|
+
ResponseParseType["REGEX_EXTRACT"] = "REGEX_EXTRACT";
|
|
1524
|
+
})(ResponseParseType || (ResponseParseType = {}));
|
|
1525
|
+
/** Match operation to use for evaluating rewards. This enum is not supported in Gemini API. */
|
|
1526
|
+
var MatchOperation;
|
|
1527
|
+
(function (MatchOperation) {
|
|
1528
|
+
/**
|
|
1529
|
+
* Default value. A user error will be returned if not set.
|
|
1530
|
+
*/
|
|
1531
|
+
MatchOperation["MATCH_OPERATION_UNSPECIFIED"] = "MATCH_OPERATION_UNSPECIFIED";
|
|
1532
|
+
/**
|
|
1533
|
+
* Equivalent to [GoogleSQL](https://cloud.google.com/bigquery/docs/reference/standard-sql/string_functions#regexp_contains) `REGEX_CONTAINS(target, expression)`.
|
|
1534
|
+
*/
|
|
1535
|
+
MatchOperation["REGEX_CONTAINS"] = "REGEX_CONTAINS";
|
|
1536
|
+
/**
|
|
1537
|
+
* The match operation returns `true` if expression is a substring of the target.
|
|
1538
|
+
*/
|
|
1539
|
+
MatchOperation["PARTIAL_MATCH"] = "PARTIAL_MATCH";
|
|
1540
|
+
/**
|
|
1541
|
+
* The match operation returns `true` expression is an exact match of the target.
|
|
1542
|
+
*/
|
|
1543
|
+
MatchOperation["EXACT_MATCH"] = "EXACT_MATCH";
|
|
1544
|
+
})(MatchOperation || (MatchOperation = {}));
|
|
1545
|
+
/** Represents how much to think for the tuning job. */
|
|
1546
|
+
var ReinforcementTuningThinkingLevel;
|
|
1547
|
+
(function (ReinforcementTuningThinkingLevel) {
|
|
1548
|
+
/**
|
|
1549
|
+
* Unspecified thinking level.
|
|
1550
|
+
*/
|
|
1551
|
+
ReinforcementTuningThinkingLevel["REINFORCEMENT_TUNING_THINKING_LEVEL_UNSPECIFIED"] = "REINFORCEMENT_TUNING_THINKING_LEVEL_UNSPECIFIED";
|
|
1552
|
+
/**
|
|
1553
|
+
* Little to no thinking.
|
|
1554
|
+
*/
|
|
1555
|
+
ReinforcementTuningThinkingLevel["MINIMAL"] = "MINIMAL";
|
|
1556
|
+
/**
|
|
1557
|
+
* High thinking level.
|
|
1558
|
+
*/
|
|
1559
|
+
ReinforcementTuningThinkingLevel["HIGH"] = "HIGH";
|
|
1560
|
+
})(ReinforcementTuningThinkingLevel || (ReinforcementTuningThinkingLevel = {}));
|
|
1405
1561
|
/** Job state. */
|
|
1406
1562
|
var JobState;
|
|
1407
1563
|
(function (JobState) {
|
|
@@ -1886,58 +2042,6 @@ var ImageResizeMode;
|
|
|
1886
2042
|
*/
|
|
1887
2043
|
ImageResizeMode["PAD"] = "PAD";
|
|
1888
2044
|
})(ImageResizeMode || (ImageResizeMode = {}));
|
|
1889
|
-
/** Defines how to parse sample response. */
|
|
1890
|
-
var ResponseParseType;
|
|
1891
|
-
(function (ResponseParseType) {
|
|
1892
|
-
/**
|
|
1893
|
-
* Default value. This value is unused.
|
|
1894
|
-
*/
|
|
1895
|
-
ResponseParseType["RESPONSE_PARSE_TYPE_UNSPECIFIED"] = "RESPONSE_PARSE_TYPE_UNSPECIFIED";
|
|
1896
|
-
/**
|
|
1897
|
-
* Use the sample response as is.
|
|
1898
|
-
*/
|
|
1899
|
-
ResponseParseType["IDENTITY"] = "IDENTITY";
|
|
1900
|
-
/**
|
|
1901
|
-
* Use regex to extract the important part of sample response.
|
|
1902
|
-
*/
|
|
1903
|
-
ResponseParseType["REGEX_EXTRACT"] = "REGEX_EXTRACT";
|
|
1904
|
-
})(ResponseParseType || (ResponseParseType = {}));
|
|
1905
|
-
/** Match operation to use for evaluation. */
|
|
1906
|
-
var MatchOperation;
|
|
1907
|
-
(function (MatchOperation) {
|
|
1908
|
-
/**
|
|
1909
|
-
* Default value. This value is unused.
|
|
1910
|
-
*/
|
|
1911
|
-
MatchOperation["MATCH_OPERATION_UNSPECIFIED"] = "MATCH_OPERATION_UNSPECIFIED";
|
|
1912
|
-
/**
|
|
1913
|
-
* Equivalent to GoogleSQL `REGEX_CONTAINS(target, expression)`.
|
|
1914
|
-
*/
|
|
1915
|
-
MatchOperation["REGEX_CONTAINS"] = "REGEX_CONTAINS";
|
|
1916
|
-
/**
|
|
1917
|
-
* `expression` is a substring of target.
|
|
1918
|
-
*/
|
|
1919
|
-
MatchOperation["PARTIAL_MATCH"] = "PARTIAL_MATCH";
|
|
1920
|
-
/**
|
|
1921
|
-
* `expression` is an exact match of target.
|
|
1922
|
-
*/
|
|
1923
|
-
MatchOperation["EXACT_MATCH"] = "EXACT_MATCH";
|
|
1924
|
-
})(MatchOperation || (MatchOperation = {}));
|
|
1925
|
-
/** Represents how much to think for the tuning job. */
|
|
1926
|
-
var ReinforcementTuningThinkingLevel;
|
|
1927
|
-
(function (ReinforcementTuningThinkingLevel) {
|
|
1928
|
-
/**
|
|
1929
|
-
* Unspecified thinking level.
|
|
1930
|
-
*/
|
|
1931
|
-
ReinforcementTuningThinkingLevel["REINFORCEMENT_TUNING_THINKING_LEVEL_UNSPECIFIED"] = "REINFORCEMENT_TUNING_THINKING_LEVEL_UNSPECIFIED";
|
|
1932
|
-
/**
|
|
1933
|
-
* Little to no thinking.
|
|
1934
|
-
*/
|
|
1935
|
-
ReinforcementTuningThinkingLevel["MINIMAL"] = "MINIMAL";
|
|
1936
|
-
/**
|
|
1937
|
-
* High thinking level.
|
|
1938
|
-
*/
|
|
1939
|
-
ReinforcementTuningThinkingLevel["HIGH"] = "HIGH";
|
|
1940
|
-
})(ReinforcementTuningThinkingLevel || (ReinforcementTuningThinkingLevel = {}));
|
|
1941
2045
|
/** Enum representing the tuning method. */
|
|
1942
2046
|
var TuningMethod;
|
|
1943
2047
|
(function (TuningMethod) {
|
|
@@ -2734,6 +2838,21 @@ class ListModelsResponse {
|
|
|
2734
2838
|
}
|
|
2735
2839
|
class DeleteModelResponse {
|
|
2736
2840
|
}
|
|
2841
|
+
/** Configuration for audio-specific output formatting. */
|
|
2842
|
+
class AudioResponseFormat {
|
|
2843
|
+
}
|
|
2844
|
+
/** Configuration for image-specific output formatting. */
|
|
2845
|
+
class ImageResponseFormat {
|
|
2846
|
+
}
|
|
2847
|
+
/** Configuration for text-specific output formatting. */
|
|
2848
|
+
class TextResponseFormat {
|
|
2849
|
+
}
|
|
2850
|
+
/** Configuration for video-specific output formatting. This data type is not supported in Gemini API. */
|
|
2851
|
+
class VideoResponseFormat {
|
|
2852
|
+
}
|
|
2853
|
+
/** Configuration for the model to configure output formatting and delivery. This data type is not supported in Gemini API. */
|
|
2854
|
+
class ResponseFormat {
|
|
2855
|
+
}
|
|
2737
2856
|
/** Response for counting tokens. */
|
|
2738
2857
|
class CountTokensResponse {
|
|
2739
2858
|
}
|
|
@@ -2762,10 +2881,10 @@ class GenerateVideosOperation {
|
|
|
2762
2881
|
return operation;
|
|
2763
2882
|
}
|
|
2764
2883
|
}
|
|
2765
|
-
/** Defines how to parse sample response for reinforcement tuning. */
|
|
2884
|
+
/** 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. */
|
|
2766
2885
|
class ReinforcementTuningParseResponseConfig {
|
|
2767
2886
|
}
|
|
2768
|
-
/** Scores responses by directly converting parsed autorater response to float reward
|
|
2887
|
+
/** 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. */
|
|
2769
2888
|
class ReinforcementTuningAutoraterScorerParsedResponseConversionScorer {
|
|
2770
2889
|
}
|
|
2771
2890
|
/** The results from an evaluation run performed by the EvaluationService. This data type is not supported in Gemini API. */
|
|
@@ -5205,6 +5324,9 @@ function toolToMldev$4(fromObject) {
|
|
|
5205
5324
|
}
|
|
5206
5325
|
setValueByPath(toObject, ['mcpServers'], transformedList);
|
|
5207
5326
|
}
|
|
5327
|
+
if (getValueByPath(fromObject, ['exaAiSearch']) !== undefined) {
|
|
5328
|
+
throw new Error('exaAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
5329
|
+
}
|
|
5208
5330
|
return toObject;
|
|
5209
5331
|
}
|
|
5210
5332
|
function vertexMultimodalDatasetDestinationFromVertex(fromObject) {
|
|
@@ -6675,6 +6797,9 @@ function toolToMldev$3(fromObject) {
|
|
|
6675
6797
|
}
|
|
6676
6798
|
setValueByPath(toObject, ['mcpServers'], transformedList);
|
|
6677
6799
|
}
|
|
6800
|
+
if (getValueByPath(fromObject, ['exaAiSearch']) !== undefined) {
|
|
6801
|
+
throw new Error('exaAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
6802
|
+
}
|
|
6678
6803
|
return toObject;
|
|
6679
6804
|
}
|
|
6680
6805
|
function toolToVertex$2(fromObject) {
|
|
@@ -6748,6 +6873,10 @@ function toolToVertex$2(fromObject) {
|
|
|
6748
6873
|
}
|
|
6749
6874
|
setValueByPath(toObject, ['mcpServers'], transformedList);
|
|
6750
6875
|
}
|
|
6876
|
+
const fromExaAiSearch = getValueByPath(fromObject, ['exaAiSearch']);
|
|
6877
|
+
if (fromExaAiSearch != null) {
|
|
6878
|
+
setValueByPath(toObject, ['exaAiSearch'], fromExaAiSearch);
|
|
6879
|
+
}
|
|
6751
6880
|
return toObject;
|
|
6752
6881
|
}
|
|
6753
6882
|
function updateCachedContentConfigToMldev(fromObject, parentObject) {
|
|
@@ -8322,7 +8451,7 @@ function generationConfigToVertex$1(fromObject) {
|
|
|
8322
8451
|
}
|
|
8323
8452
|
const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
|
|
8324
8453
|
if (fromSpeechConfig != null) {
|
|
8325
|
-
setValueByPath(toObject, ['speechConfig'], fromSpeechConfig);
|
|
8454
|
+
setValueByPath(toObject, ['speechConfig'], speechConfigToVertex$1(fromSpeechConfig));
|
|
8326
8455
|
}
|
|
8327
8456
|
const fromStopSequences = getValueByPath(fromObject, [
|
|
8328
8457
|
'stopSequences',
|
|
@@ -8352,6 +8481,21 @@ function generationConfigToVertex$1(fromObject) {
|
|
|
8352
8481
|
undefined) {
|
|
8353
8482
|
throw new Error('enableEnhancedCivicAnswers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
8354
8483
|
}
|
|
8484
|
+
const fromResponseFormat = getValueByPath(fromObject, [
|
|
8485
|
+
'responseFormat',
|
|
8486
|
+
]);
|
|
8487
|
+
if (fromResponseFormat != null) {
|
|
8488
|
+
let transformedList = fromResponseFormat;
|
|
8489
|
+
if (Array.isArray(transformedList)) {
|
|
8490
|
+
transformedList = transformedList.map((item) => {
|
|
8491
|
+
return item;
|
|
8492
|
+
});
|
|
8493
|
+
}
|
|
8494
|
+
setValueByPath(toObject, ['responseFormat'], transformedList);
|
|
8495
|
+
}
|
|
8496
|
+
if (getValueByPath(fromObject, ['translationConfig']) !== undefined) {
|
|
8497
|
+
throw new Error('translationConfig parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
8498
|
+
}
|
|
8355
8499
|
return toObject;
|
|
8356
8500
|
}
|
|
8357
8501
|
function googleMapsToMldev$2(fromObject) {
|
|
@@ -8565,7 +8709,7 @@ function liveConnectConfigToVertex(fromObject, parentObject) {
|
|
|
8565
8709
|
}
|
|
8566
8710
|
const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
|
|
8567
8711
|
if (parentObject !== undefined && fromSpeechConfig != null) {
|
|
8568
|
-
setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], tLiveSpeechConfig(fromSpeechConfig));
|
|
8712
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], speechConfigToVertex$1(tLiveSpeechConfig(fromSpeechConfig)));
|
|
8569
8713
|
}
|
|
8570
8714
|
const fromThinkingConfig = getValueByPath(fromObject, [
|
|
8571
8715
|
'thinkingConfig',
|
|
@@ -8854,6 +8998,22 @@ function mcpServerToVertex$1(fromObject) {
|
|
|
8854
8998
|
}
|
|
8855
8999
|
return toObject;
|
|
8856
9000
|
}
|
|
9001
|
+
function multiSpeakerVoiceConfigToVertex$1(fromObject) {
|
|
9002
|
+
const toObject = {};
|
|
9003
|
+
const fromSpeakerVoiceConfigs = getValueByPath(fromObject, [
|
|
9004
|
+
'speakerVoiceConfigs',
|
|
9005
|
+
]);
|
|
9006
|
+
if (fromSpeakerVoiceConfigs != null) {
|
|
9007
|
+
let transformedList = fromSpeakerVoiceConfigs;
|
|
9008
|
+
if (Array.isArray(transformedList)) {
|
|
9009
|
+
transformedList = transformedList.map((item) => {
|
|
9010
|
+
return speakerVoiceConfigToVertex$1(item);
|
|
9011
|
+
});
|
|
9012
|
+
}
|
|
9013
|
+
setValueByPath(toObject, ['speakerVoiceConfigs'], transformedList);
|
|
9014
|
+
}
|
|
9015
|
+
return toObject;
|
|
9016
|
+
}
|
|
8857
9017
|
function partToMldev$2(fromObject) {
|
|
8858
9018
|
const toObject = {};
|
|
8859
9019
|
const fromMediaResolution = getValueByPath(fromObject, [
|
|
@@ -8995,6 +9155,26 @@ function partToVertex$2(fromObject) {
|
|
|
8995
9155
|
}
|
|
8996
9156
|
return toObject;
|
|
8997
9157
|
}
|
|
9158
|
+
function replicatedVoiceConfigToVertex$1(fromObject) {
|
|
9159
|
+
const toObject = {};
|
|
9160
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
9161
|
+
if (fromMimeType != null) {
|
|
9162
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
9163
|
+
}
|
|
9164
|
+
const fromVoiceSampleAudio = getValueByPath(fromObject, [
|
|
9165
|
+
'voiceSampleAudio',
|
|
9166
|
+
]);
|
|
9167
|
+
if (fromVoiceSampleAudio != null) {
|
|
9168
|
+
setValueByPath(toObject, ['voiceSampleAudio'], fromVoiceSampleAudio);
|
|
9169
|
+
}
|
|
9170
|
+
if (getValueByPath(fromObject, ['consentAudio']) !== undefined) {
|
|
9171
|
+
throw new Error('consentAudio parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
9172
|
+
}
|
|
9173
|
+
if (getValueByPath(fromObject, ['voiceConsentSignature']) !== undefined) {
|
|
9174
|
+
throw new Error('voiceConsentSignature parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
9175
|
+
}
|
|
9176
|
+
return toObject;
|
|
9177
|
+
}
|
|
8998
9178
|
function safetySettingToMldev$2(fromObject) {
|
|
8999
9179
|
const toObject = {};
|
|
9000
9180
|
const fromCategory = getValueByPath(fromObject, ['category']);
|
|
@@ -9021,6 +9201,36 @@ function sessionResumptionConfigToMldev$1(fromObject) {
|
|
|
9021
9201
|
}
|
|
9022
9202
|
return toObject;
|
|
9023
9203
|
}
|
|
9204
|
+
function speakerVoiceConfigToVertex$1(fromObject) {
|
|
9205
|
+
const toObject = {};
|
|
9206
|
+
const fromSpeaker = getValueByPath(fromObject, ['speaker']);
|
|
9207
|
+
if (fromSpeaker != null) {
|
|
9208
|
+
setValueByPath(toObject, ['speaker'], fromSpeaker);
|
|
9209
|
+
}
|
|
9210
|
+
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
9211
|
+
if (fromVoiceConfig != null) {
|
|
9212
|
+
setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex$1(fromVoiceConfig));
|
|
9213
|
+
}
|
|
9214
|
+
return toObject;
|
|
9215
|
+
}
|
|
9216
|
+
function speechConfigToVertex$1(fromObject) {
|
|
9217
|
+
const toObject = {};
|
|
9218
|
+
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
9219
|
+
if (fromVoiceConfig != null) {
|
|
9220
|
+
setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex$1(fromVoiceConfig));
|
|
9221
|
+
}
|
|
9222
|
+
const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
|
|
9223
|
+
if (fromLanguageCode != null) {
|
|
9224
|
+
setValueByPath(toObject, ['languageCode'], fromLanguageCode);
|
|
9225
|
+
}
|
|
9226
|
+
const fromMultiSpeakerVoiceConfig = getValueByPath(fromObject, [
|
|
9227
|
+
'multiSpeakerVoiceConfig',
|
|
9228
|
+
]);
|
|
9229
|
+
if (fromMultiSpeakerVoiceConfig != null) {
|
|
9230
|
+
setValueByPath(toObject, ['multiSpeakerVoiceConfig'], multiSpeakerVoiceConfigToVertex$1(fromMultiSpeakerVoiceConfig));
|
|
9231
|
+
}
|
|
9232
|
+
return toObject;
|
|
9233
|
+
}
|
|
9024
9234
|
function toolToMldev$2(fromObject) {
|
|
9025
9235
|
const toObject = {};
|
|
9026
9236
|
if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
|
|
@@ -9086,6 +9296,9 @@ function toolToMldev$2(fromObject) {
|
|
|
9086
9296
|
}
|
|
9087
9297
|
setValueByPath(toObject, ['mcpServers'], transformedList);
|
|
9088
9298
|
}
|
|
9299
|
+
if (getValueByPath(fromObject, ['exaAiSearch']) !== undefined) {
|
|
9300
|
+
throw new Error('exaAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
9301
|
+
}
|
|
9089
9302
|
return toObject;
|
|
9090
9303
|
}
|
|
9091
9304
|
function toolToVertex$1(fromObject) {
|
|
@@ -9159,6 +9372,10 @@ function toolToVertex$1(fromObject) {
|
|
|
9159
9372
|
}
|
|
9160
9373
|
setValueByPath(toObject, ['mcpServers'], transformedList);
|
|
9161
9374
|
}
|
|
9375
|
+
const fromExaAiSearch = getValueByPath(fromObject, ['exaAiSearch']);
|
|
9376
|
+
if (fromExaAiSearch != null) {
|
|
9377
|
+
setValueByPath(toObject, ['exaAiSearch'], fromExaAiSearch);
|
|
9378
|
+
}
|
|
9162
9379
|
return toObject;
|
|
9163
9380
|
}
|
|
9164
9381
|
function usageMetadataFromVertex(fromObject) {
|
|
@@ -9265,6 +9482,22 @@ function voiceActivityFromVertex(fromObject) {
|
|
|
9265
9482
|
}
|
|
9266
9483
|
return toObject;
|
|
9267
9484
|
}
|
|
9485
|
+
function voiceConfigToVertex$1(fromObject) {
|
|
9486
|
+
const toObject = {};
|
|
9487
|
+
const fromReplicatedVoiceConfig = getValueByPath(fromObject, [
|
|
9488
|
+
'replicatedVoiceConfig',
|
|
9489
|
+
]);
|
|
9490
|
+
if (fromReplicatedVoiceConfig != null) {
|
|
9491
|
+
setValueByPath(toObject, ['replicatedVoiceConfig'], replicatedVoiceConfigToVertex$1(fromReplicatedVoiceConfig));
|
|
9492
|
+
}
|
|
9493
|
+
const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [
|
|
9494
|
+
'prebuiltVoiceConfig',
|
|
9495
|
+
]);
|
|
9496
|
+
if (fromPrebuiltVoiceConfig != null) {
|
|
9497
|
+
setValueByPath(toObject, ['prebuiltVoiceConfig'], fromPrebuiltVoiceConfig);
|
|
9498
|
+
}
|
|
9499
|
+
return toObject;
|
|
9500
|
+
}
|
|
9268
9501
|
|
|
9269
9502
|
/**
|
|
9270
9503
|
* @license
|
|
@@ -9485,6 +9718,18 @@ function contentEmbeddingStatisticsFromVertex(fromObject, _rootObject) {
|
|
|
9485
9718
|
if (fromTokenCount != null) {
|
|
9486
9719
|
setValueByPath(toObject, ['tokenCount'], fromTokenCount);
|
|
9487
9720
|
}
|
|
9721
|
+
const fromTokensDetails = getValueByPath(fromObject, [
|
|
9722
|
+
'tokensDetails',
|
|
9723
|
+
]);
|
|
9724
|
+
if (fromTokensDetails != null) {
|
|
9725
|
+
let transformedList = fromTokensDetails;
|
|
9726
|
+
if (Array.isArray(transformedList)) {
|
|
9727
|
+
transformedList = transformedList.map((item) => {
|
|
9728
|
+
return item;
|
|
9729
|
+
});
|
|
9730
|
+
}
|
|
9731
|
+
setValueByPath(toObject, ['tokensDetails'], transformedList);
|
|
9732
|
+
}
|
|
9488
9733
|
return toObject;
|
|
9489
9734
|
}
|
|
9490
9735
|
function contentToMldev$1(fromObject, rootObject) {
|
|
@@ -10114,6 +10359,10 @@ function embedContentResponseFromVertex(fromObject, rootObject) {
|
|
|
10114
10359
|
usageMetadata['promptTokenCount']) {
|
|
10115
10360
|
stats.tokenCount = usageMetadata['promptTokenCount'];
|
|
10116
10361
|
}
|
|
10362
|
+
if (usageMetadata &&
|
|
10363
|
+
usageMetadata['promptTokensDetails']) {
|
|
10364
|
+
stats.tokensDetails = usageMetadata['promptTokensDetails'];
|
|
10365
|
+
}
|
|
10117
10366
|
if (truncated) {
|
|
10118
10367
|
stats.truncated = truncated;
|
|
10119
10368
|
}
|
|
@@ -10518,7 +10767,7 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject, root
|
|
|
10518
10767
|
}
|
|
10519
10768
|
const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
|
|
10520
10769
|
if (fromSpeechConfig != null) {
|
|
10521
|
-
setValueByPath(toObject, ['speechConfig'], tSpeechConfig(fromSpeechConfig));
|
|
10770
|
+
setValueByPath(toObject, ['speechConfig'], speechConfigToVertex(tSpeechConfig(fromSpeechConfig)));
|
|
10522
10771
|
}
|
|
10523
10772
|
const fromAudioTimestamp = getValueByPath(fromObject, [
|
|
10524
10773
|
'audioTimestamp',
|
|
@@ -11405,7 +11654,7 @@ function generatedVideoFromVertex(fromObject, rootObject) {
|
|
|
11405
11654
|
}
|
|
11406
11655
|
return toObject;
|
|
11407
11656
|
}
|
|
11408
|
-
function generationConfigToVertex(fromObject,
|
|
11657
|
+
function generationConfigToVertex(fromObject, rootObject) {
|
|
11409
11658
|
const toObject = {};
|
|
11410
11659
|
const fromModelSelectionConfig = getValueByPath(fromObject, [
|
|
11411
11660
|
'modelSelectionConfig',
|
|
@@ -11501,7 +11750,7 @@ function generationConfigToVertex(fromObject, _rootObject) {
|
|
|
11501
11750
|
}
|
|
11502
11751
|
const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
|
|
11503
11752
|
if (fromSpeechConfig != null) {
|
|
11504
|
-
setValueByPath(toObject, ['speechConfig'], fromSpeechConfig);
|
|
11753
|
+
setValueByPath(toObject, ['speechConfig'], speechConfigToVertex(fromSpeechConfig));
|
|
11505
11754
|
}
|
|
11506
11755
|
const fromStopSequences = getValueByPath(fromObject, [
|
|
11507
11756
|
'stopSequences',
|
|
@@ -11531,6 +11780,21 @@ function generationConfigToVertex(fromObject, _rootObject) {
|
|
|
11531
11780
|
undefined) {
|
|
11532
11781
|
throw new Error('enableEnhancedCivicAnswers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
11533
11782
|
}
|
|
11783
|
+
const fromResponseFormat = getValueByPath(fromObject, [
|
|
11784
|
+
'responseFormat',
|
|
11785
|
+
]);
|
|
11786
|
+
if (fromResponseFormat != null) {
|
|
11787
|
+
let transformedList = fromResponseFormat;
|
|
11788
|
+
if (Array.isArray(transformedList)) {
|
|
11789
|
+
transformedList = transformedList.map((item) => {
|
|
11790
|
+
return item;
|
|
11791
|
+
});
|
|
11792
|
+
}
|
|
11793
|
+
setValueByPath(toObject, ['responseFormat'], transformedList);
|
|
11794
|
+
}
|
|
11795
|
+
if (getValueByPath(fromObject, ['translationConfig']) !== undefined) {
|
|
11796
|
+
throw new Error('translationConfig parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
11797
|
+
}
|
|
11534
11798
|
return toObject;
|
|
11535
11799
|
}
|
|
11536
11800
|
function getModelParametersToMldev(apiClient, fromObject, _rootObject) {
|
|
@@ -11968,6 +12232,22 @@ function modelFromVertex(fromObject, rootObject) {
|
|
|
11968
12232
|
}
|
|
11969
12233
|
return toObject;
|
|
11970
12234
|
}
|
|
12235
|
+
function multiSpeakerVoiceConfigToVertex(fromObject, rootObject) {
|
|
12236
|
+
const toObject = {};
|
|
12237
|
+
const fromSpeakerVoiceConfigs = getValueByPath(fromObject, [
|
|
12238
|
+
'speakerVoiceConfigs',
|
|
12239
|
+
]);
|
|
12240
|
+
if (fromSpeakerVoiceConfigs != null) {
|
|
12241
|
+
let transformedList = fromSpeakerVoiceConfigs;
|
|
12242
|
+
if (Array.isArray(transformedList)) {
|
|
12243
|
+
transformedList = transformedList.map((item) => {
|
|
12244
|
+
return speakerVoiceConfigToVertex(item);
|
|
12245
|
+
});
|
|
12246
|
+
}
|
|
12247
|
+
setValueByPath(toObject, ['speakerVoiceConfigs'], transformedList);
|
|
12248
|
+
}
|
|
12249
|
+
return toObject;
|
|
12250
|
+
}
|
|
11971
12251
|
function partToMldev$1(fromObject, rootObject) {
|
|
11972
12252
|
const toObject = {};
|
|
11973
12253
|
const fromMediaResolution = getValueByPath(fromObject, [
|
|
@@ -12277,6 +12557,26 @@ function referenceImageAPIInternalToVertex(fromObject, rootObject) {
|
|
|
12277
12557
|
}
|
|
12278
12558
|
return toObject;
|
|
12279
12559
|
}
|
|
12560
|
+
function replicatedVoiceConfigToVertex(fromObject, _rootObject) {
|
|
12561
|
+
const toObject = {};
|
|
12562
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
12563
|
+
if (fromMimeType != null) {
|
|
12564
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
12565
|
+
}
|
|
12566
|
+
const fromVoiceSampleAudio = getValueByPath(fromObject, [
|
|
12567
|
+
'voiceSampleAudio',
|
|
12568
|
+
]);
|
|
12569
|
+
if (fromVoiceSampleAudio != null) {
|
|
12570
|
+
setValueByPath(toObject, ['voiceSampleAudio'], fromVoiceSampleAudio);
|
|
12571
|
+
}
|
|
12572
|
+
if (getValueByPath(fromObject, ['consentAudio']) !== undefined) {
|
|
12573
|
+
throw new Error('consentAudio parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
12574
|
+
}
|
|
12575
|
+
if (getValueByPath(fromObject, ['voiceConsentSignature']) !== undefined) {
|
|
12576
|
+
throw new Error('voiceConsentSignature parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
12577
|
+
}
|
|
12578
|
+
return toObject;
|
|
12579
|
+
}
|
|
12280
12580
|
function safetyAttributesFromMldev(fromObject, _rootObject) {
|
|
12281
12581
|
const toObject = {};
|
|
12282
12582
|
const fromCategories = getValueByPath(fromObject, [
|
|
@@ -12426,6 +12726,36 @@ function segmentImageSourceToVertex(fromObject, parentObject, rootObject) {
|
|
|
12426
12726
|
}
|
|
12427
12727
|
return toObject;
|
|
12428
12728
|
}
|
|
12729
|
+
function speakerVoiceConfigToVertex(fromObject, rootObject) {
|
|
12730
|
+
const toObject = {};
|
|
12731
|
+
const fromSpeaker = getValueByPath(fromObject, ['speaker']);
|
|
12732
|
+
if (fromSpeaker != null) {
|
|
12733
|
+
setValueByPath(toObject, ['speaker'], fromSpeaker);
|
|
12734
|
+
}
|
|
12735
|
+
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
12736
|
+
if (fromVoiceConfig != null) {
|
|
12737
|
+
setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex(fromVoiceConfig));
|
|
12738
|
+
}
|
|
12739
|
+
return toObject;
|
|
12740
|
+
}
|
|
12741
|
+
function speechConfigToVertex(fromObject, rootObject) {
|
|
12742
|
+
const toObject = {};
|
|
12743
|
+
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
12744
|
+
if (fromVoiceConfig != null) {
|
|
12745
|
+
setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex(fromVoiceConfig));
|
|
12746
|
+
}
|
|
12747
|
+
const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
|
|
12748
|
+
if (fromLanguageCode != null) {
|
|
12749
|
+
setValueByPath(toObject, ['languageCode'], fromLanguageCode);
|
|
12750
|
+
}
|
|
12751
|
+
const fromMultiSpeakerVoiceConfig = getValueByPath(fromObject, [
|
|
12752
|
+
'multiSpeakerVoiceConfig',
|
|
12753
|
+
]);
|
|
12754
|
+
if (fromMultiSpeakerVoiceConfig != null) {
|
|
12755
|
+
setValueByPath(toObject, ['multiSpeakerVoiceConfig'], multiSpeakerVoiceConfigToVertex(fromMultiSpeakerVoiceConfig));
|
|
12756
|
+
}
|
|
12757
|
+
return toObject;
|
|
12758
|
+
}
|
|
12429
12759
|
function toolConfigToMldev(fromObject, rootObject) {
|
|
12430
12760
|
const toObject = {};
|
|
12431
12761
|
const fromRetrievalConfig = getValueByPath(fromObject, [
|
|
@@ -12531,6 +12861,9 @@ function toolToMldev$1(fromObject, rootObject) {
|
|
|
12531
12861
|
}
|
|
12532
12862
|
setValueByPath(toObject, ['mcpServers'], transformedList);
|
|
12533
12863
|
}
|
|
12864
|
+
if (getValueByPath(fromObject, ['exaAiSearch']) !== undefined) {
|
|
12865
|
+
throw new Error('exaAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
12866
|
+
}
|
|
12534
12867
|
return toObject;
|
|
12535
12868
|
}
|
|
12536
12869
|
function toolToVertex(fromObject, rootObject) {
|
|
@@ -12604,6 +12937,10 @@ function toolToVertex(fromObject, rootObject) {
|
|
|
12604
12937
|
}
|
|
12605
12938
|
setValueByPath(toObject, ['mcpServers'], transformedList);
|
|
12606
12939
|
}
|
|
12940
|
+
const fromExaAiSearch = getValueByPath(fromObject, ['exaAiSearch']);
|
|
12941
|
+
if (fromExaAiSearch != null) {
|
|
12942
|
+
setValueByPath(toObject, ['exaAiSearch'], fromExaAiSearch);
|
|
12943
|
+
}
|
|
12607
12944
|
return toObject;
|
|
12608
12945
|
}
|
|
12609
12946
|
function tunedModelInfoFromMldev(fromObject, _rootObject) {
|
|
@@ -12915,9 +13252,25 @@ function videoToVertex(fromObject, _rootObject) {
|
|
|
12915
13252
|
}
|
|
12916
13253
|
return toObject;
|
|
12917
13254
|
}
|
|
12918
|
-
|
|
12919
|
-
|
|
12920
|
-
|
|
13255
|
+
function voiceConfigToVertex(fromObject, rootObject) {
|
|
13256
|
+
const toObject = {};
|
|
13257
|
+
const fromReplicatedVoiceConfig = getValueByPath(fromObject, [
|
|
13258
|
+
'replicatedVoiceConfig',
|
|
13259
|
+
]);
|
|
13260
|
+
if (fromReplicatedVoiceConfig != null) {
|
|
13261
|
+
setValueByPath(toObject, ['replicatedVoiceConfig'], replicatedVoiceConfigToVertex(fromReplicatedVoiceConfig));
|
|
13262
|
+
}
|
|
13263
|
+
const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [
|
|
13264
|
+
'prebuiltVoiceConfig',
|
|
13265
|
+
]);
|
|
13266
|
+
if (fromPrebuiltVoiceConfig != null) {
|
|
13267
|
+
setValueByPath(toObject, ['prebuiltVoiceConfig'], fromPrebuiltVoiceConfig);
|
|
13268
|
+
}
|
|
13269
|
+
return toObject;
|
|
13270
|
+
}
|
|
13271
|
+
|
|
13272
|
+
/**
|
|
13273
|
+
* @license
|
|
12921
13274
|
* Copyright 2025 Google LLC
|
|
12922
13275
|
* SPDX-License-Identifier: Apache-2.0
|
|
12923
13276
|
*/
|
|
@@ -13165,7 +13518,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
|
|
|
13165
13518
|
const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
|
|
13166
13519
|
const USER_AGENT_HEADER = 'User-Agent';
|
|
13167
13520
|
const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
|
|
13168
|
-
const SDK_VERSION = '2.
|
|
13521
|
+
const SDK_VERSION = '2.12.0'; // x-release-please-version
|
|
13169
13522
|
const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
|
|
13170
13523
|
const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
|
|
13171
13524
|
const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
|
|
@@ -14419,10 +14772,27 @@ class Live {
|
|
|
14419
14772
|
onopenResolve({});
|
|
14420
14773
|
};
|
|
14421
14774
|
const apiClient = this.apiClient;
|
|
14775
|
+
let sessionResolved = false;
|
|
14776
|
+
const messageQueue = [];
|
|
14777
|
+
let setupCompleteResolve = () => { };
|
|
14778
|
+
const setupCompletePromise = new Promise((resolve) => {
|
|
14779
|
+
setupCompleteResolve = resolve;
|
|
14780
|
+
});
|
|
14422
14781
|
const websocketCallbacks = {
|
|
14423
14782
|
onopen: onopenAwaitedCallback,
|
|
14424
14783
|
onmessage: (event) => {
|
|
14425
|
-
void handleWebSocketMessage(apiClient,
|
|
14784
|
+
void handleWebSocketMessage(apiClient, (msg) => {
|
|
14785
|
+
if (msg.setupComplete && !session.setupComplete) {
|
|
14786
|
+
session.setupComplete = msg.setupComplete;
|
|
14787
|
+
setupCompleteResolve({});
|
|
14788
|
+
}
|
|
14789
|
+
if (sessionResolved) {
|
|
14790
|
+
callbacks.onmessage(msg);
|
|
14791
|
+
}
|
|
14792
|
+
else {
|
|
14793
|
+
messageQueue.push(msg);
|
|
14794
|
+
}
|
|
14795
|
+
}, event);
|
|
14426
14796
|
},
|
|
14427
14797
|
onerror: (_a = callbacks === null || callbacks === void 0 ? void 0 : callbacks.onerror) !== null && _a !== void 0 ? _a : function (e) {
|
|
14428
14798
|
},
|
|
@@ -14484,8 +14854,14 @@ class Live {
|
|
|
14484
14854
|
clientMessage = liveConnectParametersToMldev(this.apiClient, liveConnectParameters);
|
|
14485
14855
|
}
|
|
14486
14856
|
delete clientMessage['config'];
|
|
14857
|
+
const session = new Session(conn, this.apiClient);
|
|
14487
14858
|
conn.send(JSON.stringify(clientMessage));
|
|
14488
|
-
|
|
14859
|
+
await setupCompletePromise;
|
|
14860
|
+
sessionResolved = true;
|
|
14861
|
+
for (const msg of messageQueue) {
|
|
14862
|
+
callbacks.onmessage(msg);
|
|
14863
|
+
}
|
|
14864
|
+
return session;
|
|
14489
14865
|
}
|
|
14490
14866
|
// TODO: b/416041229 - Abstract this method to a common place.
|
|
14491
14867
|
isCallableTool(tool) {
|
|
@@ -17014,6 +17390,9 @@ function toolToMldev(fromObject) {
|
|
|
17014
17390
|
}
|
|
17015
17391
|
setValueByPath(toObject, ['mcpServers'], transformedList);
|
|
17016
17392
|
}
|
|
17393
|
+
if (getValueByPath(fromObject, ['exaAiSearch']) !== undefined) {
|
|
17394
|
+
throw new Error('exaAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
17395
|
+
}
|
|
17017
17396
|
return toObject;
|
|
17018
17397
|
}
|
|
17019
17398
|
|
|
@@ -17865,17 +18244,14 @@ function env() {
|
|
|
17865
18244
|
* Populates global parameters with environment variables.
|
|
17866
18245
|
*/
|
|
17867
18246
|
function fillGlobals(options) {
|
|
17868
|
-
var _a, _b
|
|
18247
|
+
var _a, _b;
|
|
17869
18248
|
const clone = Object.assign({}, options);
|
|
17870
18249
|
const envVars = env();
|
|
17871
18250
|
if (typeof envVars.GOOGLE_GENAI_API_VERSION !== "undefined") {
|
|
17872
18251
|
(_a = clone.api_version) !== null && _a !== void 0 ? _a : (clone.api_version = envVars.GOOGLE_GENAI_API_VERSION);
|
|
17873
18252
|
}
|
|
17874
|
-
if (typeof envVars.GOOGLE_GENAI_API_REVISION !== "undefined") {
|
|
17875
|
-
(_b = clone.api_revision) !== null && _b !== void 0 ? _b : (clone.api_revision = envVars.GOOGLE_GENAI_API_REVISION);
|
|
17876
|
-
}
|
|
17877
18253
|
if (typeof envVars.GOOGLE_GENAI_USER_PROJECT !== "undefined") {
|
|
17878
|
-
(
|
|
18254
|
+
(_b = clone.user_project) !== null && _b !== void 0 ? _b : (clone.user_project = envVars.GOOGLE_GENAI_USER_PROJECT);
|
|
17879
18255
|
}
|
|
17880
18256
|
return clone;
|
|
17881
18257
|
}
|
|
@@ -17887,7 +18263,6 @@ function fillGlobals(options) {
|
|
|
17887
18263
|
*
|
|
17888
18264
|
* g3-prettier-ignore-file
|
|
17889
18265
|
*/
|
|
17890
|
-
const GOOGLE_GENAI_API_REVISION = "2026-05-20";
|
|
17891
18266
|
class GoogleGenAISecurityProvider {
|
|
17892
18267
|
constructor(options) {
|
|
17893
18268
|
this.options = options;
|
|
@@ -17905,7 +18280,6 @@ class GoogleGenAIAuthHook {
|
|
|
17905
18280
|
}
|
|
17906
18281
|
async beforeRequest(hookCtx, request) {
|
|
17907
18282
|
applyDefaultHeaders(request.headers, getStaticDefaultHeaders(hookCtx.security_source));
|
|
17908
|
-
applyApiRevision(hookCtx, request.headers);
|
|
17909
18283
|
applyUserProject(hookCtx, request.headers);
|
|
17910
18284
|
if (hasAuthHeaders(request.headers)) {
|
|
17911
18285
|
return request;
|
|
@@ -17985,12 +18359,6 @@ function applyDefaultHeaders(target, source) {
|
|
|
17985
18359
|
}
|
|
17986
18360
|
}
|
|
17987
18361
|
}
|
|
17988
|
-
function applyApiRevision(hookCtx, headers) {
|
|
17989
|
-
var _a;
|
|
17990
|
-
if (headers.get("api-revision") === null) {
|
|
17991
|
-
headers.set("Api-Revision", (_a = hookCtx.options.api_revision) !== null && _a !== void 0 ? _a : GOOGLE_GENAI_API_REVISION);
|
|
17992
|
-
}
|
|
17993
|
-
}
|
|
17994
18362
|
function applyUserProject(hookCtx, headers) {
|
|
17995
18363
|
if (hookCtx.options.user_project !== undefined &&
|
|
17996
18364
|
headers.get("x-goog-user-project") === null) {
|
|
@@ -18522,7 +18890,7 @@ function serverURLFromOptions(options) {
|
|
|
18522
18890
|
return new URL(u);
|
|
18523
18891
|
}
|
|
18524
18892
|
const SDK_METADATA = {
|
|
18525
|
-
userAgent: "speakeasy-sdk/typescript 2.4.1-preview.4 2.
|
|
18893
|
+
userAgent: "speakeasy-sdk/typescript 2.4.1-preview.4 2.913.3 v1beta @google/genai",
|
|
18526
18894
|
};
|
|
18527
18895
|
|
|
18528
18896
|
/**
|
|
@@ -20163,9 +20531,9 @@ function unwrapAsAPIPromise(p) {
|
|
|
20163
20531
|
* Creates a new Agent (Typed version for SDK).
|
|
20164
20532
|
*/
|
|
20165
20533
|
function agentsCreate(client, body, api_version, options) {
|
|
20166
|
-
return new APIPromise($do$
|
|
20534
|
+
return new APIPromise($do$l(client, body, api_version, options));
|
|
20167
20535
|
}
|
|
20168
|
-
async function $do$
|
|
20536
|
+
async function $do$l(client, body, api_version, options) {
|
|
20169
20537
|
var _a, _b, _c;
|
|
20170
20538
|
const input = {
|
|
20171
20539
|
body: body,
|
|
@@ -20248,9 +20616,9 @@ async function $do$e(client, body, api_version, options) {
|
|
|
20248
20616
|
* Deletes an Agent.
|
|
20249
20617
|
*/
|
|
20250
20618
|
function agentsDelete(client, id, api_version, options) {
|
|
20251
|
-
return new APIPromise($do$
|
|
20619
|
+
return new APIPromise($do$k(client, id, api_version, options));
|
|
20252
20620
|
}
|
|
20253
|
-
async function $do$
|
|
20621
|
+
async function $do$k(client, id, api_version, options) {
|
|
20254
20622
|
var _a, _b, _c;
|
|
20255
20623
|
const input = {
|
|
20256
20624
|
id: id,
|
|
@@ -20336,9 +20704,9 @@ async function $do$d(client, id, api_version, options) {
|
|
|
20336
20704
|
* Gets a specific Agent.
|
|
20337
20705
|
*/
|
|
20338
20706
|
function agentsGet(client, id, api_version, options) {
|
|
20339
|
-
return new APIPromise($do$
|
|
20707
|
+
return new APIPromise($do$j(client, id, api_version, options));
|
|
20340
20708
|
}
|
|
20341
|
-
async function $do$
|
|
20709
|
+
async function $do$j(client, id, api_version, options) {
|
|
20342
20710
|
var _a, _b, _c;
|
|
20343
20711
|
const input = {
|
|
20344
20712
|
id: id,
|
|
@@ -20424,9 +20792,9 @@ async function $do$c(client, id, api_version, options) {
|
|
|
20424
20792
|
* Lists all Agents.
|
|
20425
20793
|
*/
|
|
20426
20794
|
function agentsList(client, api_version, page_size, page_token, parent, options) {
|
|
20427
|
-
return new APIPromise($do$
|
|
20795
|
+
return new APIPromise($do$i(client, api_version, page_size, page_token, parent, options));
|
|
20428
20796
|
}
|
|
20429
|
-
async function $do$
|
|
20797
|
+
async function $do$i(client, api_version, page_size, page_token, parent, options) {
|
|
20430
20798
|
var _a, _b, _c;
|
|
20431
20799
|
const input = {
|
|
20432
20800
|
api_version: api_version,
|
|
@@ -20698,9 +21066,9 @@ class GetInteractionByIdClientError extends GoogleGenAiError {
|
|
|
20698
21066
|
* Cancels an interaction by id. This only applies to background interactions that are still running.
|
|
20699
21067
|
*/
|
|
20700
21068
|
function interactionsCancel(client, id, api_version, options) {
|
|
20701
|
-
return new APIPromise($do$
|
|
21069
|
+
return new APIPromise($do$h(client, id, api_version, options));
|
|
20702
21070
|
}
|
|
20703
|
-
async function $do$
|
|
21071
|
+
async function $do$h(client, id, api_version, options) {
|
|
20704
21072
|
var _a, _b, _c;
|
|
20705
21073
|
const input = {
|
|
20706
21074
|
id: id,
|
|
@@ -20786,9 +21154,9 @@ async function $do$a(client, id, api_version, options) {
|
|
|
20786
21154
|
* g3-prettier-ignore-file
|
|
20787
21155
|
*/
|
|
20788
21156
|
function interactionsCreate(client, body, api_version, options) {
|
|
20789
|
-
return new APIPromise($do$
|
|
21157
|
+
return new APIPromise($do$g(client, body, api_version, options));
|
|
20790
21158
|
}
|
|
20791
|
-
async function $do$
|
|
21159
|
+
async function $do$g(client, body, api_version, options) {
|
|
20792
21160
|
var _a, _b, _c, _d;
|
|
20793
21161
|
const input = {
|
|
20794
21162
|
body: body,
|
|
@@ -20880,9 +21248,9 @@ async function $do$9(client, body, api_version, options) {
|
|
|
20880
21248
|
* Deletes the interaction by id.
|
|
20881
21249
|
*/
|
|
20882
21250
|
function interactionsDelete(client, id, api_version, options) {
|
|
20883
|
-
return new APIPromise($do$
|
|
21251
|
+
return new APIPromise($do$f(client, id, api_version, options));
|
|
20884
21252
|
}
|
|
20885
|
-
async function $do$
|
|
21253
|
+
async function $do$f(client, id, api_version, options) {
|
|
20886
21254
|
var _a, _b, _c;
|
|
20887
21255
|
const input = {
|
|
20888
21256
|
id: id,
|
|
@@ -20968,9 +21336,9 @@ async function $do$8(client, id, api_version, options) {
|
|
|
20968
21336
|
* g3-prettier-ignore-file
|
|
20969
21337
|
*/
|
|
20970
21338
|
function interactionsGet(client, id, stream, last_event_id, include_input, api_version, options) {
|
|
20971
|
-
return new APIPromise($do$
|
|
21339
|
+
return new APIPromise($do$e(client, id, stream, last_event_id, include_input, api_version, options));
|
|
20972
21340
|
}
|
|
20973
|
-
async function $do$
|
|
21341
|
+
async function $do$e(client, id, stream, last_event_id, include_input, api_version, options) {
|
|
20974
21342
|
var _a, _b, _c;
|
|
20975
21343
|
const input = {
|
|
20976
21344
|
id: id,
|
|
@@ -21103,12 +21471,12 @@ class Interactions extends ClientSDK {
|
|
|
21103
21471
|
* g3-prettier-ignore-file
|
|
21104
21472
|
*/
|
|
21105
21473
|
/**
|
|
21106
|
-
* Creates a new
|
|
21474
|
+
* Creates a new trigger that will invoke the specified agent on the given cron schedule.
|
|
21107
21475
|
*/
|
|
21108
|
-
function
|
|
21109
|
-
return new APIPromise($do$
|
|
21476
|
+
function triggersCreate(client, body, api_version, options) {
|
|
21477
|
+
return new APIPromise($do$d(client, body, api_version, options));
|
|
21110
21478
|
}
|
|
21111
|
-
async function $do$
|
|
21479
|
+
async function $do$d(client, body, api_version, options) {
|
|
21112
21480
|
var _a, _b, _c;
|
|
21113
21481
|
const input = {
|
|
21114
21482
|
body: body,
|
|
@@ -21119,7 +21487,7 @@ async function $do$6(client, body, api_version, options) {
|
|
|
21119
21487
|
const pathParams = {
|
|
21120
21488
|
api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
|
|
21121
21489
|
};
|
|
21122
|
-
const path = pathToFunc("/{api_version}/
|
|
21490
|
+
const path = pathToFunc("/{api_version}/triggers")(pathParams);
|
|
21123
21491
|
const headers = new Headers(compactMap({
|
|
21124
21492
|
"Content-Type": "application/json",
|
|
21125
21493
|
Accept: "application/json",
|
|
@@ -21129,7 +21497,7 @@ async function $do$6(client, body, api_version, options) {
|
|
|
21129
21497
|
const context = {
|
|
21130
21498
|
options: client._options,
|
|
21131
21499
|
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 : "",
|
|
21132
|
-
operation_id: "
|
|
21500
|
+
operation_id: "CreateTrigger",
|
|
21133
21501
|
o_auth2_scopes: null,
|
|
21134
21502
|
resolved_security: requestSecurity,
|
|
21135
21503
|
security_source: client._options.security,
|
|
@@ -21173,7 +21541,7 @@ async function $do$6(client, body, api_version, options) {
|
|
|
21173
21541
|
return [doResult, { status: "request-error", request: req }];
|
|
21174
21542
|
}
|
|
21175
21543
|
const response = doResult.value;
|
|
21176
|
-
const [result] = await match(
|
|
21544
|
+
const [result] = await match(json(200), fail("4XX"), fail("5XX"))(response, req);
|
|
21177
21545
|
if (!result.ok) {
|
|
21178
21546
|
return [result, { status: "complete", request: req, response }];
|
|
21179
21547
|
}
|
|
@@ -21188,12 +21556,12 @@ async function $do$6(client, body, api_version, options) {
|
|
|
21188
21556
|
* g3-prettier-ignore-file
|
|
21189
21557
|
*/
|
|
21190
21558
|
/**
|
|
21191
|
-
* Deletes a
|
|
21559
|
+
* Deletes a trigger.
|
|
21192
21560
|
*/
|
|
21193
|
-
function
|
|
21194
|
-
return new APIPromise($do$
|
|
21561
|
+
function triggersDelete(client, id, api_version, options) {
|
|
21562
|
+
return new APIPromise($do$c(client, id, api_version, options));
|
|
21195
21563
|
}
|
|
21196
|
-
async function $do$
|
|
21564
|
+
async function $do$c(client, id, api_version, options) {
|
|
21197
21565
|
var _a, _b, _c;
|
|
21198
21566
|
const input = {
|
|
21199
21567
|
id: id,
|
|
@@ -21208,7 +21576,7 @@ async function $do$5(client, id, api_version, options) {
|
|
|
21208
21576
|
charEncoding: "percent",
|
|
21209
21577
|
}),
|
|
21210
21578
|
};
|
|
21211
|
-
const path = pathToFunc("/{api_version}/
|
|
21579
|
+
const path = pathToFunc("/{api_version}/triggers/{id}")(pathParams);
|
|
21212
21580
|
const headers = new Headers(compactMap({
|
|
21213
21581
|
Accept: "application/json",
|
|
21214
21582
|
}));
|
|
@@ -21217,7 +21585,7 @@ async function $do$5(client, id, api_version, options) {
|
|
|
21217
21585
|
const context = {
|
|
21218
21586
|
options: client._options,
|
|
21219
21587
|
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 : "",
|
|
21220
|
-
operation_id: "
|
|
21588
|
+
operation_id: "DeleteTrigger",
|
|
21221
21589
|
o_auth2_scopes: null,
|
|
21222
21590
|
resolved_security: requestSecurity,
|
|
21223
21591
|
security_source: client._options.security,
|
|
@@ -21261,7 +21629,7 @@ async function $do$5(client, id, api_version, options) {
|
|
|
21261
21629
|
return [doResult, { status: "request-error", request: req }];
|
|
21262
21630
|
}
|
|
21263
21631
|
const response = doResult.value;
|
|
21264
|
-
const [result] = await match(
|
|
21632
|
+
const [result] = await match(json(200), fail("4XX"), fail("5XX"))(response, req);
|
|
21265
21633
|
if (!result.ok) {
|
|
21266
21634
|
return [result, { status: "complete", request: req, response }];
|
|
21267
21635
|
}
|
|
@@ -21276,12 +21644,12 @@ async function $do$5(client, id, api_version, options) {
|
|
|
21276
21644
|
* g3-prettier-ignore-file
|
|
21277
21645
|
*/
|
|
21278
21646
|
/**
|
|
21279
|
-
* Gets a
|
|
21647
|
+
* Gets details of a single trigger.
|
|
21280
21648
|
*/
|
|
21281
|
-
function
|
|
21282
|
-
return new APIPromise($do$
|
|
21649
|
+
function triggersGet(client, id, api_version, options) {
|
|
21650
|
+
return new APIPromise($do$b(client, id, api_version, options));
|
|
21283
21651
|
}
|
|
21284
|
-
async function $do$
|
|
21652
|
+
async function $do$b(client, id, api_version, options) {
|
|
21285
21653
|
var _a, _b, _c;
|
|
21286
21654
|
const input = {
|
|
21287
21655
|
id: id,
|
|
@@ -21296,7 +21664,7 @@ async function $do$4(client, id, api_version, options) {
|
|
|
21296
21664
|
charEncoding: "percent",
|
|
21297
21665
|
}),
|
|
21298
21666
|
};
|
|
21299
|
-
const path = pathToFunc("/{api_version}/
|
|
21667
|
+
const path = pathToFunc("/{api_version}/triggers/{id}")(pathParams);
|
|
21300
21668
|
const headers = new Headers(compactMap({
|
|
21301
21669
|
Accept: "application/json",
|
|
21302
21670
|
}));
|
|
@@ -21305,7 +21673,7 @@ async function $do$4(client, id, api_version, options) {
|
|
|
21305
21673
|
const context = {
|
|
21306
21674
|
options: client._options,
|
|
21307
21675
|
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 : "",
|
|
21308
|
-
operation_id: "
|
|
21676
|
+
operation_id: "GetTrigger",
|
|
21309
21677
|
o_auth2_scopes: null,
|
|
21310
21678
|
resolved_security: requestSecurity,
|
|
21311
21679
|
security_source: client._options.security,
|
|
@@ -21349,7 +21717,7 @@ async function $do$4(client, id, api_version, options) {
|
|
|
21349
21717
|
return [doResult, { status: "request-error", request: req }];
|
|
21350
21718
|
}
|
|
21351
21719
|
const response = doResult.value;
|
|
21352
|
-
const [result] = await match(
|
|
21720
|
+
const [result] = await match(json(200), fail("4XX"), fail("5XX"))(response, req);
|
|
21353
21721
|
if (!result.ok) {
|
|
21354
21722
|
return [result, { status: "complete", request: req, response }];
|
|
21355
21723
|
}
|
|
@@ -21364,14 +21732,15 @@ async function $do$4(client, id, api_version, options) {
|
|
|
21364
21732
|
* g3-prettier-ignore-file
|
|
21365
21733
|
*/
|
|
21366
21734
|
/**
|
|
21367
|
-
* Lists
|
|
21735
|
+
* Lists executions for a trigger.
|
|
21368
21736
|
*/
|
|
21369
|
-
function
|
|
21370
|
-
return new APIPromise($do$
|
|
21737
|
+
function triggersListExecutions(client, trigger_id, api_version, page_size, page_token, options) {
|
|
21738
|
+
return new APIPromise($do$a(client, trigger_id, api_version, page_size, page_token, options));
|
|
21371
21739
|
}
|
|
21372
|
-
async function $do$
|
|
21740
|
+
async function $do$a(client, trigger_id, api_version, page_size, page_token, options) {
|
|
21373
21741
|
var _a, _b, _c;
|
|
21374
21742
|
const input = {
|
|
21743
|
+
trigger_id: trigger_id,
|
|
21375
21744
|
api_version: api_version,
|
|
21376
21745
|
page_size: page_size,
|
|
21377
21746
|
page_token: page_token,
|
|
@@ -21379,12 +21748,16 @@ async function $do$3(client, api_version, page_size, page_token, options) {
|
|
|
21379
21748
|
const payload = input;
|
|
21380
21749
|
const body = null;
|
|
21381
21750
|
const pathParams = {
|
|
21382
|
-
api_version: encodeSimple("api_version", (_a = payload
|
|
21751
|
+
api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
|
|
21752
|
+
trigger_id: encodeSimple("trigger_id", payload.trigger_id, {
|
|
21753
|
+
explode: false,
|
|
21754
|
+
charEncoding: "percent",
|
|
21755
|
+
}),
|
|
21383
21756
|
};
|
|
21384
|
-
const path = pathToFunc("/{api_version}/
|
|
21757
|
+
const path = pathToFunc("/{api_version}/triggers/{trigger_id}/executions")(pathParams);
|
|
21385
21758
|
const query = encodeFormQuery({
|
|
21386
|
-
"page_size": payload
|
|
21387
|
-
"page_token": payload
|
|
21759
|
+
"page_size": payload.page_size,
|
|
21760
|
+
"page_token": payload.page_token,
|
|
21388
21761
|
});
|
|
21389
21762
|
const headers = new Headers(compactMap({
|
|
21390
21763
|
Accept: "application/json",
|
|
@@ -21394,7 +21767,7 @@ async function $do$3(client, api_version, page_size, page_token, options) {
|
|
|
21394
21767
|
const context = {
|
|
21395
21768
|
options: client._options,
|
|
21396
21769
|
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 : "",
|
|
21397
|
-
operation_id: "
|
|
21770
|
+
operation_id: "ListTriggerExecutions",
|
|
21398
21771
|
o_auth2_scopes: null,
|
|
21399
21772
|
resolved_security: requestSecurity,
|
|
21400
21773
|
security_source: client._options.security,
|
|
@@ -21439,7 +21812,7 @@ async function $do$3(client, api_version, page_size, page_token, options) {
|
|
|
21439
21812
|
return [doResult, { status: "request-error", request: req }];
|
|
21440
21813
|
}
|
|
21441
21814
|
const response = doResult.value;
|
|
21442
|
-
const [result] = await match(
|
|
21815
|
+
const [result] = await match(json(200), fail("4XX"), fail("5XX"))(response, req);
|
|
21443
21816
|
if (!result.ok) {
|
|
21444
21817
|
return [result, { status: "complete", request: req, response }];
|
|
21445
21818
|
}
|
|
@@ -21454,30 +21827,31 @@ async function $do$3(client, api_version, page_size, page_token, options) {
|
|
|
21454
21827
|
* g3-prettier-ignore-file
|
|
21455
21828
|
*/
|
|
21456
21829
|
/**
|
|
21457
|
-
*
|
|
21830
|
+
* Lists triggers for a project.
|
|
21458
21831
|
*/
|
|
21459
|
-
function
|
|
21460
|
-
return new APIPromise($do$
|
|
21832
|
+
function triggersList(client, api_version, filter, page_size, page_token, options) {
|
|
21833
|
+
return new APIPromise($do$9(client, api_version, filter, page_size, page_token, options));
|
|
21461
21834
|
}
|
|
21462
|
-
async function $do$
|
|
21835
|
+
async function $do$9(client, api_version, filter, page_size, page_token, options) {
|
|
21463
21836
|
var _a, _b, _c;
|
|
21464
21837
|
const input = {
|
|
21465
|
-
id: id,
|
|
21466
21838
|
api_version: api_version,
|
|
21467
|
-
|
|
21839
|
+
filter: filter,
|
|
21840
|
+
page_size: page_size,
|
|
21841
|
+
page_token: page_token,
|
|
21468
21842
|
};
|
|
21469
21843
|
const payload = input;
|
|
21470
|
-
const body
|
|
21844
|
+
const body = null;
|
|
21471
21845
|
const pathParams = {
|
|
21472
|
-
api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
|
|
21473
|
-
id: encodeSimple("id", payload.id, {
|
|
21474
|
-
explode: false,
|
|
21475
|
-
charEncoding: "percent",
|
|
21476
|
-
}),
|
|
21846
|
+
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" }),
|
|
21477
21847
|
};
|
|
21478
|
-
const path = pathToFunc("/{api_version}/
|
|
21848
|
+
const path = pathToFunc("/{api_version}/triggers")(pathParams);
|
|
21849
|
+
const query = encodeFormQuery({
|
|
21850
|
+
"filter": payload === null || payload === void 0 ? void 0 : payload.filter,
|
|
21851
|
+
"page_size": payload === null || payload === void 0 ? void 0 : payload.page_size,
|
|
21852
|
+
"page_token": payload === null || payload === void 0 ? void 0 : payload.page_token,
|
|
21853
|
+
});
|
|
21479
21854
|
const headers = new Headers(compactMap({
|
|
21480
|
-
"Content-Type": "application/json",
|
|
21481
21855
|
Accept: "application/json",
|
|
21482
21856
|
}));
|
|
21483
21857
|
const securityInput = await extractSecurity(client._options.security);
|
|
@@ -21485,7 +21859,7 @@ async function $do$2(client, id, api_version, body, options) {
|
|
|
21485
21859
|
const context = {
|
|
21486
21860
|
options: client._options,
|
|
21487
21861
|
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 : "",
|
|
21488
|
-
operation_id: "
|
|
21862
|
+
operation_id: "ListTriggers",
|
|
21489
21863
|
o_auth2_scopes: null,
|
|
21490
21864
|
resolved_security: requestSecurity,
|
|
21491
21865
|
security_source: client._options.security,
|
|
@@ -21507,11 +21881,12 @@ async function $do$2(client, id, api_version, body, options) {
|
|
|
21507
21881
|
};
|
|
21508
21882
|
const requestRes = client._createRequest(context, {
|
|
21509
21883
|
security: requestSecurity,
|
|
21510
|
-
method: "
|
|
21884
|
+
method: "GET",
|
|
21511
21885
|
baseURL: options === null || options === void 0 ? void 0 : options.server_url,
|
|
21512
21886
|
path: path,
|
|
21513
21887
|
headers: headers,
|
|
21514
|
-
|
|
21888
|
+
query: query,
|
|
21889
|
+
body: body,
|
|
21515
21890
|
userAgent: client._options.user_agent,
|
|
21516
21891
|
timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
|
|
21517
21892
|
}, options);
|
|
@@ -21529,7 +21904,7 @@ async function $do$2(client, id, api_version, body, options) {
|
|
|
21529
21904
|
return [doResult, { status: "request-error", request: req }];
|
|
21530
21905
|
}
|
|
21531
21906
|
const response = doResult.value;
|
|
21532
|
-
const [result] = await match(
|
|
21907
|
+
const [result] = await match(json(200), fail("4XX"), fail("5XX"))(response, req);
|
|
21533
21908
|
if (!result.ok) {
|
|
21534
21909
|
return [result, { status: "complete", request: req, response }];
|
|
21535
21910
|
}
|
|
@@ -21544,30 +21919,28 @@ async function $do$2(client, id, api_version, body, options) {
|
|
|
21544
21919
|
* g3-prettier-ignore-file
|
|
21545
21920
|
*/
|
|
21546
21921
|
/**
|
|
21547
|
-
*
|
|
21922
|
+
* Runs a trigger immediately.
|
|
21548
21923
|
*/
|
|
21549
|
-
function
|
|
21550
|
-
return new APIPromise($do$
|
|
21924
|
+
function triggersRun(client, trigger_id, api_version, options) {
|
|
21925
|
+
return new APIPromise($do$8(client, trigger_id, api_version, options));
|
|
21551
21926
|
}
|
|
21552
|
-
async function $do$
|
|
21927
|
+
async function $do$8(client, trigger_id, api_version, options) {
|
|
21553
21928
|
var _a, _b, _c;
|
|
21554
21929
|
const input = {
|
|
21555
|
-
|
|
21930
|
+
trigger_id: trigger_id,
|
|
21556
21931
|
api_version: api_version,
|
|
21557
|
-
body: body,
|
|
21558
21932
|
};
|
|
21559
21933
|
const payload = input;
|
|
21560
|
-
const body
|
|
21934
|
+
const body = null;
|
|
21561
21935
|
const pathParams = {
|
|
21562
21936
|
api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
|
|
21563
|
-
|
|
21937
|
+
trigger_id: encodeSimple("trigger_id", payload.trigger_id, {
|
|
21564
21938
|
explode: false,
|
|
21565
21939
|
charEncoding: "percent",
|
|
21566
21940
|
}),
|
|
21567
21941
|
};
|
|
21568
|
-
const path = pathToFunc("/{api_version}/
|
|
21942
|
+
const path = pathToFunc("/{api_version}/triggers/{trigger_id}/executions")(pathParams);
|
|
21569
21943
|
const headers = new Headers(compactMap({
|
|
21570
|
-
"Content-Type": "application/json",
|
|
21571
21944
|
Accept: "application/json",
|
|
21572
21945
|
}));
|
|
21573
21946
|
const securityInput = await extractSecurity(client._options.security);
|
|
@@ -21575,7 +21948,7 @@ async function $do$1(client, id, api_version, body, options) {
|
|
|
21575
21948
|
const context = {
|
|
21576
21949
|
options: client._options,
|
|
21577
21950
|
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 : "",
|
|
21578
|
-
operation_id: "
|
|
21951
|
+
operation_id: "RunTrigger",
|
|
21579
21952
|
o_auth2_scopes: null,
|
|
21580
21953
|
resolved_security: requestSecurity,
|
|
21581
21954
|
security_source: client._options.security,
|
|
@@ -21601,7 +21974,7 @@ async function $do$1(client, id, api_version, body, options) {
|
|
|
21601
21974
|
baseURL: options === null || options === void 0 ? void 0 : options.server_url,
|
|
21602
21975
|
path: path,
|
|
21603
21976
|
headers: headers,
|
|
21604
|
-
body: body
|
|
21977
|
+
body: body,
|
|
21605
21978
|
userAgent: client._options.user_agent,
|
|
21606
21979
|
timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
|
|
21607
21980
|
}, options);
|
|
@@ -21619,7 +21992,7 @@ async function $do$1(client, id, api_version, body, options) {
|
|
|
21619
21992
|
return [doResult, { status: "request-error", request: req }];
|
|
21620
21993
|
}
|
|
21621
21994
|
const response = doResult.value;
|
|
21622
|
-
const [result] = await match(
|
|
21995
|
+
const [result] = await match(json(200), fail("4XX"), fail("5XX"))(response, req);
|
|
21623
21996
|
if (!result.ok) {
|
|
21624
21997
|
return [result, { status: "complete", request: req, response }];
|
|
21625
21998
|
}
|
|
@@ -21634,18 +22007,17 @@ async function $do$1(client, id, api_version, body, options) {
|
|
|
21634
22007
|
* g3-prettier-ignore-file
|
|
21635
22008
|
*/
|
|
21636
22009
|
/**
|
|
21637
|
-
* Updates
|
|
22010
|
+
* Updates a trigger.
|
|
21638
22011
|
*/
|
|
21639
|
-
function
|
|
21640
|
-
return new APIPromise($do(client, id,
|
|
22012
|
+
function triggersUpdate(client, id, body, api_version, options) {
|
|
22013
|
+
return new APIPromise($do$7(client, id, body, api_version, options));
|
|
21641
22014
|
}
|
|
21642
|
-
async function $do(client, id,
|
|
22015
|
+
async function $do$7(client, id, body, api_version, options) {
|
|
21643
22016
|
var _a, _b, _c;
|
|
21644
22017
|
const input = {
|
|
21645
22018
|
id: id,
|
|
21646
|
-
api_version: api_version,
|
|
21647
|
-
update_mask: update_mask,
|
|
21648
22019
|
body: body,
|
|
22020
|
+
api_version: api_version,
|
|
21649
22021
|
};
|
|
21650
22022
|
const payload = input;
|
|
21651
22023
|
const body$ = encodeJSON("body", payload.body, { explode: true });
|
|
@@ -21656,10 +22028,7 @@ async function $do(client, id, api_version, update_mask, body, options) {
|
|
|
21656
22028
|
charEncoding: "percent",
|
|
21657
22029
|
}),
|
|
21658
22030
|
};
|
|
21659
|
-
const path = pathToFunc("/{api_version}/
|
|
21660
|
-
const query = encodeFormQuery({
|
|
21661
|
-
"update_mask": payload.update_mask,
|
|
21662
|
-
});
|
|
22031
|
+
const path = pathToFunc("/{api_version}/triggers/{id}")(pathParams);
|
|
21663
22032
|
const headers = new Headers(compactMap({
|
|
21664
22033
|
"Content-Type": "application/json",
|
|
21665
22034
|
Accept: "application/json",
|
|
@@ -21669,7 +22038,7 @@ async function $do(client, id, api_version, update_mask, body, options) {
|
|
|
21669
22038
|
const context = {
|
|
21670
22039
|
options: client._options,
|
|
21671
22040
|
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 : "",
|
|
21672
|
-
operation_id: "
|
|
22041
|
+
operation_id: "UpdateTrigger",
|
|
21673
22042
|
o_auth2_scopes: null,
|
|
21674
22043
|
resolved_security: requestSecurity,
|
|
21675
22044
|
security_source: client._options.security,
|
|
@@ -21695,7 +22064,6 @@ async function $do(client, id, api_version, update_mask, body, options) {
|
|
|
21695
22064
|
baseURL: options === null || options === void 0 ? void 0 : options.server_url,
|
|
21696
22065
|
path: path,
|
|
21697
22066
|
headers: headers,
|
|
21698
|
-
query: query,
|
|
21699
22067
|
body: body$,
|
|
21700
22068
|
userAgent: client._options.user_agent,
|
|
21701
22069
|
timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
|
|
@@ -21714,7 +22082,7 @@ async function $do(client, id, api_version, update_mask, body, options) {
|
|
|
21714
22082
|
return [doResult, { status: "request-error", request: req }];
|
|
21715
22083
|
}
|
|
21716
22084
|
const response = doResult.value;
|
|
21717
|
-
const [result] = await match(
|
|
22085
|
+
const [result] = await match(json(200), fail("4XX"), fail("5XX"))(response, req);
|
|
21718
22086
|
if (!result.ok) {
|
|
21719
22087
|
return [result, { status: "complete", request: req, response }];
|
|
21720
22088
|
}
|
|
@@ -21728,53 +22096,50 @@ async function $do(client, id, api_version, update_mask, body, options) {
|
|
|
21728
22096
|
*
|
|
21729
22097
|
* g3-prettier-ignore-file
|
|
21730
22098
|
*/
|
|
21731
|
-
class
|
|
22099
|
+
class Triggers extends ClientSDK {
|
|
21732
22100
|
/**
|
|
21733
|
-
* Creates a new
|
|
22101
|
+
* Creates a new trigger that will invoke the specified agent on the given cron schedule.
|
|
21734
22102
|
*/
|
|
21735
22103
|
create(params, options) {
|
|
21736
22104
|
const { api_version } = params, body = __rest(params, ["api_version"]);
|
|
21737
|
-
return unwrapAsAPIPromise(
|
|
22105
|
+
return unwrapAsAPIPromise(triggersCreate(this, body, api_version, options));
|
|
21738
22106
|
}
|
|
21739
22107
|
/**
|
|
21740
|
-
* Lists
|
|
22108
|
+
* Lists triggers for a project.
|
|
21741
22109
|
*/
|
|
21742
22110
|
list(params, options) {
|
|
21743
|
-
return unwrapAsAPIPromise(
|
|
22111
|
+
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));
|
|
21744
22112
|
}
|
|
21745
22113
|
/**
|
|
21746
|
-
* Gets a
|
|
22114
|
+
* Gets details of a single trigger.
|
|
21747
22115
|
*/
|
|
21748
22116
|
get(id, params, options) {
|
|
21749
|
-
return unwrapAsAPIPromise(
|
|
22117
|
+
return unwrapAsAPIPromise(triggersGet(this, id, params === null || params === void 0 ? void 0 : params.api_version, options));
|
|
21750
22118
|
}
|
|
21751
22119
|
/**
|
|
21752
|
-
* Updates
|
|
22120
|
+
* Updates a trigger.
|
|
21753
22121
|
*/
|
|
21754
22122
|
update(id, params, options) {
|
|
21755
|
-
const
|
|
21756
|
-
|
|
21757
|
-
? undefined
|
|
21758
|
-
: body$body;
|
|
21759
|
-
return unwrapAsAPIPromise(webhooksUpdate(this, id, api_version, update_mask, body, options));
|
|
22123
|
+
const { api_version } = params, body = __rest(params, ["api_version"]);
|
|
22124
|
+
return unwrapAsAPIPromise(triggersUpdate(this, id, body, api_version, options));
|
|
21760
22125
|
}
|
|
21761
22126
|
/**
|
|
21762
|
-
* Deletes a
|
|
22127
|
+
* Deletes a trigger.
|
|
21763
22128
|
*/
|
|
21764
22129
|
delete(id, params, options) {
|
|
21765
|
-
return unwrapAsAPIPromise(
|
|
22130
|
+
return unwrapAsAPIPromise(triggersDelete(this, id, params === null || params === void 0 ? void 0 : params.api_version, options));
|
|
21766
22131
|
}
|
|
21767
22132
|
/**
|
|
21768
|
-
*
|
|
22133
|
+
* Runs a trigger immediately.
|
|
21769
22134
|
*/
|
|
21770
|
-
|
|
21771
|
-
return unwrapAsAPIPromise(
|
|
22135
|
+
run(trigger_id, params, options) {
|
|
22136
|
+
return unwrapAsAPIPromise(triggersRun(this, trigger_id, params === null || params === void 0 ? void 0 : params.api_version, options));
|
|
21772
22137
|
}
|
|
21773
22138
|
/**
|
|
21774
|
-
*
|
|
22139
|
+
* Lists executions for a trigger.
|
|
21775
22140
|
*/
|
|
21776
|
-
|
|
21777
|
-
return unwrapAsAPIPromise(
|
|
22141
|
+
listExecutions(trigger_id, params, options) {
|
|
22142
|
+
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));
|
|
21778
22143
|
}
|
|
21779
22144
|
}
|
|
21780
22145
|
|
|
@@ -21785,23 +22150,83 @@ class Webhooks extends ClientSDK {
|
|
|
21785
22150
|
*
|
|
21786
22151
|
* g3-prettier-ignore-file
|
|
21787
22152
|
*/
|
|
21788
|
-
|
|
21789
|
-
*
|
|
22153
|
+
/**
|
|
22154
|
+
* Creates a new Webhook.
|
|
21790
22155
|
*/
|
|
21791
|
-
|
|
21792
|
-
|
|
21793
|
-
|
|
21794
|
-
|
|
22156
|
+
function webhooksCreate(client, body, api_version, options) {
|
|
22157
|
+
return new APIPromise($do$6(client, body, api_version, options));
|
|
22158
|
+
}
|
|
22159
|
+
async function $do$6(client, body, api_version, options) {
|
|
22160
|
+
var _a, _b, _c;
|
|
22161
|
+
const input = {
|
|
22162
|
+
body: body,
|
|
22163
|
+
api_version: api_version,
|
|
22164
|
+
};
|
|
22165
|
+
const payload = input;
|
|
22166
|
+
const body$ = encodeJSON("body", payload.body, { explode: true });
|
|
22167
|
+
const pathParams = {
|
|
22168
|
+
api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
|
|
22169
|
+
};
|
|
22170
|
+
const path = pathToFunc("/{api_version}/webhooks")(pathParams);
|
|
22171
|
+
const headers = new Headers(compactMap({
|
|
22172
|
+
"Content-Type": "application/json",
|
|
22173
|
+
Accept: "application/json",
|
|
22174
|
+
}));
|
|
22175
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
22176
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
22177
|
+
const context = {
|
|
22178
|
+
options: client._options,
|
|
22179
|
+
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 : "",
|
|
22180
|
+
operation_id: "CreateWebhook",
|
|
22181
|
+
o_auth2_scopes: null,
|
|
22182
|
+
resolved_security: requestSecurity,
|
|
22183
|
+
security_source: client._options.security,
|
|
22184
|
+
retry_config: (options === null || options === void 0 ? void 0 : options.retries)
|
|
22185
|
+
|| client._options.retry_config
|
|
22186
|
+
|| {
|
|
22187
|
+
strategy: "attempt-count-backoff",
|
|
22188
|
+
backoff: {
|
|
22189
|
+
initialInterval: 500,
|
|
22190
|
+
maxInterval: 8000,
|
|
22191
|
+
exponent: 2,
|
|
22192
|
+
maxElapsedTime: 30000,
|
|
22193
|
+
},
|
|
22194
|
+
retryConnectionErrors: true,
|
|
22195
|
+
maxRetries: 4,
|
|
22196
|
+
}
|
|
22197
|
+
|| { strategy: "none" },
|
|
22198
|
+
retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
|
|
22199
|
+
};
|
|
22200
|
+
const requestRes = client._createRequest(context, {
|
|
22201
|
+
security: requestSecurity,
|
|
22202
|
+
method: "POST",
|
|
22203
|
+
baseURL: options === null || options === void 0 ? void 0 : options.server_url,
|
|
22204
|
+
path: path,
|
|
22205
|
+
headers: headers,
|
|
22206
|
+
body: body$,
|
|
22207
|
+
userAgent: client._options.user_agent,
|
|
22208
|
+
timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
|
|
22209
|
+
}, options);
|
|
22210
|
+
if (!requestRes.ok) {
|
|
22211
|
+
return [requestRes, { status: "invalid" }];
|
|
21795
22212
|
}
|
|
21796
|
-
|
|
21797
|
-
|
|
21798
|
-
|
|
22213
|
+
const req = requestRes.value;
|
|
22214
|
+
const doResult = await client._do(req, {
|
|
22215
|
+
context,
|
|
22216
|
+
isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
|
|
22217
|
+
retryConfig: context.retry_config,
|
|
22218
|
+
retryCodes: context.retry_codes,
|
|
22219
|
+
});
|
|
22220
|
+
if (!doResult.ok) {
|
|
22221
|
+
return [doResult, { status: "request-error", request: req }];
|
|
21799
22222
|
}
|
|
21800
|
-
|
|
21801
|
-
|
|
21802
|
-
|
|
22223
|
+
const response = doResult.value;
|
|
22224
|
+
const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
|
|
22225
|
+
if (!result.ok) {
|
|
22226
|
+
return [result, { status: "complete", request: req, response }];
|
|
21803
22227
|
}
|
|
21804
|
-
};
|
|
22228
|
+
return [result, { status: "complete", request: req, response }];
|
|
22229
|
+
}
|
|
21805
22230
|
|
|
21806
22231
|
/**
|
|
21807
22232
|
* @license
|
|
@@ -21810,33 +22235,660 @@ let GoogleGenAI$1 = class GoogleGenAI extends ClientSDK {
|
|
|
21810
22235
|
*
|
|
21811
22236
|
* g3-prettier-ignore-file
|
|
21812
22237
|
*/
|
|
21813
|
-
|
|
21814
|
-
|
|
21815
|
-
|
|
21816
|
-
|
|
21817
|
-
|
|
21818
|
-
const serverURL = parentClient.getBaseUrl();
|
|
21819
|
-
if (!serverURL) {
|
|
21820
|
-
throw new Error("Base URL must be set.");
|
|
21821
|
-
}
|
|
21822
|
-
return serverURL.replace(/\/+$/, "");
|
|
21823
|
-
}
|
|
21824
|
-
function getGoogleGenAIAPIVersion(parentClient) {
|
|
21825
|
-
const apiVersion = trimSlashes(parentClient.getApiVersion());
|
|
21826
|
-
const project = parentClient.getProject();
|
|
21827
|
-
const location = parentClient.getLocation();
|
|
21828
|
-
if (parentClient.isVertexAI() && apiVersion && project && location) {
|
|
21829
|
-
return (`${apiVersion}/projects/${encodeURIComponent(project)}` +
|
|
21830
|
-
`/locations/${encodeURIComponent(location)}`);
|
|
21831
|
-
}
|
|
21832
|
-
return apiVersion;
|
|
22238
|
+
/**
|
|
22239
|
+
* Deletes a Webhook.
|
|
22240
|
+
*/
|
|
22241
|
+
function webhooksDelete(client, id, api_version, options) {
|
|
22242
|
+
return new APIPromise($do$5(client, id, api_version, options));
|
|
21833
22243
|
}
|
|
21834
|
-
function
|
|
21835
|
-
var _a, _b, _c
|
|
21836
|
-
const
|
|
21837
|
-
|
|
22244
|
+
async function $do$5(client, id, api_version, options) {
|
|
22245
|
+
var _a, _b, _c;
|
|
22246
|
+
const input = {
|
|
22247
|
+
id: id,
|
|
22248
|
+
api_version: api_version,
|
|
22249
|
+
};
|
|
22250
|
+
const payload = input;
|
|
22251
|
+
const body = null;
|
|
22252
|
+
const pathParams = {
|
|
22253
|
+
api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
|
|
22254
|
+
id: encodeSimple("id", payload.id, {
|
|
22255
|
+
explode: false,
|
|
22256
|
+
charEncoding: "percent",
|
|
22257
|
+
}),
|
|
22258
|
+
};
|
|
22259
|
+
const path = pathToFunc("/{api_version}/webhooks/{id}")(pathParams);
|
|
22260
|
+
const headers = new Headers(compactMap({
|
|
22261
|
+
Accept: "application/json",
|
|
22262
|
+
}));
|
|
22263
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
22264
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
22265
|
+
const context = {
|
|
22266
|
+
options: client._options,
|
|
22267
|
+
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 : "",
|
|
22268
|
+
operation_id: "DeleteWebhook",
|
|
22269
|
+
o_auth2_scopes: null,
|
|
22270
|
+
resolved_security: requestSecurity,
|
|
22271
|
+
security_source: client._options.security,
|
|
22272
|
+
retry_config: (options === null || options === void 0 ? void 0 : options.retries)
|
|
22273
|
+
|| client._options.retry_config
|
|
22274
|
+
|| {
|
|
22275
|
+
strategy: "attempt-count-backoff",
|
|
22276
|
+
backoff: {
|
|
22277
|
+
initialInterval: 500,
|
|
22278
|
+
maxInterval: 8000,
|
|
22279
|
+
exponent: 2,
|
|
22280
|
+
maxElapsedTime: 30000,
|
|
22281
|
+
},
|
|
22282
|
+
retryConnectionErrors: true,
|
|
22283
|
+
maxRetries: 4,
|
|
22284
|
+
}
|
|
22285
|
+
|| { strategy: "none" },
|
|
22286
|
+
retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
|
|
22287
|
+
};
|
|
22288
|
+
const requestRes = client._createRequest(context, {
|
|
22289
|
+
security: requestSecurity,
|
|
22290
|
+
method: "DELETE",
|
|
22291
|
+
baseURL: options === null || options === void 0 ? void 0 : options.server_url,
|
|
22292
|
+
path: path,
|
|
22293
|
+
headers: headers,
|
|
22294
|
+
body: body,
|
|
22295
|
+
userAgent: client._options.user_agent,
|
|
22296
|
+
timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
|
|
22297
|
+
}, options);
|
|
22298
|
+
if (!requestRes.ok) {
|
|
22299
|
+
return [requestRes, { status: "invalid" }];
|
|
22300
|
+
}
|
|
22301
|
+
const req = requestRes.value;
|
|
22302
|
+
const doResult = await client._do(req, {
|
|
22303
|
+
context,
|
|
22304
|
+
isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
|
|
22305
|
+
retryConfig: context.retry_config,
|
|
22306
|
+
retryCodes: context.retry_codes,
|
|
22307
|
+
});
|
|
22308
|
+
if (!doResult.ok) {
|
|
22309
|
+
return [doResult, { status: "request-error", request: req }];
|
|
22310
|
+
}
|
|
22311
|
+
const response = doResult.value;
|
|
22312
|
+
const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
|
|
22313
|
+
if (!result.ok) {
|
|
22314
|
+
return [result, { status: "complete", request: req, response }];
|
|
22315
|
+
}
|
|
22316
|
+
return [result, { status: "complete", request: req, response }];
|
|
22317
|
+
}
|
|
22318
|
+
|
|
22319
|
+
/**
|
|
22320
|
+
* @license
|
|
22321
|
+
* Copyright 2026 Google LLC
|
|
22322
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
22323
|
+
*
|
|
22324
|
+
* g3-prettier-ignore-file
|
|
22325
|
+
*/
|
|
22326
|
+
/**
|
|
22327
|
+
* Gets a specific Webhook.
|
|
22328
|
+
*/
|
|
22329
|
+
function webhooksGet(client, id, api_version, options) {
|
|
22330
|
+
return new APIPromise($do$4(client, id, api_version, options));
|
|
22331
|
+
}
|
|
22332
|
+
async function $do$4(client, id, api_version, options) {
|
|
22333
|
+
var _a, _b, _c;
|
|
22334
|
+
const input = {
|
|
22335
|
+
id: id,
|
|
22336
|
+
api_version: api_version,
|
|
22337
|
+
};
|
|
22338
|
+
const payload = input;
|
|
22339
|
+
const body = null;
|
|
22340
|
+
const pathParams = {
|
|
22341
|
+
api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
|
|
22342
|
+
id: encodeSimple("id", payload.id, {
|
|
22343
|
+
explode: false,
|
|
22344
|
+
charEncoding: "percent",
|
|
22345
|
+
}),
|
|
22346
|
+
};
|
|
22347
|
+
const path = pathToFunc("/{api_version}/webhooks/{id}")(pathParams);
|
|
22348
|
+
const headers = new Headers(compactMap({
|
|
22349
|
+
Accept: "application/json",
|
|
22350
|
+
}));
|
|
22351
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
22352
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
22353
|
+
const context = {
|
|
22354
|
+
options: client._options,
|
|
22355
|
+
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 : "",
|
|
22356
|
+
operation_id: "GetWebhook",
|
|
22357
|
+
o_auth2_scopes: null,
|
|
22358
|
+
resolved_security: requestSecurity,
|
|
22359
|
+
security_source: client._options.security,
|
|
22360
|
+
retry_config: (options === null || options === void 0 ? void 0 : options.retries)
|
|
22361
|
+
|| client._options.retry_config
|
|
22362
|
+
|| {
|
|
22363
|
+
strategy: "attempt-count-backoff",
|
|
22364
|
+
backoff: {
|
|
22365
|
+
initialInterval: 500,
|
|
22366
|
+
maxInterval: 8000,
|
|
22367
|
+
exponent: 2,
|
|
22368
|
+
maxElapsedTime: 30000,
|
|
22369
|
+
},
|
|
22370
|
+
retryConnectionErrors: true,
|
|
22371
|
+
maxRetries: 4,
|
|
22372
|
+
}
|
|
22373
|
+
|| { strategy: "none" },
|
|
22374
|
+
retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
|
|
22375
|
+
};
|
|
22376
|
+
const requestRes = client._createRequest(context, {
|
|
22377
|
+
security: requestSecurity,
|
|
22378
|
+
method: "GET",
|
|
22379
|
+
baseURL: options === null || options === void 0 ? void 0 : options.server_url,
|
|
22380
|
+
path: path,
|
|
22381
|
+
headers: headers,
|
|
22382
|
+
body: body,
|
|
22383
|
+
userAgent: client._options.user_agent,
|
|
22384
|
+
timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
|
|
22385
|
+
}, options);
|
|
22386
|
+
if (!requestRes.ok) {
|
|
22387
|
+
return [requestRes, { status: "invalid" }];
|
|
22388
|
+
}
|
|
22389
|
+
const req = requestRes.value;
|
|
22390
|
+
const doResult = await client._do(req, {
|
|
22391
|
+
context,
|
|
22392
|
+
isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
|
|
22393
|
+
retryConfig: context.retry_config,
|
|
22394
|
+
retryCodes: context.retry_codes,
|
|
22395
|
+
});
|
|
22396
|
+
if (!doResult.ok) {
|
|
22397
|
+
return [doResult, { status: "request-error", request: req }];
|
|
22398
|
+
}
|
|
22399
|
+
const response = doResult.value;
|
|
22400
|
+
const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
|
|
22401
|
+
if (!result.ok) {
|
|
22402
|
+
return [result, { status: "complete", request: req, response }];
|
|
22403
|
+
}
|
|
22404
|
+
return [result, { status: "complete", request: req, response }];
|
|
22405
|
+
}
|
|
22406
|
+
|
|
22407
|
+
/**
|
|
22408
|
+
* @license
|
|
22409
|
+
* Copyright 2026 Google LLC
|
|
22410
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
22411
|
+
*
|
|
22412
|
+
* g3-prettier-ignore-file
|
|
22413
|
+
*/
|
|
22414
|
+
/**
|
|
22415
|
+
* Lists all Webhooks.
|
|
22416
|
+
*/
|
|
22417
|
+
function webhooksList(client, api_version, page_size, page_token, options) {
|
|
22418
|
+
return new APIPromise($do$3(client, api_version, page_size, page_token, options));
|
|
22419
|
+
}
|
|
22420
|
+
async function $do$3(client, api_version, page_size, page_token, options) {
|
|
22421
|
+
var _a, _b, _c;
|
|
22422
|
+
const input = {
|
|
22423
|
+
api_version: api_version,
|
|
22424
|
+
page_size: page_size,
|
|
22425
|
+
page_token: page_token,
|
|
22426
|
+
};
|
|
22427
|
+
const payload = input;
|
|
22428
|
+
const body = null;
|
|
22429
|
+
const pathParams = {
|
|
22430
|
+
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" }),
|
|
22431
|
+
};
|
|
22432
|
+
const path = pathToFunc("/{api_version}/webhooks")(pathParams);
|
|
22433
|
+
const query = encodeFormQuery({
|
|
22434
|
+
"page_size": payload === null || payload === void 0 ? void 0 : payload.page_size,
|
|
22435
|
+
"page_token": payload === null || payload === void 0 ? void 0 : payload.page_token,
|
|
22436
|
+
});
|
|
22437
|
+
const headers = new Headers(compactMap({
|
|
22438
|
+
Accept: "application/json",
|
|
22439
|
+
}));
|
|
22440
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
22441
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
22442
|
+
const context = {
|
|
22443
|
+
options: client._options,
|
|
22444
|
+
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 : "",
|
|
22445
|
+
operation_id: "ListWebhooks",
|
|
22446
|
+
o_auth2_scopes: null,
|
|
22447
|
+
resolved_security: requestSecurity,
|
|
22448
|
+
security_source: client._options.security,
|
|
22449
|
+
retry_config: (options === null || options === void 0 ? void 0 : options.retries)
|
|
22450
|
+
|| client._options.retry_config
|
|
22451
|
+
|| {
|
|
22452
|
+
strategy: "attempt-count-backoff",
|
|
22453
|
+
backoff: {
|
|
22454
|
+
initialInterval: 500,
|
|
22455
|
+
maxInterval: 8000,
|
|
22456
|
+
exponent: 2,
|
|
22457
|
+
maxElapsedTime: 30000,
|
|
22458
|
+
},
|
|
22459
|
+
retryConnectionErrors: true,
|
|
22460
|
+
maxRetries: 4,
|
|
22461
|
+
}
|
|
22462
|
+
|| { strategy: "none" },
|
|
22463
|
+
retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
|
|
22464
|
+
};
|
|
22465
|
+
const requestRes = client._createRequest(context, {
|
|
22466
|
+
security: requestSecurity,
|
|
22467
|
+
method: "GET",
|
|
22468
|
+
baseURL: options === null || options === void 0 ? void 0 : options.server_url,
|
|
22469
|
+
path: path,
|
|
22470
|
+
headers: headers,
|
|
22471
|
+
query: query,
|
|
22472
|
+
body: body,
|
|
22473
|
+
userAgent: client._options.user_agent,
|
|
22474
|
+
timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
|
|
22475
|
+
}, options);
|
|
22476
|
+
if (!requestRes.ok) {
|
|
22477
|
+
return [requestRes, { status: "invalid" }];
|
|
22478
|
+
}
|
|
22479
|
+
const req = requestRes.value;
|
|
22480
|
+
const doResult = await client._do(req, {
|
|
22481
|
+
context,
|
|
22482
|
+
isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
|
|
22483
|
+
retryConfig: context.retry_config,
|
|
22484
|
+
retryCodes: context.retry_codes,
|
|
22485
|
+
});
|
|
22486
|
+
if (!doResult.ok) {
|
|
22487
|
+
return [doResult, { status: "request-error", request: req }];
|
|
22488
|
+
}
|
|
22489
|
+
const response = doResult.value;
|
|
22490
|
+
const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
|
|
22491
|
+
if (!result.ok) {
|
|
22492
|
+
return [result, { status: "complete", request: req, response }];
|
|
22493
|
+
}
|
|
22494
|
+
return [result, { status: "complete", request: req, response }];
|
|
22495
|
+
}
|
|
22496
|
+
|
|
22497
|
+
/**
|
|
22498
|
+
* @license
|
|
22499
|
+
* Copyright 2026 Google LLC
|
|
22500
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
22501
|
+
*
|
|
22502
|
+
* g3-prettier-ignore-file
|
|
22503
|
+
*/
|
|
22504
|
+
/**
|
|
22505
|
+
* Sends a ping event to a Webhook.
|
|
22506
|
+
*/
|
|
22507
|
+
function webhooksPing(client, id, api_version, body, options) {
|
|
22508
|
+
return new APIPromise($do$2(client, id, api_version, body, options));
|
|
22509
|
+
}
|
|
22510
|
+
async function $do$2(client, id, api_version, body, options) {
|
|
22511
|
+
var _a, _b, _c;
|
|
22512
|
+
const input = {
|
|
22513
|
+
id: id,
|
|
22514
|
+
api_version: api_version,
|
|
22515
|
+
body: body,
|
|
22516
|
+
};
|
|
22517
|
+
const payload = input;
|
|
22518
|
+
const body$ = encodeJSON("body", payload.body, { explode: true });
|
|
22519
|
+
const pathParams = {
|
|
22520
|
+
api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
|
|
22521
|
+
id: encodeSimple("id", payload.id, {
|
|
22522
|
+
explode: false,
|
|
22523
|
+
charEncoding: "percent",
|
|
22524
|
+
}),
|
|
22525
|
+
};
|
|
22526
|
+
const path = pathToFunc("/{api_version}/webhooks/{id}:ping")(pathParams);
|
|
22527
|
+
const headers = new Headers(compactMap({
|
|
22528
|
+
"Content-Type": "application/json",
|
|
22529
|
+
Accept: "application/json",
|
|
22530
|
+
}));
|
|
22531
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
22532
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
22533
|
+
const context = {
|
|
22534
|
+
options: client._options,
|
|
22535
|
+
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 : "",
|
|
22536
|
+
operation_id: "PingWebhook",
|
|
22537
|
+
o_auth2_scopes: null,
|
|
22538
|
+
resolved_security: requestSecurity,
|
|
22539
|
+
security_source: client._options.security,
|
|
22540
|
+
retry_config: (options === null || options === void 0 ? void 0 : options.retries)
|
|
22541
|
+
|| client._options.retry_config
|
|
22542
|
+
|| {
|
|
22543
|
+
strategy: "attempt-count-backoff",
|
|
22544
|
+
backoff: {
|
|
22545
|
+
initialInterval: 500,
|
|
22546
|
+
maxInterval: 8000,
|
|
22547
|
+
exponent: 2,
|
|
22548
|
+
maxElapsedTime: 30000,
|
|
22549
|
+
},
|
|
22550
|
+
retryConnectionErrors: true,
|
|
22551
|
+
maxRetries: 4,
|
|
22552
|
+
}
|
|
22553
|
+
|| { strategy: "none" },
|
|
22554
|
+
retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
|
|
22555
|
+
};
|
|
22556
|
+
const requestRes = client._createRequest(context, {
|
|
22557
|
+
security: requestSecurity,
|
|
22558
|
+
method: "POST",
|
|
22559
|
+
baseURL: options === null || options === void 0 ? void 0 : options.server_url,
|
|
22560
|
+
path: path,
|
|
22561
|
+
headers: headers,
|
|
22562
|
+
body: body$,
|
|
22563
|
+
userAgent: client._options.user_agent,
|
|
22564
|
+
timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
|
|
22565
|
+
}, options);
|
|
22566
|
+
if (!requestRes.ok) {
|
|
22567
|
+
return [requestRes, { status: "invalid" }];
|
|
22568
|
+
}
|
|
22569
|
+
const req = requestRes.value;
|
|
22570
|
+
const doResult = await client._do(req, {
|
|
22571
|
+
context,
|
|
22572
|
+
isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
|
|
22573
|
+
retryConfig: context.retry_config,
|
|
22574
|
+
retryCodes: context.retry_codes,
|
|
22575
|
+
});
|
|
22576
|
+
if (!doResult.ok) {
|
|
22577
|
+
return [doResult, { status: "request-error", request: req }];
|
|
22578
|
+
}
|
|
22579
|
+
const response = doResult.value;
|
|
22580
|
+
const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
|
|
22581
|
+
if (!result.ok) {
|
|
22582
|
+
return [result, { status: "complete", request: req, response }];
|
|
22583
|
+
}
|
|
22584
|
+
return [result, { status: "complete", request: req, response }];
|
|
22585
|
+
}
|
|
22586
|
+
|
|
22587
|
+
/**
|
|
22588
|
+
* @license
|
|
22589
|
+
* Copyright 2026 Google LLC
|
|
22590
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
22591
|
+
*
|
|
22592
|
+
* g3-prettier-ignore-file
|
|
22593
|
+
*/
|
|
22594
|
+
/**
|
|
22595
|
+
* Generates a new signing secret for a Webhook.
|
|
22596
|
+
*/
|
|
22597
|
+
function webhooksRotateSigningSecret(client, id, api_version, body, options) {
|
|
22598
|
+
return new APIPromise($do$1(client, id, api_version, body, options));
|
|
22599
|
+
}
|
|
22600
|
+
async function $do$1(client, id, api_version, body, options) {
|
|
22601
|
+
var _a, _b, _c;
|
|
22602
|
+
const input = {
|
|
22603
|
+
id: id,
|
|
22604
|
+
api_version: api_version,
|
|
22605
|
+
body: body,
|
|
22606
|
+
};
|
|
22607
|
+
const payload = input;
|
|
22608
|
+
const body$ = encodeJSON("body", payload.body, { explode: true });
|
|
22609
|
+
const pathParams = {
|
|
22610
|
+
api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
|
|
22611
|
+
id: encodeSimple("id", payload.id, {
|
|
22612
|
+
explode: false,
|
|
22613
|
+
charEncoding: "percent",
|
|
22614
|
+
}),
|
|
22615
|
+
};
|
|
22616
|
+
const path = pathToFunc("/{api_version}/webhooks/{id}:rotateSigningSecret")(pathParams);
|
|
22617
|
+
const headers = new Headers(compactMap({
|
|
22618
|
+
"Content-Type": "application/json",
|
|
22619
|
+
Accept: "application/json",
|
|
22620
|
+
}));
|
|
22621
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
22622
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
22623
|
+
const context = {
|
|
22624
|
+
options: client._options,
|
|
22625
|
+
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 : "",
|
|
22626
|
+
operation_id: "RotateSigningSecret",
|
|
22627
|
+
o_auth2_scopes: null,
|
|
22628
|
+
resolved_security: requestSecurity,
|
|
22629
|
+
security_source: client._options.security,
|
|
22630
|
+
retry_config: (options === null || options === void 0 ? void 0 : options.retries)
|
|
22631
|
+
|| client._options.retry_config
|
|
22632
|
+
|| {
|
|
22633
|
+
strategy: "attempt-count-backoff",
|
|
22634
|
+
backoff: {
|
|
22635
|
+
initialInterval: 500,
|
|
22636
|
+
maxInterval: 8000,
|
|
22637
|
+
exponent: 2,
|
|
22638
|
+
maxElapsedTime: 30000,
|
|
22639
|
+
},
|
|
22640
|
+
retryConnectionErrors: true,
|
|
22641
|
+
maxRetries: 4,
|
|
22642
|
+
}
|
|
22643
|
+
|| { strategy: "none" },
|
|
22644
|
+
retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
|
|
22645
|
+
};
|
|
22646
|
+
const requestRes = client._createRequest(context, {
|
|
22647
|
+
security: requestSecurity,
|
|
22648
|
+
method: "POST",
|
|
22649
|
+
baseURL: options === null || options === void 0 ? void 0 : options.server_url,
|
|
22650
|
+
path: path,
|
|
22651
|
+
headers: headers,
|
|
22652
|
+
body: body$,
|
|
22653
|
+
userAgent: client._options.user_agent,
|
|
22654
|
+
timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
|
|
22655
|
+
}, options);
|
|
22656
|
+
if (!requestRes.ok) {
|
|
22657
|
+
return [requestRes, { status: "invalid" }];
|
|
22658
|
+
}
|
|
22659
|
+
const req = requestRes.value;
|
|
22660
|
+
const doResult = await client._do(req, {
|
|
22661
|
+
context,
|
|
22662
|
+
isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
|
|
22663
|
+
retryConfig: context.retry_config,
|
|
22664
|
+
retryCodes: context.retry_codes,
|
|
22665
|
+
});
|
|
22666
|
+
if (!doResult.ok) {
|
|
22667
|
+
return [doResult, { status: "request-error", request: req }];
|
|
22668
|
+
}
|
|
22669
|
+
const response = doResult.value;
|
|
22670
|
+
const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
|
|
22671
|
+
if (!result.ok) {
|
|
22672
|
+
return [result, { status: "complete", request: req, response }];
|
|
22673
|
+
}
|
|
22674
|
+
return [result, { status: "complete", request: req, response }];
|
|
22675
|
+
}
|
|
22676
|
+
|
|
22677
|
+
/**
|
|
22678
|
+
* @license
|
|
22679
|
+
* Copyright 2026 Google LLC
|
|
22680
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
22681
|
+
*
|
|
22682
|
+
* g3-prettier-ignore-file
|
|
22683
|
+
*/
|
|
22684
|
+
/**
|
|
22685
|
+
* Updates an existing Webhook.
|
|
22686
|
+
*/
|
|
22687
|
+
function webhooksUpdate(client, id, api_version, update_mask, body, options) {
|
|
22688
|
+
return new APIPromise($do(client, id, api_version, update_mask, body, options));
|
|
22689
|
+
}
|
|
22690
|
+
async function $do(client, id, api_version, update_mask, body, options) {
|
|
22691
|
+
var _a, _b, _c;
|
|
22692
|
+
const input = {
|
|
22693
|
+
id: id,
|
|
22694
|
+
api_version: api_version,
|
|
22695
|
+
update_mask: update_mask,
|
|
22696
|
+
body: body,
|
|
22697
|
+
};
|
|
22698
|
+
const payload = input;
|
|
22699
|
+
const body$ = encodeJSON("body", payload.body, { explode: true });
|
|
22700
|
+
const pathParams = {
|
|
22701
|
+
api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
|
|
22702
|
+
id: encodeSimple("id", payload.id, {
|
|
22703
|
+
explode: false,
|
|
22704
|
+
charEncoding: "percent",
|
|
22705
|
+
}),
|
|
22706
|
+
};
|
|
22707
|
+
const path = pathToFunc("/{api_version}/webhooks/{id}")(pathParams);
|
|
22708
|
+
const query = encodeFormQuery({
|
|
22709
|
+
"update_mask": payload.update_mask,
|
|
22710
|
+
});
|
|
22711
|
+
const headers = new Headers(compactMap({
|
|
22712
|
+
"Content-Type": "application/json",
|
|
22713
|
+
Accept: "application/json",
|
|
22714
|
+
}));
|
|
22715
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
22716
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
22717
|
+
const context = {
|
|
22718
|
+
options: client._options,
|
|
22719
|
+
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 : "",
|
|
22720
|
+
operation_id: "UpdateWebhook",
|
|
22721
|
+
o_auth2_scopes: null,
|
|
22722
|
+
resolved_security: requestSecurity,
|
|
22723
|
+
security_source: client._options.security,
|
|
22724
|
+
retry_config: (options === null || options === void 0 ? void 0 : options.retries)
|
|
22725
|
+
|| client._options.retry_config
|
|
22726
|
+
|| {
|
|
22727
|
+
strategy: "attempt-count-backoff",
|
|
22728
|
+
backoff: {
|
|
22729
|
+
initialInterval: 500,
|
|
22730
|
+
maxInterval: 8000,
|
|
22731
|
+
exponent: 2,
|
|
22732
|
+
maxElapsedTime: 30000,
|
|
22733
|
+
},
|
|
22734
|
+
retryConnectionErrors: true,
|
|
22735
|
+
maxRetries: 4,
|
|
22736
|
+
}
|
|
22737
|
+
|| { strategy: "none" },
|
|
22738
|
+
retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
|
|
22739
|
+
};
|
|
22740
|
+
const requestRes = client._createRequest(context, {
|
|
22741
|
+
security: requestSecurity,
|
|
22742
|
+
method: "PATCH",
|
|
22743
|
+
baseURL: options === null || options === void 0 ? void 0 : options.server_url,
|
|
22744
|
+
path: path,
|
|
22745
|
+
headers: headers,
|
|
22746
|
+
query: query,
|
|
22747
|
+
body: body$,
|
|
22748
|
+
userAgent: client._options.user_agent,
|
|
22749
|
+
timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
|
|
22750
|
+
}, options);
|
|
22751
|
+
if (!requestRes.ok) {
|
|
22752
|
+
return [requestRes, { status: "invalid" }];
|
|
22753
|
+
}
|
|
22754
|
+
const req = requestRes.value;
|
|
22755
|
+
const doResult = await client._do(req, {
|
|
22756
|
+
context,
|
|
22757
|
+
isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
|
|
22758
|
+
retryConfig: context.retry_config,
|
|
22759
|
+
retryCodes: context.retry_codes,
|
|
22760
|
+
});
|
|
22761
|
+
if (!doResult.ok) {
|
|
22762
|
+
return [doResult, { status: "request-error", request: req }];
|
|
22763
|
+
}
|
|
22764
|
+
const response = doResult.value;
|
|
22765
|
+
const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
|
|
22766
|
+
if (!result.ok) {
|
|
22767
|
+
return [result, { status: "complete", request: req, response }];
|
|
22768
|
+
}
|
|
22769
|
+
return [result, { status: "complete", request: req, response }];
|
|
22770
|
+
}
|
|
22771
|
+
|
|
22772
|
+
/**
|
|
22773
|
+
* @license
|
|
22774
|
+
* Copyright 2026 Google LLC
|
|
22775
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
22776
|
+
*
|
|
22777
|
+
* g3-prettier-ignore-file
|
|
22778
|
+
*/
|
|
22779
|
+
class Webhooks extends ClientSDK {
|
|
22780
|
+
/**
|
|
22781
|
+
* Creates a new Webhook.
|
|
22782
|
+
*/
|
|
22783
|
+
create(params, options) {
|
|
22784
|
+
const { api_version } = params, body = __rest(params, ["api_version"]);
|
|
22785
|
+
return unwrapAsAPIPromise(webhooksCreate(this, body, api_version, options));
|
|
22786
|
+
}
|
|
22787
|
+
/**
|
|
22788
|
+
* Lists all Webhooks.
|
|
22789
|
+
*/
|
|
22790
|
+
list(params, options) {
|
|
22791
|
+
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));
|
|
22792
|
+
}
|
|
22793
|
+
/**
|
|
22794
|
+
* Gets a specific Webhook.
|
|
22795
|
+
*/
|
|
22796
|
+
get(id, params, options) {
|
|
22797
|
+
return unwrapAsAPIPromise(webhooksGet(this, id, params === null || params === void 0 ? void 0 : params.api_version, options));
|
|
22798
|
+
}
|
|
22799
|
+
/**
|
|
22800
|
+
* Updates an existing Webhook.
|
|
22801
|
+
*/
|
|
22802
|
+
update(id, params, options) {
|
|
22803
|
+
const _a = params !== null && params !== void 0 ? params : {}, { api_version, update_mask } = _a, body$body = __rest(_a, ["api_version", "update_mask"]);
|
|
22804
|
+
const body = params === undefined || Object.keys(body$body).length === 0
|
|
22805
|
+
? undefined
|
|
22806
|
+
: body$body;
|
|
22807
|
+
return unwrapAsAPIPromise(webhooksUpdate(this, id, api_version, update_mask, body, options));
|
|
22808
|
+
}
|
|
22809
|
+
/**
|
|
22810
|
+
* Deletes a Webhook.
|
|
22811
|
+
*/
|
|
22812
|
+
delete(id, params, options) {
|
|
22813
|
+
return unwrapAsAPIPromise(webhooksDelete(this, id, params === null || params === void 0 ? void 0 : params.api_version, options));
|
|
22814
|
+
}
|
|
22815
|
+
/**
|
|
22816
|
+
* Generates a new signing secret for a Webhook.
|
|
22817
|
+
*/
|
|
22818
|
+
rotateSigningSecret(id, api_version, body, options) {
|
|
22819
|
+
return unwrapAsAPIPromise(webhooksRotateSigningSecret(this, id, api_version, body, options));
|
|
22820
|
+
}
|
|
22821
|
+
/**
|
|
22822
|
+
* Sends a ping event to a Webhook.
|
|
22823
|
+
*/
|
|
22824
|
+
ping(id, api_version, body, options) {
|
|
22825
|
+
return unwrapAsAPIPromise(webhooksPing(this, id, api_version, body, options));
|
|
22826
|
+
}
|
|
22827
|
+
}
|
|
22828
|
+
|
|
22829
|
+
/**
|
|
22830
|
+
* @license
|
|
22831
|
+
* Copyright 2026 Google LLC
|
|
22832
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
22833
|
+
*
|
|
22834
|
+
* g3-prettier-ignore-file
|
|
22835
|
+
*/
|
|
22836
|
+
/*
|
|
22837
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
22838
|
+
*/
|
|
22839
|
+
let GoogleGenAI$1 = class GoogleGenAI extends ClientSDK {
|
|
22840
|
+
get interactions() {
|
|
22841
|
+
var _a;
|
|
22842
|
+
return ((_a = this._interactions) !== null && _a !== void 0 ? _a : (this._interactions = new Interactions(this._options)));
|
|
22843
|
+
}
|
|
22844
|
+
get webhooks() {
|
|
22845
|
+
var _a;
|
|
22846
|
+
return ((_a = this._webhooks) !== null && _a !== void 0 ? _a : (this._webhooks = new Webhooks(this._options)));
|
|
22847
|
+
}
|
|
22848
|
+
get agents() {
|
|
22849
|
+
var _a;
|
|
22850
|
+
return ((_a = this._agents) !== null && _a !== void 0 ? _a : (this._agents = new Agents(this._options)));
|
|
22851
|
+
}
|
|
22852
|
+
get triggers() {
|
|
22853
|
+
var _a;
|
|
22854
|
+
return ((_a = this._triggers) !== null && _a !== void 0 ? _a : (this._triggers = new Triggers(this._options)));
|
|
22855
|
+
}
|
|
22856
|
+
};
|
|
22857
|
+
|
|
22858
|
+
/**
|
|
22859
|
+
* @license
|
|
22860
|
+
* Copyright 2026 Google LLC
|
|
22861
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
22862
|
+
*
|
|
22863
|
+
* g3-prettier-ignore-file
|
|
22864
|
+
*/
|
|
22865
|
+
const LEGACY_LYRIA_MODELS = new Set([
|
|
22866
|
+
"lyria-3-pro-preview",
|
|
22867
|
+
"lyria-3-clip-preview",
|
|
22868
|
+
]);
|
|
22869
|
+
function getGoogleGenAIServerURL(parentClient) {
|
|
22870
|
+
const serverURL = parentClient.getBaseUrl();
|
|
22871
|
+
if (!serverURL) {
|
|
22872
|
+
throw new Error("Base URL must be set.");
|
|
22873
|
+
}
|
|
22874
|
+
return serverURL.replace(/\/+$/, "");
|
|
22875
|
+
}
|
|
22876
|
+
function getGoogleGenAIAPIVersion(parentClient) {
|
|
22877
|
+
const apiVersion = trimSlashes(parentClient.getApiVersion());
|
|
22878
|
+
const project = parentClient.getProject();
|
|
22879
|
+
const location = parentClient.getLocation();
|
|
22880
|
+
if (parentClient.isVertexAI() && apiVersion && project && location) {
|
|
22881
|
+
return (`${apiVersion}/projects/${encodeURIComponent(project)}` +
|
|
22882
|
+
`/locations/${encodeURIComponent(location)}`);
|
|
22883
|
+
}
|
|
22884
|
+
return apiVersion;
|
|
22885
|
+
}
|
|
22886
|
+
function buildGoogleGenAIClient(parentClient, options = {}) {
|
|
22887
|
+
var _a, _b, _c, _d, _e;
|
|
22888
|
+
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({
|
|
22889
|
+
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)),
|
|
21838
22890
|
getAuthHeaders: (url) => parentClient.getAuthHeaders(url),
|
|
21839
|
-
}), server_url: (
|
|
22891
|
+
}), server_url: (_e = options.server_url) !== null && _e !== void 0 ? _e : getGoogleGenAIServerURL(parentClient) }));
|
|
21840
22892
|
return sdk;
|
|
21841
22893
|
}
|
|
21842
22894
|
class GeminiNextGenInteractions {
|
|
@@ -21943,6 +22995,46 @@ class GeminiNextGenWebhooks {
|
|
|
21943
22995
|
return this.sdk;
|
|
21944
22996
|
}
|
|
21945
22997
|
}
|
|
22998
|
+
class GeminiNextGenTriggers {
|
|
22999
|
+
constructor(parentClient) {
|
|
23000
|
+
this.parentClient = parentClient;
|
|
23001
|
+
}
|
|
23002
|
+
async create(params, options) {
|
|
23003
|
+
const { api_version } = params, body = __rest(params, ["api_version"]);
|
|
23004
|
+
return unwrapWithSdkHttpResponse(triggersCreate(this.getClient(api_version), body, api_version, toGoogleGenAIRequestOptions(options)));
|
|
23005
|
+
}
|
|
23006
|
+
async list(params = {}, options) {
|
|
23007
|
+
const { api_version, filter, pageSize, pageToken } = params !== null && params !== void 0 ? params : {};
|
|
23008
|
+
return unwrapWithSdkHttpResponse(triggersList(this.getClient(api_version), api_version, filter, pageSize, pageToken, toGoogleGenAIRequestOptions(options)));
|
|
23009
|
+
}
|
|
23010
|
+
async get(id, params = {}, options) {
|
|
23011
|
+
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)));
|
|
23012
|
+
}
|
|
23013
|
+
async update(id, params, options) {
|
|
23014
|
+
const { api_version } = params, body = __rest(params, ["api_version"]);
|
|
23015
|
+
return unwrapWithSdkHttpResponse(triggersUpdate(this.getClient(api_version), id, body, api_version, toGoogleGenAIRequestOptions(options)));
|
|
23016
|
+
}
|
|
23017
|
+
async delete(id, params = {}, options) {
|
|
23018
|
+
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)));
|
|
23019
|
+
}
|
|
23020
|
+
async run(trigger_id, params = {}, options) {
|
|
23021
|
+
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)));
|
|
23022
|
+
}
|
|
23023
|
+
async listExecutions(trigger_id, params = {}, options) {
|
|
23024
|
+
const { api_version, pageSize, pageToken } = params !== null && params !== void 0 ? params : {};
|
|
23025
|
+
return unwrapWithSdkHttpResponse(triggersListExecutions(this.getClient(api_version), trigger_id, api_version, pageSize, pageToken, toGoogleGenAIRequestOptions(options)));
|
|
23026
|
+
}
|
|
23027
|
+
getClient(apiVersion) {
|
|
23028
|
+
var _a;
|
|
23029
|
+
if (apiVersion) {
|
|
23030
|
+
return buildGoogleGenAIClient(this.parentClient, {
|
|
23031
|
+
api_version: apiVersion,
|
|
23032
|
+
});
|
|
23033
|
+
}
|
|
23034
|
+
(_a = this.sdk) !== null && _a !== void 0 ? _a : (this.sdk = buildGoogleGenAIClient(this.parentClient));
|
|
23035
|
+
return this.sdk;
|
|
23036
|
+
}
|
|
23037
|
+
}
|
|
21946
23038
|
function trimSlashes(value) {
|
|
21947
23039
|
return value.replace(/^\/+|\/+$/g, "");
|
|
21948
23040
|
}
|
|
@@ -23171,6 +24263,18 @@ function generationConfigFromVertex(fromObject, _rootObject) {
|
|
|
23171
24263
|
if (fromTopP != null) {
|
|
23172
24264
|
setValueByPath(toObject, ['topP'], fromTopP);
|
|
23173
24265
|
}
|
|
24266
|
+
const fromResponseFormat = getValueByPath(fromObject, [
|
|
24267
|
+
'responseFormat',
|
|
24268
|
+
]);
|
|
24269
|
+
if (fromResponseFormat != null) {
|
|
24270
|
+
let transformedList = fromResponseFormat;
|
|
24271
|
+
if (Array.isArray(transformedList)) {
|
|
24272
|
+
transformedList = transformedList.map((item) => {
|
|
24273
|
+
return item;
|
|
24274
|
+
});
|
|
24275
|
+
}
|
|
24276
|
+
setValueByPath(toObject, ['responseFormat'], transformedList);
|
|
24277
|
+
}
|
|
23174
24278
|
return toObject;
|
|
23175
24279
|
}
|
|
23176
24280
|
function getTuningJobParametersToMldev(fromObject, _rootObject) {
|
|
@@ -24613,6 +25717,14 @@ class GoogleGenAI {
|
|
|
24613
25717
|
this._agents = new GeminiNextGenAgents(this.apiClient);
|
|
24614
25718
|
return this._agents;
|
|
24615
25719
|
}
|
|
25720
|
+
get triggers() {
|
|
25721
|
+
if (this._triggers !== undefined) {
|
|
25722
|
+
return this._triggers;
|
|
25723
|
+
}
|
|
25724
|
+
console.warn('GoogleGenAI.triggers: Triggers usage is experimental and may change in future versions.');
|
|
25725
|
+
this._triggers = new GeminiNextGenTriggers(this.apiClient);
|
|
25726
|
+
return this._triggers;
|
|
25727
|
+
}
|
|
24616
25728
|
constructor(options) {
|
|
24617
25729
|
var _a, _b, _c, _d;
|
|
24618
25730
|
// Validate explicitly set initializer values.
|
|
@@ -24719,5 +25831,5 @@ function getApiKeyFromEnv() {
|
|
|
24719
25831
|
return envGoogleApiKey || envGeminiApiKey || undefined;
|
|
24720
25832
|
}
|
|
24721
25833
|
|
|
24722
|
-
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 };
|
|
25834
|
+
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 };
|
|
24723
25835
|
//# sourceMappingURL=index.mjs.map
|