@google-cloud/vectorsearch 0.1.0 → 0.2.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 +1 -0
- package/build/protos/google/cloud/vectorsearch/v1beta/data_object.proto +6 -5
- package/build/protos/google/cloud/vectorsearch/v1beta/data_object_search_service.proto +16 -6
- package/build/protos/google/cloud/vectorsearch/v1beta/data_object_service.proto +2 -2
- package/build/protos/google/cloud/vectorsearch/v1beta/embedding_config.proto +2 -2
- package/build/protos/google/cloud/vectorsearch/v1beta/vectorsearch_service.proto +84 -8
- package/build/protos/protos.d.ts +455 -1
- package/build/protos/protos.js +1044 -1
- package/build/protos/protos.json +125 -6
- package/build/src/v1beta/data_object_search_service_client.js +1 -1
- package/build/src/v1beta/data_object_service_client.d.ts +1 -1
- package/build/src/v1beta/data_object_service_client.js +1 -1
- package/build/src/v1beta/data_object_service_client_config.json +12 -12
- package/build/src/v1beta/gapic_metadata.json +10 -0
- package/build/src/v1beta/index.js +1 -1
- package/build/src/v1beta/vector_search_service_client.d.ts +45 -3
- package/build/src/v1beta/vector_search_service_client.js +54 -3
- package/build/src/v1beta/vector_search_service_client.js.map +1 -1
- package/build/src/v1beta/vector_search_service_client_config.json +14 -10
- package/package.json +1 -1
package/build/protos/protos.json
CHANGED
|
@@ -24,14 +24,16 @@
|
|
|
24
24
|
"DataObject": {
|
|
25
25
|
"options": {
|
|
26
26
|
"(google.api.resource).type": "vectorsearch.googleapis.com/DataObject",
|
|
27
|
-
"(google.api.resource).pattern": "projects/{project}/locations/{location}/collections/{collection}/dataObjects/{dataObject}"
|
|
27
|
+
"(google.api.resource).pattern": "projects/{project}/locations/{location}/collections/{collection}/dataObjects/{dataObject}",
|
|
28
|
+
"(google.api.resource).plural": "dataObjects",
|
|
29
|
+
"(google.api.resource).singular": "dataObject"
|
|
28
30
|
},
|
|
29
31
|
"fields": {
|
|
30
32
|
"name": {
|
|
31
33
|
"type": "string",
|
|
32
34
|
"id": 1,
|
|
33
35
|
"options": {
|
|
34
|
-
"(google.api.field_behavior)": "
|
|
36
|
+
"(google.api.field_behavior)": "IDENTIFIER"
|
|
35
37
|
}
|
|
36
38
|
},
|
|
37
39
|
"dataObjectId": {
|
|
@@ -251,11 +253,17 @@
|
|
|
251
253
|
"fields": {
|
|
252
254
|
"useIndex": {
|
|
253
255
|
"type": "IndexHint",
|
|
254
|
-
"id": 1
|
|
256
|
+
"id": 1,
|
|
257
|
+
"options": {
|
|
258
|
+
"(google.api.field_behavior)": "OPTIONAL"
|
|
259
|
+
}
|
|
255
260
|
},
|
|
256
261
|
"useKnn": {
|
|
257
262
|
"type": "bool",
|
|
258
|
-
"id": 2
|
|
263
|
+
"id": 2,
|
|
264
|
+
"options": {
|
|
265
|
+
"(google.api.field_behavior)": "OPTIONAL"
|
|
266
|
+
}
|
|
259
267
|
}
|
|
260
268
|
},
|
|
261
269
|
"nested": {
|
|
@@ -357,7 +365,7 @@
|
|
|
357
365
|
}
|
|
358
366
|
},
|
|
359
367
|
"distanceMetric": {
|
|
360
|
-
"type": "DistanceMetric",
|
|
368
|
+
"type": "google.cloud.vectorsearch.v1beta.DistanceMetric",
|
|
361
369
|
"id": 11,
|
|
362
370
|
"options": {
|
|
363
371
|
"(google.api.field_behavior)": "OPTIONAL"
|
|
@@ -416,6 +424,13 @@
|
|
|
416
424
|
"(google.api.field_behavior)": "OPTIONAL",
|
|
417
425
|
"proto3_optional": true
|
|
418
426
|
}
|
|
427
|
+
},
|
|
428
|
+
"searchHint": {
|
|
429
|
+
"type": "SearchHint",
|
|
430
|
+
"id": 7,
|
|
431
|
+
"options": {
|
|
432
|
+
"(google.api.field_behavior)": "OPTIONAL"
|
|
433
|
+
}
|
|
419
434
|
}
|
|
420
435
|
}
|
|
421
436
|
},
|
|
@@ -457,6 +472,13 @@
|
|
|
457
472
|
"(google.api.field_behavior)": "OPTIONAL",
|
|
458
473
|
"proto3_optional": true
|
|
459
474
|
}
|
|
475
|
+
},
|
|
476
|
+
"filter": {
|
|
477
|
+
"type": "google.protobuf.Struct",
|
|
478
|
+
"id": 5,
|
|
479
|
+
"options": {
|
|
480
|
+
"(google.api.field_behavior)": "OPTIONAL"
|
|
481
|
+
}
|
|
460
482
|
}
|
|
461
483
|
}
|
|
462
484
|
},
|
|
@@ -1371,6 +1393,30 @@
|
|
|
1371
1393
|
}
|
|
1372
1394
|
}
|
|
1373
1395
|
]
|
|
1396
|
+
},
|
|
1397
|
+
"ExportDataObjects": {
|
|
1398
|
+
"requestType": "ExportDataObjectsRequest",
|
|
1399
|
+
"responseType": "google.longrunning.Operation",
|
|
1400
|
+
"options": {
|
|
1401
|
+
"(google.api.http).post": "/v1beta/{name=projects/*/locations/*/collections/*}:exportDataObjects",
|
|
1402
|
+
"(google.api.http).body": "*",
|
|
1403
|
+
"(google.longrunning.operation_info).response_type": "ExportDataObjectsResponse",
|
|
1404
|
+
"(google.longrunning.operation_info).metadata_type": "ExportDataObjectsMetadata"
|
|
1405
|
+
},
|
|
1406
|
+
"parsedOptions": [
|
|
1407
|
+
{
|
|
1408
|
+
"(google.api.http)": {
|
|
1409
|
+
"post": "/v1beta/{name=projects/*/locations/*/collections/*}:exportDataObjects",
|
|
1410
|
+
"body": "*"
|
|
1411
|
+
}
|
|
1412
|
+
},
|
|
1413
|
+
{
|
|
1414
|
+
"(google.longrunning.operation_info)": {
|
|
1415
|
+
"response_type": "ExportDataObjectsResponse",
|
|
1416
|
+
"metadata_type": "ExportDataObjectsMetadata"
|
|
1417
|
+
}
|
|
1418
|
+
}
|
|
1419
|
+
]
|
|
1374
1420
|
}
|
|
1375
1421
|
}
|
|
1376
1422
|
},
|
|
@@ -1693,7 +1739,7 @@
|
|
|
1693
1739
|
}
|
|
1694
1740
|
},
|
|
1695
1741
|
"distanceMetric": {
|
|
1696
|
-
"type": "DistanceMetric",
|
|
1742
|
+
"type": "google.cloud.vectorsearch.v1beta.DistanceMetric",
|
|
1697
1743
|
"id": 4,
|
|
1698
1744
|
"options": {
|
|
1699
1745
|
"(google.api.field_behavior)": "OPTIONAL"
|
|
@@ -1934,6 +1980,13 @@
|
|
|
1934
1980
|
"options": {
|
|
1935
1981
|
"(google.api.field_behavior)": "REQUIRED"
|
|
1936
1982
|
}
|
|
1983
|
+
},
|
|
1984
|
+
"outputUri": {
|
|
1985
|
+
"type": "string",
|
|
1986
|
+
"id": 3,
|
|
1987
|
+
"options": {
|
|
1988
|
+
"(google.api.field_behavior)": "OPTIONAL"
|
|
1989
|
+
}
|
|
1937
1990
|
}
|
|
1938
1991
|
}
|
|
1939
1992
|
}
|
|
@@ -1966,6 +2019,72 @@
|
|
|
1966
2019
|
"id": 1
|
|
1967
2020
|
}
|
|
1968
2021
|
}
|
|
2022
|
+
},
|
|
2023
|
+
"ExportDataObjectsRequest": {
|
|
2024
|
+
"oneofs": {
|
|
2025
|
+
"destination": {
|
|
2026
|
+
"oneof": [
|
|
2027
|
+
"gcsDestination"
|
|
2028
|
+
]
|
|
2029
|
+
}
|
|
2030
|
+
},
|
|
2031
|
+
"fields": {
|
|
2032
|
+
"gcsDestination": {
|
|
2033
|
+
"type": "GcsExportDestination",
|
|
2034
|
+
"id": 2
|
|
2035
|
+
},
|
|
2036
|
+
"name": {
|
|
2037
|
+
"type": "string",
|
|
2038
|
+
"id": 1,
|
|
2039
|
+
"options": {
|
|
2040
|
+
"(google.api.field_behavior)": "REQUIRED",
|
|
2041
|
+
"(google.api.resource_reference).type": "vectorsearch.googleapis.com/Collection"
|
|
2042
|
+
}
|
|
2043
|
+
}
|
|
2044
|
+
},
|
|
2045
|
+
"nested": {
|
|
2046
|
+
"GcsExportDestination": {
|
|
2047
|
+
"fields": {
|
|
2048
|
+
"exportUri": {
|
|
2049
|
+
"type": "string",
|
|
2050
|
+
"id": 1,
|
|
2051
|
+
"options": {
|
|
2052
|
+
"(google.api.field_behavior)": "REQUIRED"
|
|
2053
|
+
}
|
|
2054
|
+
},
|
|
2055
|
+
"format": {
|
|
2056
|
+
"type": "Format",
|
|
2057
|
+
"id": 2,
|
|
2058
|
+
"options": {
|
|
2059
|
+
"(google.api.field_behavior)": "REQUIRED"
|
|
2060
|
+
}
|
|
2061
|
+
}
|
|
2062
|
+
},
|
|
2063
|
+
"nested": {
|
|
2064
|
+
"Format": {
|
|
2065
|
+
"values": {
|
|
2066
|
+
"FORMAT_UNSPECIFIED": 0,
|
|
2067
|
+
"JSON": 1
|
|
2068
|
+
}
|
|
2069
|
+
}
|
|
2070
|
+
}
|
|
2071
|
+
}
|
|
2072
|
+
}
|
|
2073
|
+
},
|
|
2074
|
+
"ExportDataObjectsMetadata": {
|
|
2075
|
+
"fields": {
|
|
2076
|
+
"createTime": {
|
|
2077
|
+
"type": "google.protobuf.Timestamp",
|
|
2078
|
+
"id": 1
|
|
2079
|
+
},
|
|
2080
|
+
"finishTime": {
|
|
2081
|
+
"type": "google.protobuf.Timestamp",
|
|
2082
|
+
"id": 2
|
|
2083
|
+
}
|
|
2084
|
+
}
|
|
2085
|
+
},
|
|
2086
|
+
"ExportDataObjectsResponse": {
|
|
2087
|
+
"fields": {}
|
|
1969
2088
|
}
|
|
1970
2089
|
}
|
|
1971
2090
|
}
|
|
@@ -126,7 +126,7 @@ export declare class DataObjectServiceClient {
|
|
|
126
126
|
* @param {string} request.dataObjectId
|
|
127
127
|
* Required. The id of the dataObject to create.
|
|
128
128
|
* The id must be 1-63 characters long, and comply with
|
|
129
|
-
*
|
|
129
|
+
* [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
|
|
130
130
|
* Specifically, it must be 1-63 characters long and match the regular
|
|
131
131
|
* expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`.
|
|
132
132
|
* @param {google.cloud.vectorsearch.v1beta.DataObject} request.dataObject
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
"methods": {
|
|
35
35
|
"CreateDataObject": {
|
|
36
36
|
"timeout_millis": 60000,
|
|
37
|
-
"retry_codes_name": "
|
|
38
|
-
"retry_params_name": "
|
|
37
|
+
"retry_codes_name": "unavailable",
|
|
38
|
+
"retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f"
|
|
39
39
|
},
|
|
40
40
|
"BatchCreateDataObjects": {
|
|
41
41
|
"timeout_millis": 300000,
|
|
42
|
-
"retry_codes_name": "
|
|
43
|
-
"retry_params_name": "
|
|
42
|
+
"retry_codes_name": "unavailable",
|
|
43
|
+
"retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f"
|
|
44
44
|
},
|
|
45
45
|
"GetDataObject": {
|
|
46
46
|
"timeout_millis": 60000,
|
|
@@ -49,23 +49,23 @@
|
|
|
49
49
|
},
|
|
50
50
|
"UpdateDataObject": {
|
|
51
51
|
"timeout_millis": 60000,
|
|
52
|
-
"retry_codes_name": "
|
|
53
|
-
"retry_params_name": "
|
|
52
|
+
"retry_codes_name": "unavailable",
|
|
53
|
+
"retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f"
|
|
54
54
|
},
|
|
55
55
|
"BatchUpdateDataObjects": {
|
|
56
56
|
"timeout_millis": 60000,
|
|
57
|
-
"retry_codes_name": "
|
|
58
|
-
"retry_params_name": "
|
|
57
|
+
"retry_codes_name": "unavailable",
|
|
58
|
+
"retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f"
|
|
59
59
|
},
|
|
60
60
|
"DeleteDataObject": {
|
|
61
61
|
"timeout_millis": 60000,
|
|
62
|
-
"retry_codes_name": "
|
|
63
|
-
"retry_params_name": "
|
|
62
|
+
"retry_codes_name": "unavailable",
|
|
63
|
+
"retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f"
|
|
64
64
|
},
|
|
65
65
|
"BatchDeleteDataObjects": {
|
|
66
66
|
"timeout_millis": 60000,
|
|
67
|
-
"retry_codes_name": "
|
|
68
|
-
"retry_params_name": "
|
|
67
|
+
"retry_codes_name": "unavailable",
|
|
68
|
+
"retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f"
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
}
|
|
@@ -196,6 +196,11 @@
|
|
|
196
196
|
"importDataObjects"
|
|
197
197
|
]
|
|
198
198
|
},
|
|
199
|
+
"ExportDataObjects": {
|
|
200
|
+
"methods": [
|
|
201
|
+
"exportDataObjects"
|
|
202
|
+
]
|
|
203
|
+
},
|
|
199
204
|
"ListCollections": {
|
|
200
205
|
"methods": [
|
|
201
206
|
"listCollections",
|
|
@@ -255,6 +260,11 @@
|
|
|
255
260
|
"importDataObjects"
|
|
256
261
|
]
|
|
257
262
|
},
|
|
263
|
+
"ExportDataObjects": {
|
|
264
|
+
"methods": [
|
|
265
|
+
"exportDataObjects"
|
|
266
|
+
]
|
|
267
|
+
},
|
|
258
268
|
"ListCollections": {
|
|
259
269
|
"methods": [
|
|
260
270
|
"listCollections",
|
|
@@ -177,7 +177,7 @@ export declare class VectorSearchServiceClient {
|
|
|
177
177
|
* @param {string} request.collectionId
|
|
178
178
|
* Required. ID of the Collection to create.
|
|
179
179
|
* The id must be 1-63 characters long, and comply with
|
|
180
|
-
*
|
|
180
|
+
* [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
|
|
181
181
|
* Specifically, it must be 1-63 characters long and match the regular
|
|
182
182
|
* expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`.
|
|
183
183
|
* @param {google.cloud.vectorsearch.v1beta.Collection} request.collection
|
|
@@ -242,7 +242,8 @@ export declare class VectorSearchServiceClient {
|
|
|
242
242
|
* The following fields support update: `display_name`, `description`,
|
|
243
243
|
* `labels`, `data_schema`, `vector_schema`.
|
|
244
244
|
* For `data_schema` and `vector_schema`, fields can only be added, not
|
|
245
|
-
*
|
|
245
|
+
* deleted, but `vertex_embedding_config` in `vector_schema` can be added or
|
|
246
|
+
* removed.
|
|
246
247
|
* Partial updates for `data_schema` and `vector_schema` are also supported
|
|
247
248
|
* by using sub-field paths in `update_mask`, e.g.
|
|
248
249
|
* `data_schema.properties.foo` or `vector_schema.my_vector_field`.
|
|
@@ -357,7 +358,7 @@ export declare class VectorSearchServiceClient {
|
|
|
357
358
|
* @param {string} request.indexId
|
|
358
359
|
* Required. ID of the Index to create.
|
|
359
360
|
* The id must be 1-63 characters long, and comply with
|
|
360
|
-
*
|
|
361
|
+
* [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
|
|
361
362
|
* Specifically, it must be 1-63 characters long and match the regular
|
|
362
363
|
* expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`.
|
|
363
364
|
* @param {google.cloud.vectorsearch.v1beta.Index} request.index
|
|
@@ -499,6 +500,47 @@ export declare class VectorSearchServiceClient {
|
|
|
499
500
|
* region_tag:vectorsearch_v1beta_generated_VectorSearchService_ImportDataObjects_async
|
|
500
501
|
*/
|
|
501
502
|
checkImportDataObjectsProgress(name: string): Promise<LROperation<protos.google.cloud.vectorsearch.v1beta.ImportDataObjectsResponse, protos.google.cloud.vectorsearch.v1beta.ImportDataObjectsMetadata>>;
|
|
503
|
+
/**
|
|
504
|
+
* Initiates a Long-Running Operation to export DataObjects from a Collection.
|
|
505
|
+
*
|
|
506
|
+
* @param {Object} request
|
|
507
|
+
* The request object that will be sent.
|
|
508
|
+
* @param {google.cloud.vectorsearch.v1beta.ExportDataObjectsRequest.GcsExportDestination} request.gcsDestination
|
|
509
|
+
* The Cloud Storage location where user wants to export Data Objects.
|
|
510
|
+
* @param {string} request.name
|
|
511
|
+
* Required. The resource name of the Collection from which we want to export
|
|
512
|
+
* Data Objects. Format:
|
|
513
|
+
* `projects/{project}/locations/{location}/collections/{collection}`.
|
|
514
|
+
* @param {object} [options]
|
|
515
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
516
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
517
|
+
* The first element of the array is an object representing
|
|
518
|
+
* a long running operation. Its `promise()` method returns a promise
|
|
519
|
+
* you can `await` for.
|
|
520
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
|
|
521
|
+
* for more details and examples.
|
|
522
|
+
* @example <caption>include:samples/generated/v1beta/vector_search_service.export_data_objects.js</caption>
|
|
523
|
+
* region_tag:vectorsearch_v1beta_generated_VectorSearchService_ExportDataObjects_async
|
|
524
|
+
*/
|
|
525
|
+
exportDataObjects(request?: protos.google.cloud.vectorsearch.v1beta.IExportDataObjectsRequest, options?: CallOptions): Promise<[
|
|
526
|
+
LROperation<protos.google.cloud.vectorsearch.v1beta.IExportDataObjectsResponse, protos.google.cloud.vectorsearch.v1beta.IExportDataObjectsMetadata>,
|
|
527
|
+
protos.google.longrunning.IOperation | undefined,
|
|
528
|
+
{} | undefined
|
|
529
|
+
]>;
|
|
530
|
+
exportDataObjects(request: protos.google.cloud.vectorsearch.v1beta.IExportDataObjectsRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.vectorsearch.v1beta.IExportDataObjectsResponse, protos.google.cloud.vectorsearch.v1beta.IExportDataObjectsMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
|
|
531
|
+
exportDataObjects(request: protos.google.cloud.vectorsearch.v1beta.IExportDataObjectsRequest, callback: Callback<LROperation<protos.google.cloud.vectorsearch.v1beta.IExportDataObjectsResponse, protos.google.cloud.vectorsearch.v1beta.IExportDataObjectsMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
|
|
532
|
+
/**
|
|
533
|
+
* Check the status of the long running operation returned by `exportDataObjects()`.
|
|
534
|
+
* @param {String} name
|
|
535
|
+
* The operation name that will be passed.
|
|
536
|
+
* @returns {Promise} - The promise which resolves to an object.
|
|
537
|
+
* The decoded operation object has result and metadata field to get information from.
|
|
538
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
|
|
539
|
+
* for more details and examples.
|
|
540
|
+
* @example <caption>include:samples/generated/v1beta/vector_search_service.export_data_objects.js</caption>
|
|
541
|
+
* region_tag:vectorsearch_v1beta_generated_VectorSearchService_ExportDataObjects_async
|
|
542
|
+
*/
|
|
543
|
+
checkExportDataObjectsProgress(name: string): Promise<LROperation<protos.google.cloud.vectorsearch.v1beta.ExportDataObjectsResponse, protos.google.cloud.vectorsearch.v1beta.ExportDataObjectsMetadata>>;
|
|
502
544
|
/**
|
|
503
545
|
* Lists Collections in a given project and location.
|
|
504
546
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// Copyright
|
|
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.
|
|
@@ -205,13 +205,16 @@ class VectorSearchServiceClient {
|
|
|
205
205
|
const deleteIndexMetadata = protoFilesRoot.lookup('.google.cloud.vectorsearch.v1beta.OperationMetadata');
|
|
206
206
|
const importDataObjectsResponse = protoFilesRoot.lookup('.google.cloud.vectorsearch.v1beta.ImportDataObjectsResponse');
|
|
207
207
|
const importDataObjectsMetadata = protoFilesRoot.lookup('.google.cloud.vectorsearch.v1beta.ImportDataObjectsMetadata');
|
|
208
|
+
const exportDataObjectsResponse = protoFilesRoot.lookup('.google.cloud.vectorsearch.v1beta.ExportDataObjectsResponse');
|
|
209
|
+
const exportDataObjectsMetadata = protoFilesRoot.lookup('.google.cloud.vectorsearch.v1beta.ExportDataObjectsMetadata');
|
|
208
210
|
this.descriptors.longrunning = {
|
|
209
211
|
createCollection: new this._gaxModule.LongrunningDescriptor(this.operationsClient, createCollectionResponse.decode.bind(createCollectionResponse), createCollectionMetadata.decode.bind(createCollectionMetadata)),
|
|
210
212
|
updateCollection: new this._gaxModule.LongrunningDescriptor(this.operationsClient, updateCollectionResponse.decode.bind(updateCollectionResponse), updateCollectionMetadata.decode.bind(updateCollectionMetadata)),
|
|
211
213
|
deleteCollection: new this._gaxModule.LongrunningDescriptor(this.operationsClient, deleteCollectionResponse.decode.bind(deleteCollectionResponse), deleteCollectionMetadata.decode.bind(deleteCollectionMetadata)),
|
|
212
214
|
createIndex: new this._gaxModule.LongrunningDescriptor(this.operationsClient, createIndexResponse.decode.bind(createIndexResponse), createIndexMetadata.decode.bind(createIndexMetadata)),
|
|
213
215
|
deleteIndex: new this._gaxModule.LongrunningDescriptor(this.operationsClient, deleteIndexResponse.decode.bind(deleteIndexResponse), deleteIndexMetadata.decode.bind(deleteIndexMetadata)),
|
|
214
|
-
importDataObjects: new this._gaxModule.LongrunningDescriptor(this.operationsClient, importDataObjectsResponse.decode.bind(importDataObjectsResponse), importDataObjectsMetadata.decode.bind(importDataObjectsMetadata))
|
|
216
|
+
importDataObjects: new this._gaxModule.LongrunningDescriptor(this.operationsClient, importDataObjectsResponse.decode.bind(importDataObjectsResponse), importDataObjectsMetadata.decode.bind(importDataObjectsMetadata)),
|
|
217
|
+
exportDataObjects: new this._gaxModule.LongrunningDescriptor(this.operationsClient, exportDataObjectsResponse.decode.bind(exportDataObjectsResponse), exportDataObjectsMetadata.decode.bind(exportDataObjectsMetadata))
|
|
215
218
|
};
|
|
216
219
|
// Put together the default options sent with requests.
|
|
217
220
|
this._defaults = this._gaxGrpc.constructSettings('google.cloud.vectorsearch.v1beta.VectorSearchService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
|
|
@@ -246,7 +249,7 @@ class VectorSearchServiceClient {
|
|
|
246
249
|
this._protos.google.cloud.vectorsearch.v1beta.VectorSearchService, this._opts, this._providedCustomServicePath);
|
|
247
250
|
// Iterate over each of the methods that the service provides
|
|
248
251
|
// and create an API call method for each.
|
|
249
|
-
const vectorSearchServiceStubMethods = ['listCollections', 'getCollection', 'createCollection', 'updateCollection', 'deleteCollection', 'listIndexes', 'getIndex', 'createIndex', 'deleteIndex', 'importDataObjects'];
|
|
252
|
+
const vectorSearchServiceStubMethods = ['listCollections', 'getCollection', 'createCollection', 'updateCollection', 'deleteCollection', 'listIndexes', 'getIndex', 'createIndex', 'deleteIndex', 'importDataObjects', 'exportDataObjects'];
|
|
250
253
|
for (const methodName of vectorSearchServiceStubMethods) {
|
|
251
254
|
const callPromise = this.vectorSearchServiceStub.then(stub => (...args) => {
|
|
252
255
|
if (this._terminated) {
|
|
@@ -685,6 +688,54 @@ class VectorSearchServiceClient {
|
|
|
685
688
|
const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.importDataObjects, this._gaxModule.createDefaultBackoffSettings());
|
|
686
689
|
return decodeOperation;
|
|
687
690
|
}
|
|
691
|
+
exportDataObjects(request, optionsOrCallback, callback) {
|
|
692
|
+
request = request || {};
|
|
693
|
+
let options;
|
|
694
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
695
|
+
callback = optionsOrCallback;
|
|
696
|
+
options = {};
|
|
697
|
+
}
|
|
698
|
+
else {
|
|
699
|
+
options = optionsOrCallback;
|
|
700
|
+
}
|
|
701
|
+
options = options || {};
|
|
702
|
+
options.otherArgs = options.otherArgs || {};
|
|
703
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
704
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
|
705
|
+
'name': request.name ?? '',
|
|
706
|
+
});
|
|
707
|
+
this.initialize().catch(err => { throw err; });
|
|
708
|
+
const wrappedCallback = callback
|
|
709
|
+
? (error, response, rawResponse, _) => {
|
|
710
|
+
this._log.info('exportDataObjects response %j', rawResponse);
|
|
711
|
+
callback(error, response, rawResponse, _); // We verified callback above.
|
|
712
|
+
}
|
|
713
|
+
: undefined;
|
|
714
|
+
this._log.info('exportDataObjects request %j', request);
|
|
715
|
+
return this.innerApiCalls.exportDataObjects(request, options, wrappedCallback)
|
|
716
|
+
?.then(([response, rawResponse, _]) => {
|
|
717
|
+
this._log.info('exportDataObjects response %j', rawResponse);
|
|
718
|
+
return [response, rawResponse, _];
|
|
719
|
+
});
|
|
720
|
+
}
|
|
721
|
+
/**
|
|
722
|
+
* Check the status of the long running operation returned by `exportDataObjects()`.
|
|
723
|
+
* @param {String} name
|
|
724
|
+
* The operation name that will be passed.
|
|
725
|
+
* @returns {Promise} - The promise which resolves to an object.
|
|
726
|
+
* The decoded operation object has result and metadata field to get information from.
|
|
727
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
|
|
728
|
+
* for more details and examples.
|
|
729
|
+
* @example <caption>include:samples/generated/v1beta/vector_search_service.export_data_objects.js</caption>
|
|
730
|
+
* region_tag:vectorsearch_v1beta_generated_VectorSearchService_ExportDataObjects_async
|
|
731
|
+
*/
|
|
732
|
+
async checkExportDataObjectsProgress(name) {
|
|
733
|
+
this._log.info('exportDataObjects long-running');
|
|
734
|
+
const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
|
|
735
|
+
const [operation] = await this.operationsClient.getOperation(request);
|
|
736
|
+
const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.exportDataObjects, this._gaxModule.createDefaultBackoffSettings());
|
|
737
|
+
return decodeOperation;
|
|
738
|
+
}
|
|
688
739
|
listCollections(request, optionsOrCallback, callback) {
|
|
689
740
|
request = request || {};
|
|
690
741
|
let options;
|