agntcy-dir 1.3.0 → 1.4.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 +156 -696
- package/dist/index.cjs +973 -11811
- package/dist/index.mjs +957 -11792
- package/dist/index.mjs.map +1 -1
- package/package.json +21 -14
package/dist/agntcy-dir.d.ts
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { BasicAuthCredentials } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/store/v1/sync_service_pb';
|
|
2
2
|
import { BasicAuthCredentialsSchema } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/store/v1/sync_service_pb';
|
|
3
|
-
import { Client as Client_2 } from '@connectrpc/connect';
|
|
4
3
|
import { CreatePublicationResponse } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/routing/v1/publication_service_pb';
|
|
5
4
|
import { CreatePublicationResponseSchema } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/routing/v1/publication_service_pb';
|
|
6
5
|
import { CreateSyncRequest } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/store/v1/sync_service_pb';
|
|
7
6
|
import { CreateSyncRequestSchema } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/store/v1/sync_service_pb';
|
|
8
7
|
import { CreateSyncResponse } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/store/v1/sync_service_pb';
|
|
9
8
|
import { CreateSyncResponseSchema } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/store/v1/sync_service_pb';
|
|
9
|
+
import { DeleteReferrerRequest } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/store/v1/store_service_pb';
|
|
10
|
+
import { DeleteReferrerRequestSchema } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/store/v1/store_service_pb';
|
|
11
|
+
import { DeleteReferrerResponse } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/store/v1/store_service_pb';
|
|
12
|
+
import { DeleteReferrerResponseSchema } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/store/v1/store_service_pb';
|
|
10
13
|
import { DeleteSyncRequest } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/store/v1/sync_service_pb';
|
|
11
14
|
import { DeleteSyncRequestSchema } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/store/v1/sync_service_pb';
|
|
12
15
|
import { DeleteSyncResponse } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/store/v1/sync_service_pb';
|
|
@@ -170,669 +173,59 @@ import { VerifyWithKeySchema } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/sign
|
|
|
170
173
|
import { VerifyWithOIDC } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/sign/v1/sign_service_pb';
|
|
171
174
|
import { VerifyWithOIDCSchema } from '@buf/agntcy_dir.bufbuild_es/agntcy/dir/sign/v1/sign_service_pb';
|
|
172
175
|
|
|
176
|
+
/**
|
|
177
|
+
* Authentication mode for Directory client connections.
|
|
178
|
+
*
|
|
179
|
+
* @public
|
|
180
|
+
*/
|
|
173
181
|
export declare type AuthMode = '' | 'x509' | 'jwt' | 'tls' | 'oidc';
|
|
174
182
|
|
|
175
|
-
export declare class CachedToken {
|
|
176
|
-
accessToken: string;
|
|
177
|
-
tokenType: string;
|
|
178
|
-
provider: string;
|
|
179
|
-
issuer: string;
|
|
180
|
-
refreshToken: string;
|
|
181
|
-
expiresAt: Date | undefined;
|
|
182
|
-
user: string;
|
|
183
|
-
userId: string;
|
|
184
|
-
email: string;
|
|
185
|
-
createdAt: Date | undefined;
|
|
186
|
-
constructor(accessToken: string, tokenType?: string, provider?: string, issuer?: string, refreshToken?: string, expiresAt?: Date | undefined, user?: string, userId?: string, email?: string, createdAt?: Date | undefined);
|
|
187
|
-
static fromJson(payload: CachedTokenJson): CachedToken;
|
|
188
|
-
toJson(): Record<string, string>;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
declare interface CachedTokenJson {
|
|
192
|
-
access_token: string;
|
|
193
|
-
token_type?: string;
|
|
194
|
-
provider?: string;
|
|
195
|
-
issuer?: string;
|
|
196
|
-
refresh_token?: string;
|
|
197
|
-
expires_at?: string;
|
|
198
|
-
user?: string;
|
|
199
|
-
user_id?: string;
|
|
200
|
-
email?: string;
|
|
201
|
-
created_at?: string;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
183
|
/**
|
|
205
184
|
* High-level client for interacting with AGNTCY Directory services.
|
|
206
185
|
*
|
|
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
|
-
* ```
|
|
186
|
+
* @public
|
|
223
187
|
*/
|
|
224
188
|
export declare class Client {
|
|
225
189
|
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);
|
|
190
|
+
readonly oauthSession: OAuthSessionManager;
|
|
258
191
|
constructor(config?: Config, grpcTransport?: Transport);
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
private static createOidcTransport;
|
|
262
|
-
static createGRPCTransport(config: Config, oidcOptions?: {
|
|
263
|
-
oidcTokenHolder: OAuthTokenHolder;
|
|
192
|
+
static createGRPCTransport(config: Config, options?: {
|
|
193
|
+
oidcTokenHolder?: OAuthTokenHolder;
|
|
264
194
|
}): 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
|
-
*/
|
|
195
|
+
hasCachedOAuthToken(): boolean;
|
|
196
|
+
getAccessToken(): string;
|
|
274
197
|
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
|
-
* Push records with referrer metadata to the Store API.
|
|
301
|
-
*
|
|
302
|
-
* Uploads records along with optional artifacts and referrer information.
|
|
303
|
-
* This is useful for pushing complex objects that include additional
|
|
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;
|
|
198
|
+
push(records: Record_2[]): Promise<RecordRef[]>;
|
|
199
|
+
push_referrer(requests: PushReferrerRequest[]): Promise<PushReferrerResponse[]>;
|
|
200
|
+
pull(refs: RecordRef[]): Promise<Record_2[]>;
|
|
201
|
+
pull_referrer(requests: PullReferrerRequest[]): Promise<PullReferrerResponse[]>;
|
|
202
|
+
searchCIDs(request: SearchCIDsRequest): Promise<SearchCIDsResponse[]>;
|
|
203
|
+
searchRecords(request: SearchRecordsRequest): Promise<SearchRecordsResponse[]>;
|
|
204
|
+
lookup(refs: RecordRef[]): Promise<RecordMeta[]>;
|
|
205
|
+
list(request: ListRequest): Promise<ListResponse[]>;
|
|
206
|
+
searchRouting(request: SearchRequest): Promise<SearchResponse[]>;
|
|
207
|
+
publish(request: PublishRequest): Promise<void>;
|
|
208
|
+
unpublish(request: UnpublishRequest): Promise<void>;
|
|
209
|
+
delete(refs: RecordRef[]): Promise<void>;
|
|
210
|
+
deleteReferrer(request: DeleteReferrerRequest): Promise<DeleteReferrerResponse>;
|
|
211
|
+
sign(req: SignRequest): void;
|
|
212
|
+
verify(request: VerifyRequest): Promise<VerifyResponse>;
|
|
213
|
+
create_sync(request: CreateSyncRequest): Promise<CreateSyncResponse>;
|
|
214
|
+
list_syncs(request: ListSyncsRequest): Promise<ListSyncsItem[]>;
|
|
215
|
+
get_sync(request: GetSyncRequest): Promise<GetSyncResponse>;
|
|
216
|
+
delete_sync(request: DeleteSyncRequest): Promise<DeleteSyncResponse>;
|
|
217
|
+
listen(request: ListenRequest): AsyncIterable<ListenResponse>;
|
|
218
|
+
create_publication(request: PublishRequest): Promise<CreatePublicationResponse>;
|
|
219
|
+
list_publication(request: ListPublicationsRequest): Promise<ListPublicationsItem[]>;
|
|
220
|
+
get_publication(request: GetPublicationRequest): Promise<GetPublicationResponse>;
|
|
221
|
+
resolve(request: ResolveRequest): Promise<ResolveResponse>;
|
|
222
|
+
getVerificationInfo(request: GetVerificationInfoRequest): Promise<GetVerificationInfoResponse>;
|
|
829
223
|
}
|
|
830
224
|
|
|
831
225
|
/**
|
|
832
226
|
* Configuration class for the AGNTCY Directory client.
|
|
833
227
|
*
|
|
834
|
-
*
|
|
835
|
-
* and provides default values and environment-based configuration loading.
|
|
228
|
+
* @public
|
|
836
229
|
*/
|
|
837
230
|
export declare class Config {
|
|
838
231
|
static DEFAULT_SERVER_ADDRESS: string;
|
|
@@ -874,31 +267,7 @@ export declare class Config {
|
|
|
874
267
|
oidcAuthTimeout: number;
|
|
875
268
|
oidcScopes: string[];
|
|
876
269
|
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
270
|
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
271
|
static loadFromEnv(prefix?: string): Config;
|
|
903
272
|
getCommandAndArgs(args: string[]): [string, string[]];
|
|
904
273
|
}
|
|
@@ -919,7 +288,26 @@ export declare namespace core_v1 {
|
|
|
919
288
|
}
|
|
920
289
|
}
|
|
921
290
|
|
|
922
|
-
|
|
291
|
+
export { CreatePublicationResponse }
|
|
292
|
+
|
|
293
|
+
export { CreateSyncRequest }
|
|
294
|
+
|
|
295
|
+
export { CreateSyncResponse }
|
|
296
|
+
|
|
297
|
+
export { DeleteReferrerRequest }
|
|
298
|
+
|
|
299
|
+
export { DeleteReferrerResponse }
|
|
300
|
+
|
|
301
|
+
export { DeleteSyncRequest }
|
|
302
|
+
|
|
303
|
+
export { DeleteSyncResponse }
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* Docker invocation settings for running dirctl in a container.
|
|
307
|
+
*
|
|
308
|
+
* @public
|
|
309
|
+
*/
|
|
310
|
+
export declare class DockerConfig {
|
|
923
311
|
static DEFAULT_DIRCTL_IMAGE: string;
|
|
924
312
|
static DEFAULT_DIRCTL_IMAGE_TAG: string;
|
|
925
313
|
dirctlImage: string;
|
|
@@ -947,19 +335,35 @@ export declare namespace events_v1 {
|
|
|
947
335
|
}
|
|
948
336
|
}
|
|
949
337
|
|
|
950
|
-
export
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
}
|
|
338
|
+
export { GetPublicationRequest }
|
|
339
|
+
|
|
340
|
+
export { GetPublicationResponse }
|
|
341
|
+
|
|
342
|
+
export { GetSyncRequest }
|
|
343
|
+
|
|
344
|
+
export { GetSyncResponse }
|
|
345
|
+
|
|
346
|
+
export { GetVerificationInfoRequest }
|
|
347
|
+
|
|
348
|
+
export { GetVerificationInfoResponse }
|
|
349
|
+
|
|
350
|
+
export { ListenRequest }
|
|
961
351
|
|
|
962
|
-
|
|
352
|
+
export { ListenResponse }
|
|
353
|
+
|
|
354
|
+
export { ListPublicationsItem }
|
|
355
|
+
|
|
356
|
+
export { ListPublicationsRequest }
|
|
357
|
+
|
|
358
|
+
export { ListRequest }
|
|
359
|
+
|
|
360
|
+
export { ListResponse }
|
|
361
|
+
|
|
362
|
+
export { ListSyncsItem }
|
|
363
|
+
|
|
364
|
+
export { ListSyncsRequest }
|
|
365
|
+
|
|
366
|
+
export declare namespace models {
|
|
963
367
|
export {
|
|
964
368
|
core_v1,
|
|
965
369
|
naming_v1,
|
|
@@ -991,10 +395,35 @@ export declare namespace naming_v1 {
|
|
|
991
395
|
}
|
|
992
396
|
}
|
|
993
397
|
|
|
398
|
+
/**
|
|
399
|
+
* Error thrown when OAuth PKCE authentication fails.
|
|
400
|
+
*
|
|
401
|
+
* @public
|
|
402
|
+
*/
|
|
994
403
|
export declare class OAuthPkceError extends Error {
|
|
995
404
|
constructor(message: string);
|
|
996
405
|
}
|
|
997
406
|
|
|
407
|
+
/**
|
|
408
|
+
* Coordinates OIDC token state with interactive PKCE flow and cache.
|
|
409
|
+
*
|
|
410
|
+
* @public
|
|
411
|
+
*/
|
|
412
|
+
export declare class OAuthSessionManager {
|
|
413
|
+
readonly config: Config;
|
|
414
|
+
private readonly tokenCache;
|
|
415
|
+
private _oauthHolder;
|
|
416
|
+
constructor(config: Config);
|
|
417
|
+
get oauthHolder(): OAuthTokenHolder | null;
|
|
418
|
+
hasAccessToken(): boolean;
|
|
419
|
+
authenticate(): Promise<void>;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* Holds an OAuth access token for Connect transport interceptors.
|
|
424
|
+
*
|
|
425
|
+
* @public
|
|
426
|
+
*/
|
|
998
427
|
export declare class OAuthTokenHolder {
|
|
999
428
|
private accessToken;
|
|
1000
429
|
setTokens(accessToken: string): void;
|
|
@@ -1002,6 +431,26 @@ export declare class OAuthTokenHolder {
|
|
|
1002
431
|
getAccessToken(): string;
|
|
1003
432
|
}
|
|
1004
433
|
|
|
434
|
+
export { PublishRequest }
|
|
435
|
+
|
|
436
|
+
export { PullReferrerRequest }
|
|
437
|
+
|
|
438
|
+
export { PullReferrerResponse }
|
|
439
|
+
|
|
440
|
+
export { PushReferrerRequest }
|
|
441
|
+
|
|
442
|
+
export { PushReferrerResponse }
|
|
443
|
+
|
|
444
|
+
export { Record_2 as Record }
|
|
445
|
+
|
|
446
|
+
export { RecordMeta }
|
|
447
|
+
|
|
448
|
+
export { RecordRef }
|
|
449
|
+
|
|
450
|
+
export { ResolveRequest }
|
|
451
|
+
|
|
452
|
+
export { ResolveResponse }
|
|
453
|
+
|
|
1005
454
|
export declare namespace routing_v1 {
|
|
1006
455
|
export {
|
|
1007
456
|
file_agntcy_dir_routing_v1_peer,
|
|
@@ -1069,6 +518,18 @@ export declare namespace search_v1 {
|
|
|
1069
518
|
}
|
|
1070
519
|
}
|
|
1071
520
|
|
|
521
|
+
export { SearchCIDsRequest }
|
|
522
|
+
|
|
523
|
+
export { SearchCIDsResponse }
|
|
524
|
+
|
|
525
|
+
export { SearchRecordsRequest }
|
|
526
|
+
|
|
527
|
+
export { SearchRecordsResponse }
|
|
528
|
+
|
|
529
|
+
export { SearchRequest }
|
|
530
|
+
|
|
531
|
+
export { SearchResponse }
|
|
532
|
+
|
|
1072
533
|
export declare namespace sign_v1 {
|
|
1073
534
|
export {
|
|
1074
535
|
file_agntcy_dir_sign_v1_sign_service,
|
|
@@ -1114,6 +575,8 @@ export declare namespace sign_v1 {
|
|
|
1114
575
|
}
|
|
1115
576
|
}
|
|
1116
577
|
|
|
578
|
+
export { SignRequest }
|
|
579
|
+
|
|
1117
580
|
export declare namespace store_v1 {
|
|
1118
581
|
export {
|
|
1119
582
|
file_agntcy_dir_store_v1_store_service,
|
|
@@ -1125,6 +588,10 @@ export declare namespace store_v1 {
|
|
|
1125
588
|
PullReferrerRequestSchema,
|
|
1126
589
|
PullReferrerResponse,
|
|
1127
590
|
PullReferrerResponseSchema,
|
|
591
|
+
DeleteReferrerRequest,
|
|
592
|
+
DeleteReferrerRequestSchema,
|
|
593
|
+
DeleteReferrerResponse,
|
|
594
|
+
DeleteReferrerResponseSchema,
|
|
1128
595
|
StoreService,
|
|
1129
596
|
file_agntcy_dir_store_v1_sync_service,
|
|
1130
597
|
CreateSyncRequest,
|
|
@@ -1155,17 +622,10 @@ export declare namespace store_v1 {
|
|
|
1155
622
|
}
|
|
1156
623
|
}
|
|
1157
624
|
|
|
1158
|
-
export
|
|
625
|
+
export { UnpublishRequest }
|
|
1159
626
|
|
|
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
|
-
}
|
|
627
|
+
export { VerifyRequest }
|
|
628
|
+
|
|
629
|
+
export { VerifyResponse }
|
|
1170
630
|
|
|
1171
631
|
export { }
|