@maxim_mazurok/gapi.client.discoveryengine-v1beta 0.0.20240307 → 0.0.20240318

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 +109 -31
  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=v1beta
12
- // Revision: 20240307
12
+ // Revision: 20240318
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -170,7 +170,6 @@ declare namespace gapi.client {
170
170
  /** Operation last update time. If the operation is done, this is also the finish time. */
171
171
  updateTime?: string;
172
172
  }
173
- interface GoogleCloudDiscoveryengineV1alphaDigitalParsingConfig {}
174
173
  interface GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchMetadata {
175
174
  /** Operation create time. */
176
175
  createTime?: string;
@@ -206,7 +205,15 @@ declare namespace gapi.client {
206
205
  /** Configurations applied to layout parser. */
207
206
  layoutParsingConfig?: any;
208
207
  /** Configurations applied to OCR parser. Currently it only applies to PDFs. */
209
- ocrParsingConfig?: GoogleCloudDiscoveryengineV1alphaOcrParsingConfig;
208
+ ocrParsingConfig?: GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigOcrParsingConfig;
209
+ }
210
+ interface GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigDigitalParsingConfig {}
211
+ interface GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigLayoutParsingConfig {}
212
+ interface GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigOcrParsingConfig {
213
+ /** Apply additional enhanced OCR processing to a list of document elements. Supported values: * `table`: advanced table parsing model. */
214
+ enhancedDocumentElements?: string[];
215
+ /** If true, will use native text instead of OCR text on pages containing native text. */
216
+ useNativeText?: boolean;
210
217
  }
211
218
  interface GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchMetadata {
212
219
  /** Operation create time. */
@@ -396,13 +403,6 @@ declare namespace gapi.client {
396
403
  /** Count of user events imported, but with Document information not found in the existing Branch. */
397
404
  unjoinedEventsCount?: string;
398
405
  }
399
- interface GoogleCloudDiscoveryengineV1alphaLayoutParsingConfig {}
400
- interface GoogleCloudDiscoveryengineV1alphaOcrParsingConfig {
401
- /** Apply additional enhanced OCR processing to a list of document elements. Supported values: * `table`: advanced table parsing model. */
402
- enhancedDocumentElements?: string[];
403
- /** If true, will use native text instead of OCR text on pages containing native text. */
404
- useNativeText?: boolean;
405
- }
406
406
  interface GoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata {
407
407
  /** Operation create time. */
408
408
  createTime?: string;
@@ -749,7 +749,6 @@ declare namespace gapi.client {
749
749
  /** Operation last update time. If the operation is done, this is also the finish time. */
750
750
  updateTime?: string;
751
751
  }
752
- interface GoogleCloudDiscoveryengineV1betaDigitalParsingConfig {}
753
752
  interface GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata {
754
753
  /** Operation create time. */
755
754
  createTime?: string;
@@ -812,7 +811,14 @@ declare namespace gapi.client {
812
811
  /** Configurations applied to digital parser. */
813
812
  digitalParsingConfig?: any;
814
813
  /** Configurations applied to OCR parser. Currently it only applies to PDFs. */
815
- ocrParsingConfig?: GoogleCloudDiscoveryengineV1betaOcrParsingConfig;
814
+ ocrParsingConfig?: GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig;
815
+ }
816
+ interface GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigDigitalParsingConfig {}
817
+ interface GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig {
818
+ /** Apply additional enhanced OCR processing to a list of document elements. Supported values: * `table`: advanced table parsing model. */
819
+ enhancedDocumentElements?: string[];
820
+ /** If true, will use native text instead of OCR text on pages containing native text. */
821
+ useNativeText?: boolean;
816
822
  }
817
823
  interface GoogleCloudDiscoveryengineV1betaDoubleList {
818
824
  /** Double values. */
@@ -1056,12 +1062,6 @@ declare namespace gapi.client {
1056
1062
  /** Media progress should be computed using only the media_progress_duration relative to the media total length. This value must be between `[0, 1.0]` inclusive. If this is not a playback or the progress cannot be computed (e.g. ongoing livestream), this field should be unset. */
1057
1063
  mediaProgressPercentage?: number;
1058
1064
  }
1059
- interface GoogleCloudDiscoveryengineV1betaOcrParsingConfig {
1060
- /** Apply additional enhanced OCR processing to a list of document elements. Supported values: * `table`: advanced table parsing model. */
1061
- enhancedDocumentElements?: string[];
1062
- /** If true, will use native text instead of OCR text on pages containing native text. */
1063
- useNativeText?: boolean;
1064
- }
1065
1065
  interface GoogleCloudDiscoveryengineV1betaPageInfo {
1066
1066
  /** The most specific category associated with a category page. To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, please replace it with other character(s). Category pages include special pages such as sales or promotions. For instance, a special sale page may have the category hierarchy: `"pageCategory" : "Sales > 2017 Black Friday Deals"`. Required for `view-category-page` events. Other event types should not set this field. Otherwise, an `INVALID_ARGUMENT` error is returned. */
1067
1067
  pageCategory?: string;
@@ -1240,9 +1240,9 @@ declare namespace gapi.client {
1240
1240
  conditionBoostSpecs?: GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec[];
1241
1241
  }
1242
1242
  interface GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec {
1243
- /** Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. */
1243
+ /** Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied. */
1244
1244
  boost?: number;
1245
- /** An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": * (document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue")) */
1245
+ /** An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))` */
1246
1246
  condition?: string;
1247
1247
  }
1248
1248
  interface GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec {
@@ -1262,6 +1262,8 @@ declare namespace gapi.client {
1262
1262
  numNextSegments?: number;
1263
1263
  /** Specifies whether to also include the adjacent from each selected segments. Return at most `num_previous_segments` segments before each selected segments. */
1264
1264
  numPreviousSegments?: number;
1265
+ /** Specifies whether to return the confidence score from the extractive segments in each search result. This feature is available only for new or allowlisted data stores. To allowlist your data store, please contact your Customer Engineer. The default value is `false`. */
1266
+ returnExtractiveSegmentScore?: boolean;
1265
1267
  }
1266
1268
  interface GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetSpec {
1267
1269
  /** [DEPRECATED] This field is deprecated. To control snippet return, use `return_snippet` field. For backwards compatibility, we will return snippet if max_snippet_count > 0. */
@@ -1286,13 +1288,15 @@ declare namespace gapi.client {
1286
1288
  modelSpec?: GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelSpec;
1287
1289
  /** The number of top results to generate the summary from. If the number of results returned is less than `summaryResultCount`, the summary is generated from all of the results. At most 10 results can be used to generate a summary. */
1288
1290
  summaryResultCount?: number;
1291
+ /** If true, answer will be generated from most relevant chunks from top search results. This feature will improve summary quality. Please note that with this feature enabled, not all top search results will be referenced and included in the reference list, so the citation source index only points to the search results listed in the reference list. */
1292
+ useSemanticChunks?: boolean;
1289
1293
  }
1290
1294
  interface GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelPromptSpec {
1291
1295
  /** Text at the beginning of the prompt that instructs the assistant. Examples are available in the user guide. */
1292
1296
  preamble?: string;
1293
1297
  }
1294
1298
  interface GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelSpec {
1295
- /** The model version used to generate the summary. Supported values are: * `stable`: string. Default value when no value is specified. Uses a generally available, fine-tuned version of the text-bison@001 model. * `preview`: string. (Public preview) Uses a fine-tuned version of the text-bison@002 model. This model works only for summaries in English. */
1299
+ /** The model version used to generate the summary. Supported values are: * `stable`: string. Default value when no value is specified. Uses a generally available, fine-tuned model. For more information, see [Answer generation model versions and lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). * `preview`: string. (Public preview) Uses a preview model. For more information, see [Answer generation model versions and lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). */
1296
1300
  version?: string;
1297
1301
  }
1298
1302
  interface GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec {
@@ -1517,8 +1521,6 @@ declare namespace gapi.client {
1517
1521
  interface GoogleCloudDiscoveryengineV1betaServingConfigMediaConfig {
1518
1522
  /** Specifies the content freshness used for recommendation result. Contents will be demoted if contents were published for more than content freshness cutoff days. */
1519
1523
  contentFreshnessCutoffDays?: number;
1520
- /** Specifies the content watched minutes threshold for demotion. */
1521
- contentWatchedMinutesThreshold?: number;
1522
1524
  /** Specifies the content watched percentage threshold for demotion. Threshold value must be between [0, 1.0] inclusive. */
1523
1525
  contentWatchedPercentageThreshold?: number;
1524
1526
  /** Specifies the content watched minutes threshold for demotion. */
@@ -1582,6 +1584,24 @@ declare namespace gapi.client {
1582
1584
  /** Operation last update time. If the operation is done, this is also the finish time. */
1583
1585
  updateTime?: string;
1584
1586
  }
1587
+ interface GoogleCloudDiscoveryengineV1betaTrainCustomModelRequest {
1588
+ /** The desired location of errors incurred during the data ingestion and training. */
1589
+ errorConfig?: GoogleCloudDiscoveryengineV1betaImportErrorConfig;
1590
+ /** Cloud Storage training input. */
1591
+ gcsTrainingInput?: GoogleCloudDiscoveryengineV1betaTrainCustomModelRequestGcsTrainingInput;
1592
+ /** Model to be trained. Supported values are: * **search-tuning**: Fine tuning the search system based on data provided. */
1593
+ modelType?: string;
1594
+ }
1595
+ interface GoogleCloudDiscoveryengineV1betaTrainCustomModelRequestGcsTrainingInput {
1596
+ /** The Cloud Storage corpus data which could be associated in train data. The data path format is `gs:///`. A newline delimited jsonl/ndjson file. For search-tuning model, each line should have the _id, title and text. Example: `{"_id": "doc1", title: "relevant doc", "text": "relevant text"}` */
1597
+ corpusDataPath?: string;
1598
+ /** The gcs query data which could be associated in train data. The data path format is `gs:///`. A newline delimited jsonl/ndjson file. For search-tuning model, each line should have the _id and text. Example: {"_id": "query1", "text": "example query"} */
1599
+ queryDataPath?: string;
1600
+ /** Cloud Storage test data. Same format as train_data_path. If not provided, a random 80/20 train/test split will be performed on train_data_path. */
1601
+ testDataPath?: string;
1602
+ /** Cloud Storage training data path whose format should be `gs:///`. The file should be in tsv format. Each line should have the doc_id and query_id and score (number). For search-tuning model, it should have the query-id corpus-id score as tsv file header. The score should be a number in `[0, inf+)`. The larger the number is, the more relevant the pair is. Example: * `query-id\tcorpus-id\tscore` * `query1\tdoc1\t1` */
1603
+ trainDataPath?: string;
1604
+ }
1585
1605
  interface GoogleCloudDiscoveryengineV1betaTrainCustomModelResponse {
1586
1606
  /** Echoes the destination for the complete errors in the request if set. */
1587
1607
  errorConfig?: GoogleCloudDiscoveryengineV1betaImportErrorConfig;
@@ -1730,7 +1750,6 @@ declare namespace gapi.client {
1730
1750
  /** Operation last update time. If the operation is done, this is also the finish time. */
1731
1751
  updateTime?: string;
1732
1752
  }
1733
- interface GoogleCloudDiscoveryengineV1DigitalParsingConfig {}
1734
1753
  interface GoogleCloudDiscoveryengineV1DisableAdvancedSiteSearchMetadata {
1735
1754
  /** Operation create time. */
1736
1755
  createTime?: string;
@@ -1752,7 +1771,14 @@ declare namespace gapi.client {
1752
1771
  /** Configurations applied to digital parser. */
1753
1772
  digitalParsingConfig?: any;
1754
1773
  /** Configurations applied to OCR parser. Currently it only applies to PDFs. */
1755
- ocrParsingConfig?: GoogleCloudDiscoveryengineV1OcrParsingConfig;
1774
+ ocrParsingConfig?: GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigOcrParsingConfig;
1775
+ }
1776
+ interface GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigDigitalParsingConfig {}
1777
+ interface GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigOcrParsingConfig {
1778
+ /** Apply additional enhanced OCR processing to a list of document elements. Supported values: * `table`: advanced table parsing model. */
1779
+ enhancedDocumentElements?: string[];
1780
+ /** If true, will use native text instead of OCR text on pages containing native text. */
1781
+ useNativeText?: boolean;
1756
1782
  }
1757
1783
  interface GoogleCloudDiscoveryengineV1EnableAdvancedSiteSearchMetadata {
1758
1784
  /** Operation create time. */
@@ -1869,12 +1895,6 @@ declare namespace gapi.client {
1869
1895
  /** Count of user events imported, but with Document information not found in the existing Branch. */
1870
1896
  unjoinedEventsCount?: string;
1871
1897
  }
1872
- interface GoogleCloudDiscoveryengineV1OcrParsingConfig {
1873
- /** Apply additional enhanced OCR processing to a list of document elements. Supported values: * `table`: advanced table parsing model. */
1874
- enhancedDocumentElements?: string[];
1875
- /** If true, will use native text instead of OCR text on pages containing native text. */
1876
- useNativeText?: boolean;
1877
- }
1878
1898
  interface GoogleCloudDiscoveryengineV1PurgeDocumentsMetadata {
1879
1899
  /** Operation create time. */
1880
1900
  createTime?: string;
@@ -4560,6 +4580,64 @@ declare namespace gapi.client {
4560
4580
  },
4561
4581
  body: GoogleCloudDiscoveryengineV1betaDataStore
4562
4582
  ): Request<GoogleCloudDiscoveryengineV1betaDataStore>;
4583
+ /** Trains a custom model. */
4584
+ trainCustomModel(request: {
4585
+ /** V1 error format. */
4586
+ '$.xgafv'?: string;
4587
+ /** OAuth access token. */
4588
+ access_token?: string;
4589
+ /** Data format for response. */
4590
+ alt?: string;
4591
+ /** JSONP */
4592
+ callback?: string;
4593
+ /** Required. The resource name of the Data Store, such as `projects/*‍/locations/global/collections/default_collection/dataStores/default_data_store`. This field is used to identify the data store where to train the models. */
4594
+ dataStore: string;
4595
+ /** Selector specifying which fields to include in a partial response. */
4596
+ fields?: string;
4597
+ /** 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. */
4598
+ key?: string;
4599
+ /** OAuth 2.0 token for the current user. */
4600
+ oauth_token?: string;
4601
+ /** Returns response with indentations and line breaks. */
4602
+ prettyPrint?: boolean;
4603
+ /** 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. */
4604
+ quotaUser?: string;
4605
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
4606
+ upload_protocol?: string;
4607
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
4608
+ uploadType?: string;
4609
+ /** Request body */
4610
+ resource: GoogleCloudDiscoveryengineV1betaTrainCustomModelRequest;
4611
+ }): Request<GoogleLongrunningOperation>;
4612
+ trainCustomModel(
4613
+ request: {
4614
+ /** V1 error format. */
4615
+ '$.xgafv'?: string;
4616
+ /** OAuth access token. */
4617
+ access_token?: string;
4618
+ /** Data format for response. */
4619
+ alt?: string;
4620
+ /** JSONP */
4621
+ callback?: string;
4622
+ /** Required. The resource name of the Data Store, such as `projects/*‍/locations/global/collections/default_collection/dataStores/default_data_store`. This field is used to identify the data store where to train the models. */
4623
+ dataStore: string;
4624
+ /** Selector specifying which fields to include in a partial response. */
4625
+ fields?: string;
4626
+ /** 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. */
4627
+ key?: string;
4628
+ /** OAuth 2.0 token for the current user. */
4629
+ oauth_token?: string;
4630
+ /** Returns response with indentations and line breaks. */
4631
+ prettyPrint?: boolean;
4632
+ /** 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. */
4633
+ quotaUser?: string;
4634
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
4635
+ upload_protocol?: string;
4636
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
4637
+ uploadType?: string;
4638
+ },
4639
+ body: GoogleCloudDiscoveryengineV1betaTrainCustomModelRequest
4640
+ ): Request<GoogleLongrunningOperation>;
4563
4641
  branches: BranchesResource;
4564
4642
  conversations: ConversationsResource;
4565
4643
  models: ModelsResource;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.discoveryengine-v1beta",
3
- "version": "0.0.20240307",
3
+ "version": "0.0.20240318",
4
4
  "description": "TypeScript typings for Discovery Engine API v1beta",
5
5
  "repository": {
6
6
  "type": "git",