@js4cytoscape/ndex-client 0.6.0-alpha.1 → 0.6.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,8 +1,134 @@
1
1
  import { AxiosRequestConfig } from 'axios';
2
2
 
3
+ /**
4
+ * NDEx Client Constants
5
+ *
6
+ * Centralized definition of all string literal constants used throughout the NDEx client library.
7
+ * Using the const + type pattern for better developer experience with autocomplete and type safety.
8
+ */
9
+ /**
10
+ * Authentication types supported by NDEx client
11
+ */
12
+ declare const AuthType: {
13
+ readonly BASIC: "basic";
14
+ readonly OAUTH: "oauth";
15
+ };
16
+ declare type AuthType = (typeof AuthType)[keyof typeof AuthType];
17
+ /**
18
+ * Visibility settings for networks, folders, and shortcuts.
19
+ * Based on YouTube's permission model.
20
+ *
21
+ * ## Visibility Type Definitions:
22
+ *
23
+ * **PUBLIC**
24
+ * - Accessibility: Anyone can discover and view the content
25
+ * - Searchability: Appears in search results and can be found through search engines
26
+ * - Sharing: Can be shared freely with anyone
27
+ * - Visibility: Shows up on the owner's public profile
28
+ *
29
+ * **PRIVATE**
30
+ * - Accessibility: Only the owner and specifically invited users can view the content
31
+ * - Searchability: Does not appear in any search results (internal or external)
32
+ * - Sharing: Even with a direct link, uninvited users cannot access the content
33
+ * - Visibility: Does not appear on the owner's public profile
34
+ *
35
+ * **UNLISTED**
36
+ * - Accessibility: Anyone with the direct link can view the content
37
+ * - Searchability: Does not appear in search results unless added to a public collection
38
+ * - Sharing: Can be shared via direct link without requiring special permissions
39
+ * - Visibility: Does not appear on the owner's public profile
40
+ *
41
+ * @example
42
+ * ```typescript
43
+ * const network: NetworkSummaryV3 = {
44
+ * externalId: "12345",
45
+ * name: "Sample Network",
46
+ * visibility: Visibility.UNLISTED // Only accessible via direct link
47
+ * };
48
+ * ```
49
+ */
50
+ declare const Visibility: {
51
+ readonly PUBLIC: "PUBLIC";
52
+ readonly PRIVATE: "PRIVATE";
53
+ readonly UNLISTED: "UNLISTED";
54
+ };
55
+ declare type Visibility = (typeof Visibility)[keyof typeof Visibility];
56
+ /**
57
+ * Permission levels for network and folder access control.
58
+ *
59
+ * ## Permission Level Definitions:
60
+ *
61
+ * **READ**
62
+ * - View the network/folder content
63
+ * - Download network data
64
+ * - Access network metadata and summary information
65
+ *
66
+ * **WRITE**
67
+ * - All READ permissions
68
+ * - Modify network content and metadata
69
+ * - Update network properties and attributes
70
+ *
71
+ * **ADMIN**
72
+ * - All WRITE permissions
73
+ * - Delete networks/folders
74
+ * - Manage permissions for other users
75
+ * - Transfer ownership
76
+ *
77
+ * @example
78
+ * ```typescript
79
+ * const permission: NetworkPermission = {
80
+ * uuid: "permission-uuid",
81
+ * permission: Permission.WRITE,
82
+ * memberUUID: "user-uuid",
83
+ * resourceUUID: "network-uuid"
84
+ * };
85
+ * ```
86
+ */
87
+ declare const Permission: {
88
+ readonly READ: "READ";
89
+ readonly WRITE: "WRITE";
90
+ readonly ADMIN: "ADMIN";
91
+ };
92
+ declare type Permission = (typeof Permission)[keyof typeof Permission];
93
+ /**
94
+ * File types for NDEx objects
95
+ */
96
+ declare const NDExFileType: {
97
+ readonly NETWORK: "NETWORK";
98
+ readonly FOLDER: "FOLDER";
99
+ readonly SHORTCUT: "SHORTCUT";
100
+ };
101
+ declare type NDExFileType = (typeof NDExFileType)[keyof typeof NDExFileType];
102
+ /**
103
+ * Visual Property Mapping Types for CX2 networks
104
+ */
105
+ declare const VPMappingType: {
106
+ readonly DISCRETE: "DISCRETE";
107
+ readonly CONTINUOUS: "CONTINUOUS";
108
+ readonly PASSTHROUGH: "PASSTHROUGH";
109
+ };
110
+ declare type VPMappingType = (typeof VPMappingType)[keyof typeof VPMappingType];
111
+ /**
112
+ * CX data types for network properties and attributes
113
+ */
114
+ declare const CXDataType: {
115
+ readonly STRING: "string";
116
+ readonly LONG: "long";
117
+ readonly INTEGER: "integer";
118
+ readonly DOUBLE: "double";
119
+ readonly BOOLEAN: "boolean";
120
+ readonly LIST_OF_STRING: "list_of_string";
121
+ readonly LIST_OF_LONG: "list_of_long";
122
+ readonly LIST_OF_INTEGER: "list_of_integer";
123
+ readonly LIST_OF_DOUBLE: "list_of_double";
124
+ readonly LIST_OF_BOOLEAN: "list_of_boolean";
125
+ };
126
+ declare type CXDataType = (typeof CXDataType)[keyof typeof CXDataType];
127
+
3
128
  /**
4
129
  * Type definitions for CyNDEx (Cytoscape-NDEx Bridge) operations
5
130
  */
131
+
6
132
  /**
7
133
  * Configuration for CyNDEx service
8
134
  */
@@ -19,7 +145,7 @@ interface CyNDExConfig {
19
145
  * This is used as parameters passed to Cytoscape for NDEx authentication
20
146
  */
21
147
  interface CyNDExAuthConfig {
22
- type: 'basic' | 'oauth';
148
+ type: AuthType;
23
149
  username?: string;
24
150
  password?: string;
25
151
  idToken?: string;
@@ -75,18 +201,612 @@ interface CX2ImportParams {
75
201
  title?: string;
76
202
  }
77
203
 
204
+ /**
205
+ * Permission details for a file including its type and member permissions
206
+ *
207
+ * @description This interface represents the permission information for a single file,
208
+ * including what type of file it is and which users have what permissions on it.
209
+ */
210
+ interface FilePermissionDetails {
211
+ /**
212
+ * The type of the file (NETWORK, FOLDER, or SHORTCUT)
213
+ */
214
+ type: NDExFileType;
215
+ /**
216
+ * Map of user UUIDs to their permission levels on this file
217
+ *
218
+ * @description Each key represents a user's UUID, and the corresponding value
219
+ * indicates what permission level that user has on the file.
220
+ *
221
+ * @example
222
+ * ```typescript
223
+ * {
224
+ * "user1-uuid-1234-5678-9abc-def012345678": "READ",
225
+ * "user2-uuid-8765-4321-fedc-ba0987654321": "WRITE",
226
+ * "user3-uuid-1111-2222-3333-444444444444": "ADMIN"
227
+ * }
228
+ * ```
229
+ */
230
+ members: Record<string, Permission>;
231
+ }
232
+ /**
233
+ * List of file permission records returned by listMembers
234
+ *
235
+ * @description Each element in the array is a record where the key is a file UUID
236
+ * and the value contains the file's type and member permissions.
237
+ *
238
+ * @example
239
+ * ```typescript
240
+ * [
241
+ * {
242
+ * "12345678-1234-1234-1234-123456789abc": {
243
+ * type: "NETWORK",
244
+ * members: {
245
+ * "user1-uuid": "READ",
246
+ * "user2-uuid": "WRITE"
247
+ * }
248
+ * }
249
+ * },
250
+ * {
251
+ * "87654321-4321-4321-4321-876543210fed": {
252
+ * type: "FOLDER",
253
+ * members: {
254
+ * "user3-uuid": "ADMIN"
255
+ * }
256
+ * }
257
+ * }
258
+ * ]
259
+ * ```
260
+ */
261
+ declare type FilePermissionList = Record<string, FilePermissionDetails>[];
262
+ /**
263
+ * Request object for sharing member operations
264
+ *
265
+ * This interface defines the structure for requests that manage file sharing permissions.
266
+ * It combines file identification with member permission management in a single request.
267
+ */
268
+ interface SharingMemberRequest {
269
+ /**
270
+ * Object mapping file UUIDs to their corresponding file types
271
+ *
272
+ * @description Each key represents the UUID of a file to be shared, and the value
273
+ * indicates what type of file it is (NETWORK, FOLDER, or SHORTCUT)
274
+ *
275
+ * @example
276
+ * ```typescript
277
+ * {
278
+ * "12345678-1234-1234-1234-123456789abc": "NETWORK",
279
+ * "87654321-4321-4321-4321-876543210fed": "FOLDER"
280
+ * }
281
+ * ```
282
+ */
283
+ files: Record<string, NDExFileType>;
284
+ /**
285
+ * Object mapping member UUIDs to their permission levels
286
+ *
287
+ * @description Each key represents the UUID of a user or member who should receive
288
+ * explicit permissions, and the value is the type of permission they should have.
289
+ * If the permission value is null, the existing file permission for the member will be revoked.
290
+ *
291
+ * @example
292
+ * ```typescript
293
+ * {
294
+ * "user1-uuid-1234-5678-9abc-def012345678": "READ",
295
+ * "user2-uuid-8765-4321-fedc-ba0987654321": "WRITE",
296
+ * "user3-uuid-1111-2222-3333-444444444444": null // This will revoke permissions
297
+ * }
298
+ * ```
299
+ */
300
+ members: Record<string, Permission | null>;
301
+ }
302
+ /**
303
+ * Parameters for searching files in NDEx
304
+ */
305
+ interface FileSearchParams {
306
+ /** Search terms as a string, supports Lucene syntax */
307
+ searchString?: string;
308
+ /** Username of the account to filter on, only files owned by that user will be returned */
309
+ accountName?: string;
310
+ /** Filter by permission level, only applicable to signed-in users */
311
+ permission?: Permission;
312
+ /** File type to filter on, if null or omitted all file types will be returned */
313
+ type?: NDExFileType | null;
314
+ /** Visibility filter, only supports "PRIVATE" or "PUBLIC" */
315
+ visibility: 'PRIVATE' | 'PUBLIC';
316
+ /** Starting index for pagination */
317
+ start?: number;
318
+ /** Number of results to return for pagination */
319
+ size?: number;
320
+ }
321
+ interface CreateShortcutOptions {
322
+ name: string;
323
+ target: string;
324
+ targetType: NDExFileType;
325
+ parent?: string;
326
+ }
327
+ /**
328
+ * FilesService - NDEx file operations and task management
329
+ * Handles file uploads, downloads, exports, and asynchronous task tracking
330
+ */
331
+ declare class FilesService {
332
+ private http;
333
+ constructor(http: HTTPService);
334
+ /**
335
+ * Copy a file to a different location
336
+ *
337
+ * Copies a network or shortcut to a target folder. Folder copying is not supported.
338
+ * The copied file will be placed in the specified target folder with the same name
339
+ * and properties as the original.
340
+ *
341
+ * @param options - Copy operation configuration
342
+ * @param options.fileId - UUID of the source file to copy
343
+ * @param options.targetId - UUID of the target folder where the file will be copied
344
+ * @param options.type - Type of file being copied (only NETWORK and SHORTCUT are supported)
345
+ * @param options.accessKey - Optional access key for accessing protected files
346
+ * @returns Promise resolving to the copied file's UUID and modification time
347
+ *
348
+ * @example
349
+ * ```typescript
350
+ * // Copy a network to a specific folder
351
+ * await client.files.copyFile({
352
+ * fileId: "12345678-1234-1234-1234-123456789abc",
353
+ * targetId: "87654321-4321-4321-4321-876543210fed",
354
+ * type: "NETWORK"
355
+ * });
356
+ *
357
+ * // Copy a shortcut with access key
358
+ * await client.files.copyFile({
359
+ * fileId: "11111111-2222-3333-4444-555555555555",
360
+ * targetId: "66666666-7777-8888-9999-000000000000",
361
+ * type: "SHORTCUT",
362
+ * accessKey: "secret-key-123"
363
+ * });
364
+ * ```
365
+ */
366
+ copyFile(options: {
367
+ fileId: string;
368
+ targetId: string;
369
+ type: NDExFileType;
370
+ accessKey?: string;
371
+ }): Promise<NDExObjectUpdateStatus>;
372
+ /** Get file count statistics for the current user */
373
+ getCount(): Promise<any>;
374
+ /** Get files in the trash for the current user */
375
+ getTrash(): Promise<any>;
376
+ /** Permanently delete all files in trash */
377
+ emptyTrash(): Promise<any>;
378
+ /**
379
+ * Permanently delete a file from trash
380
+ * @param fileId - File UUID to permanently delete
381
+ */
382
+ permanentlyDeleteFile(fileId: string): Promise<any>;
383
+ /**
384
+ * Restore files from trash
385
+ * @param networkIds - Array of network UUIDs to restore
386
+ * @param folderIds - Array of folder UUIDs to restore
387
+ * @param shortcutIds - Array of shortcut UUIDs to restore
388
+ */
389
+ restoreFile(networkIds: string[], folderIds: string[], shortcutIds: string[]): Promise<any>;
390
+ private _validateShareData;
391
+ private _validateMemberData;
392
+ /**
393
+ * Update member permissions for shared files
394
+ *
395
+ * This method allows you to grant, modify, or revoke permissions for specific members
396
+ * across multiple files in a single operation. It's particularly useful for bulk
397
+ * permission management and ensuring consistent access control.
398
+ *
399
+ * @param request - The sharing member request containing files and member permissions
400
+ * @param request.files - Object mapping file UUIDs to their file types
401
+ * @param request.members - Object mapping member UUIDs to their permission levels (or null to revoke)
402
+ *
403
+ * @returns Promise resolving to an object with file UUIDs as keys and permission status messages as values
404
+ *
405
+ * @example
406
+ * ```typescript
407
+ * // Grant permissions to multiple members for different files
408
+ * const result = await client.files.updateMember({
409
+ * files: {
410
+ * "network-uuid-123": "NETWORK",
411
+ * "folder-uuid-456": "FOLDER"
412
+ * },
413
+ * members: {
414
+ * "user1-uuid": "READ",
415
+ * "user2-uuid": "WRITE",
416
+ * "user3-uuid": null // Revoke permissions
417
+ * }
418
+ * });
419
+ *
420
+ * // Result example:
421
+ * // {
422
+ * // "network-uuid-123": "network permission granted",
423
+ * // "folder-uuid-456": "folder permission granted"
424
+ * // }
425
+ *
426
+ * // Revoke all permissions for a user
427
+ * await client.files.updateMember({
428
+ * files: {
429
+ * "network-uuid-789": "NETWORK"
430
+ * },
431
+ * members: {
432
+ * "user-to-remove-uuid": null
433
+ * }
434
+ * });
435
+ * ```
436
+ *
437
+ * @throws {Error} When file UUIDs have invalid format
438
+ * @throws {Error} When file types are invalid
439
+ * @throws {Error} When member UUIDs have invalid format
440
+ */
441
+ updateMember(request: SharingMemberRequest): Promise<Record<string, string>>;
442
+ /**
443
+ * List members and their permissions for specified files
444
+ *
445
+ * Retrieves detailed permission information for the specified files, including
446
+ * the file type and a mapping of all users who have explicit permissions on each file.
447
+ * This is useful for auditing file access and understanding who has what level of
448
+ * access to your shared content.
449
+ *
450
+ * @param files - Object mapping file UUIDs to their file types
451
+ * @returns Promise resolving to a list of permission records for each file
452
+ *
453
+ * @example
454
+ * ```typescript
455
+ * // Get permission details for multiple files
456
+ * const permissions = await client.files.listMembers({
457
+ * "12345678-1234-1234-1234-123456789abc": "NETWORK",
458
+ * "87654321-4321-4321-4321-876543210fed": "FOLDER",
459
+ * "11111111-2222-3333-4444-555555555555": "SHORTCUT"
460
+ * });
461
+ *
462
+ * // Result example:
463
+ * // [
464
+ * // {
465
+ * // "12345678-1234-1234-1234-123456789abc": {
466
+ * // type: "NETWORK",
467
+ * // members: {
468
+ * // "user1-uuid-1234-5678-9abc-def012345678": "READ",
469
+ * // "user2-uuid-8765-4321-fedc-ba0987654321": "WRITE",
470
+ * // "user3-uuid-1111-2222-3333-444444444444": "ADMIN"
471
+ * // }
472
+ * // }
473
+ * // },
474
+ * // {
475
+ * // "87654321-4321-4321-4321-876543210fed": {
476
+ * // type: "FOLDER",
477
+ * // members: {
478
+ * // "user4-uuid-aaaa-bbbb-cccc-dddddddddddd": "ADMIN",
479
+ * // "user5-uuid-eeee-ffff-0000-111111111111": "READ"
480
+ * // }
481
+ * // }
482
+ * // }
483
+ * // ]
484
+ *
485
+ * // Access specific file permissions
486
+ * const networkPermissions = permissions.find(record =>
487
+ * record["12345678-1234-1234-1234-123456789abc"]
488
+ * )?.["12345678-1234-1234-1234-123456789abc"];
489
+ *
490
+ * if (networkPermissions) {
491
+ * console.log('File type:', networkPermissions.type); // "NETWORK"
492
+ * console.log('Members:', networkPermissions.members);
493
+ *
494
+ * // Check if specific user has permission
495
+ * const userPermission = networkPermissions.members["user1-uuid-1234-5678-9abc-def012345678"];
496
+ * console.log('User permission:', userPermission); // "READ"
497
+ * }
498
+ * ```
499
+ *
500
+ * @throws {Error} When file UUIDs have invalid format
501
+ * @throws {Error} When file types are invalid
502
+ */
503
+ listMembers(files: Record<string, NDExFileType>): Promise<FilePermissionList>;
504
+ /**
505
+ * Transfer ownership of networks to a new owner
506
+ *
507
+ * This method transfers ownership of multiple networks to a specified user.
508
+ * The current owner will lose ownership rights, and the new owner will gain
509
+ * full control over the specified networks.
510
+ *
511
+ * @param request - Transfer ownership request
512
+ * @param request.networks - Array of network UUIDs to transfer ownership for
513
+ * @param request.newOwner - UUID of the user who will become the new owner
514
+ * @returns Promise that resolves when the ownership transfer is complete
515
+ *
516
+ * @example
517
+ * ```typescript
518
+ * // Transfer ownership of multiple networks to a new owner
519
+ * await client.files.transferOwnership({
520
+ * networks: [
521
+ * "12345678-1234-1234-1234-123456789abc",
522
+ * "87654321-4321-4321-4321-876543210fed"
523
+ * ],
524
+ * newOwner: "new-owner-uuid-1111-2222-3333-444444444444"
525
+ * });
526
+ * ```
527
+ */
528
+ transferOwnership(request: {
529
+ networks: string[];
530
+ newOwner: string;
531
+ }): Promise<void>;
532
+ listShares(limit?: number): Promise<FileListItem[]>;
533
+ /**
534
+ * Share files with public access
535
+ *
536
+ * Makes specified files publicly accessible by generating access keys for each file.
537
+ * The generated access keys can be used by others to access the shared files without
538
+ * requiring explicit permissions.
539
+ *
540
+ * @param fileTable - Object mapping file UUIDs to their file types
541
+ * @returns Promise resolving to an object mapping file UUIDs to their generated access keys
542
+ *
543
+ * @example
544
+ * ```typescript
545
+ * // Share a network and a folder
546
+ * const result = await client.files.share({
547
+ * "e6fc6a72-59ea-4f1d-ad81-59eda2cb8dce": "NETWORK",
548
+ * "40c08b7b-a4dd-4f00-87b3-1b945991948a": "FOLDER"
549
+ * });
550
+ *
551
+ * // Result example:
552
+ * // {
553
+ * // "e6fc6a72-59ea-4f1d-ad81-59eda2cb8dce": "abc123def456",
554
+ * // "40c08b7b-a4dd-4f00-87b3-1b945991948a": "xyz789uvw012"
555
+ * // }
556
+ *
557
+ * // Use the access key to access shared content
558
+ * const sharedNetwork = await client.networks.getNetwork(
559
+ * "e6fc6a72-59ea-4f1d-ad81-59eda2cb8dce",
560
+ * { accessKey: result["e6fc6a72-59ea-4f1d-ad81-59eda2cb8dce"] }
561
+ * );
562
+ * ```
563
+ */
564
+ share(fileTable: Record<string, NDExFileType>): Promise<Record<string, string>>;
565
+ unshare(fileTable: Record<string, NDExFileType>): Promise<void>;
566
+ getFolders(limit?: number): Promise<any>;
567
+ createFolder(name: string, parentFolderId?: string): Promise<any>;
568
+ getFolder(folderId: string, accessKey?: string): Promise<any>;
569
+ /**
570
+ * Update folder properties
571
+ *
572
+ * Updates the properties of an existing folder including name, description, and parent location.
573
+ * When parent is omitted, the folder remains in or is moved to the owner's home directory.
574
+ *
575
+ * @param folderId - The UUID of the folder to update
576
+ * @param folderData - Object containing folder properties to update
577
+ * @param folderData.name - The new name for the folder
578
+ * @param folderData.description - The new description for the folder
579
+ * @param folderData.parent - Optional UUID of the parent folder. If omitted, folder is placed in owner's home directory
580
+ * @returns Promise that resolves when the folder update is complete
581
+ *
582
+ * @example
583
+ * ```typescript
584
+ * // Update folder name and description, keep in current location
585
+ * await client.files.updateFolder('folder-uuid', {
586
+ * name: 'Updated Folder Name',
587
+ * description: 'Updated folder description'
588
+ * });
589
+ *
590
+ * // Move folder to a different parent and update properties
591
+ * await client.files.updateFolder('folder-uuid', {
592
+ * name: 'Moved Folder',
593
+ * description: 'This folder has been moved',
594
+ * parent: 'parent-folder-uuid'
595
+ * });
596
+ *
597
+ * // Move folder to home directory by omitting parent
598
+ * await client.files.updateFolder('folder-uuid', {
599
+ * name: 'Home Folder',
600
+ * description: 'Moved to home directory'
601
+ * });
602
+ * ```
603
+ */
604
+ updateFolder(folderId: string, folderData: {
605
+ name: string;
606
+ description: string;
607
+ parent?: string;
608
+ }): Promise<void>;
609
+ deleteFolder(folderId: string): Promise<any>;
610
+ getFolderCount(folderId: string, accessKey?: string): Promise<any>;
611
+ getFolderList(folderId: string, accessKey?: string, format?: string, type?: string): Promise<FileListItem[]>;
612
+ /**
613
+ * Get folder access key
614
+ *
615
+ * Retrieves the access key for a folder if it has been enabled for public access.
616
+ * When a folder has an access key enabled, it can be accessed by others without
617
+ * explicit permissions using this key.
618
+ *
619
+ * @param folderId - The UUID of the folder to get the access key for
620
+ * @returns Promise resolving to an object with accessKey property when enabled,
621
+ * or null when access key is not enabled on this folder
622
+ *
623
+ * @example
624
+ * ```typescript
625
+ * // Check if folder has an access key
626
+ * const result = await client.files.getFolderAccessKey('12345678-1234-1234-1234-123456789abc');
627
+ *
628
+ * if (result) {
629
+ * console.log('Access key:', result.accessKey); // "sdfdfdfsdfdsfs"
630
+ * // Use the access key to access the folder
631
+ * const folderData = await client.files.getFolder(folderId, result.accessKey);
632
+ * } else {
633
+ * console.log('No access key enabled for this folder');
634
+ * }
635
+ * ```
636
+ */
637
+ getFolderAccessKey(folderId: string): Promise<{
638
+ accessKey: string;
639
+ } | null>;
640
+ getShortcuts(limit?: number): Promise<any>;
641
+ /**
642
+ * Create a shortcut to an existing NDEx object
643
+ *
644
+ * Creates a shortcut (reference) to an existing network, folder, or shortcut.
645
+ * The shortcut can be placed in a specific folder or in the user's home directory.
646
+ *
647
+ * @param options - Shortcut creation options
648
+ * @param options.name - Display name for the shortcut
649
+ * @param options.target - UUID of the target object to create a shortcut to
650
+ * @param options.targetType - Type of the target object ('NETWORK', 'FOLDER', or 'SHORTCUT')
651
+ * @param options.parent - Optional UUID of the parent folder. If omitted, shortcut is created in user's home directory
652
+ * @returns Promise resolving to the created shortcut information
653
+ *
654
+ * @example
655
+ * ```typescript
656
+ * // Create shortcut to a network in home directory
657
+ * await client.files.createShortcut({
658
+ * name: "My Important Network Shortcut",
659
+ * target: "12345678-1234-1234-1234-123456789abc",
660
+ * targetType: "NETWORK"
661
+ * });
662
+ *
663
+ * // Create shortcut to a folder within another folder
664
+ * await client.files.createShortcut({
665
+ * name: "Research Folder Shortcut",
666
+ * target: "87654321-4321-4321-4321-876543210fed",
667
+ * targetType: "FOLDER",
668
+ * parent: "11111111-2222-3333-4444-555555555555"
669
+ * });
670
+ * ```
671
+ */
672
+ createShortcut(options: CreateShortcutOptions): Promise<NDExObjectUpdateStatus>;
673
+ getShortcut(shortcutId: string, accessKey?: string): Promise<Shortcut>;
674
+ /**
675
+ * Update shortcut properties
676
+ *
677
+ * Updates the properties of an existing shortcut including name, parent location, target, and target type.
678
+ * The parent attribute is always included in the request payload - when parent is omitted from the shortcut object,
679
+ * parent is set to null to indicate the shortcut should be moved to the owner's home directory.
680
+ *
681
+ * @param shortcutId - The UUID of the shortcut to update
682
+ * @param shortcutObject - Object containing shortcut properties to update
683
+ * @param shortcutObject.name - The new name for the shortcut
684
+ * @param shortcutObject.target - UUID of the target object the shortcut points to
685
+ * @param shortcutObject.targetType - Type of the target object ('NETWORK', 'FOLDER', or 'SHORTCUT')
686
+ * @param shortcutObject.parent - Optional UUID of the parent folder. If omitted, shortcut is moved to home directory
687
+ * @returns Promise resolving when the shortcut update is complete
688
+ *
689
+ * @example
690
+ * ```typescript
691
+ * // Update shortcut name and target, move to home directory
692
+ * await client.files.updateShortcut('shortcut-uuid', {
693
+ * name: 'Updated Shortcut Name',
694
+ * target: 'target-network-uuid',
695
+ * targetType: 'NETWORK'
696
+ * });
697
+ *
698
+ * // Update shortcut and move to a specific folder
699
+ * await client.files.updateShortcut('shortcut-uuid', {
700
+ * name: 'Folder Shortcut',
701
+ * target: 'target-folder-uuid',
702
+ * targetType: 'FOLDER',
703
+ * parent: 'parent-folder-uuid'
704
+ * });
705
+ *
706
+ * // Update all shortcut properties
707
+ * await client.files.updateShortcut('shortcut-uuid', {
708
+ * name: 'Complete Update',
709
+ * target: 'target-network-uuid',
710
+ * targetType: 'NETWORK',
711
+ * parent: 'parent-folder-uuid'
712
+ * });
713
+ * ```
714
+ */
715
+ updateShortcut(shortcutId: string, shortcutObject: CreateShortcutOptions): Promise<any>;
716
+ deleteShortcut(shortcutId: string): Promise<any>;
717
+ /**
718
+ * Set visibility for multiple files
719
+ *
720
+ * Updates the visibility settings for the specified files, controlling who can
721
+ * access them based on the visibility level (public, private, etc.).
722
+ *
723
+ * @param options - Visibility update configuration
724
+ * @param options.files - Object mapping file UUIDs to their file types
725
+ * @param options.visibility - The visibility level to apply to all specified files
726
+ * @returns Promise that resolves when the visibility has been updated
727
+ *
728
+ * @example
729
+ * ```typescript
730
+ * // Make multiple files public
731
+ * await client.files.setVisibility({
732
+ * files: {
733
+ * "12345678-1234-1234-1234-123456789abc": "NETWORK",
734
+ * "87654321-4321-4321-4321-876543210fed": "FOLDER"
735
+ * },
736
+ * visibility: "PUBLIC"
737
+ * });
738
+ * ```
739
+ */
740
+ setVisibility(options: {
741
+ files: Record<string, NDExFileType>;
742
+ visibility: Visibility;
743
+ }): Promise<void>;
744
+ /**
745
+ * Search for files in NDEx
746
+ *
747
+ * Searches for networks, folders, and shortcuts based on various criteria including
748
+ * search terms, ownership, permissions, file type, and visibility. Results are paginated
749
+ * and support Lucene query syntax for advanced search capabilities.
750
+ *
751
+ * @param params - Search parameters
752
+ * @param params.searchString - Search terms as a string, supports Lucene syntax
753
+ * @param params.accountName - Username to filter files by owner
754
+ * @param params.permission - Filter by permission level (only for signed-in users)
755
+ * @param params.type - File type filter (NETWORK, FOLDER, SHORTCUT, or null for all types)
756
+ * @param params.visibility - Visibility filter (required, "PRIVATE" or "PUBLIC")
757
+ * @param params.start - Starting index for pagination (default: 0)
758
+ * @param params.size - Number of results to return (default: varies by server)
759
+ * @returns Promise resolving to search results containing matching files
760
+ *
761
+ * @example
762
+ * ```typescript
763
+ * // Search for public networks containing "cancer"
764
+ * const results = await client.files.searchFiles({
765
+ * searchString: "cancer",
766
+ * type: "NETWORK",
767
+ * visibility: "PUBLIC",
768
+ * start: 0,
769
+ * size: 25
770
+ * });
771
+ *
772
+ * console.log(`Found ${results.numFound} total results`);
773
+ * console.log(`Showing results starting at ${results.start}`);
774
+ * results.ResultList.forEach(file => {
775
+ * console.log(`${file.name} (${file.type})`);
776
+ * });
777
+ *
778
+ * // Search with Lucene syntax for networks owned by specific user
779
+ * const userNetworks = await client.files.searchFiles({
780
+ * searchString: "name:pathway AND description:signaling",
781
+ * accountName: "john_doe",
782
+ * type: "NETWORK",
783
+ * visibility: "PUBLIC"
784
+ * });
785
+ *
786
+ * // Search for all private files the signed-in user has WRITE permission on
787
+ * const writableFiles = await client.files.searchFiles({
788
+ * permission: "WRITE",
789
+ * visibility: "PRIVATE",
790
+ * start: 0,
791
+ * size: 50
792
+ * });
793
+ * ```
794
+ */
795
+ searchFiles(params: FileSearchParams): Promise<SearchResult<FileListItem>>;
796
+ }
797
+
78
798
  /**
79
799
  * Core type definitions for NDEx Client Library
80
800
  * Pragmatic TypeScript types allowing flexibility with any types where needed
81
801
  */
82
802
 
83
803
  interface BasicAuth {
84
- type: 'basic';
804
+ type: typeof AuthType.BASIC;
85
805
  username: string;
86
806
  password: string;
87
807
  }
88
808
  interface OAuthAuth {
89
- type: 'oauth';
809
+ type: typeof AuthType.OAUTH;
90
810
  idToken: string;
91
811
  }
92
812
  interface NDExAuthResponse {
@@ -124,14 +844,89 @@ interface CX1MetaDataResponse {
124
844
  interface CX1NetworkProperty {
125
845
  predicateString: string;
126
846
  value: string;
127
- dataType?: 'string' | 'integer' | 'double' | 'boolean' | 'list_of_string';
847
+ dataType?: CXDataType;
128
848
  }
849
+ /**
850
+ * CX2 network properties structure
851
+ *
852
+ * @description Represents network properties in CX2 format, where each property
853
+ * is defined with both its data type and value. This format allows for type-safe
854
+ * property handling and is the standard way properties are stored in CX2 networks.
855
+ *
856
+ * The key represents the name of the attribute, and the value contains both the
857
+ * data type specification and the actual value.
858
+ *
859
+ * @example
860
+ * ```typescript
861
+ * const networkProps: CX2NetworkProperties = {
862
+ * name: {
863
+ * t: "string",
864
+ * v: "My Network"
865
+ * },
866
+ * nodeCount: {
867
+ * t: "integer",
868
+ * v: 150
869
+ * },
870
+ * version: {
871
+ * t: "double",
872
+ * v: 1.5
873
+ * },
874
+ * tags: {
875
+ * t: "list_of_string",
876
+ * v: ["biology", "protein-interaction", "human"]
877
+ * },
878
+ * isPublic: {
879
+ * t: "boolean",
880
+ * v: true
881
+ * }
882
+ * };
883
+ *
884
+ * // Applications can use the value directly
885
+ * const networkName = networkProps.name.v; // "My Network"
886
+ * const nodeCount = networkProps.nodeCount.v; // 150
887
+ * ```
888
+ */
129
889
  interface CX2NetworkProperties {
890
+ /**
891
+ * Property definition indexed by attribute name
892
+ *
893
+ * @description Each key represents the name of a network attribute, and the
894
+ * corresponding value contains the type specification and actual value.
895
+ */
130
896
  [key: string]: {
131
- t: string;
897
+ /**
898
+ * Data type of the attribute
899
+ *
900
+ * @description Specifies the CX2 data type for this attribute. Common types include:
901
+ * - `"string"` - Text values
902
+ * - `"long"` - Long integer values
903
+ * - `"integer"` - Whole numbers
904
+ * - `"double"` - Decimal numbers
905
+ * - `"boolean"` - True/false values
906
+ * - `"list_of_string"` - Array of text values
907
+ * - `"list_of_long"` - Array of long integers
908
+ * - `"list_of_integer"` - Array of whole numbers
909
+ * - `"list_of_double"` - Array of decimal numbers
910
+ * - `"list_of_boolean"` - Array of boolean values
911
+ *
912
+ * @example CXDataType.STRING, CXDataType.INTEGER, CXDataType.DOUBLE, CXDataType.LIST_OF_STRING
913
+ */
914
+ t: CXDataType;
915
+ /**
916
+ * Actual value of the attribute
917
+ *
918
+ * @description The concrete value for this attribute. Applications can
919
+ * typically use this value directly without additional processing. The
920
+ * type of this value should correspond to the data type specified in `t`.
921
+ *
922
+ * @example "My Network", 150, 1.5, true, ["tag1", "tag2"]
923
+ */
132
924
  v: any;
133
925
  };
134
926
  }
927
+ /**
928
+ * @deprecated Since NDEx version 3.0, all networks/folders and shortcuts are indexed in the system by default.
929
+ */
135
930
  declare enum NetworkIndexLevel {
136
931
  NONE = "NONE",
137
932
  BASIC = "BASIC",
@@ -143,7 +938,7 @@ interface NetworkSummaryV2 {
143
938
  description?: string;
144
939
  nodeCount: number;
145
940
  edgeCount: number;
146
- visibility: 'PUBLIC' | 'PRIVATE';
941
+ visibility: Visibility;
147
942
  owner: string;
148
943
  ownerUUID: string;
149
944
  creationTime: number;
@@ -217,7 +1012,7 @@ interface NetworkSummaryV3 extends Omit<NetworkSummaryV2, 'properties'> {
217
1012
  }
218
1013
  interface NetworkPermission {
219
1014
  uuid: string;
220
- permission: 'READ' | 'WRITE' | 'ADMIN';
1015
+ permission: Permission;
221
1016
  memberUUID: string;
222
1017
  memberAccountName?: string;
223
1018
  resourceUUID: string;
@@ -280,10 +1075,6 @@ interface CX2EdgeBypass {
280
1075
  id: number;
281
1076
  v: VisualPropertyTable;
282
1077
  }
283
- /**
284
- * Visual Property Mapping Types
285
- */
286
- declare type VPMappingType = 'DISCRETE' | 'CONTINUOUS' | 'PASSTHROUGH';
287
1078
  /**
288
1079
  * Mapping Definition for visual property mappings
289
1080
  * Note: Using flexible typing for mapping definitions as they vary by type
@@ -334,10 +1125,10 @@ interface CX2Status {
334
1125
  error?: string;
335
1126
  success?: boolean;
336
1127
  }
337
- interface SearchResult {
338
- numFound: number;
1128
+ interface SearchResult<T> {
1129
+ ResultList: T[];
339
1130
  start: number;
340
- networks: NetworkSummaryV2[] | NetworkSummaryV3[];
1131
+ numFound: number;
341
1132
  }
342
1133
  interface SearchParameters {
343
1134
  searchString?: string;
@@ -397,17 +1188,17 @@ interface APIError {
397
1188
  * Base error class for all NDEx API errors
398
1189
  */
399
1190
  declare class NDExError extends Error {
400
- statusCode?: number;
401
- errorCode?: string;
402
- description?: string;
403
- constructor(message: string, statusCode?: number, errorCode?: string, description?: string);
1191
+ statusCode?: number | undefined;
1192
+ errorCode?: string | undefined;
1193
+ description?: string | undefined;
1194
+ constructor(message: string, statusCode?: number | undefined, errorCode?: string | undefined, description?: string | undefined);
404
1195
  }
405
1196
  /**
406
1197
  * Error thrown when network or request fails
407
1198
  */
408
1199
  declare class NDExNetworkError extends NDExError {
409
- originalError?: Error;
410
- constructor(message: string, originalError?: Error);
1200
+ originalError?: Error | undefined;
1201
+ constructor(message: string, originalError?: Error | undefined);
411
1202
  }
412
1203
  /**
413
1204
  * Error thrown when authentication fails
@@ -463,6 +1254,63 @@ interface AccessKeyResponse {
463
1254
  * Valid actions for updating access keys
464
1255
  */
465
1256
  declare type AccessKeyAction = 'enable' | 'disable';
1257
+ /**
1258
+ * NDEx object update status - returned from network creation and update operations
1259
+ * Corresponds to server-side NdexObjectUpdateStatus class
1260
+ */
1261
+ interface NDExObjectUpdateStatus {
1262
+ uuid: string;
1263
+ modificationTime: number;
1264
+ }
1265
+ /**
1266
+ * Items in a file list returned for a folder or user account
1267
+ *
1268
+ * @property uuid - Unique identifier of the file
1269
+ * @property type - Type of the file (folder, network, or shortcut)
1270
+ * @property name - Name of the file (optional for some items)
1271
+ * @property modificationTime - Last modification timestamp
1272
+ * @property updatedBy - Username of the user who last updated the file (optional)
1273
+ * @property attributes - Additional attributes associated with the file
1274
+ * @property isShared - Whether the file is shared (optional)
1275
+ * @property isReadOnly - Whether the file is read-only (networks only, optional)
1276
+ * @property warnings - Array of warning messages (networks only, optional)
1277
+ * @property isCompleted - Whether the file processing is completed (networks only, optional)
1278
+ * @property errorMessage - Error message if file has errors (optional)
1279
+ */
1280
+ interface FileListItem {
1281
+ uuid: string;
1282
+ name?: string;
1283
+ type: NDExFileType;
1284
+ modificationTime: number;
1285
+ attributes: any;
1286
+ updatedBy?: string;
1287
+ owner?: string;
1288
+ ownerUUID?: string;
1289
+ visibility?: Visibility;
1290
+ edges?: number;
1291
+ permission?: Permission;
1292
+ isReadOnly?: boolean;
1293
+ isShared?: boolean;
1294
+ warnings?: string[];
1295
+ isCompleted?: boolean;
1296
+ errorMessage?: string;
1297
+ isValid?: boolean;
1298
+ DOI: string;
1299
+ }
1300
+ /**
1301
+ * Shortcut object structure returned from shortcut operations
1302
+ *
1303
+ * @property name - Name of the shortcut
1304
+ * @property parent - UUID of the parent folder (optional)
1305
+ * @property target - UUID of the target object
1306
+ * @property targetType - File type of the target object
1307
+ */
1308
+ interface Shortcut {
1309
+ name: string;
1310
+ parent?: string;
1311
+ target: string;
1312
+ targetType: NDExFileType;
1313
+ }
466
1314
 
467
1315
  /**
468
1316
  * HTTPService - Core HTTP client for NDEx API communication
@@ -470,6 +1318,7 @@ declare type AccessKeyAction = 'enable' | 'disable';
470
1318
  *
471
1319
  * @note User-Agent header is set to 'NDEx-JS-Client/${version}' but only works in Node.js.
472
1320
  * Browsers will ignore custom User-Agent headers for security reasons.
1321
+ * @internal
473
1322
  */
474
1323
  declare class HTTPService {
475
1324
  private axiosInstance;
@@ -507,67 +1356,7 @@ declare class HTTPService {
507
1356
  delete<T = any>(endpoint: string, config?: AxiosRequestConfig & {
508
1357
  version?: 'v2' | 'v3';
509
1358
  }): Promise<T>;
510
- /**
511
- * Upload a file to the NDEx API with progress tracking support
512
- *
513
- * This method handles file uploads using multipart/form-data encoding and supports
514
- * various input types for maximum flexibility across different environments.
515
- *
516
- * @template T - The expected response type from the API
517
- * @param endpoint - API endpoint path (e.g., 'networks' for network upload)
518
- * @param file - File data to upload. Supports multiple input types:
519
- * - `File` (browser): HTML5 File object from file input or drag-and-drop
520
- * - `Blob` (browser): Binary data as Blob object
521
- * - `Buffer` (Node.js): Binary data as Buffer for server-side uploads
522
- * - `string`: Text content that will be converted to Blob (useful for CX/CX2 JSON)
523
- * @param options - Upload configuration options
524
- * @param options.filename - Custom filename for the upload. Defaults:
525
- * - File objects: uses `file.name`
526
- * - Other types: 'file.cx2'
527
- * @param options.contentType - MIME type for string content (default: 'application/json')
528
- * @param options.onProgress - Progress callback that receives percentage (0-100)
529
- * Called periodically during upload with current progress
530
- * @param options.version - API version to use ('v2' or 'v3', defaults to 'v2')
531
- * @param options.config - Additional Axios configuration options
532
- *
533
- * @returns Promise resolving to upload result
534
- *
535
- * @example
536
- * ```typescript
537
- * // Upload a File object from file input (browser)
538
- * const fileInput = document.getElementById('file') as HTMLInputElement;
539
- * const file = fileInput.files[0];
540
- * const result = await httpService.uploadFile('networks', file, {
541
- * filename: 'my-network.cx2',
542
- * onProgress: (progress) => console.log(`Upload: ${progress}%`),
543
- * version: 'v3'
544
- * });
545
- *
546
- * // Upload CX2 network data as string
547
- * const cx2Data = JSON.stringify({ CXVersion: '2.0', networks: [...] });
548
- * const result = await httpService.uploadFile('networks', cx2Data, {
549
- * filename: 'network.cx2',
550
- * contentType: 'application/json',
551
- * version: 'v3'
552
- * });
553
- *
554
- * // Upload with progress tracking
555
- * const result = await httpService.uploadFile('networks', file, {
556
- * onProgress: (progress) => {
557
- * progressBar.style.width = `${progress}%`;
558
- * console.log(`Uploading: ${progress}%`);
559
- * }
560
- * });
561
- * ```
562
- *
563
- * @throws Will throw NDExError on network errors,
564
- * server errors, or invalid file data
565
- *
566
- * @note The Content-Type header is automatically set to 'multipart/form-data'
567
- * and Axios will handle the boundary parameter automatically
568
- */
569
1359
  uploadFile<T = any>(endpoint: string, file: File | Blob | Buffer | string, options?: {
570
- filename?: string;
571
1360
  contentType?: string;
572
1361
  onProgress?: (progress: number) => void;
573
1362
  version?: 'v2' | 'v3';
@@ -598,9 +1387,9 @@ declare class HTTPService {
598
1387
  getConfig(): NDExClientConfig;
599
1388
  /**
600
1389
  * Get current authentication type
601
- * @returns The type of authentication configured ('basic' | 'oauth'), or undefined if no auth is configured
1390
+ * @returns The type of authentication configured (AuthType), or undefined if no auth is configured
602
1391
  */
603
- getAuthType(): 'basic' | 'oauth' | undefined;
1392
+ getAuthType(): AuthType | undefined;
604
1393
  /**
605
1394
  * Get ID token from OAuth authentication
606
1395
  * @returns The ID token if OAuth auth is configured, undefined otherwise
@@ -765,15 +1554,6 @@ declare class NetworkServiceV3 {
765
1554
  * @returns Promise resolving to raw CX2 network data that may be fragmented
766
1555
  */
767
1556
  getRawCX2Network(networkUUID: string, options?: AccessParams): Promise<CX2Network$1>;
768
- /**
769
- * Create network DOI
770
- *
771
- * @param networkUUID - The UUID of the network to create a DOI for
772
- * @param key - DOI creation key
773
- * @param email - Email address for DOI registration
774
- * @returns Promise resolving to a confirmation message string from the server
775
- */
776
- createNetworkDOI(networkUUID: string, key: string, email: string): Promise<string>;
777
1557
  /**
778
1558
  * Get attributes of selected nodes
779
1559
  *
@@ -808,7 +1588,7 @@ declare class NetworkServiceV3 {
808
1588
  /**
809
1589
  * Search networks with V3 enhanced features
810
1590
  */
811
- searchNetworks(searchParams?: SearchParameters): Promise<SearchResult>;
1591
+ searchNetworks(searchParams?: SearchParameters): Promise<SearchResult<NetworkSummaryV3>>;
812
1592
  /**
813
1593
  * Get network as CX2Network object with utilities
814
1594
  */
@@ -817,26 +1597,37 @@ declare class NetworkServiceV3 {
817
1597
  * Create new network from CX2
818
1598
  */
819
1599
  createNetworkFromCX2(cx2Data: CX2Network$1 | CX2Network, options?: {
820
- visibility?: 'PUBLIC' | 'PRIVATE';
821
- name?: string;
822
- }): Promise<{
823
- uuid: string;
824
- }>;
1600
+ visibility?: Visibility;
1601
+ folderId?: string;
1602
+ }): Promise<NDExObjectUpdateStatus>;
825
1603
  /**
826
1604
  * Update network with CX2 data
827
1605
  */
828
- updateNetworkCX2(networkUUID: string, cx2Data: CX2Network$1 | CX2Network): Promise<void>;
1606
+ updateNetworkCX2(networkUUID: string, cx2Data: CX2Network$1 | CX2Network): Promise<NDExObjectUpdateStatus>;
829
1607
  /**
830
- * Upload network file (CX2, CX, or other formats)
1608
+ * Upload CX2 network via multipart/form-data
1609
+ *
1610
+ * Server endpoint: POST /v3/networks
1611
+ * Consumes: multipart/form-data
1612
+ * Form field: 'CXNetworkStream' (the CX2 content)
1613
+ * Query params: visibility, folderId
1614
+ * Returns: NdexObjectUpdateStatus
831
1615
  */
832
- uploadNetworkFile(file: File | Blob | string, options?: {
833
- filename?: string;
834
- visibility?: 'PUBLIC' | 'PRIVATE';
835
- name?: string;
1616
+ uploadCX2Network(cx2: File | Blob | Buffer | string | NodeJS.ReadableStream, options?: {
1617
+ visibility?: Visibility;
1618
+ folderId?: string;
836
1619
  onProgress?: (progress: number) => void;
837
- }): Promise<{
838
- uuid: string;
839
- }>;
1620
+ }): Promise<NDExObjectUpdateStatus>;
1621
+ /**
1622
+ * Upload network file (Deprecated convenience wrapper)
1623
+ *
1624
+ * Delegates to uploadCX2Network(). Kept for backward compatibility.
1625
+ */
1626
+ uploadNetworkFile(file: File | Blob | Buffer | string | NodeJS.ReadableStream, options?: {
1627
+ visibility?: Visibility;
1628
+ onProgress?: (progress: number) => void;
1629
+ folderId?: string;
1630
+ }): Promise<NDExObjectUpdateStatus>;
840
1631
  /**
841
1632
  * Get network metadata (V3 enhanced)
842
1633
  */
@@ -849,6 +1640,12 @@ declare class NetworkServiceV3 {
849
1640
  * Get network aspect (specific CX2 aspect)
850
1641
  */
851
1642
  getNetworkAspect(networkUUID: string, aspectName: string, options?: AccessParams): Promise<any>;
1643
+ /**
1644
+ * Delete network
1645
+ * @param networkUUID - The UUID of the network to delete
1646
+ * @param permanent - If true, permanently delete the network. If false (default), soft delete to trash for 30 days
1647
+ */
1648
+ deleteNetwork(networkUUID: string, permanent?: boolean): Promise<void>;
852
1649
  }
853
1650
 
854
1651
  /**
@@ -874,6 +1671,40 @@ declare class NetworkServiceV2 {
874
1671
  * Get network summary by UUID
875
1672
  */
876
1673
  getNetworkSummary(networkUUID: string, options?: AccessParams): Promise<NetworkSummaryV2>;
1674
+ /**
1675
+ * Update network summary
1676
+ *
1677
+ * Updates the summary information for an existing network. This allows modification
1678
+ * of network metadata such as name, description, visibility, and other summary properties
1679
+ * without updating the actual network content (nodes/edges).
1680
+ *
1681
+ * @param networkUUID - The UUID of the network to update
1682
+ * @param networkSummary - The updated network summary object containing the new metadata
1683
+ * @returns Promise that resolves when the update is complete
1684
+ *
1685
+ * @example
1686
+ * ```typescript
1687
+ * // Update network name and description
1688
+ * await networkService.updateNetworkSummary('12345678-1234-1234-1234-123456789abc', {
1689
+ * externalId: '12345678-1234-1234-1234-123456789abc',
1690
+ * name: 'Updated Network Name',
1691
+ * description: 'Updated network description',
1692
+ * nodeCount: 150,
1693
+ * edgeCount: 200,
1694
+ * visibility: 'PUBLIC',
1695
+ * owner: 'username',
1696
+ * ownerUUID: 'user-uuid',
1697
+ * creationTime: 1234567890,
1698
+ * modificationTime: 1234567890,
1699
+ * isReadOnly: false,
1700
+ * isValid: true,
1701
+ * hasLayout: true,
1702
+ * hasSample: false,
1703
+ * updatedBy: 'username'
1704
+ * });
1705
+ * ```
1706
+ */
1707
+ updateNetworkSummary(networkUUID: string, networkSummary: NetworkSummaryV2): Promise<void>;
877
1708
  /**
878
1709
  * Copy network
879
1710
  *
@@ -916,7 +1747,7 @@ declare class NetworkServiceV2 {
916
1747
  * @returns Promise resolving to the UUID string of the newly created network
917
1748
  */
918
1749
  createNetworkFromRawCX1(rawCX: any[], options?: {
919
- visibility?: 'PUBLIC' | 'PRIVATE';
1750
+ visibility?: Visibility;
920
1751
  }): Promise<string>;
921
1752
  /**
922
1753
  * Update network from raw CX1 data
@@ -964,7 +1795,7 @@ declare class NetworkServiceV2 {
964
1795
  /**
965
1796
  * Grant network permission to user
966
1797
  */
967
- grantNetworkPermission(networkUUID: string, userUUID: string, permission: 'READ' | 'WRITE' | 'ADMIN'): Promise<void>;
1798
+ grantNetworkPermission(networkUUID: string, userUUID: string, permission: Permission): Promise<void>;
968
1799
  /**
969
1800
  * Revoke network permission from user
970
1801
  */
@@ -1057,9 +1888,78 @@ declare class UnifiedNetworkService {
1057
1888
  private v3Service;
1058
1889
  constructor(http: HTTPService);
1059
1890
  /**
1060
- * Get network summary using specified API version
1891
+ * Get network summary using V3 API
1892
+ *
1893
+ * Retrieves comprehensive summary information for a network including metadata,
1894
+ * statistics, permissions, and other network properties using the V3 API.
1895
+ *
1896
+ * @param networkUUID - The UUID of the network to get summary for
1897
+ * @param options - Access options including optional access key for private networks
1898
+ * @returns Promise resolving to NetworkSummaryV3 object containing network summary information
1061
1899
  */
1062
1900
  getNetworkSummary(networkUUID: string, options?: AccessParams): Promise<NetworkSummaryV3>;
1901
+ /**
1902
+ * Update network summary using V3 to V2 transformation
1903
+ *
1904
+ * Updates network summary information by accepting a NetworkSummaryV3 object,
1905
+ * transforming it to the V2 format, and calling the V2 API endpoint.
1906
+ * This provides a unified interface for updating network summaries while
1907
+ * maintaining compatibility with the existing V2 backend infrastructure.
1908
+ *
1909
+ * @param networkUUID - The UUID of the network to update
1910
+ * @param networkSummaryV3 - The updated network summary in V3 format
1911
+ * @returns Promise that resolves when the update is complete
1912
+ *
1913
+ * @example
1914
+ * ```typescript
1915
+ * // Update network summary using V3 format
1916
+ * const summaryV3: NetworkSummaryV3 = {
1917
+ * externalId: '12345678-1234-1234-1234-123456789abc',
1918
+ * name: 'Updated Network Name',
1919
+ * description: 'Updated network description',
1920
+ * nodeCount: 150,
1921
+ * edgeCount: 200,
1922
+ * visibility: 'PUBLIC',
1923
+ * owner: 'username',
1924
+ * ownerUUID: 'user-uuid',
1925
+ * creationTime: 1234567890,
1926
+ * modificationTime: 1234567890,
1927
+ * isReadOnly: false,
1928
+ * isValid: true,
1929
+ * hasLayout: true,
1930
+ * hasSample: false,
1931
+ * updatedBy: 'username',
1932
+ * properties: {
1933
+ * category: { t: 'string', v: 'biological' },
1934
+ * version: { t: 'double', v: 2.1 }
1935
+ * }
1936
+ * };
1937
+ *
1938
+ * await client.networks.updateNetworkSummary('network-uuid', summaryV3);
1939
+ * ```
1940
+ */
1941
+ updateNetworkSummary(networkUUID: string, networkSummaryV3: NetworkSummaryV3): Promise<void>;
1942
+ /**
1943
+ * Transform NetworkSummaryV3 to NetworkSummaryV2 format
1944
+ *
1945
+ * Converts V3 properties format (CX2-style object map) to V2 properties format (CX1-style array).
1946
+ * This transformation is necessary because the V2 API expects properties in the older array format.
1947
+ * Special handling for "version" attribute - moved to top-level version field.
1948
+ *
1949
+ * @param v3Summary - Network summary in V3 format with CX2-style properties
1950
+ * @returns Network summary in V2 format with CX1-style properties
1951
+ */
1952
+ private transformV3ToV2;
1953
+ /**
1954
+ * Convert CX2 property values to strings
1955
+ *
1956
+ * For singleton values, converts to string directly.
1957
+ * For list type values, converts each element to string.
1958
+ *
1959
+ * @param value - The CX2 property value (can be any type or array)
1960
+ * @returns String representation of the value
1961
+ */
1962
+ private convertValueToString;
1063
1963
  /**
1064
1964
  * Search networks using specified API version
1065
1965
  * NOTE: This method is temporarily commented out as the V2 searchNetworks
@@ -1075,17 +1975,46 @@ declare class UnifiedNetworkService {
1075
1975
  getRawCX2Network(networkUUID: string, options?: AccessParams): Promise<CX2Network$1>;
1076
1976
  /**
1077
1977
  * Delete network
1978
+ * @param networkUUID - The UUID of the network to delete
1979
+ * @param permanent - If true, permanently delete the network. If false (default), soft delete to trash for 30 days
1078
1980
  */
1079
- deleteNetwork(networkUUID: string): Promise<void>;
1981
+ deleteNetwork(networkUUID: string, permanent?: boolean): Promise<void>;
1080
1982
  /**
1081
1983
  * Create network DOI
1082
1984
  *
1083
- * @param networkUUID - The UUID of the network to create a DOI for
1084
- * @param key - DOI creation key
1085
- * @param email - Email address for DOI registration
1086
- * @returns Promise resolving to a confirmation message string from the server
1985
+ * Requests a DOI (Digital Object Identifier) for a network. A reference is not required to request a DOI.
1986
+ * If you want the ability to add or modify a reference later on, set `isCertified` to true.
1987
+ * When certified, the network will be permanently locked, made publicly visible, and no further changes
1988
+ * will be allowed.
1989
+ *
1990
+ * @param params - DOI request parameters
1991
+ * @param params.networkId - UUID of the network to create a DOI for
1992
+ * @param params.isCertified - If true, network will be permanently locked and made public with no further changes allowed
1993
+ * @param params.contactEmail - Email address that the DOI creation confirmation should be sent to
1994
+ * @returns Promise that resolves when the DOI request is submitted
1995
+ *
1996
+ * @example
1997
+ * ```typescript
1998
+ * // Request a DOI for a network without certification
1999
+ * await client.networks.createNetworkDOI({
2000
+ * networkId: '12345678-1234-1234-1234-123456789abc',
2001
+ * isCertified: false,
2002
+ * contactEmail: 'user@example.com'
2003
+ * });
2004
+ *
2005
+ * // Request a certified DOI (network will be permanently locked)
2006
+ * await client.networks.createNetworkDOI({
2007
+ * networkId: '12345678-1234-1234-1234-123456789abc',
2008
+ * isCertified: true,
2009
+ * contactEmail: 'user@example.com'
2010
+ * });
2011
+ * ```
1087
2012
  */
1088
- createNetworkDOI(networkUUID: string, key: string, email: string): Promise<string>;
2013
+ createNetworkDOI(params: {
2014
+ networkId: string;
2015
+ isCertified: boolean;
2016
+ contactEmail: string;
2017
+ }): Promise<void>;
1089
2018
  /**
1090
2019
  * Get attributes of selected nodes
1091
2020
  *
@@ -1183,20 +2112,71 @@ declare class UnifiedNetworkService {
1183
2112
  * @param folderId - Target folder ID to move networks to
1184
2113
  * @returns Promise resolving when networks are moved
1185
2114
  */
1186
- moveNetworks(networkIds: string[], folderId: string): Promise<any>;
2115
+ moveNetworks(networkIds: string[], folderId?: string): Promise<any>;
1187
2116
  /**
1188
- * Set networks visibility (migrated from original NDEx.js)
2117
+ * Set visibility for multiple files (networks, folders, shortcuts)
1189
2118
  *
1190
- * Changes visibility settings for multiple networks using the V3 API.
1191
- * Requires proper file validation to ensure data integrity.
2119
+ * Changes visibility settings for multiple NDEx objects using the V3 API.
2120
+ * This function can update visibility for any combination of networks, folders, and shortcuts.
2121
+ * Files are validated to ensure proper UUID format and valid file types.
1192
2122
  *
1193
- * @param files - Object containing files with their types (must have 'files' property)
1194
- * @param visibility - Visibility setting (e.g., 'PUBLIC', 'PRIVATE')
1195
- * @returns Promise resolving when visibility is updated
2123
+ * @param files - Object containing a 'files' property with UUID-to-filetype mappings
2124
+ * @param files.files - Record where keys are UUIDs and values are NDExFileType ('NETWORK', 'FOLDER', or 'SHORTCUT')
2125
+ * @param visibility - Visibility setting: 'PUBLIC', 'PRIVATE', or 'UNLISTED'
2126
+ * @returns Promise resolving when visibility is successfully updated
2127
+ * @throws Error if files validation fails or API request fails
2128
+ *
2129
+ * @example
2130
+ * ```typescript
2131
+ * // Set multiple files to public visibility
2132
+ * await client.networks.setNetworksVisibility({
2133
+ * files: {
2134
+ * '12345678-1234-1234-1234-123456789abc': 'NETWORK',
2135
+ * '87654321-4321-4321-4321-876543210fed': 'FOLDER',
2136
+ * '11111111-2222-3333-4444-555555555555': 'SHORTCUT'
2137
+ * }
2138
+ * }, 'PUBLIC');
2139
+ *
2140
+ * // Set networks to private visibility
2141
+ * await client.networks.setNetworksVisibility({
2142
+ * files: {
2143
+ * 'network-uuid-1': 'NETWORK',
2144
+ * 'network-uuid-2': 'NETWORK'
2145
+ * }
2146
+ * }, 'PRIVATE');
2147
+ * ```
1196
2148
  */
1197
2149
  setNetworksVisibility(files: {
1198
- files: Record<string, 'NETWORK' | 'FOLDER' | 'SHORTCUT'>;
1199
- }, visibility: string): Promise<any>;
2150
+ files: Record<string, NDExFileType>;
2151
+ }, visibility: Visibility): Promise<any>;
2152
+ /**
2153
+ * Get network access key
2154
+ *
2155
+ * Retrieves the access key for a network if it has been enabled for public access.
2156
+ * When a network has an access key enabled, it can be accessed by others without
2157
+ * explicit permissions using this key.
2158
+ *
2159
+ * @param networkUUID - The UUID of the network to get the access key for
2160
+ * @returns Promise resolving to an object with accessKey property when enabled,
2161
+ * or null when access key is not enabled on this network
2162
+ *
2163
+ * @example
2164
+ * ```typescript
2165
+ * // Check if network has an access key
2166
+ * const result = await client.networks.getNetworkAccessKey('12345678-1234-1234-1234-123456789abc');
2167
+ *
2168
+ * if (result) {
2169
+ * console.log('Access key:', result.accessKey); // "sdfdfdfsdfdsfs"
2170
+ * // Use the access key to access the network
2171
+ * const networkData = await client.networks.getRawCX2Network(networkUUID, { accessKey: result.accessKey });
2172
+ * } else {
2173
+ * console.log('No access key enabled for this network');
2174
+ * }
2175
+ * ```
2176
+ */
2177
+ getNetworkAccessKey(networkUUID: string): Promise<{
2178
+ accessKey: string;
2179
+ } | null>;
1200
2180
  /**
1201
2181
  * Get random edges from network (migrated from original NDEx.js)
1202
2182
  *
@@ -1211,13 +2191,13 @@ declare class UnifiedNetworkService {
1211
2191
  */
1212
2192
  getRandomEdges(networkUUID: string, limit: number, accessKey?: string): Promise<CX2Edge[]>;
1213
2193
  /**
1214
- * Validate share data format (helper method for file operations)
2194
+ * Validate UUID format in file data (helper method for file operations)
1215
2195
  *
1216
- * Validates the structure and content of file data used in sharing operations.
1217
- * Ensures proper UUID format and valid file types.
2196
+ * Validates that all UUID keys in the files object follow proper UUID format.
2197
+ * TypeScript ensures object structure and file type validity at compile time.
1218
2198
  *
1219
- * @param data - Data object to validate (must contain 'files' property)
1220
- * @throws Error if validation fails
2199
+ * @param data - Data object containing files property with UUID keys and NDExFileType values
2200
+ * @throws Error if UUID validation fails
1221
2201
  */
1222
2202
  private validateShareData;
1223
2203
  /**
@@ -1303,28 +2283,33 @@ declare class UnifiedNetworkService {
1303
2283
  /**
1304
2284
  * Create network from raw CX2 data (migrated from original NDEx.js)
1305
2285
  *
1306
- * Creates a new network in NDEx from raw CX2 network data. This is an unstable function
1307
- * for uploading CX2 format networks directly to NDEx using the V3 API. The function
1308
- * extracts the network UUID from the response location header.
2286
+ * Creates a new network on NDEx from raw CX2 data using the V3 API.
2287
+ * This function delegates to the NetworkServiceV3 implementation.
1309
2288
  *
1310
- * @param rawCX2 - Raw CX2 network data as an object or CX2Network instance
1311
- * @param makePublic - Whether to make the network public (default: false = private)
1312
- * @returns Promise resolving to an object containing the UUID of the created network
2289
+ * @param cx2Data - Raw CX2 network data as an object or CX2Network instance
2290
+ * @param options - Creation options including visibility and folderId
2291
+ * @param options.visibility - Network visibility: 'PUBLIC', 'PRIVATE', or 'UNLISTED' (default: 'PRIVATE')
2292
+ * @param options.folderId - UUID of the folder to create the network in. If omitted, network is created in user's home directory
2293
+ * @returns Promise resolving to NDExObjectUpdateStatus with uuid and modificationTime
1313
2294
  *
1314
2295
  * @example
1315
2296
  * ```typescript
1316
- * // Create private network from raw CX2 data
2297
+ * // Create private network from raw CX2 data in user's home directory
1317
2298
  * const result = await client.networks.createNetworkFromRawCX2(cx2Data);
1318
2299
  * console.log(result.uuid); // "12345678-1234-1234-1234-123456789abc"
1319
2300
  *
1320
- * // Create public network from raw CX2 data
1321
- * const publicResult = await client.networks.createNetworkFromRawCX2(cx2Data, true);
2301
+ * // Create public network from raw CX2 data in a specific folder
2302
+ * const publicResult = await client.networks.createNetworkFromRawCX2(cx2Data, {
2303
+ * visibility: 'PUBLIC' as Visibility,
2304
+ * folderId: '87654321-4321-4321-4321-876543210fed'
2305
+ * });
1322
2306
  * console.log(publicResult.uuid);
1323
2307
  * ```
1324
2308
  */
1325
- createNetworkFromRawCX2(rawCX2: CX2Network$1 | any, makePublic?: boolean): Promise<{
1326
- uuid: string;
1327
- }>;
2309
+ createNetworkFromRawCX2(cx2Data: CX2Network$1 | CX2Network, options?: {
2310
+ visibility?: Visibility;
2311
+ folderId?: string;
2312
+ }): Promise<NDExObjectUpdateStatus>;
1328
2313
  /**
1329
2314
  * Update network from raw CX2 data (migrated from original NDEx.js)
1330
2315
  *
@@ -1342,6 +2327,26 @@ declare class UnifiedNetworkService {
1342
2327
  * ```
1343
2328
  */
1344
2329
  updateNetworkFromRawCX2(networkUUID: string, rawCX2: CX2Network$1 | any): Promise<void>;
2330
+ /**
2331
+ * Set read-only flag on a network
2332
+ *
2333
+ * Sets or unsets the read-only flag for a network using the V2 API.
2334
+ * When a network is marked as read-only, it cannot be modified.
2335
+ *
2336
+ * @param networkId - The UUID of the network to modify
2337
+ * @param readOnly - true to set the network as read-only, false to allow modifications
2338
+ * @returns Promise resolving when the read-only status is updated
2339
+ *
2340
+ * @example
2341
+ * ```typescript
2342
+ * // Set network as read-only
2343
+ * await client.networks.setReadOnly('network-uuid', true);
2344
+ *
2345
+ * // Allow network modifications
2346
+ * await client.networks.setReadOnly('network-uuid', false);
2347
+ * ```
2348
+ */
2349
+ setReadOnly(networkId: string, readOnly: boolean): Promise<void>;
1345
2350
  /**
1346
2351
  * Access to underlying service instances for advanced usage
1347
2352
  */
@@ -1349,67 +2354,6 @@ declare class UnifiedNetworkService {
1349
2354
  get v3(): NetworkServiceV3;
1350
2355
  }
1351
2356
 
1352
- interface ShareData {
1353
- files: Record<string, 'NETWORK' | 'FOLDER' | 'SHORTCUT'>;
1354
- }
1355
- interface MemberData {
1356
- members: Record<string, 'READ' | 'WRITE'>;
1357
- }
1358
- /**
1359
- * FilesService - NDEx file operations and task management
1360
- * Handles file uploads, downloads, exports, and asynchronous task tracking
1361
- */
1362
- declare class FilesService {
1363
- private http;
1364
- constructor(http: HTTPService);
1365
- /**
1366
- * Copy a file to a different location
1367
- * @param fromUuid - Source file UUID
1368
- * @param toPath - Target path
1369
- * @param type - File type (NETWORK, FOLDER, SHORTCUT)
1370
- * @param accessKey - Optional access key for protected files
1371
- */
1372
- copyFile(fromUuid: string, toPath: string, type: string, accessKey?: string): Promise<any>;
1373
- /** Get file count statistics for the current user */
1374
- getCount(): Promise<any>;
1375
- /** Get files in the trash for the current user */
1376
- getTrash(): Promise<any>;
1377
- /** Permanently delete all files in trash */
1378
- emptyTrash(): Promise<any>;
1379
- /**
1380
- * Permanently delete a file from trash
1381
- * @param fileId - File UUID to permanently delete
1382
- */
1383
- permanentlyDeleteFile(fileId: string): Promise<any>;
1384
- /**
1385
- * Restore files from trash
1386
- * @param networkIds - Array of network UUIDs to restore
1387
- * @param folderIds - Array of folder UUIDs to restore
1388
- * @param shortcutIds - Array of shortcut UUIDs to restore
1389
- */
1390
- restoreFile(networkIds: string[], folderIds: string[], shortcutIds: string[]): Promise<any>;
1391
- private _validateShareData;
1392
- private _validateMemberData;
1393
- updateMember(files: ShareData['files'], members: MemberData['members']): Promise<any>;
1394
- listMembers(files: any): Promise<any>;
1395
- transferOwnership(files: ShareData['files'], newOwner: string): Promise<any>;
1396
- listShares(limit?: number): Promise<any>;
1397
- share(files: ShareData['files']): Promise<any>;
1398
- unshare(files: ShareData['files']): Promise<any>;
1399
- getFolders(limit?: number): Promise<any>;
1400
- createFolder(name: string, parentFolderId?: string): Promise<any>;
1401
- getFolder(folderId: string, accessKey?: string): Promise<any>;
1402
- updateFolder(folderId: string, name: string, parentFolderId?: string): Promise<any>;
1403
- deleteFolder(folderId: string): Promise<any>;
1404
- getFolderCount(folderId: string, accessKey?: string): Promise<any>;
1405
- getFolderList(folderId: string, accessKey?: string, format?: string, type?: string): Promise<any>;
1406
- getShortcuts(limit?: number): Promise<any>;
1407
- createShortcut(name: string, parentFolderId?: string, targetId?: string, targetType?: string): Promise<any>;
1408
- getShortcut(shortcutId: string, accessKey?: string): Promise<any>;
1409
- updateShortcut(shortcutId: string, name: string, parentFolderId?: string, targetId?: string, targetType?: string): Promise<any>;
1410
- deleteShortcut(shortcutId: string): Promise<any>;
1411
- }
1412
-
1413
2357
  /**
1414
2358
  * WorkspaceService - NDEx CyWeb workspace operations
1415
2359
  *
@@ -1611,9 +2555,9 @@ declare class UserService {
1611
2555
  * @param searchTerms - Search string to find users
1612
2556
  * @param start - Starting offset for pagination (optional)
1613
2557
  * @param size - Maximum number of results to return (optional)
1614
- * @returns Array of users matching the search criteria
2558
+ * @returns Search result containing users matching the search criteria
1615
2559
  */
1616
- searchUsers(searchTerms: string, start?: number, size?: number): Promise<NDExUser[]>;
2560
+ searchUsers(searchTerms: string, start?: number, size?: number): Promise<SearchResult<NDExUser>>;
1617
2561
  /**
1618
2562
  * Get networks for a user's account page (equivalent to getAccountPageNetworks from legacy client)
1619
2563
  *
@@ -1624,6 +2568,17 @@ declare class UserService {
1624
2568
  * @note This function requires authentication. The auth attribute must be set in the client configuration.
1625
2569
  */
1626
2570
  getAccountPageNetworks(userUUID: string, offset?: number, limit?: number): Promise<NetworkSummaryV2[]>;
2571
+ /**
2572
+ * Get User's Home Content
2573
+ * Returns the content of a user's home folder including networks, folders, and shortcuts.
2574
+ * Shows different content based on authentication status and relationship to the user.
2575
+ *
2576
+ * @param userUuid - User UUID to get home content for
2577
+ * @param format - Format parameter: 'update' or 'compact' (default: "update")
2578
+ * @returns List of file items in the user's home folder
2579
+ * @note This function requires authentication. The auth attribute must be set in the client configuration.
2580
+ */
2581
+ getUserHomeContent(userUuid: string, format?: 'update' | 'compact'): Promise<FileListItem[]>;
1627
2582
  /**
1628
2583
  * Delete user account (server validates userid matches authenticated user)
1629
2584
  * @param userUUID - User UUID to delete (must match authenticated user)
@@ -1638,8 +2593,7 @@ declare class UserService {
1638
2593
  * Handles system administration and user management for admin users
1639
2594
  */
1640
2595
  declare class AdminService {
1641
- private http;
1642
- constructor(http: HTTPService);
2596
+ constructor();
1643
2597
  }
1644
2598
 
1645
2599
  /**
@@ -1825,7 +2779,7 @@ declare class CyNDExService {
1825
2779
  * @param uuid - Target NDEx network UUID to update
1826
2780
  * @returns Promise resolving to update result
1827
2781
  */
1828
- putCytoscapeNetworkInNDEx(suid: string, uuid: string): Promise<any>;
2782
+ putCytoscapeNetworkInNDEx(suid: string | undefined, uuid: string): Promise<any>;
1829
2783
  }
1830
2784
 
1831
2785
  /**
@@ -1842,14 +2796,14 @@ declare class CyNDExService {
1842
2796
  * debug: true
1843
2797
  * });
1844
2798
  *
1845
- * // Authenticate
1846
- * await client.user.authenticate({ username: 'user', password: 'pass' });
2799
+ * // Authenticate (requires auth config in constructor)
2800
+ * const user = await client.user.authenticate();
1847
2801
  *
1848
2802
  * // Search networks
1849
2803
  * const results = await client.networks.searchNetworks({ searchString: 'pathway' });
1850
2804
  *
1851
2805
  * // Get network as CX2
1852
- * const network = await client.networks.getNetworkAsCX2Object('network-uuid');
2806
+ * const network = await client.networks.getRawCX2Network('network-uuid');
1853
2807
  *
1854
2808
  * // User operations
1855
2809
  * const profile = await client.user.getCurrentUser();
@@ -1913,9 +2867,16 @@ declare class NDExClient {
1913
2867
  */
1914
2868
  getConfig(): NDExClientConfig;
1915
2869
  /**
1916
- * Access to low-level HTTP service for advanced usage
2870
+ * Get current authentication type
2871
+ * @returns The type of authentication configured (AuthType), or undefined if no auth is configured
2872
+ */
2873
+ getAuthType(): AuthType | undefined;
2874
+ /**
2875
+ * Set ID token for OAuth authentication
2876
+ * Creates OAuth auth configuration if no auth is currently configured
2877
+ * @param idToken - The ID token to set
1917
2878
  */
1918
- get http(): HTTPService;
2879
+ setIdToken(idToken: string): void;
1919
2880
  /**
1920
2881
  * Access to version-specific network services for advanced usage
1921
2882
  */
@@ -1926,6 +2887,29 @@ declare class NDExClient {
1926
2887
  networks: NetworkServiceV3;
1927
2888
  };
1928
2889
  }
2890
+ /**
2891
+ * Library version string imported from package.json
2892
+ *
2893
+ * Provides programmatic access to the current library version for:
2894
+ * - Runtime version checking and validation
2895
+ * - Debugging and error reporting
2896
+ * - Logging and telemetry
2897
+ * - Version-dependent feature detection
2898
+ *
2899
+ * @example
2900
+ * ```typescript
2901
+ * import { NDExClient, version } from '@js4cytoscape/ndex-client';
2902
+ *
2903
+ * console.log(`Using NDEx Client v${version}`);
2904
+ *
2905
+ * // In error reports
2906
+ * const errorReport = {
2907
+ * error: err.message,
2908
+ * libraryVersion: version,
2909
+ * timestamp: new Date().toISOString()
2910
+ * };
2911
+ * ```
2912
+ */
1929
2913
  declare const version: string;
1930
2914
 
1931
- export { type APIError, type APIResponse, type AccessKeyAction, type AccessKeyResponse, type AccessParams, AdminService, type BasicAuth, type CX1Edge, type CX1MetaDataItem, type CX1MetaDataResponse, type CX1NetworkProperty, type CX2AttributeDeclarations, type CX2AttributeSpec, type CX2Edge, type CX2EdgeBypass, type CX2ImportParams, type CX2MetaData, CX2Network, type CX2NetworkAttribute, type CX2NetworkProperties, type CX2Node, type CX2NodeBypass, type CX2Status, type CX2VisualProperty, CyNDExService as CyNDEx, type CyNDExAuthConfig, type CyNDExConfig, CyNDExService, type CyNDExStatusResponse, type CyWebWorkspace, type CytoscapeNetworkSummary, type DefaultVisualProperties, type ExportFormat, type ExportRequest, FilesService, HTTPService, type MappingDefinition, type NDExAny, NDExAuthError, type NDExAuthResponse, NDExClient, type NDExClientConfig, NDExError, type NDExExportParams, type NDExImportParams, NDExNetworkError, NDExNotFoundError, NDExServerError, type NDExUser, NDExValidationError, NetworkIndexLevel, type NetworkPermission, NetworkServiceV2, NetworkServiceV3, type NetworkSummaryV2, type NetworkSummaryV3, type OAuthAuth, type PaginationParams, type SearchParameters, type SearchResult, type TableColumnVisualStyle, type Task, type Timestamp, type UUID, UnifiedNetworkService, UserService, type VPMappingType, type VisualPropertyMapping, type VisualPropertyTable, WorkspaceService, version };
2915
+ export { type APIError, type APIResponse, type AccessKeyAction, type AccessKeyResponse, type AccessParams, AdminService, AuthType, type BasicAuth, type CX1Edge, type CX1MetaDataItem, type CX1MetaDataResponse, type CX1NetworkProperty, type CX2AttributeDeclarations, type CX2AttributeSpec, type CX2Edge, type CX2EdgeBypass, type CX2ImportParams, type CX2MetaData, CX2Network, type CX2NetworkAttribute, type CX2NetworkProperties, type CX2Node, type CX2NodeBypass, type CX2Status, type CX2VisualProperty, CXDataType, CyNDExService as CyNDEx, type CyNDExAuthConfig, type CyNDExConfig, CyNDExService, type CyNDExStatusResponse, type CyWebWorkspace, type CytoscapeNetworkSummary, type DefaultVisualProperties, type ExportFormat, type ExportRequest, type FileListItem, type FilePermissionDetails, type FilePermissionList, type FileSearchParams, FilesService, type MappingDefinition, type NDExAny, NDExAuthError, type NDExAuthResponse, NDExClient, type NDExClientConfig, NDExError, type NDExExportParams, NDExFileType, type NDExImportParams, NDExNetworkError, NDExNotFoundError, type NDExObjectUpdateStatus, NDExServerError, type NDExUser, NDExValidationError, NetworkIndexLevel, type NetworkPermission, NetworkServiceV2, NetworkServiceV3, type NetworkSummaryV2, type NetworkSummaryV3, type OAuthAuth, type PaginationParams, Permission, type SearchParameters, type SearchResult, type SharingMemberRequest, type Shortcut, type TableColumnVisualStyle, type Task, type Timestamp, type UUID, UnifiedNetworkService, UserService, VPMappingType, Visibility, type VisualPropertyMapping, type VisualPropertyTable, WorkspaceService, version };