@ibm-aspera/sdk 0.7.4 → 0.11.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.
@@ -1,5 +1,5 @@
1
1
  import { AsperaSdkInfo, TransferResponse } from '../models/aspera-sdk.model';
2
- import { CustomBrandingOptions, DataTransferResponse, DropzoneEventData, DropzoneOptions, AsperaSdkSpec, AsperaSdkTransfer, FileDialogOptions, FolderDialogOptions, InitOptions, ModifyTransferOptions, Pagination, PaginatedFilesResponse, ResumeTransferOptions, TransferSpec, WebsocketEvent, ReadChunkAsArrayBufferResponse, ReadAsArrayBufferResponse, SdkCapabilities, GetChecksumOptions, ChecksumFileResponse } from '../models/models';
2
+ import { CustomBrandingOptions, DataTransferResponse, DropzoneEventData, DropzoneOptions, AsperaSdkSpec, AsperaSdkTransfer, FileDialogOptions, FolderDialogOptions, InitOptions, ModifyTransferOptions, Pagination, PaginatedFilesResponse, ResumeTransferOptions, TransferSpec, WebsocketEvent, ReadChunkAsArrayBufferResponse, ReadAsArrayBufferResponse, SdkCapabilities, GetChecksumOptions, ChecksumFileResponse, ReadDirectoryOptions, ReadDirectoryResponse } from '../models/models';
3
3
  /**
4
4
  * Check if IBM Aspera for Desktop connection works. This function is called by init
5
5
  * when initializing the SDK. This function can be used at any point for checking.
@@ -116,12 +116,28 @@ export declare const showSelectFileDialog: (options?: FileDialogOptions) => Prom
116
116
  * @returns a promise that resolves with the selected folder(s) and rejects if user cancels dialog
117
117
  */
118
118
  export declare const showSelectFolderDialog: (options?: FolderDialogOptions) => Promise<DataTransferResponse>;
119
+ /**
120
+ * Shows the about page of the transfer client.
121
+ *
122
+ * This is supported when using Connect or IBM Aspera for desktop, but not HTTP Gateway.
123
+ *
124
+ * @returns a promise that resolves when the about page is shown.
125
+ */
126
+ export declare const showAbout: () => Promise<any>;
119
127
  /**
120
128
  * Opens the IBM Aspera preferences page.
121
129
  *
122
130
  * @returns a promise that resolves when the preferences page is opened.
123
131
  */
124
132
  export declare const showPreferences: () => Promise<any>;
133
+ /**
134
+ * Opens the transfer manager UI of the native transfer client.
135
+ *
136
+ * Supported for Connect and IBM Aspera for desktop. Not supported for HTTP Gateway.
137
+ *
138
+ * @returns a promise that resolves when the transfer manager is opened.
139
+ */
140
+ export declare const showTransferManager: () => Promise<any>;
125
141
  /**
126
142
  * Get all transfers associated with the current application.
127
143
  *
@@ -224,6 +240,16 @@ export declare const readChunkAsArrayBuffer: (path: string, offset: number, chun
224
240
  * @returns a promise that resolves with the checksum information
225
241
  */
226
242
  export declare const getChecksum: (options: GetChecksumOptions) => Promise<ChecksumFileResponse>;
243
+ /**
244
+ * Read the contents of a directory, returning all entries as a flat list.
245
+ *
246
+ * This API is only supported when using IBM Aspera for desktop.
247
+ *
248
+ * @param options options including the directory path, optional recursion depth, and filters
249
+ *
250
+ * @returns a promise that resolves with the directory entries and total count
251
+ */
252
+ export declare const readDirectory: (options: ReadDirectoryOptions) => Promise<ReadDirectoryResponse>;
227
253
  /**
228
254
  * Returns an object describing the high-level capabilities supported by the user's
229
255
  * transfer client (e.g. IBM Aspera for desktop, Connect, or HTTP Gateway).
@@ -245,3 +271,22 @@ export declare const getChecksum: (options: GetChecksumOptions) => Promise<Check
245
271
  * }
246
272
  */
247
273
  export declare const getCapabilities: () => SdkCapabilities;
274
+ /**
275
+ * Check if the SDK and underlying transfer client supports a specific capability.
276
+ *
277
+ * Capabilities depend on the transfer client being used (HTTP Gateway, Connect, or IBM Aspera for desktop).
278
+ * Use this function to conditionally enable/disable features in your application.
279
+ *
280
+ * @param capability the capability to check.
281
+ *
282
+ * @returns `true` if the capability is supported, `false` otherwise
283
+ *
284
+ * @example
285
+ * ```typescript
286
+ * // Determine if your web application can render image previews for user selected files
287
+ * if (asperaSdk.hasCapability('imagePreview')) {
288
+ * asperaSdk.readAsArrayBuffer(path);
289
+ * }
290
+ * ```
291
+ */
292
+ export declare const hasCapability: (capability: keyof SdkCapabilities) => boolean;
@@ -11,7 +11,7 @@ var __assign = (this && this.__assign) || function () {
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.getCapabilities = exports.getChecksum = exports.readChunkAsArrayBuffer = exports.readAsArrayBuffer = exports.getInfo = exports.removeDropzone = exports.createDropzone = exports.setBranding = exports.modifyTransfer = exports.showDirectory = exports.getFilesList = exports.getTransfer = exports.getAllTransfers = exports.showPreferences = exports.showSelectFolderDialog = exports.showSelectFileDialog = exports.resumeTransfer = exports.stopTransfer = exports.removeTransfer = exports.deregisterStatusCallback = exports.registerStatusCallback = exports.deregisterActivityCallback = exports.registerActivityCallback = exports.startTransfer = exports.init = exports.initDragDrop = exports.testConnection = void 0;
14
+ exports.hasCapability = exports.getCapabilities = exports.readDirectory = exports.getChecksum = exports.readChunkAsArrayBuffer = exports.readAsArrayBuffer = exports.getInfo = exports.removeDropzone = exports.createDropzone = exports.setBranding = exports.modifyTransfer = exports.showDirectory = exports.getFilesList = exports.getTransfer = exports.getAllTransfers = exports.showTransferManager = exports.showPreferences = exports.showAbout = exports.showSelectFolderDialog = exports.showSelectFileDialog = exports.resumeTransfer = exports.stopTransfer = exports.removeTransfer = exports.deregisterStatusCallback = exports.registerStatusCallback = exports.deregisterActivityCallback = exports.registerActivityCallback = exports.startTransfer = exports.init = exports.initDragDrop = exports.testConnection = void 0;
15
15
  var messages_1 = require("../constants/messages");
16
16
  var client_1 = require("../helpers/client/client");
17
17
  var helpers_1 = require("../helpers/helpers");
@@ -435,6 +435,33 @@ var showSelectFolderDialog = function (options) {
435
435
  return promiseInfo.promise;
436
436
  };
437
437
  exports.showSelectFolderDialog = showSelectFolderDialog;
438
+ /**
439
+ * Shows the about page of the transfer client.
440
+ *
441
+ * This is supported when using Connect or IBM Aspera for desktop, but not HTTP Gateway.
442
+ *
443
+ * @returns a promise that resolves when the about page is shown.
444
+ */
445
+ var showAbout = function () {
446
+ if (index_1.asperaSdk.useHttpGateway) {
447
+ return (0, helpers_1.throwError)(messages_1.messages.showAboutNotSupported);
448
+ }
449
+ if (index_1.asperaSdk.useConnect) {
450
+ return index_1.asperaSdk.globals.connect.showAbout();
451
+ }
452
+ if (!index_1.asperaSdk.isReady) {
453
+ return (0, helpers_1.throwError)(messages_1.messages.serverNotVerified);
454
+ }
455
+ var promiseInfo = (0, helpers_1.generatePromiseObjects)();
456
+ client_1.client.request('show_about')
457
+ .then(function (data) { return promiseInfo.resolver(data); })
458
+ .catch(function (error) {
459
+ (0, helpers_1.errorLog)(messages_1.messages.showAboutFailed, error);
460
+ promiseInfo.rejecter((0, helpers_1.generateErrorBody)(messages_1.messages.showAboutFailed, error));
461
+ });
462
+ return promiseInfo.promise;
463
+ };
464
+ exports.showAbout = showAbout;
438
465
  /**
439
466
  * Opens the IBM Aspera preferences page.
440
467
  *
@@ -457,6 +484,33 @@ var showPreferences = function () {
457
484
  return promiseInfo.promise;
458
485
  };
459
486
  exports.showPreferences = showPreferences;
487
+ /**
488
+ * Opens the transfer manager UI of the native transfer client.
489
+ *
490
+ * Supported for Connect and IBM Aspera for desktop. Not supported for HTTP Gateway.
491
+ *
492
+ * @returns a promise that resolves when the transfer manager is opened.
493
+ */
494
+ var showTransferManager = function () {
495
+ if (index_1.asperaSdk.useHttpGateway) {
496
+ return (0, helpers_1.throwError)(messages_1.messages.showTransferManagerNotSupported);
497
+ }
498
+ if (index_1.asperaSdk.useConnect) {
499
+ return index_1.asperaSdk.globals.connect.showTransferManager();
500
+ }
501
+ if (!index_1.asperaSdk.isReady) {
502
+ return (0, helpers_1.throwError)(messages_1.messages.serverNotVerified);
503
+ }
504
+ var promiseInfo = (0, helpers_1.generatePromiseObjects)();
505
+ client_1.client.request('show_transfer_manager')
506
+ .then(function (data) { return promiseInfo.resolver(data); })
507
+ .catch(function (error) {
508
+ (0, helpers_1.errorLog)(messages_1.messages.showTransferManagerFailed, error);
509
+ promiseInfo.rejecter((0, helpers_1.generateErrorBody)(messages_1.messages.showTransferManagerFailed, error));
510
+ });
511
+ return promiseInfo.promise;
512
+ };
513
+ exports.showTransferManager = showTransferManager;
460
514
  /**
461
515
  * Get all transfers associated with the current application.
462
516
  *
@@ -922,10 +976,52 @@ var getChecksum = function (options) {
922
976
  return promiseInfo.promise;
923
977
  };
924
978
  exports.getChecksum = getChecksum;
979
+ /**
980
+ * Read the contents of a directory, returning all entries as a flat list.
981
+ *
982
+ * This API is only supported when using IBM Aspera for desktop.
983
+ *
984
+ * @param options options including the directory path, optional recursion depth, and filters
985
+ *
986
+ * @returns a promise that resolves with the directory entries and total count
987
+ */
988
+ var readDirectory = function (options) {
989
+ if (index_1.asperaSdk.useHttpGateway) {
990
+ return (0, helpers_1.throwError)(messages_1.messages.readDirectoryNotSupported);
991
+ }
992
+ if (index_1.asperaSdk.useConnect) {
993
+ return (0, helpers_1.throwError)(messages_1.messages.readDirectoryNotSupported);
994
+ }
995
+ if (!index_1.asperaSdk.isReady) {
996
+ return (0, helpers_1.throwError)(messages_1.messages.serverNotVerified);
997
+ }
998
+ var promiseInfo = (0, helpers_1.generatePromiseObjects)();
999
+ var payload = {
1000
+ request: {
1001
+ path: options.path,
1002
+ depth: options.depth,
1003
+ filters: options.filters,
1004
+ },
1005
+ app_id: index_1.asperaSdk.globals.appId,
1006
+ };
1007
+ client_1.client.request('read_directory', payload)
1008
+ .then(function (data) { return promiseInfo.resolver(data); })
1009
+ .catch(function (error) {
1010
+ (0, helpers_1.errorLog)(messages_1.messages.readDirectoryFailed, error);
1011
+ promiseInfo.rejecter((0, helpers_1.generateErrorBody)(messages_1.messages.readDirectoryFailed, error));
1012
+ });
1013
+ return promiseInfo.promise;
1014
+ };
1015
+ exports.readDirectory = readDirectory;
925
1016
  var supportsMethod = function (method) {
926
1017
  // We currently do not support calculating file checksums when using HTTP Gateway. In theory it should be possible
927
- // to calculate this direclty in the browser similar to how `readAsArrayBuffer()` is implemented.
928
- if (index_1.asperaSdk.useHttpGateway && method === 'get_checksum') {
1018
+ // to calculate this directly in the browser similar to how `readAsArrayBuffer()` is implemented.
1019
+ // HTTP Gateway also does not support showing native transfer client UI (about, preferences, etc.).
1020
+ if (index_1.asperaSdk.useHttpGateway && (method === 'get_checksum' || method === 'show_about' || method === 'open_preferences' || method === 'show_transfer_manager' || method === 'read_directory')) {
1021
+ return false;
1022
+ }
1023
+ // Reading directory contents is only supported by the Desktop App (not Connect).
1024
+ if (index_1.asperaSdk.useConnect && method === 'read_directory') {
929
1025
  return false;
930
1026
  }
931
1027
  // HTTP Gateway and Connect do not have any RPC methods so fallback to true
@@ -958,6 +1054,32 @@ var getCapabilities = function () {
958
1054
  return {
959
1055
  imagePreview: supportsMethod('read_as_array_buffer') && supportsMethod('read_chunk_as_array_buffer'),
960
1056
  fileChecksum: supportsMethod('get_checksum'),
1057
+ showAbout: supportsMethod('show_about'),
1058
+ showPreferences: supportsMethod('open_preferences'),
1059
+ showTransferManager: supportsMethod('show_transfer_manager'),
1060
+ readDirectory: supportsMethod('read_directory'),
961
1061
  };
962
1062
  };
963
1063
  exports.getCapabilities = getCapabilities;
1064
+ /**
1065
+ * Check if the SDK and underlying transfer client supports a specific capability.
1066
+ *
1067
+ * Capabilities depend on the transfer client being used (HTTP Gateway, Connect, or IBM Aspera for desktop).
1068
+ * Use this function to conditionally enable/disable features in your application.
1069
+ *
1070
+ * @param capability the capability to check.
1071
+ *
1072
+ * @returns `true` if the capability is supported, `false` otherwise
1073
+ *
1074
+ * @example
1075
+ * ```typescript
1076
+ * // Determine if your web application can render image previews for user selected files
1077
+ * if (asperaSdk.hasCapability('imagePreview')) {
1078
+ * asperaSdk.readAsArrayBuffer(path);
1079
+ * }
1080
+ * ```
1081
+ */
1082
+ var hasCapability = function (capability) {
1083
+ return !!(0, exports.getCapabilities)()[capability];
1084
+ };
1085
+ exports.hasCapability = hasCapability;
@@ -39,4 +39,10 @@ export declare const messages: {
39
39
  getFilesListFailed: string;
40
40
  getChecksumFailed: string;
41
41
  getChecksumNotSupported: string;
42
+ showAboutFailed: string;
43
+ showAboutNotSupported: string;
44
+ readDirectoryFailed: string;
45
+ readDirectoryNotSupported: string;
46
+ showTransferManagerFailed: string;
47
+ showTransferManagerNotSupported: string;
42
48
  };
@@ -42,4 +42,10 @@ exports.messages = {
42
42
  getFilesListFailed: 'Unable to get files list for transfer',
43
43
  getChecksumFailed: 'Unable to get file checksum',
44
44
  getChecksumNotSupported: 'File checksum not supported for current transfer client',
45
+ showAboutFailed: 'Unable to show about page',
46
+ showAboutNotSupported: 'Show about is not supported for current transfer client',
47
+ readDirectoryFailed: 'Unable to read directory contents',
48
+ readDirectoryNotSupported: 'Read directory is not supported for current transfer client',
49
+ showTransferManagerFailed: 'Unable to show transfer manager',
50
+ showTransferManagerNotSupported: 'Show transfer manager is not supported for current transfer client',
45
51
  };
@@ -1,11 +1,11 @@
1
1
  import { AsperaSdk } from './models/aspera-sdk.model';
2
- import { createDropzone, deregisterActivityCallback, deregisterStatusCallback, getAllTransfers, getCapabilities, getChecksum, getFilesList, getInfo, getTransfer, init, initDragDrop, modifyTransfer, readAsArrayBuffer, readChunkAsArrayBuffer, registerActivityCallback, registerStatusCallback, removeDropzone, removeTransfer, resumeTransfer, setBranding, showDirectory, showPreferences, showSelectFileDialog, showSelectFolderDialog, startTransfer, stopTransfer, testConnection } from './app/core';
2
+ import { createDropzone, deregisterActivityCallback, deregisterStatusCallback, getAllTransfers, getCapabilities, getChecksum, getFilesList, getInfo, getTransfer, hasCapability, init, initDragDrop, modifyTransfer, readAsArrayBuffer, readChunkAsArrayBuffer, readDirectory, registerActivityCallback, registerStatusCallback, removeDropzone, removeTransfer, resumeTransfer, setBranding, showAbout, showDirectory, showPreferences, showSelectFileDialog, showSelectFolderDialog, showTransferManager, startTransfer, stopTransfer, testConnection } from './app/core';
3
3
  import { getInstallerInfo } from './app/installer';
4
4
  import { getInstallerUrls, isSafari } from './helpers/helpers';
5
5
  export declare const asperaSdk: AsperaSdk;
6
6
  declare const launch: () => void;
7
- export { isSafari, init, testConnection, startTransfer, launch, registerActivityCallback, deregisterActivityCallback, removeTransfer, showDirectory, stopTransfer, resumeTransfer, getAllTransfers, getTransfer, getFilesList, showSelectFileDialog, showSelectFolderDialog, showPreferences, modifyTransfer, createDropzone, removeDropzone, initDragDrop, getInstallerInfo, registerStatusCallback, deregisterStatusCallback, setBranding, getInfo, readAsArrayBuffer, readChunkAsArrayBuffer, getInstallerUrls, getCapabilities, getChecksum, };
8
- export type { AsperaSdkSpec, AsperaSdkTransfer, BrowserStyleFile, ChecksumFileResponse, CustomBrandingOptions, CustomTheme, CustomThemeItems, DataTransferResponse, DropzoneEventData, DropzoneEventType, DropzoneOptions, FileDialogOptions, FileError, FileFilter, FileStat, FileStatus, FolderDialogOptions, GetChecksumOptions, InitOptions, InstallerInfo, InstallerInfoResponse, InstallerOptions, InstallerUrlInfo, ModifyTransferOptions, OverwritePolicy, PaginatedFilesResponse, Pagination, Path, ReadAsArrayBufferResponse, ReadChunkAsArrayBufferResponse, ResumePolicy, ResumeTransferOptions, SafariExtensionEvent, SdkCapabilities, TransferSpec, TransferStatus, WebsocketEvent, } from './models/models';
7
+ export { isSafari, init, testConnection, startTransfer, launch, registerActivityCallback, deregisterActivityCallback, removeTransfer, showAbout, showDirectory, stopTransfer, resumeTransfer, getAllTransfers, getTransfer, getFilesList, showSelectFileDialog, showSelectFolderDialog, showPreferences, showTransferManager, modifyTransfer, createDropzone, removeDropzone, initDragDrop, getInstallerInfo, registerStatusCallback, deregisterStatusCallback, setBranding, getInfo, readAsArrayBuffer, readChunkAsArrayBuffer, getInstallerUrls, getCapabilities, hasCapability, getChecksum, readDirectory, };
8
+ export type { AsperaSdkSpec, AsperaSdkTransfer, BrowserStyleFile, ChecksumFileResponse, DirectoryEntry, DirectoryListFilters, CustomBrandingOptions, CustomTheme, CustomThemeItems, DataTransferResponse, DropzoneEventData, DropzoneEventType, EntryType, DropzoneOptions, FileDialogOptions, FileError, FileFilter, FileStat, FileStatus, FolderDialogOptions, GetChecksumOptions, InitOptions, InstallerInfo, InstallerInfoResponse, InstallerOptions, InstallerUrlInfo, ModifyTransferOptions, OverwritePolicy, PaginatedFilesResponse, Pagination, Path, ReadAsArrayBufferResponse, ReadChunkAsArrayBufferResponse, ReadDirectoryOptions, ReadDirectoryResponse, ResumePolicy, ResumeTransferOptions, SafariExtensionEvent, SdkCapabilities, TransferSpec, TransferStatus, WebsocketEvent, } from './models/models';
9
9
  export type { ActivityMessage, ActivityMessageTypes, AsperaSdkClientInfo, AsperaSdkInfo, TransferResponse, } from './models/aspera-sdk.model';
10
10
  export { AsperaSdk, AsperaSdkGlobals } from './models/aspera-sdk.model';
11
11
  export type { HttpGatewayInfo } from './http-gateway/models';
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.AsperaSdkGlobals = exports.AsperaSdk = exports.getChecksum = exports.getCapabilities = exports.getInstallerUrls = exports.readChunkAsArrayBuffer = exports.readAsArrayBuffer = exports.getInfo = exports.setBranding = exports.deregisterStatusCallback = exports.registerStatusCallback = exports.getInstallerInfo = exports.initDragDrop = exports.removeDropzone = exports.createDropzone = exports.modifyTransfer = exports.showPreferences = exports.showSelectFolderDialog = exports.showSelectFileDialog = exports.getFilesList = exports.getTransfer = exports.getAllTransfers = exports.resumeTransfer = exports.stopTransfer = exports.showDirectory = exports.removeTransfer = exports.deregisterActivityCallback = exports.registerActivityCallback = exports.launch = exports.startTransfer = exports.testConnection = exports.init = exports.isSafari = exports.asperaSdk = void 0;
36
+ exports.AsperaSdkGlobals = exports.AsperaSdk = exports.readDirectory = exports.getChecksum = exports.hasCapability = exports.getCapabilities = exports.getInstallerUrls = exports.readChunkAsArrayBuffer = exports.readAsArrayBuffer = exports.getInfo = exports.setBranding = exports.deregisterStatusCallback = exports.registerStatusCallback = exports.getInstallerInfo = exports.initDragDrop = exports.removeDropzone = exports.createDropzone = exports.modifyTransfer = exports.showTransferManager = exports.showPreferences = exports.showSelectFolderDialog = exports.showSelectFileDialog = exports.getFilesList = exports.getTransfer = exports.getAllTransfers = exports.resumeTransfer = exports.stopTransfer = exports.showDirectory = exports.showAbout = exports.removeTransfer = exports.deregisterActivityCallback = exports.registerActivityCallback = exports.launch = exports.startTransfer = exports.testConnection = exports.init = exports.isSafari = exports.asperaSdk = void 0;
37
37
  var aspera_sdk_model_1 = require("./models/aspera-sdk.model");
38
38
  var core_1 = require("./app/core");
39
39
  Object.defineProperty(exports, "createDropzone", { enumerable: true, get: function () { return core_1.createDropzone; } });
@@ -45,21 +45,25 @@ Object.defineProperty(exports, "getChecksum", { enumerable: true, get: function
45
45
  Object.defineProperty(exports, "getFilesList", { enumerable: true, get: function () { return core_1.getFilesList; } });
46
46
  Object.defineProperty(exports, "getInfo", { enumerable: true, get: function () { return core_1.getInfo; } });
47
47
  Object.defineProperty(exports, "getTransfer", { enumerable: true, get: function () { return core_1.getTransfer; } });
48
+ Object.defineProperty(exports, "hasCapability", { enumerable: true, get: function () { return core_1.hasCapability; } });
48
49
  Object.defineProperty(exports, "init", { enumerable: true, get: function () { return core_1.init; } });
49
50
  Object.defineProperty(exports, "initDragDrop", { enumerable: true, get: function () { return core_1.initDragDrop; } });
50
51
  Object.defineProperty(exports, "modifyTransfer", { enumerable: true, get: function () { return core_1.modifyTransfer; } });
51
52
  Object.defineProperty(exports, "readAsArrayBuffer", { enumerable: true, get: function () { return core_1.readAsArrayBuffer; } });
52
53
  Object.defineProperty(exports, "readChunkAsArrayBuffer", { enumerable: true, get: function () { return core_1.readChunkAsArrayBuffer; } });
54
+ Object.defineProperty(exports, "readDirectory", { enumerable: true, get: function () { return core_1.readDirectory; } });
53
55
  Object.defineProperty(exports, "registerActivityCallback", { enumerable: true, get: function () { return core_1.registerActivityCallback; } });
54
56
  Object.defineProperty(exports, "registerStatusCallback", { enumerable: true, get: function () { return core_1.registerStatusCallback; } });
55
57
  Object.defineProperty(exports, "removeDropzone", { enumerable: true, get: function () { return core_1.removeDropzone; } });
56
58
  Object.defineProperty(exports, "removeTransfer", { enumerable: true, get: function () { return core_1.removeTransfer; } });
57
59
  Object.defineProperty(exports, "resumeTransfer", { enumerable: true, get: function () { return core_1.resumeTransfer; } });
58
60
  Object.defineProperty(exports, "setBranding", { enumerable: true, get: function () { return core_1.setBranding; } });
61
+ Object.defineProperty(exports, "showAbout", { enumerable: true, get: function () { return core_1.showAbout; } });
59
62
  Object.defineProperty(exports, "showDirectory", { enumerable: true, get: function () { return core_1.showDirectory; } });
60
63
  Object.defineProperty(exports, "showPreferences", { enumerable: true, get: function () { return core_1.showPreferences; } });
61
64
  Object.defineProperty(exports, "showSelectFileDialog", { enumerable: true, get: function () { return core_1.showSelectFileDialog; } });
62
65
  Object.defineProperty(exports, "showSelectFolderDialog", { enumerable: true, get: function () { return core_1.showSelectFolderDialog; } });
66
+ Object.defineProperty(exports, "showTransferManager", { enumerable: true, get: function () { return core_1.showTransferManager; } });
63
67
  Object.defineProperty(exports, "startTransfer", { enumerable: true, get: function () { return core_1.startTransfer; } });
64
68
  Object.defineProperty(exports, "stopTransfer", { enumerable: true, get: function () { return core_1.stopTransfer; } });
65
69
  Object.defineProperty(exports, "testConnection", { enumerable: true, get: function () { return core_1.testConnection; } });
@@ -76,6 +80,7 @@ exports.asperaSdk.startTransfer = core_1.startTransfer;
76
80
  exports.asperaSdk.registerActivityCallback = core_1.registerActivityCallback;
77
81
  exports.asperaSdk.deregisterActivityCallback = core_1.deregisterActivityCallback;
78
82
  exports.asperaSdk.removeTransfer = core_1.removeTransfer;
83
+ exports.asperaSdk.showAbout = core_1.showAbout;
79
84
  exports.asperaSdk.showDirectory = core_1.showDirectory;
80
85
  exports.asperaSdk.stopTransfer = core_1.stopTransfer;
81
86
  exports.asperaSdk.resumeTransfer = core_1.resumeTransfer;
@@ -85,6 +90,7 @@ exports.asperaSdk.getFilesList = core_1.getFilesList;
85
90
  exports.asperaSdk.showSelectFileDialog = core_1.showSelectFileDialog;
86
91
  exports.asperaSdk.showSelectFolderDialog = core_1.showSelectFolderDialog;
87
92
  exports.asperaSdk.showPreferences = core_1.showPreferences;
93
+ exports.asperaSdk.showTransferManager = core_1.showTransferManager;
88
94
  exports.asperaSdk.modifyTransfer = core_1.modifyTransfer;
89
95
  exports.asperaSdk.createDropzone = core_1.createDropzone;
90
96
  exports.asperaSdk.removeDropzone = core_1.removeDropzone;
@@ -99,7 +105,9 @@ exports.asperaSdk.readChunkAsArrayBuffer = core_1.readChunkAsArrayBuffer;
99
105
  exports.asperaSdk.isSafari = helpers_1.isSafari;
100
106
  exports.asperaSdk.getInstallerUrls = helpers_1.getInstallerUrls;
101
107
  exports.asperaSdk.getCapabilities = core_1.getCapabilities;
108
+ exports.asperaSdk.hasCapability = core_1.hasCapability;
102
109
  exports.asperaSdk.getChecksum = core_1.getChecksum;
110
+ exports.asperaSdk.readDirectory = core_1.readDirectory;
103
111
  exports.asperaSdk.httpGatewayCalls = httpGatewayCalls;
104
112
  var launch = exports.asperaSdk.globals.launch;
105
113
  exports.launch = launch;
@@ -1,4 +1,4 @@
1
- import { CustomBrandingOptions, DataTransferResponse, DropzoneEventData, DropzoneEventType, DropzoneOptions, AsperaSdkSpec, AsperaSdkTransfer, FileDialogOptions, FolderDialogOptions, InitOptions, InstallerInfoResponse, InstallerOptions, ModifyTransferOptions, Pagination, PaginatedFilesResponse, ResumeTransferOptions, SafariExtensionEvent, TransferSpec, WebsocketEvent, InstallerUrlInfo, SdkCapabilities, GetChecksumOptions, ChecksumFileResponse } from './models';
1
+ import { CustomBrandingOptions, DataTransferResponse, DropzoneEventData, DropzoneEventType, DropzoneOptions, AsperaSdkSpec, AsperaSdkTransfer, FileDialogOptions, FolderDialogOptions, InitOptions, InstallerInfoResponse, InstallerOptions, ModifyTransferOptions, Pagination, PaginatedFilesResponse, ResumeTransferOptions, SafariExtensionEvent, TransferSpec, WebsocketEvent, InstallerUrlInfo, SdkCapabilities, GetChecksumOptions, ChecksumFileResponse, ReadDirectoryOptions, ReadDirectoryResponse } from './models';
2
2
  import { HttpGatewayInfo } from '../http-gateway/models';
3
3
  import * as ConnectTypes from '@ibm-aspera/connect-sdk-js/dist/esm/core/types';
4
4
  import { Connect, ConnectInstaller } from '@ibm-aspera/connect-sdk-js';
@@ -201,8 +201,12 @@ export declare class AsperaSdk {
201
201
  showSelectFileDialog: (options?: FileDialogOptions) => Promise<DataTransferResponse>;
202
202
  /** Function to display a folder dialog for the user to select folders. */
203
203
  showSelectFolderDialog: (options?: FolderDialogOptions) => Promise<DataTransferResponse>;
204
+ /** Function to show the about page of the transfer client */
205
+ showAbout: () => Promise<any>;
204
206
  /** Function to display the IBM Aspera preferences page */
205
207
  showPreferences: () => Promise<any>;
208
+ /** Function to show the transfer manager UI */
209
+ showTransferManager: () => Promise<any>;
206
210
  /** Function to modify a running transfer */
207
211
  modifyTransfer: (transferId: string, options: ModifyTransferOptions) => Promise<AsperaSdkTransfer>;
208
212
  /** Function to set custom branding for IBM Aspera */
@@ -235,8 +239,12 @@ export declare class AsperaSdk {
235
239
  getInstallerUrls: () => InstallerUrlInfo;
236
240
  /** Function to get the SDK capabilities. */
237
241
  getCapabilities: () => SdkCapabilities;
242
+ /** Function to check whether the SDK supports the specified capability */
243
+ hasCapability: (capability: keyof SdkCapabilities) => boolean;
238
244
  /** Function to get a checksum for a file */
239
245
  getChecksum: (options: GetChecksumOptions) => Promise<ChecksumFileResponse>;
246
+ /** Function to read directory contents and return entries as a flat list */
247
+ readDirectory: (options: ReadDirectoryOptions) => Promise<ReadDirectoryResponse>;
240
248
  /** Indicate if Safari Extension is enabled. If the extension is disabled during the lifecycle this will not update to disabled. */
241
249
  SAFARI_EXTENSION_STATUS: SafariExtensionEvent;
242
250
  /** Aspera HTTP Gateway calls. This normally is not needed by clients but expose just in case. */
@@ -165,6 +165,44 @@ export interface ChecksumFileResponse {
165
165
  /** The algorithm used */
166
166
  checksumMethod: 'md5' | 'sha1' | 'sha256' | 'sha512';
167
167
  }
168
+ /** The type of a directory entry */
169
+ export type EntryType = 'file' | 'directory';
170
+ /** Filters to narrow directory listing results */
171
+ export interface DirectoryListFilters {
172
+ /** Only return entries of this type. Omit to return all. */
173
+ type?: EntryType;
174
+ /** Glob pattern matched against the file name only (e.g., "*.pdf"). */
175
+ namePattern?: string;
176
+ /** Whether to include hidden files and directories in the results. */
177
+ hidden?: boolean;
178
+ }
179
+ /** Options for reading directory contents */
180
+ export interface ReadDirectoryOptions {
181
+ /** Absolute path to the directory to enumerate. Must have been previously allowed via dialog selection or drag-drop. */
182
+ path: string;
183
+ /** Maximum recursion depth. 0 = direct children only (non-recursive). Omit for full recursive traversal. */
184
+ depth?: number;
185
+ /** Optional filters to narrow the results. */
186
+ filters?: DirectoryListFilters;
187
+ }
188
+ /** A single entry in a directory listing */
189
+ export interface DirectoryEntry {
190
+ /** Path relative to the traversal root, using forward slashes on all platforms. */
191
+ relativePath: string;
192
+ /** The entry type: "file" or "directory". */
193
+ type: EntryType;
194
+ /** Size in bytes. 0 for directories. */
195
+ size: number;
196
+ /** Last modified timestamp in milliseconds since the UNIX epoch. */
197
+ lastModified: number;
198
+ }
199
+ /** Response from reading directory contents */
200
+ export interface ReadDirectoryResponse {
201
+ /** The directory entries matching the request criteria. */
202
+ entries: DirectoryEntry[];
203
+ /** The total number of entries returned. If this equals the server maximum, results may have been truncated. */
204
+ totalCount: number;
205
+ }
168
206
  export interface ModifyTransferOptions {
169
207
  /**
170
208
  * @deprecated Use `lock_min_rate_kbps` instead.
@@ -879,4 +917,32 @@ export interface SdkCapabilities {
879
917
  * Whether the SDK can calculate checksums of a file chunk.
880
918
  */
881
919
  fileChecksum: boolean;
920
+ /**
921
+ * Whether the transfer client supports showing the about page.
922
+ *
923
+ * This is supported when using Connect or IBM Aspera for desktop with the required RPC methods,
924
+ * but not HTTP Gateway.
925
+ */
926
+ showAbout: boolean;
927
+ /**
928
+ * Whether the transfer client supports showing the preferences page.
929
+ *
930
+ * This is supported when using Connect or IBM Aspera for desktop with the required RPC methods,
931
+ * but not HTTP Gateway.
932
+ */
933
+ showPreferences: boolean;
934
+ /**
935
+ * Whether the transfer client supports showing the transfer manager.
936
+ *
937
+ * This is supported when using Connect or IBM Aspera for desktop with the required RPC methods,
938
+ * but not HTTP Gateway.
939
+ */
940
+ showTransferManager: boolean;
941
+ /**
942
+ * Whether the SDK can read directory contents.
943
+ *
944
+ * This is supported when using IBM Aspera for desktop with the required RPC methods,
945
+ * but not Connect or HTTP Gateway.
946
+ */
947
+ readDirectory: boolean;
882
948
  }