@google-cloud/discoveryengine 0.4.1 → 0.6.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 +14 -0
  2. package/README.md +8 -0
  3. package/build/protos/google/cloud/discoveryengine/v1beta/common.proto +43 -10
  4. package/build/protos/google/cloud/discoveryengine/v1beta/completion_service.proto +116 -0
  5. package/build/protos/google/cloud/discoveryengine/v1beta/document.proto +45 -3
  6. package/build/protos/google/cloud/discoveryengine/v1beta/document_service.proto +46 -12
  7. package/build/protos/google/cloud/discoveryengine/v1beta/import_config.proto +26 -8
  8. package/build/protos/google/cloud/discoveryengine/v1beta/purge_config.proto +86 -0
  9. package/build/protos/google/cloud/discoveryengine/v1beta/recommendation_service.proto +15 -14
  10. package/build/protos/google/cloud/discoveryengine/v1beta/schema.proto +58 -0
  11. package/build/protos/google/cloud/discoveryengine/v1beta/schema_service.proto +259 -0
  12. package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +546 -0
  13. package/build/protos/google/cloud/discoveryengine/v1beta/user_event.proto +31 -25
  14. package/build/protos/protos.d.ts +5965 -1866
  15. package/build/protos/protos.js +39781 -1
  16. package/build/protos/protos.json +3963 -1
  17. package/build/src/index.d.ts +10 -1
  18. package/build/src/index.js +10 -1
  19. package/build/src/v1beta/completion_service_client.d.ts +455 -0
  20. package/build/src/v1beta/completion_service_client.js +659 -0
  21. package/build/src/v1beta/completion_service_client_config.json +43 -0
  22. package/build/src/v1beta/document_service_client.d.ts +174 -18
  23. package/build/src/v1beta/document_service_client.js +177 -6
  24. package/build/src/v1beta/document_service_client_config.json +5 -0
  25. package/build/src/v1beta/index.d.ts +3 -0
  26. package/build/src/v1beta/index.js +7 -1
  27. package/build/src/v1beta/recommendation_service_client.d.ts +108 -14
  28. package/build/src/v1beta/recommendation_service_client.js +128 -0
  29. package/build/src/v1beta/schema_service_client.d.ts +798 -0
  30. package/build/src/v1beta/schema_service_client.js +1122 -0
  31. package/build/src/v1beta/schema_service_client_config.json +63 -0
  32. package/build/src/v1beta/search_service_client.d.ts +851 -0
  33. package/build/src/v1beta/search_service_client.js +1070 -0
  34. package/build/src/v1beta/search_service_client_config.json +43 -0
  35. package/build/src/v1beta/user_event_service_client.d.ts +93 -0
  36. package/build/src/v1beta/user_event_service_client.js +128 -0
  37. package/package.json +8 -6
@@ -17,11 +17,17 @@
17
17
  // ** https://github.com/googleapis/gapic-generator-typescript **
18
18
  // ** All changes to this file may be overwritten. **
19
19
  Object.defineProperty(exports, "__esModule", { value: true });
20
- exports.UserEventServiceClient = exports.RecommendationServiceClient = exports.DocumentServiceClient = void 0;
20
+ exports.UserEventServiceClient = exports.SearchServiceClient = exports.SchemaServiceClient = exports.RecommendationServiceClient = exports.DocumentServiceClient = exports.CompletionServiceClient = void 0;
21
+ var completion_service_client_1 = require("./completion_service_client");
22
+ Object.defineProperty(exports, "CompletionServiceClient", { enumerable: true, get: function () { return completion_service_client_1.CompletionServiceClient; } });
21
23
  var document_service_client_1 = require("./document_service_client");
22
24
  Object.defineProperty(exports, "DocumentServiceClient", { enumerable: true, get: function () { return document_service_client_1.DocumentServiceClient; } });
23
25
  var recommendation_service_client_1 = require("./recommendation_service_client");
24
26
  Object.defineProperty(exports, "RecommendationServiceClient", { enumerable: true, get: function () { return recommendation_service_client_1.RecommendationServiceClient; } });
27
+ var schema_service_client_1 = require("./schema_service_client");
28
+ Object.defineProperty(exports, "SchemaServiceClient", { enumerable: true, get: function () { return schema_service_client_1.SchemaServiceClient; } });
29
+ var search_service_client_1 = require("./search_service_client");
30
+ Object.defineProperty(exports, "SearchServiceClient", { enumerable: true, get: function () { return search_service_client_1.SearchServiceClient; } });
25
31
  var user_event_service_client_1 = require("./user_event_service_client");
26
32
  Object.defineProperty(exports, "UserEventServiceClient", { enumerable: true, get: function () { return user_event_service_client_1.UserEventServiceClient; } });
27
33
  //# sourceMappingURL=index.js.map
@@ -112,7 +112,7 @@ export declare class RecommendationServiceClient {
112
112
  * The request object that will be sent.
113
113
  * @param {string} request.servingConfig
114
114
  * Required. Full resource name of the format:
115
- * projects/* /locations/global/collections/* /dataStores/* /servingConfigs/*
115
+ * `projects/* /locations/global/collections/* /dataStores/* /servingConfigs/*`
116
116
  *
117
117
  * Before you can request recommendations from your model, you must create at
118
118
  * least one serving config for it.
@@ -146,8 +146,8 @@ export declare class RecommendationServiceClient {
146
146
  *
147
147
  * Examples:
148
148
  *
149
- * * (filter_tags: ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold"))
150
- * * (filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: ANY("Green"))
149
+ * * `(filter_tags: ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold"))`
150
+ * * `(filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: ANY("Green"))`
151
151
  *
152
152
  * If your filter blocks all results, the API will return generic
153
153
  * (unfiltered) popular Documents. If you only want results strictly matching
@@ -155,8 +155,9 @@ export declare class RecommendationServiceClient {
155
155
  * {@link google.cloud.discoveryengine.v1beta.RecommendRequest.params|RecommendRequest.params}
156
156
  * to receive empty results instead.
157
157
  *
158
- * Note that the API will never return Documents with storageStatus of
159
- * "EXPIRED" or "DELETED" regardless of filter choices.
158
+ * Note that the API will never return
159
+ * {@link google.cloud.discoveryengine.v1beta.Document|Document}s with
160
+ * `storageStatus` of `EXPIRED` or `DELETED` regardless of filter choices.
160
161
  * @param {boolean} request.validateOnly
161
162
  * Use validate only mode for this recommendation query. If set to true, a
162
163
  * fake model will be used that returns arbitrary Document IDs.
@@ -169,22 +170,22 @@ export declare class RecommendationServiceClient {
169
170
  *
170
171
  * * `returnDocument`: Boolean. If set to true, the associated Document
171
172
  * object will be returned in
172
- * {@link RecommendationResult.document|RecommendResponse.results.document}.
173
+ * {@link google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.document|RecommendResponse.RecommendationResult.document}.
173
174
  * * `returnScore`: Boolean. If set to true, the recommendation 'score'
174
175
  * corresponding to each returned Document will be set in
175
- * {@link RecommendationResult.metadata|RecommendResponse.results.metadata}. The
176
- * given 'score' indicates the probability of a Document conversion given
177
- * the user's context and history.
176
+ * {@link google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.metadata|RecommendResponse.RecommendationResult.metadata}.
177
+ * The given 'score' indicates the probability of a Document conversion
178
+ * given the user's context and history.
178
179
  * * `strictFiltering`: Boolean. True by default. If set to false, the service
179
180
  * will return generic (unfiltered) popular Documents instead of empty if
180
181
  * your filter blocks all recommendation results.
181
182
  * * `diversityLevel`: String. Default empty. If set to be non-empty, then
182
183
  * it needs to be one of:
183
- * * 'no-diversity'
184
- * * 'low-diversity'
185
- * * 'medium-diversity'
186
- * * 'high-diversity'
187
- * * 'auto-diversity'
184
+ * * `no-diversity`
185
+ * * `low-diversity`
186
+ * * `medium-diversity`
187
+ * * `high-diversity`
188
+ * * `auto-diversity`
188
189
  * This gives request-level control and adjusts recommendation results
189
190
  * based on Document category.
190
191
  * @param {number[]} request.userLabels
@@ -282,6 +283,57 @@ export declare class RecommendationServiceClient {
282
283
  * @returns {string} A string representing the document.
283
284
  */
284
285
  matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName: string): string | number;
286
+ /**
287
+ * Return a fully-qualified projectLocationCollectionDataStoreSchema resource name string.
288
+ *
289
+ * @param {string} project
290
+ * @param {string} location
291
+ * @param {string} collection
292
+ * @param {string} data_store
293
+ * @param {string} schema
294
+ * @returns {string} Resource name string.
295
+ */
296
+ projectLocationCollectionDataStoreSchemaPath(project: string, location: string, collection: string, dataStore: string, schema: string): string;
297
+ /**
298
+ * Parse the project from ProjectLocationCollectionDataStoreSchema resource.
299
+ *
300
+ * @param {string} projectLocationCollectionDataStoreSchemaName
301
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
302
+ * @returns {string} A string representing the project.
303
+ */
304
+ matchProjectFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName: string): string | number;
305
+ /**
306
+ * Parse the location from ProjectLocationCollectionDataStoreSchema resource.
307
+ *
308
+ * @param {string} projectLocationCollectionDataStoreSchemaName
309
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
310
+ * @returns {string} A string representing the location.
311
+ */
312
+ matchLocationFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName: string): string | number;
313
+ /**
314
+ * Parse the collection from ProjectLocationCollectionDataStoreSchema resource.
315
+ *
316
+ * @param {string} projectLocationCollectionDataStoreSchemaName
317
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
318
+ * @returns {string} A string representing the collection.
319
+ */
320
+ matchCollectionFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName: string): string | number;
321
+ /**
322
+ * Parse the data_store from ProjectLocationCollectionDataStoreSchema resource.
323
+ *
324
+ * @param {string} projectLocationCollectionDataStoreSchemaName
325
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
326
+ * @returns {string} A string representing the data_store.
327
+ */
328
+ matchDataStoreFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName: string): string | number;
329
+ /**
330
+ * Parse the schema from ProjectLocationCollectionDataStoreSchema resource.
331
+ *
332
+ * @param {string} projectLocationCollectionDataStoreSchemaName
333
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
334
+ * @returns {string} A string representing the schema.
335
+ */
336
+ matchSchemaFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName: string): string | number;
285
337
  /**
286
338
  * Return a fully-qualified projectLocationCollectionDataStoreServingConfig resource name string.
287
339
  *
@@ -384,6 +436,48 @@ export declare class RecommendationServiceClient {
384
436
  * @returns {string} A string representing the document.
385
437
  */
386
438
  matchDocumentFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName: string): string | number;
439
+ /**
440
+ * Return a fully-qualified projectLocationDataStoreSchema resource name string.
441
+ *
442
+ * @param {string} project
443
+ * @param {string} location
444
+ * @param {string} data_store
445
+ * @param {string} schema
446
+ * @returns {string} Resource name string.
447
+ */
448
+ projectLocationDataStoreSchemaPath(project: string, location: string, dataStore: string, schema: string): string;
449
+ /**
450
+ * Parse the project from ProjectLocationDataStoreSchema resource.
451
+ *
452
+ * @param {string} projectLocationDataStoreSchemaName
453
+ * A fully-qualified path representing project_location_data_store_schema resource.
454
+ * @returns {string} A string representing the project.
455
+ */
456
+ matchProjectFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName: string): string | number;
457
+ /**
458
+ * Parse the location from ProjectLocationDataStoreSchema resource.
459
+ *
460
+ * @param {string} projectLocationDataStoreSchemaName
461
+ * A fully-qualified path representing project_location_data_store_schema resource.
462
+ * @returns {string} A string representing the location.
463
+ */
464
+ matchLocationFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName: string): string | number;
465
+ /**
466
+ * Parse the data_store from ProjectLocationDataStoreSchema resource.
467
+ *
468
+ * @param {string} projectLocationDataStoreSchemaName
469
+ * A fully-qualified path representing project_location_data_store_schema resource.
470
+ * @returns {string} A string representing the data_store.
471
+ */
472
+ matchDataStoreFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName: string): string | number;
473
+ /**
474
+ * Parse the schema from ProjectLocationDataStoreSchema resource.
475
+ *
476
+ * @param {string} projectLocationDataStoreSchemaName
477
+ * A fully-qualified path representing project_location_data_store_schema resource.
478
+ * @returns {string} A string representing the schema.
479
+ */
480
+ matchSchemaFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName: string): string | number;
387
481
  /**
388
482
  * Return a fully-qualified projectLocationDataStoreServingConfig resource name string.
389
483
  *
@@ -140,8 +140,10 @@ class RecommendationServiceClient {
140
140
  // Create useful helper objects for these.
141
141
  this.pathTemplates = {
142
142
  projectLocationCollectionDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
143
+ projectLocationCollectionDataStoreSchemaPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}'),
143
144
  projectLocationCollectionDataStoreServingConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}'),
144
145
  projectLocationDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
146
+ projectLocationDataStoreSchemaPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}'),
145
147
  projectLocationDataStoreServingConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}'),
146
148
  };
147
149
  // Put together the default options sent with requests.
@@ -341,6 +343,75 @@ class RecommendationServiceClient {
341
343
  matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
342
344
  return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).document;
343
345
  }
346
+ /**
347
+ * Return a fully-qualified projectLocationCollectionDataStoreSchema resource name string.
348
+ *
349
+ * @param {string} project
350
+ * @param {string} location
351
+ * @param {string} collection
352
+ * @param {string} data_store
353
+ * @param {string} schema
354
+ * @returns {string} Resource name string.
355
+ */
356
+ projectLocationCollectionDataStoreSchemaPath(project, location, collection, dataStore, schema) {
357
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render({
358
+ project: project,
359
+ location: location,
360
+ collection: collection,
361
+ data_store: dataStore,
362
+ schema: schema,
363
+ });
364
+ }
365
+ /**
366
+ * Parse the project from ProjectLocationCollectionDataStoreSchema resource.
367
+ *
368
+ * @param {string} projectLocationCollectionDataStoreSchemaName
369
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
370
+ * @returns {string} A string representing the project.
371
+ */
372
+ matchProjectFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
373
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).project;
374
+ }
375
+ /**
376
+ * Parse the location from ProjectLocationCollectionDataStoreSchema resource.
377
+ *
378
+ * @param {string} projectLocationCollectionDataStoreSchemaName
379
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
380
+ * @returns {string} A string representing the location.
381
+ */
382
+ matchLocationFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
383
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).location;
384
+ }
385
+ /**
386
+ * Parse the collection from ProjectLocationCollectionDataStoreSchema resource.
387
+ *
388
+ * @param {string} projectLocationCollectionDataStoreSchemaName
389
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
390
+ * @returns {string} A string representing the collection.
391
+ */
392
+ matchCollectionFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
393
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).collection;
394
+ }
395
+ /**
396
+ * Parse the data_store from ProjectLocationCollectionDataStoreSchema resource.
397
+ *
398
+ * @param {string} projectLocationCollectionDataStoreSchemaName
399
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
400
+ * @returns {string} A string representing the data_store.
401
+ */
402
+ matchDataStoreFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
403
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).data_store;
404
+ }
405
+ /**
406
+ * Parse the schema from ProjectLocationCollectionDataStoreSchema resource.
407
+ *
408
+ * @param {string} projectLocationCollectionDataStoreSchemaName
409
+ * A fully-qualified path representing project_location_collection_data_store_schema resource.
410
+ * @returns {string} A string representing the schema.
411
+ */
412
+ matchSchemaFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
413
+ return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).schema;
414
+ }
344
415
  /**
345
416
  * Return a fully-qualified projectLocationCollectionDataStoreServingConfig resource name string.
346
417
  *
@@ -479,6 +550,63 @@ class RecommendationServiceClient {
479
550
  matchDocumentFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
480
551
  return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).document;
481
552
  }
553
+ /**
554
+ * Return a fully-qualified projectLocationDataStoreSchema resource name string.
555
+ *
556
+ * @param {string} project
557
+ * @param {string} location
558
+ * @param {string} data_store
559
+ * @param {string} schema
560
+ * @returns {string} Resource name string.
561
+ */
562
+ projectLocationDataStoreSchemaPath(project, location, dataStore, schema) {
563
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render({
564
+ project: project,
565
+ location: location,
566
+ data_store: dataStore,
567
+ schema: schema,
568
+ });
569
+ }
570
+ /**
571
+ * Parse the project from ProjectLocationDataStoreSchema resource.
572
+ *
573
+ * @param {string} projectLocationDataStoreSchemaName
574
+ * A fully-qualified path representing project_location_data_store_schema resource.
575
+ * @returns {string} A string representing the project.
576
+ */
577
+ matchProjectFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
578
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).project;
579
+ }
580
+ /**
581
+ * Parse the location from ProjectLocationDataStoreSchema resource.
582
+ *
583
+ * @param {string} projectLocationDataStoreSchemaName
584
+ * A fully-qualified path representing project_location_data_store_schema resource.
585
+ * @returns {string} A string representing the location.
586
+ */
587
+ matchLocationFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
588
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).location;
589
+ }
590
+ /**
591
+ * Parse the data_store from ProjectLocationDataStoreSchema resource.
592
+ *
593
+ * @param {string} projectLocationDataStoreSchemaName
594
+ * A fully-qualified path representing project_location_data_store_schema resource.
595
+ * @returns {string} A string representing the data_store.
596
+ */
597
+ matchDataStoreFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
598
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).data_store;
599
+ }
600
+ /**
601
+ * Parse the schema from ProjectLocationDataStoreSchema resource.
602
+ *
603
+ * @param {string} projectLocationDataStoreSchemaName
604
+ * A fully-qualified path representing project_location_data_store_schema resource.
605
+ * @returns {string} A string representing the schema.
606
+ */
607
+ matchSchemaFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
608
+ return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).schema;
609
+ }
482
610
  /**
483
611
  * Return a fully-qualified projectLocationDataStoreServingConfig resource name string.
484
612
  *