IBM Aspera JavaScript Library
    Preparing search index...

    Class AsperaSdk

    Index

    Constructors

    Properties

    createDropzone: (
        callback: (data: { event: any; files: DataTransferResponse }) => void,
        elementSelector: string,
    ) => void

    Create dropzone for drop events of files

    deregisterActivityCallback: (id: string) => void

    Deregister callback to remove it from the callbacks getting transfer data

    deregisterStatusCallback: (id: string) => void

    Deregister callback to remove it from the callbacks getting connection events

    getAllTransfers: () => Promise<AsperaSdkTransfer[]>

    Function to get a list of all transfers

    getCapabilities: () => SdkCapabilities

    Function to get the SDK capabilities.

    getFilesList: (
        transferId: string,
        pagination?: Pagination,
    ) => Promise<PaginatedFilesResponse>

    Function to get paginated file-level progress for a transfer

    getInfo: () => Promise<AsperaSdkInfo>

    Function to get information about the IBM Aspera instance

    getInstallerInfo: (options: InstallerOptions) => Promise<InstallerInfoResponse>

    Function to get latest installer information

    getInstallerUrls: () => InstallerUrlInfo

    Function to get URLs for installer management.

    getTransfer: (transferId: string) => Promise<AsperaSdkTransfer>

    Function to get information for a specific transfer

    globals: AsperaSdkGlobals = ...

    Global information about IBM Aspera

    httpGatewayCalls: unknown

    Aspera HTTP Gateway calls. This normally is not needed by clients but expose just in case.

    httpGatewayInBrowserDownloadThreshold: number = 1000000000

    HTTP Gateway in app threshold limit. This can be changed globally for the app.

    httpGatewaySelectedFiles: Map<string, File> = ...

    HTTP Gateway file store. Key is the file name.

    httpGatewayTransferStore: Map<string, AsperaSdkTransfer> = ...

    Store of HTTP Gateway transfers

    init: (options: InitOptions) => Promise<any>

    Function to initialize IBM Aspera

    initDragDrop: () => Promise<any>

    Initialize drag and drop

    isSafari: () => boolean

    Function to get whether IBM Aspera is running on Safari

    launch: () => void

    Function to launch IBM Aspera

    modifyTransfer: (
        transferId: string,
        options: ModifyTransferOptions,
    ) => Promise<AsperaSdkTransfer>

    Function to modify a running transfer

    readAsArrayBuffer: (path: string) => Promise<{ data: string; type: string }>

    Function to read an entire file as an array buffer (base64-encoded)

    readChunkAsArrayBuffer: (
        path: string,
        offset: number,
        chunkSize: number,
    ) => Promise<{ data: string; type: string }>

    Function to read a chunk of a file as an array buffer (base64-encoded)

    registerActivityCallback: (
        callback: (transfers: TransferResponse) => void,
    ) => string

    Register callback for the transfer activity monitor

    registerStatusCallback: (callback: (status: WebsocketEvent) => void) => string

    Register callback for connection status events from the app

    removeDropzone: (elementSelector: string) => void

    Remove dropzone for drop events of files

    removeTransfer: (transferId: string) => Promise<any>

    Function to remove a transfer

    resumeTransfer: (
        transferId: string,
        options?: ResumeTransferOptions,
    ) => Promise<AsperaSdkTransfer>

    Function to resume a transfer

    SAFARI_EXTENSION_STATUS: SafariExtensionEvent = 'DISABLED'

    Indicate if Safari Extension is enabled. If the extension is disabled during the lifecycle this will not update to disabled.

    setBranding: (id: string, options: CustomBrandingOptions) => Promise<any>

    Function to set custom branding for IBM Aspera

    showDirectory: (transferId: string) => Promise<any>

    Function to show the transfer's download directory in Finder or Windows Explorer

    showPreferences: () => Promise<any>

    Function to display the IBM Aspera preferences page

    showSelectFileDialog: (
        options?: FileDialogOptions,
    ) => Promise<DataTransferResponse>

    Function to display a file dialog for the user to select files.

    showSelectFolderDialog: (
        options?: FolderDialogOptions,
    ) => Promise<DataTransferResponse>

    Function to display a folder dialog for the user to select folders.

    startTransfer: (
        transferSpec: TransferSpec,
        AsperaSdkSpec: AsperaSdkSpec,
    ) => Promise<AsperaSdkTransfer>

    Function to initiate a transfer

    stopTransfer: (transferId: string) => Promise<any>

    Function to stop a transfer

    testConnection: () => Promise<any>

    Function to test the IBM Aspera status

    Accessors

    • get isReady(): boolean

      Check if IBM Aspera is ready to be used and has been verified.

      Returns boolean

      a boolean indicating if SDK can be used for requests

    • get useOldHttpGateway(): boolean

      Indicates if old HTTP Gateway SDK should be used (v2 and lower)

      Returns boolean