UNPKG

@signiant/media-shuttle-sdk-base

Version:

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

53 lines (52 loc) 3.28 kB
var _a, _b; import ErrorCode from './ErrorCode'; var staticErrorMessages = (_a = {}, _a[ErrorCode.FOLDER_NOT_SELECTED] = 'Destination folder not selected', _a[ErrorCode.FOLDER_SELECTION_ERROR] = 'An unknown error occurred during folder selection', _a[ErrorCode.LOGGER_INVALID] = 'Invalid logger', _a[ErrorCode.APP_CONNECTION_UNINITIALIZED] = 'Transfer Client must be initialized prior to use.', _a[ErrorCode.FOLDER_SELECTION_CANCELED] = 'Folder selection canceled by user', _a[ErrorCode.FILE_SELECTION_CANCELLED] = 'File selection canceled by user', _a[ErrorCode.FILE_SELECTION_ERROR] = 'An unknown error occurred during file selection', _a[ErrorCode.ENCRYPTION_ERROR] = 'Message encryption failed', _a[ErrorCode.DECRYPTION_ERROR] = 'Message decryption failed', _a[ErrorCode.UNSUPPORTED_OPERATION] = 'Unsupported Operation', _a[ErrorCode.FILE_PERMISSIONS_DENIED] = 'User does not have permission to download one or more of the specified files', _a[ErrorCode.PORTAL_MEMBER_NOT_FOUND] = 'User is not a member of the portal', _a[ErrorCode.USER_PERMISSIONS_NOT_SET] = 'User does not have any member permissions', _a[ErrorCode.TRANSFER_CONFIG_NOT_FOUND] = 'Transfer config is not provided', _a[ErrorCode.TRANSFER_DESTINATION_MISSING_ERROR] = 'Destination folder is not selected', _a[ErrorCode.UPLOAD_NO_FILES_SELECTED] = 'No files has been selected to upload', _a); var generatedErrorMessages = (_b = {}, _b[ErrorCode.WEBSOCKET_CONNECTION_TIMEOUT] = function (millis) { return "Websocket connection timed out after [".concat(millis, "] milliseconds"); }, _b[ErrorCode.APP_CONNECTION_TIMEOUT] = function (errorTimeout) { return "Did not receive startup message from Signiant App withing ".concat(errorTimeout, " ms"); }, _b[ErrorCode.UNKNOWN_EVENT_TYPE] = function (eventType) { return "Unknown transfer event type ".concat(eventType); }, _b[ErrorCode.STATE_TRANSITION_INVALID] = function (operation, state) { return "Error while attempting to apply operation [".concat(operation, "] while in state [").concat(state, "]"); }, _b[ErrorCode.WEBSOCKET_INITIALIZATION_ERROR] = function (internalMessage) { return "Error initializing websocket channel: ".concat(internalMessage); }, _b[ErrorCode.NO_PROVIDER_ERROR] = function (jsonString) { return "Failure, unknown Message Provider Information, provider: ".concat(jsonString); }, _b[ErrorCode.UNSUPPORTED_TRANSFER_DIRECTION] = function (transferDirection) { return "".concat(transferDirection, " transfers are not supported yet"); }, _b[ErrorCode.ERROR_LAUNCHING_APP] = function (internalMessage) { return "Error launching app : reason = ".concat(internalMessage); }, _b[ErrorCode.REQUEST_TIMEOUT] = function (millis) { return "Request timeout after [".concat(millis, "] milliseconds"); }, _b); /** * @ignore * These error messages highlight the various error messages that can be dispatched by the SDK. These messages are a * mix of static and dynamic messages. There is presently no intention to attempt to localize these messages. */ export default { staticErrorMessages: staticErrorMessages, generatedErrorMessages: generatedErrorMessages, };