agntcy-dir 0.5.4 → 0.5.6
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/dist/agntcy-dir.d.ts +182 -62
- package/dist/index.cjs +66 -23
- package/dist/index.mjs +66 -23
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/agntcy-dir.d.ts
CHANGED
|
@@ -180,24 +180,45 @@ export declare class Client {
|
|
|
180
180
|
* Search objects from the Store API matching the specified queries.
|
|
181
181
|
*
|
|
182
182
|
* Performs a search across the storage using the provided search queries
|
|
183
|
-
* and returns a list of matching
|
|
184
|
-
*
|
|
183
|
+
* and returns a list of matching CIDs. This is efficient for lookups
|
|
184
|
+
* where only the CIDs are needed.
|
|
185
185
|
*
|
|
186
|
-
* @param request -
|
|
187
|
-
* @returns Promise that resolves to an array of
|
|
186
|
+
* @param request - SearchCIDsRequest containing queries, filters, and search options
|
|
187
|
+
* @returns Promise that resolves to an array of SearchCIDsResponse objects matching the queries
|
|
188
188
|
*
|
|
189
189
|
* @throws {Error} If the gRPC call fails or the search operation fails
|
|
190
190
|
*
|
|
191
191
|
* @example
|
|
192
192
|
* ```typescript
|
|
193
|
-
* const request =
|
|
194
|
-
* const responses = await client.
|
|
193
|
+
* const request = create(models.search_v1.SearchCIDsRequestSchema, {queries: [query], limit: 10});
|
|
194
|
+
* const responses = await client.searchCIDs(request);
|
|
195
195
|
* for (const response of responses) {
|
|
196
|
-
* console.log(`Found: ${response.
|
|
196
|
+
* console.log(`Found CID: ${response.recordCid}`);
|
|
197
197
|
* }
|
|
198
198
|
* ```
|
|
199
199
|
*/
|
|
200
|
-
|
|
200
|
+
searchCIDs(request: models_2.search_v1.SearchCIDsRequest): Promise<models_2.search_v1.SearchCIDsResponse[]>;
|
|
201
|
+
/**
|
|
202
|
+
* Search for full records from the Store API matching the specified queries.
|
|
203
|
+
*
|
|
204
|
+
* Performs a search across the storage using the provided search queries
|
|
205
|
+
* and returns a list of full records with all metadata.
|
|
206
|
+
*
|
|
207
|
+
* @param request - SearchRecordsRequest containing queries, filters, and search options
|
|
208
|
+
* @returns Promise that resolves to an array of SearchRecordsResponse objects matching the queries
|
|
209
|
+
*
|
|
210
|
+
* @throws {Error} If the gRPC call fails or the search operation fails
|
|
211
|
+
*
|
|
212
|
+
* @example
|
|
213
|
+
* ```typescript
|
|
214
|
+
* const request = create(models.search_v1.SearchRecordsRequestSchema, {queries: [query], limit: 10});
|
|
215
|
+
* const responses = await client.searchRecords(request);
|
|
216
|
+
* for (const response of responses) {
|
|
217
|
+
* console.log(`Found: ${response.record?.name}`);
|
|
218
|
+
* }
|
|
219
|
+
* ```
|
|
220
|
+
*/
|
|
221
|
+
searchRecords(request: models_2.search_v1.SearchRecordsRequest): Promise<models_2.search_v1.SearchRecordsResponse[]>;
|
|
201
222
|
/**
|
|
202
223
|
* Look up metadata for records in the Store API.
|
|
203
224
|
*
|
|
@@ -1791,7 +1812,7 @@ declare type RecordQuery = Message<"agntcy.dir.search.v1.RecordQuery"> & {
|
|
|
1791
1812
|
* { type: RECORD_QUERY_TYPE_SKILL, value: "Natural Language Processing" }
|
|
1792
1813
|
* { type: RECORD_QUERY_TYPE_LOCATOR, value: "helm-chart" }
|
|
1793
1814
|
* { type: RECORD_QUERY_TYPE_DOMAIN, value: "research" }
|
|
1794
|
-
* { type: RECORD_QUERY_TYPE_MODULE, value: "
|
|
1815
|
+
* { type: RECORD_QUERY_TYPE_MODULE, value: "core/llm/model" }
|
|
1795
1816
|
*
|
|
1796
1817
|
* @generated from message agntcy.dir.routing.v1.RecordQuery
|
|
1797
1818
|
*/
|
|
@@ -1877,12 +1898,12 @@ declare enum RecordQueryType {
|
|
|
1877
1898
|
LOCATOR = 5,
|
|
1878
1899
|
|
|
1879
1900
|
/**
|
|
1880
|
-
* Query for a module.
|
|
1901
|
+
* Query for a module name.
|
|
1881
1902
|
* Supports wildcard patterns: "*-plugin", "*-module", "core*", "mod-?", "plugin-[0-9]"
|
|
1882
1903
|
*
|
|
1883
|
-
* @generated from enum value:
|
|
1904
|
+
* @generated from enum value: RECORD_QUERY_TYPE_MODULE_NAME = 6;
|
|
1884
1905
|
*/
|
|
1885
|
-
|
|
1906
|
+
MODULE_NAME = 6,
|
|
1886
1907
|
|
|
1887
1908
|
/**
|
|
1888
1909
|
* Query for a domain ID.
|
|
@@ -1899,6 +1920,38 @@ declare enum RecordQueryType {
|
|
|
1899
1920
|
* @generated from enum value: RECORD_QUERY_TYPE_DOMAIN_NAME = 8;
|
|
1900
1921
|
*/
|
|
1901
1922
|
DOMAIN_NAME = 8,
|
|
1923
|
+
|
|
1924
|
+
/**
|
|
1925
|
+
* Query for a record's created_at timestamp.
|
|
1926
|
+
* Supports wildcard patterns for date strings: "2025-*", ">=2025-01-01"
|
|
1927
|
+
*
|
|
1928
|
+
* @generated from enum value: RECORD_QUERY_TYPE_CREATED_AT = 9;
|
|
1929
|
+
*/
|
|
1930
|
+
CREATED_AT = 9,
|
|
1931
|
+
|
|
1932
|
+
/**
|
|
1933
|
+
* Query for a record author.
|
|
1934
|
+
* Supports wildcard patterns: "AGNTCY*", "*@example.com", "*Team*"
|
|
1935
|
+
*
|
|
1936
|
+
* @generated from enum value: RECORD_QUERY_TYPE_AUTHOR = 10;
|
|
1937
|
+
*/
|
|
1938
|
+
AUTHOR = 10,
|
|
1939
|
+
|
|
1940
|
+
/**
|
|
1941
|
+
* Query for a schema version.
|
|
1942
|
+
* Supports wildcard patterns: "0.7.*", "0.*", "1.0.?"
|
|
1943
|
+
*
|
|
1944
|
+
* @generated from enum value: RECORD_QUERY_TYPE_SCHEMA_VERSION = 11;
|
|
1945
|
+
*/
|
|
1946
|
+
SCHEMA_VERSION = 11,
|
|
1947
|
+
|
|
1948
|
+
/**
|
|
1949
|
+
* Query for a module ID.
|
|
1950
|
+
* Numeric field - exact match only, no wildcard support.
|
|
1951
|
+
*
|
|
1952
|
+
* @generated from enum value: RECORD_QUERY_TYPE_MODULE_ID = 12;
|
|
1953
|
+
*/
|
|
1954
|
+
MODULE_ID = 12,
|
|
1902
1955
|
}
|
|
1903
1956
|
|
|
1904
1957
|
/**
|
|
@@ -2240,50 +2293,72 @@ export declare namespace search_v1 {
|
|
|
2240
2293
|
RecordQueryType,
|
|
2241
2294
|
RecordQueryTypeSchema_2 as RecordQueryTypeSchema,
|
|
2242
2295
|
file_agntcy_dir_search_v1_search_service,
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2296
|
+
SearchCIDsRequest,
|
|
2297
|
+
SearchCIDsRequestSchema,
|
|
2298
|
+
SearchRecordsRequest,
|
|
2299
|
+
SearchRecordsRequestSchema,
|
|
2300
|
+
SearchCIDsResponse,
|
|
2301
|
+
SearchCIDsResponseSchema,
|
|
2302
|
+
SearchRecordsResponse,
|
|
2303
|
+
SearchRecordsResponseSchema,
|
|
2247
2304
|
SearchService
|
|
2248
2305
|
}
|
|
2249
2306
|
}
|
|
2250
2307
|
|
|
2251
2308
|
/**
|
|
2252
|
-
* @generated from message agntcy.dir.
|
|
2309
|
+
* @generated from message agntcy.dir.search.v1.SearchCIDsRequest
|
|
2253
2310
|
*/
|
|
2254
|
-
declare type
|
|
2311
|
+
declare type SearchCIDsRequest = Message<"agntcy.dir.search.v1.SearchCIDsRequest"> & {
|
|
2255
2312
|
/**
|
|
2256
2313
|
* List of queries to match against the records.
|
|
2257
2314
|
*
|
|
2258
|
-
* @generated from field: repeated agntcy.dir.
|
|
2315
|
+
* @generated from field: repeated agntcy.dir.search.v1.RecordQuery queries = 1;
|
|
2259
2316
|
*/
|
|
2260
|
-
queries:
|
|
2317
|
+
queries: RecordQuery[];
|
|
2261
2318
|
|
|
2262
2319
|
/**
|
|
2263
|
-
*
|
|
2264
|
-
* For example, if min_match_score=2, it will return records that match
|
|
2265
|
-
* at least two of the queries.
|
|
2266
|
-
* If not set, it will return records that match at least one query.
|
|
2320
|
+
* Optional limit on the number of results to return.
|
|
2267
2321
|
*
|
|
2268
|
-
* @generated from field: optional uint32
|
|
2322
|
+
* @generated from field: optional uint32 limit = 2;
|
|
2269
2323
|
*/
|
|
2270
|
-
|
|
2324
|
+
limit?: number;
|
|
2271
2325
|
|
|
2272
2326
|
/**
|
|
2273
|
-
*
|
|
2274
|
-
* If not set, it will return all discovered records.
|
|
2275
|
-
* Note that this is a soft limit, as the search may return more results
|
|
2276
|
-
* than the limit if there are multiple peers providing the same record.
|
|
2327
|
+
* Optional offset for pagination of results.
|
|
2277
2328
|
*
|
|
2278
|
-
* @generated from field: optional uint32
|
|
2329
|
+
* @generated from field: optional uint32 offset = 3;
|
|
2279
2330
|
*/
|
|
2280
|
-
|
|
2331
|
+
offset?: number;
|
|
2281
2332
|
};
|
|
2282
2333
|
|
|
2283
2334
|
/**
|
|
2284
|
-
*
|
|
2335
|
+
* Describes the message agntcy.dir.search.v1.SearchCIDsRequest.
|
|
2336
|
+
* Use `create(SearchCIDsRequestSchema)` to create a new message.
|
|
2337
|
+
*/
|
|
2338
|
+
declare const SearchCIDsRequestSchema: GenMessage<SearchCIDsRequest>;
|
|
2339
|
+
|
|
2340
|
+
/**
|
|
2341
|
+
* @generated from message agntcy.dir.search.v1.SearchCIDsResponse
|
|
2285
2342
|
*/
|
|
2286
|
-
declare type
|
|
2343
|
+
declare type SearchCIDsResponse = Message<"agntcy.dir.search.v1.SearchCIDsResponse"> & {
|
|
2344
|
+
/**
|
|
2345
|
+
* The CID of the record that matches the search criteria.
|
|
2346
|
+
*
|
|
2347
|
+
* @generated from field: string record_cid = 1;
|
|
2348
|
+
*/
|
|
2349
|
+
recordCid: string;
|
|
2350
|
+
};
|
|
2351
|
+
|
|
2352
|
+
/**
|
|
2353
|
+
* Describes the message agntcy.dir.search.v1.SearchCIDsResponse.
|
|
2354
|
+
* Use `create(SearchCIDsResponseSchema)` to create a new message.
|
|
2355
|
+
*/
|
|
2356
|
+
declare const SearchCIDsResponseSchema: GenMessage<SearchCIDsResponse>;
|
|
2357
|
+
|
|
2358
|
+
/**
|
|
2359
|
+
* @generated from message agntcy.dir.search.v1.SearchRecordsRequest
|
|
2360
|
+
*/
|
|
2361
|
+
declare type SearchRecordsRequest = Message<"agntcy.dir.search.v1.SearchRecordsRequest"> & {
|
|
2287
2362
|
/**
|
|
2288
2363
|
* List of queries to match against the records.
|
|
2289
2364
|
*
|
|
@@ -2307,16 +2382,66 @@ declare type SearchRequest_2 = Message<"agntcy.dir.search.v1.SearchRequest"> & {
|
|
|
2307
2382
|
};
|
|
2308
2383
|
|
|
2309
2384
|
/**
|
|
2310
|
-
* Describes the message agntcy.dir.
|
|
2311
|
-
* Use `create(
|
|
2385
|
+
* Describes the message agntcy.dir.search.v1.SearchRecordsRequest.
|
|
2386
|
+
* Use `create(SearchRecordsRequestSchema)` to create a new message.
|
|
2312
2387
|
*/
|
|
2313
|
-
declare const
|
|
2388
|
+
declare const SearchRecordsRequestSchema: GenMessage<SearchRecordsRequest>;
|
|
2389
|
+
|
|
2390
|
+
/**
|
|
2391
|
+
* @generated from message agntcy.dir.search.v1.SearchRecordsResponse
|
|
2392
|
+
*/
|
|
2393
|
+
declare type SearchRecordsResponse = Message<"agntcy.dir.search.v1.SearchRecordsResponse"> & {
|
|
2394
|
+
/**
|
|
2395
|
+
* The full record that matches the search criteria.
|
|
2396
|
+
*
|
|
2397
|
+
* @generated from field: agntcy.dir.core.v1.Record record = 1;
|
|
2398
|
+
*/
|
|
2399
|
+
record?: Record_2;
|
|
2400
|
+
};
|
|
2401
|
+
|
|
2402
|
+
/**
|
|
2403
|
+
* Describes the message agntcy.dir.search.v1.SearchRecordsResponse.
|
|
2404
|
+
* Use `create(SearchRecordsResponseSchema)` to create a new message.
|
|
2405
|
+
*/
|
|
2406
|
+
declare const SearchRecordsResponseSchema: GenMessage<SearchRecordsResponse>;
|
|
2314
2407
|
|
|
2315
2408
|
/**
|
|
2316
|
-
*
|
|
2409
|
+
* @generated from message agntcy.dir.routing.v1.SearchRequest
|
|
2410
|
+
*/
|
|
2411
|
+
declare type SearchRequest = Message<"agntcy.dir.routing.v1.SearchRequest"> & {
|
|
2412
|
+
/**
|
|
2413
|
+
* List of queries to match against the records.
|
|
2414
|
+
*
|
|
2415
|
+
* @generated from field: repeated agntcy.dir.routing.v1.RecordQuery queries = 1;
|
|
2416
|
+
*/
|
|
2417
|
+
queries: RecordQuery_2[];
|
|
2418
|
+
|
|
2419
|
+
/**
|
|
2420
|
+
* Minimal target query match score.
|
|
2421
|
+
* For example, if min_match_score=2, it will return records that match
|
|
2422
|
+
* at least two of the queries.
|
|
2423
|
+
* If not set, it will return records that match at least one query.
|
|
2424
|
+
*
|
|
2425
|
+
* @generated from field: optional uint32 min_match_score = 2;
|
|
2426
|
+
*/
|
|
2427
|
+
minMatchScore?: number;
|
|
2428
|
+
|
|
2429
|
+
/**
|
|
2430
|
+
* Limit the number of results returned.
|
|
2431
|
+
* If not set, it will return all discovered records.
|
|
2432
|
+
* Note that this is a soft limit, as the search may return more results
|
|
2433
|
+
* than the limit if there are multiple peers providing the same record.
|
|
2434
|
+
*
|
|
2435
|
+
* @generated from field: optional uint32 limit = 3;
|
|
2436
|
+
*/
|
|
2437
|
+
limit?: number;
|
|
2438
|
+
};
|
|
2439
|
+
|
|
2440
|
+
/**
|
|
2441
|
+
* Describes the message agntcy.dir.routing.v1.SearchRequest.
|
|
2317
2442
|
* Use `create(SearchRequestSchema)` to create a new message.
|
|
2318
2443
|
*/
|
|
2319
|
-
declare const
|
|
2444
|
+
declare const SearchRequestSchema: GenMessage<SearchRequest>;
|
|
2320
2445
|
|
|
2321
2446
|
/**
|
|
2322
2447
|
* @generated from message agntcy.dir.routing.v1.SearchResponse
|
|
@@ -2351,44 +2476,39 @@ declare type SearchResponse = Message<"agntcy.dir.routing.v1.SearchResponse"> &
|
|
|
2351
2476
|
matchScore: number;
|
|
2352
2477
|
};
|
|
2353
2478
|
|
|
2354
|
-
/**
|
|
2355
|
-
* @generated from message agntcy.dir.search.v1.SearchResponse
|
|
2356
|
-
*/
|
|
2357
|
-
declare type SearchResponse_2 = Message<"agntcy.dir.search.v1.SearchResponse"> & {
|
|
2358
|
-
/**
|
|
2359
|
-
* The CID of the record that matches the search criteria.
|
|
2360
|
-
*
|
|
2361
|
-
* @generated from field: string record_cid = 1;
|
|
2362
|
-
*/
|
|
2363
|
-
recordCid: string;
|
|
2364
|
-
};
|
|
2365
|
-
|
|
2366
2479
|
/**
|
|
2367
2480
|
* Describes the message agntcy.dir.routing.v1.SearchResponse.
|
|
2368
2481
|
* Use `create(SearchResponseSchema)` to create a new message.
|
|
2369
2482
|
*/
|
|
2370
2483
|
declare const SearchResponseSchema: GenMessage<SearchResponse>;
|
|
2371
2484
|
|
|
2372
|
-
/**
|
|
2373
|
-
* Describes the message agntcy.dir.search.v1.SearchResponse.
|
|
2374
|
-
* Use `create(SearchResponseSchema)` to create a new message.
|
|
2375
|
-
*/
|
|
2376
|
-
declare const SearchResponseSchema_2: GenMessage<SearchResponse_2>;
|
|
2377
|
-
|
|
2378
2485
|
/**
|
|
2379
2486
|
* @generated from service agntcy.dir.search.v1.SearchService
|
|
2380
2487
|
*/
|
|
2381
2488
|
declare const SearchService: GenService<{
|
|
2382
2489
|
/**
|
|
2383
|
-
*
|
|
2490
|
+
* Search for record CIDs that match the given parameters.
|
|
2491
|
+
* Returns only CIDs for efficient lookups and piping to other commands.
|
|
2384
2492
|
* This operation does not interact with the network.
|
|
2385
2493
|
*
|
|
2386
|
-
* @generated from rpc agntcy.dir.search.v1.SearchService.
|
|
2494
|
+
* @generated from rpc agntcy.dir.search.v1.SearchService.SearchCIDs
|
|
2387
2495
|
*/
|
|
2388
|
-
|
|
2496
|
+
searchCIDs: {
|
|
2497
|
+
methodKind: "server_streaming";
|
|
2498
|
+
input: typeof SearchCIDsRequestSchema;
|
|
2499
|
+
output: typeof SearchCIDsResponseSchema;
|
|
2500
|
+
},
|
|
2501
|
+
/**
|
|
2502
|
+
* Search for full records that match the given parameters.
|
|
2503
|
+
* Returns complete record data including all metadata, skills, domains, etc.
|
|
2504
|
+
* This operation does not interact with the network.
|
|
2505
|
+
*
|
|
2506
|
+
* @generated from rpc agntcy.dir.search.v1.SearchService.SearchRecords
|
|
2507
|
+
*/
|
|
2508
|
+
searchRecords: {
|
|
2389
2509
|
methodKind: "server_streaming";
|
|
2390
|
-
input: typeof
|
|
2391
|
-
output: typeof
|
|
2510
|
+
input: typeof SearchRecordsRequestSchema;
|
|
2511
|
+
output: typeof SearchRecordsResponseSchema;
|
|
2392
2512
|
},
|
|
2393
2513
|
}>;
|
|
2394
2514
|
|
package/dist/index.cjs
CHANGED
|
@@ -9680,7 +9680,7 @@ const RecordQueryType$1 = /*@__PURE__*/
|
|
|
9680
9680
|
* Describes the file agntcy/dir/search/v1/record_query.proto.
|
|
9681
9681
|
*/
|
|
9682
9682
|
const file_agntcy_dir_search_v1_record_query = /*@__PURE__*/
|
|
9683
|
-
fileDesc("
|
|
9683
|
+
fileDesc("CidhZ250Y3kvZGlyL3NlYXJjaC92MS9yZWNvcmRfcXVlcnkucHJvdG8SFGFnbnRjeS5kaXIuc2VhcmNoLnYxIlEKC1JlY29yZFF1ZXJ5EjMKBHR5cGUYASABKA4yJS5hZ250Y3kuZGlyLnNlYXJjaC52MS5SZWNvcmRRdWVyeVR5cGUSDQoFdmFsdWUYAiABKAkqvgMKD1JlY29yZFF1ZXJ5VHlwZRIhCh1SRUNPUkRfUVVFUllfVFlQRV9VTlNQRUNJRklFRBAAEhoKFlJFQ09SRF9RVUVSWV9UWVBFX05BTUUQARIdChlSRUNPUkRfUVVFUllfVFlQRV9WRVJTSU9OEAISHgoaUkVDT1JEX1FVRVJZX1RZUEVfU0tJTExfSUQQAxIgChxSRUNPUkRfUVVFUllfVFlQRV9TS0lMTF9OQU1FEAQSHQoZUkVDT1JEX1FVRVJZX1RZUEVfTE9DQVRPUhAFEiEKHVJFQ09SRF9RVUVSWV9UWVBFX01PRFVMRV9OQU1FEAYSHwobUkVDT1JEX1FVRVJZX1RZUEVfRE9NQUlOX0lEEAcSIQodUkVDT1JEX1FVRVJZX1RZUEVfRE9NQUlOX05BTUUQCBIgChxSRUNPUkRfUVVFUllfVFlQRV9DUkVBVEVEX0FUEAkSHAoYUkVDT1JEX1FVRVJZX1RZUEVfQVVUSE9SEAoSJAogUkVDT1JEX1FVRVJZX1RZUEVfU0NIRU1BX1ZFUlNJT04QCxIfChtSRUNPUkRfUVVFUllfVFlQRV9NT0RVTEVfSUQQDELEAQoYY29tLmFnbnRjeS5kaXIuc2VhcmNoLnYxQhBSZWNvcmRRdWVyeVByb3RvUAFaI2dpdGh1Yi5jb20vYWdudGN5L2Rpci9hcGkvc2VhcmNoL3YxogIDQURTqgIUQWdudGN5LkRpci5TZWFyY2guVjHKAhRBZ250Y3lcRGlyXFNlYXJjaFxWMeICIEFnbnRjeVxEaXJcU2VhcmNoXFYxXEdQQk1ldGFkYXRh6gIXQWdudGN5OjpEaXI6OlNlYXJjaDo6VjFiBnByb3RvMw");
|
|
9684
9684
|
|
|
9685
9685
|
/**
|
|
9686
9686
|
* Describes the message agntcy.dir.search.v1.RecordQuery.
|
|
@@ -9745,14 +9745,14 @@ const RecordQueriesSchema = /*@__PURE__*/
|
|
|
9745
9745
|
* Describes the message agntcy.dir.routing.v1.SearchRequest.
|
|
9746
9746
|
* Use `create(SearchRequestSchema)` to create a new message.
|
|
9747
9747
|
*/
|
|
9748
|
-
const SearchRequestSchema
|
|
9748
|
+
const SearchRequestSchema = /*@__PURE__*/
|
|
9749
9749
|
messageDesc(file_agntcy_dir_routing_v1_routing_service, 4);
|
|
9750
9750
|
|
|
9751
9751
|
/**
|
|
9752
9752
|
* Describes the message agntcy.dir.routing.v1.SearchResponse.
|
|
9753
9753
|
* Use `create(SearchResponseSchema)` to create a new message.
|
|
9754
9754
|
*/
|
|
9755
|
-
const SearchResponseSchema
|
|
9755
|
+
const SearchResponseSchema = /*@__PURE__*/
|
|
9756
9756
|
messageDesc(file_agntcy_dir_routing_v1_routing_service, 5);
|
|
9757
9757
|
|
|
9758
9758
|
/**
|
|
@@ -9881,8 +9881,8 @@ var routing_v1 = /*#__PURE__*/Object.freeze({
|
|
|
9881
9881
|
RecordQueryTypeSchema: RecordQueryTypeSchema$1,
|
|
9882
9882
|
RecordRefsSchema: RecordRefsSchema,
|
|
9883
9883
|
RoutingService: RoutingService,
|
|
9884
|
-
SearchRequestSchema: SearchRequestSchema
|
|
9885
|
-
SearchResponseSchema: SearchResponseSchema
|
|
9884
|
+
SearchRequestSchema: SearchRequestSchema,
|
|
9885
|
+
SearchResponseSchema: SearchResponseSchema,
|
|
9886
9886
|
UnpublishRequestSchema: UnpublishRequestSchema,
|
|
9887
9887
|
file_agntcy_dir_routing_v1_peer: file_agntcy_dir_routing_v1_peer,
|
|
9888
9888
|
file_agntcy_dir_routing_v1_publication_service: file_agntcy_dir_routing_v1_publication_service,
|
|
@@ -9898,22 +9898,36 @@ var routing_v1 = /*#__PURE__*/Object.freeze({
|
|
|
9898
9898
|
* Describes the file agntcy/dir/search/v1/search_service.proto.
|
|
9899
9899
|
*/
|
|
9900
9900
|
const file_agntcy_dir_search_v1_search_service = /*@__PURE__*/
|
|
9901
|
-
fileDesc("
|
|
9901
|
+
fileDesc("CilhZ250Y3kvZGlyL3NlYXJjaC92MS9zZWFyY2hfc2VydmljZS5wcm90bxIUYWdudGN5LmRpci5zZWFyY2gudjEihQEKEVNlYXJjaENJRHNSZXF1ZXN0EjIKB3F1ZXJpZXMYASADKAsyIS5hZ250Y3kuZGlyLnNlYXJjaC52MS5SZWNvcmRRdWVyeRISCgVsaW1pdBgCIAEoDUgAiAEBEhMKBm9mZnNldBgDIAEoDUgBiAEBQggKBl9saW1pdEIJCgdfb2Zmc2V0IogBChRTZWFyY2hSZWNvcmRzUmVxdWVzdBIyCgdxdWVyaWVzGAEgAygLMiEuYWdudGN5LmRpci5zZWFyY2gudjEuUmVjb3JkUXVlcnkSEgoFbGltaXQYAiABKA1IAIgBARITCgZvZmZzZXQYAyABKA1IAYgBAUIICgZfbGltaXRCCQoHX29mZnNldCIoChJTZWFyY2hDSURzUmVzcG9uc2USEgoKcmVjb3JkX2NpZBgBIAEoCSJDChVTZWFyY2hSZWNvcmRzUmVzcG9uc2USKgoGcmVjb3JkGAEgASgLMhouYWdudGN5LmRpci5jb3JlLnYxLlJlY29yZDLeAQoNU2VhcmNoU2VydmljZRJhCgpTZWFyY2hDSURzEicuYWdudGN5LmRpci5zZWFyY2gudjEuU2VhcmNoQ0lEc1JlcXVlc3QaKC5hZ250Y3kuZGlyLnNlYXJjaC52MS5TZWFyY2hDSURzUmVzcG9uc2UwARJqCg1TZWFyY2hSZWNvcmRzEiouYWdudGN5LmRpci5zZWFyY2gudjEuU2VhcmNoUmVjb3Jkc1JlcXVlc3QaKy5hZ250Y3kuZGlyLnNlYXJjaC52MS5TZWFyY2hSZWNvcmRzUmVzcG9uc2UwAULGAQoYY29tLmFnbnRjeS5kaXIuc2VhcmNoLnYxQhJTZWFyY2hTZXJ2aWNlUHJvdG9QAVojZ2l0aHViLmNvbS9hZ250Y3kvZGlyL2FwaS9zZWFyY2gvdjGiAgNBRFOqAhRBZ250Y3kuRGlyLlNlYXJjaC5WMcoCFEFnbnRjeVxEaXJcU2VhcmNoXFYx4gIgQWdudGN5XERpclxTZWFyY2hcVjFcR1BCTWV0YWRhdGHqAhdBZ250Y3k6OkRpcjo6U2VhcmNoOjpWMWIGcHJvdG8z", [file_agntcy_dir_core_v1_record, file_agntcy_dir_search_v1_record_query]);
|
|
9902
9902
|
|
|
9903
9903
|
/**
|
|
9904
|
-
* Describes the message agntcy.dir.search.v1.
|
|
9905
|
-
* Use `create(
|
|
9904
|
+
* Describes the message agntcy.dir.search.v1.SearchCIDsRequest.
|
|
9905
|
+
* Use `create(SearchCIDsRequestSchema)` to create a new message.
|
|
9906
9906
|
*/
|
|
9907
|
-
const
|
|
9907
|
+
const SearchCIDsRequestSchema = /*@__PURE__*/
|
|
9908
9908
|
messageDesc(file_agntcy_dir_search_v1_search_service, 0);
|
|
9909
9909
|
|
|
9910
9910
|
/**
|
|
9911
|
-
* Describes the message agntcy.dir.search.v1.
|
|
9912
|
-
* Use `create(
|
|
9911
|
+
* Describes the message agntcy.dir.search.v1.SearchRecordsRequest.
|
|
9912
|
+
* Use `create(SearchRecordsRequestSchema)` to create a new message.
|
|
9913
9913
|
*/
|
|
9914
|
-
const
|
|
9914
|
+
const SearchRecordsRequestSchema = /*@__PURE__*/
|
|
9915
9915
|
messageDesc(file_agntcy_dir_search_v1_search_service, 1);
|
|
9916
9916
|
|
|
9917
|
+
/**
|
|
9918
|
+
* Describes the message agntcy.dir.search.v1.SearchCIDsResponse.
|
|
9919
|
+
* Use `create(SearchCIDsResponseSchema)` to create a new message.
|
|
9920
|
+
*/
|
|
9921
|
+
const SearchCIDsResponseSchema = /*@__PURE__*/
|
|
9922
|
+
messageDesc(file_agntcy_dir_search_v1_search_service, 2);
|
|
9923
|
+
|
|
9924
|
+
/**
|
|
9925
|
+
* Describes the message agntcy.dir.search.v1.SearchRecordsResponse.
|
|
9926
|
+
* Use `create(SearchRecordsResponseSchema)` to create a new message.
|
|
9927
|
+
*/
|
|
9928
|
+
const SearchRecordsResponseSchema = /*@__PURE__*/
|
|
9929
|
+
messageDesc(file_agntcy_dir_search_v1_search_service, 3);
|
|
9930
|
+
|
|
9917
9931
|
/**
|
|
9918
9932
|
* @generated from service agntcy.dir.search.v1.SearchService
|
|
9919
9933
|
*/
|
|
@@ -9928,8 +9942,10 @@ var search_v1 = /*#__PURE__*/Object.freeze({
|
|
|
9928
9942
|
RecordQuerySchema: RecordQuerySchema,
|
|
9929
9943
|
RecordQueryType: RecordQueryType,
|
|
9930
9944
|
RecordQueryTypeSchema: RecordQueryTypeSchema,
|
|
9931
|
-
|
|
9932
|
-
|
|
9945
|
+
SearchCIDsRequestSchema: SearchCIDsRequestSchema,
|
|
9946
|
+
SearchCIDsResponseSchema: SearchCIDsResponseSchema,
|
|
9947
|
+
SearchRecordsRequestSchema: SearchRecordsRequestSchema,
|
|
9948
|
+
SearchRecordsResponseSchema: SearchRecordsResponseSchema,
|
|
9933
9949
|
SearchService: SearchService,
|
|
9934
9950
|
file_agntcy_dir_search_v1_record_query: file_agntcy_dir_search_v1_record_query,
|
|
9935
9951
|
file_agntcy_dir_search_v1_search_service: file_agntcy_dir_search_v1_search_service
|
|
@@ -10745,26 +10761,53 @@ class Client {
|
|
|
10745
10761
|
* Search objects from the Store API matching the specified queries.
|
|
10746
10762
|
*
|
|
10747
10763
|
* Performs a search across the storage using the provided search queries
|
|
10748
|
-
* and returns a list of matching
|
|
10749
|
-
*
|
|
10764
|
+
* and returns a list of matching CIDs. This is efficient for lookups
|
|
10765
|
+
* where only the CIDs are needed.
|
|
10766
|
+
*
|
|
10767
|
+
* @param request - SearchCIDsRequest containing queries, filters, and search options
|
|
10768
|
+
* @returns Promise that resolves to an array of SearchCIDsResponse objects matching the queries
|
|
10769
|
+
*
|
|
10770
|
+
* @throws {Error} If the gRPC call fails or the search operation fails
|
|
10771
|
+
*
|
|
10772
|
+
* @example
|
|
10773
|
+
* ```typescript
|
|
10774
|
+
* const request = create(models.search_v1.SearchCIDsRequestSchema, {queries: [query], limit: 10});
|
|
10775
|
+
* const responses = await client.searchCIDs(request);
|
|
10776
|
+
* for (const response of responses) {
|
|
10777
|
+
* console.log(`Found CID: ${response.recordCid}`);
|
|
10778
|
+
* }
|
|
10779
|
+
* ```
|
|
10780
|
+
*/
|
|
10781
|
+
async searchCIDs(request) {
|
|
10782
|
+
const responses = [];
|
|
10783
|
+
for await (const response of this.searchClient.searchCIDs(request)) {
|
|
10784
|
+
responses.push(response);
|
|
10785
|
+
}
|
|
10786
|
+
return responses;
|
|
10787
|
+
}
|
|
10788
|
+
/**
|
|
10789
|
+
* Search for full records from the Store API matching the specified queries.
|
|
10790
|
+
*
|
|
10791
|
+
* Performs a search across the storage using the provided search queries
|
|
10792
|
+
* and returns a list of full records with all metadata.
|
|
10750
10793
|
*
|
|
10751
|
-
* @param request -
|
|
10752
|
-
* @returns Promise that resolves to an array of
|
|
10794
|
+
* @param request - SearchRecordsRequest containing queries, filters, and search options
|
|
10795
|
+
* @returns Promise that resolves to an array of SearchRecordsResponse objects matching the queries
|
|
10753
10796
|
*
|
|
10754
10797
|
* @throws {Error} If the gRPC call fails or the search operation fails
|
|
10755
10798
|
*
|
|
10756
10799
|
* @example
|
|
10757
10800
|
* ```typescript
|
|
10758
|
-
* const request =
|
|
10759
|
-
* const responses = await client.
|
|
10801
|
+
* const request = create(models.search_v1.SearchRecordsRequestSchema, {queries: [query], limit: 10});
|
|
10802
|
+
* const responses = await client.searchRecords(request);
|
|
10760
10803
|
* for (const response of responses) {
|
|
10761
|
-
* console.log(`Found: ${response.record
|
|
10804
|
+
* console.log(`Found: ${response.record?.name}`);
|
|
10762
10805
|
* }
|
|
10763
10806
|
* ```
|
|
10764
10807
|
*/
|
|
10765
|
-
async
|
|
10808
|
+
async searchRecords(request) {
|
|
10766
10809
|
const responses = [];
|
|
10767
|
-
for await (const response of this.searchClient.
|
|
10810
|
+
for await (const response of this.searchClient.searchRecords(request)) {
|
|
10768
10811
|
responses.push(response);
|
|
10769
10812
|
}
|
|
10770
10813
|
return responses;
|
package/dist/index.mjs
CHANGED
|
@@ -9656,7 +9656,7 @@ const RecordQueryType$1 = /*@__PURE__*/
|
|
|
9656
9656
|
* Describes the file agntcy/dir/search/v1/record_query.proto.
|
|
9657
9657
|
*/
|
|
9658
9658
|
const file_agntcy_dir_search_v1_record_query = /*@__PURE__*/
|
|
9659
|
-
fileDesc("
|
|
9659
|
+
fileDesc("CidhZ250Y3kvZGlyL3NlYXJjaC92MS9yZWNvcmRfcXVlcnkucHJvdG8SFGFnbnRjeS5kaXIuc2VhcmNoLnYxIlEKC1JlY29yZFF1ZXJ5EjMKBHR5cGUYASABKA4yJS5hZ250Y3kuZGlyLnNlYXJjaC52MS5SZWNvcmRRdWVyeVR5cGUSDQoFdmFsdWUYAiABKAkqvgMKD1JlY29yZFF1ZXJ5VHlwZRIhCh1SRUNPUkRfUVVFUllfVFlQRV9VTlNQRUNJRklFRBAAEhoKFlJFQ09SRF9RVUVSWV9UWVBFX05BTUUQARIdChlSRUNPUkRfUVVFUllfVFlQRV9WRVJTSU9OEAISHgoaUkVDT1JEX1FVRVJZX1RZUEVfU0tJTExfSUQQAxIgChxSRUNPUkRfUVVFUllfVFlQRV9TS0lMTF9OQU1FEAQSHQoZUkVDT1JEX1FVRVJZX1RZUEVfTE9DQVRPUhAFEiEKHVJFQ09SRF9RVUVSWV9UWVBFX01PRFVMRV9OQU1FEAYSHwobUkVDT1JEX1FVRVJZX1RZUEVfRE9NQUlOX0lEEAcSIQodUkVDT1JEX1FVRVJZX1RZUEVfRE9NQUlOX05BTUUQCBIgChxSRUNPUkRfUVVFUllfVFlQRV9DUkVBVEVEX0FUEAkSHAoYUkVDT1JEX1FVRVJZX1RZUEVfQVVUSE9SEAoSJAogUkVDT1JEX1FVRVJZX1RZUEVfU0NIRU1BX1ZFUlNJT04QCxIfChtSRUNPUkRfUVVFUllfVFlQRV9NT0RVTEVfSUQQDELEAQoYY29tLmFnbnRjeS5kaXIuc2VhcmNoLnYxQhBSZWNvcmRRdWVyeVByb3RvUAFaI2dpdGh1Yi5jb20vYWdudGN5L2Rpci9hcGkvc2VhcmNoL3YxogIDQURTqgIUQWdudGN5LkRpci5TZWFyY2guVjHKAhRBZ250Y3lcRGlyXFNlYXJjaFxWMeICIEFnbnRjeVxEaXJcU2VhcmNoXFYxXEdQQk1ldGFkYXRh6gIXQWdudGN5OjpEaXI6OlNlYXJjaDo6VjFiBnByb3RvMw");
|
|
9660
9660
|
|
|
9661
9661
|
/**
|
|
9662
9662
|
* Describes the message agntcy.dir.search.v1.RecordQuery.
|
|
@@ -9721,14 +9721,14 @@ const RecordQueriesSchema = /*@__PURE__*/
|
|
|
9721
9721
|
* Describes the message agntcy.dir.routing.v1.SearchRequest.
|
|
9722
9722
|
* Use `create(SearchRequestSchema)` to create a new message.
|
|
9723
9723
|
*/
|
|
9724
|
-
const SearchRequestSchema
|
|
9724
|
+
const SearchRequestSchema = /*@__PURE__*/
|
|
9725
9725
|
messageDesc(file_agntcy_dir_routing_v1_routing_service, 4);
|
|
9726
9726
|
|
|
9727
9727
|
/**
|
|
9728
9728
|
* Describes the message agntcy.dir.routing.v1.SearchResponse.
|
|
9729
9729
|
* Use `create(SearchResponseSchema)` to create a new message.
|
|
9730
9730
|
*/
|
|
9731
|
-
const SearchResponseSchema
|
|
9731
|
+
const SearchResponseSchema = /*@__PURE__*/
|
|
9732
9732
|
messageDesc(file_agntcy_dir_routing_v1_routing_service, 5);
|
|
9733
9733
|
|
|
9734
9734
|
/**
|
|
@@ -9857,8 +9857,8 @@ var routing_v1 = /*#__PURE__*/Object.freeze({
|
|
|
9857
9857
|
RecordQueryTypeSchema: RecordQueryTypeSchema$1,
|
|
9858
9858
|
RecordRefsSchema: RecordRefsSchema,
|
|
9859
9859
|
RoutingService: RoutingService,
|
|
9860
|
-
SearchRequestSchema: SearchRequestSchema
|
|
9861
|
-
SearchResponseSchema: SearchResponseSchema
|
|
9860
|
+
SearchRequestSchema: SearchRequestSchema,
|
|
9861
|
+
SearchResponseSchema: SearchResponseSchema,
|
|
9862
9862
|
UnpublishRequestSchema: UnpublishRequestSchema,
|
|
9863
9863
|
file_agntcy_dir_routing_v1_peer: file_agntcy_dir_routing_v1_peer,
|
|
9864
9864
|
file_agntcy_dir_routing_v1_publication_service: file_agntcy_dir_routing_v1_publication_service,
|
|
@@ -9874,22 +9874,36 @@ var routing_v1 = /*#__PURE__*/Object.freeze({
|
|
|
9874
9874
|
* Describes the file agntcy/dir/search/v1/search_service.proto.
|
|
9875
9875
|
*/
|
|
9876
9876
|
const file_agntcy_dir_search_v1_search_service = /*@__PURE__*/
|
|
9877
|
-
fileDesc("
|
|
9877
|
+
fileDesc("CilhZ250Y3kvZGlyL3NlYXJjaC92MS9zZWFyY2hfc2VydmljZS5wcm90bxIUYWdudGN5LmRpci5zZWFyY2gudjEihQEKEVNlYXJjaENJRHNSZXF1ZXN0EjIKB3F1ZXJpZXMYASADKAsyIS5hZ250Y3kuZGlyLnNlYXJjaC52MS5SZWNvcmRRdWVyeRISCgVsaW1pdBgCIAEoDUgAiAEBEhMKBm9mZnNldBgDIAEoDUgBiAEBQggKBl9saW1pdEIJCgdfb2Zmc2V0IogBChRTZWFyY2hSZWNvcmRzUmVxdWVzdBIyCgdxdWVyaWVzGAEgAygLMiEuYWdudGN5LmRpci5zZWFyY2gudjEuUmVjb3JkUXVlcnkSEgoFbGltaXQYAiABKA1IAIgBARITCgZvZmZzZXQYAyABKA1IAYgBAUIICgZfbGltaXRCCQoHX29mZnNldCIoChJTZWFyY2hDSURzUmVzcG9uc2USEgoKcmVjb3JkX2NpZBgBIAEoCSJDChVTZWFyY2hSZWNvcmRzUmVzcG9uc2USKgoGcmVjb3JkGAEgASgLMhouYWdudGN5LmRpci5jb3JlLnYxLlJlY29yZDLeAQoNU2VhcmNoU2VydmljZRJhCgpTZWFyY2hDSURzEicuYWdudGN5LmRpci5zZWFyY2gudjEuU2VhcmNoQ0lEc1JlcXVlc3QaKC5hZ250Y3kuZGlyLnNlYXJjaC52MS5TZWFyY2hDSURzUmVzcG9uc2UwARJqCg1TZWFyY2hSZWNvcmRzEiouYWdudGN5LmRpci5zZWFyY2gudjEuU2VhcmNoUmVjb3Jkc1JlcXVlc3QaKy5hZ250Y3kuZGlyLnNlYXJjaC52MS5TZWFyY2hSZWNvcmRzUmVzcG9uc2UwAULGAQoYY29tLmFnbnRjeS5kaXIuc2VhcmNoLnYxQhJTZWFyY2hTZXJ2aWNlUHJvdG9QAVojZ2l0aHViLmNvbS9hZ250Y3kvZGlyL2FwaS9zZWFyY2gvdjGiAgNBRFOqAhRBZ250Y3kuRGlyLlNlYXJjaC5WMcoCFEFnbnRjeVxEaXJcU2VhcmNoXFYx4gIgQWdudGN5XERpclxTZWFyY2hcVjFcR1BCTWV0YWRhdGHqAhdBZ250Y3k6OkRpcjo6U2VhcmNoOjpWMWIGcHJvdG8z", [file_agntcy_dir_core_v1_record, file_agntcy_dir_search_v1_record_query]);
|
|
9878
9878
|
|
|
9879
9879
|
/**
|
|
9880
|
-
* Describes the message agntcy.dir.search.v1.
|
|
9881
|
-
* Use `create(
|
|
9880
|
+
* Describes the message agntcy.dir.search.v1.SearchCIDsRequest.
|
|
9881
|
+
* Use `create(SearchCIDsRequestSchema)` to create a new message.
|
|
9882
9882
|
*/
|
|
9883
|
-
const
|
|
9883
|
+
const SearchCIDsRequestSchema = /*@__PURE__*/
|
|
9884
9884
|
messageDesc(file_agntcy_dir_search_v1_search_service, 0);
|
|
9885
9885
|
|
|
9886
9886
|
/**
|
|
9887
|
-
* Describes the message agntcy.dir.search.v1.
|
|
9888
|
-
* Use `create(
|
|
9887
|
+
* Describes the message agntcy.dir.search.v1.SearchRecordsRequest.
|
|
9888
|
+
* Use `create(SearchRecordsRequestSchema)` to create a new message.
|
|
9889
9889
|
*/
|
|
9890
|
-
const
|
|
9890
|
+
const SearchRecordsRequestSchema = /*@__PURE__*/
|
|
9891
9891
|
messageDesc(file_agntcy_dir_search_v1_search_service, 1);
|
|
9892
9892
|
|
|
9893
|
+
/**
|
|
9894
|
+
* Describes the message agntcy.dir.search.v1.SearchCIDsResponse.
|
|
9895
|
+
* Use `create(SearchCIDsResponseSchema)` to create a new message.
|
|
9896
|
+
*/
|
|
9897
|
+
const SearchCIDsResponseSchema = /*@__PURE__*/
|
|
9898
|
+
messageDesc(file_agntcy_dir_search_v1_search_service, 2);
|
|
9899
|
+
|
|
9900
|
+
/**
|
|
9901
|
+
* Describes the message agntcy.dir.search.v1.SearchRecordsResponse.
|
|
9902
|
+
* Use `create(SearchRecordsResponseSchema)` to create a new message.
|
|
9903
|
+
*/
|
|
9904
|
+
const SearchRecordsResponseSchema = /*@__PURE__*/
|
|
9905
|
+
messageDesc(file_agntcy_dir_search_v1_search_service, 3);
|
|
9906
|
+
|
|
9893
9907
|
/**
|
|
9894
9908
|
* @generated from service agntcy.dir.search.v1.SearchService
|
|
9895
9909
|
*/
|
|
@@ -9904,8 +9918,10 @@ var search_v1 = /*#__PURE__*/Object.freeze({
|
|
|
9904
9918
|
RecordQuerySchema: RecordQuerySchema,
|
|
9905
9919
|
RecordQueryType: RecordQueryType,
|
|
9906
9920
|
RecordQueryTypeSchema: RecordQueryTypeSchema,
|
|
9907
|
-
|
|
9908
|
-
|
|
9921
|
+
SearchCIDsRequestSchema: SearchCIDsRequestSchema,
|
|
9922
|
+
SearchCIDsResponseSchema: SearchCIDsResponseSchema,
|
|
9923
|
+
SearchRecordsRequestSchema: SearchRecordsRequestSchema,
|
|
9924
|
+
SearchRecordsResponseSchema: SearchRecordsResponseSchema,
|
|
9909
9925
|
SearchService: SearchService,
|
|
9910
9926
|
file_agntcy_dir_search_v1_record_query: file_agntcy_dir_search_v1_record_query,
|
|
9911
9927
|
file_agntcy_dir_search_v1_search_service: file_agntcy_dir_search_v1_search_service
|
|
@@ -10721,26 +10737,53 @@ class Client {
|
|
|
10721
10737
|
* Search objects from the Store API matching the specified queries.
|
|
10722
10738
|
*
|
|
10723
10739
|
* Performs a search across the storage using the provided search queries
|
|
10724
|
-
* and returns a list of matching
|
|
10725
|
-
*
|
|
10740
|
+
* and returns a list of matching CIDs. This is efficient for lookups
|
|
10741
|
+
* where only the CIDs are needed.
|
|
10742
|
+
*
|
|
10743
|
+
* @param request - SearchCIDsRequest containing queries, filters, and search options
|
|
10744
|
+
* @returns Promise that resolves to an array of SearchCIDsResponse objects matching the queries
|
|
10745
|
+
*
|
|
10746
|
+
* @throws {Error} If the gRPC call fails or the search operation fails
|
|
10747
|
+
*
|
|
10748
|
+
* @example
|
|
10749
|
+
* ```typescript
|
|
10750
|
+
* const request = create(models.search_v1.SearchCIDsRequestSchema, {queries: [query], limit: 10});
|
|
10751
|
+
* const responses = await client.searchCIDs(request);
|
|
10752
|
+
* for (const response of responses) {
|
|
10753
|
+
* console.log(`Found CID: ${response.recordCid}`);
|
|
10754
|
+
* }
|
|
10755
|
+
* ```
|
|
10756
|
+
*/
|
|
10757
|
+
async searchCIDs(request) {
|
|
10758
|
+
const responses = [];
|
|
10759
|
+
for await (const response of this.searchClient.searchCIDs(request)) {
|
|
10760
|
+
responses.push(response);
|
|
10761
|
+
}
|
|
10762
|
+
return responses;
|
|
10763
|
+
}
|
|
10764
|
+
/**
|
|
10765
|
+
* Search for full records from the Store API matching the specified queries.
|
|
10766
|
+
*
|
|
10767
|
+
* Performs a search across the storage using the provided search queries
|
|
10768
|
+
* and returns a list of full records with all metadata.
|
|
10726
10769
|
*
|
|
10727
|
-
* @param request -
|
|
10728
|
-
* @returns Promise that resolves to an array of
|
|
10770
|
+
* @param request - SearchRecordsRequest containing queries, filters, and search options
|
|
10771
|
+
* @returns Promise that resolves to an array of SearchRecordsResponse objects matching the queries
|
|
10729
10772
|
*
|
|
10730
10773
|
* @throws {Error} If the gRPC call fails or the search operation fails
|
|
10731
10774
|
*
|
|
10732
10775
|
* @example
|
|
10733
10776
|
* ```typescript
|
|
10734
|
-
* const request =
|
|
10735
|
-
* const responses = await client.
|
|
10777
|
+
* const request = create(models.search_v1.SearchRecordsRequestSchema, {queries: [query], limit: 10});
|
|
10778
|
+
* const responses = await client.searchRecords(request);
|
|
10736
10779
|
* for (const response of responses) {
|
|
10737
|
-
* console.log(`Found: ${response.record
|
|
10780
|
+
* console.log(`Found: ${response.record?.name}`);
|
|
10738
10781
|
* }
|
|
10739
10782
|
* ```
|
|
10740
10783
|
*/
|
|
10741
|
-
async
|
|
10784
|
+
async searchRecords(request) {
|
|
10742
10785
|
const responses = [];
|
|
10743
|
-
for await (const response of this.searchClient.
|
|
10786
|
+
for await (const response of this.searchClient.searchRecords(request)) {
|
|
10744
10787
|
responses.push(response);
|
|
10745
10788
|
}
|
|
10746
10789
|
return responses;
|