@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.
@@ -8179,6 +8179,12 @@ function audioTranscriptionConfigToMldev$1(fromObject) {
8179
8179
  if (fromLanguageHints != null) {
8180
8180
  setValueByPath(toObject, ['languageHints'], fromLanguageHints);
8181
8181
  }
8182
+ const fromCustomVocabulary = getValueByPath(fromObject, [
8183
+ 'customVocabulary',
8184
+ ]);
8185
+ if (fromCustomVocabulary != null) {
8186
+ setValueByPath(toObject, ['customVocabulary'], fromCustomVocabulary);
8187
+ }
8182
8188
  const fromAdaptationPhrases = getValueByPath(fromObject, [
8183
8189
  'adaptationPhrases',
8184
8190
  ]);
@@ -9718,6 +9724,18 @@ function contentEmbeddingStatisticsFromVertex(fromObject, _rootObject) {
9718
9724
  if (fromTokenCount != null) {
9719
9725
  setValueByPath(toObject, ['tokenCount'], fromTokenCount);
9720
9726
  }
9727
+ const fromTokensDetails = getValueByPath(fromObject, [
9728
+ 'tokensDetails',
9729
+ ]);
9730
+ if (fromTokensDetails != null) {
9731
+ let transformedList = fromTokensDetails;
9732
+ if (Array.isArray(transformedList)) {
9733
+ transformedList = transformedList.map((item) => {
9734
+ return item;
9735
+ });
9736
+ }
9737
+ setValueByPath(toObject, ['tokensDetails'], transformedList);
9738
+ }
9721
9739
  return toObject;
9722
9740
  }
9723
9741
  function contentToMldev$1(fromObject, rootObject) {
@@ -10347,6 +10365,10 @@ function embedContentResponseFromVertex(fromObject, rootObject) {
10347
10365
  usageMetadata['promptTokenCount']) {
10348
10366
  stats.tokenCount = usageMetadata['promptTokenCount'];
10349
10367
  }
10368
+ if (usageMetadata &&
10369
+ usageMetadata['promptTokensDetails']) {
10370
+ stats.tokensDetails = usageMetadata['promptTokensDetails'];
10371
+ }
10350
10372
  if (truncated) {
10351
10373
  stats.truncated = truncated;
10352
10374
  }
@@ -13502,7 +13524,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
13502
13524
  const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
13503
13525
  const USER_AGENT_HEADER = 'User-Agent';
13504
13526
  const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
13505
- const SDK_VERSION = '2.11.0'; // x-release-please-version
13527
+ const SDK_VERSION = '2.13.0'; // x-release-please-version
13506
13528
  const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
13507
13529
  const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
13508
13530
  const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
@@ -16889,6 +16911,12 @@ function audioTranscriptionConfigToMldev(fromObject) {
16889
16911
  if (fromLanguageHints != null) {
16890
16912
  setValueByPath(toObject, ['languageHints'], fromLanguageHints);
16891
16913
  }
16914
+ const fromCustomVocabulary = getValueByPath(fromObject, [
16915
+ 'customVocabulary',
16916
+ ]);
16917
+ if (fromCustomVocabulary != null) {
16918
+ setValueByPath(toObject, ['customVocabulary'], fromCustomVocabulary);
16919
+ }
16892
16920
  const fromAdaptationPhrases = getValueByPath(fromObject, [
16893
16921
  'adaptationPhrases',
16894
16922
  ]);
@@ -18874,7 +18902,7 @@ function serverURLFromOptions(options) {
18874
18902
  return new URL(u);
18875
18903
  }
18876
18904
  const SDK_METADATA = {
18877
- userAgent: "speakeasy-sdk/typescript 2.4.1-preview.4 2.913.3 v1beta @google/genai",
18905
+ userAgent: "speakeasy-sdk/typescript 2.4.1-preview.4 2.918.3 v1beta @google/genai",
18878
18906
  };
18879
18907
 
18880
18908
  /**
@@ -19175,10 +19203,10 @@ const DEFAULT_FETCHER = (input, init) => {
19175
19203
  };
19176
19204
  class HTTPClient {
19177
19205
  constructor(options = {}) {
19178
- this.options = options;
19179
19206
  this.requestHooks = [];
19180
19207
  this.requestErrorHooks = [];
19181
19208
  this.responseHooks = [];
19209
+ this.options = options;
19182
19210
  this.fetcher = options.fetcher || DEFAULT_FETCHER;
19183
19211
  }
19184
19212
  async request(request) {
@@ -20282,11 +20310,10 @@ function unpackHeaders(headers) {
20282
20310
  *
20283
20311
  * g3-prettier-ignore-file
20284
20312
  */
20285
- var SecurityErrorCode;
20286
- (function (SecurityErrorCode) {
20287
- SecurityErrorCode["Incomplete"] = "incomplete";
20288
- SecurityErrorCode["UnrecognisedSecurityType"] = "unrecognized_security_type";
20289
- })(SecurityErrorCode || (SecurityErrorCode = {}));
20313
+ const SecurityErrorCode = {
20314
+ Incomplete: "incomplete",
20315
+ UnrecognisedSecurityType: "unrecognized_security_type",
20316
+ };
20290
20317
  class SecurityError extends Error {
20291
20318
  constructor(code, message) {
20292
20319
  super(message);
@@ -20515,9 +20542,9 @@ function unwrapAsAPIPromise(p) {
20515
20542
  * Creates a new Agent (Typed version for SDK).
20516
20543
  */
20517
20544
  function agentsCreate(client, body, api_version, options) {
20518
- return new APIPromise($do$e(client, body, api_version, options));
20545
+ return new APIPromise($do$l(client, body, api_version, options));
20519
20546
  }
20520
- async function $do$e(client, body, api_version, options) {
20547
+ async function $do$l(client, body, api_version, options) {
20521
20548
  var _a, _b, _c;
20522
20549
  const input = {
20523
20550
  body: body,
@@ -20600,9 +20627,9 @@ async function $do$e(client, body, api_version, options) {
20600
20627
  * Deletes an Agent.
20601
20628
  */
20602
20629
  function agentsDelete(client, id, api_version, options) {
20603
- return new APIPromise($do$d(client, id, api_version, options));
20630
+ return new APIPromise($do$k(client, id, api_version, options));
20604
20631
  }
20605
- async function $do$d(client, id, api_version, options) {
20632
+ async function $do$k(client, id, api_version, options) {
20606
20633
  var _a, _b, _c;
20607
20634
  const input = {
20608
20635
  id: id,
@@ -20688,9 +20715,9 @@ async function $do$d(client, id, api_version, options) {
20688
20715
  * Gets a specific Agent.
20689
20716
  */
20690
20717
  function agentsGet(client, id, api_version, options) {
20691
- return new APIPromise($do$c(client, id, api_version, options));
20718
+ return new APIPromise($do$j(client, id, api_version, options));
20692
20719
  }
20693
- async function $do$c(client, id, api_version, options) {
20720
+ async function $do$j(client, id, api_version, options) {
20694
20721
  var _a, _b, _c;
20695
20722
  const input = {
20696
20723
  id: id,
@@ -20776,9 +20803,9 @@ async function $do$c(client, id, api_version, options) {
20776
20803
  * Lists all Agents.
20777
20804
  */
20778
20805
  function agentsList(client, api_version, page_size, page_token, parent, options) {
20779
- return new APIPromise($do$b(client, api_version, page_size, page_token, parent, options));
20806
+ return new APIPromise($do$i(client, api_version, page_size, page_token, parent, options));
20780
20807
  }
20781
- async function $do$b(client, api_version, page_size, page_token, parent, options) {
20808
+ async function $do$i(client, api_version, page_size, page_token, parent, options) {
20782
20809
  var _a, _b, _c;
20783
20810
  const input = {
20784
20811
  api_version: api_version,
@@ -21050,9 +21077,9 @@ class GetInteractionByIdClientError extends GoogleGenAiError {
21050
21077
  * Cancels an interaction by id. This only applies to background interactions that are still running.
21051
21078
  */
21052
21079
  function interactionsCancel(client, id, api_version, options) {
21053
- return new APIPromise($do$a(client, id, api_version, options));
21080
+ return new APIPromise($do$h(client, id, api_version, options));
21054
21081
  }
21055
- async function $do$a(client, id, api_version, options) {
21082
+ async function $do$h(client, id, api_version, options) {
21056
21083
  var _a, _b, _c;
21057
21084
  const input = {
21058
21085
  id: id,
@@ -21138,9 +21165,9 @@ async function $do$a(client, id, api_version, options) {
21138
21165
  * g3-prettier-ignore-file
21139
21166
  */
21140
21167
  function interactionsCreate(client, body, api_version, options) {
21141
- return new APIPromise($do$9(client, body, api_version, options));
21168
+ return new APIPromise($do$g(client, body, api_version, options));
21142
21169
  }
21143
- async function $do$9(client, body, api_version, options) {
21170
+ async function $do$g(client, body, api_version, options) {
21144
21171
  var _a, _b, _c, _d;
21145
21172
  const input = {
21146
21173
  body: body,
@@ -21232,9 +21259,9 @@ async function $do$9(client, body, api_version, options) {
21232
21259
  * Deletes the interaction by id.
21233
21260
  */
21234
21261
  function interactionsDelete(client, id, api_version, options) {
21235
- return new APIPromise($do$8(client, id, api_version, options));
21262
+ return new APIPromise($do$f(client, id, api_version, options));
21236
21263
  }
21237
- async function $do$8(client, id, api_version, options) {
21264
+ async function $do$f(client, id, api_version, options) {
21238
21265
  var _a, _b, _c;
21239
21266
  const input = {
21240
21267
  id: id,
@@ -21320,9 +21347,9 @@ async function $do$8(client, id, api_version, options) {
21320
21347
  * g3-prettier-ignore-file
21321
21348
  */
21322
21349
  function interactionsGet(client, id, stream, last_event_id, include_input, api_version, options) {
21323
- return new APIPromise($do$7(client, id, stream, last_event_id, include_input, api_version, options));
21350
+ return new APIPromise($do$e(client, id, stream, last_event_id, include_input, api_version, options));
21324
21351
  }
21325
- async function $do$7(client, id, stream, last_event_id, include_input, api_version, options) {
21352
+ async function $do$e(client, id, stream, last_event_id, include_input, api_version, options) {
21326
21353
  var _a, _b, _c;
21327
21354
  const input = {
21328
21355
  id: id,
@@ -21455,12 +21482,12 @@ class Interactions extends ClientSDK {
21455
21482
  * g3-prettier-ignore-file
21456
21483
  */
21457
21484
  /**
21458
- * Creates a new Webhook.
21485
+ * Creates a new trigger that will invoke the specified agent on the given cron schedule.
21459
21486
  */
21460
- function webhooksCreate(client, body, api_version, options) {
21461
- return new APIPromise($do$6(client, body, api_version, options));
21487
+ function triggersCreate(client, body, api_version, options) {
21488
+ return new APIPromise($do$d(client, body, api_version, options));
21462
21489
  }
21463
- async function $do$6(client, body, api_version, options) {
21490
+ async function $do$d(client, body, api_version, options) {
21464
21491
  var _a, _b, _c;
21465
21492
  const input = {
21466
21493
  body: body,
@@ -21471,7 +21498,7 @@ async function $do$6(client, body, api_version, options) {
21471
21498
  const pathParams = {
21472
21499
  api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
21473
21500
  };
21474
- const path = pathToFunc("/{api_version}/webhooks")(pathParams);
21501
+ const path = pathToFunc("/{api_version}/triggers")(pathParams);
21475
21502
  const headers = new Headers(compactMap({
21476
21503
  "Content-Type": "application/json",
21477
21504
  Accept: "application/json",
@@ -21481,7 +21508,7 @@ async function $do$6(client, body, api_version, options) {
21481
21508
  const context = {
21482
21509
  options: client._options,
21483
21510
  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 : "",
21484
- operation_id: "CreateWebhook",
21511
+ operation_id: "CreateTrigger",
21485
21512
  o_auth2_scopes: null,
21486
21513
  resolved_security: requestSecurity,
21487
21514
  security_source: client._options.security,
@@ -21525,7 +21552,7 @@ async function $do$6(client, body, api_version, options) {
21525
21552
  return [doResult, { status: "request-error", request: req }];
21526
21553
  }
21527
21554
  const response = doResult.value;
21528
- const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
21555
+ const [result] = await match(json(200), fail("4XX"), fail("5XX"))(response, req);
21529
21556
  if (!result.ok) {
21530
21557
  return [result, { status: "complete", request: req, response }];
21531
21558
  }
@@ -21540,12 +21567,12 @@ async function $do$6(client, body, api_version, options) {
21540
21567
  * g3-prettier-ignore-file
21541
21568
  */
21542
21569
  /**
21543
- * Deletes a Webhook.
21570
+ * Deletes a trigger.
21544
21571
  */
21545
- function webhooksDelete(client, id, api_version, options) {
21546
- return new APIPromise($do$5(client, id, api_version, options));
21572
+ function triggersDelete(client, id, api_version, options) {
21573
+ return new APIPromise($do$c(client, id, api_version, options));
21547
21574
  }
21548
- async function $do$5(client, id, api_version, options) {
21575
+ async function $do$c(client, id, api_version, options) {
21549
21576
  var _a, _b, _c;
21550
21577
  const input = {
21551
21578
  id: id,
@@ -21560,7 +21587,7 @@ async function $do$5(client, id, api_version, options) {
21560
21587
  charEncoding: "percent",
21561
21588
  }),
21562
21589
  };
21563
- const path = pathToFunc("/{api_version}/webhooks/{id}")(pathParams);
21590
+ const path = pathToFunc("/{api_version}/triggers/{id}")(pathParams);
21564
21591
  const headers = new Headers(compactMap({
21565
21592
  Accept: "application/json",
21566
21593
  }));
@@ -21569,7 +21596,7 @@ async function $do$5(client, id, api_version, options) {
21569
21596
  const context = {
21570
21597
  options: client._options,
21571
21598
  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 : "",
21572
- operation_id: "DeleteWebhook",
21599
+ operation_id: "DeleteTrigger",
21573
21600
  o_auth2_scopes: null,
21574
21601
  resolved_security: requestSecurity,
21575
21602
  security_source: client._options.security,
@@ -21613,7 +21640,7 @@ async function $do$5(client, id, api_version, options) {
21613
21640
  return [doResult, { status: "request-error", request: req }];
21614
21641
  }
21615
21642
  const response = doResult.value;
21616
- const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
21643
+ const [result] = await match(json(200), fail("4XX"), fail("5XX"))(response, req);
21617
21644
  if (!result.ok) {
21618
21645
  return [result, { status: "complete", request: req, response }];
21619
21646
  }
@@ -21628,12 +21655,12 @@ async function $do$5(client, id, api_version, options) {
21628
21655
  * g3-prettier-ignore-file
21629
21656
  */
21630
21657
  /**
21631
- * Gets a specific Webhook.
21658
+ * Gets details of a single trigger.
21632
21659
  */
21633
- function webhooksGet(client, id, api_version, options) {
21634
- return new APIPromise($do$4(client, id, api_version, options));
21660
+ function triggersGet(client, id, api_version, options) {
21661
+ return new APIPromise($do$b(client, id, api_version, options));
21635
21662
  }
21636
- async function $do$4(client, id, api_version, options) {
21663
+ async function $do$b(client, id, api_version, options) {
21637
21664
  var _a, _b, _c;
21638
21665
  const input = {
21639
21666
  id: id,
@@ -21648,7 +21675,7 @@ async function $do$4(client, id, api_version, options) {
21648
21675
  charEncoding: "percent",
21649
21676
  }),
21650
21677
  };
21651
- const path = pathToFunc("/{api_version}/webhooks/{id}")(pathParams);
21678
+ const path = pathToFunc("/{api_version}/triggers/{id}")(pathParams);
21652
21679
  const headers = new Headers(compactMap({
21653
21680
  Accept: "application/json",
21654
21681
  }));
@@ -21657,7 +21684,7 @@ async function $do$4(client, id, api_version, options) {
21657
21684
  const context = {
21658
21685
  options: client._options,
21659
21686
  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 : "",
21660
- operation_id: "GetWebhook",
21687
+ operation_id: "GetTrigger",
21661
21688
  o_auth2_scopes: null,
21662
21689
  resolved_security: requestSecurity,
21663
21690
  security_source: client._options.security,
@@ -21701,7 +21728,7 @@ async function $do$4(client, id, api_version, options) {
21701
21728
  return [doResult, { status: "request-error", request: req }];
21702
21729
  }
21703
21730
  const response = doResult.value;
21704
- const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
21731
+ const [result] = await match(json(200), fail("4XX"), fail("5XX"))(response, req);
21705
21732
  if (!result.ok) {
21706
21733
  return [result, { status: "complete", request: req, response }];
21707
21734
  }
@@ -21716,14 +21743,15 @@ async function $do$4(client, id, api_version, options) {
21716
21743
  * g3-prettier-ignore-file
21717
21744
  */
21718
21745
  /**
21719
- * Lists all Webhooks.
21746
+ * Lists executions for a trigger.
21720
21747
  */
21721
- function webhooksList(client, api_version, page_size, page_token, options) {
21722
- return new APIPromise($do$3(client, api_version, page_size, page_token, options));
21748
+ function triggersListExecutions(client, trigger_id, api_version, page_size, page_token, options) {
21749
+ return new APIPromise($do$a(client, trigger_id, api_version, page_size, page_token, options));
21723
21750
  }
21724
- async function $do$3(client, api_version, page_size, page_token, options) {
21751
+ async function $do$a(client, trigger_id, api_version, page_size, page_token, options) {
21725
21752
  var _a, _b, _c;
21726
21753
  const input = {
21754
+ trigger_id: trigger_id,
21727
21755
  api_version: api_version,
21728
21756
  page_size: page_size,
21729
21757
  page_token: page_token,
@@ -21731,12 +21759,16 @@ async function $do$3(client, api_version, page_size, page_token, options) {
21731
21759
  const payload = input;
21732
21760
  const body = null;
21733
21761
  const pathParams = {
21734
- 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" }),
21762
+ api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
21763
+ trigger_id: encodeSimple("trigger_id", payload.trigger_id, {
21764
+ explode: false,
21765
+ charEncoding: "percent",
21766
+ }),
21735
21767
  };
21736
- const path = pathToFunc("/{api_version}/webhooks")(pathParams);
21768
+ const path = pathToFunc("/{api_version}/triggers/{trigger_id}/executions")(pathParams);
21737
21769
  const query = encodeFormQuery({
21738
- "page_size": payload === null || payload === void 0 ? void 0 : payload.page_size,
21739
- "page_token": payload === null || payload === void 0 ? void 0 : payload.page_token,
21770
+ "page_size": payload.page_size,
21771
+ "page_token": payload.page_token,
21740
21772
  });
21741
21773
  const headers = new Headers(compactMap({
21742
21774
  Accept: "application/json",
@@ -21746,7 +21778,7 @@ async function $do$3(client, api_version, page_size, page_token, options) {
21746
21778
  const context = {
21747
21779
  options: client._options,
21748
21780
  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 : "",
21749
- operation_id: "ListWebhooks",
21781
+ operation_id: "ListTriggerExecutions",
21750
21782
  o_auth2_scopes: null,
21751
21783
  resolved_security: requestSecurity,
21752
21784
  security_source: client._options.security,
@@ -21791,7 +21823,7 @@ async function $do$3(client, api_version, page_size, page_token, options) {
21791
21823
  return [doResult, { status: "request-error", request: req }];
21792
21824
  }
21793
21825
  const response = doResult.value;
21794
- const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
21826
+ const [result] = await match(json(200), fail("4XX"), fail("5XX"))(response, req);
21795
21827
  if (!result.ok) {
21796
21828
  return [result, { status: "complete", request: req, response }];
21797
21829
  }
@@ -21806,30 +21838,31 @@ async function $do$3(client, api_version, page_size, page_token, options) {
21806
21838
  * g3-prettier-ignore-file
21807
21839
  */
21808
21840
  /**
21809
- * Sends a ping event to a Webhook.
21841
+ * Lists triggers for a project.
21810
21842
  */
21811
- function webhooksPing(client, id, api_version, body, options) {
21812
- return new APIPromise($do$2(client, id, api_version, body, options));
21843
+ function triggersList(client, api_version, filter, page_size, page_token, options) {
21844
+ return new APIPromise($do$9(client, api_version, filter, page_size, page_token, options));
21813
21845
  }
21814
- async function $do$2(client, id, api_version, body, options) {
21846
+ async function $do$9(client, api_version, filter, page_size, page_token, options) {
21815
21847
  var _a, _b, _c;
21816
21848
  const input = {
21817
- id: id,
21818
21849
  api_version: api_version,
21819
- body: body,
21850
+ filter: filter,
21851
+ page_size: page_size,
21852
+ page_token: page_token,
21820
21853
  };
21821
21854
  const payload = input;
21822
- const body$ = encodeJSON("body", payload.body, { explode: true });
21855
+ const body = null;
21823
21856
  const pathParams = {
21824
- api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
21825
- id: encodeSimple("id", payload.id, {
21826
- explode: false,
21827
- charEncoding: "percent",
21828
- }),
21857
+ 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" }),
21829
21858
  };
21830
- const path = pathToFunc("/{api_version}/webhooks/{id}:ping")(pathParams);
21859
+ const path = pathToFunc("/{api_version}/triggers")(pathParams);
21860
+ const query = encodeFormQuery({
21861
+ "filter": payload === null || payload === void 0 ? void 0 : payload.filter,
21862
+ "page_size": payload === null || payload === void 0 ? void 0 : payload.page_size,
21863
+ "page_token": payload === null || payload === void 0 ? void 0 : payload.page_token,
21864
+ });
21831
21865
  const headers = new Headers(compactMap({
21832
- "Content-Type": "application/json",
21833
21866
  Accept: "application/json",
21834
21867
  }));
21835
21868
  const securityInput = await extractSecurity(client._options.security);
@@ -21837,7 +21870,7 @@ async function $do$2(client, id, api_version, body, options) {
21837
21870
  const context = {
21838
21871
  options: client._options,
21839
21872
  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 : "",
21840
- operation_id: "PingWebhook",
21873
+ operation_id: "ListTriggers",
21841
21874
  o_auth2_scopes: null,
21842
21875
  resolved_security: requestSecurity,
21843
21876
  security_source: client._options.security,
@@ -21859,11 +21892,12 @@ async function $do$2(client, id, api_version, body, options) {
21859
21892
  };
21860
21893
  const requestRes = client._createRequest(context, {
21861
21894
  security: requestSecurity,
21862
- method: "POST",
21895
+ method: "GET",
21863
21896
  baseURL: options === null || options === void 0 ? void 0 : options.server_url,
21864
21897
  path: path,
21865
21898
  headers: headers,
21866
- body: body$,
21899
+ query: query,
21900
+ body: body,
21867
21901
  userAgent: client._options.user_agent,
21868
21902
  timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
21869
21903
  }, options);
@@ -21881,7 +21915,7 @@ async function $do$2(client, id, api_version, body, options) {
21881
21915
  return [doResult, { status: "request-error", request: req }];
21882
21916
  }
21883
21917
  const response = doResult.value;
21884
- const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
21918
+ const [result] = await match(json(200), fail("4XX"), fail("5XX"))(response, req);
21885
21919
  if (!result.ok) {
21886
21920
  return [result, { status: "complete", request: req, response }];
21887
21921
  }
@@ -21896,30 +21930,28 @@ async function $do$2(client, id, api_version, body, options) {
21896
21930
  * g3-prettier-ignore-file
21897
21931
  */
21898
21932
  /**
21899
- * Generates a new signing secret for a Webhook.
21933
+ * Runs a trigger immediately.
21900
21934
  */
21901
- function webhooksRotateSigningSecret(client, id, api_version, body, options) {
21902
- return new APIPromise($do$1(client, id, api_version, body, options));
21935
+ function triggersRun(client, trigger_id, api_version, options) {
21936
+ return new APIPromise($do$8(client, trigger_id, api_version, options));
21903
21937
  }
21904
- async function $do$1(client, id, api_version, body, options) {
21938
+ async function $do$8(client, trigger_id, api_version, options) {
21905
21939
  var _a, _b, _c;
21906
21940
  const input = {
21907
- id: id,
21941
+ trigger_id: trigger_id,
21908
21942
  api_version: api_version,
21909
- body: body,
21910
21943
  };
21911
21944
  const payload = input;
21912
- const body$ = encodeJSON("body", payload.body, { explode: true });
21945
+ const body = null;
21913
21946
  const pathParams = {
21914
21947
  api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
21915
- id: encodeSimple("id", payload.id, {
21948
+ trigger_id: encodeSimple("trigger_id", payload.trigger_id, {
21916
21949
  explode: false,
21917
21950
  charEncoding: "percent",
21918
21951
  }),
21919
21952
  };
21920
- const path = pathToFunc("/{api_version}/webhooks/{id}:rotateSigningSecret")(pathParams);
21953
+ const path = pathToFunc("/{api_version}/triggers/{trigger_id}/executions")(pathParams);
21921
21954
  const headers = new Headers(compactMap({
21922
- "Content-Type": "application/json",
21923
21955
  Accept: "application/json",
21924
21956
  }));
21925
21957
  const securityInput = await extractSecurity(client._options.security);
@@ -21927,7 +21959,7 @@ async function $do$1(client, id, api_version, body, options) {
21927
21959
  const context = {
21928
21960
  options: client._options,
21929
21961
  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 : "",
21930
- operation_id: "RotateSigningSecret",
21962
+ operation_id: "RunTrigger",
21931
21963
  o_auth2_scopes: null,
21932
21964
  resolved_security: requestSecurity,
21933
21965
  security_source: client._options.security,
@@ -21953,7 +21985,7 @@ async function $do$1(client, id, api_version, body, options) {
21953
21985
  baseURL: options === null || options === void 0 ? void 0 : options.server_url,
21954
21986
  path: path,
21955
21987
  headers: headers,
21956
- body: body$,
21988
+ body: body,
21957
21989
  userAgent: client._options.user_agent,
21958
21990
  timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
21959
21991
  }, options);
@@ -21971,7 +22003,7 @@ async function $do$1(client, id, api_version, body, options) {
21971
22003
  return [doResult, { status: "request-error", request: req }];
21972
22004
  }
21973
22005
  const response = doResult.value;
21974
- const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
22006
+ const [result] = await match(json(200), fail("4XX"), fail("5XX"))(response, req);
21975
22007
  if (!result.ok) {
21976
22008
  return [result, { status: "complete", request: req, response }];
21977
22009
  }
@@ -21986,18 +22018,17 @@ async function $do$1(client, id, api_version, body, options) {
21986
22018
  * g3-prettier-ignore-file
21987
22019
  */
21988
22020
  /**
21989
- * Updates an existing Webhook.
22021
+ * Updates a trigger.
21990
22022
  */
21991
- function webhooksUpdate(client, id, api_version, update_mask, body, options) {
21992
- return new APIPromise($do(client, id, api_version, update_mask, body, options));
22023
+ function triggersUpdate(client, id, body, api_version, options) {
22024
+ return new APIPromise($do$7(client, id, body, api_version, options));
21993
22025
  }
21994
- async function $do(client, id, api_version, update_mask, body, options) {
22026
+ async function $do$7(client, id, body, api_version, options) {
21995
22027
  var _a, _b, _c;
21996
22028
  const input = {
21997
22029
  id: id,
21998
- api_version: api_version,
21999
- update_mask: update_mask,
22000
22030
  body: body,
22031
+ api_version: api_version,
22001
22032
  };
22002
22033
  const payload = input;
22003
22034
  const body$ = encodeJSON("body", payload.body, { explode: true });
@@ -22008,10 +22039,7 @@ async function $do(client, id, api_version, update_mask, body, options) {
22008
22039
  charEncoding: "percent",
22009
22040
  }),
22010
22041
  };
22011
- const path = pathToFunc("/{api_version}/webhooks/{id}")(pathParams);
22012
- const query = encodeFormQuery({
22013
- "update_mask": payload.update_mask,
22014
- });
22042
+ const path = pathToFunc("/{api_version}/triggers/{id}")(pathParams);
22015
22043
  const headers = new Headers(compactMap({
22016
22044
  "Content-Type": "application/json",
22017
22045
  Accept: "application/json",
@@ -22021,7 +22049,7 @@ async function $do(client, id, api_version, update_mask, body, options) {
22021
22049
  const context = {
22022
22050
  options: client._options,
22023
22051
  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 : "",
22024
- operation_id: "UpdateWebhook",
22052
+ operation_id: "UpdateTrigger",
22025
22053
  o_auth2_scopes: null,
22026
22054
  resolved_security: requestSecurity,
22027
22055
  security_source: client._options.security,
@@ -22047,7 +22075,6 @@ async function $do(client, id, api_version, update_mask, body, options) {
22047
22075
  baseURL: options === null || options === void 0 ? void 0 : options.server_url,
22048
22076
  path: path,
22049
22077
  headers: headers,
22050
- query: query,
22051
22078
  body: body$,
22052
22079
  userAgent: client._options.user_agent,
22053
22080
  timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
@@ -22066,7 +22093,7 @@ async function $do(client, id, api_version, update_mask, body, options) {
22066
22093
  return [doResult, { status: "request-error", request: req }];
22067
22094
  }
22068
22095
  const response = doResult.value;
22069
- const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
22096
+ const [result] = await match(json(200), fail("4XX"), fail("5XX"))(response, req);
22070
22097
  if (!result.ok) {
22071
22098
  return [result, { status: "complete", request: req, response }];
22072
22099
  }
@@ -22080,53 +22107,50 @@ async function $do(client, id, api_version, update_mask, body, options) {
22080
22107
  *
22081
22108
  * g3-prettier-ignore-file
22082
22109
  */
22083
- class Webhooks extends ClientSDK {
22110
+ class Triggers extends ClientSDK {
22084
22111
  /**
22085
- * Creates a new Webhook.
22112
+ * Creates a new trigger that will invoke the specified agent on the given cron schedule.
22086
22113
  */
22087
22114
  create(params, options) {
22088
22115
  const { api_version } = params, body = __rest(params, ["api_version"]);
22089
- return unwrapAsAPIPromise(webhooksCreate(this, body, api_version, options));
22116
+ return unwrapAsAPIPromise(triggersCreate(this, body, api_version, options));
22090
22117
  }
22091
22118
  /**
22092
- * Lists all Webhooks.
22119
+ * Lists triggers for a project.
22093
22120
  */
22094
22121
  list(params, options) {
22095
- 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));
22122
+ 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));
22096
22123
  }
22097
22124
  /**
22098
- * Gets a specific Webhook.
22125
+ * Gets details of a single trigger.
22099
22126
  */
22100
22127
  get(id, params, options) {
22101
- return unwrapAsAPIPromise(webhooksGet(this, id, params === null || params === void 0 ? void 0 : params.api_version, options));
22128
+ return unwrapAsAPIPromise(triggersGet(this, id, params === null || params === void 0 ? void 0 : params.api_version, options));
22102
22129
  }
22103
22130
  /**
22104
- * Updates an existing Webhook.
22131
+ * Updates a trigger.
22105
22132
  */
22106
22133
  update(id, params, options) {
22107
- const _a = params !== null && params !== void 0 ? params : {}, { api_version, update_mask } = _a, body$body = __rest(_a, ["api_version", "update_mask"]);
22108
- const body = params === undefined || Object.keys(body$body).length === 0
22109
- ? undefined
22110
- : body$body;
22111
- return unwrapAsAPIPromise(webhooksUpdate(this, id, api_version, update_mask, body, options));
22134
+ const { api_version } = params, body = __rest(params, ["api_version"]);
22135
+ return unwrapAsAPIPromise(triggersUpdate(this, id, body, api_version, options));
22112
22136
  }
22113
22137
  /**
22114
- * Deletes a Webhook.
22138
+ * Deletes a trigger.
22115
22139
  */
22116
22140
  delete(id, params, options) {
22117
- return unwrapAsAPIPromise(webhooksDelete(this, id, params === null || params === void 0 ? void 0 : params.api_version, options));
22141
+ return unwrapAsAPIPromise(triggersDelete(this, id, params === null || params === void 0 ? void 0 : params.api_version, options));
22118
22142
  }
22119
22143
  /**
22120
- * Generates a new signing secret for a Webhook.
22144
+ * Runs a trigger immediately.
22121
22145
  */
22122
- rotateSigningSecret(id, api_version, body, options) {
22123
- return unwrapAsAPIPromise(webhooksRotateSigningSecret(this, id, api_version, body, options));
22146
+ run(trigger_id, params, options) {
22147
+ return unwrapAsAPIPromise(triggersRun(this, trigger_id, params === null || params === void 0 ? void 0 : params.api_version, options));
22124
22148
  }
22125
22149
  /**
22126
- * Sends a ping event to a Webhook.
22150
+ * Lists executions for a trigger.
22127
22151
  */
22128
- ping(id, api_version, body, options) {
22129
- return unwrapAsAPIPromise(webhooksPing(this, id, api_version, body, options));
22152
+ listExecutions(trigger_id, params, options) {
22153
+ 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));
22130
22154
  }
22131
22155
  }
22132
22156
 
@@ -22137,23 +22161,83 @@ class Webhooks extends ClientSDK {
22137
22161
  *
22138
22162
  * g3-prettier-ignore-file
22139
22163
  */
22140
- /*
22141
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
22164
+ /**
22165
+ * Creates a new Webhook.
22142
22166
  */
22143
- let GoogleGenAI$1 = class GoogleGenAI extends ClientSDK {
22144
- get interactions() {
22145
- var _a;
22146
- return ((_a = this._interactions) !== null && _a !== void 0 ? _a : (this._interactions = new Interactions(this._options)));
22167
+ function webhooksCreate(client, body, api_version, options) {
22168
+ return new APIPromise($do$6(client, body, api_version, options));
22169
+ }
22170
+ async function $do$6(client, body, api_version, options) {
22171
+ var _a, _b, _c;
22172
+ const input = {
22173
+ body: body,
22174
+ api_version: api_version,
22175
+ };
22176
+ const payload = input;
22177
+ const body$ = encodeJSON("body", payload.body, { explode: true });
22178
+ const pathParams = {
22179
+ api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
22180
+ };
22181
+ const path = pathToFunc("/{api_version}/webhooks")(pathParams);
22182
+ const headers = new Headers(compactMap({
22183
+ "Content-Type": "application/json",
22184
+ Accept: "application/json",
22185
+ }));
22186
+ const securityInput = await extractSecurity(client._options.security);
22187
+ const requestSecurity = resolveGlobalSecurity(securityInput);
22188
+ const context = {
22189
+ options: client._options,
22190
+ 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 : "",
22191
+ operation_id: "CreateWebhook",
22192
+ o_auth2_scopes: null,
22193
+ resolved_security: requestSecurity,
22194
+ security_source: client._options.security,
22195
+ retry_config: (options === null || options === void 0 ? void 0 : options.retries)
22196
+ || client._options.retry_config
22197
+ || {
22198
+ strategy: "attempt-count-backoff",
22199
+ backoff: {
22200
+ initialInterval: 500,
22201
+ maxInterval: 8000,
22202
+ exponent: 2,
22203
+ maxElapsedTime: 30000,
22204
+ },
22205
+ retryConnectionErrors: true,
22206
+ maxRetries: 4,
22207
+ }
22208
+ || { strategy: "none" },
22209
+ retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
22210
+ };
22211
+ const requestRes = client._createRequest(context, {
22212
+ security: requestSecurity,
22213
+ method: "POST",
22214
+ baseURL: options === null || options === void 0 ? void 0 : options.server_url,
22215
+ path: path,
22216
+ headers: headers,
22217
+ body: body$,
22218
+ userAgent: client._options.user_agent,
22219
+ timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
22220
+ }, options);
22221
+ if (!requestRes.ok) {
22222
+ return [requestRes, { status: "invalid" }];
22147
22223
  }
22148
- get webhooks() {
22149
- var _a;
22150
- return ((_a = this._webhooks) !== null && _a !== void 0 ? _a : (this._webhooks = new Webhooks(this._options)));
22224
+ const req = requestRes.value;
22225
+ const doResult = await client._do(req, {
22226
+ context,
22227
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
22228
+ retryConfig: context.retry_config,
22229
+ retryCodes: context.retry_codes,
22230
+ });
22231
+ if (!doResult.ok) {
22232
+ return [doResult, { status: "request-error", request: req }];
22151
22233
  }
22152
- get agents() {
22153
- var _a;
22154
- return ((_a = this._agents) !== null && _a !== void 0 ? _a : (this._agents = new Agents(this._options)));
22234
+ const response = doResult.value;
22235
+ const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
22236
+ if (!result.ok) {
22237
+ return [result, { status: "complete", request: req, response }];
22155
22238
  }
22156
- };
22239
+ return [result, { status: "complete", request: req, response }];
22240
+ }
22157
22241
 
22158
22242
  /**
22159
22243
  * @license
@@ -22162,39 +22246,666 @@ let GoogleGenAI$1 = class GoogleGenAI extends ClientSDK {
22162
22246
  *
22163
22247
  * g3-prettier-ignore-file
22164
22248
  */
22165
- const LEGACY_LYRIA_MODELS = new Set([
22166
- "lyria-3-pro-preview",
22167
- "lyria-3-clip-preview",
22168
- ]);
22169
- function getGoogleGenAIServerURL(parentClient) {
22170
- const serverURL = parentClient.getBaseUrl();
22171
- if (!serverURL) {
22172
- throw new Error("Base URL must be set.");
22173
- }
22174
- return serverURL.replace(/\/+$/, "");
22175
- }
22176
- function getGoogleGenAIAPIVersion(parentClient) {
22177
- const apiVersion = trimSlashes(parentClient.getApiVersion());
22178
- const project = parentClient.getProject();
22179
- const location = parentClient.getLocation();
22180
- if (parentClient.isVertexAI() && apiVersion && project && location) {
22181
- return (`${apiVersion}/projects/${encodeURIComponent(project)}` +
22182
- `/locations/${encodeURIComponent(location)}`);
22183
- }
22184
- return apiVersion;
22185
- }
22186
- function buildGoogleGenAIClient(parentClient, options = {}) {
22187
- var _a, _b, _c, _d;
22188
- 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({
22189
- defaultHeaders: (_c = parentClient.getDefaultHeaders) === null || _c === void 0 ? void 0 : _c.call(parentClient),
22190
- getAuthHeaders: (url) => parentClient.getAuthHeaders(url),
22191
- }), server_url: (_d = options.server_url) !== null && _d !== void 0 ? _d : getGoogleGenAIServerURL(parentClient) }));
22192
- return sdk;
22249
+ /**
22250
+ * Deletes a Webhook.
22251
+ */
22252
+ function webhooksDelete(client, id, api_version, options) {
22253
+ return new APIPromise($do$5(client, id, api_version, options));
22193
22254
  }
22194
- class GeminiNextGenInteractions {
22195
- constructor(parentClient) {
22196
- this.parentClient = parentClient;
22197
- }
22255
+ async function $do$5(client, id, api_version, options) {
22256
+ var _a, _b, _c;
22257
+ const input = {
22258
+ id: id,
22259
+ api_version: api_version,
22260
+ };
22261
+ const payload = input;
22262
+ const body = null;
22263
+ const pathParams = {
22264
+ api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
22265
+ id: encodeSimple("id", payload.id, {
22266
+ explode: false,
22267
+ charEncoding: "percent",
22268
+ }),
22269
+ };
22270
+ const path = pathToFunc("/{api_version}/webhooks/{id}")(pathParams);
22271
+ const headers = new Headers(compactMap({
22272
+ Accept: "application/json",
22273
+ }));
22274
+ const securityInput = await extractSecurity(client._options.security);
22275
+ const requestSecurity = resolveGlobalSecurity(securityInput);
22276
+ const context = {
22277
+ options: client._options,
22278
+ 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 : "",
22279
+ operation_id: "DeleteWebhook",
22280
+ o_auth2_scopes: null,
22281
+ resolved_security: requestSecurity,
22282
+ security_source: client._options.security,
22283
+ retry_config: (options === null || options === void 0 ? void 0 : options.retries)
22284
+ || client._options.retry_config
22285
+ || {
22286
+ strategy: "attempt-count-backoff",
22287
+ backoff: {
22288
+ initialInterval: 500,
22289
+ maxInterval: 8000,
22290
+ exponent: 2,
22291
+ maxElapsedTime: 30000,
22292
+ },
22293
+ retryConnectionErrors: true,
22294
+ maxRetries: 4,
22295
+ }
22296
+ || { strategy: "none" },
22297
+ retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
22298
+ };
22299
+ const requestRes = client._createRequest(context, {
22300
+ security: requestSecurity,
22301
+ method: "DELETE",
22302
+ baseURL: options === null || options === void 0 ? void 0 : options.server_url,
22303
+ path: path,
22304
+ headers: headers,
22305
+ body: body,
22306
+ userAgent: client._options.user_agent,
22307
+ timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
22308
+ }, options);
22309
+ if (!requestRes.ok) {
22310
+ return [requestRes, { status: "invalid" }];
22311
+ }
22312
+ const req = requestRes.value;
22313
+ const doResult = await client._do(req, {
22314
+ context,
22315
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
22316
+ retryConfig: context.retry_config,
22317
+ retryCodes: context.retry_codes,
22318
+ });
22319
+ if (!doResult.ok) {
22320
+ return [doResult, { status: "request-error", request: req }];
22321
+ }
22322
+ const response = doResult.value;
22323
+ const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
22324
+ if (!result.ok) {
22325
+ return [result, { status: "complete", request: req, response }];
22326
+ }
22327
+ return [result, { status: "complete", request: req, response }];
22328
+ }
22329
+
22330
+ /**
22331
+ * @license
22332
+ * Copyright 2026 Google LLC
22333
+ * SPDX-License-Identifier: Apache-2.0
22334
+ *
22335
+ * g3-prettier-ignore-file
22336
+ */
22337
+ /**
22338
+ * Gets a specific Webhook.
22339
+ */
22340
+ function webhooksGet(client, id, api_version, options) {
22341
+ return new APIPromise($do$4(client, id, api_version, options));
22342
+ }
22343
+ async function $do$4(client, id, api_version, options) {
22344
+ var _a, _b, _c;
22345
+ const input = {
22346
+ id: id,
22347
+ api_version: api_version,
22348
+ };
22349
+ const payload = input;
22350
+ const body = null;
22351
+ const pathParams = {
22352
+ api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
22353
+ id: encodeSimple("id", payload.id, {
22354
+ explode: false,
22355
+ charEncoding: "percent",
22356
+ }),
22357
+ };
22358
+ const path = pathToFunc("/{api_version}/webhooks/{id}")(pathParams);
22359
+ const headers = new Headers(compactMap({
22360
+ Accept: "application/json",
22361
+ }));
22362
+ const securityInput = await extractSecurity(client._options.security);
22363
+ const requestSecurity = resolveGlobalSecurity(securityInput);
22364
+ const context = {
22365
+ options: client._options,
22366
+ 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 : "",
22367
+ operation_id: "GetWebhook",
22368
+ o_auth2_scopes: null,
22369
+ resolved_security: requestSecurity,
22370
+ security_source: client._options.security,
22371
+ retry_config: (options === null || options === void 0 ? void 0 : options.retries)
22372
+ || client._options.retry_config
22373
+ || {
22374
+ strategy: "attempt-count-backoff",
22375
+ backoff: {
22376
+ initialInterval: 500,
22377
+ maxInterval: 8000,
22378
+ exponent: 2,
22379
+ maxElapsedTime: 30000,
22380
+ },
22381
+ retryConnectionErrors: true,
22382
+ maxRetries: 4,
22383
+ }
22384
+ || { strategy: "none" },
22385
+ retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
22386
+ };
22387
+ const requestRes = client._createRequest(context, {
22388
+ security: requestSecurity,
22389
+ method: "GET",
22390
+ baseURL: options === null || options === void 0 ? void 0 : options.server_url,
22391
+ path: path,
22392
+ headers: headers,
22393
+ body: body,
22394
+ userAgent: client._options.user_agent,
22395
+ timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
22396
+ }, options);
22397
+ if (!requestRes.ok) {
22398
+ return [requestRes, { status: "invalid" }];
22399
+ }
22400
+ const req = requestRes.value;
22401
+ const doResult = await client._do(req, {
22402
+ context,
22403
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
22404
+ retryConfig: context.retry_config,
22405
+ retryCodes: context.retry_codes,
22406
+ });
22407
+ if (!doResult.ok) {
22408
+ return [doResult, { status: "request-error", request: req }];
22409
+ }
22410
+ const response = doResult.value;
22411
+ const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
22412
+ if (!result.ok) {
22413
+ return [result, { status: "complete", request: req, response }];
22414
+ }
22415
+ return [result, { status: "complete", request: req, response }];
22416
+ }
22417
+
22418
+ /**
22419
+ * @license
22420
+ * Copyright 2026 Google LLC
22421
+ * SPDX-License-Identifier: Apache-2.0
22422
+ *
22423
+ * g3-prettier-ignore-file
22424
+ */
22425
+ /**
22426
+ * Lists all Webhooks.
22427
+ */
22428
+ function webhooksList(client, api_version, page_size, page_token, options) {
22429
+ return new APIPromise($do$3(client, api_version, page_size, page_token, options));
22430
+ }
22431
+ async function $do$3(client, api_version, page_size, page_token, options) {
22432
+ var _a, _b, _c;
22433
+ const input = {
22434
+ api_version: api_version,
22435
+ page_size: page_size,
22436
+ page_token: page_token,
22437
+ };
22438
+ const payload = input;
22439
+ const body = null;
22440
+ const pathParams = {
22441
+ 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" }),
22442
+ };
22443
+ const path = pathToFunc("/{api_version}/webhooks")(pathParams);
22444
+ const query = encodeFormQuery({
22445
+ "page_size": payload === null || payload === void 0 ? void 0 : payload.page_size,
22446
+ "page_token": payload === null || payload === void 0 ? void 0 : payload.page_token,
22447
+ });
22448
+ const headers = new Headers(compactMap({
22449
+ Accept: "application/json",
22450
+ }));
22451
+ const securityInput = await extractSecurity(client._options.security);
22452
+ const requestSecurity = resolveGlobalSecurity(securityInput);
22453
+ const context = {
22454
+ options: client._options,
22455
+ 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 : "",
22456
+ operation_id: "ListWebhooks",
22457
+ o_auth2_scopes: null,
22458
+ resolved_security: requestSecurity,
22459
+ security_source: client._options.security,
22460
+ retry_config: (options === null || options === void 0 ? void 0 : options.retries)
22461
+ || client._options.retry_config
22462
+ || {
22463
+ strategy: "attempt-count-backoff",
22464
+ backoff: {
22465
+ initialInterval: 500,
22466
+ maxInterval: 8000,
22467
+ exponent: 2,
22468
+ maxElapsedTime: 30000,
22469
+ },
22470
+ retryConnectionErrors: true,
22471
+ maxRetries: 4,
22472
+ }
22473
+ || { strategy: "none" },
22474
+ retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
22475
+ };
22476
+ const requestRes = client._createRequest(context, {
22477
+ security: requestSecurity,
22478
+ method: "GET",
22479
+ baseURL: options === null || options === void 0 ? void 0 : options.server_url,
22480
+ path: path,
22481
+ headers: headers,
22482
+ query: query,
22483
+ body: body,
22484
+ userAgent: client._options.user_agent,
22485
+ timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
22486
+ }, options);
22487
+ if (!requestRes.ok) {
22488
+ return [requestRes, { status: "invalid" }];
22489
+ }
22490
+ const req = requestRes.value;
22491
+ const doResult = await client._do(req, {
22492
+ context,
22493
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
22494
+ retryConfig: context.retry_config,
22495
+ retryCodes: context.retry_codes,
22496
+ });
22497
+ if (!doResult.ok) {
22498
+ return [doResult, { status: "request-error", request: req }];
22499
+ }
22500
+ const response = doResult.value;
22501
+ const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
22502
+ if (!result.ok) {
22503
+ return [result, { status: "complete", request: req, response }];
22504
+ }
22505
+ return [result, { status: "complete", request: req, response }];
22506
+ }
22507
+
22508
+ /**
22509
+ * @license
22510
+ * Copyright 2026 Google LLC
22511
+ * SPDX-License-Identifier: Apache-2.0
22512
+ *
22513
+ * g3-prettier-ignore-file
22514
+ */
22515
+ /**
22516
+ * Sends a ping event to a Webhook.
22517
+ */
22518
+ function webhooksPing(client, id, api_version, body, options) {
22519
+ return new APIPromise($do$2(client, id, api_version, body, options));
22520
+ }
22521
+ async function $do$2(client, id, api_version, body, options) {
22522
+ var _a, _b, _c;
22523
+ const input = {
22524
+ id: id,
22525
+ api_version: api_version,
22526
+ body: body,
22527
+ };
22528
+ const payload = input;
22529
+ const body$ = encodeJSON("body", payload.body, { explode: true });
22530
+ const pathParams = {
22531
+ api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
22532
+ id: encodeSimple("id", payload.id, {
22533
+ explode: false,
22534
+ charEncoding: "percent",
22535
+ }),
22536
+ };
22537
+ const path = pathToFunc("/{api_version}/webhooks/{id}:ping")(pathParams);
22538
+ const headers = new Headers(compactMap({
22539
+ "Content-Type": "application/json",
22540
+ Accept: "application/json",
22541
+ }));
22542
+ const securityInput = await extractSecurity(client._options.security);
22543
+ const requestSecurity = resolveGlobalSecurity(securityInput);
22544
+ const context = {
22545
+ options: client._options,
22546
+ 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 : "",
22547
+ operation_id: "PingWebhook",
22548
+ o_auth2_scopes: null,
22549
+ resolved_security: requestSecurity,
22550
+ security_source: client._options.security,
22551
+ retry_config: (options === null || options === void 0 ? void 0 : options.retries)
22552
+ || client._options.retry_config
22553
+ || {
22554
+ strategy: "attempt-count-backoff",
22555
+ backoff: {
22556
+ initialInterval: 500,
22557
+ maxInterval: 8000,
22558
+ exponent: 2,
22559
+ maxElapsedTime: 30000,
22560
+ },
22561
+ retryConnectionErrors: true,
22562
+ maxRetries: 4,
22563
+ }
22564
+ || { strategy: "none" },
22565
+ retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
22566
+ };
22567
+ const requestRes = client._createRequest(context, {
22568
+ security: requestSecurity,
22569
+ method: "POST",
22570
+ baseURL: options === null || options === void 0 ? void 0 : options.server_url,
22571
+ path: path,
22572
+ headers: headers,
22573
+ body: body$,
22574
+ userAgent: client._options.user_agent,
22575
+ timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
22576
+ }, options);
22577
+ if (!requestRes.ok) {
22578
+ return [requestRes, { status: "invalid" }];
22579
+ }
22580
+ const req = requestRes.value;
22581
+ const doResult = await client._do(req, {
22582
+ context,
22583
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
22584
+ retryConfig: context.retry_config,
22585
+ retryCodes: context.retry_codes,
22586
+ });
22587
+ if (!doResult.ok) {
22588
+ return [doResult, { status: "request-error", request: req }];
22589
+ }
22590
+ const response = doResult.value;
22591
+ const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
22592
+ if (!result.ok) {
22593
+ return [result, { status: "complete", request: req, response }];
22594
+ }
22595
+ return [result, { status: "complete", request: req, response }];
22596
+ }
22597
+
22598
+ /**
22599
+ * @license
22600
+ * Copyright 2026 Google LLC
22601
+ * SPDX-License-Identifier: Apache-2.0
22602
+ *
22603
+ * g3-prettier-ignore-file
22604
+ */
22605
+ /**
22606
+ * Generates a new signing secret for a Webhook.
22607
+ */
22608
+ function webhooksRotateSigningSecret(client, id, api_version, body, options) {
22609
+ return new APIPromise($do$1(client, id, api_version, body, options));
22610
+ }
22611
+ async function $do$1(client, id, api_version, body, options) {
22612
+ var _a, _b, _c;
22613
+ const input = {
22614
+ id: id,
22615
+ api_version: api_version,
22616
+ body: body,
22617
+ };
22618
+ const payload = input;
22619
+ const body$ = encodeJSON("body", payload.body, { explode: true });
22620
+ const pathParams = {
22621
+ api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
22622
+ id: encodeSimple("id", payload.id, {
22623
+ explode: false,
22624
+ charEncoding: "percent",
22625
+ }),
22626
+ };
22627
+ const path = pathToFunc("/{api_version}/webhooks/{id}:rotateSigningSecret")(pathParams);
22628
+ const headers = new Headers(compactMap({
22629
+ "Content-Type": "application/json",
22630
+ Accept: "application/json",
22631
+ }));
22632
+ const securityInput = await extractSecurity(client._options.security);
22633
+ const requestSecurity = resolveGlobalSecurity(securityInput);
22634
+ const context = {
22635
+ options: client._options,
22636
+ 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 : "",
22637
+ operation_id: "RotateSigningSecret",
22638
+ o_auth2_scopes: null,
22639
+ resolved_security: requestSecurity,
22640
+ security_source: client._options.security,
22641
+ retry_config: (options === null || options === void 0 ? void 0 : options.retries)
22642
+ || client._options.retry_config
22643
+ || {
22644
+ strategy: "attempt-count-backoff",
22645
+ backoff: {
22646
+ initialInterval: 500,
22647
+ maxInterval: 8000,
22648
+ exponent: 2,
22649
+ maxElapsedTime: 30000,
22650
+ },
22651
+ retryConnectionErrors: true,
22652
+ maxRetries: 4,
22653
+ }
22654
+ || { strategy: "none" },
22655
+ retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
22656
+ };
22657
+ const requestRes = client._createRequest(context, {
22658
+ security: requestSecurity,
22659
+ method: "POST",
22660
+ baseURL: options === null || options === void 0 ? void 0 : options.server_url,
22661
+ path: path,
22662
+ headers: headers,
22663
+ body: body$,
22664
+ userAgent: client._options.user_agent,
22665
+ timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
22666
+ }, options);
22667
+ if (!requestRes.ok) {
22668
+ return [requestRes, { status: "invalid" }];
22669
+ }
22670
+ const req = requestRes.value;
22671
+ const doResult = await client._do(req, {
22672
+ context,
22673
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
22674
+ retryConfig: context.retry_config,
22675
+ retryCodes: context.retry_codes,
22676
+ });
22677
+ if (!doResult.ok) {
22678
+ return [doResult, { status: "request-error", request: req }];
22679
+ }
22680
+ const response = doResult.value;
22681
+ const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
22682
+ if (!result.ok) {
22683
+ return [result, { status: "complete", request: req, response }];
22684
+ }
22685
+ return [result, { status: "complete", request: req, response }];
22686
+ }
22687
+
22688
+ /**
22689
+ * @license
22690
+ * Copyright 2026 Google LLC
22691
+ * SPDX-License-Identifier: Apache-2.0
22692
+ *
22693
+ * g3-prettier-ignore-file
22694
+ */
22695
+ /**
22696
+ * Updates an existing Webhook.
22697
+ */
22698
+ function webhooksUpdate(client, id, api_version, update_mask, body, options) {
22699
+ return new APIPromise($do(client, id, api_version, update_mask, body, options));
22700
+ }
22701
+ async function $do(client, id, api_version, update_mask, body, options) {
22702
+ var _a, _b, _c;
22703
+ const input = {
22704
+ id: id,
22705
+ api_version: api_version,
22706
+ update_mask: update_mask,
22707
+ body: body,
22708
+ };
22709
+ const payload = input;
22710
+ const body$ = encodeJSON("body", payload.body, { explode: true });
22711
+ const pathParams = {
22712
+ api_version: encodeSimple("api_version", (_a = payload.api_version) !== null && _a !== void 0 ? _a : client._options.api_version, { explode: false, charEncoding: "percent" }),
22713
+ id: encodeSimple("id", payload.id, {
22714
+ explode: false,
22715
+ charEncoding: "percent",
22716
+ }),
22717
+ };
22718
+ const path = pathToFunc("/{api_version}/webhooks/{id}")(pathParams);
22719
+ const query = encodeFormQuery({
22720
+ "update_mask": payload.update_mask,
22721
+ });
22722
+ const headers = new Headers(compactMap({
22723
+ "Content-Type": "application/json",
22724
+ Accept: "application/json",
22725
+ }));
22726
+ const securityInput = await extractSecurity(client._options.security);
22727
+ const requestSecurity = resolveGlobalSecurity(securityInput);
22728
+ const context = {
22729
+ options: client._options,
22730
+ 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 : "",
22731
+ operation_id: "UpdateWebhook",
22732
+ o_auth2_scopes: null,
22733
+ resolved_security: requestSecurity,
22734
+ security_source: client._options.security,
22735
+ retry_config: (options === null || options === void 0 ? void 0 : options.retries)
22736
+ || client._options.retry_config
22737
+ || {
22738
+ strategy: "attempt-count-backoff",
22739
+ backoff: {
22740
+ initialInterval: 500,
22741
+ maxInterval: 8000,
22742
+ exponent: 2,
22743
+ maxElapsedTime: 30000,
22744
+ },
22745
+ retryConnectionErrors: true,
22746
+ maxRetries: 4,
22747
+ }
22748
+ || { strategy: "none" },
22749
+ retry_codes: (options === null || options === void 0 ? void 0 : options.retry_codes) || ["408", "409", "429", "5XX"],
22750
+ };
22751
+ const requestRes = client._createRequest(context, {
22752
+ security: requestSecurity,
22753
+ method: "PATCH",
22754
+ baseURL: options === null || options === void 0 ? void 0 : options.server_url,
22755
+ path: path,
22756
+ headers: headers,
22757
+ query: query,
22758
+ body: body$,
22759
+ userAgent: client._options.user_agent,
22760
+ timeout_ms: (options === null || options === void 0 ? void 0 : options.timeout_ms) || client._options.timeout_ms || -1,
22761
+ }, options);
22762
+ if (!requestRes.ok) {
22763
+ return [requestRes, { status: "invalid" }];
22764
+ }
22765
+ const req = requestRes.value;
22766
+ const doResult = await client._do(req, {
22767
+ context,
22768
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
22769
+ retryConfig: context.retry_config,
22770
+ retryCodes: context.retry_codes,
22771
+ });
22772
+ if (!doResult.ok) {
22773
+ return [doResult, { status: "request-error", request: req }];
22774
+ }
22775
+ const response = doResult.value;
22776
+ const [result] = await match(fail("4XX"), fail("5XX"), json("default"))(response, req);
22777
+ if (!result.ok) {
22778
+ return [result, { status: "complete", request: req, response }];
22779
+ }
22780
+ return [result, { status: "complete", request: req, response }];
22781
+ }
22782
+
22783
+ /**
22784
+ * @license
22785
+ * Copyright 2026 Google LLC
22786
+ * SPDX-License-Identifier: Apache-2.0
22787
+ *
22788
+ * g3-prettier-ignore-file
22789
+ */
22790
+ class Webhooks extends ClientSDK {
22791
+ /**
22792
+ * Creates a new Webhook.
22793
+ */
22794
+ create(params, options) {
22795
+ const { api_version } = params, body = __rest(params, ["api_version"]);
22796
+ return unwrapAsAPIPromise(webhooksCreate(this, body, api_version, options));
22797
+ }
22798
+ /**
22799
+ * Lists all Webhooks.
22800
+ */
22801
+ list(params, options) {
22802
+ 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));
22803
+ }
22804
+ /**
22805
+ * Gets a specific Webhook.
22806
+ */
22807
+ get(id, params, options) {
22808
+ return unwrapAsAPIPromise(webhooksGet(this, id, params === null || params === void 0 ? void 0 : params.api_version, options));
22809
+ }
22810
+ /**
22811
+ * Updates an existing Webhook.
22812
+ */
22813
+ update(id, params, options) {
22814
+ const _a = params !== null && params !== void 0 ? params : {}, { api_version, update_mask } = _a, body$body = __rest(_a, ["api_version", "update_mask"]);
22815
+ const body = params === undefined || Object.keys(body$body).length === 0
22816
+ ? undefined
22817
+ : body$body;
22818
+ return unwrapAsAPIPromise(webhooksUpdate(this, id, api_version, update_mask, body, options));
22819
+ }
22820
+ /**
22821
+ * Deletes a Webhook.
22822
+ */
22823
+ delete(id, params, options) {
22824
+ return unwrapAsAPIPromise(webhooksDelete(this, id, params === null || params === void 0 ? void 0 : params.api_version, options));
22825
+ }
22826
+ /**
22827
+ * Generates a new signing secret for a Webhook.
22828
+ */
22829
+ rotateSigningSecret(id, api_version, body, options) {
22830
+ return unwrapAsAPIPromise(webhooksRotateSigningSecret(this, id, api_version, body, options));
22831
+ }
22832
+ /**
22833
+ * Sends a ping event to a Webhook.
22834
+ */
22835
+ ping(id, api_version, body, options) {
22836
+ return unwrapAsAPIPromise(webhooksPing(this, id, api_version, body, options));
22837
+ }
22838
+ }
22839
+
22840
+ /**
22841
+ * @license
22842
+ * Copyright 2026 Google LLC
22843
+ * SPDX-License-Identifier: Apache-2.0
22844
+ *
22845
+ * g3-prettier-ignore-file
22846
+ */
22847
+ /*
22848
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
22849
+ */
22850
+ let GoogleGenAI$1 = class GoogleGenAI extends ClientSDK {
22851
+ get interactions() {
22852
+ var _a;
22853
+ return ((_a = this._interactions) !== null && _a !== void 0 ? _a : (this._interactions = new Interactions(this._options)));
22854
+ }
22855
+ get webhooks() {
22856
+ var _a;
22857
+ return ((_a = this._webhooks) !== null && _a !== void 0 ? _a : (this._webhooks = new Webhooks(this._options)));
22858
+ }
22859
+ get agents() {
22860
+ var _a;
22861
+ return ((_a = this._agents) !== null && _a !== void 0 ? _a : (this._agents = new Agents(this._options)));
22862
+ }
22863
+ get triggers() {
22864
+ var _a;
22865
+ return ((_a = this._triggers) !== null && _a !== void 0 ? _a : (this._triggers = new Triggers(this._options)));
22866
+ }
22867
+ };
22868
+
22869
+ /**
22870
+ * @license
22871
+ * Copyright 2026 Google LLC
22872
+ * SPDX-License-Identifier: Apache-2.0
22873
+ *
22874
+ * g3-prettier-ignore-file
22875
+ */
22876
+ const LEGACY_LYRIA_MODELS = new Set([
22877
+ "lyria-3-pro-preview",
22878
+ "lyria-3-clip-preview",
22879
+ ]);
22880
+ function getGoogleGenAIServerURL(parentClient) {
22881
+ const serverURL = parentClient.getBaseUrl();
22882
+ if (!serverURL) {
22883
+ throw new Error("Base URL must be set.");
22884
+ }
22885
+ return serverURL.replace(/\/+$/, "");
22886
+ }
22887
+ function getGoogleGenAIAPIVersion(parentClient) {
22888
+ const apiVersion = trimSlashes(parentClient.getApiVersion());
22889
+ const project = parentClient.getProject();
22890
+ const location = parentClient.getLocation();
22891
+ if (parentClient.isVertexAI() && apiVersion && project && location) {
22892
+ return (`${apiVersion}/projects/${encodeURIComponent(project)}` +
22893
+ `/locations/${encodeURIComponent(location)}`);
22894
+ }
22895
+ return apiVersion;
22896
+ }
22897
+ function buildGoogleGenAIClient(parentClient, options = {}) {
22898
+ var _a, _b, _c, _d, _e;
22899
+ 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({
22900
+ 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)),
22901
+ getAuthHeaders: (url) => parentClient.getAuthHeaders(url),
22902
+ }), server_url: (_e = options.server_url) !== null && _e !== void 0 ? _e : getGoogleGenAIServerURL(parentClient) }));
22903
+ return sdk;
22904
+ }
22905
+ class GeminiNextGenInteractions {
22906
+ constructor(parentClient) {
22907
+ this.parentClient = parentClient;
22908
+ }
22198
22909
  async create(params, options) {
22199
22910
  const { api_version } = params, request = __rest(params, ["api_version"]);
22200
22911
  if (request.stream === true) {
@@ -22295,6 +23006,46 @@ class GeminiNextGenWebhooks {
22295
23006
  return this.sdk;
22296
23007
  }
22297
23008
  }
23009
+ class GeminiNextGenTriggers {
23010
+ constructor(parentClient) {
23011
+ this.parentClient = parentClient;
23012
+ }
23013
+ async create(params, options) {
23014
+ const { api_version } = params, body = __rest(params, ["api_version"]);
23015
+ return unwrapWithSdkHttpResponse(triggersCreate(this.getClient(api_version), body, api_version, toGoogleGenAIRequestOptions(options)));
23016
+ }
23017
+ async list(params = {}, options) {
23018
+ const { api_version, filter, pageSize, pageToken } = params !== null && params !== void 0 ? params : {};
23019
+ return unwrapWithSdkHttpResponse(triggersList(this.getClient(api_version), api_version, filter, pageSize, pageToken, toGoogleGenAIRequestOptions(options)));
23020
+ }
23021
+ async get(id, params = {}, options) {
23022
+ 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)));
23023
+ }
23024
+ async update(id, params, options) {
23025
+ const { api_version } = params, body = __rest(params, ["api_version"]);
23026
+ return unwrapWithSdkHttpResponse(triggersUpdate(this.getClient(api_version), id, body, api_version, toGoogleGenAIRequestOptions(options)));
23027
+ }
23028
+ async delete(id, params = {}, options) {
23029
+ 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)));
23030
+ }
23031
+ async run(trigger_id, params = {}, options) {
23032
+ 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)));
23033
+ }
23034
+ async listExecutions(trigger_id, params = {}, options) {
23035
+ const { api_version, pageSize, pageToken } = params !== null && params !== void 0 ? params : {};
23036
+ return unwrapWithSdkHttpResponse(triggersListExecutions(this.getClient(api_version), trigger_id, api_version, pageSize, pageToken, toGoogleGenAIRequestOptions(options)));
23037
+ }
23038
+ getClient(apiVersion) {
23039
+ var _a;
23040
+ if (apiVersion) {
23041
+ return buildGoogleGenAIClient(this.parentClient, {
23042
+ api_version: apiVersion,
23043
+ });
23044
+ }
23045
+ (_a = this.sdk) !== null && _a !== void 0 ? _a : (this.sdk = buildGoogleGenAIClient(this.parentClient));
23046
+ return this.sdk;
23047
+ }
23048
+ }
22298
23049
  function trimSlashes(value) {
22299
23050
  return value.replace(/^\/+|\/+$/g, "");
22300
23051
  }
@@ -24977,6 +25728,14 @@ class GoogleGenAI {
24977
25728
  this._agents = new GeminiNextGenAgents(this.apiClient);
24978
25729
  return this._agents;
24979
25730
  }
25731
+ get triggers() {
25732
+ if (this._triggers !== undefined) {
25733
+ return this._triggers;
25734
+ }
25735
+ console.warn('GoogleGenAI.triggers: Triggers usage is experimental and may change in future versions.');
25736
+ this._triggers = new GeminiNextGenTriggers(this.apiClient);
25737
+ return this._triggers;
25738
+ }
24980
25739
  constructor(options) {
24981
25740
  var _a, _b, _c, _d;
24982
25741
  // Validate explicitly set initializer values.