agntcy-dir 1.3.0 → 1.5.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 -1
- package/dist/agntcy-dir.d.ts +239 -695
- package/dist/index.cjs +1064 -11803
- package/dist/index.mjs +1052 -11788
- package/dist/index.mjs.map +1 -1
- package/package.json +26 -15
package/dist/agntcy-dir.d.ts
CHANGED
|
@@ -1,12 +1,22 @@
|
|
|
1
|
+
import { AICatalog } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/catalog/v1/models_pb';
|
|
2
|
+
import { AICatalogSchema } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/catalog/v1/models_pb';
|
|
3
|
+
import { AIFinderService } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/catalog/v1/ai_finder_service_pb';
|
|
1
4
|
import { BasicAuthCredentials } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/store/v1/sync_service_pb';
|
|
2
5
|
import { BasicAuthCredentialsSchema } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/store/v1/sync_service_pb';
|
|
3
|
-
import {
|
|
6
|
+
import { CatalogCollection } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/catalog/v1/models_pb';
|
|
7
|
+
import { CatalogCollectionSchema } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/catalog/v1/models_pb';
|
|
8
|
+
import { CatalogEntry } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/catalog/v1/models_pb';
|
|
9
|
+
import { CatalogEntrySchema } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/catalog/v1/models_pb';
|
|
4
10
|
import { CreatePublicationResponse } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/routing/v1/publication_service_pb';
|
|
5
11
|
import { CreatePublicationResponseSchema } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/routing/v1/publication_service_pb';
|
|
6
12
|
import { CreateSyncRequest } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/store/v1/sync_service_pb';
|
|
7
13
|
import { CreateSyncRequestSchema } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/store/v1/sync_service_pb';
|
|
8
14
|
import { CreateSyncResponse } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/store/v1/sync_service_pb';
|
|
9
15
|
import { CreateSyncResponseSchema } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/store/v1/sync_service_pb';
|
|
16
|
+
import { DeleteReferrerRequest } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/store/v1/store_service_pb';
|
|
17
|
+
import { DeleteReferrerRequestSchema } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/store/v1/store_service_pb';
|
|
18
|
+
import { DeleteReferrerResponse } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/store/v1/store_service_pb';
|
|
19
|
+
import { DeleteReferrerResponseSchema } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/store/v1/store_service_pb';
|
|
10
20
|
import { DeleteSyncRequest } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/store/v1/sync_service_pb';
|
|
11
21
|
import { DeleteSyncRequestSchema } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/store/v1/sync_service_pb';
|
|
12
22
|
import { DeleteSyncResponse } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/store/v1/sync_service_pb';
|
|
@@ -18,6 +28,10 @@ import { EventSchema } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/events/v1/ev
|
|
|
18
28
|
import { EventService } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/events/v1/event_service_pb';
|
|
19
29
|
import { EventType } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/events/v1/event_service_pb';
|
|
20
30
|
import { EventTypeSchema } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/events/v1/event_service_pb';
|
|
31
|
+
import { ExportAgentRequest } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/catalog/v1/ai_finder_service_pb';
|
|
32
|
+
import { ExportAgentRequestSchema } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/catalog/v1/ai_finder_service_pb';
|
|
33
|
+
import { file_agntcy_dir_catalog_v1_ai_finder_service } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/catalog/v1/ai_finder_service_pb';
|
|
34
|
+
import { file_agntcy_dir_catalog_v1_models } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/catalog/v1/models_pb';
|
|
21
35
|
import { file_agntcy_dir_core_v1_record } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/core/v1/record_pb';
|
|
22
36
|
import { file_agntcy_dir_events_v1_event_service } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/events/v1/event_service_pb';
|
|
23
37
|
import { file_agntcy_dir_naming_v1_name_verification } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/naming/v1/name_verification_pb';
|
|
@@ -33,6 +47,10 @@ import { file_agntcy_dir_sign_v1_sign_service } from '@buf/agntcy_dir.bufbuild_e
|
|
|
33
47
|
import { file_agntcy_dir_sign_v1_signature } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/sign/v1/signature_pb';
|
|
34
48
|
import { file_agntcy_dir_store_v1_store_service } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/store/v1/store_service_pb';
|
|
35
49
|
import { file_agntcy_dir_store_v1_sync_service } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/store/v1/sync_service_pb';
|
|
50
|
+
import { GetAgentRequest } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/catalog/v1/ai_finder_service_pb';
|
|
51
|
+
import { GetAgentRequestSchema } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/catalog/v1/ai_finder_service_pb';
|
|
52
|
+
import { GetAgentResponse } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/catalog/v1/ai_finder_service_pb';
|
|
53
|
+
import { GetAgentResponseSchema } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/catalog/v1/ai_finder_service_pb';
|
|
36
54
|
import { GetPublicationRequest } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/routing/v1/publication_service_pb';
|
|
37
55
|
import { GetPublicationRequestSchema } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/routing/v1/publication_service_pb';
|
|
38
56
|
import { GetPublicationResponse } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/routing/v1/publication_service_pb';
|
|
@@ -45,6 +63,18 @@ import { GetVerificationInfoRequest } from '@buf/agntcy_dir.bufbuild_es/agntcy/d
|
|
|
45
63
|
import { GetVerificationInfoRequestSchema } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/naming/v1/naming_service_pb';
|
|
46
64
|
import { GetVerificationInfoResponse } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/naming/v1/naming_service_pb';
|
|
47
65
|
import { GetVerificationInfoResponseSchema } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/naming/v1/naming_service_pb';
|
|
66
|
+
import { GetWellKnownCatalogRequest } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/catalog/v1/ai_finder_service_pb';
|
|
67
|
+
import { GetWellKnownCatalogRequestSchema } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/catalog/v1/ai_finder_service_pb';
|
|
68
|
+
import { GetWellKnownCatalogResponse } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/catalog/v1/ai_finder_service_pb';
|
|
69
|
+
import { GetWellKnownCatalogResponseSchema } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/catalog/v1/ai_finder_service_pb';
|
|
70
|
+
import { HostInfo } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/catalog/v1/models_pb';
|
|
71
|
+
import { HostInfoSchema } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/catalog/v1/models_pb';
|
|
72
|
+
import { HttpBody } from '@buf/googleapis_googleapis.bufbuild_es/google/api/httpbody_pb';
|
|
73
|
+
import { HttpBodySchema } from '@buf/googleapis_googleapis.bufbuild_es/google/api/httpbody_pb';
|
|
74
|
+
import { ListAgentsRequest } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/catalog/v1/ai_finder_service_pb';
|
|
75
|
+
import { ListAgentsRequestSchema } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/catalog/v1/ai_finder_service_pb';
|
|
76
|
+
import { ListAgentsResponse } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/catalog/v1/ai_finder_service_pb';
|
|
77
|
+
import { ListAgentsResponseSchema } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/catalog/v1/ai_finder_service_pb';
|
|
48
78
|
import { ListenRequest } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/events/v1/event_service_pb';
|
|
49
79
|
import { ListenRequestSchema } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/events/v1/event_service_pb';
|
|
50
80
|
import { ListenResponse } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/events/v1/event_service_pb';
|
|
@@ -169,670 +199,100 @@ import { VerifyWithKey } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/sign/v1/si
|
|
|
169
199
|
import { VerifyWithKeySchema } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/sign/v1/sign_service_pb';
|
|
170
200
|
import { VerifyWithOIDC } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/sign/v1/sign_service_pb';
|
|
171
201
|
import { VerifyWithOIDCSchema } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/sign/v1/sign_service_pb';
|
|
202
|
+
import { WellKnownCatalog } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/catalog/v1/models_pb';
|
|
203
|
+
import { WellKnownCatalogSchema } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/catalog/v1/models_pb';
|
|
172
204
|
|
|
205
|
+
/**
|
|
206
|
+
* Authentication mode for Directory client connections.
|
|
207
|
+
*
|
|
208
|
+
* @public
|
|
209
|
+
*/
|
|
173
210
|
export declare type AuthMode = '' | 'x509' | 'jwt' | 'tls' | 'oidc';
|
|
174
211
|
|
|
175
|
-
export declare
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
212
|
+
export declare namespace catalog_v1 {
|
|
213
|
+
export {
|
|
214
|
+
file_agntcy_dir_catalog_v1_ai_finder_service,
|
|
215
|
+
AIFinderService,
|
|
216
|
+
ExportAgentRequest,
|
|
217
|
+
ExportAgentRequestSchema,
|
|
218
|
+
GetAgentRequest,
|
|
219
|
+
GetAgentRequestSchema,
|
|
220
|
+
GetAgentResponse,
|
|
221
|
+
GetAgentResponseSchema,
|
|
222
|
+
GetWellKnownCatalogRequest,
|
|
223
|
+
GetWellKnownCatalogRequestSchema,
|
|
224
|
+
GetWellKnownCatalogResponse,
|
|
225
|
+
GetWellKnownCatalogResponseSchema,
|
|
226
|
+
ListAgentsRequest,
|
|
227
|
+
ListAgentsRequestSchema,
|
|
228
|
+
ListAgentsResponse,
|
|
229
|
+
ListAgentsResponseSchema,
|
|
230
|
+
file_agntcy_dir_catalog_v1_models,
|
|
231
|
+
AICatalog,
|
|
232
|
+
AICatalogSchema,
|
|
233
|
+
CatalogCollection,
|
|
234
|
+
CatalogCollectionSchema,
|
|
235
|
+
CatalogEntry,
|
|
236
|
+
CatalogEntrySchema,
|
|
237
|
+
HostInfo,
|
|
238
|
+
HostInfoSchema,
|
|
239
|
+
WellKnownCatalog,
|
|
240
|
+
WellKnownCatalogSchema,
|
|
241
|
+
HttpBody,
|
|
242
|
+
HttpBodySchema
|
|
243
|
+
}
|
|
202
244
|
}
|
|
203
245
|
|
|
204
246
|
/**
|
|
205
247
|
* High-level client for interacting with AGNTCY Directory services.
|
|
206
248
|
*
|
|
207
|
-
*
|
|
208
|
-
* It handles gRPC communication and provides convenient methods for common operations
|
|
209
|
-
* including storage, routing, search, signing, and synchronization.
|
|
210
|
-
*
|
|
211
|
-
* @example
|
|
212
|
-
* ```typescript
|
|
213
|
-
* // Create client with default configuration
|
|
214
|
-
* const client = new Client();
|
|
215
|
-
*
|
|
216
|
-
* // Create client with custom configuration
|
|
217
|
-
* const config = new Config('localhost:8888', '/usr/local/bin/dirctl');
|
|
218
|
-
* const client = new Client(config);
|
|
219
|
-
*
|
|
220
|
-
* // Use client for operations
|
|
221
|
-
* const records = await client.push([record]);
|
|
222
|
-
* ```
|
|
249
|
+
* @public
|
|
223
250
|
*/
|
|
224
251
|
export declare class Client {
|
|
225
252
|
config: Config;
|
|
226
|
-
|
|
227
|
-
routingClient: Client_2<typeof models_2.routing_v1.RoutingService>;
|
|
228
|
-
publicationClient: Client_2<typeof models_2.routing_v1.PublicationService>;
|
|
229
|
-
searchClient: Client_2<typeof models_2.search_v1.SearchService>;
|
|
230
|
-
signClient: Client_2<typeof models_2.sign_v1.SignService>;
|
|
231
|
-
syncClient: Client_2<typeof models_2.store_v1.SyncService>;
|
|
232
|
-
eventClient: Client_2<typeof models_2.events_v1.EventService>;
|
|
233
|
-
namingClient: Client_2<typeof models_2.naming_v1.NamingService>;
|
|
234
|
-
private oauthHolder;
|
|
235
|
-
/**
|
|
236
|
-
* Initialize the client with the given configuration.
|
|
237
|
-
*
|
|
238
|
-
* @param config - Optional client configuration. If null, loads from environment
|
|
239
|
-
* variables using Config.loadFromEnv()
|
|
240
|
-
* @param grpcTransport - Optional transport to use for gRPC communication.
|
|
241
|
-
* Can be created with Client.createGRPCTransport(config)
|
|
242
|
-
*
|
|
243
|
-
* @throws {Error} If unable to establish connection to the server or configuration is invalid
|
|
244
|
-
*
|
|
245
|
-
* @example
|
|
246
|
-
* ```typescript
|
|
247
|
-
* // Load config from environment
|
|
248
|
-
* const client = new Client();
|
|
249
|
-
*
|
|
250
|
-
* // Use custom config
|
|
251
|
-
* const config = new Config('localhost:9999');
|
|
252
|
-
* const grpcTransport = await Client.createGRPCTransport(config);
|
|
253
|
-
* const client = new Client(config, grpcTransport);
|
|
254
|
-
* ```
|
|
255
|
-
*/
|
|
256
|
-
constructor();
|
|
257
|
-
constructor(config?: Config);
|
|
253
|
+
readonly oauthSession: OAuthSessionManager;
|
|
258
254
|
constructor(config?: Config, grpcTransport?: Transport);
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
private static createOidcTransport;
|
|
262
|
-
static createGRPCTransport(config: Config, oidcOptions?: {
|
|
263
|
-
oidcTokenHolder: OAuthTokenHolder;
|
|
255
|
+
static createGRPCTransport(config: Config, options?: {
|
|
256
|
+
oidcTokenHolder?: OAuthTokenHolder;
|
|
264
257
|
}): Promise<Transport>;
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
private static createTLSTransport;
|
|
268
|
-
private cachedTokenFromResponse;
|
|
269
|
-
/**
|
|
270
|
-
* Run browser-based OAuth 2.0 Authorization Code + PKCE login (loopback callback).
|
|
271
|
-
*
|
|
272
|
-
* Requires `authMode: 'oidc'`, `oidcIssuer`, and `oidcClientId`.
|
|
273
|
-
*/
|
|
258
|
+
hasCachedOAuthToken(): boolean;
|
|
259
|
+
getAccessToken(): string;
|
|
274
260
|
authenticateOAuthPkce(): Promise<void>;
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
* metadata or associated artifacts.
|
|
305
|
-
*
|
|
306
|
-
* @param requests - Array of PushReferrerRequest objects containing records and optional artifacts
|
|
307
|
-
* @returns Promise that resolves to an array of PushReferrerResponse objects containing the details of pushed artifacts
|
|
308
|
-
*
|
|
309
|
-
* @throws {Error} If the gRPC call fails or the push operation fails
|
|
310
|
-
*
|
|
311
|
-
* @example
|
|
312
|
-
* ```typescript
|
|
313
|
-
* const requests = [new models.store_v1.PushReferrerRequest({record: record})];
|
|
314
|
-
* const responses = await client.push_referrer(requests);
|
|
315
|
-
* ```
|
|
316
|
-
*/
|
|
317
|
-
push_referrer(requests: models_2.store_v1.PushReferrerRequest[]): Promise<models_2.store_v1.PushReferrerResponse[]>;
|
|
318
|
-
/**
|
|
319
|
-
* Pull records from the Store API by their references.
|
|
320
|
-
*
|
|
321
|
-
* Retrieves one or more records from the content store using their
|
|
322
|
-
* content identifiers (CIDs).
|
|
323
|
-
*
|
|
324
|
-
* @param refs - Array of RecordRef objects containing the CIDs to retrieve
|
|
325
|
-
* @returns Promise that resolves to an array of Record objects retrieved from the store
|
|
326
|
-
*
|
|
327
|
-
* @throws {Error} If the gRPC call fails or the pull operation fails
|
|
328
|
-
*
|
|
329
|
-
* @example
|
|
330
|
-
* ```typescript
|
|
331
|
-
* const refs = [new models.core_v1.RecordRef({cid: "QmExample123"})];
|
|
332
|
-
* const records = await client.pull(refs);
|
|
333
|
-
* for (const record of records) {
|
|
334
|
-
* console.log(`Retrieved record: ${record}`);
|
|
335
|
-
* }
|
|
336
|
-
* ```
|
|
337
|
-
*/
|
|
338
|
-
pull(refs: models_2.core_v1.RecordRef[]): Promise<models_2.core_v1.Record[]>;
|
|
339
|
-
/**
|
|
340
|
-
* Pull records with referrer metadata from the Store API.
|
|
341
|
-
*
|
|
342
|
-
* Retrieves records along with their associated artifacts and referrer
|
|
343
|
-
* information. This provides access to complex objects that include
|
|
344
|
-
* additional metadata or associated artifacts.
|
|
345
|
-
*
|
|
346
|
-
* @param requests - Array of PullReferrerRequest objects containing records and optional artifacts for pull operations
|
|
347
|
-
* @returns Promise that resolves to an array of PullReferrerResponse objects containing the retrieved records
|
|
348
|
-
*
|
|
349
|
-
* @throws {Error} If the gRPC call fails or the pull operation fails
|
|
350
|
-
*
|
|
351
|
-
* @example
|
|
352
|
-
* ```typescript
|
|
353
|
-
* const requests = [new models.store_v1.PullReferrerRequest({ref: ref})];
|
|
354
|
-
* const responses = await client.pull_referrer(requests);
|
|
355
|
-
* for (const response of responses) {
|
|
356
|
-
* console.log(`Retrieved: ${response}`);
|
|
357
|
-
* }
|
|
358
|
-
* ```
|
|
359
|
-
*/
|
|
360
|
-
pull_referrer(requests: models_2.store_v1.PullReferrerRequest[]): Promise<models_2.store_v1.PullReferrerResponse[]>;
|
|
361
|
-
/**
|
|
362
|
-
* Search objects from the Store API matching the specified queries.
|
|
363
|
-
*
|
|
364
|
-
* Performs a search across the storage using the provided search queries
|
|
365
|
-
* and returns a list of matching CIDs. This is efficient for lookups
|
|
366
|
-
* where only the CIDs are needed.
|
|
367
|
-
*
|
|
368
|
-
* @param request - SearchCIDsRequest containing queries, filters, and search options
|
|
369
|
-
* @returns Promise that resolves to an array of SearchCIDsResponse objects matching the queries
|
|
370
|
-
*
|
|
371
|
-
* @throws {Error} If the gRPC call fails or the search operation fails
|
|
372
|
-
*
|
|
373
|
-
* @example
|
|
374
|
-
* ```typescript
|
|
375
|
-
* const request = create(models.search_v1.SearchCIDsRequestSchema, {queries: [query], limit: 10});
|
|
376
|
-
* const responses = await client.searchCIDs(request);
|
|
377
|
-
* for (const response of responses) {
|
|
378
|
-
* console.log(`Found CID: ${response.recordCid}`);
|
|
379
|
-
* }
|
|
380
|
-
* ```
|
|
381
|
-
*/
|
|
382
|
-
searchCIDs(request: models_2.search_v1.SearchCIDsRequest): Promise<models_2.search_v1.SearchCIDsResponse[]>;
|
|
383
|
-
/**
|
|
384
|
-
* Search for full records from the Store API matching the specified queries.
|
|
385
|
-
*
|
|
386
|
-
* Performs a search across the storage using the provided search queries
|
|
387
|
-
* and returns a list of full records with all metadata.
|
|
388
|
-
*
|
|
389
|
-
* @param request - SearchRecordsRequest containing queries, filters, and search options
|
|
390
|
-
* @returns Promise that resolves to an array of SearchRecordsResponse objects matching the queries
|
|
391
|
-
*
|
|
392
|
-
* @throws {Error} If the gRPC call fails or the search operation fails
|
|
393
|
-
*
|
|
394
|
-
* @example
|
|
395
|
-
* ```typescript
|
|
396
|
-
* const request = create(models.search_v1.SearchRecordsRequestSchema, {queries: [query], limit: 10});
|
|
397
|
-
* const responses = await client.searchRecords(request);
|
|
398
|
-
* for (const response of responses) {
|
|
399
|
-
* console.log(`Found: ${response.record?.name}`);
|
|
400
|
-
* }
|
|
401
|
-
* ```
|
|
402
|
-
*/
|
|
403
|
-
searchRecords(request: models_2.search_v1.SearchRecordsRequest): Promise<models_2.search_v1.SearchRecordsResponse[]>;
|
|
404
|
-
/**
|
|
405
|
-
* Look up metadata for records in the Store API.
|
|
406
|
-
*
|
|
407
|
-
* Retrieves metadata information for one or more records without
|
|
408
|
-
* downloading the full record content. This is useful for checking
|
|
409
|
-
* if records exist and getting basic information about them.
|
|
410
|
-
*
|
|
411
|
-
* @param refs - Array of RecordRef objects containing the CIDs to look up
|
|
412
|
-
* @returns Promise that resolves to an array of RecordMeta objects containing metadata for the records
|
|
413
|
-
*
|
|
414
|
-
* @throws {Error} If the gRPC call fails or the lookup operation fails
|
|
415
|
-
*
|
|
416
|
-
* @example
|
|
417
|
-
* ```typescript
|
|
418
|
-
* const refs = [new models.core_v1.RecordRef({cid: "QmExample123"})];
|
|
419
|
-
* const metadatas = await client.lookup(refs);
|
|
420
|
-
* for (const meta of metadatas) {
|
|
421
|
-
* console.log(`Record size: ${meta.size}`);
|
|
422
|
-
* }
|
|
423
|
-
* ```
|
|
424
|
-
*/
|
|
425
|
-
lookup(refs: models_2.core_v1.RecordRef[]): Promise<models_2.core_v1.RecordMeta[]>;
|
|
426
|
-
/**
|
|
427
|
-
* List objects from the Routing API matching the specified criteria.
|
|
428
|
-
*
|
|
429
|
-
* Returns a list of objects that match the filtering and
|
|
430
|
-
* query criteria specified in the request.
|
|
431
|
-
*
|
|
432
|
-
* @param request - ListRequest specifying filtering criteria, pagination, etc.
|
|
433
|
-
* @returns Promise that resolves to an array of ListResponse objects matching the criteria
|
|
434
|
-
*
|
|
435
|
-
* @throws {Error} If the gRPC call fails or the list operation fails
|
|
436
|
-
*
|
|
437
|
-
* @example
|
|
438
|
-
* ```typescript
|
|
439
|
-
* const request = new models.routing_v1.ListRequest({limit: 10});
|
|
440
|
-
* const responses = await client.list(request);
|
|
441
|
-
* for (const response of responses) {
|
|
442
|
-
* console.log(`Found object: ${response.cid}`);
|
|
443
|
-
* }
|
|
444
|
-
* ```
|
|
445
|
-
*/
|
|
446
|
-
list(request: models_2.routing_v1.ListRequest): Promise<models_2.routing_v1.ListResponse[]>;
|
|
447
|
-
/**
|
|
448
|
-
* Publish objects to the Routing API matching the specified criteria.
|
|
449
|
-
*
|
|
450
|
-
* Makes the specified objects available for discovery and retrieval by other
|
|
451
|
-
* clients in the network. The objects must already exist in the store before
|
|
452
|
-
* they can be published.
|
|
453
|
-
*
|
|
454
|
-
* @param request - PublishRequest containing the query for the objects to publish
|
|
455
|
-
* @returns Promise that resolves when the publish operation is complete
|
|
456
|
-
*
|
|
457
|
-
* @throws {Error} If the gRPC call fails or the object cannot be published
|
|
458
|
-
*
|
|
459
|
-
* @example
|
|
460
|
-
* ```typescript
|
|
461
|
-
* const ref = new models.routing_v1.RecordRef({cid: "QmExample123"});
|
|
462
|
-
* const request = new models.routing_v1.PublishRequest({recordRefs: [ref]});
|
|
463
|
-
* await client.publish(request);
|
|
464
|
-
* ```
|
|
465
|
-
*/
|
|
466
|
-
publish(request: models_2.routing_v1.PublishRequest): Promise<void>;
|
|
467
|
-
/**
|
|
468
|
-
* Unpublish objects from the Routing API matching the specified criteria.
|
|
469
|
-
*
|
|
470
|
-
* Removes the specified objects from the public network, making them no
|
|
471
|
-
* longer discoverable by other clients. The objects remain in the local
|
|
472
|
-
* store but are not available for network discovery.
|
|
473
|
-
*
|
|
474
|
-
* @param request - UnpublishRequest containing the query for the objects to unpublish
|
|
475
|
-
* @returns Promise that resolves when the unpublish operation is complete
|
|
476
|
-
*
|
|
477
|
-
* @throws {Error} If the gRPC call fails or the objects cannot be unpublished
|
|
478
|
-
*
|
|
479
|
-
* @example
|
|
480
|
-
* ```typescript
|
|
481
|
-
* const ref = new models.routing_v1.RecordRef({cid: "QmExample123"});
|
|
482
|
-
* const request = new models.routing_v1.UnpublishRequest({recordRefs: [ref]});
|
|
483
|
-
* await client.unpublish(request);
|
|
484
|
-
* ```
|
|
485
|
-
*/
|
|
486
|
-
unpublish(request: models_2.routing_v1.UnpublishRequest): Promise<void>;
|
|
487
|
-
/**
|
|
488
|
-
* Delete records from the Store API.
|
|
489
|
-
*
|
|
490
|
-
* Permanently removes one or more records from the content store using
|
|
491
|
-
* their content identifiers (CIDs). This operation cannot be undone.
|
|
492
|
-
*
|
|
493
|
-
* @param refs - Array of RecordRef objects containing the CIDs to delete
|
|
494
|
-
* @returns Promise that resolves when the deletion is complete
|
|
495
|
-
*
|
|
496
|
-
* @throws {Error} If the gRPC call fails or the delete operation fails
|
|
497
|
-
*
|
|
498
|
-
* @example
|
|
499
|
-
* ```typescript
|
|
500
|
-
* const refs = [new models.core_v1.RecordRef({cid: "QmExample123"})];
|
|
501
|
-
* await client.delete(refs);
|
|
502
|
-
* ```
|
|
503
|
-
*/
|
|
504
|
-
delete(refs: models_2.core_v1.RecordRef[]): Promise<void>;
|
|
505
|
-
/**
|
|
506
|
-
* Sign a record with a cryptographic signature.
|
|
507
|
-
*
|
|
508
|
-
* Creates a cryptographic signature for a record using either a private
|
|
509
|
-
* key or OIDC-based signing. The signing process uses the external dirctl
|
|
510
|
-
* command-line tool to perform the actual cryptographic operations.
|
|
511
|
-
*
|
|
512
|
-
* @param req - SignRequest containing the record reference and signing provider
|
|
513
|
-
* configuration. The provider can specify either key-based signing
|
|
514
|
-
* (with a private key) or OIDC-based signing
|
|
515
|
-
* @param oidc_client_id - OIDC client identifier for OIDC-based signing. Defaults to "sigstore"
|
|
516
|
-
* @returns SignResponse containing the signature
|
|
517
|
-
*
|
|
518
|
-
* @throws {Error} If the signing operation fails or unsupported provider is supplied
|
|
519
|
-
*
|
|
520
|
-
* @example
|
|
521
|
-
* ```typescript
|
|
522
|
-
* const req = new models.sign_v1.SignRequest({
|
|
523
|
-
* recordRef: new models.core_v1.RecordRef({cid: "QmExample123"}),
|
|
524
|
-
* provider: new models.sign_v1.SignProvider({key: keyConfig})
|
|
525
|
-
* });
|
|
526
|
-
* const response = client.sign(req);
|
|
527
|
-
* console.log(`Signature: ${response.signature}`);
|
|
528
|
-
* ```
|
|
529
|
-
*/
|
|
530
|
-
sign(req: models_2.sign_v1.SignRequest): void;
|
|
531
|
-
/**
|
|
532
|
-
* Verify a cryptographic signature on a record.
|
|
533
|
-
*
|
|
534
|
-
* Validates the cryptographic signature of a previously signed record
|
|
535
|
-
* to ensure its authenticity and integrity. This operation verifies
|
|
536
|
-
* that the record has not been tampered with since signing.
|
|
537
|
-
*
|
|
538
|
-
* The verification process uses the external dirctl command-line tool
|
|
539
|
-
* to perform the actual cryptographic operations.
|
|
540
|
-
*
|
|
541
|
-
* When fromServer is true, uses the server's cached verification result.
|
|
542
|
-
*
|
|
543
|
-
* @param request - VerifyRequest containing the record reference and verification parameters.
|
|
544
|
-
* The provider can specify either key-based verification (with a public key)
|
|
545
|
-
* or OIDC-based verification
|
|
546
|
-
* @returns VerifyResponse containing the verification result and details
|
|
547
|
-
*
|
|
548
|
-
* @throws {Error} If the verification operation fails or unsupported provider is supplied
|
|
549
|
-
*
|
|
550
|
-
* @example
|
|
551
|
-
* ```typescript
|
|
552
|
-
* const request = new models.sign_v1.VerifyRequest({
|
|
553
|
-
* recordRef: new models.core_v1.RecordRef({cid: "QmExample123"})
|
|
554
|
-
* });
|
|
555
|
-
* const response = client.verify(request);
|
|
556
|
-
* console.log(`Signature valid: ${response.success}`);
|
|
557
|
-
* ```
|
|
558
|
-
*/
|
|
559
|
-
verify(request: models_2.sign_v1.VerifyRequest): Promise<models_2.sign_v1.VerifyResponse>;
|
|
560
|
-
private _verifyViaServer;
|
|
561
|
-
/**
|
|
562
|
-
* Create a new synchronization configuration.
|
|
563
|
-
*
|
|
564
|
-
* Creates a new sync configuration that defines how data should be
|
|
565
|
-
* synchronized between different Directory servers. This allows for
|
|
566
|
-
* automated data replication and consistency across multiple locations.
|
|
567
|
-
*
|
|
568
|
-
* @param request - CreateSyncRequest containing the sync configuration details
|
|
569
|
-
* including source, target, and synchronization parameters
|
|
570
|
-
* @returns Promise that resolves to a CreateSyncResponse containing the created sync details
|
|
571
|
-
* including the sync ID and configuration
|
|
572
|
-
*
|
|
573
|
-
* @throws {Error} If the gRPC call fails or the sync creation fails
|
|
574
|
-
*
|
|
575
|
-
* @example
|
|
576
|
-
* ```typescript
|
|
577
|
-
* const request = new models.store_v1.CreateSyncRequest();
|
|
578
|
-
* const response = await client.create_sync(request);
|
|
579
|
-
* console.log(`Created sync with ID: ${response.syncId}`);
|
|
580
|
-
* ```
|
|
581
|
-
*/
|
|
582
|
-
create_sync(request: models_2.store_v1.CreateSyncRequest): Promise<models_2.store_v1.CreateSyncResponse>;
|
|
583
|
-
/**
|
|
584
|
-
* List existing synchronization configurations.
|
|
585
|
-
*
|
|
586
|
-
* Retrieves a list of all sync configurations that have been created,
|
|
587
|
-
* with optional filtering and pagination support. This allows you to
|
|
588
|
-
* monitor and manage multiple synchronization processes.
|
|
589
|
-
*
|
|
590
|
-
* @param request - ListSyncsRequest containing filtering criteria, pagination options,
|
|
591
|
-
* and other query parameters
|
|
592
|
-
* @returns Promise that resolves to an array of ListSyncsItem objects with
|
|
593
|
-
* their details including ID, name, status, and configuration parameters
|
|
594
|
-
*
|
|
595
|
-
* @throws {Error} If the gRPC call fails or the list operation fails
|
|
596
|
-
*
|
|
597
|
-
* @example
|
|
598
|
-
* ```typescript
|
|
599
|
-
* const request = new models.store_v1.ListSyncsRequest({limit: 10});
|
|
600
|
-
* const syncs = await client.list_syncs(request);
|
|
601
|
-
* for (const sync of syncs) {
|
|
602
|
-
* console.log(`Sync: ${sync}`);
|
|
603
|
-
* }
|
|
604
|
-
* ```
|
|
605
|
-
*/
|
|
606
|
-
list_syncs(request: models_2.store_v1.ListSyncsRequest): Promise<models_2.store_v1.ListSyncsItem[]>;
|
|
607
|
-
/**
|
|
608
|
-
* Retrieve detailed information about a specific synchronization configuration.
|
|
609
|
-
*
|
|
610
|
-
* Gets comprehensive details about a specific sync configuration including
|
|
611
|
-
* its current status, configuration parameters, performance metrics,
|
|
612
|
-
* and any recent errors or warnings.
|
|
613
|
-
*
|
|
614
|
-
* @param request - GetSyncRequest containing the sync ID or identifier to retrieve
|
|
615
|
-
* @returns Promise that resolves to a GetSyncResponse with detailed information about the sync configuration
|
|
616
|
-
* including status, metrics, configuration, and logs
|
|
617
|
-
*
|
|
618
|
-
* @throws {Error} If the gRPC call fails or the get operation fails
|
|
619
|
-
*
|
|
620
|
-
* @example
|
|
621
|
-
* ```typescript
|
|
622
|
-
* const request = new models.store_v1.GetSyncRequest({syncId: "sync-123"});
|
|
623
|
-
* const response = await client.get_sync(request);
|
|
624
|
-
* console.log(`Sync status: ${response.status}`);
|
|
625
|
-
* console.log(`Last update: ${response.lastUpdateTime}`);
|
|
626
|
-
* ```
|
|
627
|
-
*/
|
|
628
|
-
get_sync(request: models_2.store_v1.GetSyncRequest): Promise<models_2.store_v1.GetSyncResponse>;
|
|
629
|
-
/**
|
|
630
|
-
* Delete a synchronization configuration.
|
|
631
|
-
*
|
|
632
|
-
* Permanently removes a sync configuration and stops any ongoing
|
|
633
|
-
* synchronization processes. This operation cannot be undone and
|
|
634
|
-
* will halt all data synchronization for the specified configuration.
|
|
635
|
-
*
|
|
636
|
-
* @param request - DeleteSyncRequest containing the sync ID or identifier to delete
|
|
637
|
-
* @returns Promise that resolves to a DeleteSyncResponse when the deletion is complete
|
|
638
|
-
*
|
|
639
|
-
* @throws {Error} If the gRPC call fails or the delete operation fails
|
|
640
|
-
*
|
|
641
|
-
* @example
|
|
642
|
-
* ```typescript
|
|
643
|
-
* const request = new models.store_v1.DeleteSyncRequest({syncId: "sync-123"});
|
|
644
|
-
* await client.delete_sync(request);
|
|
645
|
-
* console.log("Sync deleted");
|
|
646
|
-
* ```
|
|
647
|
-
*/
|
|
648
|
-
delete_sync(request: models_2.store_v1.DeleteSyncRequest): Promise<models_2.store_v1.DeleteSyncResponse>;
|
|
649
|
-
/**
|
|
650
|
-
* Get events from the Event API matching the specified criteria.
|
|
651
|
-
*
|
|
652
|
-
* Retrieves a list of events that match the filtering and query criteria
|
|
653
|
-
* specified in the request.
|
|
654
|
-
*
|
|
655
|
-
* @param request - ListenRequest specifying filtering criteria, pagination, etc.
|
|
656
|
-
* @returns Promise that resolves to an array of ListenResponse objects matching the criteria
|
|
657
|
-
*
|
|
658
|
-
* @throws {Error} If the gRPC call fails or the get events operation fails
|
|
659
|
-
*/
|
|
660
|
-
listen(request: models_2.events_v1.ListenRequest): AsyncIterable<models_2.events_v1.ListenResponse>;
|
|
661
|
-
/**
|
|
662
|
-
* CreatePublication creates a new publication request that will be processed by the PublicationWorker.
|
|
663
|
-
* The publication request can specify either a query, a list of specific CIDs,
|
|
664
|
-
* or all records to be announced to the DHT.
|
|
665
|
-
*
|
|
666
|
-
* @param request - PublishRequest containing record references and queries options.
|
|
667
|
-
*
|
|
668
|
-
* @returns CreatePublicationResponse returns the result of creating a publication request.
|
|
669
|
-
* This includes the publication ID and any relevant metadata.
|
|
670
|
-
*
|
|
671
|
-
* @throws {Error} If the gRPC call fails or the list operation fails
|
|
672
|
-
*/
|
|
673
|
-
create_publication(request: models_2.routing_v1.PublishRequest): Promise<models_2.routing_v1.CreatePublicationResponse>;
|
|
674
|
-
/**
|
|
675
|
-
* ListPublications returns a stream of all publication requests in the system.
|
|
676
|
-
* This allows monitoring of pending, processing, and completed publication requests.
|
|
677
|
-
*
|
|
678
|
-
* @param request - ListPublicationsRequest contains optional filters for listing publication requests.
|
|
679
|
-
*
|
|
680
|
-
* @returns Promise that resolves to an array of ListPublicationsItem represents
|
|
681
|
-
* a single publication request in the list response.
|
|
682
|
-
* Contains publication details including ID, status, and creation timestamp.
|
|
683
|
-
*
|
|
684
|
-
* @throws {Error} If the gRPC call fails or the list operation fails
|
|
685
|
-
*/
|
|
686
|
-
list_publication(request: models_2.routing_v1.ListPublicationsRequest): Promise<models_2.routing_v1.ListPublicationsItem[]>;
|
|
687
|
-
/**
|
|
688
|
-
* GetPublication retrieves details of a specific publication request by its identifier.
|
|
689
|
-
* This includes the current status and any associated metadata.
|
|
690
|
-
*
|
|
691
|
-
* @param request - GetPublicationRequest specifies which publication to retrieve by its identifier.
|
|
692
|
-
*
|
|
693
|
-
* @returns GetPublicationResponse contains the full details of a specific publication request.
|
|
694
|
-
* Includes status, progress information, and any error details if applicable.
|
|
695
|
-
*
|
|
696
|
-
* @throws {Error} If the gRPC call fails or the get operation fails
|
|
697
|
-
*/
|
|
698
|
-
get_publication(request: models_2.routing_v1.GetPublicationRequest): Promise<models_2.routing_v1.GetPublicationResponse>;
|
|
699
|
-
/**
|
|
700
|
-
* Resolve a record name to CIDs.
|
|
701
|
-
*
|
|
702
|
-
* Resolves a record reference (name with optional version) to content identifiers (CIDs).
|
|
703
|
-
* When no version is specified, returns all versions sorted by creation time (newest first).
|
|
704
|
-
*
|
|
705
|
-
* @param request - ResolveRequest containing the name and optional version
|
|
706
|
-
* @returns Promise that resolves to a ResolveResponse containing the resolved record references
|
|
707
|
-
*
|
|
708
|
-
* @throws {Error} If the gRPC call fails or the resolve operation fails
|
|
709
|
-
*
|
|
710
|
-
* @example
|
|
711
|
-
* ```typescript
|
|
712
|
-
* import { create } from "@bufbuild/protobuf";
|
|
713
|
-
*
|
|
714
|
-
* // Resolve latest version
|
|
715
|
-
* const request = create(models.naming_v1.ResolveRequestSchema, { name: "cisco.com/agent" });
|
|
716
|
-
* const response = await client.resolve(request);
|
|
717
|
-
* console.log(`Latest CID: ${response.records[0].cid}`);
|
|
718
|
-
*
|
|
719
|
-
* // Resolve specific version
|
|
720
|
-
* const request = create(models.naming_v1.ResolveRequestSchema, { name: "cisco.com/agent", version: "v1.0.0" });
|
|
721
|
-
* const response = await client.resolve(request);
|
|
722
|
-
* ```
|
|
723
|
-
*/
|
|
724
|
-
resolve(request: models_2.naming_v1.ResolveRequest): Promise<models_2.naming_v1.ResolveResponse>;
|
|
725
|
-
/**
|
|
726
|
-
* Get verification info for a record.
|
|
727
|
-
*
|
|
728
|
-
* Retrieves the name verification status for a record. Can look up by CID directly
|
|
729
|
-
* or by name (with optional version) which will be resolved first.
|
|
730
|
-
*
|
|
731
|
-
* @param request - GetVerificationInfoRequest containing cid, name, and/or version
|
|
732
|
-
* @returns Promise that resolves to a GetVerificationInfoResponse containing verification status
|
|
733
|
-
*
|
|
734
|
-
* @throws {Error} If the gRPC call fails or the operation fails
|
|
735
|
-
*
|
|
736
|
-
* @example
|
|
737
|
-
* ```typescript
|
|
738
|
-
* import { create } from "@bufbuild/protobuf";
|
|
739
|
-
*
|
|
740
|
-
* // Check by CID
|
|
741
|
-
* const request = create(models.naming_v1.GetVerificationInfoRequestSchema, { cid: "bafyreib..." });
|
|
742
|
-
* const response = await client.getVerificationInfo(request);
|
|
743
|
-
*
|
|
744
|
-
* // Check by name (latest version)
|
|
745
|
-
* const request = create(models.naming_v1.GetVerificationInfoRequestSchema, { name: "cisco.com/agent" });
|
|
746
|
-
* const response = await client.getVerificationInfo(request);
|
|
747
|
-
*
|
|
748
|
-
* // Check by name with specific version
|
|
749
|
-
* const request = create(models.naming_v1.GetVerificationInfoRequestSchema, { name: "cisco.com/agent", version: "v1.0.0" });
|
|
750
|
-
* const response = await client.getVerificationInfo(request);
|
|
751
|
-
* ```
|
|
752
|
-
*/
|
|
753
|
-
getVerificationInfo(request: models_2.naming_v1.GetVerificationInfoRequest): Promise<models_2.naming_v1.GetVerificationInfoResponse>;
|
|
754
|
-
/**
|
|
755
|
-
* Sign a record using a private key.
|
|
756
|
-
*
|
|
757
|
-
* This private method handles key-based signing by passing the key reference
|
|
758
|
-
* directly to the dirctl command. The key can be a file path, URL, or KMS URI.
|
|
759
|
-
*
|
|
760
|
-
* @param cid - Content identifier of the record to sign
|
|
761
|
-
* @param req - SignWithKey request containing the private key reference
|
|
762
|
-
* @returns SignResponse containing the signature
|
|
763
|
-
*
|
|
764
|
-
* @throws {Error} If any error occurs during signing
|
|
765
|
-
*
|
|
766
|
-
* @private
|
|
767
|
-
*/
|
|
768
|
-
private __sign_with_key;
|
|
769
|
-
/**
|
|
770
|
-
* Sign a record using OIDC-based authentication.
|
|
771
|
-
*
|
|
772
|
-
* This private method handles OIDC-based signing by building the appropriate
|
|
773
|
-
* dirctl command with OIDC parameters and executing it.
|
|
774
|
-
*
|
|
775
|
-
* @param cid - Content identifier of the record to sign
|
|
776
|
-
* @param req - SignWithOIDC request containing the OIDC configuration
|
|
777
|
-
* @returns SignResponse containing the signature
|
|
778
|
-
*
|
|
779
|
-
* @throws {Error} If any error occurs during signing
|
|
780
|
-
*
|
|
781
|
-
* @private
|
|
782
|
-
*/
|
|
783
|
-
private __sign_with_oidc;
|
|
784
|
-
/**
|
|
785
|
-
* Verify a record using a public key.
|
|
786
|
-
*
|
|
787
|
-
* This private method handles key-based verification by passing the public key
|
|
788
|
-
* reference to the dirctl command. The key can be a file path, URL, or KMS URI.
|
|
789
|
-
*
|
|
790
|
-
* @param cid - Content identifier of the record to verify
|
|
791
|
-
* @param req - VerifyWithKey request containing the public key reference
|
|
792
|
-
* @param outputPath - Path to the output file for the verification result
|
|
793
|
-
*
|
|
794
|
-
* @throws {Error} If any error occurs during verification
|
|
795
|
-
*
|
|
796
|
-
* @private
|
|
797
|
-
*/
|
|
798
|
-
private __verify_with_key;
|
|
799
|
-
/**
|
|
800
|
-
* Verify a record with any valid signature.
|
|
801
|
-
*
|
|
802
|
-
* This private method handles verification that accepts any valid signature,
|
|
803
|
-
* with optional OIDC verification options for additional constraints.
|
|
804
|
-
*
|
|
805
|
-
* @param cid - Content identifier of the record to verify
|
|
806
|
-
* @param req - VerifyWithAny request containing optional OIDC options, or undefined for default verification
|
|
807
|
-
* @param outputPath - Path to the output file for the verification result
|
|
808
|
-
*
|
|
809
|
-
* @throws {Error} If any error occurs during verification
|
|
810
|
-
*
|
|
811
|
-
* @private
|
|
812
|
-
*/
|
|
813
|
-
private __verify_with_any;
|
|
814
|
-
/**
|
|
815
|
-
* Verify a record using OIDC-based verification.
|
|
816
|
-
*
|
|
817
|
-
* This private method handles OIDC-based verification by building the appropriate
|
|
818
|
-
* dirctl command with OIDC parameters and executing it.
|
|
819
|
-
*
|
|
820
|
-
* @param cid - Content identifier of the record to verify
|
|
821
|
-
* @param req - VerifyWithOIDC request containing the OIDC configuration, or undefined for default verification
|
|
822
|
-
* @param outputPath - Path to the output file for the verification result
|
|
823
|
-
*
|
|
824
|
-
* @throws {Error} If any error occurs during verification
|
|
825
|
-
*
|
|
826
|
-
* @private
|
|
827
|
-
*/
|
|
828
|
-
private __verify_with_oidc;
|
|
261
|
+
push(records: Record_2[]): Promise<RecordRef[]>;
|
|
262
|
+
push_referrer(requests: PushReferrerRequest[]): Promise<PushReferrerResponse[]>;
|
|
263
|
+
pull(refs: RecordRef[]): Promise<Record_2[]>;
|
|
264
|
+
pull_referrer(requests: PullReferrerRequest[]): Promise<PullReferrerResponse[]>;
|
|
265
|
+
searchCIDs(request: SearchCIDsRequest): Promise<SearchCIDsResponse[]>;
|
|
266
|
+
searchRecords(request: SearchRecordsRequest): Promise<SearchRecordsResponse[]>;
|
|
267
|
+
lookup(refs: RecordRef[]): Promise<RecordMeta[]>;
|
|
268
|
+
list(request: ListRequest): Promise<ListResponse[]>;
|
|
269
|
+
searchRouting(request: SearchRequest): Promise<SearchResponse[]>;
|
|
270
|
+
publish(request: PublishRequest): Promise<void>;
|
|
271
|
+
unpublish(request: UnpublishRequest): Promise<void>;
|
|
272
|
+
delete(refs: RecordRef[]): Promise<void>;
|
|
273
|
+
deleteReferrer(request: DeleteReferrerRequest): Promise<DeleteReferrerResponse>;
|
|
274
|
+
sign(req: SignRequest): void;
|
|
275
|
+
verify(request: VerifyRequest): Promise<VerifyResponse>;
|
|
276
|
+
create_sync(request: CreateSyncRequest): Promise<CreateSyncResponse>;
|
|
277
|
+
list_syncs(request: ListSyncsRequest): Promise<ListSyncsItem[]>;
|
|
278
|
+
get_sync(request: GetSyncRequest): Promise<GetSyncResponse>;
|
|
279
|
+
delete_sync(request: DeleteSyncRequest): Promise<DeleteSyncResponse>;
|
|
280
|
+
listen(request: ListenRequest): AsyncIterable<ListenResponse>;
|
|
281
|
+
create_publication(request: PublishRequest): Promise<CreatePublicationResponse>;
|
|
282
|
+
list_publication(request: ListPublicationsRequest): Promise<ListPublicationsItem[]>;
|
|
283
|
+
get_publication(request: GetPublicationRequest): Promise<GetPublicationResponse>;
|
|
284
|
+
resolve(request: ResolveRequest): Promise<ResolveResponse>;
|
|
285
|
+
getVerificationInfo(request: GetVerificationInfoRequest): Promise<GetVerificationInfoResponse>;
|
|
286
|
+
listAgents(request: ListAgentsRequest): Promise<ListAgentsResponse>;
|
|
287
|
+
getAgent(request: GetAgentRequest): Promise<GetAgentResponse>;
|
|
288
|
+
exportAgent(request: ExportAgentRequest): Promise<HttpBody>;
|
|
289
|
+
getWellKnownCatalog(request: GetWellKnownCatalogRequest): Promise<GetWellKnownCatalogResponse>;
|
|
829
290
|
}
|
|
830
291
|
|
|
831
292
|
/**
|
|
832
293
|
* Configuration class for the AGNTCY Directory client.
|
|
833
294
|
*
|
|
834
|
-
*
|
|
835
|
-
* and provides default values and environment-based configuration loading.
|
|
295
|
+
* @public
|
|
836
296
|
*/
|
|
837
297
|
export declare class Config {
|
|
838
298
|
static DEFAULT_SERVER_ADDRESS: string;
|
|
@@ -874,31 +334,7 @@ export declare class Config {
|
|
|
874
334
|
oidcAuthTimeout: number;
|
|
875
335
|
oidcScopes: string[];
|
|
876
336
|
dockerConfig: DockerConfig | undefined;
|
|
877
|
-
/**
|
|
878
|
-
* Creates a new Config instance.
|
|
879
|
-
*
|
|
880
|
-
* @param serverAddress - The server address to connect to. Defaults to '127.0.0.1:8888'
|
|
881
|
-
* @param dirctlPath - Path to the dirctl executable. Defaults to 'dirctl'
|
|
882
|
-
* @param spiffeEndpointSocket - Path to the spire server socket. Defaults to empty string.
|
|
883
|
-
* @param authMode - Authentication mode: '' for insecure, 'x509', 'jwt', 'tls', or 'oidc'. Defaults to ''
|
|
884
|
-
* @param jwtAudience - JWT audience for JWT authentication. Required when authMode is 'jwt'
|
|
885
|
-
*/
|
|
886
337
|
constructor(serverAddress?: string, dirctlPath?: string, spiffeEndpointSocket?: string, authMode?: AuthMode, jwtAudience?: string, tlsCaFile?: string, tlsCertFile?: string, tlsKeyFile?: string, authToken?: string, tlsServerName?: string, tlsSkipVerify?: boolean, oidcIssuer?: string, oidcClientId?: string, oidcClientSecret?: string, oidcRedirectUri?: string, oidcCallbackPort?: number, oidcAuthTimeout?: number, oidcScopes?: string[] | undefined, oidcAccessToken?: string | undefined, dockerConfig?: DockerConfig | undefined);
|
|
887
|
-
/**
|
|
888
|
-
* Load configuration from environment variables.
|
|
889
|
-
*
|
|
890
|
-
* @param prefix - Environment variable prefix. Defaults to 'DIRECTORY_CLIENT_'
|
|
891
|
-
* @returns A new Config instance with values loaded from environment variables
|
|
892
|
-
*
|
|
893
|
-
* @example
|
|
894
|
-
* ```typescript
|
|
895
|
-
* // Load with default prefix
|
|
896
|
-
* const config = Config.loadFromEnv();
|
|
897
|
-
*
|
|
898
|
-
* // Load with custom prefix
|
|
899
|
-
* const config = Config.loadFromEnv("MY_APP_");
|
|
900
|
-
* ```
|
|
901
|
-
*/
|
|
902
338
|
static loadFromEnv(prefix?: string): Config;
|
|
903
339
|
getCommandAndArgs(args: string[]): [string, string[]];
|
|
904
340
|
}
|
|
@@ -919,7 +355,26 @@ export declare namespace core_v1 {
|
|
|
919
355
|
}
|
|
920
356
|
}
|
|
921
357
|
|
|
922
|
-
|
|
358
|
+
export { CreatePublicationResponse }
|
|
359
|
+
|
|
360
|
+
export { CreateSyncRequest }
|
|
361
|
+
|
|
362
|
+
export { CreateSyncResponse }
|
|
363
|
+
|
|
364
|
+
export { DeleteReferrerRequest }
|
|
365
|
+
|
|
366
|
+
export { DeleteReferrerResponse }
|
|
367
|
+
|
|
368
|
+
export { DeleteSyncRequest }
|
|
369
|
+
|
|
370
|
+
export { DeleteSyncResponse }
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* Docker invocation settings for running dirctl in a container.
|
|
374
|
+
*
|
|
375
|
+
* @public
|
|
376
|
+
*/
|
|
377
|
+
export declare class DockerConfig {
|
|
923
378
|
static DEFAULT_DIRCTL_IMAGE: string;
|
|
924
379
|
static DEFAULT_DIRCTL_IMAGE_TAG: string;
|
|
925
380
|
dirctlImage: string;
|
|
@@ -947,20 +402,53 @@ export declare namespace events_v1 {
|
|
|
947
402
|
}
|
|
948
403
|
}
|
|
949
404
|
|
|
950
|
-
export
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
}
|
|
405
|
+
export { ExportAgentRequest }
|
|
406
|
+
|
|
407
|
+
export { GetAgentRequest }
|
|
408
|
+
|
|
409
|
+
export { GetAgentResponse }
|
|
410
|
+
|
|
411
|
+
export { GetPublicationRequest }
|
|
412
|
+
|
|
413
|
+
export { GetPublicationResponse }
|
|
414
|
+
|
|
415
|
+
export { GetSyncRequest }
|
|
416
|
+
|
|
417
|
+
export { GetSyncResponse }
|
|
418
|
+
|
|
419
|
+
export { GetVerificationInfoRequest }
|
|
420
|
+
|
|
421
|
+
export { GetVerificationInfoResponse }
|
|
422
|
+
|
|
423
|
+
export { GetWellKnownCatalogRequest }
|
|
424
|
+
|
|
425
|
+
export { GetWellKnownCatalogResponse }
|
|
961
426
|
|
|
962
|
-
|
|
427
|
+
export { HttpBody }
|
|
428
|
+
|
|
429
|
+
export { ListAgentsRequest }
|
|
430
|
+
|
|
431
|
+
export { ListAgentsResponse }
|
|
432
|
+
|
|
433
|
+
export { ListenRequest }
|
|
434
|
+
|
|
435
|
+
export { ListenResponse }
|
|
436
|
+
|
|
437
|
+
export { ListPublicationsItem }
|
|
438
|
+
|
|
439
|
+
export { ListPublicationsRequest }
|
|
440
|
+
|
|
441
|
+
export { ListRequest }
|
|
442
|
+
|
|
443
|
+
export { ListResponse }
|
|
444
|
+
|
|
445
|
+
export { ListSyncsItem }
|
|
446
|
+
|
|
447
|
+
export { ListSyncsRequest }
|
|
448
|
+
|
|
449
|
+
export declare namespace models {
|
|
963
450
|
export {
|
|
451
|
+
catalog_v1,
|
|
964
452
|
core_v1,
|
|
965
453
|
naming_v1,
|
|
966
454
|
routing_v1,
|
|
@@ -991,10 +479,35 @@ export declare namespace naming_v1 {
|
|
|
991
479
|
}
|
|
992
480
|
}
|
|
993
481
|
|
|
482
|
+
/**
|
|
483
|
+
* Error thrown when OAuth PKCE authentication fails.
|
|
484
|
+
*
|
|
485
|
+
* @public
|
|
486
|
+
*/
|
|
994
487
|
export declare class OAuthPkceError extends Error {
|
|
995
488
|
constructor(message: string);
|
|
996
489
|
}
|
|
997
490
|
|
|
491
|
+
/**
|
|
492
|
+
* Coordinates OIDC token state with interactive PKCE flow and cache.
|
|
493
|
+
*
|
|
494
|
+
* @public
|
|
495
|
+
*/
|
|
496
|
+
export declare class OAuthSessionManager {
|
|
497
|
+
readonly config: Config;
|
|
498
|
+
private readonly tokenCache;
|
|
499
|
+
private _oauthHolder;
|
|
500
|
+
constructor(config: Config);
|
|
501
|
+
get oauthHolder(): OAuthTokenHolder | null;
|
|
502
|
+
hasAccessToken(): boolean;
|
|
503
|
+
authenticate(): Promise<void>;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
/**
|
|
507
|
+
* Holds an OAuth access token for Connect transport interceptors.
|
|
508
|
+
*
|
|
509
|
+
* @public
|
|
510
|
+
*/
|
|
998
511
|
export declare class OAuthTokenHolder {
|
|
999
512
|
private accessToken;
|
|
1000
513
|
setTokens(accessToken: string): void;
|
|
@@ -1002,6 +515,26 @@ export declare class OAuthTokenHolder {
|
|
|
1002
515
|
getAccessToken(): string;
|
|
1003
516
|
}
|
|
1004
517
|
|
|
518
|
+
export { PublishRequest }
|
|
519
|
+
|
|
520
|
+
export { PullReferrerRequest }
|
|
521
|
+
|
|
522
|
+
export { PullReferrerResponse }
|
|
523
|
+
|
|
524
|
+
export { PushReferrerRequest }
|
|
525
|
+
|
|
526
|
+
export { PushReferrerResponse }
|
|
527
|
+
|
|
528
|
+
export { Record_2 as Record }
|
|
529
|
+
|
|
530
|
+
export { RecordMeta }
|
|
531
|
+
|
|
532
|
+
export { RecordRef }
|
|
533
|
+
|
|
534
|
+
export { ResolveRequest }
|
|
535
|
+
|
|
536
|
+
export { ResolveResponse }
|
|
537
|
+
|
|
1005
538
|
export declare namespace routing_v1 {
|
|
1006
539
|
export {
|
|
1007
540
|
file_agntcy_dir_routing_v1_peer,
|
|
@@ -1069,6 +602,18 @@ export declare namespace search_v1 {
|
|
|
1069
602
|
}
|
|
1070
603
|
}
|
|
1071
604
|
|
|
605
|
+
export { SearchCIDsRequest }
|
|
606
|
+
|
|
607
|
+
export { SearchCIDsResponse }
|
|
608
|
+
|
|
609
|
+
export { SearchRecordsRequest }
|
|
610
|
+
|
|
611
|
+
export { SearchRecordsResponse }
|
|
612
|
+
|
|
613
|
+
export { SearchRequest }
|
|
614
|
+
|
|
615
|
+
export { SearchResponse }
|
|
616
|
+
|
|
1072
617
|
export declare namespace sign_v1 {
|
|
1073
618
|
export {
|
|
1074
619
|
file_agntcy_dir_sign_v1_sign_service,
|
|
@@ -1114,6 +659,8 @@ export declare namespace sign_v1 {
|
|
|
1114
659
|
}
|
|
1115
660
|
}
|
|
1116
661
|
|
|
662
|
+
export { SignRequest }
|
|
663
|
+
|
|
1117
664
|
export declare namespace store_v1 {
|
|
1118
665
|
export {
|
|
1119
666
|
file_agntcy_dir_store_v1_store_service,
|
|
@@ -1125,6 +672,10 @@ export declare namespace store_v1 {
|
|
|
1125
672
|
PullReferrerRequestSchema,
|
|
1126
673
|
PullReferrerResponse,
|
|
1127
674
|
PullReferrerResponseSchema,
|
|
675
|
+
DeleteReferrerRequest,
|
|
676
|
+
DeleteReferrerRequestSchema,
|
|
677
|
+
DeleteReferrerResponse,
|
|
678
|
+
DeleteReferrerResponseSchema,
|
|
1128
679
|
StoreService,
|
|
1129
680
|
file_agntcy_dir_store_v1_sync_service,
|
|
1130
681
|
CreateSyncRequest,
|
|
@@ -1155,17 +706,10 @@ export declare namespace store_v1 {
|
|
|
1155
706
|
}
|
|
1156
707
|
}
|
|
1157
708
|
|
|
1158
|
-
export
|
|
1159
|
-
|
|
1160
|
-
export
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
getCachePath(): string;
|
|
1164
|
-
load(): CachedToken | undefined;
|
|
1165
|
-
save(token: CachedToken): void;
|
|
1166
|
-
clear(): void;
|
|
1167
|
-
isValid(token: CachedToken | undefined): boolean;
|
|
1168
|
-
getValidToken(): CachedToken | undefined;
|
|
1169
|
-
}
|
|
709
|
+
export { UnpublishRequest }
|
|
710
|
+
|
|
711
|
+
export { VerifyRequest }
|
|
712
|
+
|
|
713
|
+
export { VerifyResponse }
|
|
1170
714
|
|
|
1171
715
|
export { }
|