@google/genai 2.11.0 → 2.13.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.
@@ -8201,6 +8201,12 @@ function audioTranscriptionConfigToMldev$1(fromObject) {
8201
8201
  if (fromLanguageHints != null) {
8202
8202
  setValueByPath(toObject, ['languageHints'], fromLanguageHints);
8203
8203
  }
8204
+ const fromCustomVocabulary = getValueByPath(fromObject, [
8205
+ 'customVocabulary',
8206
+ ]);
8207
+ if (fromCustomVocabulary != null) {
8208
+ setValueByPath(toObject, ['customVocabulary'], fromCustomVocabulary);
8209
+ }
8204
8210
  const fromAdaptationPhrases = getValueByPath(fromObject, [
8205
8211
  'adaptationPhrases',
8206
8212
  ]);
@@ -9740,6 +9746,18 @@ function contentEmbeddingStatisticsFromVertex(fromObject, _rootObject) {
9740
9746
  if (fromTokenCount != null) {
9741
9747
  setValueByPath(toObject, ['tokenCount'], fromTokenCount);
9742
9748
  }
9749
+ const fromTokensDetails = getValueByPath(fromObject, [
9750
+ 'tokensDetails',
9751
+ ]);
9752
+ if (fromTokensDetails != null) {
9753
+ let transformedList = fromTokensDetails;
9754
+ if (Array.isArray(transformedList)) {
9755
+ transformedList = transformedList.map((item) => {
9756
+ return item;
9757
+ });
9758
+ }
9759
+ setValueByPath(toObject, ['tokensDetails'], transformedList);
9760
+ }
9743
9761
  return toObject;
9744
9762
  }
9745
9763
  function contentToMldev$1(fromObject, rootObject) {
@@ -10369,6 +10387,10 @@ function embedContentResponseFromVertex(fromObject, rootObject) {
10369
10387
  usageMetadata['promptTokenCount']) {
10370
10388
  stats.tokenCount = usageMetadata['promptTokenCount'];
10371
10389
  }
10390
+ if (usageMetadata &&
10391
+ usageMetadata['promptTokensDetails']) {
10392
+ stats.tokensDetails = usageMetadata['promptTokensDetails'];
10393
+ }
10372
10394
  if (truncated) {
10373
10395
  stats.truncated = truncated;
10374
10396
  }
@@ -13524,7 +13546,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
13524
13546
  const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
13525
13547
  const USER_AGENT_HEADER = 'User-Agent';
13526
13548
  const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
13527
- const SDK_VERSION = '2.11.0'; // x-release-please-version
13549
+ const SDK_VERSION = '2.13.0'; // x-release-please-version
13528
13550
  const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
13529
13551
  const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
13530
13552
  const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
@@ -16911,6 +16933,12 @@ function audioTranscriptionConfigToMldev(fromObject) {
16911
16933
  if (fromLanguageHints != null) {
16912
16934
  setValueByPath(toObject, ['languageHints'], fromLanguageHints);
16913
16935
  }
16936
+ const fromCustomVocabulary = getValueByPath(fromObject, [
16937
+ 'customVocabulary',
16938
+ ]);
16939
+ if (fromCustomVocabulary != null) {
16940
+ setValueByPath(toObject, ['customVocabulary'], fromCustomVocabulary);
16941
+ }
16914
16942
  const fromAdaptationPhrases = getValueByPath(fromObject, [
16915
16943
  'adaptationPhrases',
16916
16944
  ]);
@@ -18896,7 +18924,7 @@ function serverURLFromOptions(options) {
18896
18924
  return new URL(u);
18897
18925
  }
18898
18926
  const SDK_METADATA = {
18899
- userAgent: "speakeasy-sdk/typescript 2.4.1-preview.4 2.913.3 v1beta @google/genai",
18927
+ userAgent: "speakeasy-sdk/typescript 2.4.1-preview.4 2.918.3 v1beta @google/genai",
18900
18928
  };
18901
18929
 
18902
18930
  /**
@@ -19197,10 +19225,10 @@ const DEFAULT_FETCHER = (input, init) => {
19197
19225
  };
19198
19226
  class HTTPClient {
19199
19227
  constructor(options = {}) {
19200
- this.options = options;
19201
19228
  this.requestHooks = [];
19202
19229
  this.requestErrorHooks = [];
19203
19230
  this.responseHooks = [];
19231
+ this.options = options;
19204
19232
  this.fetcher = options.fetcher || DEFAULT_FETCHER;
19205
19233
  }
19206
19234
  async request(request) {
@@ -20304,11 +20332,10 @@ function unpackHeaders(headers) {
20304
20332
  *
20305
20333
  * g3-prettier-ignore-file
20306
20334
  */
20307
- var SecurityErrorCode;
20308
- (function (SecurityErrorCode) {
20309
- SecurityErrorCode["Incomplete"] = "incomplete";
20310
- SecurityErrorCode["UnrecognisedSecurityType"] = "unrecognized_security_type";
20311
- })(SecurityErrorCode || (SecurityErrorCode = {}));
20335
+ const SecurityErrorCode = {
20336
+ Incomplete: "incomplete",
20337
+ UnrecognisedSecurityType: "unrecognized_security_type",
20338
+ };
20312
20339
  class SecurityError extends Error {
20313
20340
  constructor(code, message) {
20314
20341
  super(message);
@@ -20537,9 +20564,9 @@ function unwrapAsAPIPromise(p) {
20537
20564
  * Creates a new Agent (Typed version for SDK).
20538
20565
  */
20539
20566
  function agentsCreate(client, body, api_version, options) {
20540
- return new APIPromise($do$e(client, body, api_version, options));
20567
+ return new APIPromise($do$l(client, body, api_version, options));
20541
20568
  }
20542
- async function $do$e(client, body, api_version, options) {
20569
+ async function $do$l(client, body, api_version, options) {
20543
20570
  var _a, _b, _c;
20544
20571
  const input = {
20545
20572
  body: body,
@@ -20622,9 +20649,9 @@ async function $do$e(client, body, api_version, options) {
20622
20649
  * Deletes an Agent.
20623
20650
  */
20624
20651
  function agentsDelete(client, id, api_version, options) {
20625
- return new APIPromise($do$d(client, id, api_version, options));
20652
+ return new APIPromise($do$k(client, id, api_version, options));
20626
20653
  }
20627
- async function $do$d(client, id, api_version, options) {
20654
+ async function $do$k(client, id, api_version, options) {
20628
20655
  var _a, _b, _c;
20629
20656
  const input = {
20630
20657
  id: id,
@@ -20710,9 +20737,9 @@ async function $do$d(client, id, api_version, options) {
20710
20737
  * Gets a specific Agent.
20711
20738
  */
20712
20739
  function agentsGet(client, id, api_version, options) {
20713
- return new APIPromise($do$c(client, id, api_version, options));
20740
+ return new APIPromise($do$j(client, id, api_version, options));
20714
20741
  }
20715
- async function $do$c(client, id, api_version, options) {
20742
+ async function $do$j(client, id, api_version, options) {
20716
20743
  var _a, _b, _c;
20717
20744
  const input = {
20718
20745
  id: id,
@@ -20798,9 +20825,9 @@ async function $do$c(client, id, api_version, options) {
20798
20825
  * Lists all Agents.
20799
20826
  */
20800
20827
  function agentsList(client, api_version, page_size, page_token, parent, options) {
20801
- return new APIPromise($do$b(client, api_version, page_size, page_token, parent, options));
20828
+ return new APIPromise($do$i(client, api_version, page_size, page_token, parent, options));
20802
20829
  }
20803
- async function $do$b(client, api_version, page_size, page_token, parent, options) {
20830
+ async function $do$i(client, api_version, page_size, page_token, parent, options) {
20804
20831
  var _a, _b, _c;
20805
20832
  const input = {
20806
20833
  api_version: api_version,
@@ -21072,9 +21099,9 @@ class GetInteractionByIdClientError extends GoogleGenAiError {
21072
21099
  * Cancels an interaction by id. This only applies to background interactions that are still running.
21073
21100
  */
21074
21101
  function interactionsCancel(client, id, api_version, options) {
21075
- return new APIPromise($do$a(client, id, api_version, options));
21102
+ return new APIPromise($do$h(client, id, api_version, options));
21076
21103
  }
21077
- async function $do$a(client, id, api_version, options) {
21104
+ async function $do$h(client, id, api_version, options) {
21078
21105
  var _a, _b, _c;
21079
21106
  const input = {
21080
21107
  id: id,
@@ -21160,9 +21187,9 @@ async function $do$a(client, id, api_version, options) {
21160
21187
  * g3-prettier-ignore-file
21161
21188
  */
21162
21189
  function interactionsCreate(client, body, api_version, options) {
21163
- return new APIPromise($do$9(client, body, api_version, options));
21190
+ return new APIPromise($do$g(client, body, api_version, options));
21164
21191
  }
21165
- async function $do$9(client, body, api_version, options) {
21192
+ async function $do$g(client, body, api_version, options) {
21166
21193
  var _a, _b, _c, _d;
21167
21194
  const input = {
21168
21195
  body: body,
@@ -21254,9 +21281,9 @@ async function $do$9(client, body, api_version, options) {
21254
21281
  * Deletes the interaction by id.
21255
21282
  */
21256
21283
  function interactionsDelete(client, id, api_version, options) {
21257
- return new APIPromise($do$8(client, id, api_version, options));
21284
+ return new APIPromise($do$f(client, id, api_version, options));
21258
21285
  }
21259
- async function $do$8(client, id, api_version, options) {
21286
+ async function $do$f(client, id, api_version, options) {
21260
21287
  var _a, _b, _c;
21261
21288
  const input = {
21262
21289
  id: id,
@@ -21342,9 +21369,9 @@ async function $do$8(client, id, api_version, options) {
21342
21369
  * g3-prettier-ignore-file
21343
21370
  */
21344
21371
  function interactionsGet(client, id, stream, last_event_id, include_input, api_version, options) {
21345
- return new APIPromise($do$7(client, id, stream, last_event_id, include_input, api_version, options));
21372
+ return new APIPromise($do$e(client, id, stream, last_event_id, include_input, api_version, options));
21346
21373
  }
21347
- async function $do$7(client, id, stream, last_event_id, include_input, api_version, options) {
21374
+ async function $do$e(client, id, stream, last_event_id, include_input, api_version, options) {
21348
21375
  var _a, _b, _c;
21349
21376
  const input = {
21350
21377
  id: id,
@@ -21477,12 +21504,12 @@ class Interactions extends ClientSDK {
21477
21504
  * g3-prettier-ignore-file
21478
21505
  */
21479
21506
  /**
21480
- * Creates a new Webhook.
21507
+ * Creates a new trigger that will invoke the specified agent on the given cron schedule.
21481
21508
  */
21482
- function webhooksCreate(client, body, api_version, options) {
21483
- return new APIPromise($do$6(client, body, api_version, options));
21509
+ function triggersCreate(client, body, api_version, options) {
21510
+ return new APIPromise($do$d(client, body, api_version, options));
21484
21511
  }
21485
- async function $do$6(client, body, api_version, options) {
21512
+ async function $do$d(client, body, api_version, options) {
21486
21513
  var _a, _b, _c;
21487
21514
  const input = {
21488
21515
  body: body,
@@ -21493,7 +21520,7 @@ async function $do$6(client, body, api_version, options) {
21493
21520
  const pathParams = {
21494
21521
  api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
21495
21522
  };
21496
- const path = pathToFunc("/{api_version}/webhooks")(pathParams);
21523
+ const path = pathToFunc("/{api_version}/triggers")(pathParams);
21497
21524
  const headers = new Headers(compactMap({
21498
21525
  "Content-Type": "application/json",
21499
21526
  Accept: "application/json",
@@ -21503,7 +21530,7 @@ async function $do$6(client, body, api_version, options) {
21503
21530
  const context = {
21504
21531
  options: client._options,
21505
21532
  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 : "",
21506
- operation_id: "CreateWebhook",
21533
+ operation_id: "CreateTrigger",
21507
21534
  o_auth2_scopes: null,
21508
21535
  resolved_security: requestSecurity,
21509
21536
  security_source: client._options.security,
@@ -21547,7 +21574,7 @@ async function $do$6(client, body, api_version, options) {
21547
21574
  return [doResult, { status: "request-error", request: req }];
21548
21575
  }
21549
21576
  const response = doResult.value;
21550
- const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
21577
+ const [result] = await match(json(200), fail("4XX"), fail("5XX"))(response, req);
21551
21578
  if (!result.ok) {
21552
21579
  return [result, { status: "complete", request: req, response }];
21553
21580
  }
@@ -21562,12 +21589,12 @@ async function $do$6(client, body, api_version, options) {
21562
21589
  * g3-prettier-ignore-file
21563
21590
  */
21564
21591
  /**
21565
- * Deletes a Webhook.
21592
+ * Deletes a trigger.
21566
21593
  */
21567
- function webhooksDelete(client, id, api_version, options) {
21568
- return new APIPromise($do$5(client, id, api_version, options));
21594
+ function triggersDelete(client, id, api_version, options) {
21595
+ return new APIPromise($do$c(client, id, api_version, options));
21569
21596
  }
21570
- async function $do$5(client, id, api_version, options) {
21597
+ async function $do$c(client, id, api_version, options) {
21571
21598
  var _a, _b, _c;
21572
21599
  const input = {
21573
21600
  id: id,
@@ -21582,7 +21609,7 @@ async function $do$5(client, id, api_version, options) {
21582
21609
  charEncoding: "percent",
21583
21610
  }),
21584
21611
  };
21585
- const path = pathToFunc("/{api_version}/webhooks/{id}")(pathParams);
21612
+ const path = pathToFunc("/{api_version}/triggers/{id}")(pathParams);
21586
21613
  const headers = new Headers(compactMap({
21587
21614
  Accept: "application/json",
21588
21615
  }));
@@ -21591,7 +21618,7 @@ async function $do$5(client, id, api_version, options) {
21591
21618
  const context = {
21592
21619
  options: client._options,
21593
21620
  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 : "",
21594
- operation_id: "DeleteWebhook",
21621
+ operation_id: "DeleteTrigger",
21595
21622
  o_auth2_scopes: null,
21596
21623
  resolved_security: requestSecurity,
21597
21624
  security_source: client._options.security,
@@ -21635,7 +21662,7 @@ async function $do$5(client, id, api_version, options) {
21635
21662
  return [doResult, { status: "request-error", request: req }];
21636
21663
  }
21637
21664
  const response = doResult.value;
21638
- const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
21665
+ const [result] = await match(json(200), fail("4XX"), fail("5XX"))(response, req);
21639
21666
  if (!result.ok) {
21640
21667
  return [result, { status: "complete", request: req, response }];
21641
21668
  }
@@ -21650,12 +21677,12 @@ async function $do$5(client, id, api_version, options) {
21650
21677
  * g3-prettier-ignore-file
21651
21678
  */
21652
21679
  /**
21653
- * Gets a specific Webhook.
21680
+ * Gets details of a single trigger.
21654
21681
  */
21655
- function webhooksGet(client, id, api_version, options) {
21656
- return new APIPromise($do$4(client, id, api_version, options));
21682
+ function triggersGet(client, id, api_version, options) {
21683
+ return new APIPromise($do$b(client, id, api_version, options));
21657
21684
  }
21658
- async function $do$4(client, id, api_version, options) {
21685
+ async function $do$b(client, id, api_version, options) {
21659
21686
  var _a, _b, _c;
21660
21687
  const input = {
21661
21688
  id: id,
@@ -21670,7 +21697,7 @@ async function $do$4(client, id, api_version, options) {
21670
21697
  charEncoding: "percent",
21671
21698
  }),
21672
21699
  };
21673
- const path = pathToFunc("/{api_version}/webhooks/{id}")(pathParams);
21700
+ const path = pathToFunc("/{api_version}/triggers/{id}")(pathParams);
21674
21701
  const headers = new Headers(compactMap({
21675
21702
  Accept: "application/json",
21676
21703
  }));
@@ -21679,7 +21706,7 @@ async function $do$4(client, id, api_version, options) {
21679
21706
  const context = {
21680
21707
  options: client._options,
21681
21708
  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 : "",
21682
- operation_id: "GetWebhook",
21709
+ operation_id: "GetTrigger",
21683
21710
  o_auth2_scopes: null,
21684
21711
  resolved_security: requestSecurity,
21685
21712
  security_source: client._options.security,
@@ -21723,7 +21750,7 @@ async function $do$4(client, id, api_version, options) {
21723
21750
  return [doResult, { status: "request-error", request: req }];
21724
21751
  }
21725
21752
  const response = doResult.value;
21726
- const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
21753
+ const [result] = await match(json(200), fail("4XX"), fail("5XX"))(response, req);
21727
21754
  if (!result.ok) {
21728
21755
  return [result, { status: "complete", request: req, response }];
21729
21756
  }
@@ -21738,14 +21765,15 @@ async function $do$4(client, id, api_version, options) {
21738
21765
  * g3-prettier-ignore-file
21739
21766
  */
21740
21767
  /**
21741
- * Lists all Webhooks.
21768
+ * Lists executions for a trigger.
21742
21769
  */
21743
- function webhooksList(client, api_version, page_size, page_token, options) {
21744
- return new APIPromise($do$3(client, api_version, page_size, page_token, options));
21770
+ function triggersListExecutions(client, trigger_id, api_version, page_size, page_token, options) {
21771
+ return new APIPromise($do$a(client, trigger_id, api_version, page_size, page_token, options));
21745
21772
  }
21746
- async function $do$3(client, api_version, page_size, page_token, options) {
21773
+ async function $do$a(client, trigger_id, api_version, page_size, page_token, options) {
21747
21774
  var _a, _b, _c;
21748
21775
  const input = {
21776
+ trigger_id: trigger_id,
21749
21777
  api_version: api_version,
21750
21778
  page_size: page_size,
21751
21779
  page_token: page_token,
@@ -21753,12 +21781,16 @@ async function $do$3(client, api_version, page_size, page_token, options) {
21753
21781
  const payload = input;
21754
21782
  const body = null;
21755
21783
  const pathParams = {
21756
- 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" }),
21784
+ api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
21785
+ trigger_id: encodeSimple("trigger_id", payload.trigger_id, {
21786
+ explode: false,
21787
+ charEncoding: "percent",
21788
+ }),
21757
21789
  };
21758
- const path = pathToFunc("/{api_version}/webhooks")(pathParams);
21790
+ const path = pathToFunc("/{api_version}/triggers/{trigger_id}/executions")(pathParams);
21759
21791
  const query = encodeFormQuery({
21760
- "page_size": payload === null || payload === void 0 ? void 0 : payload.page_size,
21761
- "page_token": payload === null || payload === void 0 ? void 0 : payload.page_token,
21792
+ "page_size": payload.page_size,
21793
+ "page_token": payload.page_token,
21762
21794
  });
21763
21795
  const headers = new Headers(compactMap({
21764
21796
  Accept: "application/json",
@@ -21768,7 +21800,7 @@ async function $do$3(client, api_version, page_size, page_token, options) {
21768
21800
  const context = {
21769
21801
  options: client._options,
21770
21802
  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 : "",
21771
- operation_id: "ListWebhooks",
21803
+ operation_id: "ListTriggerExecutions",
21772
21804
  o_auth2_scopes: null,
21773
21805
  resolved_security: requestSecurity,
21774
21806
  security_source: client._options.security,
@@ -21813,7 +21845,7 @@ async function $do$3(client, api_version, page_size, page_token, options) {
21813
21845
  return [doResult, { status: "request-error", request: req }];
21814
21846
  }
21815
21847
  const response = doResult.value;
21816
- const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
21848
+ const [result] = await match(json(200), fail("4XX"), fail("5XX"))(response, req);
21817
21849
  if (!result.ok) {
21818
21850
  return [result, { status: "complete", request: req, response }];
21819
21851
  }
@@ -21828,30 +21860,31 @@ async function $do$3(client, api_version, page_size, page_token, options) {
21828
21860
  * g3-prettier-ignore-file
21829
21861
  */
21830
21862
  /**
21831
- * Sends a ping event to a Webhook.
21863
+ * Lists triggers for a project.
21832
21864
  */
21833
- function webhooksPing(client, id, api_version, body, options) {
21834
- return new APIPromise($do$2(client, id, api_version, body, options));
21865
+ function triggersList(client, api_version, filter, page_size, page_token, options) {
21866
+ return new APIPromise($do$9(client, api_version, filter, page_size, page_token, options));
21835
21867
  }
21836
- async function $do$2(client, id, api_version, body, options) {
21868
+ async function $do$9(client, api_version, filter, page_size, page_token, options) {
21837
21869
  var _a, _b, _c;
21838
21870
  const input = {
21839
- id: id,
21840
21871
  api_version: api_version,
21841
- body: body,
21872
+ filter: filter,
21873
+ page_size: page_size,
21874
+ page_token: page_token,
21842
21875
  };
21843
21876
  const payload = input;
21844
- const body$ = encodeJSON("body", payload.body, { explode: true });
21877
+ const body = null;
21845
21878
  const pathParams = {
21846
- api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
21847
- id: encodeSimple("id", payload.id, {
21848
- explode: false,
21849
- charEncoding: "percent",
21850
- }),
21879
+ 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" }),
21851
21880
  };
21852
- const path = pathToFunc("/{api_version}/webhooks/{id}:ping")(pathParams);
21881
+ const path = pathToFunc("/{api_version}/triggers")(pathParams);
21882
+ const query = encodeFormQuery({
21883
+ "filter": payload === null || payload === void 0 ? void 0 : payload.filter,
21884
+ "page_size": payload === null || payload === void 0 ? void 0 : payload.page_size,
21885
+ "page_token": payload === null || payload === void 0 ? void 0 : payload.page_token,
21886
+ });
21853
21887
  const headers = new Headers(compactMap({
21854
- "Content-Type": "application/json",
21855
21888
  Accept: "application/json",
21856
21889
  }));
21857
21890
  const securityInput = await extractSecurity(client._options.security);
@@ -21859,7 +21892,7 @@ async function $do$2(client, id, api_version, body, options) {
21859
21892
  const context = {
21860
21893
  options: client._options,
21861
21894
  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 : "",
21862
- operation_id: "PingWebhook",
21895
+ operation_id: "ListTriggers",
21863
21896
  o_auth2_scopes: null,
21864
21897
  resolved_security: requestSecurity,
21865
21898
  security_source: client._options.security,
@@ -21881,11 +21914,12 @@ async function $do$2(client, id, api_version, body, options) {
21881
21914
  };
21882
21915
  const requestRes = client._createRequest(context, {
21883
21916
  security: requestSecurity,
21884
- method: "POST",
21917
+ method: "GET",
21885
21918
  baseURL: options === null || options === void 0 ? void 0 : options.server_url,
21886
21919
  path: path,
21887
21920
  headers: headers,
21888
- body: body$,
21921
+ query: query,
21922
+ body: body,
21889
21923
  userAgent: client._options.user_agent,
21890
21924
  timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
21891
21925
  }, options);
@@ -21903,7 +21937,7 @@ async function $do$2(client, id, api_version, body, options) {
21903
21937
  return [doResult, { status: "request-error", request: req }];
21904
21938
  }
21905
21939
  const response = doResult.value;
21906
- const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
21940
+ const [result] = await match(json(200), fail("4XX"), fail("5XX"))(response, req);
21907
21941
  if (!result.ok) {
21908
21942
  return [result, { status: "complete", request: req, response }];
21909
21943
  }
@@ -21918,30 +21952,28 @@ async function $do$2(client, id, api_version, body, options) {
21918
21952
  * g3-prettier-ignore-file
21919
21953
  */
21920
21954
  /**
21921
- * Generates a new signing secret for a Webhook.
21955
+ * Runs a trigger immediately.
21922
21956
  */
21923
- function webhooksRotateSigningSecret(client, id, api_version, body, options) {
21924
- return new APIPromise($do$1(client, id, api_version, body, options));
21957
+ function triggersRun(client, trigger_id, api_version, options) {
21958
+ return new APIPromise($do$8(client, trigger_id, api_version, options));
21925
21959
  }
21926
- async function $do$1(client, id, api_version, body, options) {
21960
+ async function $do$8(client, trigger_id, api_version, options) {
21927
21961
  var _a, _b, _c;
21928
21962
  const input = {
21929
- id: id,
21963
+ trigger_id: trigger_id,
21930
21964
  api_version: api_version,
21931
- body: body,
21932
21965
  };
21933
21966
  const payload = input;
21934
- const body$ = encodeJSON("body", payload.body, { explode: true });
21967
+ const body = null;
21935
21968
  const pathParams = {
21936
21969
  api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
21937
- id: encodeSimple("id", payload.id, {
21970
+ trigger_id: encodeSimple("trigger_id", payload.trigger_id, {
21938
21971
  explode: false,
21939
21972
  charEncoding: "percent",
21940
21973
  }),
21941
21974
  };
21942
- const path = pathToFunc("/{api_version}/webhooks/{id}:rotateSigningSecret")(pathParams);
21975
+ const path = pathToFunc("/{api_version}/triggers/{trigger_id}/executions")(pathParams);
21943
21976
  const headers = new Headers(compactMap({
21944
- "Content-Type": "application/json",
21945
21977
  Accept: "application/json",
21946
21978
  }));
21947
21979
  const securityInput = await extractSecurity(client._options.security);
@@ -21949,7 +21981,7 @@ async function $do$1(client, id, api_version, body, options) {
21949
21981
  const context = {
21950
21982
  options: client._options,
21951
21983
  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 : "",
21952
- operation_id: "RotateSigningSecret",
21984
+ operation_id: "RunTrigger",
21953
21985
  o_auth2_scopes: null,
21954
21986
  resolved_security: requestSecurity,
21955
21987
  security_source: client._options.security,
@@ -21975,7 +22007,7 @@ async function $do$1(client, id, api_version, body, options) {
21975
22007
  baseURL: options === null || options === void 0 ? void 0 : options.server_url,
21976
22008
  path: path,
21977
22009
  headers: headers,
21978
- body: body$,
22010
+ body: body,
21979
22011
  userAgent: client._options.user_agent,
21980
22012
  timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
21981
22013
  }, options);
@@ -21993,7 +22025,7 @@ async function $do$1(client, id, api_version, body, options) {
21993
22025
  return [doResult, { status: "request-error", request: req }];
21994
22026
  }
21995
22027
  const response = doResult.value;
21996
- const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
22028
+ const [result] = await match(json(200), fail("4XX"), fail("5XX"))(response, req);
21997
22029
  if (!result.ok) {
21998
22030
  return [result, { status: "complete", request: req, response }];
21999
22031
  }
@@ -22008,18 +22040,17 @@ async function $do$1(client, id, api_version, body, options) {
22008
22040
  * g3-prettier-ignore-file
22009
22041
  */
22010
22042
  /**
22011
- * Updates an existing Webhook.
22043
+ * Updates a trigger.
22012
22044
  */
22013
- function webhooksUpdate(client, id, api_version, update_mask, body, options) {
22014
- return new APIPromise($do(client, id, api_version, update_mask, body, options));
22045
+ function triggersUpdate(client, id, body, api_version, options) {
22046
+ return new APIPromise($do$7(client, id, body, api_version, options));
22015
22047
  }
22016
- async function $do(client, id, api_version, update_mask, body, options) {
22048
+ async function $do$7(client, id, body, api_version, options) {
22017
22049
  var _a, _b, _c;
22018
22050
  const input = {
22019
22051
  id: id,
22020
- api_version: api_version,
22021
- update_mask: update_mask,
22022
22052
  body: body,
22053
+ api_version: api_version,
22023
22054
  };
22024
22055
  const payload = input;
22025
22056
  const body$ = encodeJSON("body", payload.body, { explode: true });
@@ -22030,10 +22061,7 @@ async function $do(client, id, api_version, update_mask, body, options) {
22030
22061
  charEncoding: "percent",
22031
22062
  }),
22032
22063
  };
22033
- const path = pathToFunc("/{api_version}/webhooks/{id}")(pathParams);
22034
- const query = encodeFormQuery({
22035
- "update_mask": payload.update_mask,
22036
- });
22064
+ const path = pathToFunc("/{api_version}/triggers/{id}")(pathParams);
22037
22065
  const headers = new Headers(compactMap({
22038
22066
  "Content-Type": "application/json",
22039
22067
  Accept: "application/json",
@@ -22043,7 +22071,7 @@ async function $do(client, id, api_version, update_mask, body, options) {
22043
22071
  const context = {
22044
22072
  options: client._options,
22045
22073
  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 : "",
22046
- operation_id: "UpdateWebhook",
22074
+ operation_id: "UpdateTrigger",
22047
22075
  o_auth2_scopes: null,
22048
22076
  resolved_security: requestSecurity,
22049
22077
  security_source: client._options.security,
@@ -22069,7 +22097,6 @@ async function $do(client, id, api_version, update_mask, body, options) {
22069
22097
  baseURL: options === null || options === void 0 ? void 0 : options.server_url,
22070
22098
  path: path,
22071
22099
  headers: headers,
22072
- query: query,
22073
22100
  body: body$,
22074
22101
  userAgent: client._options.user_agent,
22075
22102
  timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
@@ -22088,7 +22115,7 @@ async function $do(client, id, api_version, update_mask, body, options) {
22088
22115
  return [doResult, { status: "request-error", request: req }];
22089
22116
  }
22090
22117
  const response = doResult.value;
22091
- const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
22118
+ const [result] = await match(json(200), fail("4XX"), fail("5XX"))(response, req);
22092
22119
  if (!result.ok) {
22093
22120
  return [result, { status: "complete", request: req, response }];
22094
22121
  }
@@ -22102,53 +22129,50 @@ async function $do(client, id, api_version, update_mask, body, options) {
22102
22129
  *
22103
22130
  * g3-prettier-ignore-file
22104
22131
  */
22105
- class Webhooks extends ClientSDK {
22132
+ class Triggers extends ClientSDK {
22106
22133
  /**
22107
- * Creates a new Webhook.
22134
+ * Creates a new trigger that will invoke the specified agent on the given cron schedule.
22108
22135
  */
22109
22136
  create(params, options) {
22110
22137
  const { api_version } = params, body = __rest(params, ["api_version"]);
22111
- return unwrapAsAPIPromise(webhooksCreate(this, body, api_version, options));
22138
+ return unwrapAsAPIPromise(triggersCreate(this, body, api_version, options));
22112
22139
  }
22113
22140
  /**
22114
- * Lists all Webhooks.
22141
+ * Lists triggers for a project.
22115
22142
  */
22116
22143
  list(params, options) {
22117
- 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));
22144
+ 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));
22118
22145
  }
22119
22146
  /**
22120
- * Gets a specific Webhook.
22147
+ * Gets details of a single trigger.
22121
22148
  */
22122
22149
  get(id, params, options) {
22123
- return unwrapAsAPIPromise(webhooksGet(this, id, params === null || params === void 0 ? void 0 : params.api_version, options));
22150
+ return unwrapAsAPIPromise(triggersGet(this, id, params === null || params === void 0 ? void 0 : params.api_version, options));
22124
22151
  }
22125
22152
  /**
22126
- * Updates an existing Webhook.
22153
+ * Updates a trigger.
22127
22154
  */
22128
22155
  update(id, params, options) {
22129
- const _a = params !== null && params !== void 0 ? params : {}, { api_version, update_mask } = _a, body$body = __rest(_a, ["api_version", "update_mask"]);
22130
- const body = params === undefined || Object.keys(body$body).length === 0
22131
- ? undefined
22132
- : body$body;
22133
- return unwrapAsAPIPromise(webhooksUpdate(this, id, api_version, update_mask, body, options));
22156
+ const { api_version } = params, body = __rest(params, ["api_version"]);
22157
+ return unwrapAsAPIPromise(triggersUpdate(this, id, body, api_version, options));
22134
22158
  }
22135
22159
  /**
22136
- * Deletes a Webhook.
22160
+ * Deletes a trigger.
22137
22161
  */
22138
22162
  delete(id, params, options) {
22139
- return unwrapAsAPIPromise(webhooksDelete(this, id, params === null || params === void 0 ? void 0 : params.api_version, options));
22163
+ return unwrapAsAPIPromise(triggersDelete(this, id, params === null || params === void 0 ? void 0 : params.api_version, options));
22140
22164
  }
22141
22165
  /**
22142
- * Generates a new signing secret for a Webhook.
22166
+ * Runs a trigger immediately.
22143
22167
  */
22144
- rotateSigningSecret(id, api_version, body, options) {
22145
- return unwrapAsAPIPromise(webhooksRotateSigningSecret(this, id, api_version, body, options));
22168
+ run(trigger_id, params, options) {
22169
+ return unwrapAsAPIPromise(triggersRun(this, trigger_id, params === null || params === void 0 ? void 0 : params.api_version, options));
22146
22170
  }
22147
22171
  /**
22148
- * Sends a ping event to a Webhook.
22172
+ * Lists executions for a trigger.
22149
22173
  */
22150
- ping(id, api_version, body, options) {
22151
- return unwrapAsAPIPromise(webhooksPing(this, id, api_version, body, options));
22174
+ listExecutions(trigger_id, params, options) {
22175
+ 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));
22152
22176
  }
22153
22177
  }
22154
22178
 
@@ -22159,23 +22183,83 @@ class Webhooks extends ClientSDK {
22159
22183
  *
22160
22184
  * g3-prettier-ignore-file
22161
22185
  */
22162
- /*
22163
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
22186
+ /**
22187
+ * Creates a new Webhook.
22164
22188
  */
22165
- let GoogleGenAI$1 = class GoogleGenAI extends ClientSDK {
22166
- get interactions() {
22167
- var _a;
22168
- return ((_a = this._interactions) !== null && _a !== void 0 ? _a : (this._interactions = new Interactions(this._options)));
22189
+ function webhooksCreate(client, body, api_version, options) {
22190
+ return new APIPromise($do$6(client, body, api_version, options));
22191
+ }
22192
+ async function $do$6(client, body, api_version, options) {
22193
+ var _a, _b, _c;
22194
+ const input = {
22195
+ body: body,
22196
+ api_version: api_version,
22197
+ };
22198
+ const payload = input;
22199
+ const body$ = encodeJSON("body", payload.body, { explode: true });
22200
+ const pathParams = {
22201
+ api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
22202
+ };
22203
+ const path = pathToFunc("/{api_version}/webhooks")(pathParams);
22204
+ const headers = new Headers(compactMap({
22205
+ "Content-Type": "application/json",
22206
+ Accept: "application/json",
22207
+ }));
22208
+ const securityInput = await extractSecurity(client._options.security);
22209
+ const requestSecurity = resolveGlobalSecurity(securityInput);
22210
+ const context = {
22211
+ options: client._options,
22212
+ 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 : "",
22213
+ operation_id: "CreateWebhook",
22214
+ o_auth2_scopes: null,
22215
+ resolved_security: requestSecurity,
22216
+ security_source: client._options.security,
22217
+ retry_config: (options === null || options === void 0 ? void 0 : options.retries)
22218
+ || client._options.retry_config
22219
+ || {
22220
+ strategy: "attempt-count-backoff",
22221
+ backoff: {
22222
+ initialInterval: 500,
22223
+ maxInterval: 8000,
22224
+ exponent: 2,
22225
+ maxElapsedTime: 30000,
22226
+ },
22227
+ retryConnectionErrors: true,
22228
+ maxRetries: 4,
22229
+ }
22230
+ || { strategy: "none" },
22231
+ retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
22232
+ };
22233
+ const requestRes = client._createRequest(context, {
22234
+ security: requestSecurity,
22235
+ method: "POST",
22236
+ baseURL: options === null || options === void 0 ? void 0 : options.server_url,
22237
+ path: path,
22238
+ headers: headers,
22239
+ body: body$,
22240
+ userAgent: client._options.user_agent,
22241
+ timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
22242
+ }, options);
22243
+ if (!requestRes.ok) {
22244
+ return [requestRes, { status: "invalid" }];
22169
22245
  }
22170
- get webhooks() {
22171
- var _a;
22172
- return ((_a = this._webhooks) !== null && _a !== void 0 ? _a : (this._webhooks = new Webhooks(this._options)));
22246
+ const req = requestRes.value;
22247
+ const doResult = await client._do(req, {
22248
+ context,
22249
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
22250
+ retryConfig: context.retry_config,
22251
+ retryCodes: context.retry_codes,
22252
+ });
22253
+ if (!doResult.ok) {
22254
+ return [doResult, { status: "request-error", request: req }];
22173
22255
  }
22174
- get agents() {
22175
- var _a;
22176
- return ((_a = this._agents) !== null && _a !== void 0 ? _a : (this._agents = new Agents(this._options)));
22256
+ const response = doResult.value;
22257
+ const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
22258
+ if (!result.ok) {
22259
+ return [result, { status: "complete", request: req, response }];
22177
22260
  }
22178
- };
22261
+ return [result, { status: "complete", request: req, response }];
22262
+ }
22179
22263
 
22180
22264
  /**
22181
22265
  * @license
@@ -22184,39 +22268,666 @@ let GoogleGenAI$1 = class GoogleGenAI extends ClientSDK {
22184
22268
  *
22185
22269
  * g3-prettier-ignore-file
22186
22270
  */
22187
- const LEGACY_LYRIA_MODELS = new Set([
22188
- "lyria-3-pro-preview",
22189
- "lyria-3-clip-preview",
22190
- ]);
22191
- function getGoogleGenAIServerURL(parentClient) {
22192
- const serverURL = parentClient.getBaseUrl();
22193
- if (!serverURL) {
22194
- throw new Error("Base URL must be set.");
22195
- }
22196
- return serverURL.replace(/\/+$/, "");
22197
- }
22198
- function getGoogleGenAIAPIVersion(parentClient) {
22199
- const apiVersion = trimSlashes(parentClient.getApiVersion());
22200
- const project = parentClient.getProject();
22201
- const location = parentClient.getLocation();
22202
- if (parentClient.isVertexAI() && apiVersion && project && location) {
22203
- return (`${apiVersion}/projects/${encodeURIComponent(project)}` +
22204
- `/locations/${encodeURIComponent(location)}`);
22205
- }
22206
- return apiVersion;
22207
- }
22208
- function buildGoogleGenAIClient(parentClient, options = {}) {
22209
- var _a, _b, _c, _d;
22210
- 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({
22211
- defaultHeaders: (_c = parentClient.getDefaultHeaders) === null || _c === void 0 ? void 0 : _c.call(parentClient),
22212
- getAuthHeaders: (url) => parentClient.getAuthHeaders(url),
22213
- }), server_url: (_d = options.server_url) !== null && _d !== void 0 ? _d : getGoogleGenAIServerURL(parentClient) }));
22214
- return sdk;
22271
+ /**
22272
+ * Deletes a Webhook.
22273
+ */
22274
+ function webhooksDelete(client, id, api_version, options) {
22275
+ return new APIPromise($do$5(client, id, api_version, options));
22215
22276
  }
22216
- class GeminiNextGenInteractions {
22217
- constructor(parentClient) {
22218
- this.parentClient = parentClient;
22219
- }
22277
+ async function $do$5(client, id, api_version, options) {
22278
+ var _a, _b, _c;
22279
+ const input = {
22280
+ id: id,
22281
+ api_version: api_version,
22282
+ };
22283
+ const payload = input;
22284
+ const body = null;
22285
+ const pathParams = {
22286
+ api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
22287
+ id: encodeSimple("id", payload.id, {
22288
+ explode: false,
22289
+ charEncoding: "percent",
22290
+ }),
22291
+ };
22292
+ const path = pathToFunc("/{api_version}/webhooks/{id}")(pathParams);
22293
+ const headers = new Headers(compactMap({
22294
+ Accept: "application/json",
22295
+ }));
22296
+ const securityInput = await extractSecurity(client._options.security);
22297
+ const requestSecurity = resolveGlobalSecurity(securityInput);
22298
+ const context = {
22299
+ options: client._options,
22300
+ 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 : "",
22301
+ operation_id: "DeleteWebhook",
22302
+ o_auth2_scopes: null,
22303
+ resolved_security: requestSecurity,
22304
+ security_source: client._options.security,
22305
+ retry_config: (options === null || options === void 0 ? void 0 : options.retries)
22306
+ || client._options.retry_config
22307
+ || {
22308
+ strategy: "attempt-count-backoff",
22309
+ backoff: {
22310
+ initialInterval: 500,
22311
+ maxInterval: 8000,
22312
+ exponent: 2,
22313
+ maxElapsedTime: 30000,
22314
+ },
22315
+ retryConnectionErrors: true,
22316
+ maxRetries: 4,
22317
+ }
22318
+ || { strategy: "none" },
22319
+ retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
22320
+ };
22321
+ const requestRes = client._createRequest(context, {
22322
+ security: requestSecurity,
22323
+ method: "DELETE",
22324
+ baseURL: options === null || options === void 0 ? void 0 : options.server_url,
22325
+ path: path,
22326
+ headers: headers,
22327
+ body: body,
22328
+ userAgent: client._options.user_agent,
22329
+ timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
22330
+ }, options);
22331
+ if (!requestRes.ok) {
22332
+ return [requestRes, { status: "invalid" }];
22333
+ }
22334
+ const req = requestRes.value;
22335
+ const doResult = await client._do(req, {
22336
+ context,
22337
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
22338
+ retryConfig: context.retry_config,
22339
+ retryCodes: context.retry_codes,
22340
+ });
22341
+ if (!doResult.ok) {
22342
+ return [doResult, { status: "request-error", request: req }];
22343
+ }
22344
+ const response = doResult.value;
22345
+ const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
22346
+ if (!result.ok) {
22347
+ return [result, { status: "complete", request: req, response }];
22348
+ }
22349
+ return [result, { status: "complete", request: req, response }];
22350
+ }
22351
+
22352
+ /**
22353
+ * @license
22354
+ * Copyright 2026 Google LLC
22355
+ * SPDX-License-Identifier: Apache-2.0
22356
+ *
22357
+ * g3-prettier-ignore-file
22358
+ */
22359
+ /**
22360
+ * Gets a specific Webhook.
22361
+ */
22362
+ function webhooksGet(client, id, api_version, options) {
22363
+ return new APIPromise($do$4(client, id, api_version, options));
22364
+ }
22365
+ async function $do$4(client, id, api_version, options) {
22366
+ var _a, _b, _c;
22367
+ const input = {
22368
+ id: id,
22369
+ api_version: api_version,
22370
+ };
22371
+ const payload = input;
22372
+ const body = null;
22373
+ const pathParams = {
22374
+ api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
22375
+ id: encodeSimple("id", payload.id, {
22376
+ explode: false,
22377
+ charEncoding: "percent",
22378
+ }),
22379
+ };
22380
+ const path = pathToFunc("/{api_version}/webhooks/{id}")(pathParams);
22381
+ const headers = new Headers(compactMap({
22382
+ Accept: "application/json",
22383
+ }));
22384
+ const securityInput = await extractSecurity(client._options.security);
22385
+ const requestSecurity = resolveGlobalSecurity(securityInput);
22386
+ const context = {
22387
+ options: client._options,
22388
+ 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 : "",
22389
+ operation_id: "GetWebhook",
22390
+ o_auth2_scopes: null,
22391
+ resolved_security: requestSecurity,
22392
+ security_source: client._options.security,
22393
+ retry_config: (options === null || options === void 0 ? void 0 : options.retries)
22394
+ || client._options.retry_config
22395
+ || {
22396
+ strategy: "attempt-count-backoff",
22397
+ backoff: {
22398
+ initialInterval: 500,
22399
+ maxInterval: 8000,
22400
+ exponent: 2,
22401
+ maxElapsedTime: 30000,
22402
+ },
22403
+ retryConnectionErrors: true,
22404
+ maxRetries: 4,
22405
+ }
22406
+ || { strategy: "none" },
22407
+ retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
22408
+ };
22409
+ const requestRes = client._createRequest(context, {
22410
+ security: requestSecurity,
22411
+ method: "GET",
22412
+ baseURL: options === null || options === void 0 ? void 0 : options.server_url,
22413
+ path: path,
22414
+ headers: headers,
22415
+ body: body,
22416
+ userAgent: client._options.user_agent,
22417
+ timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
22418
+ }, options);
22419
+ if (!requestRes.ok) {
22420
+ return [requestRes, { status: "invalid" }];
22421
+ }
22422
+ const req = requestRes.value;
22423
+ const doResult = await client._do(req, {
22424
+ context,
22425
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
22426
+ retryConfig: context.retry_config,
22427
+ retryCodes: context.retry_codes,
22428
+ });
22429
+ if (!doResult.ok) {
22430
+ return [doResult, { status: "request-error", request: req }];
22431
+ }
22432
+ const response = doResult.value;
22433
+ const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
22434
+ if (!result.ok) {
22435
+ return [result, { status: "complete", request: req, response }];
22436
+ }
22437
+ return [result, { status: "complete", request: req, response }];
22438
+ }
22439
+
22440
+ /**
22441
+ * @license
22442
+ * Copyright 2026 Google LLC
22443
+ * SPDX-License-Identifier: Apache-2.0
22444
+ *
22445
+ * g3-prettier-ignore-file
22446
+ */
22447
+ /**
22448
+ * Lists all Webhooks.
22449
+ */
22450
+ function webhooksList(client, api_version, page_size, page_token, options) {
22451
+ return new APIPromise($do$3(client, api_version, page_size, page_token, options));
22452
+ }
22453
+ async function $do$3(client, api_version, page_size, page_token, options) {
22454
+ var _a, _b, _c;
22455
+ const input = {
22456
+ api_version: api_version,
22457
+ page_size: page_size,
22458
+ page_token: page_token,
22459
+ };
22460
+ const payload = input;
22461
+ const body = null;
22462
+ const pathParams = {
22463
+ 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" }),
22464
+ };
22465
+ const path = pathToFunc("/{api_version}/webhooks")(pathParams);
22466
+ const query = encodeFormQuery({
22467
+ "page_size": payload === null || payload === void 0 ? void 0 : payload.page_size,
22468
+ "page_token": payload === null || payload === void 0 ? void 0 : payload.page_token,
22469
+ });
22470
+ const headers = new Headers(compactMap({
22471
+ Accept: "application/json",
22472
+ }));
22473
+ const securityInput = await extractSecurity(client._options.security);
22474
+ const requestSecurity = resolveGlobalSecurity(securityInput);
22475
+ const context = {
22476
+ options: client._options,
22477
+ 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 : "",
22478
+ operation_id: "ListWebhooks",
22479
+ o_auth2_scopes: null,
22480
+ resolved_security: requestSecurity,
22481
+ security_source: client._options.security,
22482
+ retry_config: (options === null || options === void 0 ? void 0 : options.retries)
22483
+ || client._options.retry_config
22484
+ || {
22485
+ strategy: "attempt-count-backoff",
22486
+ backoff: {
22487
+ initialInterval: 500,
22488
+ maxInterval: 8000,
22489
+ exponent: 2,
22490
+ maxElapsedTime: 30000,
22491
+ },
22492
+ retryConnectionErrors: true,
22493
+ maxRetries: 4,
22494
+ }
22495
+ || { strategy: "none" },
22496
+ retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
22497
+ };
22498
+ const requestRes = client._createRequest(context, {
22499
+ security: requestSecurity,
22500
+ method: "GET",
22501
+ baseURL: options === null || options === void 0 ? void 0 : options.server_url,
22502
+ path: path,
22503
+ headers: headers,
22504
+ query: query,
22505
+ body: body,
22506
+ userAgent: client._options.user_agent,
22507
+ timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
22508
+ }, options);
22509
+ if (!requestRes.ok) {
22510
+ return [requestRes, { status: "invalid" }];
22511
+ }
22512
+ const req = requestRes.value;
22513
+ const doResult = await client._do(req, {
22514
+ context,
22515
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
22516
+ retryConfig: context.retry_config,
22517
+ retryCodes: context.retry_codes,
22518
+ });
22519
+ if (!doResult.ok) {
22520
+ return [doResult, { status: "request-error", request: req }];
22521
+ }
22522
+ const response = doResult.value;
22523
+ const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
22524
+ if (!result.ok) {
22525
+ return [result, { status: "complete", request: req, response }];
22526
+ }
22527
+ return [result, { status: "complete", request: req, response }];
22528
+ }
22529
+
22530
+ /**
22531
+ * @license
22532
+ * Copyright 2026 Google LLC
22533
+ * SPDX-License-Identifier: Apache-2.0
22534
+ *
22535
+ * g3-prettier-ignore-file
22536
+ */
22537
+ /**
22538
+ * Sends a ping event to a Webhook.
22539
+ */
22540
+ function webhooksPing(client, id, api_version, body, options) {
22541
+ return new APIPromise($do$2(client, id, api_version, body, options));
22542
+ }
22543
+ async function $do$2(client, id, api_version, body, options) {
22544
+ var _a, _b, _c;
22545
+ const input = {
22546
+ id: id,
22547
+ api_version: api_version,
22548
+ body: body,
22549
+ };
22550
+ const payload = input;
22551
+ const body$ = encodeJSON("body", payload.body, { explode: true });
22552
+ const pathParams = {
22553
+ api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
22554
+ id: encodeSimple("id", payload.id, {
22555
+ explode: false,
22556
+ charEncoding: "percent",
22557
+ }),
22558
+ };
22559
+ const path = pathToFunc("/{api_version}/webhooks/{id}:ping")(pathParams);
22560
+ const headers = new Headers(compactMap({
22561
+ "Content-Type": "application/json",
22562
+ Accept: "application/json",
22563
+ }));
22564
+ const securityInput = await extractSecurity(client._options.security);
22565
+ const requestSecurity = resolveGlobalSecurity(securityInput);
22566
+ const context = {
22567
+ options: client._options,
22568
+ 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 : "",
22569
+ operation_id: "PingWebhook",
22570
+ o_auth2_scopes: null,
22571
+ resolved_security: requestSecurity,
22572
+ security_source: client._options.security,
22573
+ retry_config: (options === null || options === void 0 ? void 0 : options.retries)
22574
+ || client._options.retry_config
22575
+ || {
22576
+ strategy: "attempt-count-backoff",
22577
+ backoff: {
22578
+ initialInterval: 500,
22579
+ maxInterval: 8000,
22580
+ exponent: 2,
22581
+ maxElapsedTime: 30000,
22582
+ },
22583
+ retryConnectionErrors: true,
22584
+ maxRetries: 4,
22585
+ }
22586
+ || { strategy: "none" },
22587
+ retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
22588
+ };
22589
+ const requestRes = client._createRequest(context, {
22590
+ security: requestSecurity,
22591
+ method: "POST",
22592
+ baseURL: options === null || options === void 0 ? void 0 : options.server_url,
22593
+ path: path,
22594
+ headers: headers,
22595
+ body: body$,
22596
+ userAgent: client._options.user_agent,
22597
+ timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
22598
+ }, options);
22599
+ if (!requestRes.ok) {
22600
+ return [requestRes, { status: "invalid" }];
22601
+ }
22602
+ const req = requestRes.value;
22603
+ const doResult = await client._do(req, {
22604
+ context,
22605
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
22606
+ retryConfig: context.retry_config,
22607
+ retryCodes: context.retry_codes,
22608
+ });
22609
+ if (!doResult.ok) {
22610
+ return [doResult, { status: "request-error", request: req }];
22611
+ }
22612
+ const response = doResult.value;
22613
+ const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
22614
+ if (!result.ok) {
22615
+ return [result, { status: "complete", request: req, response }];
22616
+ }
22617
+ return [result, { status: "complete", request: req, response }];
22618
+ }
22619
+
22620
+ /**
22621
+ * @license
22622
+ * Copyright 2026 Google LLC
22623
+ * SPDX-License-Identifier: Apache-2.0
22624
+ *
22625
+ * g3-prettier-ignore-file
22626
+ */
22627
+ /**
22628
+ * Generates a new signing secret for a Webhook.
22629
+ */
22630
+ function webhooksRotateSigningSecret(client, id, api_version, body, options) {
22631
+ return new APIPromise($do$1(client, id, api_version, body, options));
22632
+ }
22633
+ async function $do$1(client, id, api_version, body, options) {
22634
+ var _a, _b, _c;
22635
+ const input = {
22636
+ id: id,
22637
+ api_version: api_version,
22638
+ body: body,
22639
+ };
22640
+ const payload = input;
22641
+ const body$ = encodeJSON("body", payload.body, { explode: true });
22642
+ const pathParams = {
22643
+ api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
22644
+ id: encodeSimple("id", payload.id, {
22645
+ explode: false,
22646
+ charEncoding: "percent",
22647
+ }),
22648
+ };
22649
+ const path = pathToFunc("/{api_version}/webhooks/{id}:rotateSigningSecret")(pathParams);
22650
+ const headers = new Headers(compactMap({
22651
+ "Content-Type": "application/json",
22652
+ Accept: "application/json",
22653
+ }));
22654
+ const securityInput = await extractSecurity(client._options.security);
22655
+ const requestSecurity = resolveGlobalSecurity(securityInput);
22656
+ const context = {
22657
+ options: client._options,
22658
+ 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 : "",
22659
+ operation_id: "RotateSigningSecret",
22660
+ o_auth2_scopes: null,
22661
+ resolved_security: requestSecurity,
22662
+ security_source: client._options.security,
22663
+ retry_config: (options === null || options === void 0 ? void 0 : options.retries)
22664
+ || client._options.retry_config
22665
+ || {
22666
+ strategy: "attempt-count-backoff",
22667
+ backoff: {
22668
+ initialInterval: 500,
22669
+ maxInterval: 8000,
22670
+ exponent: 2,
22671
+ maxElapsedTime: 30000,
22672
+ },
22673
+ retryConnectionErrors: true,
22674
+ maxRetries: 4,
22675
+ }
22676
+ || { strategy: "none" },
22677
+ retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
22678
+ };
22679
+ const requestRes = client._createRequest(context, {
22680
+ security: requestSecurity,
22681
+ method: "POST",
22682
+ baseURL: options === null || options === void 0 ? void 0 : options.server_url,
22683
+ path: path,
22684
+ headers: headers,
22685
+ body: body$,
22686
+ userAgent: client._options.user_agent,
22687
+ timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
22688
+ }, options);
22689
+ if (!requestRes.ok) {
22690
+ return [requestRes, { status: "invalid" }];
22691
+ }
22692
+ const req = requestRes.value;
22693
+ const doResult = await client._do(req, {
22694
+ context,
22695
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
22696
+ retryConfig: context.retry_config,
22697
+ retryCodes: context.retry_codes,
22698
+ });
22699
+ if (!doResult.ok) {
22700
+ return [doResult, { status: "request-error", request: req }];
22701
+ }
22702
+ const response = doResult.value;
22703
+ const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
22704
+ if (!result.ok) {
22705
+ return [result, { status: "complete", request: req, response }];
22706
+ }
22707
+ return [result, { status: "complete", request: req, response }];
22708
+ }
22709
+
22710
+ /**
22711
+ * @license
22712
+ * Copyright 2026 Google LLC
22713
+ * SPDX-License-Identifier: Apache-2.0
22714
+ *
22715
+ * g3-prettier-ignore-file
22716
+ */
22717
+ /**
22718
+ * Updates an existing Webhook.
22719
+ */
22720
+ function webhooksUpdate(client, id, api_version, update_mask, body, options) {
22721
+ return new APIPromise($do(client, id, api_version, update_mask, body, options));
22722
+ }
22723
+ async function $do(client, id, api_version, update_mask, body, options) {
22724
+ var _a, _b, _c;
22725
+ const input = {
22726
+ id: id,
22727
+ api_version: api_version,
22728
+ update_mask: update_mask,
22729
+ body: body,
22730
+ };
22731
+ const payload = input;
22732
+ const body$ = encodeJSON("body", payload.body, { explode: true });
22733
+ const pathParams = {
22734
+ api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
22735
+ id: encodeSimple("id", payload.id, {
22736
+ explode: false,
22737
+ charEncoding: "percent",
22738
+ }),
22739
+ };
22740
+ const path = pathToFunc("/{api_version}/webhooks/{id}")(pathParams);
22741
+ const query = encodeFormQuery({
22742
+ "update_mask": payload.update_mask,
22743
+ });
22744
+ const headers = new Headers(compactMap({
22745
+ "Content-Type": "application/json",
22746
+ Accept: "application/json",
22747
+ }));
22748
+ const securityInput = await extractSecurity(client._options.security);
22749
+ const requestSecurity = resolveGlobalSecurity(securityInput);
22750
+ const context = {
22751
+ options: client._options,
22752
+ 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 : "",
22753
+ operation_id: "UpdateWebhook",
22754
+ o_auth2_scopes: null,
22755
+ resolved_security: requestSecurity,
22756
+ security_source: client._options.security,
22757
+ retry_config: (options === null || options === void 0 ? void 0 : options.retries)
22758
+ || client._options.retry_config
22759
+ || {
22760
+ strategy: "attempt-count-backoff",
22761
+ backoff: {
22762
+ initialInterval: 500,
22763
+ maxInterval: 8000,
22764
+ exponent: 2,
22765
+ maxElapsedTime: 30000,
22766
+ },
22767
+ retryConnectionErrors: true,
22768
+ maxRetries: 4,
22769
+ }
22770
+ || { strategy: "none" },
22771
+ retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
22772
+ };
22773
+ const requestRes = client._createRequest(context, {
22774
+ security: requestSecurity,
22775
+ method: "PATCH",
22776
+ baseURL: options === null || options === void 0 ? void 0 : options.server_url,
22777
+ path: path,
22778
+ headers: headers,
22779
+ query: query,
22780
+ body: body$,
22781
+ userAgent: client._options.user_agent,
22782
+ timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
22783
+ }, options);
22784
+ if (!requestRes.ok) {
22785
+ return [requestRes, { status: "invalid" }];
22786
+ }
22787
+ const req = requestRes.value;
22788
+ const doResult = await client._do(req, {
22789
+ context,
22790
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
22791
+ retryConfig: context.retry_config,
22792
+ retryCodes: context.retry_codes,
22793
+ });
22794
+ if (!doResult.ok) {
22795
+ return [doResult, { status: "request-error", request: req }];
22796
+ }
22797
+ const response = doResult.value;
22798
+ const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
22799
+ if (!result.ok) {
22800
+ return [result, { status: "complete", request: req, response }];
22801
+ }
22802
+ return [result, { status: "complete", request: req, response }];
22803
+ }
22804
+
22805
+ /**
22806
+ * @license
22807
+ * Copyright 2026 Google LLC
22808
+ * SPDX-License-Identifier: Apache-2.0
22809
+ *
22810
+ * g3-prettier-ignore-file
22811
+ */
22812
+ class Webhooks extends ClientSDK {
22813
+ /**
22814
+ * Creates a new Webhook.
22815
+ */
22816
+ create(params, options) {
22817
+ const { api_version } = params, body = __rest(params, ["api_version"]);
22818
+ return unwrapAsAPIPromise(webhooksCreate(this, body, api_version, options));
22819
+ }
22820
+ /**
22821
+ * Lists all Webhooks.
22822
+ */
22823
+ list(params, options) {
22824
+ 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));
22825
+ }
22826
+ /**
22827
+ * Gets a specific Webhook.
22828
+ */
22829
+ get(id, params, options) {
22830
+ return unwrapAsAPIPromise(webhooksGet(this, id, params === null || params === void 0 ? void 0 : params.api_version, options));
22831
+ }
22832
+ /**
22833
+ * Updates an existing Webhook.
22834
+ */
22835
+ update(id, params, options) {
22836
+ const _a = params !== null && params !== void 0 ? params : {}, { api_version, update_mask } = _a, body$body = __rest(_a, ["api_version", "update_mask"]);
22837
+ const body = params === undefined || Object.keys(body$body).length === 0
22838
+ ? undefined
22839
+ : body$body;
22840
+ return unwrapAsAPIPromise(webhooksUpdate(this, id, api_version, update_mask, body, options));
22841
+ }
22842
+ /**
22843
+ * Deletes a Webhook.
22844
+ */
22845
+ delete(id, params, options) {
22846
+ return unwrapAsAPIPromise(webhooksDelete(this, id, params === null || params === void 0 ? void 0 : params.api_version, options));
22847
+ }
22848
+ /**
22849
+ * Generates a new signing secret for a Webhook.
22850
+ */
22851
+ rotateSigningSecret(id, api_version, body, options) {
22852
+ return unwrapAsAPIPromise(webhooksRotateSigningSecret(this, id, api_version, body, options));
22853
+ }
22854
+ /**
22855
+ * Sends a ping event to a Webhook.
22856
+ */
22857
+ ping(id, api_version, body, options) {
22858
+ return unwrapAsAPIPromise(webhooksPing(this, id, api_version, body, options));
22859
+ }
22860
+ }
22861
+
22862
+ /**
22863
+ * @license
22864
+ * Copyright 2026 Google LLC
22865
+ * SPDX-License-Identifier: Apache-2.0
22866
+ *
22867
+ * g3-prettier-ignore-file
22868
+ */
22869
+ /*
22870
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
22871
+ */
22872
+ let GoogleGenAI$1 = class GoogleGenAI extends ClientSDK {
22873
+ get interactions() {
22874
+ var _a;
22875
+ return ((_a = this._interactions) !== null && _a !== void 0 ? _a : (this._interactions = new Interactions(this._options)));
22876
+ }
22877
+ get webhooks() {
22878
+ var _a;
22879
+ return ((_a = this._webhooks) !== null && _a !== void 0 ? _a : (this._webhooks = new Webhooks(this._options)));
22880
+ }
22881
+ get agents() {
22882
+ var _a;
22883
+ return ((_a = this._agents) !== null && _a !== void 0 ? _a : (this._agents = new Agents(this._options)));
22884
+ }
22885
+ get triggers() {
22886
+ var _a;
22887
+ return ((_a = this._triggers) !== null && _a !== void 0 ? _a : (this._triggers = new Triggers(this._options)));
22888
+ }
22889
+ };
22890
+
22891
+ /**
22892
+ * @license
22893
+ * Copyright 2026 Google LLC
22894
+ * SPDX-License-Identifier: Apache-2.0
22895
+ *
22896
+ * g3-prettier-ignore-file
22897
+ */
22898
+ const LEGACY_LYRIA_MODELS = new Set([
22899
+ "lyria-3-pro-preview",
22900
+ "lyria-3-clip-preview",
22901
+ ]);
22902
+ function getGoogleGenAIServerURL(parentClient) {
22903
+ const serverURL = parentClient.getBaseUrl();
22904
+ if (!serverURL) {
22905
+ throw new Error("Base URL must be set.");
22906
+ }
22907
+ return serverURL.replace(/\/+$/, "");
22908
+ }
22909
+ function getGoogleGenAIAPIVersion(parentClient) {
22910
+ const apiVersion = trimSlashes(parentClient.getApiVersion());
22911
+ const project = parentClient.getProject();
22912
+ const location = parentClient.getLocation();
22913
+ if (parentClient.isVertexAI() && apiVersion && project && location) {
22914
+ return (`${apiVersion}/projects/${encodeURIComponent(project)}` +
22915
+ `/locations/${encodeURIComponent(location)}`);
22916
+ }
22917
+ return apiVersion;
22918
+ }
22919
+ function buildGoogleGenAIClient(parentClient, options = {}) {
22920
+ var _a, _b, _c, _d, _e;
22921
+ 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({
22922
+ 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)),
22923
+ getAuthHeaders: (url) => parentClient.getAuthHeaders(url),
22924
+ }), server_url: (_e = options.server_url) !== null && _e !== void 0 ? _e : getGoogleGenAIServerURL(parentClient) }));
22925
+ return sdk;
22926
+ }
22927
+ class GeminiNextGenInteractions {
22928
+ constructor(parentClient) {
22929
+ this.parentClient = parentClient;
22930
+ }
22220
22931
  async create(params, options) {
22221
22932
  const { api_version } = params, request = __rest(params, ["api_version"]);
22222
22933
  if (request.stream === true) {
@@ -22317,6 +23028,46 @@ class GeminiNextGenWebhooks {
22317
23028
  return this.sdk;
22318
23029
  }
22319
23030
  }
23031
+ class GeminiNextGenTriggers {
23032
+ constructor(parentClient) {
23033
+ this.parentClient = parentClient;
23034
+ }
23035
+ async create(params, options) {
23036
+ const { api_version } = params, body = __rest(params, ["api_version"]);
23037
+ return unwrapWithSdkHttpResponse(triggersCreate(this.getClient(api_version), body, api_version, toGoogleGenAIRequestOptions(options)));
23038
+ }
23039
+ async list(params = {}, options) {
23040
+ const { api_version, filter, pageSize, pageToken } = params !== null && params !== void 0 ? params : {};
23041
+ return unwrapWithSdkHttpResponse(triggersList(this.getClient(api_version), api_version, filter, pageSize, pageToken, toGoogleGenAIRequestOptions(options)));
23042
+ }
23043
+ async get(id, params = {}, options) {
23044
+ 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)));
23045
+ }
23046
+ async update(id, params, options) {
23047
+ const { api_version } = params, body = __rest(params, ["api_version"]);
23048
+ return unwrapWithSdkHttpResponse(triggersUpdate(this.getClient(api_version), id, body, api_version, toGoogleGenAIRequestOptions(options)));
23049
+ }
23050
+ async delete(id, params = {}, options) {
23051
+ 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)));
23052
+ }
23053
+ async run(trigger_id, params = {}, options) {
23054
+ 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)));
23055
+ }
23056
+ async listExecutions(trigger_id, params = {}, options) {
23057
+ const { api_version, pageSize, pageToken } = params !== null && params !== void 0 ? params : {};
23058
+ return unwrapWithSdkHttpResponse(triggersListExecutions(this.getClient(api_version), trigger_id, api_version, pageSize, pageToken, toGoogleGenAIRequestOptions(options)));
23059
+ }
23060
+ getClient(apiVersion) {
23061
+ var _a;
23062
+ if (apiVersion) {
23063
+ return buildGoogleGenAIClient(this.parentClient, {
23064
+ api_version: apiVersion,
23065
+ });
23066
+ }
23067
+ (_a = this.sdk) !== null && _a !== void 0 ? _a : (this.sdk = buildGoogleGenAIClient(this.parentClient));
23068
+ return this.sdk;
23069
+ }
23070
+ }
22320
23071
  function trimSlashes(value) {
22321
23072
  return value.replace(/^\/+|\/+$/g, "");
22322
23073
  }
@@ -24999,6 +25750,14 @@ class GoogleGenAI {
24999
25750
  this._agents = new GeminiNextGenAgents(this.apiClient);
25000
25751
  return this._agents;
25001
25752
  }
25753
+ get triggers() {
25754
+ if (this._triggers !== undefined) {
25755
+ return this._triggers;
25756
+ }
25757
+ console.warn('GoogleGenAI.triggers: Triggers usage is experimental and may change in future versions.');
25758
+ this._triggers = new GeminiNextGenTriggers(this.apiClient);
25759
+ return this._triggers;
25760
+ }
25002
25761
  constructor(options) {
25003
25762
  var _a, _b, _c, _d;
25004
25763
  // Validate explicitly set initializer values.