@google-cloud/discoveryengine 2.5.3 → 2.7.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.
@@ -694,6 +694,10 @@ message SearchRequest {
694
694
 
695
695
  // Enables Search As You Type.
696
696
  ENABLED = 2;
697
+
698
+ // Automatic switching between search-as-you-type and standard search
699
+ // modes, ideal for single-API implementations (e.g., debouncing).
700
+ AUTO = 3;
697
701
  }
698
702
 
699
703
  // The condition under which search as you type should occur.
@@ -105,6 +105,8 @@ message SearchRequest {
105
105
  // Required. Full resource name of
106
106
  // [DataStore][google.cloud.discoveryengine.v1beta.DataStore], such as
107
107
  // `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.
108
+ // The path must include the project number, project id is not supported for
109
+ // this field.
108
110
  string data_store = 1 [
109
111
  (google.api.field_behavior) = REQUIRED,
110
112
  (google.api.resource_reference) = {
@@ -116,6 +118,11 @@ message SearchRequest {
116
118
  // specified by data_store field. For more information on filtering, see
117
119
  // [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
118
120
  string filter = 5 [(google.api.field_behavior) = OPTIONAL];
121
+
122
+ // Optional. Boost specification to boost certain documents.
123
+ // For more information on boosting, see
124
+ // [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
125
+ BoostSpec boost_spec = 6 [(google.api.field_behavior) = OPTIONAL];
119
126
  }
120
127
 
121
128
  // A facet specification to perform faceted search.
@@ -741,6 +748,10 @@ message SearchRequest {
741
748
 
742
749
  // Enables Search As You Type.
743
750
  ENABLED = 2;
751
+
752
+ // Automatic switching between search-as-you-type and standard search
753
+ // modes, ideal for single-API implementations (e.g., debouncing).
754
+ AUTO = 3;
744
755
  }
745
756
 
746
757
  // The condition under which search as you type should occur.
@@ -67026,7 +67026,8 @@ export namespace google {
67026
67026
  enum Condition {
67027
67027
  CONDITION_UNSPECIFIED = 0,
67028
67028
  DISABLED = 1,
67029
- ENABLED = 2
67029
+ ENABLED = 2,
67030
+ AUTO = 3
67030
67031
  }
67031
67032
  }
67032
67033
 
@@ -110782,6 +110783,9 @@ export namespace google {
110782
110783
 
110783
110784
  /** DataStoreSpec filter */
110784
110785
  filter?: (string|null);
110786
+
110787
+ /** DataStoreSpec boostSpec */
110788
+ boostSpec?: (google.cloud.discoveryengine.v1beta.SearchRequest.IBoostSpec|null);
110785
110789
  }
110786
110790
 
110787
110791
  /** Represents a DataStoreSpec. */
@@ -110799,6 +110803,9 @@ export namespace google {
110799
110803
  /** DataStoreSpec filter. */
110800
110804
  public filter: string;
110801
110805
 
110806
+ /** DataStoreSpec boostSpec. */
110807
+ public boostSpec?: (google.cloud.discoveryengine.v1beta.SearchRequest.IBoostSpec|null);
110808
+
110802
110809
  /**
110803
110810
  * Creates a new DataStoreSpec instance using the specified properties.
110804
110811
  * @param [properties] Properties to set
@@ -113025,7 +113032,8 @@ export namespace google {
113025
113032
  enum Condition {
113026
113033
  CONDITION_UNSPECIFIED = 0,
113027
113034
  DISABLED = 1,
113028
- ENABLED = 2
113035
+ ENABLED = 2,
113036
+ AUTO = 3
113029
113037
  }
113030
113038
  }
113031
113039
 
@@ -166439,6 +166439,7 @@
166439
166439
  case 0:
166440
166440
  case 1:
166441
166441
  case 2:
166442
+ case 3:
166442
166443
  break;
166443
166444
  }
166444
166445
  return null;
@@ -166475,6 +166476,10 @@
166475
166476
  case 2:
166476
166477
  message.condition = 2;
166477
166478
  break;
166479
+ case "AUTO":
166480
+ case 3:
166481
+ message.condition = 3;
166482
+ break;
166478
166483
  }
166479
166484
  return message;
166480
166485
  };
@@ -166532,12 +166537,14 @@
166532
166537
  * @property {number} CONDITION_UNSPECIFIED=0 CONDITION_UNSPECIFIED value
166533
166538
  * @property {number} DISABLED=1 DISABLED value
166534
166539
  * @property {number} ENABLED=2 ENABLED value
166540
+ * @property {number} AUTO=3 AUTO value
166535
166541
  */
166536
166542
  SearchAsYouTypeSpec.Condition = (function() {
166537
166543
  var valuesById = {}, values = Object.create(valuesById);
166538
166544
  values[valuesById[0] = "CONDITION_UNSPECIFIED"] = 0;
166539
166545
  values[valuesById[1] = "DISABLED"] = 1;
166540
166546
  values[valuesById[2] = "ENABLED"] = 2;
166547
+ values[valuesById[3] = "AUTO"] = 3;
166541
166548
  return values;
166542
166549
  })();
166543
166550
 
@@ -274124,6 +274131,7 @@
274124
274131
  * @interface IDataStoreSpec
274125
274132
  * @property {string|null} [dataStore] DataStoreSpec dataStore
274126
274133
  * @property {string|null} [filter] DataStoreSpec filter
274134
+ * @property {google.cloud.discoveryengine.v1beta.SearchRequest.IBoostSpec|null} [boostSpec] DataStoreSpec boostSpec
274127
274135
  */
274128
274136
 
274129
274137
  /**
@@ -274157,6 +274165,14 @@
274157
274165
  */
274158
274166
  DataStoreSpec.prototype.filter = "";
274159
274167
 
274168
+ /**
274169
+ * DataStoreSpec boostSpec.
274170
+ * @member {google.cloud.discoveryengine.v1beta.SearchRequest.IBoostSpec|null|undefined} boostSpec
274171
+ * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec
274172
+ * @instance
274173
+ */
274174
+ DataStoreSpec.prototype.boostSpec = null;
274175
+
274160
274176
  /**
274161
274177
  * Creates a new DataStoreSpec instance using the specified properties.
274162
274178
  * @function create
@@ -274185,6 +274201,8 @@
274185
274201
  writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataStore);
274186
274202
  if (message.filter != null && Object.hasOwnProperty.call(message, "filter"))
274187
274203
  writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter);
274204
+ if (message.boostSpec != null && Object.hasOwnProperty.call(message, "boostSpec"))
274205
+ $root.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.encode(message.boostSpec, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
274188
274206
  return writer;
274189
274207
  };
274190
274208
 
@@ -274229,6 +274247,10 @@
274229
274247
  message.filter = reader.string();
274230
274248
  break;
274231
274249
  }
274250
+ case 6: {
274251
+ message.boostSpec = $root.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.decode(reader, reader.uint32());
274252
+ break;
274253
+ }
274232
274254
  default:
274233
274255
  reader.skipType(tag & 7);
274234
274256
  break;
@@ -274270,6 +274292,11 @@
274270
274292
  if (message.filter != null && message.hasOwnProperty("filter"))
274271
274293
  if (!$util.isString(message.filter))
274272
274294
  return "filter: string expected";
274295
+ if (message.boostSpec != null && message.hasOwnProperty("boostSpec")) {
274296
+ var error = $root.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.verify(message.boostSpec);
274297
+ if (error)
274298
+ return "boostSpec." + error;
274299
+ }
274273
274300
  return null;
274274
274301
  };
274275
274302
 
@@ -274289,6 +274316,11 @@
274289
274316
  message.dataStore = String(object.dataStore);
274290
274317
  if (object.filter != null)
274291
274318
  message.filter = String(object.filter);
274319
+ if (object.boostSpec != null) {
274320
+ if (typeof object.boostSpec !== "object")
274321
+ throw TypeError(".google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.boostSpec: object expected");
274322
+ message.boostSpec = $root.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.fromObject(object.boostSpec);
274323
+ }
274292
274324
  return message;
274293
274325
  };
274294
274326
 
@@ -274308,11 +274340,14 @@
274308
274340
  if (options.defaults) {
274309
274341
  object.dataStore = "";
274310
274342
  object.filter = "";
274343
+ object.boostSpec = null;
274311
274344
  }
274312
274345
  if (message.dataStore != null && message.hasOwnProperty("dataStore"))
274313
274346
  object.dataStore = message.dataStore;
274314
274347
  if (message.filter != null && message.hasOwnProperty("filter"))
274315
274348
  object.filter = message.filter;
274349
+ if (message.boostSpec != null && message.hasOwnProperty("boostSpec"))
274350
+ object.boostSpec = $root.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.toObject(message.boostSpec, options);
274316
274351
  return object;
274317
274352
  };
274318
274353
 
@@ -279527,6 +279562,7 @@
279527
279562
  case 0:
279528
279563
  case 1:
279529
279564
  case 2:
279565
+ case 3:
279530
279566
  break;
279531
279567
  }
279532
279568
  return null;
@@ -279563,6 +279599,10 @@
279563
279599
  case 2:
279564
279600
  message.condition = 2;
279565
279601
  break;
279602
+ case "AUTO":
279603
+ case 3:
279604
+ message.condition = 3;
279605
+ break;
279566
279606
  }
279567
279607
  return message;
279568
279608
  };
@@ -279620,12 +279660,14 @@
279620
279660
  * @property {number} CONDITION_UNSPECIFIED=0 CONDITION_UNSPECIFIED value
279621
279661
  * @property {number} DISABLED=1 DISABLED value
279622
279662
  * @property {number} ENABLED=2 ENABLED value
279663
+ * @property {number} AUTO=3 AUTO value
279623
279664
  */
279624
279665
  SearchAsYouTypeSpec.Condition = (function() {
279625
279666
  var valuesById = {}, values = Object.create(valuesById);
279626
279667
  values[valuesById[0] = "CONDITION_UNSPECIFIED"] = 0;
279627
279668
  values[valuesById[1] = "DISABLED"] = 1;
279628
279669
  values[valuesById[2] = "ENABLED"] = 2;
279670
+ values[valuesById[3] = "AUTO"] = 3;
279629
279671
  return values;
279630
279672
  })();
279631
279673
 
@@ -16913,7 +16913,8 @@
16913
16913
  "values": {
16914
16914
  "CONDITION_UNSPECIFIED": 0,
16915
16915
  "DISABLED": 1,
16916
- "ENABLED": 2
16916
+ "ENABLED": 2,
16917
+ "AUTO": 3
16917
16918
  }
16918
16919
  }
16919
16920
  }
@@ -28418,6 +28419,13 @@
28418
28419
  "options": {
28419
28420
  "(google.api.field_behavior)": "OPTIONAL"
28420
28421
  }
28422
+ },
28423
+ "boostSpec": {
28424
+ "type": "BoostSpec",
28425
+ "id": 6,
28426
+ "options": {
28427
+ "(google.api.field_behavior)": "OPTIONAL"
28428
+ }
28421
28429
  }
28422
28430
  }
28423
28431
  },
@@ -28815,7 +28823,8 @@
28815
28823
  "values": {
28816
28824
  "CONDITION_UNSPECIFIED": 0,
28817
28825
  "DISABLED": 1,
28818
- "ENABLED": 2
28826
+ "ENABLED": 2,
28827
+ "AUTO": 3
28819
28828
  }
28820
28829
  }
28821
28830
  }
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- // Copyright 2025 Google LLC
2
+ // Copyright 2026 Google LLC
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License");
5
5
  // you may not use this file except in compliance with the License.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@google-cloud/discoveryengine",
3
- "version": "2.5.3",
3
+ "version": "2.7.0",
4
4
  "description": "Discovery Engine API client for Node.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -62,10 +62,18 @@
62
62
  "long": "^5.3.1",
63
63
  "mocha": "^11.1.0",
64
64
  "pack-n-play": "^3.0.0",
65
- "sinon": "^21.0.0",
65
+ "sinon": "21.0.3",
66
66
  "typescript": "^5.8.2"
67
67
  },
68
68
  "engines": {
69
69
  "node": ">=18"
70
+ },
71
+ "overrides": {
72
+ "@sinonjs/fake-timers": "15.2.1"
73
+ },
74
+ "pnpm": {
75
+ "overrides": {
76
+ "@sinonjs/fake-timers": "15.2.1"
77
+ }
70
78
  }
71
79
  }