@google-cloud/discoveryengine 1.2.0 → 1.3.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.
Files changed (37) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +13 -0
  3. package/build/protos/google/cloud/discoveryengine/v1alpha/common.proto +39 -4
  4. package/build/protos/google/cloud/discoveryengine/v1alpha/data_store.proto +98 -0
  5. package/build/protos/google/cloud/discoveryengine/v1alpha/data_store_service.proto +307 -0
  6. package/build/protos/google/cloud/discoveryengine/v1alpha/engine.proto +370 -0
  7. package/build/protos/google/cloud/discoveryengine/v1alpha/engine_service.proto +336 -0
  8. package/build/protos/google/cloud/discoveryengine/v1alpha/recommendation_service.proto +9 -3
  9. package/build/protos/google/cloud/discoveryengine/v1alpha/search_service.proto +26 -3
  10. package/build/protos/protos.d.ts +5578 -1800
  11. package/build/protos/protos.js +14034 -5272
  12. package/build/protos/protos.json +1337 -340
  13. package/build/src/v1alpha/completion_service_client.d.ts +42 -0
  14. package/build/src/v1alpha/completion_service_client.js +58 -0
  15. package/build/src/v1alpha/conversational_search_service_client.d.ts +42 -0
  16. package/build/src/v1alpha/conversational_search_service_client.js +58 -0
  17. package/build/src/v1alpha/data_store_service_client.d.ts +1060 -0
  18. package/build/src/v1alpha/data_store_service_client.js +1431 -0
  19. package/build/src/v1alpha/data_store_service_client_config.json +46 -0
  20. package/build/src/v1alpha/document_service_client.d.ts +117 -0
  21. package/build/src/v1alpha/document_service_client.js +162 -0
  22. package/build/src/v1alpha/engine_service_client.d.ts +1079 -0
  23. package/build/src/v1alpha/engine_service_client.js +1481 -0
  24. package/build/src/v1alpha/engine_service_client_config.json +58 -0
  25. package/build/src/v1alpha/index.d.ts +2 -0
  26. package/build/src/v1alpha/index.js +5 -1
  27. package/build/src/v1alpha/recommendation_service_client.d.ts +126 -3
  28. package/build/src/v1alpha/recommendation_service_client.js +162 -0
  29. package/build/src/v1alpha/schema_service_client.d.ts +42 -0
  30. package/build/src/v1alpha/schema_service_client.js +58 -0
  31. package/build/src/v1alpha/search_service_client.d.ts +195 -9
  32. package/build/src/v1alpha/search_service_client.js +214 -6
  33. package/build/src/v1alpha/site_search_engine_service_client.d.ts +117 -0
  34. package/build/src/v1alpha/site_search_engine_service_client.js +162 -0
  35. package/build/src/v1alpha/user_event_service_client.d.ts +42 -0
  36. package/build/src/v1alpha/user_event_service_client.js +58 -0
  37. package/package.json +3 -3
@@ -221,6 +221,48 @@ export declare class CompletionServiceClient {
221
221
  * ```
222
222
  */
223
223
  listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;
224
+ /**
225
+ * Return a fully-qualified engine resource name string.
226
+ *
227
+ * @param {string} project
228
+ * @param {string} location
229
+ * @param {string} collection
230
+ * @param {string} engine
231
+ * @returns {string} Resource name string.
232
+ */
233
+ enginePath(project: string, location: string, collection: string, engine: string): string;
234
+ /**
235
+ * Parse the project from Engine resource.
236
+ *
237
+ * @param {string} engineName
238
+ * A fully-qualified path representing Engine resource.
239
+ * @returns {string} A string representing the project.
240
+ */
241
+ matchProjectFromEngineName(engineName: string): string | number;
242
+ /**
243
+ * Parse the location from Engine resource.
244
+ *
245
+ * @param {string} engineName
246
+ * A fully-qualified path representing Engine resource.
247
+ * @returns {string} A string representing the location.
248
+ */
249
+ matchLocationFromEngineName(engineName: string): string | number;
250
+ /**
251
+ * Parse the collection from Engine resource.
252
+ *
253
+ * @param {string} engineName
254
+ * A fully-qualified path representing Engine resource.
255
+ * @returns {string} A string representing the collection.
256
+ */
257
+ matchCollectionFromEngineName(engineName: string): string | number;
258
+ /**
259
+ * Parse the engine from Engine resource.
260
+ *
261
+ * @param {string} engineName
262
+ * A fully-qualified path representing Engine resource.
263
+ * @returns {string} A string representing the engine.
264
+ */
265
+ matchEngineFromEngineName(engineName: string): string | number;
224
266
  /**
225
267
  * Return a fully-qualified projectLocationCollectionDataStore resource name string.
226
268
  *
@@ -138,6 +138,7 @@ class CompletionServiceClient {
138
138
  // identifiers to uniquely identify resources within the API.
139
139
  // Create useful helper objects for these.
140
140
  this.pathTemplates = {
141
+ enginePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/engines/{engine}'),
141
142
  projectLocationCollectionDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}'),
142
143
  projectLocationCollectionDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
143
144
  projectLocationCollectionDataStoreConversationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/conversations/{conversation}'),
@@ -318,6 +319,63 @@ class CompletionServiceClient {
318
319
  // --------------------
319
320
  // -- Path templates --
320
321
  // --------------------
322
+ /**
323
+ * Return a fully-qualified engine resource name string.
324
+ *
325
+ * @param {string} project
326
+ * @param {string} location
327
+ * @param {string} collection
328
+ * @param {string} engine
329
+ * @returns {string} Resource name string.
330
+ */
331
+ enginePath(project, location, collection, engine) {
332
+ return this.pathTemplates.enginePathTemplate.render({
333
+ project: project,
334
+ location: location,
335
+ collection: collection,
336
+ engine: engine,
337
+ });
338
+ }
339
+ /**
340
+ * Parse the project from Engine resource.
341
+ *
342
+ * @param {string} engineName
343
+ * A fully-qualified path representing Engine resource.
344
+ * @returns {string} A string representing the project.
345
+ */
346
+ matchProjectFromEngineName(engineName) {
347
+ return this.pathTemplates.enginePathTemplate.match(engineName).project;
348
+ }
349
+ /**
350
+ * Parse the location from Engine resource.
351
+ *
352
+ * @param {string} engineName
353
+ * A fully-qualified path representing Engine resource.
354
+ * @returns {string} A string representing the location.
355
+ */
356
+ matchLocationFromEngineName(engineName) {
357
+ return this.pathTemplates.enginePathTemplate.match(engineName).location;
358
+ }
359
+ /**
360
+ * Parse the collection from Engine resource.
361
+ *
362
+ * @param {string} engineName
363
+ * A fully-qualified path representing Engine resource.
364
+ * @returns {string} A string representing the collection.
365
+ */
366
+ matchCollectionFromEngineName(engineName) {
367
+ return this.pathTemplates.enginePathTemplate.match(engineName).collection;
368
+ }
369
+ /**
370
+ * Parse the engine from Engine resource.
371
+ *
372
+ * @param {string} engineName
373
+ * A fully-qualified path representing Engine resource.
374
+ * @returns {string} A string representing the engine.
375
+ */
376
+ matchEngineFromEngineName(engineName) {
377
+ return this.pathTemplates.enginePathTemplate.match(engineName).engine;
378
+ }
321
379
  /**
322
380
  * Return a fully-qualified projectLocationCollectionDataStore resource name string.
323
381
  *
@@ -472,6 +472,48 @@ export declare class ConversationalSearchServiceClient {
472
472
  * ```
473
473
  */
474
474
  listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;
475
+ /**
476
+ * Return a fully-qualified engine resource name string.
477
+ *
478
+ * @param {string} project
479
+ * @param {string} location
480
+ * @param {string} collection
481
+ * @param {string} engine
482
+ * @returns {string} Resource name string.
483
+ */
484
+ enginePath(project: string, location: string, collection: string, engine: string): string;
485
+ /**
486
+ * Parse the project from Engine resource.
487
+ *
488
+ * @param {string} engineName
489
+ * A fully-qualified path representing Engine resource.
490
+ * @returns {string} A string representing the project.
491
+ */
492
+ matchProjectFromEngineName(engineName: string): string | number;
493
+ /**
494
+ * Parse the location from Engine resource.
495
+ *
496
+ * @param {string} engineName
497
+ * A fully-qualified path representing Engine resource.
498
+ * @returns {string} A string representing the location.
499
+ */
500
+ matchLocationFromEngineName(engineName: string): string | number;
501
+ /**
502
+ * Parse the collection from Engine resource.
503
+ *
504
+ * @param {string} engineName
505
+ * A fully-qualified path representing Engine resource.
506
+ * @returns {string} A string representing the collection.
507
+ */
508
+ matchCollectionFromEngineName(engineName: string): string | number;
509
+ /**
510
+ * Parse the engine from Engine resource.
511
+ *
512
+ * @param {string} engineName
513
+ * A fully-qualified path representing Engine resource.
514
+ * @returns {string} A string representing the engine.
515
+ */
516
+ matchEngineFromEngineName(engineName: string): string | number;
475
517
  /**
476
518
  * Return a fully-qualified projectLocationCollectionDataStore resource name string.
477
519
  *
@@ -139,6 +139,7 @@ class ConversationalSearchServiceClient {
139
139
  // identifiers to uniquely identify resources within the API.
140
140
  // Create useful helper objects for these.
141
141
  this.pathTemplates = {
142
+ enginePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/engines/{engine}'),
142
143
  projectLocationCollectionDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}'),
143
144
  projectLocationCollectionDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
144
145
  projectLocationCollectionDataStoreConversationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/conversations/{conversation}'),
@@ -555,6 +556,63 @@ class ConversationalSearchServiceClient {
555
556
  // --------------------
556
557
  // -- Path templates --
557
558
  // --------------------
559
+ /**
560
+ * Return a fully-qualified engine resource name string.
561
+ *
562
+ * @param {string} project
563
+ * @param {string} location
564
+ * @param {string} collection
565
+ * @param {string} engine
566
+ * @returns {string} Resource name string.
567
+ */
568
+ enginePath(project, location, collection, engine) {
569
+ return this.pathTemplates.enginePathTemplate.render({
570
+ project: project,
571
+ location: location,
572
+ collection: collection,
573
+ engine: engine,
574
+ });
575
+ }
576
+ /**
577
+ * Parse the project from Engine resource.
578
+ *
579
+ * @param {string} engineName
580
+ * A fully-qualified path representing Engine resource.
581
+ * @returns {string} A string representing the project.
582
+ */
583
+ matchProjectFromEngineName(engineName) {
584
+ return this.pathTemplates.enginePathTemplate.match(engineName).project;
585
+ }
586
+ /**
587
+ * Parse the location from Engine resource.
588
+ *
589
+ * @param {string} engineName
590
+ * A fully-qualified path representing Engine resource.
591
+ * @returns {string} A string representing the location.
592
+ */
593
+ matchLocationFromEngineName(engineName) {
594
+ return this.pathTemplates.enginePathTemplate.match(engineName).location;
595
+ }
596
+ /**
597
+ * Parse the collection from Engine resource.
598
+ *
599
+ * @param {string} engineName
600
+ * A fully-qualified path representing Engine resource.
601
+ * @returns {string} A string representing the collection.
602
+ */
603
+ matchCollectionFromEngineName(engineName) {
604
+ return this.pathTemplates.enginePathTemplate.match(engineName).collection;
605
+ }
606
+ /**
607
+ * Parse the engine from Engine resource.
608
+ *
609
+ * @param {string} engineName
610
+ * A fully-qualified path representing Engine resource.
611
+ * @returns {string} A string representing the engine.
612
+ */
613
+ matchEngineFromEngineName(engineName) {
614
+ return this.pathTemplates.enginePathTemplate.match(engineName).engine;
615
+ }
558
616
  /**
559
617
  * Return a fully-qualified projectLocationCollectionDataStore resource name string.
560
618
  *