/** * Constants for Vivocha React Native SDK class */ let pkg; try { pkg = require('../package.json'); } catch { try { pkg = require('../../package.json'); } catch {} } export const PACKAGE_VERSION = pkg.version; export const PACKAGE_NAME = pkg.name; export const PACKAGE_DESCRIPTION = pkg.description; export const CONTACT_COLOR_WHITE = 'white'; export const CONTACT_COLOR_YELLOW = 'yellow'; export const CONTACT_COLOR_ORANGE = 'orange'; export const CONTACT_COLOR_GREEN = 'green'; export const CONTACT_COLOR_BLUE = 'blue'; export const CONTACT_COLOR_PURPLE = 'purple'; export const CONTACT_COLOR_RED = 'red'; export const CONTACT_COLOR_DEFAULT = 'red'; export const POSITION_TOP = 1; export const POSITION_MIDDLE = 2; export const POSITION_BOTTOM = 3; export const POSITION_SIDE_UP = 1; export const POSITION_SIDE_DOWN = 2; export const POSITION_SIDE_LEFT = 3; export const POSITION_SIDE_RIGHT = 4; export const THEME_ENABLED = 'enabled'; export const THEME_DISABLED = 'disabled'; export const THEME_CHAT_BACKGROUND_COLOR = 'chatBackgroundColor'; export const THEME_CHAT_BACKGROUND_IMAGE = 'chatBackgroundImage'; export const THEME_CHAT_BACKGROUND_NAME = 'chatBackgroundName'; export const THEME_CHAT_BUBBLE_CORNER_RADIUS = 'chatBubbleCornerRadius'; export const THEME_CHAT_BUBBLE_INCOMING_COLOR = 'chatBubbleIncomingColor'; export const THEME_CHAT_BUBBLE_INCOMING_TEXT_COLOR = 'chatBubbleIncomingTextColor'; export const THEME_CHAT_BUBBLE_OUTGOING_COLOR = 'chatBubbleOutgoingColor'; export const THEME_CHAT_BUBBLE_OUTGOING_TEXT_COLOR = 'chatBubbleOutgoingTextColor'; export const THEME_CHAT_INPUT_VIEW_BACKGROUND_COLOR = 'chatInputViewBackgroundColor'; export const THEME_CHAT_INPUT_VIEW_TEXT_COLOR = 'chatInputViewTextColor'; export const THEME_CHAT_LOADING_BACKGROUND_COLOR = 'chatLoadingBackgroundColor'; export const THEME_CHAT_LOADING_SPINNER_COLOR = 'chatLoadingSpinnerColor'; export const THEME_CHAT_LOADING_TEXT_COLOR = 'chatLoadingTextColor'; export const THEME_CHAT_SEND_BUTTON_BACKGROUND_COLOR = 'chatSendButtonBackgroundColor'; export const THEME_CHAT_SEND_BUTTON_TEXT_COLOR = 'chatSendButtonTextColor'; export const THEME_CHAT_STATUS_TEXT_COLOR = 'chatStatusTextColor'; export const THEME_CHAT_TOP_VIEW_BACKGROUND_COLOR = 'chatTopViewBackgroundColor'; export const THEME_CHAT_TOP_VIEW_BUTTON_TEXT_COLOR = 'chatTopViewButtonTextColor'; export const THEME_ENABLE_CHAT_VIEW_NAV_BAR_TRANSLUCENCY = 'enableChatViewNavBarTranslucency'; export const THEME_SHOW_READ_RECEIPT_ON_CHAT_BUBBLE = 'showReadReceiptOnChatBubble'; export const THEME_SHOW_RECEIPTS_ON_CHAT_BUBBLE = 'showReceiptsOnChatBubble'; export const THEME_SIDE_BUTTON_BACKGROUND_COLOR = 'sideButtonBackgroundColor'; export const THEME_SIDE_BUTTON_POSITION = 'sideButtonPosition'; export const THEME_SIDE_BUTTON_SIDE = 'sideButtonSide'; export const THEME_SIDE_BUTTON_TEXT = 'sideButtonText'; export const THEME_SIDE_BUTTON_TEXT_COLOR = 'sideButtonTextColor'; export const CONNECTION_STATE_DID_FAIL_AUTHENTICATION = 1; export const CONNECTION_STATE_CONNECTING = 2; export const CONNECTION_STATE_CONNECTED = 3; export const CONNECTION_STATE_DISCONNECTING = 4; export const CONNECTION_STATE_DISCONNECTED_WITH_TIMEOUT = 5; export const CONNECTION_STATE_DISCONNECTED_WITH_ERROR = 6; export const CONNECTION_STATE_DISCONNECTED = 7; export const CONNECTION_REASON_OK = 0; export const CONNECTION_REASON_TIMEOUT = 1; export const CONNECTION_REASON_ERROR = 2; export const CONNECTION_REASON_RECONNECTION_ERROR = 3; export const CONNECTION_REASON_ERROR_AUTH = 4; export const CONNECTION_REASON_GENERIC_ERROR = 5; export const CHAT_PRESENCE_TYPE_ONLINE = 1; export const CHAT_PRESENCE_TYPE_GONE = 2; export const CHAT_PRESENCE_TYPE_TRANSFER = 3; export const DATA_COLLECTION_FIELD_TYPE_TEXT = 'text'; export const DATA_COLLECTION_FIELD_TYPE_DATE = 'date'; export const DATA_COLLECTION_FIELD_TYPE_EMAIL = 'email'; export const DATA_COLLECTION_FIELD_TYPE_LINK = 'link'; export const DATA_COLLECTION_FIELD_TYPE_NICKNAME = 'nickname'; export const DATA_COLLECTION_FIELD_TYPE_NUMBER = 'number'; export const DATA_COLLECTION_FIELD_TYPE_PHONE = 'phone'; export const DATA_COLLECTION_FIELD_TYPE_CHECKBOX = 'checkbox'; export const DATA_COLLECTION_FIELD_TYPE_FIRSTNAME = 'firstname'; export const DATA_COLLECTION_FIELD_TYPE_LASTNAME = 'lastname'; export const CONTACT_MEDIA_TYPE_CHAT = 1; export const CONTACT_MEDIA_TYPE_VIDEO = 2; export const CONTACT_MEDIA_TYPE_AUDIO = 4; /** Agent */ export const AGENT = 'agent'; /** Waiting for an agent */ export const AGENT_WAITING = 'agent_waiting_message'; /** Transfer in progress */ export const AGENT_WAITING_TRANSFER = 'agent_waiting_transfer_message'; /** is offline */ export const AGENT_ONLINE = 'agent_online'; /** is online */ export const AGENT_OFFLINE = 'agent_offline'; /** Connecting... */ export const CHAT_CONNECTING = 'chat_connecting'; /** Live help */ export const UI_SIDE_TAB = 'sidetab_text'; /** Minimize */ export const UI_BTN_MINIMIZE = 'button_minimize'; /** End */ export const UI_BTN_CLOSE = 'button_close'; /** Send */ export const UI_BTN_SEND = 'button_send'; /** OK */ export const UI_ALERT_BTN_OK = 'button_ok'; /** No */ export const UI_ALERT_BTN_NO = 'button_no'; /** Cancel */ export const UI_ALERT_BTN_CANCEL = 'button_cancel'; /** Location Service is Disabled */ export const UI_ALERT_LOCATION_SETTINGS_TITLE = 'alert_location_settings_title'; /** To enable, please go to Settings and turn on Location Services. */ export const UI_ALERT_LOCATION_SETTINGS_MESSAGE = 'alert_location_settings_message'; /** Settings */ export const UI_ALERT_LOCATION_SETTINGS_BTN_SETTINGS = 'alert_location_settings_btn_settings'; /** Location Request */ export const UI_ALERT_LOCATION_AUTH_TITLE = 'alert_location_request_title'; /** Do you want to allow the agent to see your location? */ export const UI_ALERT_LOCATION_AUTH_MESSAGE = 'alert_location_request_message'; /** Screenshot Request */ export const UI_ALERT_SCREENSHOT_AUTH_TITLE = 'alert_screenshot_request_title'; /** Do you want to allow the agent to see your screen? */ export const UI_ALERT_SCREENSHOT_AUTH_MESSAGE = 'alert_screenshot_request_message'; /** The chat has been closed. Thank you. */ export const UI_ALERT_CHAT_CLEARED_MESSAGE = 'alert_chat_cleared_message'; /** The chat is not currently available. */ export const UI_ALERT_CHAT_UNAVAILABLE_MESSAGE = 'alert_chat_unavailable_message'; /** Retry */ export const UI_ALERT_CHAT_UNAVAILABLE_BTN_OK = 'alert_chat_unavailable_button_ok'; /** End */ export const UI_ALERT_CHAT_UNAVAILABLE_BTN_CANCEL = 'alert_chat_unavailable_button_cancel'; /** There was an error establishing the contact. Please try again later. */ export const UI_ALERT_CONTACT_CREATION_FAILURE_MESSAGE = 'alert_contact_creation_failure_message'; /** Sorry */ export const UI_ALERT_CONTACT_DISSUASION_TITLE = 'alert_contact_dissuasion_title'; /** There are no available agents at the moment. Please try again later. */ export const UI_ALERT_CONTACT_DISSUASION_MESSAGE = 'alert_contact_dissuasion_message'; /** Incoming video call */ export const UI_ALERT_MEDIA_INCOMING_VIDEO_TITLE = 'alert_media_incoming_video_title'; /** The agent wants to start a video call */ export const UI_ALERT_MEDIA_INCOMING_VIDEO_MESSAGE = 'alert_media_incoming_video_message'; /** Incoming audio call */ export const UI_ALERT_MEDIA_INCOMING_AUDIO_TITLE = 'alert_media_incoming_audio_title'; /** The agent wants to start an audio call */ export const UI_ALERT_MEDIA_INCOMING_AUDIO_MESSAGE = 'alert_media_incoming_audio_message'; /** Accept */ export const UI_ALERT_MEDIA_OK = 'alert_media_incoming_media_ok'; /** No, thanks */ export const UI_ALERT_MEDIA_NO = 'alert_media_incoming_media_no'; /** Audio only */ export const UI_ALERT_MEDIA_AUDIO_ONLY = 'alert_media_incoming_media_audio_only'; /** Rejected by the agent */ export const UI_MEDIA_AGENT_REJECT_MESSAGE = 'alert_media_incoming_media_agentrejected_message'; /** Audio call in progress */ export const UI_MEDIA_AUDIO_IN_PROGRESS_MESSAGE = 'alert_media_incoming_media_audioinprogress_message'; /** An error has occurred */ export const UI_MEDIA_ERROR_MESSAGE = 'alert_media_incoming_media_error_message'; /** Waiting for the agent */ export const UI_MEDIA_WAITING_AGENT_MESSAGE = 'alert_media_incoming_media_waitingagent_message'; /** Establishing connection... */ export const UI_MEDIA_CONNECTING_MESSAGE = 'alert_media_incoming_media_connecting_message'; /** Send a photo */ export const UI_ATTACHMENT_CHOICE_TITLE = 'button_attachment_choice_title'; /** Photo Library */ export const UI_ATTACHMENT_CAMERA_ROLL_BUTTON_TITLE = 'button_attachment_camera_roll'; /** Take Photo */ export const UI_ATTACHMENT_CAMERA_TAKE_PHOTO_BUTTON_TITLE = 'button_attachment_camera_take'; /** Take Video */ export const UI_ATTACHMENT_CAMERA_TAKE_VIDEO_BUTTON_TITLE = 'button_attachment_camera_take_video'; /** Documents */ export const UI_ATTACHMENT_DOCUMENTS_BUTTON_TITLE = 'button_attachment_documents'; /** Cancel */ export const UI_ATTACHMENT_CANCEL_BUTTON_TITLE = 'button_attachment_cancel'; /** Do you want to try again? */ export const UI_ATTACHMENT_RESEND_ALERT_TITLE = 'button_attachment_resend_alert_title'; /** Do you want to send the attachment? */ export const UI_ATTACHMENT_CONFIRM_ALERT_MESSAGE = 'alert_attachment_confirm_message'; /** Resend */ export const UI_ATTACHMENT_RESEND_BUTTON_TITLE = 'button_attachment_resend_button_title'; /** Do you want to open the file? */ export const UI_ATTACHMENT_OPEN_ALERT_TITLE = 'button_attachment_open_alert_title'; /** Tap to mute. */ export const UI_MEDIA_AUDIO_MUTE_SUBTITLE = 'banner_media_audioinprogress_mute_subtitle'; /** Tap to unmute. */ export const UI_MEDIA_AUDIO_UN_MUTE_SUBTITLE = 'banner_media_audioinprogress_unmute_subtitle'; /** You are sharing your screen. */ export const UI_MEDIA_SCREENSHOT_SESSION_ACTIVE_MESSAGE = 'banner_media_screenshot_session_active_message'; /** Do you want to stop screen sharing? */ export const UI_MEDIA_SCREENSHOT_SESSION_DISABLE_ALERT_MESSAGE = 'alert_media_screenshot_session_deactive_message';