@signiant/media-shuttle-sdk-base
Version:
The base parent sdk behind other media shuttle sdks (e.g. media-shuttle-sdk)
44 lines • 1.33 kB
TypeScript
import { TransferState } from '../enums';
/**
* An interface that defines all of the function that can be performed against a transfer.
*/
export default interface Transfer {
/**
* @returns The unique identifier for this transfer
* @example 2ccc5d48-e43b-40b7-bb70-f591dc51c293
*/
get transferId(): string;
/**
* @returns The current {@link TransferState} of the transfer.
*/
get currentTransferState(): TransferState;
/**
* Start the transfer. Valid in the following states:
* * IDLE
*
* @returns A Promise which will resolve when the transfer has started successfully.
*/
start(): Promise<void>;
/**
* Cancel the transfer. Valid in the following states:
* * STARTING,
* * QUEUED,
* * IN_PROGRESS
*
* @returns A Promise which will resolve when the transfer has canceled successfully.
*/
cancel(): Promise<void>;
/**
* Retry the incomplete transfer. Valid in the following states
* * FAILURE
* * CANCELED
*
* @returns A Promise which will resolve when the retry has been successfully initiated.
*/
retry(): Promise<void>;
/**
* @returns true when 1 or more listeners were removed.
*/
unsubscribeAll(): boolean;
}
//# sourceMappingURL=Transfer.d.ts.map