@maxim_mazurok/gapi.client.discoveryengine-v1 0.0.20240510 → 0.0.20240512

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.
Files changed (2) hide show
  1. package/index.d.ts +287 -1
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -9,7 +9,7 @@
9
9
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
10
10
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
11
11
  // Generated from: https://discoveryengine.googleapis.com/$discovery/rest?version=v1
12
- // Revision: 20240510
12
+ // Revision: 20240512
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -1190,6 +1190,40 @@ declare namespace gapi.client {
1190
1190
  /** Required. The table ID of the Cloud Bigtable that needs to be imported. */
1191
1191
  tableId?: string;
1192
1192
  }
1193
+ interface GoogleCloudDiscoveryengineV1CheckGroundingRequest {
1194
+ /** Answer candidate to check. Can have a maximum length of 1024 characters. */
1195
+ answerCandidate?: string;
1196
+ /** List of facts for the grounding check. We support up to 200 facts. */
1197
+ facts?: GoogleCloudDiscoveryengineV1GroundingFact[];
1198
+ /** Configuration of the grounding check. */
1199
+ groundingSpec?: GoogleCloudDiscoveryengineV1CheckGroundingSpec;
1200
+ /** The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details. */
1201
+ userLabels?: {[P in string]: string};
1202
+ }
1203
+ interface GoogleCloudDiscoveryengineV1CheckGroundingResponse {
1204
+ /** List of facts cited across all claims in the answer candidate. These are derived from the facts supplied in the request. */
1205
+ citedChunks?: GoogleCloudDiscoveryengineV1FactChunk[];
1206
+ /** Claim texts and citation info across all claims in the answer candidate. */
1207
+ claims?: GoogleCloudDiscoveryengineV1CheckGroundingResponseClaim[];
1208
+ /** The support score for the input answer candidate. Higher the score, higher is the fraction of claims that are supported by the provided facts. This is always set when a response is returned. */
1209
+ supportScore?: number;
1210
+ }
1211
+ interface GoogleCloudDiscoveryengineV1CheckGroundingResponseClaim {
1212
+ /** A list of indices (into 'cited_chunks') specifying the citations associated with the claim. For instance [1,3,4] means that cited_chunks[1], cited_chunks[3], cited_chunks[4] are the facts cited supporting for the claim. A citation to a fact indicates that the claim is supported by the fact. */
1213
+ citationIndices?: number[];
1214
+ /** Text for the claim in the answer candidate. Always provided regardless of whether citations or anti-citations are found. */
1215
+ claimText?: string;
1216
+ /** Position indicating the end of the claim in the answer candidate, exclusive. */
1217
+ endPos?: number;
1218
+ /** Indicates that this claim required grounding check. When the system decided this claim doesn't require attribution/grounding check, this field will be set to false. In that case, no grounding check was done for the claim and therefore citation_indices, and anti_citation_indices should not be returned. */
1219
+ groundingCheckRequired?: boolean;
1220
+ /** Position indicating the start of the claim in the answer candidate, measured in bytes. */
1221
+ startPos?: number;
1222
+ }
1223
+ interface GoogleCloudDiscoveryengineV1CheckGroundingSpec {
1224
+ /** The threshold (in [0,1]) used for determining whether a fact must be cited for a claim in the answer candidate. Choosing a higher threshold will lead to fewer but very strong citations, while choosing a lower threshold may lead to more but somewhat weaker citations. If unset, the threshold will default to 0.6. */
1225
+ citationThreshold?: number;
1226
+ }
1193
1227
  interface GoogleCloudDiscoveryengineV1CloudSqlSource {
1194
1228
  /** Required. The Cloud SQL database to copy the data from with a length limit of 256 characters. */
1195
1229
  databaseId?: string;
@@ -1489,6 +1523,16 @@ declare namespace gapi.client {
1489
1523
  /** The search feature tier of this engine. Different tiers might have different pricing. To learn more, check the pricing documentation. Defaults to SearchTier.SEARCH_TIER_STANDARD if not specified. */
1490
1524
  searchTier?: string;
1491
1525
  }
1526
+ interface GoogleCloudDiscoveryengineV1FactChunk {
1527
+ /** Text content of the fact chunk. Can be at most 10K characters long. */
1528
+ chunkText?: string;
1529
+ /** The index of this chunk. Currently, only used for the streaming mode. */
1530
+ index?: number;
1531
+ /** Source from which this fact chunk was retrieved. If it was retrieved from the GroundingFacts provided in the request then this field will contain the index of the specific fact from which this chunk was retrieved. */
1532
+ source?: string;
1533
+ /** More fine-grained information for the source reference. */
1534
+ sourceMetadata?: {[P in string]: string};
1535
+ }
1492
1536
  interface GoogleCloudDiscoveryengineV1FetchDomainVerificationStatusResponse {
1493
1537
  /** A token that can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. */
1494
1538
  nextPageToken?: string;
@@ -1519,6 +1563,12 @@ declare namespace gapi.client {
1519
1563
  /** Required. Cloud Storage URIs to input files. URI can be up to 2000 characters long. URIs can match the full object path (for example, `gs://bucket/directory/object.json`) or a pattern matching one or more files, such as `gs://bucket/directory/*.json`. A request can contain at most 100 files (or 100,000 files if `data_schema` is `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` is `content`). */
1520
1564
  inputUris?: string[];
1521
1565
  }
1566
+ interface GoogleCloudDiscoveryengineV1GroundingFact {
1567
+ /** Attributes associated with the fact. Common attributes include `source` (indicating where the fact was sourced from), `author` (indicating the author of the fact), and so on. */
1568
+ attributes?: {[P in string]: string};
1569
+ /** Text content of the fact. Can be at most 10K characters long. */
1570
+ factText?: string;
1571
+ }
1522
1572
  interface GoogleCloudDiscoveryengineV1ImportDocumentsMetadata {
1523
1573
  /** Operation create time. */
1524
1574
  createTime?: string;
@@ -2186,6 +2236,7 @@ declare namespace gapi.client {
2186
2236
  /** Highly recommended for logged-in users. Unique identifier for logged-in user, such as a user name. Don't set for anonymous users. Always use a hashed value for this ID. Don't set the field to the same fixed ID for different users. This mixes the event history of those users together, which results in degraded model quality. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. */
2187
2237
  userId?: string;
2188
2238
  }
2239
+ interface GoogleLongrunningCancelOperationRequest {}
2189
2240
  interface GoogleLongrunningListOperationsResponse {
2190
2241
  /** The standard List next-page token. */
2191
2242
  nextPageToken?: string;
@@ -2618,6 +2669,64 @@ declare namespace gapi.client {
2618
2669
  ): Request<GoogleLongrunningOperation>;
2619
2670
  }
2620
2671
  interface OperationsResource {
2672
+ /** Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. */
2673
+ cancel(request: {
2674
+ /** V1 error format. */
2675
+ '$.xgafv'?: string;
2676
+ /** OAuth access token. */
2677
+ access_token?: string;
2678
+ /** Data format for response. */
2679
+ alt?: string;
2680
+ /** JSONP */
2681
+ callback?: string;
2682
+ /** Selector specifying which fields to include in a partial response. */
2683
+ fields?: string;
2684
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2685
+ key?: string;
2686
+ /** The name of the operation resource to be cancelled. */
2687
+ name: string;
2688
+ /** OAuth 2.0 token for the current user. */
2689
+ oauth_token?: string;
2690
+ /** Returns response with indentations and line breaks. */
2691
+ prettyPrint?: boolean;
2692
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2693
+ quotaUser?: string;
2694
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2695
+ upload_protocol?: string;
2696
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2697
+ uploadType?: string;
2698
+ /** Request body */
2699
+ resource: GoogleLongrunningCancelOperationRequest;
2700
+ }): Request<{}>;
2701
+ cancel(
2702
+ request: {
2703
+ /** V1 error format. */
2704
+ '$.xgafv'?: string;
2705
+ /** OAuth access token. */
2706
+ access_token?: string;
2707
+ /** Data format for response. */
2708
+ alt?: string;
2709
+ /** JSONP */
2710
+ callback?: string;
2711
+ /** Selector specifying which fields to include in a partial response. */
2712
+ fields?: string;
2713
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2714
+ key?: string;
2715
+ /** The name of the operation resource to be cancelled. */
2716
+ name: string;
2717
+ /** OAuth 2.0 token for the current user. */
2718
+ oauth_token?: string;
2719
+ /** Returns response with indentations and line breaks. */
2720
+ prettyPrint?: boolean;
2721
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2722
+ quotaUser?: string;
2723
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2724
+ upload_protocol?: string;
2725
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2726
+ uploadType?: string;
2727
+ },
2728
+ body: GoogleLongrunningCancelOperationRequest
2729
+ ): Request<{}>;
2621
2730
  /** Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. */
2622
2731
  get(request?: {
2623
2732
  /** V1 error format. */
@@ -5746,6 +5855,64 @@ declare namespace gapi.client {
5746
5855
  ): Request<GoogleLongrunningOperation>;
5747
5856
  }
5748
5857
  interface OperationsResource {
5858
+ /** Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. */
5859
+ cancel(request: {
5860
+ /** V1 error format. */
5861
+ '$.xgafv'?: string;
5862
+ /** OAuth access token. */
5863
+ access_token?: string;
5864
+ /** Data format for response. */
5865
+ alt?: string;
5866
+ /** JSONP */
5867
+ callback?: string;
5868
+ /** Selector specifying which fields to include in a partial response. */
5869
+ fields?: string;
5870
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
5871
+ key?: string;
5872
+ /** The name of the operation resource to be cancelled. */
5873
+ name: string;
5874
+ /** OAuth 2.0 token for the current user. */
5875
+ oauth_token?: string;
5876
+ /** Returns response with indentations and line breaks. */
5877
+ prettyPrint?: boolean;
5878
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
5879
+ quotaUser?: string;
5880
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
5881
+ upload_protocol?: string;
5882
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
5883
+ uploadType?: string;
5884
+ /** Request body */
5885
+ resource: GoogleLongrunningCancelOperationRequest;
5886
+ }): Request<{}>;
5887
+ cancel(
5888
+ request: {
5889
+ /** V1 error format. */
5890
+ '$.xgafv'?: string;
5891
+ /** OAuth access token. */
5892
+ access_token?: string;
5893
+ /** Data format for response. */
5894
+ alt?: string;
5895
+ /** JSONP */
5896
+ callback?: string;
5897
+ /** Selector specifying which fields to include in a partial response. */
5898
+ fields?: string;
5899
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
5900
+ key?: string;
5901
+ /** The name of the operation resource to be cancelled. */
5902
+ name: string;
5903
+ /** OAuth 2.0 token for the current user. */
5904
+ oauth_token?: string;
5905
+ /** Returns response with indentations and line breaks. */
5906
+ prettyPrint?: boolean;
5907
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
5908
+ quotaUser?: string;
5909
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
5910
+ upload_protocol?: string;
5911
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
5912
+ uploadType?: string;
5913
+ },
5914
+ body: GoogleLongrunningCancelOperationRequest
5915
+ ): Request<{}>;
5749
5916
  /** Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. */
5750
5917
  get(request?: {
5751
5918
  /** V1 error format. */
@@ -7531,6 +7698,66 @@ declare namespace gapi.client {
7531
7698
  suggestionDenyListEntries: SuggestionDenyListEntriesResource;
7532
7699
  userEvents: UserEventsResource;
7533
7700
  }
7701
+ interface GroundingConfigsResource {
7702
+ /** Performs a grounding check. */
7703
+ check(request: {
7704
+ /** V1 error format. */
7705
+ '$.xgafv'?: string;
7706
+ /** OAuth access token. */
7707
+ access_token?: string;
7708
+ /** Data format for response. */
7709
+ alt?: string;
7710
+ /** JSONP */
7711
+ callback?: string;
7712
+ /** Selector specifying which fields to include in a partial response. */
7713
+ fields?: string;
7714
+ /** Required. The resource name of the grounding config, such as `projects/*‍/locations/global/groundingConfigs/default_grounding_config`. */
7715
+ groundingConfig: string;
7716
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
7717
+ key?: string;
7718
+ /** OAuth 2.0 token for the current user. */
7719
+ oauth_token?: string;
7720
+ /** Returns response with indentations and line breaks. */
7721
+ prettyPrint?: boolean;
7722
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
7723
+ quotaUser?: string;
7724
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
7725
+ upload_protocol?: string;
7726
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
7727
+ uploadType?: string;
7728
+ /** Request body */
7729
+ resource: GoogleCloudDiscoveryengineV1CheckGroundingRequest;
7730
+ }): Request<GoogleCloudDiscoveryengineV1CheckGroundingResponse>;
7731
+ check(
7732
+ request: {
7733
+ /** V1 error format. */
7734
+ '$.xgafv'?: string;
7735
+ /** OAuth access token. */
7736
+ access_token?: string;
7737
+ /** Data format for response. */
7738
+ alt?: string;
7739
+ /** JSONP */
7740
+ callback?: string;
7741
+ /** Selector specifying which fields to include in a partial response. */
7742
+ fields?: string;
7743
+ /** Required. The resource name of the grounding config, such as `projects/*‍/locations/global/groundingConfigs/default_grounding_config`. */
7744
+ groundingConfig: string;
7745
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
7746
+ key?: string;
7747
+ /** OAuth 2.0 token for the current user. */
7748
+ oauth_token?: string;
7749
+ /** Returns response with indentations and line breaks. */
7750
+ prettyPrint?: boolean;
7751
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
7752
+ quotaUser?: string;
7753
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
7754
+ upload_protocol?: string;
7755
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
7756
+ uploadType?: string;
7757
+ },
7758
+ body: GoogleCloudDiscoveryengineV1CheckGroundingRequest
7759
+ ): Request<GoogleCloudDiscoveryengineV1CheckGroundingResponse>;
7760
+ }
7534
7761
  interface OperationsResource {
7535
7762
  /** Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. */
7536
7763
  get(request?: {
@@ -7656,10 +7883,69 @@ declare namespace gapi.client {
7656
7883
  interface LocationsResource {
7657
7884
  collections: CollectionsResource;
7658
7885
  dataStores: DataStoresResource;
7886
+ groundingConfigs: GroundingConfigsResource;
7659
7887
  operations: OperationsResource;
7660
7888
  userEvents: UserEventsResource;
7661
7889
  }
7662
7890
  interface OperationsResource {
7891
+ /** Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. */
7892
+ cancel(request: {
7893
+ /** V1 error format. */
7894
+ '$.xgafv'?: string;
7895
+ /** OAuth access token. */
7896
+ access_token?: string;
7897
+ /** Data format for response. */
7898
+ alt?: string;
7899
+ /** JSONP */
7900
+ callback?: string;
7901
+ /** Selector specifying which fields to include in a partial response. */
7902
+ fields?: string;
7903
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
7904
+ key?: string;
7905
+ /** The name of the operation resource to be cancelled. */
7906
+ name: string;
7907
+ /** OAuth 2.0 token for the current user. */
7908
+ oauth_token?: string;
7909
+ /** Returns response with indentations and line breaks. */
7910
+ prettyPrint?: boolean;
7911
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
7912
+ quotaUser?: string;
7913
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
7914
+ upload_protocol?: string;
7915
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
7916
+ uploadType?: string;
7917
+ /** Request body */
7918
+ resource: GoogleLongrunningCancelOperationRequest;
7919
+ }): Request<{}>;
7920
+ cancel(
7921
+ request: {
7922
+ /** V1 error format. */
7923
+ '$.xgafv'?: string;
7924
+ /** OAuth access token. */
7925
+ access_token?: string;
7926
+ /** Data format for response. */
7927
+ alt?: string;
7928
+ /** JSONP */
7929
+ callback?: string;
7930
+ /** Selector specifying which fields to include in a partial response. */
7931
+ fields?: string;
7932
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
7933
+ key?: string;
7934
+ /** The name of the operation resource to be cancelled. */
7935
+ name: string;
7936
+ /** OAuth 2.0 token for the current user. */
7937
+ oauth_token?: string;
7938
+ /** Returns response with indentations and line breaks. */
7939
+ prettyPrint?: boolean;
7940
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
7941
+ quotaUser?: string;
7942
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
7943
+ upload_protocol?: string;
7944
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
7945
+ uploadType?: string;
7946
+ },
7947
+ body: GoogleLongrunningCancelOperationRequest
7948
+ ): Request<{}>;
7663
7949
  /** Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. */
7664
7950
  get(request?: {
7665
7951
  /** V1 error format. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.discoveryengine-v1",
3
- "version": "0.0.20240510",
3
+ "version": "0.0.20240512",
4
4
  "description": "TypeScript typings for Discovery Engine API v1",
5
5
  "repository": {
6
6
  "type": "git",