UNPKG

@signiant/media-shuttle-sdk-base

Version:

The base parent sdk behind other media shuttle sdks (e.g. media-shuttle-sdk)

46 lines 1.9 kB
import Transfer from './Transfer'; import TransferEventType from '../enums/TransferEventType'; import TransferEventCallback from './events/TransferEventCallback'; import { LocalFile } from '../common'; /** * The Upload interface, extension of {@link Transfer} */ export default interface Upload extends Transfer { /** * Subscribe to a transfer event * * @param eventType The type of event we are subscribing to. * @param listener The listener we wish to assign to an event. */ subscribe(eventType: TransferEventType, listener: TransferEventCallback<Upload>): void; /** * Unsubscribe from a transfer event * * @param eventType The type of event we are unsubscribing from. * @param listener The listener we wish to unsubscribe. * @returns true if the listener was present and unsubscribed, false if there was no match for the * eventType / listener combination. */ unsubscribe(eventType: TransferEventType, listener?: TransferEventCallback<Upload>): boolean; /** * Opens destination folder chosen during the download initialization * This launches a finder window for Mac or an explorer window for windows * @returns A Promise which resolves to the files included in the upload. */ addFiles(): Promise<LocalFile[]>; /** * Using a list of paths it removes the selected files whose path is in the provided array * @param filePaths paths of the files to be removed */ removeFiles(filePaths: string[]): Promise<LocalFile[]>; /** * @param relativePortalRootFolderPath, relative path to the portal folder root * Sets the value of the destination path */ set destinationFolder(relativePortalRootFolderPath: string); /** * Return the current selected destination folder */ get destinationFolder(): string; } //# sourceMappingURL=Upload.d.ts.map