@google-cloud/discoveryengine 2.2.0 → 2.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.
- package/README.md +13 -0
- package/build/protos/google/cloud/discoveryengine/v1/answer.proto +17 -0
- package/build/protos/google/cloud/discoveryengine/v1/chunk.proto +52 -0
- package/build/protos/google/cloud/discoveryengine/v1/cmek_config_service.proto +300 -0
- package/build/protos/google/cloud/discoveryengine/v1/common.proto +67 -0
- package/build/protos/google/cloud/discoveryengine/v1/control.proto +1 -3
- package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +3 -0
- package/build/protos/google/cloud/discoveryengine/v1/data_store.proto +54 -2
- package/build/protos/google/cloud/discoveryengine/v1/data_store_service.proto +14 -0
- package/build/protos/google/cloud/discoveryengine/v1/document.proto +95 -4
- package/build/protos/google/cloud/discoveryengine/v1/document_processing_config.proto +28 -1
- package/build/protos/google/cloud/discoveryengine/v1/engine.proto +131 -6
- package/build/protos/google/cloud/discoveryengine/v1/grounded_generation_service.proto +8 -0
- package/build/protos/google/cloud/discoveryengine/v1/grounding.proto +9 -0
- package/build/protos/google/cloud/discoveryengine/v1/identity_mapping_store.proto +84 -0
- package/build/protos/google/cloud/discoveryengine/v1/identity_mapping_store_service.proto +375 -0
- package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +6 -0
- package/build/protos/google/cloud/discoveryengine/v1/site_search_engine.proto +6 -0
- package/build/protos/google/cloud/discoveryengine/v1/user_license.proto +98 -0
- package/build/protos/google/cloud/discoveryengine/v1/user_license_service.proto +191 -0
- package/build/protos/protos.d.ts +5387 -265
- package/build/protos/protos.js +77991 -63105
- package/build/protos/protos.json +1512 -91
- package/build/src/index.d.ts +10 -1
- package/build/src/index.js +8 -2
- package/build/src/v1/cmek_config_service_client.d.ts +2287 -0
- package/build/src/v1/cmek_config_service_client.js +3274 -0
- package/build/src/v1/cmek_config_service_client_config.json +42 -0
- package/build/src/v1/cmek_config_service_proto_list.json +44 -0
- package/build/src/v1/completion_service_client.d.ts +90 -0
- package/build/src/v1/completion_service_client.js +134 -2
- package/build/src/v1/completion_service_proto_list.json +6 -1
- package/build/src/v1/control_service_client.d.ts +90 -0
- package/build/src/v1/control_service_client.js +150 -0
- package/build/src/v1/control_service_proto_list.json +6 -1
- package/build/src/v1/conversational_search_service_client.d.ts +90 -0
- package/build/src/v1/conversational_search_service_client.js +192 -0
- package/build/src/v1/conversational_search_service_proto_list.json +6 -1
- package/build/src/v1/data_store_service_client.d.ts +96 -0
- package/build/src/v1/data_store_service_client.js +140 -2
- package/build/src/v1/data_store_service_proto_list.json +6 -1
- package/build/src/v1/document_service_client.d.ts +90 -0
- package/build/src/v1/document_service_client.js +158 -2
- package/build/src/v1/document_service_proto_list.json +6 -1
- package/build/src/v1/engine_service_client.d.ts +90 -0
- package/build/src/v1/engine_service_client.js +140 -2
- package/build/src/v1/engine_service_proto_list.json +6 -1
- package/build/src/v1/gapic_metadata.json +184 -0
- package/build/src/v1/grounded_generation_service_client.d.ts +90 -0
- package/build/src/v1/grounded_generation_service_client.js +138 -0
- package/build/src/v1/grounded_generation_service_proto_list.json +6 -1
- package/build/src/v1/identity_mapping_store_service_client.d.ts +2470 -0
- package/build/src/v1/identity_mapping_store_service_client.js +3449 -0
- package/build/src/v1/identity_mapping_store_service_client_config.json +54 -0
- package/build/src/v1/identity_mapping_store_service_proto_list.json +44 -0
- package/build/src/v1/index.d.ts +3 -0
- package/build/src/v1/index.js +7 -1
- package/build/src/v1/project_service_client.d.ts +90 -0
- package/build/src/v1/project_service_client.js +128 -2
- package/build/src/v1/project_service_proto_list.json +6 -1
- package/build/src/v1/rank_service_client.d.ts +90 -0
- package/build/src/v1/rank_service_client.js +132 -0
- package/build/src/v1/rank_service_proto_list.json +6 -1
- package/build/src/v1/recommendation_service_client.d.ts +90 -0
- package/build/src/v1/recommendation_service_client.js +132 -0
- package/build/src/v1/recommendation_service_proto_list.json +6 -1
- package/build/src/v1/schema_service_client.d.ts +90 -0
- package/build/src/v1/schema_service_client.js +134 -2
- package/build/src/v1/schema_service_proto_list.json +6 -1
- package/build/src/v1/search_service_client.d.ts +90 -0
- package/build/src/v1/search_service_client.js +126 -0
- package/build/src/v1/search_service_proto_list.json +6 -1
- package/build/src/v1/search_tuning_service_client.d.ts +90 -0
- package/build/src/v1/search_tuning_service_client.js +134 -2
- package/build/src/v1/search_tuning_service_proto_list.json +6 -1
- package/build/src/v1/serving_config_service_client.d.ts +90 -0
- package/build/src/v1/serving_config_service_client.js +132 -0
- package/build/src/v1/serving_config_service_proto_list.json +6 -1
- package/build/src/v1/site_search_engine_service_client.d.ts +90 -0
- package/build/src/v1/site_search_engine_service_client.js +146 -2
- package/build/src/v1/site_search_engine_service_proto_list.json +6 -1
- package/build/src/v1/user_event_service_client.d.ts +90 -0
- package/build/src/v1/user_event_service_client.js +140 -2
- package/build/src/v1/user_event_service_proto_list.json +6 -1
- package/build/src/v1/user_license_service_client.d.ts +2256 -0
- package/build/src/v1/user_license_service_client.js +3194 -0
- package/build/src/v1/user_license_service_client_config.json +34 -0
- package/build/src/v1/user_license_service_proto_list.json +44 -0
- package/build/src/v1alpha/acl_config_service_client.js +12 -0
- package/build/src/v1alpha/chunk_service_client.js +6 -0
- package/build/src/v1alpha/completion_service_client.js +7 -1
- package/build/src/v1alpha/control_service_client.js +24 -0
- package/build/src/v1alpha/conversational_search_service_client.js +66 -0
- package/build/src/v1alpha/data_store_service_client.js +25 -1
- package/build/src/v1alpha/document_service_client.js +37 -1
- package/build/src/v1alpha/engine_service_client.js +25 -1
- package/build/src/v1alpha/estimate_billing_service_client.js +1 -1
- package/build/src/v1alpha/evaluation_service_client.js +7 -1
- package/build/src/v1alpha/grounded_generation_service_client.js +6 -0
- package/build/src/v1alpha/project_service_client.js +13 -1
- package/build/src/v1alpha/rank_service_client.js +6 -0
- package/build/src/v1alpha/recommendation_service_client.js +6 -0
- package/build/src/v1alpha/sample_query_service_client.js +25 -1
- package/build/src/v1alpha/sample_query_set_service_client.js +24 -0
- package/build/src/v1alpha/schema_service_client.js +7 -1
- package/build/src/v1alpha/search_tuning_service_client.js +7 -1
- package/build/src/v1alpha/serving_config_service_client.js +12 -0
- package/build/src/v1alpha/site_search_engine_service_client.js +19 -1
- package/build/src/v1alpha/user_event_service_client.js +13 -1
- package/build/src/v1beta/completion_service_client.js +13 -1
- package/build/src/v1beta/control_service_client.js +24 -0
- package/build/src/v1beta/conversational_search_service_client.js +66 -0
- package/build/src/v1beta/data_store_service_client.js +13 -1
- package/build/src/v1beta/document_service_client.js +31 -1
- package/build/src/v1beta/engine_service_client.js +25 -1
- package/build/src/v1beta/evaluation_service_client.js +7 -1
- package/build/src/v1beta/grounded_generation_service_client.js +12 -0
- package/build/src/v1beta/project_service_client.js +1 -1
- package/build/src/v1beta/rank_service_client.js +6 -0
- package/build/src/v1beta/recommendation_service_client.js +6 -0
- package/build/src/v1beta/sample_query_service_client.js +25 -1
- package/build/src/v1beta/sample_query_set_service_client.js +24 -0
- package/build/src/v1beta/schema_service_client.js +7 -1
- package/build/src/v1beta/search_tuning_service_client.js +7 -1
- package/build/src/v1beta/serving_config_service_client.js +12 -0
- package/build/src/v1beta/site_search_engine_service_client.js +19 -1
- package/build/src/v1beta/user_event_service_client.js +13 -1
- package/package.json +7 -7
- package/CHANGELOG.md +0 -274
@@ -211,7 +211,7 @@ class EngineServiceClient {
|
|
211
211
|
this.descriptors.page = {
|
212
212
|
listEngines: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'engines')
|
213
213
|
};
|
214
|
-
const protoFilesRoot = this._gaxModule.
|
214
|
+
const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos);
|
215
215
|
// This API contains "long-running operations", which return a
|
216
216
|
// an Operation object that allows for tracking of the operation,
|
217
217
|
// rather than holding a request open.
|
@@ -378,6 +378,12 @@ class EngineServiceClient {
|
|
378
378
|
?.then(([response, options, rawResponse]) => {
|
379
379
|
this._log.info('updateEngine response %j', response);
|
380
380
|
return [response, options, rawResponse];
|
381
|
+
}).catch((error) => {
|
382
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
383
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
384
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
385
|
+
}
|
386
|
+
throw error;
|
381
387
|
});
|
382
388
|
}
|
383
389
|
getEngine(request, optionsOrCallback, callback) {
|
@@ -408,6 +414,12 @@ class EngineServiceClient {
|
|
408
414
|
?.then(([response, options, rawResponse]) => {
|
409
415
|
this._log.info('getEngine response %j', response);
|
410
416
|
return [response, options, rawResponse];
|
417
|
+
}).catch((error) => {
|
418
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
419
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
420
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
421
|
+
}
|
422
|
+
throw error;
|
411
423
|
});
|
412
424
|
}
|
413
425
|
pauseEngine(request, optionsOrCallback, callback) {
|
@@ -438,6 +450,12 @@ class EngineServiceClient {
|
|
438
450
|
?.then(([response, options, rawResponse]) => {
|
439
451
|
this._log.info('pauseEngine response %j', response);
|
440
452
|
return [response, options, rawResponse];
|
453
|
+
}).catch((error) => {
|
454
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
455
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
456
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
457
|
+
}
|
458
|
+
throw error;
|
441
459
|
});
|
442
460
|
}
|
443
461
|
resumeEngine(request, optionsOrCallback, callback) {
|
@@ -468,6 +486,12 @@ class EngineServiceClient {
|
|
468
486
|
?.then(([response, options, rawResponse]) => {
|
469
487
|
this._log.info('resumeEngine response %j', response);
|
470
488
|
return [response, options, rawResponse];
|
489
|
+
}).catch((error) => {
|
490
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
491
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
492
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
493
|
+
}
|
494
|
+
throw error;
|
471
495
|
});
|
472
496
|
}
|
473
497
|
createEngine(request, optionsOrCallback, callback) {
|
@@ -212,7 +212,7 @@ class EvaluationServiceClient {
|
|
212
212
|
listEvaluations: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'evaluations'),
|
213
213
|
listEvaluationResults: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'evaluationResults')
|
214
214
|
};
|
215
|
-
const protoFilesRoot = this._gaxModule.
|
215
|
+
const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos);
|
216
216
|
// This API contains "long-running operations", which return a
|
217
217
|
// an Operation object that allows for tracking of the operation,
|
218
218
|
// rather than holding a request open.
|
@@ -373,6 +373,12 @@ class EvaluationServiceClient {
|
|
373
373
|
?.then(([response, options, rawResponse]) => {
|
374
374
|
this._log.info('getEvaluation response %j', response);
|
375
375
|
return [response, options, rawResponse];
|
376
|
+
}).catch((error) => {
|
377
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
378
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
379
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
380
|
+
}
|
381
|
+
throw error;
|
376
382
|
});
|
377
383
|
}
|
378
384
|
createEvaluation(request, optionsOrCallback, callback) {
|
@@ -355,6 +355,12 @@ class GroundedGenerationServiceClient {
|
|
355
355
|
?.then(([response, options, rawResponse]) => {
|
356
356
|
this._log.info('generateGroundedContent response %j', response);
|
357
357
|
return [response, options, rawResponse];
|
358
|
+
}).catch((error) => {
|
359
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
360
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
361
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
362
|
+
}
|
363
|
+
throw error;
|
358
364
|
});
|
359
365
|
}
|
360
366
|
checkGrounding(request, optionsOrCallback, callback) {
|
@@ -385,6 +391,12 @@ class GroundedGenerationServiceClient {
|
|
385
391
|
?.then(([response, options, rawResponse]) => {
|
386
392
|
this._log.info('checkGrounding response %j', response);
|
387
393
|
return [response, options, rawResponse];
|
394
|
+
}).catch((error) => {
|
395
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
396
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
397
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
398
|
+
}
|
399
|
+
throw error;
|
388
400
|
});
|
389
401
|
}
|
390
402
|
/**
|
@@ -204,7 +204,7 @@ class ProjectServiceClient {
|
|
204
204
|
sampleQueryPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}'),
|
205
205
|
sampleQuerySetPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}'),
|
206
206
|
};
|
207
|
-
const protoFilesRoot = this._gaxModule.
|
207
|
+
const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos);
|
208
208
|
// This API contains "long-running operations", which return a
|
209
209
|
// an Operation object that allows for tracking of the operation,
|
210
210
|
// rather than holding a request open.
|
@@ -341,6 +341,12 @@ class RankServiceClient {
|
|
341
341
|
?.then(([response, options, rawResponse]) => {
|
342
342
|
this._log.info('rank response %j', response);
|
343
343
|
return [response, options, rawResponse];
|
344
|
+
}).catch((error) => {
|
345
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
346
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
347
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
348
|
+
}
|
349
|
+
throw error;
|
344
350
|
});
|
345
351
|
}
|
346
352
|
/**
|
@@ -340,6 +340,12 @@ class RecommendationServiceClient {
|
|
340
340
|
?.then(([response, options, rawResponse]) => {
|
341
341
|
this._log.info('recommend response %j', response);
|
342
342
|
return [response, options, rawResponse];
|
343
|
+
}).catch((error) => {
|
344
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
345
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
346
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
347
|
+
}
|
348
|
+
throw error;
|
343
349
|
});
|
344
350
|
}
|
345
351
|
/**
|
@@ -210,7 +210,7 @@ class SampleQueryServiceClient {
|
|
210
210
|
this.descriptors.page = {
|
211
211
|
listSampleQueries: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'sampleQueries')
|
212
212
|
};
|
213
|
-
const protoFilesRoot = this._gaxModule.
|
213
|
+
const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos);
|
214
214
|
// This API contains "long-running operations", which return a
|
215
215
|
// an Operation object that allows for tracking of the operation,
|
216
216
|
// rather than holding a request open.
|
@@ -371,6 +371,12 @@ class SampleQueryServiceClient {
|
|
371
371
|
?.then(([response, options, rawResponse]) => {
|
372
372
|
this._log.info('getSampleQuery response %j', response);
|
373
373
|
return [response, options, rawResponse];
|
374
|
+
}).catch((error) => {
|
375
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
376
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
377
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
378
|
+
}
|
379
|
+
throw error;
|
374
380
|
});
|
375
381
|
}
|
376
382
|
createSampleQuery(request, optionsOrCallback, callback) {
|
@@ -401,6 +407,12 @@ class SampleQueryServiceClient {
|
|
401
407
|
?.then(([response, options, rawResponse]) => {
|
402
408
|
this._log.info('createSampleQuery response %j', response);
|
403
409
|
return [response, options, rawResponse];
|
410
|
+
}).catch((error) => {
|
411
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
412
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
413
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
414
|
+
}
|
415
|
+
throw error;
|
404
416
|
});
|
405
417
|
}
|
406
418
|
updateSampleQuery(request, optionsOrCallback, callback) {
|
@@ -431,6 +443,12 @@ class SampleQueryServiceClient {
|
|
431
443
|
?.then(([response, options, rawResponse]) => {
|
432
444
|
this._log.info('updateSampleQuery response %j', response);
|
433
445
|
return [response, options, rawResponse];
|
446
|
+
}).catch((error) => {
|
447
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
448
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
449
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
450
|
+
}
|
451
|
+
throw error;
|
434
452
|
});
|
435
453
|
}
|
436
454
|
deleteSampleQuery(request, optionsOrCallback, callback) {
|
@@ -461,6 +479,12 @@ class SampleQueryServiceClient {
|
|
461
479
|
?.then(([response, options, rawResponse]) => {
|
462
480
|
this._log.info('deleteSampleQuery response %j', response);
|
463
481
|
return [response, options, rawResponse];
|
482
|
+
}).catch((error) => {
|
483
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
484
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
485
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
486
|
+
}
|
487
|
+
throw error;
|
464
488
|
});
|
465
489
|
}
|
466
490
|
importSampleQueries(request, optionsOrCallback, callback) {
|
@@ -349,6 +349,12 @@ class SampleQuerySetServiceClient {
|
|
349
349
|
?.then(([response, options, rawResponse]) => {
|
350
350
|
this._log.info('getSampleQuerySet response %j', response);
|
351
351
|
return [response, options, rawResponse];
|
352
|
+
}).catch((error) => {
|
353
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
354
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
355
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
356
|
+
}
|
357
|
+
throw error;
|
352
358
|
});
|
353
359
|
}
|
354
360
|
createSampleQuerySet(request, optionsOrCallback, callback) {
|
@@ -379,6 +385,12 @@ class SampleQuerySetServiceClient {
|
|
379
385
|
?.then(([response, options, rawResponse]) => {
|
380
386
|
this._log.info('createSampleQuerySet response %j', response);
|
381
387
|
return [response, options, rawResponse];
|
388
|
+
}).catch((error) => {
|
389
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
390
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
391
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
392
|
+
}
|
393
|
+
throw error;
|
382
394
|
});
|
383
395
|
}
|
384
396
|
updateSampleQuerySet(request, optionsOrCallback, callback) {
|
@@ -409,6 +421,12 @@ class SampleQuerySetServiceClient {
|
|
409
421
|
?.then(([response, options, rawResponse]) => {
|
410
422
|
this._log.info('updateSampleQuerySet response %j', response);
|
411
423
|
return [response, options, rawResponse];
|
424
|
+
}).catch((error) => {
|
425
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
426
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
427
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
428
|
+
}
|
429
|
+
throw error;
|
412
430
|
});
|
413
431
|
}
|
414
432
|
deleteSampleQuerySet(request, optionsOrCallback, callback) {
|
@@ -439,6 +457,12 @@ class SampleQuerySetServiceClient {
|
|
439
457
|
?.then(([response, options, rawResponse]) => {
|
440
458
|
this._log.info('deleteSampleQuerySet response %j', response);
|
441
459
|
return [response, options, rawResponse];
|
460
|
+
}).catch((error) => {
|
461
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
462
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
463
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
464
|
+
}
|
465
|
+
throw error;
|
442
466
|
});
|
443
467
|
}
|
444
468
|
listSampleQuerySets(request, optionsOrCallback, callback) {
|
@@ -209,7 +209,7 @@ class SchemaServiceClient {
|
|
209
209
|
this.descriptors.page = {
|
210
210
|
listSchemas: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'schemas')
|
211
211
|
};
|
212
|
-
const protoFilesRoot = this._gaxModule.
|
212
|
+
const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos);
|
213
213
|
// This API contains "long-running operations", which return a
|
214
214
|
// an Operation object that allows for tracking of the operation,
|
215
215
|
// rather than holding a request open.
|
@@ -376,6 +376,12 @@ class SchemaServiceClient {
|
|
376
376
|
?.then(([response, options, rawResponse]) => {
|
377
377
|
this._log.info('getSchema response %j', response);
|
378
378
|
return [response, options, rawResponse];
|
379
|
+
}).catch((error) => {
|
380
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
381
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
382
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
383
|
+
}
|
384
|
+
throw error;
|
379
385
|
});
|
380
386
|
}
|
381
387
|
createSchema(request, optionsOrCallback, callback) {
|
@@ -203,7 +203,7 @@ class SearchTuningServiceClient {
|
|
203
203
|
sampleQueryPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}'),
|
204
204
|
sampleQuerySetPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}'),
|
205
205
|
};
|
206
|
-
const protoFilesRoot = this._gaxModule.
|
206
|
+
const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos);
|
207
207
|
// This API contains "long-running operations", which return a
|
208
208
|
// an Operation object that allows for tracking of the operation,
|
209
209
|
// rather than holding a request open.
|
@@ -363,6 +363,12 @@ class SearchTuningServiceClient {
|
|
363
363
|
?.then(([response, options, rawResponse]) => {
|
364
364
|
this._log.info('listCustomModels response %j', response);
|
365
365
|
return [response, options, rawResponse];
|
366
|
+
}).catch((error) => {
|
367
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
368
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
369
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
370
|
+
}
|
371
|
+
throw error;
|
366
372
|
});
|
367
373
|
}
|
368
374
|
trainCustomModel(request, optionsOrCallback, callback) {
|
@@ -349,6 +349,12 @@ class ServingConfigServiceClient {
|
|
349
349
|
?.then(([response, options, rawResponse]) => {
|
350
350
|
this._log.info('updateServingConfig response %j', response);
|
351
351
|
return [response, options, rawResponse];
|
352
|
+
}).catch((error) => {
|
353
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
354
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
355
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
356
|
+
}
|
357
|
+
throw error;
|
352
358
|
});
|
353
359
|
}
|
354
360
|
getServingConfig(request, optionsOrCallback, callback) {
|
@@ -379,6 +385,12 @@ class ServingConfigServiceClient {
|
|
379
385
|
?.then(([response, options, rawResponse]) => {
|
380
386
|
this._log.info('getServingConfig response %j', response);
|
381
387
|
return [response, options, rawResponse];
|
388
|
+
}).catch((error) => {
|
389
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
390
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
391
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
392
|
+
}
|
393
|
+
throw error;
|
382
394
|
});
|
383
395
|
}
|
384
396
|
listServingConfigs(request, optionsOrCallback, callback) {
|
@@ -210,7 +210,7 @@ class SiteSearchEngineServiceClient {
|
|
210
210
|
listTargetSites: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'targetSites'),
|
211
211
|
fetchDomainVerificationStatus: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'targetSites')
|
212
212
|
};
|
213
|
-
const protoFilesRoot = this._gaxModule.
|
213
|
+
const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos);
|
214
214
|
// This API contains "long-running operations", which return a
|
215
215
|
// an Operation object that allows for tracking of the operation,
|
216
216
|
// rather than holding a request open.
|
@@ -398,6 +398,12 @@ class SiteSearchEngineServiceClient {
|
|
398
398
|
?.then(([response, options, rawResponse]) => {
|
399
399
|
this._log.info('getSiteSearchEngine response %j', response);
|
400
400
|
return [response, options, rawResponse];
|
401
|
+
}).catch((error) => {
|
402
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
403
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
404
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
405
|
+
}
|
406
|
+
throw error;
|
401
407
|
});
|
402
408
|
}
|
403
409
|
getTargetSite(request, optionsOrCallback, callback) {
|
@@ -428,6 +434,12 @@ class SiteSearchEngineServiceClient {
|
|
428
434
|
?.then(([response, options, rawResponse]) => {
|
429
435
|
this._log.info('getTargetSite response %j', response);
|
430
436
|
return [response, options, rawResponse];
|
437
|
+
}).catch((error) => {
|
438
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
439
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
440
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
441
|
+
}
|
442
|
+
throw error;
|
431
443
|
});
|
432
444
|
}
|
433
445
|
fetchSitemaps(request, optionsOrCallback, callback) {
|
@@ -458,6 +470,12 @@ class SiteSearchEngineServiceClient {
|
|
458
470
|
?.then(([response, options, rawResponse]) => {
|
459
471
|
this._log.info('fetchSitemaps response %j', response);
|
460
472
|
return [response, options, rawResponse];
|
473
|
+
}).catch((error) => {
|
474
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
475
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
476
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
477
|
+
}
|
478
|
+
throw error;
|
461
479
|
});
|
462
480
|
}
|
463
481
|
createTargetSite(request, optionsOrCallback, callback) {
|
@@ -203,7 +203,7 @@ class UserEventServiceClient {
|
|
203
203
|
sampleQueryPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}'),
|
204
204
|
sampleQuerySetPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}'),
|
205
205
|
};
|
206
|
-
const protoFilesRoot = this._gaxModule.
|
206
|
+
const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos);
|
207
207
|
// This API contains "long-running operations", which return a
|
208
208
|
// an Operation object that allows for tracking of the operation,
|
209
209
|
// rather than holding a request open.
|
@@ -366,6 +366,12 @@ class UserEventServiceClient {
|
|
366
366
|
?.then(([response, options, rawResponse]) => {
|
367
367
|
this._log.info('writeUserEvent response %j', response);
|
368
368
|
return [response, options, rawResponse];
|
369
|
+
}).catch((error) => {
|
370
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
371
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
372
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
373
|
+
}
|
374
|
+
throw error;
|
369
375
|
});
|
370
376
|
}
|
371
377
|
collectUserEvent(request, optionsOrCallback, callback) {
|
@@ -396,6 +402,12 @@ class UserEventServiceClient {
|
|
396
402
|
?.then(([response, options, rawResponse]) => {
|
397
403
|
this._log.info('collectUserEvent response %j', response);
|
398
404
|
return [response, options, rawResponse];
|
405
|
+
}).catch((error) => {
|
406
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
407
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
408
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
409
|
+
}
|
410
|
+
throw error;
|
399
411
|
});
|
400
412
|
}
|
401
413
|
purgeUserEvents(request, optionsOrCallback, callback) {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@google-cloud/discoveryengine",
|
3
|
-
"version": "2.
|
3
|
+
"version": "2.3.0",
|
4
4
|
"description": "Discovery Engine API client for Node.js",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -41,12 +41,12 @@
|
|
41
41
|
"prepare": "npm run compile",
|
42
42
|
"prelint": "cd samples; npm link ../; npm i",
|
43
43
|
"postpack": "minifyProtoJson",
|
44
|
-
"samples-test": "
|
45
|
-
"system-test": "
|
46
|
-
"test": "
|
44
|
+
"samples-test": "cd samples/ && npm link ../ && npm i && npm test",
|
45
|
+
"system-test": "c8 mocha build/system-test",
|
46
|
+
"test": "NODE_OPTIONS=--max-old-space-size=16384 c8 mocha build/test"
|
47
47
|
},
|
48
48
|
"dependencies": {
|
49
|
-
"google-gax": "^5.0.
|
49
|
+
"google-gax": "^5.0.0"
|
50
50
|
},
|
51
51
|
"devDependencies": {
|
52
52
|
"@types/mocha": "^10.0.10",
|
@@ -56,13 +56,13 @@
|
|
56
56
|
"gapic-tools": "^1.0.0",
|
57
57
|
"gts": "^6.0.2",
|
58
58
|
"jsdoc": "^4.0.4",
|
59
|
-
"jsdoc-fresh": "^
|
59
|
+
"jsdoc-fresh": "^4.0.0",
|
60
60
|
"jsdoc-region-tag": "^3.0.0",
|
61
61
|
"linkinator": "^6.1.2",
|
62
62
|
"long": "^5.3.1",
|
63
63
|
"mocha": "^11.1.0",
|
64
64
|
"pack-n-play": "^3.0.0",
|
65
|
-
"sinon": "^
|
65
|
+
"sinon": "^21.0.0",
|
66
66
|
"typescript": "^5.8.2"
|
67
67
|
},
|
68
68
|
"engines": {
|