@google/genai 1.50.0 → 1.50.1

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.
@@ -950,15 +950,11 @@ declare class BaseWebhooks extends APIResource {
950
950
  /**
951
951
  * Creates a new Webhook.
952
952
  */
953
- create(params: WebhookCreateParams, options?: RequestOptions): APIPromise<WebhookCreateResponse>;
954
- /**
955
- * Gets a specific Webhook.
956
- */
957
- retrieve(id: string, params?: WebhookRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<WebhookRetrieveResponse>;
953
+ create(params: WebhookCreateParams, options?: RequestOptions): APIPromise<Webhook>;
958
954
  /**
959
955
  * Updates an existing Webhook.
960
956
  */
961
- update(id: string, params: WebhookUpdateParams, options?: RequestOptions): APIPromise<WebhookUpdateResponse>;
957
+ update(id: string, params: WebhookUpdateParams, options?: RequestOptions): APIPromise<Webhook>;
962
958
  /**
963
959
  * Lists all Webhooks.
964
960
  */
@@ -967,6 +963,10 @@ declare class BaseWebhooks extends APIResource {
967
963
  * Deletes a Webhook.
968
964
  */
969
965
  delete(id: string, params?: WebhookDeleteParams | null | undefined, options?: RequestOptions): APIPromise<WebhookDeleteResponse>;
966
+ /**
967
+ * Gets a specific Webhook.
968
+ */
969
+ get(id: string, params?: WebhookGetParams | null | undefined, options?: RequestOptions): APIPromise<Webhook>;
970
970
  /**
971
971
  * Sends a ping event to a Webhook.
972
972
  */
@@ -9961,6 +9961,20 @@ export declare interface SessionResumptionConfig {
9961
9961
  */
9962
9962
  export declare function setDefaultBaseUrls(baseUrlParams: BaseUrlParameters): void;
9963
9963
 
9964
+ /**
9965
+ * Represents a signing secret used to verify webhook payloads.
9966
+ */
9967
+ declare interface SigningSecret {
9968
+ /**
9969
+ * Output only. The expiration date of the signing secret.
9970
+ */
9971
+ expire_time?: string;
9972
+ /**
9973
+ * Output only. The truncated version of the signing secret.
9974
+ */
9975
+ truncated_secret?: string;
9976
+ }
9977
+
9964
9978
  /** Config for `response` parameter. */
9965
9979
  export declare class SingleEmbedContentResponse {
9966
9980
  /** The response to the request.
@@ -12489,6 +12503,54 @@ export declare interface VoiceConfig {
12489
12503
  prebuiltVoiceConfig?: PrebuiltVoiceConfig;
12490
12504
  }
12491
12505
 
12506
+ /**
12507
+ * A Webhook resource.
12508
+ */
12509
+ declare interface Webhook {
12510
+ /**
12511
+ * Required. The events that the webhook is subscribed to. Available events:
12512
+ *
12513
+ * - batch.succeeded
12514
+ * - batch.cancelled
12515
+ * - batch.expired
12516
+ * - batch.failed
12517
+ * - interaction.requires_action
12518
+ * - interaction.completed
12519
+ * - interaction.failed
12520
+ * - interaction.cancelled
12521
+ * - video.generated
12522
+ */
12523
+ subscribed_events: Array<'batch.succeeded' | 'batch.cancelled' | 'batch.expired' | 'batch.failed' | 'interaction.requires_action' | 'interaction.completed' | 'interaction.failed' | 'interaction.cancelled' | 'video.generated' | (string & {})>;
12524
+ /**
12525
+ * Required. The URI to which webhook events will be sent.
12526
+ */
12527
+ uri: string;
12528
+ /**
12529
+ * Output only. The timestamp when the webhook was created.
12530
+ */
12531
+ create_time?: string;
12532
+ /**
12533
+ * Identifier. The name of the webhook. Format: `webhooks/{webhook_id}`
12534
+ */
12535
+ name?: string;
12536
+ /**
12537
+ * Output only. The new signing secret for the webhook. Only populated on create.
12538
+ */
12539
+ new_signing_secret?: string;
12540
+ /**
12541
+ * Output only. The signing secrets associated with this webhook.
12542
+ */
12543
+ signing_secrets?: Array<SigningSecret>;
12544
+ /**
12545
+ * The state of the webhook.
12546
+ */
12547
+ state?: 'enabled' | 'disabled' | 'disabled_due_to_failed_deliveries';
12548
+ /**
12549
+ * Output only. The timestamp when the webhook was last updated.
12550
+ */
12551
+ update_time?: string;
12552
+ }
12553
+
12492
12554
  /** Configuration for webhook notifications.
12493
12555
 
12494
12556
  Used to configure webhook endpoints that will receive notifications
@@ -12560,70 +12622,6 @@ declare interface WebhookCreateParams {
12560
12622
  state?: 'enabled' | 'disabled' | 'disabled_due_to_failed_deliveries';
12561
12623
  }
12562
12624
 
12563
- /**
12564
- * A Webhook resource.
12565
- */
12566
- declare interface WebhookCreateResponse {
12567
- /**
12568
- * Required. The events that the webhook is subscribed to. Available events:
12569
- *
12570
- * - batch.succeeded
12571
- * - batch.cancelled
12572
- * - batch.expired
12573
- * - batch.failed
12574
- * - interaction.requires_action
12575
- * - interaction.completed
12576
- * - interaction.failed
12577
- * - interaction.cancelled
12578
- * - video.generated
12579
- */
12580
- subscribed_events: Array<'batch.succeeded' | 'batch.cancelled' | 'batch.expired' | 'batch.failed' | 'interaction.requires_action' | 'interaction.completed' | 'interaction.failed' | 'interaction.cancelled' | 'video.generated' | (string & {})>;
12581
- /**
12582
- * Required. The URI to which webhook events will be sent.
12583
- */
12584
- uri: string;
12585
- /**
12586
- * Output only. The timestamp when the webhook was created.
12587
- */
12588
- create_time?: string;
12589
- /**
12590
- * Identifier. The name of the webhook. Format: `webhooks/{webhook_id}`
12591
- */
12592
- name?: string;
12593
- /**
12594
- * Output only. The new signing secret for the webhook. Only populated on create.
12595
- */
12596
- new_signing_secret?: string;
12597
- /**
12598
- * Output only. The signing secrets associated with this webhook.
12599
- */
12600
- signing_secrets?: Array<WebhookCreateResponse.SigningSecret>;
12601
- /**
12602
- * The state of the webhook.
12603
- */
12604
- state?: 'enabled' | 'disabled' | 'disabled_due_to_failed_deliveries';
12605
- /**
12606
- * Output only. The timestamp when the webhook was last updated.
12607
- */
12608
- update_time?: string;
12609
- }
12610
-
12611
- declare namespace WebhookCreateResponse {
12612
- /**
12613
- * Represents a signing secret used to verify webhook payloads.
12614
- */
12615
- interface SigningSecret {
12616
- /**
12617
- * Output only. The expiration date of the signing secret.
12618
- */
12619
- expire_time?: string;
12620
- /**
12621
- * Output only. The truncated version of the signing secret.
12622
- */
12623
- truncated_secret?: string;
12624
- }
12625
- }
12626
-
12627
12625
  declare interface WebhookDeleteParams {
12628
12626
  /**
12629
12627
  * Which version of the API to use.
@@ -12643,6 +12641,13 @@ declare interface WebhookDeleteParams {
12643
12641
  declare interface WebhookDeleteResponse {
12644
12642
  }
12645
12643
 
12644
+ declare interface WebhookGetParams {
12645
+ /**
12646
+ * Which version of the API to use.
12647
+ */
12648
+ api_version?: string;
12649
+ }
12650
+
12646
12651
  declare interface WebhookListParams {
12647
12652
  /**
12648
12653
  * Path param: Which version of the API to use.
@@ -12673,72 +12678,7 @@ declare interface WebhookListResponse {
12673
12678
  /**
12674
12679
  * The webhooks.
12675
12680
  */
12676
- webhooks?: Array<WebhookListResponse.Webhook>;
12677
- }
12678
-
12679
- declare namespace WebhookListResponse {
12680
- /**
12681
- * A Webhook resource.
12682
- */
12683
- interface Webhook {
12684
- /**
12685
- * Required. The events that the webhook is subscribed to. Available events:
12686
- *
12687
- * - batch.succeeded
12688
- * - batch.cancelled
12689
- * - batch.expired
12690
- * - batch.failed
12691
- * - interaction.requires_action
12692
- * - interaction.completed
12693
- * - interaction.failed
12694
- * - interaction.cancelled
12695
- * - video.generated
12696
- */
12697
- subscribed_events: Array<'batch.succeeded' | 'batch.cancelled' | 'batch.expired' | 'batch.failed' | 'interaction.requires_action' | 'interaction.completed' | 'interaction.failed' | 'interaction.cancelled' | 'video.generated' | (string & {})>;
12698
- /**
12699
- * Required. The URI to which webhook events will be sent.
12700
- */
12701
- uri: string;
12702
- /**
12703
- * Output only. The timestamp when the webhook was created.
12704
- */
12705
- create_time?: string;
12706
- /**
12707
- * Identifier. The name of the webhook. Format: `webhooks/{webhook_id}`
12708
- */
12709
- name?: string;
12710
- /**
12711
- * Output only. The new signing secret for the webhook. Only populated on create.
12712
- */
12713
- new_signing_secret?: string;
12714
- /**
12715
- * Output only. The signing secrets associated with this webhook.
12716
- */
12717
- signing_secrets?: Array<Webhook.SigningSecret>;
12718
- /**
12719
- * The state of the webhook.
12720
- */
12721
- state?: 'enabled' | 'disabled' | 'disabled_due_to_failed_deliveries';
12722
- /**
12723
- * Output only. The timestamp when the webhook was last updated.
12724
- */
12725
- update_time?: string;
12726
- }
12727
- namespace Webhook {
12728
- /**
12729
- * Represents a signing secret used to verify webhook payloads.
12730
- */
12731
- interface SigningSecret {
12732
- /**
12733
- * Output only. The expiration date of the signing secret.
12734
- */
12735
- expire_time?: string;
12736
- /**
12737
- * Output only. The truncated version of the signing secret.
12738
- */
12739
- truncated_secret?: string;
12740
- }
12741
- }
12681
+ webhooks?: Array<Webhook>;
12742
12682
  }
12743
12683
 
12744
12684
  declare interface WebhookPingParams {
@@ -12766,77 +12706,6 @@ declare namespace WebhookPingParams {
12766
12706
  declare interface WebhookPingResponse {
12767
12707
  }
12768
12708
 
12769
- declare interface WebhookRetrieveParams {
12770
- /**
12771
- * Which version of the API to use.
12772
- */
12773
- api_version?: string;
12774
- }
12775
-
12776
- /**
12777
- * A Webhook resource.
12778
- */
12779
- declare interface WebhookRetrieveResponse {
12780
- /**
12781
- * Required. The events that the webhook is subscribed to. Available events:
12782
- *
12783
- * - batch.succeeded
12784
- * - batch.cancelled
12785
- * - batch.expired
12786
- * - batch.failed
12787
- * - interaction.requires_action
12788
- * - interaction.completed
12789
- * - interaction.failed
12790
- * - interaction.cancelled
12791
- * - video.generated
12792
- */
12793
- subscribed_events: Array<'batch.succeeded' | 'batch.cancelled' | 'batch.expired' | 'batch.failed' | 'interaction.requires_action' | 'interaction.completed' | 'interaction.failed' | 'interaction.cancelled' | 'video.generated' | (string & {})>;
12794
- /**
12795
- * Required. The URI to which webhook events will be sent.
12796
- */
12797
- uri: string;
12798
- /**
12799
- * Output only. The timestamp when the webhook was created.
12800
- */
12801
- create_time?: string;
12802
- /**
12803
- * Identifier. The name of the webhook. Format: `webhooks/{webhook_id}`
12804
- */
12805
- name?: string;
12806
- /**
12807
- * Output only. The new signing secret for the webhook. Only populated on create.
12808
- */
12809
- new_signing_secret?: string;
12810
- /**
12811
- * Output only. The signing secrets associated with this webhook.
12812
- */
12813
- signing_secrets?: Array<WebhookRetrieveResponse.SigningSecret>;
12814
- /**
12815
- * The state of the webhook.
12816
- */
12817
- state?: 'enabled' | 'disabled' | 'disabled_due_to_failed_deliveries';
12818
- /**
12819
- * Output only. The timestamp when the webhook was last updated.
12820
- */
12821
- update_time?: string;
12822
- }
12823
-
12824
- declare namespace WebhookRetrieveResponse {
12825
- /**
12826
- * Represents a signing secret used to verify webhook payloads.
12827
- */
12828
- interface SigningSecret {
12829
- /**
12830
- * Output only. The expiration date of the signing secret.
12831
- */
12832
- expire_time?: string;
12833
- /**
12834
- * Output only. The truncated version of the signing secret.
12835
- */
12836
- truncated_secret?: string;
12837
- }
12838
- }
12839
-
12840
12709
  declare interface WebhookRotateSigningSecretParams {
12841
12710
  /**
12842
12711
  * Path param: Which version of the API to use.
@@ -12862,7 +12731,7 @@ export declare class Webhooks extends BaseWebhooks {
12862
12731
  }
12863
12732
 
12864
12733
  export declare namespace Webhooks {
12865
- export { type WebhookCreateResponse as WebhookCreateResponse, type WebhookRetrieveResponse as WebhookRetrieveResponse, type WebhookUpdateResponse as WebhookUpdateResponse, type WebhookListResponse as WebhookListResponse, type WebhookDeleteResponse as WebhookDeleteResponse, type WebhookPingResponse as WebhookPingResponse, type WebhookRotateSigningSecretResponse as WebhookRotateSigningSecretResponse, type WebhookCreateParams as WebhookCreateParams, type WebhookRetrieveParams as WebhookRetrieveParams, type WebhookUpdateParams as WebhookUpdateParams, type WebhookListParams as WebhookListParams, type WebhookDeleteParams as WebhookDeleteParams, type WebhookPingParams as WebhookPingParams, type WebhookRotateSigningSecretParams as WebhookRotateSigningSecretParams, };
12734
+ export { type SigningSecret as SigningSecret, type Webhook as Webhook, type WebhookListResponse as WebhookListResponse, type WebhookDeleteResponse as WebhookDeleteResponse, type WebhookPingResponse as WebhookPingResponse, type WebhookRotateSigningSecretResponse as WebhookRotateSigningSecretResponse, type WebhookCreateParams as WebhookCreateParams, type WebhookUpdateParams as WebhookUpdateParams, type WebhookListParams as WebhookListParams, type WebhookDeleteParams as WebhookDeleteParams, type WebhookGetParams as WebhookGetParams, type WebhookPingParams as WebhookPingParams, type WebhookRotateSigningSecretParams as WebhookRotateSigningSecretParams, };
12866
12735
  }
12867
12736
 
12868
12737
  declare interface WebhookUpdateParams {
@@ -12903,70 +12772,6 @@ declare interface WebhookUpdateParams {
12903
12772
  state?: 'enabled' | 'disabled' | 'disabled_due_to_failed_deliveries';
12904
12773
  }
12905
12774
 
12906
- /**
12907
- * A Webhook resource.
12908
- */
12909
- declare interface WebhookUpdateResponse {
12910
- /**
12911
- * Required. The events that the webhook is subscribed to. Available events:
12912
- *
12913
- * - batch.succeeded
12914
- * - batch.cancelled
12915
- * - batch.expired
12916
- * - batch.failed
12917
- * - interaction.requires_action
12918
- * - interaction.completed
12919
- * - interaction.failed
12920
- * - interaction.cancelled
12921
- * - video.generated
12922
- */
12923
- subscribed_events: Array<'batch.succeeded' | 'batch.cancelled' | 'batch.expired' | 'batch.failed' | 'interaction.requires_action' | 'interaction.completed' | 'interaction.failed' | 'interaction.cancelled' | 'video.generated' | (string & {})>;
12924
- /**
12925
- * Required. The URI to which webhook events will be sent.
12926
- */
12927
- uri: string;
12928
- /**
12929
- * Output only. The timestamp when the webhook was created.
12930
- */
12931
- create_time?: string;
12932
- /**
12933
- * Identifier. The name of the webhook. Format: `webhooks/{webhook_id}`
12934
- */
12935
- name?: string;
12936
- /**
12937
- * Output only. The new signing secret for the webhook. Only populated on create.
12938
- */
12939
- new_signing_secret?: string;
12940
- /**
12941
- * Output only. The signing secrets associated with this webhook.
12942
- */
12943
- signing_secrets?: Array<WebhookUpdateResponse.SigningSecret>;
12944
- /**
12945
- * The state of the webhook.
12946
- */
12947
- state?: 'enabled' | 'disabled' | 'disabled_due_to_failed_deliveries';
12948
- /**
12949
- * Output only. The timestamp when the webhook was last updated.
12950
- */
12951
- update_time?: string;
12952
- }
12953
-
12954
- declare namespace WebhookUpdateResponse {
12955
- /**
12956
- * Represents a signing secret used to verify webhook payloads.
12957
- */
12958
- interface SigningSecret {
12959
- /**
12960
- * Output only. The expiration date of the signing secret.
12961
- */
12962
- expire_time?: string;
12963
- /**
12964
- * Output only. The truncated version of the signing secret.
12965
- */
12966
- truncated_secret?: string;
12967
- }
12968
- }
12969
-
12970
12775
  /** Standard web search for grounding and related configurations. Only text results are returned. */
12971
12776
  export declare interface WebSearch {
12972
12777
  }
@@ -1997,7 +1997,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
1997
1997
  const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
1998
1998
  const USER_AGENT_HEADER = 'User-Agent';
1999
1999
  const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
2000
- const SDK_VERSION = '1.50.0'; // x-release-please-version
2000
+ const SDK_VERSION = '1.50.1'; // x-release-please-version
2001
2001
  const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
2002
2002
  const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
2003
2003
  const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';