import { TransferResponse } from '../models/http-gateway-global.model'; import { HttpTransfer } from '../models/models'; /** * Check if HTTP Gateway server connection works. This function is called by init * when initializing the SDK. This function can be used at any point for sanity checking. * * @returns promise that resolves if server can connect or rejects if server unable to connect */ export declare const testHttpGatewayConnection: () => Promise; export declare const cleanupServerUrl: (serverUrl: string) => string; /** * Initialize HTTP gateway client. If client cannot (reject/catch) * client should attempt fixing server URL or trying again. If still fails disable UI elements. * If supportMultipleServers is used the failure of the first test will not lock out the SDK. * * @param serverUrl URL indicating location of the HTTP server * @param softwareMode indicate if the SDK should run in software mode instead of DOM mode * @param supportMultipleServers indicates if the SDK should support multiple servers (not restricting to setup server) * * @returns a promise that resolves if HTTP Gateway is running properly or rejects if unable to load */ export declare const initHttpGateway: (serverUrl: string, softwareMode?: boolean, supportMultipleServers?: boolean) => Promise; /** * Register a callback event for getting transfer data * * @param callback callback function to receive transfers * * @returns ID representing the callback for deregistration purposes */ export declare const registerActivityCallback: (callback: (transfers: TransferResponse) => void) => string; /** * Remove a callback from the transfer callback * @param id the ID returned by `registerActivityCallback` */ export declare const deregisterActivityCallback: (id: string) => void; /** * Returns the transfer requested based on the uuid of the transfer. * NOTE: transferId from Node is not accepted as an ID. It must be the ID used by the HTTP Gateway. * * @param id gateway based ID of the HTTP part of the transfer * * @returns an object containing the transfer (or undefined if not found) located at key `transfer_info` */ export declare const getTransferById: (id: string) => { transfer_info: HttpTransfer; }; /** * Get transfer response object including all transfers * * @returns transfer data object with transfers array */ export declare const getAllTransfers: () => TransferResponse; /** * Remove all transfers that are not active */ export declare const clearNonActiveTransfers: () => void; /** * Removes a transfer from the transfers list in HTTP Gateway * If an active transfer is removed it will continue to be uploaded/downloaded but progress will not be tracked * * @param id HTTP Gateway transfer uuid */ export declare const removeTransfer: (id: string) => void; /** * Cancel a transfer from the transfers list in HTTP Gateway * * @param id HTTP Gateway transfer uuid */ export declare const cancelTransfer: (id: string) => void; declare const _default: { initHttpGateway: (serverUrl: string, softwareMode?: boolean, supportMultipleServers?: boolean) => Promise; testHttpGatewayConnection: () => Promise; registerActivityCallback: (callback: (transfers: TransferResponse) => void) => string; cleanupServerUrl: (serverUrl: string) => string; deregisterActivityCallback: (id: string) => void; getTransferById: (id: string) => { transfer_info: HttpTransfer; }; getAllTransfers: () => TransferResponse; clearNonActiveTransfers: () => void; removeTransfer: (id: string) => void; cancelTransfer: (id: string) => void; }; export default _default;