@ibm-aspera/sdk 0.9.0 → 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.
@@ -130,6 +130,14 @@ export declare const showAbout: () => Promise<any>;
130
130
  * @returns a promise that resolves when the preferences page is opened.
131
131
  */
132
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>;
133
141
  /**
134
142
  * Get all transfers associated with the current application.
135
143
  *
@@ -232,6 +240,16 @@ export declare const readChunkAsArrayBuffer: (path: string, offset: number, chun
232
240
  * @returns a promise that resolves with the checksum information
233
241
  */
234
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>;
235
253
  /**
236
254
  * Returns an object describing the high-level capabilities supported by the user's
237
255
  * transfer client (e.g. IBM Aspera for desktop, Connect, or HTTP Gateway).
@@ -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.hasCapability = 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.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;
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");
@@ -484,6 +484,33 @@ var showPreferences = function () {
484
484
  return promiseInfo.promise;
485
485
  };
486
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;
487
514
  /**
488
515
  * Get all transfers associated with the current application.
489
516
  *
@@ -949,11 +976,52 @@ var getChecksum = function (options) {
949
976
  return promiseInfo.promise;
950
977
  };
951
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;
952
1016
  var supportsMethod = function (method) {
953
1017
  // We currently do not support calculating file checksums when using HTTP Gateway. In theory it should be possible
954
1018
  // to calculate this directly in the browser similar to how `readAsArrayBuffer()` is implemented.
955
1019
  // HTTP Gateway also does not support showing native transfer client UI (about, preferences, etc.).
956
- if (index_1.asperaSdk.useHttpGateway && (method === 'get_checksum' || method === 'show_about' || method === 'open_preferences')) {
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') {
957
1025
  return false;
958
1026
  }
959
1027
  // HTTP Gateway and Connect do not have any RPC methods so fallback to true
@@ -988,6 +1056,8 @@ var getCapabilities = function () {
988
1056
  fileChecksum: supportsMethod('get_checksum'),
989
1057
  showAbout: supportsMethod('show_about'),
990
1058
  showPreferences: supportsMethod('open_preferences'),
1059
+ showTransferManager: supportsMethod('show_transfer_manager'),
1060
+ readDirectory: supportsMethod('read_directory'),
991
1061
  };
992
1062
  };
993
1063
  exports.getCapabilities = getCapabilities;
@@ -41,4 +41,8 @@ export declare const messages: {
41
41
  getChecksumNotSupported: string;
42
42
  showAboutFailed: string;
43
43
  showAboutNotSupported: string;
44
+ readDirectoryFailed: string;
45
+ readDirectoryNotSupported: string;
46
+ showTransferManagerFailed: string;
47
+ showTransferManagerNotSupported: string;
44
48
  };
@@ -44,4 +44,8 @@ exports.messages = {
44
44
  getChecksumNotSupported: 'File checksum not supported for current transfer client',
45
45
  showAboutFailed: 'Unable to show about page',
46
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',
47
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, hasCapability, init, initDragDrop, modifyTransfer, readAsArrayBuffer, readChunkAsArrayBuffer, registerActivityCallback, registerStatusCallback, removeDropzone, removeTransfer, resumeTransfer, setBranding, showAbout, 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, showAbout, showDirectory, stopTransfer, resumeTransfer, getAllTransfers, getTransfer, getFilesList, showSelectFileDialog, showSelectFolderDialog, showPreferences, modifyTransfer, createDropzone, removeDropzone, initDragDrop, getInstallerInfo, registerStatusCallback, deregisterStatusCallback, setBranding, getInfo, readAsArrayBuffer, readChunkAsArrayBuffer, getInstallerUrls, getCapabilities, hasCapability, 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.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.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;
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; } });
@@ -51,6 +51,7 @@ Object.defineProperty(exports, "initDragDrop", { enumerable: true, get: function
51
51
  Object.defineProperty(exports, "modifyTransfer", { enumerable: true, get: function () { return core_1.modifyTransfer; } });
52
52
  Object.defineProperty(exports, "readAsArrayBuffer", { enumerable: true, get: function () { return core_1.readAsArrayBuffer; } });
53
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; } });
54
55
  Object.defineProperty(exports, "registerActivityCallback", { enumerable: true, get: function () { return core_1.registerActivityCallback; } });
55
56
  Object.defineProperty(exports, "registerStatusCallback", { enumerable: true, get: function () { return core_1.registerStatusCallback; } });
56
57
  Object.defineProperty(exports, "removeDropzone", { enumerable: true, get: function () { return core_1.removeDropzone; } });
@@ -62,6 +63,7 @@ Object.defineProperty(exports, "showDirectory", { enumerable: true, get: functio
62
63
  Object.defineProperty(exports, "showPreferences", { enumerable: true, get: function () { return core_1.showPreferences; } });
63
64
  Object.defineProperty(exports, "showSelectFileDialog", { enumerable: true, get: function () { return core_1.showSelectFileDialog; } });
64
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; } });
65
67
  Object.defineProperty(exports, "startTransfer", { enumerable: true, get: function () { return core_1.startTransfer; } });
66
68
  Object.defineProperty(exports, "stopTransfer", { enumerable: true, get: function () { return core_1.stopTransfer; } });
67
69
  Object.defineProperty(exports, "testConnection", { enumerable: true, get: function () { return core_1.testConnection; } });
@@ -88,6 +90,7 @@ exports.asperaSdk.getFilesList = core_1.getFilesList;
88
90
  exports.asperaSdk.showSelectFileDialog = core_1.showSelectFileDialog;
89
91
  exports.asperaSdk.showSelectFolderDialog = core_1.showSelectFolderDialog;
90
92
  exports.asperaSdk.showPreferences = core_1.showPreferences;
93
+ exports.asperaSdk.showTransferManager = core_1.showTransferManager;
91
94
  exports.asperaSdk.modifyTransfer = core_1.modifyTransfer;
92
95
  exports.asperaSdk.createDropzone = core_1.createDropzone;
93
96
  exports.asperaSdk.removeDropzone = core_1.removeDropzone;
@@ -104,6 +107,7 @@ exports.asperaSdk.getInstallerUrls = helpers_1.getInstallerUrls;
104
107
  exports.asperaSdk.getCapabilities = core_1.getCapabilities;
105
108
  exports.asperaSdk.hasCapability = core_1.hasCapability;
106
109
  exports.asperaSdk.getChecksum = core_1.getChecksum;
110
+ exports.asperaSdk.readDirectory = core_1.readDirectory;
107
111
  exports.asperaSdk.httpGatewayCalls = httpGatewayCalls;
108
112
  var launch = exports.asperaSdk.globals.launch;
109
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';
@@ -205,6 +205,8 @@ export declare class AsperaSdk {
205
205
  showAbout: () => Promise<any>;
206
206
  /** Function to display the IBM Aspera preferences page */
207
207
  showPreferences: () => Promise<any>;
208
+ /** Function to show the transfer manager UI */
209
+ showTransferManager: () => Promise<any>;
208
210
  /** Function to modify a running transfer */
209
211
  modifyTransfer: (transferId: string, options: ModifyTransferOptions) => Promise<AsperaSdkTransfer>;
210
212
  /** Function to set custom branding for IBM Aspera */
@@ -241,6 +243,8 @@ export declare class AsperaSdk {
241
243
  hasCapability: (capability: keyof SdkCapabilities) => boolean;
242
244
  /** Function to get a checksum for a file */
243
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>;
244
248
  /** Indicate if Safari Extension is enabled. If the extension is disabled during the lifecycle this will not update to disabled. */
245
249
  SAFARI_EXTENSION_STATUS: SafariExtensionEvent;
246
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.
@@ -893,4 +931,18 @@ export interface SdkCapabilities {
893
931
  * but not HTTP Gateway.
894
932
  */
895
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;
896
948
  }