@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.
@@ -8171,6 +8171,12 @@ function audioTranscriptionConfigToMldev$1(fromObject) {
8171
8171
  if (fromLanguageHints != null) {
8172
8172
  setValueByPath(toObject, ['languageHints'], fromLanguageHints);
8173
8173
  }
8174
+ const fromCustomVocabulary = getValueByPath(fromObject, [
8175
+ 'customVocabulary',
8176
+ ]);
8177
+ if (fromCustomVocabulary != null) {
8178
+ setValueByPath(toObject, ['customVocabulary'], fromCustomVocabulary);
8179
+ }
8174
8180
  const fromAdaptationPhrases = getValueByPath(fromObject, [
8175
8181
  'adaptationPhrases',
8176
8182
  ]);
@@ -9710,6 +9716,18 @@ function contentEmbeddingStatisticsFromVertex(fromObject, _rootObject) {
9710
9716
  if (fromTokenCount != null) {
9711
9717
  setValueByPath(toObject, ['tokenCount'], fromTokenCount);
9712
9718
  }
9719
+ const fromTokensDetails = getValueByPath(fromObject, [
9720
+ 'tokensDetails',
9721
+ ]);
9722
+ if (fromTokensDetails != null) {
9723
+ let transformedList = fromTokensDetails;
9724
+ if (Array.isArray(transformedList)) {
9725
+ transformedList = transformedList.map((item) => {
9726
+ return item;
9727
+ });
9728
+ }
9729
+ setValueByPath(toObject, ['tokensDetails'], transformedList);
9730
+ }
9713
9731
  return toObject;
9714
9732
  }
9715
9733
  function contentToMldev$1(fromObject, rootObject) {
@@ -10339,6 +10357,10 @@ function embedContentResponseFromVertex(fromObject, rootObject) {
10339
10357
  usageMetadata['promptTokenCount']) {
10340
10358
  stats.tokenCount = usageMetadata['promptTokenCount'];
10341
10359
  }
10360
+ if (usageMetadata &&
10361
+ usageMetadata['promptTokensDetails']) {
10362
+ stats.tokensDetails = usageMetadata['promptTokensDetails'];
10363
+ }
10342
10364
  if (truncated) {
10343
10365
  stats.truncated = truncated;
10344
10366
  }
@@ -13494,7 +13516,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
13494
13516
  const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
13495
13517
  const USER_AGENT_HEADER = 'User-Agent';
13496
13518
  const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
13497
- const SDK_VERSION = '2.11.0'; // x-release-please-version
13519
+ const SDK_VERSION = '2.13.0'; // x-release-please-version
13498
13520
  const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
13499
13521
  const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
13500
13522
  const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
@@ -16881,6 +16903,12 @@ function audioTranscriptionConfigToMldev(fromObject) {
16881
16903
  if (fromLanguageHints != null) {
16882
16904
  setValueByPath(toObject, ['languageHints'], fromLanguageHints);
16883
16905
  }
16906
+ const fromCustomVocabulary = getValueByPath(fromObject, [
16907
+ 'customVocabulary',
16908
+ ]);
16909
+ if (fromCustomVocabulary != null) {
16910
+ setValueByPath(toObject, ['customVocabulary'], fromCustomVocabulary);
16911
+ }
16884
16912
  const fromAdaptationPhrases = getValueByPath(fromObject, [
16885
16913
  'adaptationPhrases',
16886
16914
  ]);
@@ -18866,7 +18894,7 @@ function serverURLFromOptions(options) {
18866
18894
  return new URL(u);
18867
18895
  }
18868
18896
  const SDK_METADATA = {
18869
- userAgent: "speakeasy-sdk/typescript 2.4.1-preview.4 2.913.3 v1beta @google/genai",
18897
+ userAgent: "speakeasy-sdk/typescript 2.4.1-preview.4 2.918.3 v1beta @google/genai",
18870
18898
  };
18871
18899
 
18872
18900
  /**
@@ -19167,10 +19195,10 @@ const DEFAULT_FETCHER = (input, init) => {
19167
19195
  };
19168
19196
  class HTTPClient {
19169
19197
  constructor(options = {}) {
19170
- this.options = options;
19171
19198
  this.requestHooks = [];
19172
19199
  this.requestErrorHooks = [];
19173
19200
  this.responseHooks = [];
19201
+ this.options = options;
19174
19202
  this.fetcher = options.fetcher || DEFAULT_FETCHER;
19175
19203
  }
19176
19204
  async request(request) {
@@ -20274,11 +20302,10 @@ function unpackHeaders(headers) {
20274
20302
  *
20275
20303
  * g3-prettier-ignore-file
20276
20304
  */
20277
- var SecurityErrorCode;
20278
- (function (SecurityErrorCode) {
20279
- SecurityErrorCode["Incomplete"] = "incomplete";
20280
- SecurityErrorCode["UnrecognisedSecurityType"] = "unrecognized_security_type";
20281
- })(SecurityErrorCode || (SecurityErrorCode = {}));
20305
+ const SecurityErrorCode = {
20306
+ Incomplete: "incomplete",
20307
+ UnrecognisedSecurityType: "unrecognized_security_type",
20308
+ };
20282
20309
  class SecurityError extends Error {
20283
20310
  constructor(code, message) {
20284
20311
  super(message);
@@ -20507,9 +20534,9 @@ function unwrapAsAPIPromise(p) {
20507
20534
  * Creates a new Agent (Typed version for SDK).
20508
20535
  */
20509
20536
  function agentsCreate(client, body, api_version, options) {
20510
- return new APIPromise($do$e(client, body, api_version, options));
20537
+ return new APIPromise($do$l(client, body, api_version, options));
20511
20538
  }
20512
- async function $do$e(client, body, api_version, options) {
20539
+ async function $do$l(client, body, api_version, options) {
20513
20540
  var _a, _b, _c;
20514
20541
  const input = {
20515
20542
  body: body,
@@ -20592,9 +20619,9 @@ async function $do$e(client, body, api_version, options) {
20592
20619
  * Deletes an Agent.
20593
20620
  */
20594
20621
  function agentsDelete(client, id, api_version, options) {
20595
- return new APIPromise($do$d(client, id, api_version, options));
20622
+ return new APIPromise($do$k(client, id, api_version, options));
20596
20623
  }
20597
- async function $do$d(client, id, api_version, options) {
20624
+ async function $do$k(client, id, api_version, options) {
20598
20625
  var _a, _b, _c;
20599
20626
  const input = {
20600
20627
  id: id,
@@ -20680,9 +20707,9 @@ async function $do$d(client, id, api_version, options) {
20680
20707
  * Gets a specific Agent.
20681
20708
  */
20682
20709
  function agentsGet(client, id, api_version, options) {
20683
- return new APIPromise($do$c(client, id, api_version, options));
20710
+ return new APIPromise($do$j(client, id, api_version, options));
20684
20711
  }
20685
- async function $do$c(client, id, api_version, options) {
20712
+ async function $do$j(client, id, api_version, options) {
20686
20713
  var _a, _b, _c;
20687
20714
  const input = {
20688
20715
  id: id,
@@ -20768,9 +20795,9 @@ async function $do$c(client, id, api_version, options) {
20768
20795
  * Lists all Agents.
20769
20796
  */
20770
20797
  function agentsList(client, api_version, page_size, page_token, parent, options) {
20771
- return new APIPromise($do$b(client, api_version, page_size, page_token, parent, options));
20798
+ return new APIPromise($do$i(client, api_version, page_size, page_token, parent, options));
20772
20799
  }
20773
- async function $do$b(client, api_version, page_size, page_token, parent, options) {
20800
+ async function $do$i(client, api_version, page_size, page_token, parent, options) {
20774
20801
  var _a, _b, _c;
20775
20802
  const input = {
20776
20803
  api_version: api_version,
@@ -21042,9 +21069,9 @@ class GetInteractionByIdClientError extends GoogleGenAiError {
21042
21069
  * Cancels an interaction by id. This only applies to background interactions that are still running.
21043
21070
  */
21044
21071
  function interactionsCancel(client, id, api_version, options) {
21045
- return new APIPromise($do$a(client, id, api_version, options));
21072
+ return new APIPromise($do$h(client, id, api_version, options));
21046
21073
  }
21047
- async function $do$a(client, id, api_version, options) {
21074
+ async function $do$h(client, id, api_version, options) {
21048
21075
  var _a, _b, _c;
21049
21076
  const input = {
21050
21077
  id: id,
@@ -21130,9 +21157,9 @@ async function $do$a(client, id, api_version, options) {
21130
21157
  * g3-prettier-ignore-file
21131
21158
  */
21132
21159
  function interactionsCreate(client, body, api_version, options) {
21133
- return new APIPromise($do$9(client, body, api_version, options));
21160
+ return new APIPromise($do$g(client, body, api_version, options));
21134
21161
  }
21135
- async function $do$9(client, body, api_version, options) {
21162
+ async function $do$g(client, body, api_version, options) {
21136
21163
  var _a, _b, _c, _d;
21137
21164
  const input = {
21138
21165
  body: body,
@@ -21224,9 +21251,9 @@ async function $do$9(client, body, api_version, options) {
21224
21251
  * Deletes the interaction by id.
21225
21252
  */
21226
21253
  function interactionsDelete(client, id, api_version, options) {
21227
- return new APIPromise($do$8(client, id, api_version, options));
21254
+ return new APIPromise($do$f(client, id, api_version, options));
21228
21255
  }
21229
- async function $do$8(client, id, api_version, options) {
21256
+ async function $do$f(client, id, api_version, options) {
21230
21257
  var _a, _b, _c;
21231
21258
  const input = {
21232
21259
  id: id,
@@ -21312,9 +21339,9 @@ async function $do$8(client, id, api_version, options) {
21312
21339
  * g3-prettier-ignore-file
21313
21340
  */
21314
21341
  function interactionsGet(client, id, stream, last_event_id, include_input, api_version, options) {
21315
- return new APIPromise($do$7(client, id, stream, last_event_id, include_input, api_version, options));
21342
+ return new APIPromise($do$e(client, id, stream, last_event_id, include_input, api_version, options));
21316
21343
  }
21317
- async function $do$7(client, id, stream, last_event_id, include_input, api_version, options) {
21344
+ async function $do$e(client, id, stream, last_event_id, include_input, api_version, options) {
21318
21345
  var _a, _b, _c;
21319
21346
  const input = {
21320
21347
  id: id,
@@ -21447,12 +21474,12 @@ class Interactions extends ClientSDK {
21447
21474
  * g3-prettier-ignore-file
21448
21475
  */
21449
21476
  /**
21450
- * Creates a new Webhook.
21477
+ * Creates a new trigger that will invoke the specified agent on the given cron schedule.
21451
21478
  */
21452
- function webhooksCreate(client, body, api_version, options) {
21453
- return new APIPromise($do$6(client, body, api_version, options));
21479
+ function triggersCreate(client, body, api_version, options) {
21480
+ return new APIPromise($do$d(client, body, api_version, options));
21454
21481
  }
21455
- async function $do$6(client, body, api_version, options) {
21482
+ async function $do$d(client, body, api_version, options) {
21456
21483
  var _a, _b, _c;
21457
21484
  const input = {
21458
21485
  body: body,
@@ -21463,7 +21490,7 @@ async function $do$6(client, body, api_version, options) {
21463
21490
  const pathParams = {
21464
21491
  api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
21465
21492
  };
21466
- const path = pathToFunc("/{api_version}/webhooks")(pathParams);
21493
+ const path = pathToFunc("/{api_version}/triggers")(pathParams);
21467
21494
  const headers = new Headers(compactMap({
21468
21495
  "Content-Type": "application/json",
21469
21496
  Accept: "application/json",
@@ -21473,7 +21500,7 @@ async function $do$6(client, body, api_version, options) {
21473
21500
  const context = {
21474
21501
  options: client._options,
21475
21502
  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 : "",
21476
- operation_id: "CreateWebhook",
21503
+ operation_id: "CreateTrigger",
21477
21504
  o_auth2_scopes: null,
21478
21505
  resolved_security: requestSecurity,
21479
21506
  security_source: client._options.security,
@@ -21517,7 +21544,7 @@ async function $do$6(client, body, api_version, options) {
21517
21544
  return [doResult, { status: "request-error", request: req }];
21518
21545
  }
21519
21546
  const response = doResult.value;
21520
- const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
21547
+ const [result] = await match(json(200), fail("4XX"), fail("5XX"))(response, req);
21521
21548
  if (!result.ok) {
21522
21549
  return [result, { status: "complete", request: req, response }];
21523
21550
  }
@@ -21532,12 +21559,12 @@ async function $do$6(client, body, api_version, options) {
21532
21559
  * g3-prettier-ignore-file
21533
21560
  */
21534
21561
  /**
21535
- * Deletes a Webhook.
21562
+ * Deletes a trigger.
21536
21563
  */
21537
- function webhooksDelete(client, id, api_version, options) {
21538
- return new APIPromise($do$5(client, id, api_version, options));
21564
+ function triggersDelete(client, id, api_version, options) {
21565
+ return new APIPromise($do$c(client, id, api_version, options));
21539
21566
  }
21540
- async function $do$5(client, id, api_version, options) {
21567
+ async function $do$c(client, id, api_version, options) {
21541
21568
  var _a, _b, _c;
21542
21569
  const input = {
21543
21570
  id: id,
@@ -21552,7 +21579,7 @@ async function $do$5(client, id, api_version, options) {
21552
21579
  charEncoding: "percent",
21553
21580
  }),
21554
21581
  };
21555
- const path = pathToFunc("/{api_version}/webhooks/{id}")(pathParams);
21582
+ const path = pathToFunc("/{api_version}/triggers/{id}")(pathParams);
21556
21583
  const headers = new Headers(compactMap({
21557
21584
  Accept: "application/json",
21558
21585
  }));
@@ -21561,7 +21588,7 @@ async function $do$5(client, id, api_version, options) {
21561
21588
  const context = {
21562
21589
  options: client._options,
21563
21590
  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 : "",
21564
- operation_id: "DeleteWebhook",
21591
+ operation_id: "DeleteTrigger",
21565
21592
  o_auth2_scopes: null,
21566
21593
  resolved_security: requestSecurity,
21567
21594
  security_source: client._options.security,
@@ -21605,7 +21632,7 @@ async function $do$5(client, id, api_version, options) {
21605
21632
  return [doResult, { status: "request-error", request: req }];
21606
21633
  }
21607
21634
  const response = doResult.value;
21608
- const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
21635
+ const [result] = await match(json(200), fail("4XX"), fail("5XX"))(response, req);
21609
21636
  if (!result.ok) {
21610
21637
  return [result, { status: "complete", request: req, response }];
21611
21638
  }
@@ -21620,12 +21647,12 @@ async function $do$5(client, id, api_version, options) {
21620
21647
  * g3-prettier-ignore-file
21621
21648
  */
21622
21649
  /**
21623
- * Gets a specific Webhook.
21650
+ * Gets details of a single trigger.
21624
21651
  */
21625
- function webhooksGet(client, id, api_version, options) {
21626
- return new APIPromise($do$4(client, id, api_version, options));
21652
+ function triggersGet(client, id, api_version, options) {
21653
+ return new APIPromise($do$b(client, id, api_version, options));
21627
21654
  }
21628
- async function $do$4(client, id, api_version, options) {
21655
+ async function $do$b(client, id, api_version, options) {
21629
21656
  var _a, _b, _c;
21630
21657
  const input = {
21631
21658
  id: id,
@@ -21640,7 +21667,7 @@ async function $do$4(client, id, api_version, options) {
21640
21667
  charEncoding: "percent",
21641
21668
  }),
21642
21669
  };
21643
- const path = pathToFunc("/{api_version}/webhooks/{id}")(pathParams);
21670
+ const path = pathToFunc("/{api_version}/triggers/{id}")(pathParams);
21644
21671
  const headers = new Headers(compactMap({
21645
21672
  Accept: "application/json",
21646
21673
  }));
@@ -21649,7 +21676,7 @@ async function $do$4(client, id, api_version, options) {
21649
21676
  const context = {
21650
21677
  options: client._options,
21651
21678
  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 : "",
21652
- operation_id: "GetWebhook",
21679
+ operation_id: "GetTrigger",
21653
21680
  o_auth2_scopes: null,
21654
21681
  resolved_security: requestSecurity,
21655
21682
  security_source: client._options.security,
@@ -21693,7 +21720,7 @@ async function $do$4(client, id, api_version, options) {
21693
21720
  return [doResult, { status: "request-error", request: req }];
21694
21721
  }
21695
21722
  const response = doResult.value;
21696
- const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
21723
+ const [result] = await match(json(200), fail("4XX"), fail("5XX"))(response, req);
21697
21724
  if (!result.ok) {
21698
21725
  return [result, { status: "complete", request: req, response }];
21699
21726
  }
@@ -21708,14 +21735,15 @@ async function $do$4(client, id, api_version, options) {
21708
21735
  * g3-prettier-ignore-file
21709
21736
  */
21710
21737
  /**
21711
- * Lists all Webhooks.
21738
+ * Lists executions for a trigger.
21712
21739
  */
21713
- function webhooksList(client, api_version, page_size, page_token, options) {
21714
- return new APIPromise($do$3(client, api_version, page_size, page_token, options));
21740
+ function triggersListExecutions(client, trigger_id, api_version, page_size, page_token, options) {
21741
+ return new APIPromise($do$a(client, trigger_id, api_version, page_size, page_token, options));
21715
21742
  }
21716
- async function $do$3(client, api_version, page_size, page_token, options) {
21743
+ async function $do$a(client, trigger_id, api_version, page_size, page_token, options) {
21717
21744
  var _a, _b, _c;
21718
21745
  const input = {
21746
+ trigger_id: trigger_id,
21719
21747
  api_version: api_version,
21720
21748
  page_size: page_size,
21721
21749
  page_token: page_token,
@@ -21723,12 +21751,16 @@ async function $do$3(client, api_version, page_size, page_token, options) {
21723
21751
  const payload = input;
21724
21752
  const body = null;
21725
21753
  const pathParams = {
21726
- 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" }),
21754
+ api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
21755
+ trigger_id: encodeSimple("trigger_id", payload.trigger_id, {
21756
+ explode: false,
21757
+ charEncoding: "percent",
21758
+ }),
21727
21759
  };
21728
- const path = pathToFunc("/{api_version}/webhooks")(pathParams);
21760
+ const path = pathToFunc("/{api_version}/triggers/{trigger_id}/executions")(pathParams);
21729
21761
  const query = encodeFormQuery({
21730
- "page_size": payload === null || payload === void 0 ? void 0 : payload.page_size,
21731
- "page_token": payload === null || payload === void 0 ? void 0 : payload.page_token,
21762
+ "page_size": payload.page_size,
21763
+ "page_token": payload.page_token,
21732
21764
  });
21733
21765
  const headers = new Headers(compactMap({
21734
21766
  Accept: "application/json",
@@ -21738,7 +21770,7 @@ async function $do$3(client, api_version, page_size, page_token, options) {
21738
21770
  const context = {
21739
21771
  options: client._options,
21740
21772
  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 : "",
21741
- operation_id: "ListWebhooks",
21773
+ operation_id: "ListTriggerExecutions",
21742
21774
  o_auth2_scopes: null,
21743
21775
  resolved_security: requestSecurity,
21744
21776
  security_source: client._options.security,
@@ -21783,7 +21815,7 @@ async function $do$3(client, api_version, page_size, page_token, options) {
21783
21815
  return [doResult, { status: "request-error", request: req }];
21784
21816
  }
21785
21817
  const response = doResult.value;
21786
- const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
21818
+ const [result] = await match(json(200), fail("4XX"), fail("5XX"))(response, req);
21787
21819
  if (!result.ok) {
21788
21820
  return [result, { status: "complete", request: req, response }];
21789
21821
  }
@@ -21798,30 +21830,31 @@ async function $do$3(client, api_version, page_size, page_token, options) {
21798
21830
  * g3-prettier-ignore-file
21799
21831
  */
21800
21832
  /**
21801
- * Sends a ping event to a Webhook.
21833
+ * Lists triggers for a project.
21802
21834
  */
21803
- function webhooksPing(client, id, api_version, body, options) {
21804
- return new APIPromise($do$2(client, id, api_version, body, options));
21835
+ function triggersList(client, api_version, filter, page_size, page_token, options) {
21836
+ return new APIPromise($do$9(client, api_version, filter, page_size, page_token, options));
21805
21837
  }
21806
- async function $do$2(client, id, api_version, body, options) {
21838
+ async function $do$9(client, api_version, filter, page_size, page_token, options) {
21807
21839
  var _a, _b, _c;
21808
21840
  const input = {
21809
- id: id,
21810
21841
  api_version: api_version,
21811
- body: body,
21842
+ filter: filter,
21843
+ page_size: page_size,
21844
+ page_token: page_token,
21812
21845
  };
21813
21846
  const payload = input;
21814
- const body$ = encodeJSON("body", payload.body, { explode: true });
21847
+ const body = null;
21815
21848
  const pathParams = {
21816
- api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
21817
- id: encodeSimple("id", payload.id, {
21818
- explode: false,
21819
- charEncoding: "percent",
21820
- }),
21849
+ 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" }),
21821
21850
  };
21822
- const path = pathToFunc("/{api_version}/webhooks/{id}:ping")(pathParams);
21851
+ const path = pathToFunc("/{api_version}/triggers")(pathParams);
21852
+ const query = encodeFormQuery({
21853
+ "filter": payload === null || payload === void 0 ? void 0 : payload.filter,
21854
+ "page_size": payload === null || payload === void 0 ? void 0 : payload.page_size,
21855
+ "page_token": payload === null || payload === void 0 ? void 0 : payload.page_token,
21856
+ });
21823
21857
  const headers = new Headers(compactMap({
21824
- "Content-Type": "application/json",
21825
21858
  Accept: "application/json",
21826
21859
  }));
21827
21860
  const securityInput = await extractSecurity(client._options.security);
@@ -21829,7 +21862,7 @@ async function $do$2(client, id, api_version, body, options) {
21829
21862
  const context = {
21830
21863
  options: client._options,
21831
21864
  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 : "",
21832
- operation_id: "PingWebhook",
21865
+ operation_id: "ListTriggers",
21833
21866
  o_auth2_scopes: null,
21834
21867
  resolved_security: requestSecurity,
21835
21868
  security_source: client._options.security,
@@ -21851,11 +21884,12 @@ async function $do$2(client, id, api_version, body, options) {
21851
21884
  };
21852
21885
  const requestRes = client._createRequest(context, {
21853
21886
  security: requestSecurity,
21854
- method: "POST",
21887
+ method: "GET",
21855
21888
  baseURL: options === null || options === void 0 ? void 0 : options.server_url,
21856
21889
  path: path,
21857
21890
  headers: headers,
21858
- body: body$,
21891
+ query: query,
21892
+ body: body,
21859
21893
  userAgent: client._options.user_agent,
21860
21894
  timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
21861
21895
  }, options);
@@ -21873,7 +21907,7 @@ async function $do$2(client, id, api_version, body, options) {
21873
21907
  return [doResult, { status: "request-error", request: req }];
21874
21908
  }
21875
21909
  const response = doResult.value;
21876
- const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
21910
+ const [result] = await match(json(200), fail("4XX"), fail("5XX"))(response, req);
21877
21911
  if (!result.ok) {
21878
21912
  return [result, { status: "complete", request: req, response }];
21879
21913
  }
@@ -21888,30 +21922,28 @@ async function $do$2(client, id, api_version, body, options) {
21888
21922
  * g3-prettier-ignore-file
21889
21923
  */
21890
21924
  /**
21891
- * Generates a new signing secret for a Webhook.
21925
+ * Runs a trigger immediately.
21892
21926
  */
21893
- function webhooksRotateSigningSecret(client, id, api_version, body, options) {
21894
- return new APIPromise($do$1(client, id, api_version, body, options));
21927
+ function triggersRun(client, trigger_id, api_version, options) {
21928
+ return new APIPromise($do$8(client, trigger_id, api_version, options));
21895
21929
  }
21896
- async function $do$1(client, id, api_version, body, options) {
21930
+ async function $do$8(client, trigger_id, api_version, options) {
21897
21931
  var _a, _b, _c;
21898
21932
  const input = {
21899
- id: id,
21933
+ trigger_id: trigger_id,
21900
21934
  api_version: api_version,
21901
- body: body,
21902
21935
  };
21903
21936
  const payload = input;
21904
- const body$ = encodeJSON("body", payload.body, { explode: true });
21937
+ const body = null;
21905
21938
  const pathParams = {
21906
21939
  api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
21907
- id: encodeSimple("id", payload.id, {
21940
+ trigger_id: encodeSimple("trigger_id", payload.trigger_id, {
21908
21941
  explode: false,
21909
21942
  charEncoding: "percent",
21910
21943
  }),
21911
21944
  };
21912
- const path = pathToFunc("/{api_version}/webhooks/{id}:rotateSigningSecret")(pathParams);
21945
+ const path = pathToFunc("/{api_version}/triggers/{trigger_id}/executions")(pathParams);
21913
21946
  const headers = new Headers(compactMap({
21914
- "Content-Type": "application/json",
21915
21947
  Accept: "application/json",
21916
21948
  }));
21917
21949
  const securityInput = await extractSecurity(client._options.security);
@@ -21919,7 +21951,7 @@ async function $do$1(client, id, api_version, body, options) {
21919
21951
  const context = {
21920
21952
  options: client._options,
21921
21953
  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 : "",
21922
- operation_id: "RotateSigningSecret",
21954
+ operation_id: "RunTrigger",
21923
21955
  o_auth2_scopes: null,
21924
21956
  resolved_security: requestSecurity,
21925
21957
  security_source: client._options.security,
@@ -21945,7 +21977,7 @@ async function $do$1(client, id, api_version, body, options) {
21945
21977
  baseURL: options === null || options === void 0 ? void 0 : options.server_url,
21946
21978
  path: path,
21947
21979
  headers: headers,
21948
- body: body$,
21980
+ body: body,
21949
21981
  userAgent: client._options.user_agent,
21950
21982
  timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
21951
21983
  }, options);
@@ -21963,7 +21995,7 @@ async function $do$1(client, id, api_version, body, options) {
21963
21995
  return [doResult, { status: "request-error", request: req }];
21964
21996
  }
21965
21997
  const response = doResult.value;
21966
- const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
21998
+ const [result] = await match(json(200), fail("4XX"), fail("5XX"))(response, req);
21967
21999
  if (!result.ok) {
21968
22000
  return [result, { status: "complete", request: req, response }];
21969
22001
  }
@@ -21978,18 +22010,17 @@ async function $do$1(client, id, api_version, body, options) {
21978
22010
  * g3-prettier-ignore-file
21979
22011
  */
21980
22012
  /**
21981
- * Updates an existing Webhook.
22013
+ * Updates a trigger.
21982
22014
  */
21983
- function webhooksUpdate(client, id, api_version, update_mask, body, options) {
21984
- return new APIPromise($do(client, id, api_version, update_mask, body, options));
22015
+ function triggersUpdate(client, id, body, api_version, options) {
22016
+ return new APIPromise($do$7(client, id, body, api_version, options));
21985
22017
  }
21986
- async function $do(client, id, api_version, update_mask, body, options) {
22018
+ async function $do$7(client, id, body, api_version, options) {
21987
22019
  var _a, _b, _c;
21988
22020
  const input = {
21989
22021
  id: id,
21990
- api_version: api_version,
21991
- update_mask: update_mask,
21992
22022
  body: body,
22023
+ api_version: api_version,
21993
22024
  };
21994
22025
  const payload = input;
21995
22026
  const body$ = encodeJSON("body", payload.body, { explode: true });
@@ -22000,10 +22031,7 @@ async function $do(client, id, api_version, update_mask, body, options) {
22000
22031
  charEncoding: "percent",
22001
22032
  }),
22002
22033
  };
22003
- const path = pathToFunc("/{api_version}/webhooks/{id}")(pathParams);
22004
- const query = encodeFormQuery({
22005
- "update_mask": payload.update_mask,
22006
- });
22034
+ const path = pathToFunc("/{api_version}/triggers/{id}")(pathParams);
22007
22035
  const headers = new Headers(compactMap({
22008
22036
  "Content-Type": "application/json",
22009
22037
  Accept: "application/json",
@@ -22013,7 +22041,7 @@ async function $do(client, id, api_version, update_mask, body, options) {
22013
22041
  const context = {
22014
22042
  options: client._options,
22015
22043
  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 : "",
22016
- operation_id: "UpdateWebhook",
22044
+ operation_id: "UpdateTrigger",
22017
22045
  o_auth2_scopes: null,
22018
22046
  resolved_security: requestSecurity,
22019
22047
  security_source: client._options.security,
@@ -22039,7 +22067,6 @@ async function $do(client, id, api_version, update_mask, body, options) {
22039
22067
  baseURL: options === null || options === void 0 ? void 0 : options.server_url,
22040
22068
  path: path,
22041
22069
  headers: headers,
22042
- query: query,
22043
22070
  body: body$,
22044
22071
  userAgent: client._options.user_agent,
22045
22072
  timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
@@ -22058,7 +22085,7 @@ async function $do(client, id, api_version, update_mask, body, options) {
22058
22085
  return [doResult, { status: "request-error", request: req }];
22059
22086
  }
22060
22087
  const response = doResult.value;
22061
- const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
22088
+ const [result] = await match(json(200), fail("4XX"), fail("5XX"))(response, req);
22062
22089
  if (!result.ok) {
22063
22090
  return [result, { status: "complete", request: req, response }];
22064
22091
  }
@@ -22072,53 +22099,50 @@ async function $do(client, id, api_version, update_mask, body, options) {
22072
22099
  *
22073
22100
  * g3-prettier-ignore-file
22074
22101
  */
22075
- class Webhooks extends ClientSDK {
22102
+ class Triggers extends ClientSDK {
22076
22103
  /**
22077
- * Creates a new Webhook.
22104
+ * Creates a new trigger that will invoke the specified agent on the given cron schedule.
22078
22105
  */
22079
22106
  create(params, options) {
22080
22107
  const { api_version } = params, body = __rest(params, ["api_version"]);
22081
- return unwrapAsAPIPromise(webhooksCreate(this, body, api_version, options));
22108
+ return unwrapAsAPIPromise(triggersCreate(this, body, api_version, options));
22082
22109
  }
22083
22110
  /**
22084
- * Lists all Webhooks.
22111
+ * Lists triggers for a project.
22085
22112
  */
22086
22113
  list(params, options) {
22087
- 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));
22114
+ 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));
22088
22115
  }
22089
22116
  /**
22090
- * Gets a specific Webhook.
22117
+ * Gets details of a single trigger.
22091
22118
  */
22092
22119
  get(id, params, options) {
22093
- return unwrapAsAPIPromise(webhooksGet(this, id, params === null || params === void 0 ? void 0 : params.api_version, options));
22120
+ return unwrapAsAPIPromise(triggersGet(this, id, params === null || params === void 0 ? void 0 : params.api_version, options));
22094
22121
  }
22095
22122
  /**
22096
- * Updates an existing Webhook.
22123
+ * Updates a trigger.
22097
22124
  */
22098
22125
  update(id, params, options) {
22099
- const _a = params !== null && params !== void 0 ? params : {}, { api_version, update_mask } = _a, body$body = __rest(_a, ["api_version", "update_mask"]);
22100
- const body = params === undefined || Object.keys(body$body).length === 0
22101
- ? undefined
22102
- : body$body;
22103
- return unwrapAsAPIPromise(webhooksUpdate(this, id, api_version, update_mask, body, options));
22126
+ const { api_version } = params, body = __rest(params, ["api_version"]);
22127
+ return unwrapAsAPIPromise(triggersUpdate(this, id, body, api_version, options));
22104
22128
  }
22105
22129
  /**
22106
- * Deletes a Webhook.
22130
+ * Deletes a trigger.
22107
22131
  */
22108
22132
  delete(id, params, options) {
22109
- return unwrapAsAPIPromise(webhooksDelete(this, id, params === null || params === void 0 ? void 0 : params.api_version, options));
22133
+ return unwrapAsAPIPromise(triggersDelete(this, id, params === null || params === void 0 ? void 0 : params.api_version, options));
22110
22134
  }
22111
22135
  /**
22112
- * Generates a new signing secret for a Webhook.
22136
+ * Runs a trigger immediately.
22113
22137
  */
22114
- rotateSigningSecret(id, api_version, body, options) {
22115
- return unwrapAsAPIPromise(webhooksRotateSigningSecret(this, id, api_version, body, options));
22138
+ run(trigger_id, params, options) {
22139
+ return unwrapAsAPIPromise(triggersRun(this, trigger_id, params === null || params === void 0 ? void 0 : params.api_version, options));
22116
22140
  }
22117
22141
  /**
22118
- * Sends a ping event to a Webhook.
22142
+ * Lists executions for a trigger.
22119
22143
  */
22120
- ping(id, api_version, body, options) {
22121
- return unwrapAsAPIPromise(webhooksPing(this, id, api_version, body, options));
22144
+ listExecutions(trigger_id, params, options) {
22145
+ 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));
22122
22146
  }
22123
22147
  }
22124
22148
 
@@ -22129,23 +22153,83 @@ class Webhooks extends ClientSDK {
22129
22153
  *
22130
22154
  * g3-prettier-ignore-file
22131
22155
  */
22132
- /*
22133
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
22156
+ /**
22157
+ * Creates a new Webhook.
22134
22158
  */
22135
- let GoogleGenAI$1 = class GoogleGenAI extends ClientSDK {
22136
- get interactions() {
22137
- var _a;
22138
- return ((_a = this._interactions) !== null && _a !== void 0 ? _a : (this._interactions = new Interactions(this._options)));
22159
+ function webhooksCreate(client, body, api_version, options) {
22160
+ return new APIPromise($do$6(client, body, api_version, options));
22161
+ }
22162
+ async function $do$6(client, body, api_version, options) {
22163
+ var _a, _b, _c;
22164
+ const input = {
22165
+ body: body,
22166
+ api_version: api_version,
22167
+ };
22168
+ const payload = input;
22169
+ const body$ = encodeJSON("body", payload.body, { explode: true });
22170
+ const pathParams = {
22171
+ api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
22172
+ };
22173
+ const path = pathToFunc("/{api_version}/webhooks")(pathParams);
22174
+ const headers = new Headers(compactMap({
22175
+ "Content-Type": "application/json",
22176
+ Accept: "application/json",
22177
+ }));
22178
+ const securityInput = await extractSecurity(client._options.security);
22179
+ const requestSecurity = resolveGlobalSecurity(securityInput);
22180
+ const context = {
22181
+ options: client._options,
22182
+ 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 : "",
22183
+ operation_id: "CreateWebhook",
22184
+ o_auth2_scopes: null,
22185
+ resolved_security: requestSecurity,
22186
+ security_source: client._options.security,
22187
+ retry_config: (options === null || options === void 0 ? void 0 : options.retries)
22188
+ || client._options.retry_config
22189
+ || {
22190
+ strategy: "attempt-count-backoff",
22191
+ backoff: {
22192
+ initialInterval: 500,
22193
+ maxInterval: 8000,
22194
+ exponent: 2,
22195
+ maxElapsedTime: 30000,
22196
+ },
22197
+ retryConnectionErrors: true,
22198
+ maxRetries: 4,
22199
+ }
22200
+ || { strategy: "none" },
22201
+ retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
22202
+ };
22203
+ const requestRes = client._createRequest(context, {
22204
+ security: requestSecurity,
22205
+ method: "POST",
22206
+ baseURL: options === null || options === void 0 ? void 0 : options.server_url,
22207
+ path: path,
22208
+ headers: headers,
22209
+ body: body$,
22210
+ userAgent: client._options.user_agent,
22211
+ timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
22212
+ }, options);
22213
+ if (!requestRes.ok) {
22214
+ return [requestRes, { status: "invalid" }];
22139
22215
  }
22140
- get webhooks() {
22141
- var _a;
22142
- return ((_a = this._webhooks) !== null && _a !== void 0 ? _a : (this._webhooks = new Webhooks(this._options)));
22216
+ const req = requestRes.value;
22217
+ const doResult = await client._do(req, {
22218
+ context,
22219
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
22220
+ retryConfig: context.retry_config,
22221
+ retryCodes: context.retry_codes,
22222
+ });
22223
+ if (!doResult.ok) {
22224
+ return [doResult, { status: "request-error", request: req }];
22143
22225
  }
22144
- get agents() {
22145
- var _a;
22146
- return ((_a = this._agents) !== null && _a !== void 0 ? _a : (this._agents = new Agents(this._options)));
22226
+ const response = doResult.value;
22227
+ const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
22228
+ if (!result.ok) {
22229
+ return [result, { status: "complete", request: req, response }];
22147
22230
  }
22148
- };
22231
+ return [result, { status: "complete", request: req, response }];
22232
+ }
22149
22233
 
22150
22234
  /**
22151
22235
  * @license
@@ -22154,39 +22238,666 @@ let GoogleGenAI$1 = class GoogleGenAI extends ClientSDK {
22154
22238
  *
22155
22239
  * g3-prettier-ignore-file
22156
22240
  */
22157
- const LEGACY_LYRIA_MODELS = new Set([
22158
- "lyria-3-pro-preview",
22159
- "lyria-3-clip-preview",
22160
- ]);
22161
- function getGoogleGenAIServerURL(parentClient) {
22162
- const serverURL = parentClient.getBaseUrl();
22163
- if (!serverURL) {
22164
- throw new Error("Base URL must be set.");
22165
- }
22166
- return serverURL.replace(/\/+$/, "");
22167
- }
22168
- function getGoogleGenAIAPIVersion(parentClient) {
22169
- const apiVersion = trimSlashes(parentClient.getApiVersion());
22170
- const project = parentClient.getProject();
22171
- const location = parentClient.getLocation();
22172
- if (parentClient.isVertexAI() && apiVersion && project && location) {
22173
- return (`${apiVersion}/projects/${encodeURIComponent(project)}` +
22174
- `/locations/${encodeURIComponent(location)}`);
22175
- }
22176
- return apiVersion;
22177
- }
22178
- function buildGoogleGenAIClient(parentClient, options = {}) {
22179
- var _a, _b, _c, _d;
22180
- 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({
22181
- defaultHeaders: (_c = parentClient.getDefaultHeaders) === null || _c === void 0 ? void 0 : _c.call(parentClient),
22182
- getAuthHeaders: (url) => parentClient.getAuthHeaders(url),
22183
- }), server_url: (_d = options.server_url) !== null && _d !== void 0 ? _d : getGoogleGenAIServerURL(parentClient) }));
22184
- return sdk;
22241
+ /**
22242
+ * Deletes a Webhook.
22243
+ */
22244
+ function webhooksDelete(client, id, api_version, options) {
22245
+ return new APIPromise($do$5(client, id, api_version, options));
22185
22246
  }
22186
- class GeminiNextGenInteractions {
22187
- constructor(parentClient) {
22188
- this.parentClient = parentClient;
22189
- }
22247
+ async function $do$5(client, id, api_version, options) {
22248
+ var _a, _b, _c;
22249
+ const input = {
22250
+ id: id,
22251
+ api_version: api_version,
22252
+ };
22253
+ const payload = input;
22254
+ const body = null;
22255
+ const pathParams = {
22256
+ api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
22257
+ id: encodeSimple("id", payload.id, {
22258
+ explode: false,
22259
+ charEncoding: "percent",
22260
+ }),
22261
+ };
22262
+ const path = pathToFunc("/{api_version}/webhooks/{id}")(pathParams);
22263
+ const headers = new Headers(compactMap({
22264
+ Accept: "application/json",
22265
+ }));
22266
+ const securityInput = await extractSecurity(client._options.security);
22267
+ const requestSecurity = resolveGlobalSecurity(securityInput);
22268
+ const context = {
22269
+ options: client._options,
22270
+ 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 : "",
22271
+ operation_id: "DeleteWebhook",
22272
+ o_auth2_scopes: null,
22273
+ resolved_security: requestSecurity,
22274
+ security_source: client._options.security,
22275
+ retry_config: (options === null || options === void 0 ? void 0 : options.retries)
22276
+ || client._options.retry_config
22277
+ || {
22278
+ strategy: "attempt-count-backoff",
22279
+ backoff: {
22280
+ initialInterval: 500,
22281
+ maxInterval: 8000,
22282
+ exponent: 2,
22283
+ maxElapsedTime: 30000,
22284
+ },
22285
+ retryConnectionErrors: true,
22286
+ maxRetries: 4,
22287
+ }
22288
+ || { strategy: "none" },
22289
+ retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
22290
+ };
22291
+ const requestRes = client._createRequest(context, {
22292
+ security: requestSecurity,
22293
+ method: "DELETE",
22294
+ baseURL: options === null || options === void 0 ? void 0 : options.server_url,
22295
+ path: path,
22296
+ headers: headers,
22297
+ body: body,
22298
+ userAgent: client._options.user_agent,
22299
+ timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
22300
+ }, options);
22301
+ if (!requestRes.ok) {
22302
+ return [requestRes, { status: "invalid" }];
22303
+ }
22304
+ const req = requestRes.value;
22305
+ const doResult = await client._do(req, {
22306
+ context,
22307
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
22308
+ retryConfig: context.retry_config,
22309
+ retryCodes: context.retry_codes,
22310
+ });
22311
+ if (!doResult.ok) {
22312
+ return [doResult, { status: "request-error", request: req }];
22313
+ }
22314
+ const response = doResult.value;
22315
+ const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
22316
+ if (!result.ok) {
22317
+ return [result, { status: "complete", request: req, response }];
22318
+ }
22319
+ return [result, { status: "complete", request: req, response }];
22320
+ }
22321
+
22322
+ /**
22323
+ * @license
22324
+ * Copyright 2026 Google LLC
22325
+ * SPDX-License-Identifier: Apache-2.0
22326
+ *
22327
+ * g3-prettier-ignore-file
22328
+ */
22329
+ /**
22330
+ * Gets a specific Webhook.
22331
+ */
22332
+ function webhooksGet(client, id, api_version, options) {
22333
+ return new APIPromise($do$4(client, id, api_version, options));
22334
+ }
22335
+ async function $do$4(client, id, api_version, options) {
22336
+ var _a, _b, _c;
22337
+ const input = {
22338
+ id: id,
22339
+ api_version: api_version,
22340
+ };
22341
+ const payload = input;
22342
+ const body = null;
22343
+ const pathParams = {
22344
+ api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
22345
+ id: encodeSimple("id", payload.id, {
22346
+ explode: false,
22347
+ charEncoding: "percent",
22348
+ }),
22349
+ };
22350
+ const path = pathToFunc("/{api_version}/webhooks/{id}")(pathParams);
22351
+ const headers = new Headers(compactMap({
22352
+ Accept: "application/json",
22353
+ }));
22354
+ const securityInput = await extractSecurity(client._options.security);
22355
+ const requestSecurity = resolveGlobalSecurity(securityInput);
22356
+ const context = {
22357
+ options: client._options,
22358
+ 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 : "",
22359
+ operation_id: "GetWebhook",
22360
+ o_auth2_scopes: null,
22361
+ resolved_security: requestSecurity,
22362
+ security_source: client._options.security,
22363
+ retry_config: (options === null || options === void 0 ? void 0 : options.retries)
22364
+ || client._options.retry_config
22365
+ || {
22366
+ strategy: "attempt-count-backoff",
22367
+ backoff: {
22368
+ initialInterval: 500,
22369
+ maxInterval: 8000,
22370
+ exponent: 2,
22371
+ maxElapsedTime: 30000,
22372
+ },
22373
+ retryConnectionErrors: true,
22374
+ maxRetries: 4,
22375
+ }
22376
+ || { strategy: "none" },
22377
+ retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
22378
+ };
22379
+ const requestRes = client._createRequest(context, {
22380
+ security: requestSecurity,
22381
+ method: "GET",
22382
+ baseURL: options === null || options === void 0 ? void 0 : options.server_url,
22383
+ path: path,
22384
+ headers: headers,
22385
+ body: body,
22386
+ userAgent: client._options.user_agent,
22387
+ timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
22388
+ }, options);
22389
+ if (!requestRes.ok) {
22390
+ return [requestRes, { status: "invalid" }];
22391
+ }
22392
+ const req = requestRes.value;
22393
+ const doResult = await client._do(req, {
22394
+ context,
22395
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
22396
+ retryConfig: context.retry_config,
22397
+ retryCodes: context.retry_codes,
22398
+ });
22399
+ if (!doResult.ok) {
22400
+ return [doResult, { status: "request-error", request: req }];
22401
+ }
22402
+ const response = doResult.value;
22403
+ const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
22404
+ if (!result.ok) {
22405
+ return [result, { status: "complete", request: req, response }];
22406
+ }
22407
+ return [result, { status: "complete", request: req, response }];
22408
+ }
22409
+
22410
+ /**
22411
+ * @license
22412
+ * Copyright 2026 Google LLC
22413
+ * SPDX-License-Identifier: Apache-2.0
22414
+ *
22415
+ * g3-prettier-ignore-file
22416
+ */
22417
+ /**
22418
+ * Lists all Webhooks.
22419
+ */
22420
+ function webhooksList(client, api_version, page_size, page_token, options) {
22421
+ return new APIPromise($do$3(client, api_version, page_size, page_token, options));
22422
+ }
22423
+ async function $do$3(client, api_version, page_size, page_token, options) {
22424
+ var _a, _b, _c;
22425
+ const input = {
22426
+ api_version: api_version,
22427
+ page_size: page_size,
22428
+ page_token: page_token,
22429
+ };
22430
+ const payload = input;
22431
+ const body = null;
22432
+ const pathParams = {
22433
+ 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" }),
22434
+ };
22435
+ const path = pathToFunc("/{api_version}/webhooks")(pathParams);
22436
+ const query = encodeFormQuery({
22437
+ "page_size": payload === null || payload === void 0 ? void 0 : payload.page_size,
22438
+ "page_token": payload === null || payload === void 0 ? void 0 : payload.page_token,
22439
+ });
22440
+ const headers = new Headers(compactMap({
22441
+ Accept: "application/json",
22442
+ }));
22443
+ const securityInput = await extractSecurity(client._options.security);
22444
+ const requestSecurity = resolveGlobalSecurity(securityInput);
22445
+ const context = {
22446
+ options: client._options,
22447
+ 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 : "",
22448
+ operation_id: "ListWebhooks",
22449
+ o_auth2_scopes: null,
22450
+ resolved_security: requestSecurity,
22451
+ security_source: client._options.security,
22452
+ retry_config: (options === null || options === void 0 ? void 0 : options.retries)
22453
+ || client._options.retry_config
22454
+ || {
22455
+ strategy: "attempt-count-backoff",
22456
+ backoff: {
22457
+ initialInterval: 500,
22458
+ maxInterval: 8000,
22459
+ exponent: 2,
22460
+ maxElapsedTime: 30000,
22461
+ },
22462
+ retryConnectionErrors: true,
22463
+ maxRetries: 4,
22464
+ }
22465
+ || { strategy: "none" },
22466
+ retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
22467
+ };
22468
+ const requestRes = client._createRequest(context, {
22469
+ security: requestSecurity,
22470
+ method: "GET",
22471
+ baseURL: options === null || options === void 0 ? void 0 : options.server_url,
22472
+ path: path,
22473
+ headers: headers,
22474
+ query: query,
22475
+ body: body,
22476
+ userAgent: client._options.user_agent,
22477
+ timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
22478
+ }, options);
22479
+ if (!requestRes.ok) {
22480
+ return [requestRes, { status: "invalid" }];
22481
+ }
22482
+ const req = requestRes.value;
22483
+ const doResult = await client._do(req, {
22484
+ context,
22485
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
22486
+ retryConfig: context.retry_config,
22487
+ retryCodes: context.retry_codes,
22488
+ });
22489
+ if (!doResult.ok) {
22490
+ return [doResult, { status: "request-error", request: req }];
22491
+ }
22492
+ const response = doResult.value;
22493
+ const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
22494
+ if (!result.ok) {
22495
+ return [result, { status: "complete", request: req, response }];
22496
+ }
22497
+ return [result, { status: "complete", request: req, response }];
22498
+ }
22499
+
22500
+ /**
22501
+ * @license
22502
+ * Copyright 2026 Google LLC
22503
+ * SPDX-License-Identifier: Apache-2.0
22504
+ *
22505
+ * g3-prettier-ignore-file
22506
+ */
22507
+ /**
22508
+ * Sends a ping event to a Webhook.
22509
+ */
22510
+ function webhooksPing(client, id, api_version, body, options) {
22511
+ return new APIPromise($do$2(client, id, api_version, body, options));
22512
+ }
22513
+ async function $do$2(client, id, api_version, body, options) {
22514
+ var _a, _b, _c;
22515
+ const input = {
22516
+ id: id,
22517
+ api_version: api_version,
22518
+ body: body,
22519
+ };
22520
+ const payload = input;
22521
+ const body$ = encodeJSON("body", payload.body, { explode: true });
22522
+ const pathParams = {
22523
+ api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
22524
+ id: encodeSimple("id", payload.id, {
22525
+ explode: false,
22526
+ charEncoding: "percent",
22527
+ }),
22528
+ };
22529
+ const path = pathToFunc("/{api_version}/webhooks/{id}:ping")(pathParams);
22530
+ const headers = new Headers(compactMap({
22531
+ "Content-Type": "application/json",
22532
+ Accept: "application/json",
22533
+ }));
22534
+ const securityInput = await extractSecurity(client._options.security);
22535
+ const requestSecurity = resolveGlobalSecurity(securityInput);
22536
+ const context = {
22537
+ options: client._options,
22538
+ 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 : "",
22539
+ operation_id: "PingWebhook",
22540
+ o_auth2_scopes: null,
22541
+ resolved_security: requestSecurity,
22542
+ security_source: client._options.security,
22543
+ retry_config: (options === null || options === void 0 ? void 0 : options.retries)
22544
+ || client._options.retry_config
22545
+ || {
22546
+ strategy: "attempt-count-backoff",
22547
+ backoff: {
22548
+ initialInterval: 500,
22549
+ maxInterval: 8000,
22550
+ exponent: 2,
22551
+ maxElapsedTime: 30000,
22552
+ },
22553
+ retryConnectionErrors: true,
22554
+ maxRetries: 4,
22555
+ }
22556
+ || { strategy: "none" },
22557
+ retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
22558
+ };
22559
+ const requestRes = client._createRequest(context, {
22560
+ security: requestSecurity,
22561
+ method: "POST",
22562
+ baseURL: options === null || options === void 0 ? void 0 : options.server_url,
22563
+ path: path,
22564
+ headers: headers,
22565
+ body: body$,
22566
+ userAgent: client._options.user_agent,
22567
+ timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
22568
+ }, options);
22569
+ if (!requestRes.ok) {
22570
+ return [requestRes, { status: "invalid" }];
22571
+ }
22572
+ const req = requestRes.value;
22573
+ const doResult = await client._do(req, {
22574
+ context,
22575
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
22576
+ retryConfig: context.retry_config,
22577
+ retryCodes: context.retry_codes,
22578
+ });
22579
+ if (!doResult.ok) {
22580
+ return [doResult, { status: "request-error", request: req }];
22581
+ }
22582
+ const response = doResult.value;
22583
+ const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
22584
+ if (!result.ok) {
22585
+ return [result, { status: "complete", request: req, response }];
22586
+ }
22587
+ return [result, { status: "complete", request: req, response }];
22588
+ }
22589
+
22590
+ /**
22591
+ * @license
22592
+ * Copyright 2026 Google LLC
22593
+ * SPDX-License-Identifier: Apache-2.0
22594
+ *
22595
+ * g3-prettier-ignore-file
22596
+ */
22597
+ /**
22598
+ * Generates a new signing secret for a Webhook.
22599
+ */
22600
+ function webhooksRotateSigningSecret(client, id, api_version, body, options) {
22601
+ return new APIPromise($do$1(client, id, api_version, body, options));
22602
+ }
22603
+ async function $do$1(client, id, api_version, body, options) {
22604
+ var _a, _b, _c;
22605
+ const input = {
22606
+ id: id,
22607
+ api_version: api_version,
22608
+ body: body,
22609
+ };
22610
+ const payload = input;
22611
+ const body$ = encodeJSON("body", payload.body, { explode: true });
22612
+ const pathParams = {
22613
+ api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
22614
+ id: encodeSimple("id", payload.id, {
22615
+ explode: false,
22616
+ charEncoding: "percent",
22617
+ }),
22618
+ };
22619
+ const path = pathToFunc("/{api_version}/webhooks/{id}:rotateSigningSecret")(pathParams);
22620
+ const headers = new Headers(compactMap({
22621
+ "Content-Type": "application/json",
22622
+ Accept: "application/json",
22623
+ }));
22624
+ const securityInput = await extractSecurity(client._options.security);
22625
+ const requestSecurity = resolveGlobalSecurity(securityInput);
22626
+ const context = {
22627
+ options: client._options,
22628
+ 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 : "",
22629
+ operation_id: "RotateSigningSecret",
22630
+ o_auth2_scopes: null,
22631
+ resolved_security: requestSecurity,
22632
+ security_source: client._options.security,
22633
+ retry_config: (options === null || options === void 0 ? void 0 : options.retries)
22634
+ || client._options.retry_config
22635
+ || {
22636
+ strategy: "attempt-count-backoff",
22637
+ backoff: {
22638
+ initialInterval: 500,
22639
+ maxInterval: 8000,
22640
+ exponent: 2,
22641
+ maxElapsedTime: 30000,
22642
+ },
22643
+ retryConnectionErrors: true,
22644
+ maxRetries: 4,
22645
+ }
22646
+ || { strategy: "none" },
22647
+ retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
22648
+ };
22649
+ const requestRes = client._createRequest(context, {
22650
+ security: requestSecurity,
22651
+ method: "POST",
22652
+ baseURL: options === null || options === void 0 ? void 0 : options.server_url,
22653
+ path: path,
22654
+ headers: headers,
22655
+ body: body$,
22656
+ userAgent: client._options.user_agent,
22657
+ timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
22658
+ }, options);
22659
+ if (!requestRes.ok) {
22660
+ return [requestRes, { status: "invalid" }];
22661
+ }
22662
+ const req = requestRes.value;
22663
+ const doResult = await client._do(req, {
22664
+ context,
22665
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
22666
+ retryConfig: context.retry_config,
22667
+ retryCodes: context.retry_codes,
22668
+ });
22669
+ if (!doResult.ok) {
22670
+ return [doResult, { status: "request-error", request: req }];
22671
+ }
22672
+ const response = doResult.value;
22673
+ const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
22674
+ if (!result.ok) {
22675
+ return [result, { status: "complete", request: req, response }];
22676
+ }
22677
+ return [result, { status: "complete", request: req, response }];
22678
+ }
22679
+
22680
+ /**
22681
+ * @license
22682
+ * Copyright 2026 Google LLC
22683
+ * SPDX-License-Identifier: Apache-2.0
22684
+ *
22685
+ * g3-prettier-ignore-file
22686
+ */
22687
+ /**
22688
+ * Updates an existing Webhook.
22689
+ */
22690
+ function webhooksUpdate(client, id, api_version, update_mask, body, options) {
22691
+ return new APIPromise($do(client, id, api_version, update_mask, body, options));
22692
+ }
22693
+ async function $do(client, id, api_version, update_mask, body, options) {
22694
+ var _a, _b, _c;
22695
+ const input = {
22696
+ id: id,
22697
+ api_version: api_version,
22698
+ update_mask: update_mask,
22699
+ body: body,
22700
+ };
22701
+ const payload = input;
22702
+ const body$ = encodeJSON("body", payload.body, { explode: true });
22703
+ const pathParams = {
22704
+ api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
22705
+ id: encodeSimple("id", payload.id, {
22706
+ explode: false,
22707
+ charEncoding: "percent",
22708
+ }),
22709
+ };
22710
+ const path = pathToFunc("/{api_version}/webhooks/{id}")(pathParams);
22711
+ const query = encodeFormQuery({
22712
+ "update_mask": payload.update_mask,
22713
+ });
22714
+ const headers = new Headers(compactMap({
22715
+ "Content-Type": "application/json",
22716
+ Accept: "application/json",
22717
+ }));
22718
+ const securityInput = await extractSecurity(client._options.security);
22719
+ const requestSecurity = resolveGlobalSecurity(securityInput);
22720
+ const context = {
22721
+ options: client._options,
22722
+ 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 : "",
22723
+ operation_id: "UpdateWebhook",
22724
+ o_auth2_scopes: null,
22725
+ resolved_security: requestSecurity,
22726
+ security_source: client._options.security,
22727
+ retry_config: (options === null || options === void 0 ? void 0 : options.retries)
22728
+ || client._options.retry_config
22729
+ || {
22730
+ strategy: "attempt-count-backoff",
22731
+ backoff: {
22732
+ initialInterval: 500,
22733
+ maxInterval: 8000,
22734
+ exponent: 2,
22735
+ maxElapsedTime: 30000,
22736
+ },
22737
+ retryConnectionErrors: true,
22738
+ maxRetries: 4,
22739
+ }
22740
+ || { strategy: "none" },
22741
+ retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
22742
+ };
22743
+ const requestRes = client._createRequest(context, {
22744
+ security: requestSecurity,
22745
+ method: "PATCH",
22746
+ baseURL: options === null || options === void 0 ? void 0 : options.server_url,
22747
+ path: path,
22748
+ headers: headers,
22749
+ query: query,
22750
+ body: body$,
22751
+ userAgent: client._options.user_agent,
22752
+ timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
22753
+ }, options);
22754
+ if (!requestRes.ok) {
22755
+ return [requestRes, { status: "invalid" }];
22756
+ }
22757
+ const req = requestRes.value;
22758
+ const doResult = await client._do(req, {
22759
+ context,
22760
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
22761
+ retryConfig: context.retry_config,
22762
+ retryCodes: context.retry_codes,
22763
+ });
22764
+ if (!doResult.ok) {
22765
+ return [doResult, { status: "request-error", request: req }];
22766
+ }
22767
+ const response = doResult.value;
22768
+ const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
22769
+ if (!result.ok) {
22770
+ return [result, { status: "complete", request: req, response }];
22771
+ }
22772
+ return [result, { status: "complete", request: req, response }];
22773
+ }
22774
+
22775
+ /**
22776
+ * @license
22777
+ * Copyright 2026 Google LLC
22778
+ * SPDX-License-Identifier: Apache-2.0
22779
+ *
22780
+ * g3-prettier-ignore-file
22781
+ */
22782
+ class Webhooks extends ClientSDK {
22783
+ /**
22784
+ * Creates a new Webhook.
22785
+ */
22786
+ create(params, options) {
22787
+ const { api_version } = params, body = __rest(params, ["api_version"]);
22788
+ return unwrapAsAPIPromise(webhooksCreate(this, body, api_version, options));
22789
+ }
22790
+ /**
22791
+ * Lists all Webhooks.
22792
+ */
22793
+ list(params, options) {
22794
+ 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));
22795
+ }
22796
+ /**
22797
+ * Gets a specific Webhook.
22798
+ */
22799
+ get(id, params, options) {
22800
+ return unwrapAsAPIPromise(webhooksGet(this, id, params === null || params === void 0 ? void 0 : params.api_version, options));
22801
+ }
22802
+ /**
22803
+ * Updates an existing Webhook.
22804
+ */
22805
+ update(id, params, options) {
22806
+ const _a = params !== null && params !== void 0 ? params : {}, { api_version, update_mask } = _a, body$body = __rest(_a, ["api_version", "update_mask"]);
22807
+ const body = params === undefined || Object.keys(body$body).length === 0
22808
+ ? undefined
22809
+ : body$body;
22810
+ return unwrapAsAPIPromise(webhooksUpdate(this, id, api_version, update_mask, body, options));
22811
+ }
22812
+ /**
22813
+ * Deletes a Webhook.
22814
+ */
22815
+ delete(id, params, options) {
22816
+ return unwrapAsAPIPromise(webhooksDelete(this, id, params === null || params === void 0 ? void 0 : params.api_version, options));
22817
+ }
22818
+ /**
22819
+ * Generates a new signing secret for a Webhook.
22820
+ */
22821
+ rotateSigningSecret(id, api_version, body, options) {
22822
+ return unwrapAsAPIPromise(webhooksRotateSigningSecret(this, id, api_version, body, options));
22823
+ }
22824
+ /**
22825
+ * Sends a ping event to a Webhook.
22826
+ */
22827
+ ping(id, api_version, body, options) {
22828
+ return unwrapAsAPIPromise(webhooksPing(this, id, api_version, body, options));
22829
+ }
22830
+ }
22831
+
22832
+ /**
22833
+ * @license
22834
+ * Copyright 2026 Google LLC
22835
+ * SPDX-License-Identifier: Apache-2.0
22836
+ *
22837
+ * g3-prettier-ignore-file
22838
+ */
22839
+ /*
22840
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
22841
+ */
22842
+ let GoogleGenAI$1 = class GoogleGenAI extends ClientSDK {
22843
+ get interactions() {
22844
+ var _a;
22845
+ return ((_a = this._interactions) !== null && _a !== void 0 ? _a : (this._interactions = new Interactions(this._options)));
22846
+ }
22847
+ get webhooks() {
22848
+ var _a;
22849
+ return ((_a = this._webhooks) !== null && _a !== void 0 ? _a : (this._webhooks = new Webhooks(this._options)));
22850
+ }
22851
+ get agents() {
22852
+ var _a;
22853
+ return ((_a = this._agents) !== null && _a !== void 0 ? _a : (this._agents = new Agents(this._options)));
22854
+ }
22855
+ get triggers() {
22856
+ var _a;
22857
+ return ((_a = this._triggers) !== null && _a !== void 0 ? _a : (this._triggers = new Triggers(this._options)));
22858
+ }
22859
+ };
22860
+
22861
+ /**
22862
+ * @license
22863
+ * Copyright 2026 Google LLC
22864
+ * SPDX-License-Identifier: Apache-2.0
22865
+ *
22866
+ * g3-prettier-ignore-file
22867
+ */
22868
+ const LEGACY_LYRIA_MODELS = new Set([
22869
+ "lyria-3-pro-preview",
22870
+ "lyria-3-clip-preview",
22871
+ ]);
22872
+ function getGoogleGenAIServerURL(parentClient) {
22873
+ const serverURL = parentClient.getBaseUrl();
22874
+ if (!serverURL) {
22875
+ throw new Error("Base URL must be set.");
22876
+ }
22877
+ return serverURL.replace(/\/+$/, "");
22878
+ }
22879
+ function getGoogleGenAIAPIVersion(parentClient) {
22880
+ const apiVersion = trimSlashes(parentClient.getApiVersion());
22881
+ const project = parentClient.getProject();
22882
+ const location = parentClient.getLocation();
22883
+ if (parentClient.isVertexAI() && apiVersion && project && location) {
22884
+ return (`${apiVersion}/projects/${encodeURIComponent(project)}` +
22885
+ `/locations/${encodeURIComponent(location)}`);
22886
+ }
22887
+ return apiVersion;
22888
+ }
22889
+ function buildGoogleGenAIClient(parentClient, options = {}) {
22890
+ var _a, _b, _c, _d, _e;
22891
+ 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({
22892
+ 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)),
22893
+ getAuthHeaders: (url) => parentClient.getAuthHeaders(url),
22894
+ }), server_url: (_e = options.server_url) !== null && _e !== void 0 ? _e : getGoogleGenAIServerURL(parentClient) }));
22895
+ return sdk;
22896
+ }
22897
+ class GeminiNextGenInteractions {
22898
+ constructor(parentClient) {
22899
+ this.parentClient = parentClient;
22900
+ }
22190
22901
  async create(params, options) {
22191
22902
  const { api_version } = params, request = __rest(params, ["api_version"]);
22192
22903
  if (request.stream === true) {
@@ -22287,6 +22998,46 @@ class GeminiNextGenWebhooks {
22287
22998
  return this.sdk;
22288
22999
  }
22289
23000
  }
23001
+ class GeminiNextGenTriggers {
23002
+ constructor(parentClient) {
23003
+ this.parentClient = parentClient;
23004
+ }
23005
+ async create(params, options) {
23006
+ const { api_version } = params, body = __rest(params, ["api_version"]);
23007
+ return unwrapWithSdkHttpResponse(triggersCreate(this.getClient(api_version), body, api_version, toGoogleGenAIRequestOptions(options)));
23008
+ }
23009
+ async list(params = {}, options) {
23010
+ const { api_version, filter, pageSize, pageToken } = params !== null && params !== void 0 ? params : {};
23011
+ return unwrapWithSdkHttpResponse(triggersList(this.getClient(api_version), api_version, filter, pageSize, pageToken, toGoogleGenAIRequestOptions(options)));
23012
+ }
23013
+ async get(id, params = {}, options) {
23014
+ 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)));
23015
+ }
23016
+ async update(id, params, options) {
23017
+ const { api_version } = params, body = __rest(params, ["api_version"]);
23018
+ return unwrapWithSdkHttpResponse(triggersUpdate(this.getClient(api_version), id, body, api_version, toGoogleGenAIRequestOptions(options)));
23019
+ }
23020
+ async delete(id, params = {}, options) {
23021
+ 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)));
23022
+ }
23023
+ async run(trigger_id, params = {}, options) {
23024
+ 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)));
23025
+ }
23026
+ async listExecutions(trigger_id, params = {}, options) {
23027
+ const { api_version, pageSize, pageToken } = params !== null && params !== void 0 ? params : {};
23028
+ return unwrapWithSdkHttpResponse(triggersListExecutions(this.getClient(api_version), trigger_id, api_version, pageSize, pageToken, toGoogleGenAIRequestOptions(options)));
23029
+ }
23030
+ getClient(apiVersion) {
23031
+ var _a;
23032
+ if (apiVersion) {
23033
+ return buildGoogleGenAIClient(this.parentClient, {
23034
+ api_version: apiVersion,
23035
+ });
23036
+ }
23037
+ (_a = this.sdk) !== null && _a !== void 0 ? _a : (this.sdk = buildGoogleGenAIClient(this.parentClient));
23038
+ return this.sdk;
23039
+ }
23040
+ }
22290
23041
  function trimSlashes(value) {
22291
23042
  return value.replace(/^\/+|\/+$/g, "");
22292
23043
  }
@@ -24597,6 +25348,14 @@ class GoogleGenAI {
24597
25348
  this._agents = new GeminiNextGenAgents(this.apiClient);
24598
25349
  return this._agents;
24599
25350
  }
25351
+ get triggers() {
25352
+ if (this._triggers !== undefined) {
25353
+ return this._triggers;
25354
+ }
25355
+ console.warn('GoogleGenAI.triggers: Triggers usage is experimental and may change in future versions.');
25356
+ this._triggers = new GeminiNextGenTriggers(this.apiClient);
25357
+ return this._triggers;
25358
+ }
24600
25359
  constructor(options) {
24601
25360
  var _a;
24602
25361
  if (options.apiKey == null) {