{"version":3,"sources":["redux/actions.tsx","helpers/auth-helper.tsx","routes.tsx","app-renderer.tsx","redux/auth/reducer.tsx","redux/dentist/reducer.tsx","redux/conversation/reducer.tsx","redux/templates/reducer.tsx","redux/addUser/reducer.tsx","redux/statusMessages/reducer.tsx","redux/core/reducer.tsx","redux/reducers.tsx","redux/auth/saga.tsx","redux/dentist/saga.tsx","redux/conversation/saga.tsx","redux/templates/saga.tsx","api/addUser.tsx","redux/addUser/saga.tsx","api/statusMessage.tsx","redux/statusMessages/saga.tsx","api/core.tsx","redux/core/saga.tsx","redux/sagas.tsx","redux/store.js","App.js","serviceWorkerRegistration.js","reportWebVitals.js","index.js","api/dentist.tsx","constants/user-role.tsx","constants/route-registry.tsx","redux/templates/actions.tsx","api/client.tsx","redux/auth/actions.tsx","redux/dentist/actions.tsx","constants/status-types.tsx","redux/core/actions.tsx","redux/addUser/actions.tsx","redux/statusMessages/actions.tsx","redux/conversation/actions.tsx","helpers/utils.tsx","components/layout.tsx","services/twilio-service.tsx","hooks/useGTM.ts","api/api-controller.tsx"],"names":["GET_DENTISTS","GET_DENTISTS_SUCCESS","GET_CLIENTS","GET_CLIENTS_SUCCESS","UPDATE_CHATBOT_STATUS","UPDATE_CHATBOT_STATUS_SUCCESS","INIT_CONVERSATION","INIT_CONVERSATION_SUCCESS","GET_ACCESS_TOKEN_SUCCESS","SHOW_CHAT_LIST_MENU","REMOVE_CONVERSATION_DATA","SET_SUGGETION_MESSAGE","SET_EXPAND_SUGGESTION","SET_AI_LOADING_SUGGESTION_DATA","SET_AI_SUGGESTION_DATA","SET_TYPING_PARTICIPANT","REMOVE_TYPING_PARTICIPANT","SET_TYPING_SMYLOR_BOT","SET_ENABLE_SMYLOR_BOT","CREATE_CONVERSATION","CREATE_CONVERSATION_SUCCESS","SET_DENTIST_REPLY","SET_LAST_MESSAGE","GET_WHATSAPP_TEMPLATE","SEND_WHATSAPP_TEMPLATE","GET_WHATSAPP_TEMPLATE_SUCCESS","SEND_WHATSAPP_TEMPLATE_SUCCESS","SHOW_WHATSAPP_TEMPLATE","SET_WHATSAPP_TEMPLATE_STATUS","TEMPLATE_MESSAGE_SEND","ADD_CONVERSATION_CHATBOT_DATA","INIT_USER","GET_USER_ID","SET_USER_ID","INIT_USER_STATUS","SIGNOUT","AUTHORIZE_DENTIST","AUTHORIZE_DENTIST_SUCCESS","STATUS_CHANGED","STATUS_CHANGED_SUCCESS","GET_STATUS","GET_STATUS_SUCCESS","GET_TEMPLATES","GET_TEMPLATES_SUCCESS","GET_TAGLIST","GET_TAGLIST_SUCCESS","CREATE_TEMPLATE_SUCCESS","INIT_UPDATE_TEMPLATE","INIT_CREATE_TEMPLATE","CLOSE_TEMPLATE_MODAL","CREATE_UPDATE_TEMPLATE","UPDATE_TEMPLATE_SUCCESS","DELETE_TEMPLATE","DELETE_TEMPLATE_SUCCESS","SORT_TEMPLATES","GET_TEMPLATES_CATEGORIES","GET_TEMPLATES_CATEGORIES_SUCCESS","UPDATE_TEMPLATES_CATEGORY","UPDATE_TEMPLATES_CATEGORY_SUCCESS","DELETE_TEMPLATES_CATEGORY","DELETE_TEMPLATES_CATEGORY_SUCCESS","TRANSLATE_TEMPLATE_DATA","TRANSLATE_TEMPLATE_DATA_SUCCESS","CHECK_CHAT_HISTORY","OPEN_ADD_USER_POPUP","CLOSE_ADD_USER_POPUP","ADD_CHAT_USER","REMOVE_CHAT_USER","GET_ACTIVE_CHAT_USERS","GET_ACTIVE_CHAT_USERS_SUCCESS","UPDATE_ACTIVE_CHAT_USERS","SET_DENTIST_NOTIFICATION","SET_CLIENT_NOTIFICATION","UPDATE_NOTIFICATION","UPDATE_PARTICIPANT_LIST","UPDATE_NEW_PARTICIPANT_LIST","ADD_STATUS_MESSAGE","ADD_STATUS_MESSAGE_SUCCESS","GET_STATUS_MESSAGE","GET_STATUS_MESSAGE_SUCCESS","GET_LANGUAGE_LIST","GET_LANGUAGE_LIST_SUCCESS","SET_SELECTED_LANGUAGE","SET_BROWSER_SELECTED_LANGUAGE","GET_SELECTED_LANGUAGE_LIST","GET_SELECTED_LANGUAGE_LIST_SUCCESS","SET_SIGNALR_CONNECTION","SET_DEFAULT_DENTIST","SET_SEARCH_TEXT","ProtectedRoute","Component","component","rest","currentUser","getCurrentUser","setComponent","useCallback","props","userRoleDentist","role","to","pathname","RouteRegistry","dentist","path","state","from","location","UserRole","CLIENT","clientChat","ADMIN","window","open","process","href","JSON","stringify","render","initOAuthSignOut","console","log","ChatClient","React","lazy","Dentist","SignIn","Routes","exact","landing","mapActionsToProps","initUserAction","initUser","getUserIdAction","getUserId","connect","auth","coreReducer","selectedLanguage","languageSelectedList","loading","userID","tagManager","useGTM","useEffect","loadMessages","values","culture","user","PARTICIPANT","email","clientIdentity","getValue","removeValue","obj","getChatHistory","getCode","setValue","id","chatUserId","LocalizationProvider","language","fallback","className","INIT_STATE","status","dentists","clients","notification","chats","chatSetting","activeChat","userId","dentistIdentity","conversation","conversationClient","conversationChatBotData","removeConversationData","dentistReplyPending","showChatList","suggetionMessage","aiSuggestionData","suggestionList","loadingStatus","isLoading","conversationId","typingData","initLastMessage","undefined","botTyping","getCurrConversation","prevConversationClient","getAccessToken","chatId","templates","tagList","categories","updateModal","isOpen","data","updateOrCreateSucces","getWhatsappTemplate","whatsappTemplate","templatePopupStatus","showTemplatePopup","templateMessageSend","translatedData","translateUpdateClicked","translateId","usersLoading","users","statusMessageList","languageList","initailCultureMapper","browser","sortedLang","globleLang","Cookies","get","startsWith","navigator","signalRConnetion","defaultDentist","searchText","reducers","combineReducers","action","type","payload","getstatus","statusNameList","find","list","key","forEach","client","messageCount","newParticipantList","length","updatedParticipantList","findtheNewChat","newClientList","map","accessToken","newSuggestionList","Math","floor","Date","now","clean","generatingMsg","findParticipant","filterParticipant","filter","isTyping","updatedArr","push","index","findIndex","t","splice","tempFound","item","upatedCategoryList","category","categoryName","addUser","statusMessage","watchAuthorizeDentist","getToken","watchSignout","endCurrentUserSession","checkUnsavedChatHistory","checkChatHistory","watchInitUser","watchUserIdUpdate","userIdUpdate","watchstatusUpdate","statusUpdate","watchGetCurrentStatus","getCurrentStatus","rootSaga","takeEvery","authorizeDentistAsync","token","authorizeDentist","history","call","response","username","name","nickName","picture","emailVerified","userType","sesToken","tokenData","access_token","setCurrentUser","put","authorizeDentistSuccess","subroutes","dentistChat","remove","logDebug","strSession","User","parse","error","initUserStatus","replace","userIdUpdateAsync","getUpdateUserIdAPI","res","setUserId","statusUpdateAsync","updatedentistStatus","statusData","isReset","userStatusSuccess","getCurrentStatusAsync","getCurrentDentistStatus","getUserStatusSuccess","all","fork","watchGetDentists","getDentistsFromAPI","watchGetClients","getClientsFromAPI","watchUpdateChatBotStatus","updateChatBotStatusData","getDentistsAsync","getDentists","getClientsByDentistId","d","p","image","dateTime","dentistId","getDentistsSuccess","getClientsAsync","isBotEnabled","isBotManuallyEnabled","whatsAppNumber","isWhatsApp","getClientsSuccess","updateChatBotStatusAsync","updateChatBotStatusAPI","updateChatBotStatusSuccess","createConEventChannel","watchAccessTokenFetched","handleConversationCreated","watchInitConversation","watchEnableChatBot","enableChatBot","watchCreateNewConveration","createNewConversation","takeLatest","initConversationSrvcAsync","take","initConversationSuccess","initConversationSrvc","getTokenAsync","createConversation","clientId","parseInt","clientEmail","getConversationDentist","select","shutdown","chatFound","getAccessTokenSuccess","enableChatBotAsync","enableChatBotAPI","createNewChatAsync","cerateConversationAPI","setDefaulDentist","watchGetTemplates","getTemplateList","watchDeleteTemplate","deleteTemplate","watchCreateOrUpdateTemplate","createOrupdateTemplate","watchSortTemplates","sortTemplates","watchGetCategories","getCategoriesList","watchUpdateTemplateCategory","updateTemplateCategoy","watchDeleteTemplateCategory","deleteTemplateCategory","watchGetTagList","getTagListFunc","watchGetWhatTemplate","watchSendWhatTemplate","sendWhatAppTemplate","watchTranslateTemplate","translateTemplate","getTemplatesAsync","listTemplates","getTemplatesSuccess","deleteTemplateAsync","deleteTemplateById","deleteTemplateSuccess","createTemplateAsync","template","createTemplate","updateTemplateAsync","updateTemplate","templateId","updateTemplateSuccess","createTemplateSuccess","sortTemplatesAsync","sortTemplatesOrder","templateIdsArr","templateIds","getCategoriesAsync","listCategories","getCategoriesSuccess","updateTemlateCategoryAsync","updateTemplateCategoryAPI","updateTemplateCategorySuccess","deleteTemplateCategoryAsync","deleteTemplateCategoryAPI","deleteTemplateCategorySuccess","getTagListAsync","listTaglist","getTagListSuccess","getWhatTemplateAsync","whatsappTempalteAPI","getWhatsAppTemplateSuccess","sendWhatTemplateAsync","sendWhatsappTempalteAPI","translateTemplateAsync","translateData","translateTemplateAPI","translateTemplateDataSuccess","getActiveChatUsers","axiosInstance","deletActiveChatUser","participantId","post","inviteAddChatUser","watchGetActiveChatUsers","getActiveChatUsersList","watchDeleteActiveChatUser","getUpdatedChatUsersList","watchAddActiveChatUser","getUpdatedChatUsers","getActiveChatUsersAsync","activeChatUsersSuccess","deleteActiveChatUserAsync","addActiveChatUserAsync","participantEmail","addStatusMessageApi","getStatusMessageApi","getLanguageListApi","watchsetStatusMessage","setStatusMessage","watchGetStatusMessage","getStatusMessage","watchGetLangugeList","getLanguageList","setStatusMessageAsync","statusMessageData","addStatusMessageSuccess","getStatusMessageAsync","getStatusMessageData","getStatusMessageSuccess","getLanguageListAsync","getLanguageListSuccess","selectedLanguageApi","cultureCode","watchGetSelectedLanguageList","getSelectedLanguageList","getLanguageSelectedListSuccess","getState","authSagas","dentistSagas","conversationSagas","templatesSagas","addUserSaga","statusMessagesSaga","coreSaga","sagaMiddleware","createSagaMiddleware","middlewares","configureStore","initialState","store","createStore","composeWithDevTools","applyMiddleware","run","sagas","App","displayName","Boolean","hostname","match","reportWebVitals","onPerfEntry","Function","then","getCLS","getFID","getFCP","getLCP","getTTFB","rootElement","document","getElementById","ReactDOM","serviceWorker","ready","registration","unregister","catch","message","code","Obj","newObject","updateDentistConversationRecord","Object","freeze","DENTIST","SMYLOR_BOT","messageTemplates","chatWidget","getTemplates","getTagList","initUpdateTemplate","initCreateTemplate","translateTemplateData","closeTemplateModal","getCategories","updateTemplateCategory","getWhatsAppTemplate","showWhatsAppTemplate","setWhatsAppTemplateStatus","sendWhatsAppTemplate","updateClientConversationRecord","inituser","signout","userStatus","getUserStatus","getClients","updateNotification","updateParticipantList","updateNewParticipantList","updateChatBotStatus","MESAAGEPRIVACYLINKDATA","StatusTypes","ACTIVE","OFFLINE","AWAY","msgKey","StatusCode","success","unAuthenticated","notVerified","serverError","alreadyExist","setSelectedLanguage","setBrowserSelectedLanguage","getLanguageSelectedList","setSignalRConnection","setSearchText","openAddUserModal","closeAddUserModal","addChatUser","removeChatUser","activeChatUsers","updateActiveChatUsers","addStatusMessage","initConversation","showChatListMenu","addCoversationChatBotData","removeConversation","setSuggetionMessage","setExpandSuggestion","setAiSuggestionData","setAiSuggestionLoadingData","setTypingParticipant","removeTypingParticipant","setSmylorBotTyping","setEnableChatBot","createNewConversationAction","setDentistReply","setConversationLastMessage","value","prepValue","localStorage","setItem","set","domain","e","prepValueLocal","getItem","removeItem","generateResultObject","array","msgType","text","suggestedActions","Layout","children","Twilio","Conversations","Client","create","region","eventChannel","emitter","on","END","loadConversation","getMessages","tagManagerArgs","gtmId","TagManager","initialize","warn","triggerEvent","eventName","dataLayer","event","axios","baseURL","headers","Accept","interceptors","request","use","config","updatedConfig","Authorization","Promise","reject","apiFectingError"],"mappings":"0HAAA,6hGACO,IAAMA,EAAe,eACfC,EAAuB,uBACvBC,EAAc,cACdC,EAAsB,sBACtBC,EAAwB,wBACxBC,EAAgC,gCAGhCC,EAAoB,oBACpBC,EAA4B,4BAC5BC,EAA2B,2BAC3BC,EAAsB,sBACtBC,EAA2B,2BAC3BC,EAAwB,wBACxBC,EAAwB,wBACxBC,EAAiC,iCACjCC,EAAyB,yBACzBC,EAAyB,yBACzBC,EAA4B,4BAC5BC,EAAwB,wBACxBC,EAAwB,wBACxBC,EAAsB,sBACtBC,EAA8B,8BAC9BC,EAAoB,oBACpBC,EAAmB,mBAGnBC,EAAwB,wBACxBC,EAAyB,yBACzBC,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A0CA,EAC5D,CACJ,MACI5L,QAAQsf,KAAK,sBAErB,EAkBkBC,aAjBG,SAACC,GAElB,GADAxf,QAAQC,IAAI,YAAauf,GACrBA,EACA,IACIJ,IAAWK,UAAU,CACjBA,UAAW,CACPC,MAAOF,IAKnB,CAFE,MAAO5T,GACL5L,QAAQ4L,MAAM,8BAA+BA,EACjD,MAEA5L,QAAQsf,KAAK,0BAErB,EAGJ,C,4ECvBMxL,EAAgB6L,IAAMjB,OAAO,CACjCkB,QAAQ,GAAD,OAAKlgB,yBAA8B,QAE1CmgB,QAAS,CAAEC,OAAQ,mBAAoB,eAAgB,sBAGzDhM,EAAciM,aAAaC,QAAQC,KACjC,SAACC,GACC,IAAMC,EAAa,eAAQD,GACrBvY,EAAcnD,YAAe9E,SAAqC,GAKxE,OAHIiI,IACFwY,EAAcN,QAASO,cAAa,iBAAazY,IAE5CwY,CACT,IACA,SAACvU,GACC,OAAOyU,QAAQC,OAAO1U,EACxB,IAGFkI,EAAciM,aAAavV,SAASyV,KAClC,SAACzV,GACC,OAAOA,CACT,IACA,SAACoB,GAEC,OArCoB,SAACA,GACnBA,EAAM/I,SAAWwY,IAAWE,kBAC9Bvb,QAAQC,IAAI,yBACZiL,YAAe,MACfjJ,YAAYvC,SACZuC,YAAYvC,QACZF,OAAOC,KAAK,GAAD,OAAIC,qBAAgC,qBAAaF,OAAOL,SAASQ,MAAQ,SAExF,CA4BI4gB,CAAgB3U,EAAMpB,UACf6V,QAAQC,OAAO1U,EACxB,IAGakI,K","file":"static/js/main.21b4443c.chunk.js","sourcesContent":["/** DENTIST */\r\nexport const GET_DENTISTS = 'GET_DENTISTS';\r\nexport const GET_DENTISTS_SUCCESS = 'GET_DENTISTS_SUCCESS';\r\nexport const GET_CLIENTS = 'GET_CLIENTS';\r\nexport const GET_CLIENTS_SUCCESS = 'GET_CLIENTS_SUCCESS';\r\nexport const UPDATE_CHATBOT_STATUS = 'UPDATE_CHATBOT_STATUS';\r\nexport const UPDATE_CHATBOT_STATUS_SUCCESS = 'UPDATE_CHATBOT_STATUS_SUCCESS';\r\n\r\n/** CONVERSATION */\r\nexport const INIT_CONVERSATION = 'INIT_CONVERSATION';\r\nexport const INIT_CONVERSATION_SUCCESS = 'INIT_CONVERSATION_SUCCESS';\r\nexport const GET_ACCESS_TOKEN_SUCCESS = 'GET_ACCESS_TOKEN_SUCCESS';\r\nexport const SHOW_CHAT_LIST_MENU = 'SHOW_CHAT_LIST_MENU';\r\nexport const REMOVE_CONVERSATION_DATA = 'REMOVE_CONVERSATION_DATA';\r\nexport const SET_SUGGETION_MESSAGE = 'SET_SUGGETION_MESSAGE';\r\nexport const SET_EXPAND_SUGGESTION = 'SET_EXPAND_SUGGESTION';\r\nexport const SET_AI_LOADING_SUGGESTION_DATA = 'SET_AI_LOADING_SUGGESTION_DATA';\r\nexport const SET_AI_SUGGESTION_DATA = 'SET_AI_SUGGESTION_DATA';\r\nexport const SET_TYPING_PARTICIPANT = 'SET_TYPING_PARTICIPANT';\r\nexport const REMOVE_TYPING_PARTICIPANT = 'REMOVE_TYPING_PARTICIPANT';\r\nexport const SET_TYPING_SMYLOR_BOT = 'SET_TYPING_SMYLOR_BOT';\r\nexport const SET_ENABLE_SMYLOR_BOT = 'SET_ENABLE_SMYLOR_BOT';\r\nexport const CREATE_CONVERSATION = 'CREATE_CONVERSATION';\r\nexport const CREATE_CONVERSATION_SUCCESS = 'CREATE_CONVERSATION_SUCCESS';\r\nexport const SET_DENTIST_REPLY = 'SET_DENTIST_REPLY';\r\nexport const SET_LAST_MESSAGE = 'SET_LAST_MESSAGE';\r\n\r\n/** WHATSAPP TEMPLATE */\r\nexport const GET_WHATSAPP_TEMPLATE = 'GET_WHATSAPP_TEMPLATE';\r\nexport const SEND_WHATSAPP_TEMPLATE = 'SEND_WHATSAPP_TEMPLATE';\r\nexport const GET_WHATSAPP_TEMPLATE_SUCCESS = 'GET_WHATSAPP_TEMPLATE_SUCCESS';\r\nexport const SEND_WHATSAPP_TEMPLATE_SUCCESS = 'SEND_WHATSAPP_TEMPLATE_SUCCESS';\r\nexport const SHOW_WHATSAPP_TEMPLATE = 'SHOW_WHATSAPP_TEMPLATE';\r\nexport const SET_WHATSAPP_TEMPLATE_STATUS = 'SET_WHATSAPP_TEMPLATE_STATUS';\r\nexport const TEMPLATE_MESSAGE_SEND = 'TEMPLATE_MESSAGE_SEND';\r\n\r\n// Add conversation chatbot data\r\nexport const ADD_CONVERSATION_CHATBOT_DATA = 'ADD_CONVERSATION_CHATBOT_DATA';\r\n\r\n/** AUTH */\r\nexport const INIT_USER = 'INIT_USER';\r\nexport const GET_USER_ID = 'GET_USER_ID';\r\nexport const SET_USER_ID = 'SET_USER_ID';\r\nexport const INIT_USER_STATUS = 'INIT_USER_SUCCESS';\r\nexport const SIGNOUT = 'SIGNOUT';\r\nexport const AUTHORIZE_DENTIST = 'AUTHORIZE_DENTIST';\r\nexport const AUTHORIZE_DENTIST_SUCCESS = 'AUTHORIZE_DENTIST_SUCCESS';\r\n\r\nexport const STATUS_CHANGED = 'STATUS_CHANGED';\r\nexport const STATUS_CHANGED_SUCCESS = 'STATUS_CHANGED_SUCCESS';\r\nexport const GET_STATUS = 'GET_STATUS';\r\nexport const GET_STATUS_SUCCESS = 'GET_STATUS_SUCCESS';\r\n\r\n/** CHAT TEMPLATES */\r\nexport const GET_TEMPLATES = 'GET_TEMPLATES';\r\nexport const GET_TEMPLATES_SUCCESS = 'GET_TEMPLATES_SUCCESS';\r\nexport const GET_TAGLIST = 'GET_TAGLIST';\r\nexport const GET_TAGLIST_SUCCESS = 'GET_TAGLIST_SUCCESS';\r\nexport const CREATE_TEMPLATE_SUCCESS = 'CREATE_TEMPLATE_SUCCESS';\r\nexport const INIT_UPDATE_TEMPLATE = 'INIT_UPDATE_TEMPLATE';\r\nexport const INIT_CREATE_TEMPLATE = 'INIT_CREATE_TEMPLATE';\r\nexport const CLOSE_TEMPLATE_MODAL = 'CLOSE_TEMPLATE_MODAL';\r\nexport const CREATE_UPDATE_TEMPLATE = 'UPDATE_TEMPLATE';\r\nexport const UPDATE_TEMPLATE_SUCCESS = 'UPDATE_TEMPLATE_SUCCESS';\r\nexport const DELETE_TEMPLATE = 'DELETE_TEMPLATE';\r\nexport const DELETE_TEMPLATE_SUCCESS = 'DELETE_TEMPLATE_SUCCESS';\r\nexport const SORT_TEMPLATES = 'SORT_TEMPLATES';\r\nexport const GET_TEMPLATES_CATEGORIES = 'GET_TEMPLATES_CATEGORIES';\r\nexport const GET_TEMPLATES_CATEGORIES_SUCCESS = 'GET_TEMPLATES_CATEGORIES_SUCCESS';\r\nexport const UPDATE_TEMPLATES_CATEGORY = 'UPDATE_TEMPLATES_CATEGORY';\r\nexport const UPDATE_TEMPLATES_CATEGORY_SUCCESS = 'UPDATE_TEMPLATES_CATEGORY_SUCCESS';\r\nexport const DELETE_TEMPLATES_CATEGORY = 'DELETE_TEMPLATES_CATEGORY';\r\nexport const DELETE_TEMPLATES_CATEGORY_SUCCESS = 'DELETE_TEMPLATES_CATEGORY_SUCCESS';\r\nexport const TRANSLATE_TEMPLATE_DATA = 'TRANSLATE_TEMPLATE_DATA';\r\nexport const TRANSLATE_TEMPLATE_DATA_SUCCESS = 'TRANSLATE_TEMPLATE_DATA_SUCCESS';\r\n\r\n\r\n\r\n\r\n/**CHAT HISTORY */\r\n\r\nexport const CHECK_CHAT_HISTORY = 'CHECK_CHAT_HISTORY';\r\n\r\n/** ADD USER */\r\n\r\nexport const OPEN_ADD_USER_POPUP = 'OPEN_ADD_USER_POPUP';\r\nexport const CLOSE_ADD_USER_POPUP = 'CLOSE_ADD_USER_POPUP';\r\nexport const ADD_CHAT_USER = 'ADD_CHAT_USER';\r\nexport const ADD_CHAT_USER_SUCCESS = 'ADD_CHAT_USER_SUCCESS';\r\nexport const REMOVE_CHAT_USER = 'REMOVE_CHAT_USER';\r\nexport const GET_ACTIVE_CHAT_USERS = 'GET_ACTIVE_CHAT_USERS';\r\nexport const GET_ACTIVE_CHAT_USERS_SUCCESS = 'GET_ACTIVE_CHAT_USERS_SUCCESS';\r\nexport const UPDATE_ACTIVE_CHAT_USERS = 'UPDATE_ACTIVE_CHAT_USERS';\r\n\r\n/** Notifiactions */\r\n\r\nexport const SET_DENTIST_NOTIFICATION = 'SET_DENTIST_NOTIFICATION';\r\nexport const SET_CLIENT_NOTIFICATION = 'SET_CLIENT_NOTIFICATION';\r\nexport const UPDATE_NOTIFICATION = 'UPDATE_NOTIFICATION';\r\n\r\n/** Particpants list update */\r\nexport const UPDATE_PARTICIPANT_LIST = 'UPDATE_PARTICIPANT_LIST';\r\n/** Particpants New Participant */\r\nexport const UPDATE_NEW_PARTICIPANT_LIST = 'UPDATE_NEW_PARTICIPANT_LIST';\r\n\r\n/** Status Messages */\r\nexport const ADD_STATUS_MESSAGE = 'ADD_STATUS_MESSAGE';\r\nexport const ADD_STATUS_MESSAGE_SUCCESS = 'ADD_STATUS_MESSAGE_SUCCESS';\r\n\r\nexport const GET_STATUS_MESSAGE = 'GET_STATUS_MESSAGE';\r\nexport const GET_STATUS_MESSAGE_SUCCESS = 'GET_STATUS_MESSAGE_SUCCESS';\r\n\r\nexport const GET_LANGUAGE_LIST = 'GET_LANGUAGE_LIST';\r\nexport const GET_LANGUAGE_LIST_SUCCESS = 'GET_LANGUAGE_LIST_SUCCESS';\r\n\r\n/** Core Reducer */\r\n\r\nexport const SET_SELECTED_LANGUAGE = 'SET_SELECTED_LANGUAGE';\r\nexport const SET_BROWSER_SELECTED_LANGUAGE = 'SET_BROWSER_SELECTED_LANGUAGE';\r\nexport const GET_SELECTED_LANGUAGE_LIST = 'GET_SELECTED_LANGUAGE_LIST';\r\nexport const GET_SELECTED_LANGUAGE_LIST_SUCCESS = 'GET_SELECTED_LANGUAGE_LIST_SUCCESS';\r\nexport const SET_SIGNALR_CONNECTION = 'SET_SIGNALR_CONNECTION';\r\nexport const SET_DEFAULT_DENTIST= 'SET_DEFAULT_DENTIST';\r\nexport const REMOVE_DEFAULT_DENTIST= 'REMOVE_DEFAULT_DENTIST';\r\nexport const SET_SEARCH_TEXT= 'SET_SEARCH_TEXT';\r\n","import React, { useCallback } from \"react\";\r\nimport { Route, Redirect } from \"react-router-dom\";\r\nimport { getCurrentUser, userRoleDentist } from \"./utils\";\r\nimport RouteRegistry from \"../constants/route-registry\";\r\nimport { UserRole } from \"../constants/user-role\";\r\n\r\nconst ProtectedRoute = ({ component: Component, ...rest }: any) => {\r\n\r\n const currentUser = getCurrentUser();\r\n\r\n const setComponent = useCallback((props: any) => {\r\n\r\n if (currentUser) {\r\n if (userRoleDentist(currentUser.role)) {\r\n return (\r\n \r\n );\r\n } else if (currentUser.role === UserRole.CLIENT) {\r\n return (\r\n \r\n );\r\n } else if (currentUser.role === UserRole.ADMIN){\r\n window.open(`${process.env.REACT_APP_SMYLOR_URL}`, \"_self\");\r\n }\r\n } else {\r\n window.open(`${process.env.REACT_APP_SMYLOR_URL}?returnTo=${window.location.href}`, \"_self\");\r\n return (\r\n \r\n );\r\n }\r\n }, [JSON.stringify(currentUser)]);\r\n\r\n return ;\r\n};\r\n\r\nconst initOAuthSignOut = () => {\r\n console.log('initOAuthSignOut');\r\n window.open(process.env.REACT_APP_OAUTH_SIGNOUT_URL, \"_blank\");\r\n};\r\n\r\nconst authSignOutEmailNotVarified = () => {\r\n console.log('authSignOutEmailNotVarified');\r\n window.open(process.env.REACT_APP_OAUTH_SIGNOUT_URL_EMAIL_NOT_VERIFIED, \"_blank\");\r\n};\r\n\r\nexport { ProtectedRoute, initOAuthSignOut, authSignOutEmailNotVarified };\r\n","import React from \"react\";\r\nimport {\r\n BrowserRouter as Router,\r\n Route,\r\n Switch,\r\n Redirect,\r\n} from \"react-router-dom\";\r\n\r\nimport { ProtectedRoute } from \"./helpers/auth-helper\";\r\n\r\nimport RouteRegistry from \"./constants/route-registry\";\r\n\r\nconst ChatClient = React.lazy(() => import(\"./views/chat-client\"));\r\nconst Dentist = React.lazy(() => import(\"./views/dentist\"));\r\nconst SignIn = React.lazy(() => import(\"./views/sign-in\"));\r\n\r\nconst Routes = () => {\r\n return (\r\n \r\n \r\n }\r\n />\r\n {/* }\r\n /> */}\r\n }\r\n />\r\n {/* }\r\n /> */}\r\n \r\n {/* }\r\n /> */}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default Routes;\r\n","import { Suspense, useEffect } from \"react\";\r\nimport { connect } from \"react-redux\";\r\n\r\nimport Routes from \"./routes\";\r\n\r\nimport { getUserId, initUser } from \"./redux/auth/actions\";\r\nimport { getCurrentUser, getValue, removeValue, setValue } from \"./helpers/utils\";\r\nimport { loadMessages, LocalizationProvider } from \"@progress/kendo-react-intl\";\r\nimport { UserRole } from \"./constants/user-role\";\r\nimport { getChatHistory } from \"./api/client\";\r\nimport useGTM from \"./hooks/useGTM\";\r\n\r\nconst AppRenderer = (props: any) => {\r\n const tagManager = useGTM();\r\n useEffect(() => {\r\n if (props.languageSelectedList) {\r\n loadMessages(props.languageSelectedList.values, props.languageSelectedList.culture);\r\n }\r\n }, [JSON.stringify(props.languageSelectedList), props.selectedLanguage]);\r\n\r\n useEffect(() => {\r\n const user = getCurrentUser();\r\n if (user) {\r\n if (user?.role === UserRole.CLIENT || user?.role === UserRole.PARTICIPANT)\r\n props.getUserIdAction(user?.email);\r\n props.initUserAction(user);\r\n const clientIdentity = getValue('clientIdentity')\r\n if (clientIdentity) {\r\n removeValue('clientIdentity');\r\n const obj: any = { clientIdentity, email: user.email }\r\n getChatHistory(obj);\r\n }\r\n }\r\n else {\r\n props.initUserAction(null);\r\n }\r\n\r\n if(process.env.REACT_APP_GTM_KEY){\r\n tagManager.getCode(process.env.REACT_APP_GTM_KEY)\r\n }\r\n }, []);\r\n\r\n useEffect(() => {\r\n const user = getCurrentUser();\r\n\r\n if (props.userID)\r\n if (user?.role === UserRole.PARTICIPANT) {\r\n setValue(process.env.REACT_APP_USER_INFO!, JSON.stringify({ ...user, id: props.userID }));\r\n } else {\r\n setValue(process.env.REACT_APP_USER_INFO!, JSON.stringify({ ...user, chatUserId: props.userID }));\r\n }\r\n }, [props.userID])\r\n\r\n return (\r\n <>\r\n {props.loading ? (\r\n
\r\n ) : (\r\n \r\n }>\r\n \r\n \r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nconst mapStateToProps = ({ auth, coreReducer: { selectedLanguage, languageSelectedList } }: any) => {\r\n const { loading, currentUser, userID } = auth;\r\n\r\n return { loading, currentUser, selectedLanguage, languageSelectedList, userID };\r\n};\r\n\r\nconst mapActionsToProps = {\r\n initUserAction: initUser,\r\n getUserIdAction: getUserId,\r\n};\r\n\r\nexport default connect(mapStateToProps, mapActionsToProps)(AppRenderer);\r\n","import {\r\n AUTHORIZE_DENTIST,\r\n AUTHORIZE_DENTIST_SUCCESS,\r\n GET_STATUS,\r\n GET_STATUS_SUCCESS,\r\n GET_USER_ID,\r\n INIT_USER,\r\n INIT_USER_STATUS,\r\n SET_USER_ID,\r\n STATUS_CHANGED_SUCCESS,\r\n} from \"../actions\";\r\n\r\nimport IAction from \"../../models/action\";\r\nimport { statusNameList } from '../../constants/status-types';\r\n\r\nconst INIT_STATE = {\r\n loading: true,\r\n currentUser: null,\r\n userID: 0,\r\n status: null\r\n};\r\n\r\nexport default (state = INIT_STATE, action: IAction) => {\r\n switch (action.type) {\r\n case INIT_USER:\r\n case GET_USER_ID:\r\n return { ...state, loading: true };\r\n case INIT_USER_STATUS: {\r\n return { ...state, loading: false, currentUser: action.payload.status ? action.payload.user : null };\r\n }\r\n case AUTHORIZE_DENTIST:\r\n return { ...state, loading: true };\r\n case AUTHORIZE_DENTIST_SUCCESS: {\r\n console.log('AUTHORIZE_DENTIST_SUCCESS');\r\n let getstatus;\r\n if(action.payload.status){\r\n getstatus = statusNameList.find((list: {key: number, name: string})=> list.key === action.payload.status)\r\n }\r\n return { ...state, loading: false, currentUser: action.payload, status : getstatus };\r\n }\r\n case STATUS_CHANGED_SUCCESS: {\r\n return { ...state, loading: false, status: action.payload };\r\n }\r\n case SET_USER_ID: {\r\n return { ...state, loading: false, userID: action.payload.id };\r\n }\r\n case GET_STATUS_SUCCESS: {\r\n let getstatus;\r\n if(action.payload.status){\r\n getstatus = statusNameList.find((list: {key: number, name: string})=> list.key === action.payload.status)\r\n }\r\n return { ...state, loading: false, status: getstatus };\r\n }\r\n default:\r\n return state;\r\n }\r\n};\r\n","import { GET_CLIENTS, GET_CLIENTS_SUCCESS, GET_DENTISTS, GET_DENTISTS_SUCCESS, UPDATE_CHATBOT_STATUS_SUCCESS, UPDATE_NEW_PARTICIPANT_LIST, UPDATE_NOTIFICATION, UPDATE_PARTICIPANT_LIST } from \"../actions\";\r\n\r\nconst INIT_STATE = {\r\n loading: false,\r\n dentists: [],\r\n clients: [],\r\n notification: {}\r\n};\r\n\r\ninterface IAction {\r\n type: string;\r\n payload: any;\r\n}\r\n\r\nexport default (state = INIT_STATE, action: IAction) => {\r\n switch (action.type) {\r\n case GET_DENTISTS:\r\n case GET_CLIENTS:\r\n return { ...state, loading: true };\r\n case GET_DENTISTS_SUCCESS:\r\n {\r\n const notification: any = {}\r\n action.payload.forEach((client: any) => {\r\n notification[client.id] = client.messageCount\r\n });\r\n\r\n return { ...state, loading: false, dentists: [...action.payload], notification };\r\n }\r\n case GET_CLIENTS_SUCCESS:\r\n {\r\n const notification: any = {}\r\n action.payload.forEach((client: any) => {\r\n notification[client.id] = client.messageCount\r\n });\r\n return { ...state, loading: false, clients: [...action.payload], notification };\r\n }\r\n case UPDATE_PARTICIPANT_LIST:\r\n let newParticipantList;\r\n if (state.clients.length > 0) {\r\n newParticipantList = { clients: [...action.payload] }\r\n } else if (state.dentists.length > 0) {\r\n newParticipantList = { dentists: [...action.payload] }\r\n }\r\n return {\r\n ...state,\r\n loading: false,\r\n ...newParticipantList\r\n }\r\n case UPDATE_NOTIFICATION:\r\n return { ...state, notification: { ...state.notification, [action.payload.conversationId]: action.payload.messageCount } };\r\n case UPDATE_NEW_PARTICIPANT_LIST:\r\n let updatedParticipantList;\r\n let findtheNewChat;\r\n if (state.clients.length > 0) {\r\n findtheNewChat = state.clients.find((client: any) => client.id === action.payload.id);\r\n if (findtheNewChat)\r\n updatedParticipantList = { clients: state.clients }\r\n else\r\n updatedParticipantList = { clients: [action.payload, ...state.clients] }\r\n } else if (state.dentists.length > 0) {\r\n findtheNewChat = state.clients.find((client: any) => client.id === action.payload.id);\r\n if (findtheNewChat)\r\n updatedParticipantList = { clients: state.dentists }\r\n else\r\n updatedParticipantList = { dentists: [action.payload, ...state.dentists] }\r\n }\r\n return {\r\n ...state,\r\n loading: false,\r\n notification: { ...state.notification, [action.payload.id]: action.payload.messageCount },\r\n ...updatedParticipantList\r\n }\r\n case UPDATE_CHATBOT_STATUS_SUCCESS:\r\n const newClientList = state.clients.map((client: any) => {\r\n if (client.id === action.payload.id) {\r\n return action.payload;\r\n } else {\r\n return client;\r\n };\r\n })\r\n return { ...state, clients: newClientList }\r\n default:\r\n return state;\r\n }\r\n};\r\n","import {\r\n ADD_CONVERSATION_CHATBOT_DATA,\r\n GET_ACCESS_TOKEN_SUCCESS,\r\n INIT_CONVERSATION,\r\n INIT_CONVERSATION_SUCCESS,\r\n REMOVE_CONVERSATION_DATA,\r\n REMOVE_TYPING_PARTICIPANT,\r\n SET_AI_LOADING_SUGGESTION_DATA,\r\n SET_AI_SUGGESTION_DATA,\r\n SET_EXPAND_SUGGESTION,\r\n SET_SUGGETION_MESSAGE,\r\n SET_TYPING_PARTICIPANT,\r\n SET_TYPING_SMYLOR_BOT,\r\n SHOW_CHAT_LIST_MENU,\r\n SET_DENTIST_REPLY,\r\n SET_LAST_MESSAGE,\r\n} from \"../actions\";\r\n\r\nimport IAction from \"../../models/action\";\r\n\r\nconst INIT_STATE = {\r\n loading: false,\r\n chats: {},\r\n chatSetting: {},\r\n activeChat: {\r\n userId: null,\r\n clientIdentity: null,\r\n dentistIdentity: null,\r\n conversation: null,\r\n conversationClient: null,\r\n conversationChatBotData: null\r\n },\r\n removeConversationData: null,\r\n dentistReplyPending: false,\r\n showChatList: false,\r\n suggetionMessage: '',\r\n aiSuggestionData: { suggestionList: [], loadingStatus: { isLoading: false, conversationId: null } },\r\n typingData: [],\r\n initLastMessage: undefined,\r\n botTyping: false\r\n};\r\n\r\nexport default (state = INIT_STATE, action: IAction) => {\r\n switch (action.type) {\r\n case INIT_CONVERSATION: {\r\n return {\r\n ...state,\r\n loading: true,\r\n chatSetting: {},\r\n prevConversationClient: state.activeChat.conversationClient,\r\n activeChat: {\r\n userId: action.payload.conversationId,\r\n clientIdentity: null,\r\n dentistIdentity: null,\r\n conversation: null,\r\n conversationClient: null,\r\n conversationChatBotData: null\r\n },\r\n removeConversationData: null,\r\n suggetionMessage: '',\r\n aiSuggestionData: { suggestionList: [], loadingStatus: { isLoading: false, conversationId: null } },\r\n typingData: [],\r\n botTyping: false,\r\n initLastMessage: undefined,\r\n };\r\n };\r\n case INIT_CONVERSATION_SUCCESS: {\r\n return {\r\n ...state,\r\n loading: false,\r\n activeChat: { userId: state.activeChat.userId, conversationChatBotData: state.activeChat.conversationChatBotData, ...action.payload },\r\n };\r\n };\r\n case SHOW_CHAT_LIST_MENU: {\r\n return {\r\n ...state,\r\n loading: false,\r\n showChatList: action.payload,\r\n };\r\n };\r\n case GET_ACCESS_TOKEN_SUCCESS: {\r\n return {\r\n ...state,\r\n chats: {\r\n ...state.chats,\r\n [action.payload.chatId]: {\r\n accessToken: action.payload.accessToken,\r\n clientIdentity: action.payload.clientIdentity,\r\n dentistIdentity: action.payload.dentistIdentity,\r\n },\r\n },\r\n };\r\n };\r\n case ADD_CONVERSATION_CHATBOT_DATA: {\r\n return {\r\n ...state,\r\n activeChat: { ...state.activeChat, conversationChatBotData: action.payload }\r\n };\r\n };\r\n case REMOVE_CONVERSATION_DATA: {\r\n return {\r\n ...state,\r\n removeConversationData: action.payload\r\n }\r\n };\r\n case SET_SUGGETION_MESSAGE: {\r\n return {\r\n ...state,\r\n suggetionMessage: action.payload\r\n };\r\n };\r\n case SET_EXPAND_SUGGESTION: {\r\n return {\r\n ...state,\r\n chatSetting: { ...state.chatSetting, ...action.payload }\r\n };\r\n };\r\n case SET_AI_SUGGESTION_DATA: {\r\n let newSuggestionList: any[] = state.aiSuggestionData.suggestionList;\r\n\r\n if (state.aiSuggestionData.loadingStatus.isLoading) {\r\n newSuggestionList[0] = { ...action.payload, key: Math.floor(Date.now() / 1000) };\r\n } else {\r\n newSuggestionList = []\r\n }\r\n if (action.payload?.clean) {\r\n return {\r\n ...state,\r\n aiSuggestionData: {\r\n ...state.aiSuggestionData,\r\n suggestionList: []\r\n }\r\n }\r\n };\r\n return {\r\n ...state,\r\n aiSuggestionData: {\r\n ...state.aiSuggestionData,\r\n suggestionList: newSuggestionList.length > 0 ? [...newSuggestionList] :\r\n [{ ...action.payload, key: Math.floor(Date.now() / 1000) }, ...state.aiSuggestionData.suggestionList],\r\n loadingStatus: {}\r\n }\r\n }\r\n };\r\n case SET_AI_LOADING_SUGGESTION_DATA:\r\n return {\r\n ...state,\r\n aiSuggestionData: {\r\n ...state.aiSuggestionData,\r\n loadingStatus: action.payload.data,\r\n suggestionList: !(state.aiSuggestionData.loadingStatus.isLoading) &&\r\n [action.payload.generatingMsg, ...state.aiSuggestionData.suggestionList]\r\n }\r\n };\r\n case SET_TYPING_PARTICIPANT:\r\n let findParticipant = state.typingData.find(user => user === action.payload);\r\n return {\r\n ...state,\r\n typingData: findParticipant ? state.typingData : [...state.typingData, action.payload]\r\n };\r\n case REMOVE_TYPING_PARTICIPANT:\r\n let filterParticipant = state.typingData.filter(user => user !== action.payload);\r\n return {\r\n ...state,\r\n typingData: filterParticipant\r\n };\r\n case SET_TYPING_SMYLOR_BOT:\r\n if(state.activeChat.userId === action.payload.conversationId){\r\n return {\r\n ...state,\r\n botTyping: action.payload.isTyping\r\n };\r\n }else{\r\n return{\r\n ...state\r\n }\r\n }\r\n case SET_DENTIST_REPLY:\r\n return{\r\n ...state,\r\n dentistReplyPending : action.payload\r\n }\r\n case SET_LAST_MESSAGE:\r\n return{\r\n ...state,\r\n initLastMessage : action.payload\r\n }\r\n\r\n default:\r\n return state;\r\n }\r\n};\r\n\r\nexport const getCurrConversation = (state: any) => {\r\n return state.conversation.prevConversationClient;\r\n};\r\n\r\nexport const getAccessToken = (state: any, chatId: string) => {\r\n return state.conversation.chats[chatId];\r\n};\r\n","import { ITemplate } from \"../../models/template\";\r\nimport {\r\n SORT_TEMPLATES,\r\n CLOSE_TEMPLATE_MODAL,\r\n CREATE_TEMPLATE_SUCCESS,\r\n DELETE_TEMPLATE_SUCCESS,\r\n GET_TEMPLATES, GET_TEMPLATES_SUCCESS,\r\n INIT_CREATE_TEMPLATE,\r\n INIT_UPDATE_TEMPLATE,\r\n UPDATE_TEMPLATE_SUCCESS,\r\n GET_TEMPLATES_CATEGORIES,\r\n GET_TEMPLATES_CATEGORIES_SUCCESS,\r\n UPDATE_TEMPLATES_CATEGORY,\r\n DELETE_TEMPLATES_CATEGORY,\r\n UPDATE_TEMPLATES_CATEGORY_SUCCESS,\r\n DELETE_TEMPLATES_CATEGORY_SUCCESS,\r\n GET_TAGLIST_SUCCESS,\r\n GET_WHATSAPP_TEMPLATE,\r\n GET_WHATSAPP_TEMPLATE_SUCCESS,\r\n SHOW_WHATSAPP_TEMPLATE,\r\n SET_WHATSAPP_TEMPLATE_STATUS,\r\n TEMPLATE_MESSAGE_SEND,\r\n TRANSLATE_TEMPLATE_DATA,\r\n TRANSLATE_TEMPLATE_DATA_SUCCESS,\r\n CREATE_UPDATE_TEMPLATE,\r\n} from \"../actions\";\r\n\r\nconst INIT_STATE = {\r\n loading: false,\r\n templates: [],\r\n tagList: [],\r\n categories: [],\r\n updateModal: {\r\n isOpen: false,\r\n data: null,\r\n },\r\n updateOrCreateSucces: false,\r\n getWhatsappTemplate: false,\r\n whatsappTemplate: undefined,\r\n templatePopupStatus: false,\r\n showTemplatePopup: false,\r\n templateMessageSend: false,\r\n translatedData: null,\r\n translateUpdateClicked: false,\r\n translateId: null\r\n};\r\n\r\ninterface IAction {\r\n type: string;\r\n payload: any;\r\n}\r\n\r\nexport default (state = INIT_STATE, action: IAction) => {\r\n switch (action.type) {\r\n case GET_TEMPLATES:\r\n case GET_TEMPLATES:\r\n case GET_TEMPLATES_CATEGORIES:\r\n case UPDATE_TEMPLATES_CATEGORY:\r\n case DELETE_TEMPLATES_CATEGORY:\r\n case TRANSLATE_TEMPLATE_DATA:\r\n return { ...state, loading: true };\r\n case CREATE_UPDATE_TEMPLATE:\r\n return { ...state, loading: true, translateUpdateClicked: action.payload.translateUpdateClicked };\r\n case GET_TEMPLATES_SUCCESS:\r\n return { ...state, loading: false, templates: [...action.payload], updateOrCreateSucces: false };\r\n case GET_TAGLIST_SUCCESS:\r\n return { ...state, loading: false, tagList: [...action.payload] };\r\n case CREATE_TEMPLATE_SUCCESS: {\r\n const updatedArr: ITemplate[] = [...state.templates];\r\n updatedArr.push(action.payload);\r\n const translateId = action.payload.translateId\r\n if (state.translateUpdateClicked) {\r\n return { ...state, updateModal: { isOpen: false, data: null }, updateOrCreateSucces: true, translateUpdateClicked: false, translatedData: null };\r\n } else\r\n return { ...state, translateId, templates: updatedArr, updateOrCreateSucces: true };\r\n }\r\n case UPDATE_TEMPLATE_SUCCESS: {\r\n const updatedArr: ITemplate[] = [...state.templates];\r\n const index = updatedArr.findIndex((t: ITemplate) => t.id === action.payload.id);\r\n updatedArr[index] = action.payload;\r\n if (state.translateUpdateClicked) {\r\n return { ...state, updateModal: { isOpen: false, data: null }, updateOrCreateSucces: true, translateUpdateClicked: false, translatedData: null};\r\n } else\r\n return { ...state, templates: updatedArr, updateOrCreateSucces: true };\r\n }\r\n case DELETE_TEMPLATE_SUCCESS: {\r\n const updatedArr: ITemplate[] = [...state.templates];\r\n const index = updatedArr.findIndex((t: ITemplate) => t.id === action.payload);\r\n updatedArr.splice(index, 1);\r\n return { ...state, templates: updatedArr, updateOrCreateSucces: true };\r\n }\r\n case GET_TEMPLATES_CATEGORIES_SUCCESS: {\r\n return { ...state, categories: action.payload, updateOrCreateSucces: false };\r\n }\r\n case INIT_UPDATE_TEMPLATE: {\r\n const tempFound = state.templates.find((item: ITemplate) => item.id === action.payload);\r\n\r\n return { ...state, updateModal: { isOpen: true, data: tempFound, } };\r\n }\r\n case INIT_CREATE_TEMPLATE: {\r\n return { ...state, updateModal: { isOpen: true, data: null } };\r\n }\r\n case CLOSE_TEMPLATE_MODAL: {\r\n return { ...state, updateModal: { isOpen: false, data: null }, translatedData: null };\r\n }\r\n case SORT_TEMPLATES: {\r\n return { ...state, templates: [...action.payload] };\r\n }\r\n case SORT_TEMPLATES: {\r\n return { ...state, templates: [...action.payload] };\r\n }\r\n case UPDATE_TEMPLATES_CATEGORY_SUCCESS: {\r\n const upatedCategoryList = state.categories.map((category: any) => {\r\n if (category.id === action.payload.id) {\r\n return { ...category, categoryName: action.payload.categoryName }\r\n } else return category\r\n })\r\n return { ...state, loading: false, categories: upatedCategoryList };\r\n }\r\n case DELETE_TEMPLATES_CATEGORY_SUCCESS: {\r\n return { ...state, loading: false, categories: action.payload };\r\n }\r\n case GET_WHATSAPP_TEMPLATE: {\r\n return { ...state, getWhatsappTemplate: true, };\r\n }\r\n case GET_WHATSAPP_TEMPLATE_SUCCESS: {\r\n return { ...state, getWhatsappTemplate: false, whatsappTemplate: action.payload };\r\n }\r\n case SHOW_WHATSAPP_TEMPLATE: {\r\n return { ...state, showTemplatePopup: action.payload };\r\n }\r\n case SET_WHATSAPP_TEMPLATE_STATUS: {\r\n return { ...state, templatePopupStatus: action.payload };\r\n }\r\n case TEMPLATE_MESSAGE_SEND: {\r\n return { ...state, templateMessageSend: action.payload };\r\n }\r\n case TRANSLATE_TEMPLATE_DATA_SUCCESS: {\r\n return { ...state, loading: false, translatedData: action.payload };\r\n }\r\n default:\r\n return state;\r\n }\r\n};\r\n","// import { ITemplate } from \"../../models/template\";\r\nimport {\r\n OPEN_ADD_USER_POPUP,\r\n CLOSE_ADD_USER_POPUP,\r\n ADD_CHAT_USER,\r\n ADD_CHAT_USER_SUCCESS,\r\n REMOVE_CHAT_USER,\r\n GET_ACTIVE_CHAT_USERS,\r\n GET_ACTIVE_CHAT_USERS_SUCCESS,\r\n UPDATE_ACTIVE_CHAT_USERS,\r\n} from \"../actions\";\r\n\r\nconst INIT_STATE = {\r\n usersLoading: false,\r\n users: [],\r\n updateModal: {\r\n isOpen: false,\r\n data: null,\r\n },\r\n};\r\n\r\ninterface IAction {\r\n type: string;\r\n payload: any;\r\n}\r\n\r\nexport default (state = INIT_STATE, action: IAction) => {\r\n switch (action.type) {\r\n case OPEN_ADD_USER_POPUP: {\r\n return { ...state, updateModal: { isOpen: true, data: null } };\r\n }\r\n case CLOSE_ADD_USER_POPUP: {\r\n return { ...state, updateModal: { isOpen: false, data: null } };\r\n }\r\n case ADD_CHAT_USER:\r\n case GET_ACTIVE_CHAT_USERS:\r\n case REMOVE_CHAT_USER: {\r\n return { ...state, usersLoading: true };\r\n }\r\n case GET_ACTIVE_CHAT_USERS_SUCCESS: {\r\n return { ...state, usersLoading: false, users: action.payload };\r\n }\r\n case UPDATE_ACTIVE_CHAT_USERS: {\r\n return { ...state, users: [...state.users, action.payload] };\r\n }\r\n default:\r\n return state;\r\n }\r\n};\r\n","import {\r\n ADD_STATUS_MESSAGE,\r\n ADD_STATUS_MESSAGE_SUCCESS,\r\n GET_LANGUAGE_LIST,\r\n GET_LANGUAGE_LIST_SUCCESS,\r\n GET_STATUS_MESSAGE,\r\n GET_STATUS_MESSAGE_SUCCESS,\r\n} from \"../actions\";\r\n\r\nimport IAction from \"../../models/action\";\r\n\r\nconst INIT_STATE = {\r\n loading: false, \r\n statusMessageList: null,\r\n languageList: null\r\n};\r\n\r\nexport default (state = INIT_STATE, action: IAction) => {\r\n switch (action.type) {\r\n case ADD_STATUS_MESSAGE:\r\n case GET_STATUS_MESSAGE:\r\n case GET_LANGUAGE_LIST:\r\n return { ...state, loading: true };\r\n case ADD_STATUS_MESSAGE_SUCCESS: {\r\n return { ...state, loading: false, statusMessageList: action.payload };\r\n }\r\n case GET_STATUS_MESSAGE_SUCCESS: {\r\n return { ...state, loading: false, statusMessageList: action.payload };\r\n }\r\n case GET_LANGUAGE_LIST_SUCCESS: {\r\n return { ...state, loading: false, languageList: action.payload };\r\n }\r\n default:\r\n return state;\r\n }\r\n};\r\n","import Cookies from \"js-cookie\";\r\n\r\nimport {\r\n GET_SELECTED_LANGUAGE_LIST,\r\n SET_SELECTED_LANGUAGE,\r\n GET_SELECTED_LANGUAGE_LIST_SUCCESS,\r\n SET_SIGNALR_CONNECTION,\r\n SET_BROWSER_SELECTED_LANGUAGE,\r\n SET_DEFAULT_DENTIST,\r\n SET_SEARCH_TEXT,\r\n} from \"../actions\";\r\nimport { setValue } from \"../../helpers/utils\";\r\n\r\nconst initailCultureMapper = (culture: string, browser: boolean) => {\r\n const globleLang = Cookies.get('globleLang');\r\n let sortedLang: string;\r\n\r\n if (culture.startsWith('en')) {\r\n sortedLang = 'En_Us';\r\n } else if (culture.startsWith('de')) {\r\n sortedLang = 'De_ch';\r\n } else {\r\n sortedLang = 'En_Us';\r\n }\r\n\r\n if (browser) {\r\n setValue('globleLang', sortedLang);\r\n return sortedLang;\r\n } else {\r\n if (globleLang) {\r\n return sortedLang = globleLang;\r\n } else {\r\n setValue('globleLang', sortedLang);\r\n return sortedLang;\r\n }\r\n }\r\n}\r\n\r\nconst INIT_STATE = {\r\n loading: false,\r\n selectedLanguage: initailCultureMapper(window.navigator.language, false),\r\n languageSelectedList: undefined,\r\n signalRConnetion: undefined,\r\n defaultDentist: null,\r\n searchText: \"\"\r\n};\r\n\r\ninterface IAction {\r\n type: string;\r\n payload: any;\r\n}\r\n\r\nexport default (state = INIT_STATE, action: IAction) => {\r\n switch (action.type) {\r\n case GET_SELECTED_LANGUAGE_LIST:\r\n return { ...state, loading: true };\r\n case SET_SELECTED_LANGUAGE:\r\n return { ...state, selectedLanguage: action.payload };\r\n case SET_BROWSER_SELECTED_LANGUAGE:\r\n return { ...state, selectedLanguage: initailCultureMapper(action.payload, true) };\r\n case GET_SELECTED_LANGUAGE_LIST_SUCCESS:\r\n return { ...state, languageSelectedList: action.payload };\r\n case SET_SIGNALR_CONNECTION:\r\n return { ...state, signalRConnetion: action.payload };\r\n case SET_DEFAULT_DENTIST:\r\n return { ...state, defaultDentist: action.payload };\r\n case SET_SEARCH_TEXT:\r\n return { ...state, searchText: action.payload };\r\n default:\r\n return state;\r\n }\r\n};","import { combineReducers } from \"redux\";\r\n\r\nimport auth from \"./auth/reducer\";\r\nimport dentist from \"./dentist/reducer\";\r\nimport conversation from \"./conversation/reducer\";\r\nimport templates from \"./templates/reducer\";\r\nimport addUser from \"./addUser/reducer\";\r\nimport statusMessage from \"./statusMessages/reducer\";\r\nimport coreReducer from \"./core/reducer\";\r\n\r\nconst reducers = combineReducers({\r\n auth,\r\n dentist,\r\n conversation,\r\n templates,\r\n addUser,\r\n statusMessage,\r\n coreReducer\r\n});\r\n\r\nexport default reducers;","import { all, call, fork, put, takeEvery } from \"redux-saga/effects\";\r\n\r\nimport { authorizeDentist, getCurrentDentistStatus, getUpdateUserIdAPI, updatedentistStatus } from \"../../api/dentist\";\r\nimport { authorizeDentistSuccess, getUserStatusSuccess, initUserStatus, setUserId, userStatusSuccess } from \"./actions\";\r\nimport {\r\n getCurrentUser,\r\n logDebug,\r\n removeValue,\r\n setCurrentUser,\r\n setValue,\r\n userRoleDentist,\r\n} from \"../../helpers/utils\";\r\n\r\nimport { AUTHORIZE_DENTIST, INIT_USER, SIGNOUT, CHECK_CHAT_HISTORY, STATUS_CHANGED, GET_STATUS, GET_USER_ID } from \"../actions\";\r\nimport RouteRegistry from \"../../constants/route-registry\";\r\nimport { IUser } from \"../../models/user\";\r\nimport { authSignOutEmailNotVarified, initOAuthSignOut } from \"../../helpers/auth-helper\";\r\nimport Cookies from 'js-cookie';\r\nimport { getChatHistory } from '../../api/client';\r\n\r\n/**\r\n * BEGIN: Authorize dentist.\r\n */\r\nexport function* watchAuthorizeDentist() {\r\n yield takeEvery(AUTHORIZE_DENTIST, getToken,);\r\n}\r\n\r\nconst authorizeDentistAsync = async (token: string) => {\r\n return await authorizeDentist(token);\r\n};\r\n\r\nfunction* getToken(action: any): any {\r\n const { token, history } = action.payload;\r\n console.log('------------function* getToken--', 'token', token);\r\n try {\r\n const response = yield call(authorizeDentistAsync, token);\r\n\r\n const user: IUser = {\r\n id: response.data.id,\r\n email: response.data.email,\r\n username: response.data.name,\r\n nickName: response.data.nickName,\r\n picture: response.data.picture,\r\n emailVerified: response.data.emailVerified,\r\n status: response.data.status,\r\n role: response.data.userType,\r\n };\r\n\r\n if (user.username && user.email) {\r\n const sesToken = response.data.tokenData.access_token;\r\n if (user.emailVerified) {\r\n\r\n setCurrentUser(user);\r\n setValue(process.env.REACT_APP_USER_SESSION!, sesToken);\r\n yield put(authorizeDentistSuccess(user));\r\n\r\n if (userRoleDentist(user.role)) {\r\n history.push(`${RouteRegistry.dentist.path}${RouteRegistry.dentist.subroutes.dentistChat.path}`);\r\n } else {\r\n const clientIdentity = Cookies.get('clientIdentity');\r\n if (clientIdentity && user.email) {\r\n Cookies.remove('clientIdentity');\r\n const obj: any = { clientIdentity, email: user.email }\r\n const chatHistory = getChatHistory(obj);\r\n }\r\n history.push(`${RouteRegistry.clientChat.path}`);\r\n }\r\n } else\r\n authSignOutEmailNotVarified()\r\n } else\r\n initOAuthSignOut();\r\n } catch (error) {\r\n logDebug(\">>> Authorizing dentist failed1\", null);\r\n history.push(`${RouteRegistry.landing.path}`);\r\n\r\n }\r\n}\r\n\r\n/**\r\n * BEGIN: Signout\r\n */\r\nexport function* watchSignout() {\r\n yield takeEvery(SIGNOUT, endCurrentUserSession);\r\n}\r\n\r\nfunction* endCurrentUserSession(action: any): any {\r\n // const user = getCurrentUser();\r\n const history = action.payload;\r\n console.log('endCurrentUserSession');\r\n setCurrentUser(null);\r\n removeValue(process.env.REACT_APP_USER_SESSION!);\r\n removeValue(process.env.REACT_APP_USER_INFO!);\r\n // if (user?.role === UserRole.DENTIST) {\r\n window.open(\r\n process.env.REACT_APP_SMYLOR_URL,\r\n \"_self\"\r\n );\r\n // initOAuthSignOut();\r\n // } else {\r\n\r\n // }\r\n}\r\n/**\r\n * END: Signout\r\n */\r\n\r\n/**\r\n * CHECK CHAT HISTORY\r\n */\r\nexport function* checkUnsavedChatHistory() {\r\n yield takeEvery(CHECK_CHAT_HISTORY, checkChatHistory);\r\n}\r\n\r\nfunction* checkChatHistory() {\r\n try {\r\n const strSession = Cookies.get('u-in');\r\n const User = strSession ? JSON.parse(strSession) : null;\r\n const clientIdentity = Cookies.get('dentistIdentity');\r\n if (clientIdentity && User.email) {\r\n Cookies.remove('dentistIdentity');\r\n const obj = {\r\n clientIdentity,\r\n email: User.email\r\n }\r\n const updatedChat = getChatHistory(obj);\r\n }\r\n\r\n\r\n } catch (error) {\r\n logDebug(\">>> Authorizing dentist failed\", null);\r\n }\r\n}\r\n/*\r\nEND : CHAT HISTORY\r\n/\r\n\r\n/**\r\n * BEGIN: Initialize user\r\n */\r\nexport function* watchInitUser() {\r\n yield takeEvery(INIT_USER, initUser);\r\n}\r\n\r\nfunction* initUser(action: any): any {\r\n const user = action.payload;\r\n if (!user) {\r\n yield put(initUserStatus(false, null));\r\n } else if (user && !user.username && !user.email) {\r\n setCurrentUser(null);\r\n removeValue(process.env.REACT_APP_USER_SESSION!);\r\n removeValue(process.env.REACT_APP_USER_ROLE!);\r\n\r\n if (userRoleDentist(user?.role)) {\r\n initOAuthSignOut();\r\n } else {\r\n window.location.replace(\"/\");\r\n }\r\n } else {\r\n setCurrentUser(user)\r\n yield put(initUserStatus(true, user));\r\n }\r\n\r\n}\r\n\r\n/*\r\nEND : Initialize user\r\n/\r\n/**\r\n * BEGIN: Get User Id\r\n */\r\nexport function* watchUserIdUpdate() {\r\n yield takeEvery(GET_USER_ID, userIdUpdate);\r\n}\r\n\r\nconst userIdUpdateAsync = async (data: string) => {\r\n return await getUpdateUserIdAPI(data);\r\n};\r\n\r\nfunction* userIdUpdate(action: any): any {\r\n\r\n try {\r\n const res = yield call(userIdUpdateAsync, action.payload);\r\n if (res) {\r\n yield put(setUserId(res.data))\r\n };\r\n } catch (error) {\r\n logDebug(\">>> update status failed\", null);\r\n }\r\n}\r\n/*\r\nEND : Get User Id\r\n/\r\n\r\n/**\r\n * BEGIN: status update\r\n */\r\nexport function* watchstatusUpdate() {\r\n yield takeEvery(STATUS_CHANGED, statusUpdate);\r\n}\r\n\r\nconst statusUpdateAsync = async (data: any) => {\r\n return await updatedentistStatus(data);\r\n};\r\n\r\nfunction* statusUpdate(action: any): any {\r\n const user = getCurrentUser();\r\n const statusData = { email: user?.email, status: action.payload.key, isReset: action.payload.isReset }\r\n try {\r\n const res = yield call(statusUpdateAsync, statusData);\r\n if (res) {\r\n yield put(userStatusSuccess(action.payload))\r\n };\r\n } catch (error) {\r\n logDebug(\">>> update status failed\", null);\r\n }\r\n}\r\n/*\r\nEND : status update\r\n/\r\n\r\n/**\r\n * BEGIN: GET CURRENT STATUS\r\n */\r\n\r\nexport function* watchGetCurrentStatus() {\r\n yield takeEvery(GET_STATUS, getCurrentStatus);\r\n}\r\n\r\nconst getCurrentStatusAsync = async (data: any) => {\r\n return await getCurrentDentistStatus(data);\r\n};\r\n\r\nfunction* getCurrentStatus(action: any): any {\r\n const user = getCurrentUser();\r\n try {\r\n const res = yield call(getCurrentStatusAsync, user?.id);\r\n if (res) {\r\n yield put(getUserStatusSuccess(res.data));\r\n };\r\n } catch (error) {\r\n logDebug(\">>> get current status failed\", null);\r\n }\r\n}\r\nexport default function* rootSaga() {\r\n yield all([\r\n fork(watchAuthorizeDentist),\r\n fork(watchSignout),\r\n fork(watchInitUser),\r\n fork(checkUnsavedChatHistory),\r\n fork(watchstatusUpdate),\r\n fork(watchGetCurrentStatus),\r\n fork(watchUserIdUpdate),\r\n ]);\r\n}\r\n","import { all, call, fork, put, takeEvery } from \"redux-saga/effects\";\r\n\r\nimport { getClientsSuccess, getDentistsSuccess, updateChatBotStatusSuccess } from \"./actions\";\r\nimport { getClientsByDentistId, updateChatBotStatusAPI } from \"../../api/dentist\";\r\nimport { cerateConversationAPI, getDentists } from \"../../api/client\";\r\nimport { getCurrentUser, logDebug, userRoleDentist } from \"../../helpers/utils\";\r\n\r\nimport { GET_CLIENTS, GET_DENTISTS, UPDATE_CHATBOT_STATUS } from \"../actions\";\r\n\r\nimport { IUser } from \"../../models/user\";\r\nimport { UserRole } from \"../../constants/user-role\";\r\n\r\n/**\r\n * \r\n */\r\nexport function* watchGetDentists() {\r\n yield takeEvery(GET_DENTISTS, getDentistsFromAPI);\r\n}\r\n\r\nconst getDentistsAsync = async () => {\r\n const user: IUser | null = getCurrentUser();\r\n\r\n if (user?.role === UserRole.CLIENT) {\r\n console.log('UserRole.CLIENT');\r\n return await getDentists(user!.email);\r\n }\r\n else if (userRoleDentist(user!.role)) {\r\n console.log('UserRole.DENTIST');\r\n return await getClientsByDentistId(user!.email);\r\n }\r\n};\r\n\r\nfunction* getDentistsFromAPI(): any {\r\n try {\r\n const response = yield call(getDentistsAsync);\r\n const dentists = response.data\r\n .filter((d: any) => d.name)\r\n .map((p: any) => ({\r\n id: p.id,\r\n name: p.name,\r\n email: p.email,\r\n image: p.picture,\r\n dateTime: p.dateTime,\r\n messageCount: p.messageCount,\r\n status:p.status,\r\n dentistId: p?.dentistId\r\n }));\r\n\r\n yield put(getDentistsSuccess(dentists));\r\n } catch (error) {\r\n logDebug(\">>> Fetching dentist list failed\", null);\r\n }\r\n}\r\n\r\n/**\r\n * \r\n */\r\nexport function* watchGetClients() {\r\n yield takeEvery(GET_CLIENTS, getClientsFromAPI);\r\n}\r\n\r\nfunction* getClientsFromAPI(): any {\r\n try {\r\n const response = yield call(getClientsAsync);\r\n const clients = response.data.map((p: any) => ({\r\n id: p.id,\r\n name: p.name,\r\n email: p.email,\r\n image: p.picture,\r\n dateTime: p.dateTime,\r\n messageCount: p.messageCount,\r\n isBotEnabled: p.isBotEnabled,\r\n isBotManuallyEnabled: p.isBotManuallyEnabled,\r\n whatsAppNumber: p.whatsAppNumber,\r\n isWhatsApp: p.isWhatsApp\r\n }));\r\n yield put(getClientsSuccess(clients));\r\n } catch (error) {\r\n logDebug(\">>> Fetching client list failed\", error);\r\n }\r\n}\r\n\r\nconst getClientsAsync = async () => {\r\n const user: IUser | null = getCurrentUser();\r\n\r\n return await getClientsByDentistId(user!.email);\r\n};\r\n\r\n// update chatBot status\r\n\r\nexport function* watchUpdateChatBotStatus() {\r\n yield takeEvery(UPDATE_CHATBOT_STATUS, updateChatBotStatusData);\r\n};\r\n\r\nconst updateChatBotStatusAsync = async (data: any) => {\r\n return await updateChatBotStatusAPI(data);\r\n};\r\n\r\nfunction* updateChatBotStatusData(action: any): any {\r\n try {\r\n const res = yield call(updateChatBotStatusAsync, action.payload);\r\n yield put(updateChatBotStatusSuccess(res.data));\r\n } catch (error) {\r\n logDebug(\">>> update ChatBot status Failed\", null);\r\n }\r\n}\r\n\r\nexport default function* rootSaga() {\r\n yield all([\r\n fork(watchGetDentists),\r\n fork(watchGetClients),\r\n fork(watchUpdateChatBotStatus),\r\n ]);\r\n}\r\n","import { EventChannel } from \"redux-saga\";\r\nimport {\r\n all,\r\n call,\r\n fork,\r\n put,\r\n select,\r\n take,\r\n takeEvery,\r\n takeLatest,\r\n} from \"redux-saga/effects\";\r\n\r\nimport { initConversationSrvc } from \"../../services/twilio-service\";\r\nimport { getConversationDentist } from \"../../api/dentist\";\r\nimport { cerateConversationAPI, createConversation, enableChatBotAPI } from \"../../api/client\";\r\nimport { getAccessTokenSuccess, initConversationSuccess } from \"./actions\";\r\nimport { getCurrentUser, logDebug, userRoleDentist } from \"../../helpers/utils\";\r\nimport { getAccessToken, getCurrConversation } from \"./reducer\";\r\n\r\nimport { INIT_CONVERSATION, GET_ACCESS_TOKEN_SUCCESS, SET_ENABLE_SMYLOR_BOT, CREATE_CONVERSATION } from \"../actions\";\r\nimport { UserRole } from \"../../constants/user-role\";\r\nimport { setDefaulDentist } from \"../core/actions\";\r\nimport { getDentists } from \"../dentist/actions\";\r\n\r\nlet createConEventChannel: EventChannel;\r\n\r\n/**\r\n * Watches for the GET_ACCESS_TOKEN_SUCCESS action\r\n */\r\nexport function* watchAccessTokenFetched() {\r\n yield takeLatest(GET_ACCESS_TOKEN_SUCCESS, handleConversationCreated);\r\n}\r\n\r\nfunction* handleConversationCreated(action: any): any {\r\n const { accessToken, clientIdentity, dentistIdentity } = action.payload;\r\n\r\n createConEventChannel = yield call(initConversationSrvcAsync, accessToken);\r\n\r\n while (true) {\r\n try {\r\n const res = yield take(createConEventChannel);\r\n yield put(\r\n initConversationSuccess({\r\n ...res,\r\n clientIdentity,\r\n dentistIdentity,\r\n })\r\n );\r\n } catch (error: any) {\r\n logDebug(\">>> Error\", error);\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Requests a new Twilio conversation object\r\n * @param accessToken string\r\n * @returns \r\n */\r\nconst initConversationSrvcAsync = async (accessToken: string) => {\r\n return await initConversationSrvc(accessToken);\r\n};\r\n\r\n/**\r\n * Watches for INIT_CONVERSATION action\r\n */\r\nexport function* watchInitConversation() {\r\n yield takeLatest(INIT_CONVERSATION, getToken);\r\n}\r\n\r\nconst getTokenAsync = async (\r\n obj: { conversationId: number, culture: string },\r\n userId: number | undefined,\r\n role: number,\r\n email?: string | null\r\n) => {\r\n\r\n if (role === UserRole.CLIENT) {\r\n return await createConversation({\r\n clientId: parseInt(`${userId}`),\r\n // dentistId: participantId,\r\n clientEmail: email,\r\n id: obj.conversationId,\r\n culture: obj.culture\r\n });\r\n } else if (userRoleDentist(role)) {\r\n return await getConversationDentist({\r\n // clientId: participantId,\r\n dentistId: parseInt(`${userId}`),\r\n id: obj.conversationId\r\n });\r\n }\r\n};\r\n\r\n/**\r\n * Starts initializing a conversation\r\n * @param action \r\n */\r\nfunction* getToken(action: any): any {\r\n const user = getCurrentUser();\r\n\r\n try {\r\n // Ends the active Twilio conversation if any\r\n const conversationClient = yield select(getCurrConversation);\r\n if (conversationClient) {\r\n conversationClient.shutdown();\r\n }\r\n\r\n const chatId = user?.role === UserRole.CLIENT\r\n ? `C${user!.chatUserId}D${action.payload.conversationId}`\r\n : `D${user!.id}C${action.payload.conversationId}`;\r\n\r\n let clientIdentity;\r\n let dentistIdentity;\r\n let accessToken;\r\n\r\n // Checks for a previously initialized chat details.\r\n const chatFound = yield select(getAccessToken, chatId);\r\n\r\n if (chatFound) {\r\n // Chat details exists.\r\n clientIdentity = chatFound.clientIdentity;\r\n dentistIdentity = chatFound.dentistIdentity;\r\n accessToken = chatFound.accessToken;\r\n } else {\r\n // Get a new access token.\r\n const userId = user?.role === UserRole.CLIENT ? user!.chatUserId : user!.id;\r\n\r\n const response = yield call(\r\n getTokenAsync,\r\n action.payload,\r\n userId,\r\n user!.role,\r\n user!.email\r\n );\r\n\r\n accessToken = response.data.accessToken;\r\n clientIdentity = response.data.clientIdentity;\r\n dentistIdentity = response.data.dentistIdentity;\r\n }\r\n\r\n yield put(\r\n getAccessTokenSuccess({ accessToken, clientIdentity, dentistIdentity, chatId })\r\n );\r\n\r\n // createConEventChannel = yield call(\r\n // initConversationSrvcAsync,\r\n // accessToken\r\n // );\r\n\r\n // while (true) {\r\n // try {\r\n // const res = yield take(createConEventChannel);\r\n // yield put(\r\n // initConversationSuccess({\r\n // ...res,\r\n // clientIdentity: clientIdentity,\r\n // dentistIdentity: dentistIdentity,\r\n // })\r\n // );\r\n // } catch (error: any) {\r\n // logDebug(\">>> Error\", error);\r\n // }\r\n // }\r\n } catch (error) {\r\n logDebug(\">>> Fetching dentist list failed\", error);\r\n }\r\n}\r\n\r\n/**\r\n * ENABLE CHATT BOT FROM CLIENT SIDE\r\n */\r\nexport function* watchEnableChatBot() {\r\n yield takeEvery(SET_ENABLE_SMYLOR_BOT, enableChatBot);\r\n};\r\n\r\nconst enableChatBotAsync = async (data: { conversationId: number, culture: string }) => {\r\n return await enableChatBotAPI(data);\r\n};\r\n\r\nfunction* enableChatBot(action: any): any {\r\n try {\r\n yield call(enableChatBotAsync, action.payload);\r\n } catch (error) {\r\n logDebug(\">>> Enable chatbot fialed\", null);\r\n }\r\n};\r\n\r\n//create new chat\r\n\r\nexport function* watchCreateNewConveration() {\r\n yield takeEvery(CREATE_CONVERSATION, createNewConversation);\r\n};\r\n\r\nconst createNewChatAsync = async (data: any) => {\r\n return await cerateConversationAPI(data);\r\n};\r\n\r\nfunction* createNewConversation(action: any): any {\r\n try {\r\n const res = yield call(createNewChatAsync, action.payload);\r\n yield put(setDefaulDentist(res.data.conversationId));\r\n yield put(getDentists());\r\n } catch (error) {\r\n logDebug(\">>> update ChatBot status Failed\", null);\r\n }\r\n};\r\n\r\nexport default function* rootSaga() {\r\n yield all([\r\n fork(watchInitConversation),\r\n fork(watchAccessTokenFetched),\r\n fork(watchEnableChatBot),\r\n fork(watchCreateNewConveration),\r\n ]);\r\n}","import { all, call, fork, put, takeEvery } from \"redux-saga/effects\";\r\n\r\nimport { createTemplateSuccess, deleteTemplateCategorySuccess, deleteTemplateSuccess, getCategories, getCategoriesSuccess, getTagListSuccess, getTemplatesSuccess, getWhatsAppTemplateSuccess, translateTemplateDataSuccess, updateTemplateCategorySuccess, updateTemplateSuccess } from \"./actions\";\r\nimport {\r\n getCurrentUser,\r\n logDebug,\r\n} from \"../../helpers/utils\";\r\n\r\nimport { DELETE_TEMPLATE, GET_TEMPLATES, CREATE_UPDATE_TEMPLATE, SORT_TEMPLATES, GET_TEMPLATES_CATEGORIES, UPDATE_TEMPLATES_CATEGORY, DELETE_TEMPLATES_CATEGORY, GET_TAGLIST, GET_WHATSAPP_TEMPLATE, SEND_WHATSAPP_TEMPLATE, TRANSLATE_TEMPLATE_DATA } from \"../actions\";\r\nimport { listTemplates, deleteTemplateById, createTemplate, updateTemplate, sortTemplatesOrder, listCategories, updateTemplateCategoryAPI, deleteTemplateCategoryAPI, listTaglist, whatsappTempalteAPI, sendWhatsappTempalteAPI, translateTemplateAPI } from \"../../api/dentist\";\r\nimport { ITemplate } from \"../../models/template\";\r\nimport { setDefaulDentist } from \"../core/actions\";\r\n\r\n\r\n/**\r\n * BEGIN: Get templates\r\n */\r\nexport function* watchGetTemplates() {\r\n yield takeEvery(GET_TEMPLATES, getTemplateList);\r\n}\r\n\r\nconst getTemplatesAsync = async (culture: string) => {\r\n const user = getCurrentUser();\r\n return await listTemplates(user!.id, culture);\r\n};\r\n\r\nfunction* getTemplateList(action: any): any {\r\n try {\r\n const res = yield call(getTemplatesAsync, action.payload);\r\n yield put(getTemplatesSuccess(res.data));\r\n } catch (error) {\r\n logDebug(\">>> Authorizing dentist failed\", null);\r\n }\r\n};\r\n\r\n/**\r\n * BEGIN: Delete template\r\n */\r\nexport function* watchDeleteTemplate() {\r\n yield takeEvery(DELETE_TEMPLATE, deleteTemplate);\r\n};\r\n\r\nconst deleteTemplateAsync = async (id: number) => {\r\n return await deleteTemplateById(id);\r\n};\r\n\r\nfunction* deleteTemplate(action: any): any {\r\n try {\r\n const res = yield call(deleteTemplateAsync, action.payload);\r\n yield put(deleteTemplateSuccess(action.payload));\r\n } catch (error) {\r\n logDebug(\">>> Deleting template failed\", null);\r\n }\r\n};\r\n\r\n/**\r\n * BEGIN: Create or update template\r\n */\r\nexport function* watchCreateOrUpdateTemplate() {\r\n yield takeEvery(CREATE_UPDATE_TEMPLATE, createOrupdateTemplate);\r\n};\r\n\r\nconst createTemplateAsync = async (template: any) => {\r\n return await createTemplate(template);\r\n};\r\n\r\nconst updateTemplateAsync = async (template: any) => {\r\n return await updateTemplate(template);\r\n};\r\n\r\nfunction* createOrupdateTemplate(action: any): any {\r\n try {\r\n const user = getCurrentUser();\r\n if (action.payload.templateId) {\r\n const res = yield call(updateTemplateAsync, { ...action.payload, dentistId: user!.id });\r\n yield put(updateTemplateSuccess(res.data));\r\n } else {\r\n const res = yield call(createTemplateAsync, { ...action.payload, dentistId: user!.id });\r\n yield put(createTemplateSuccess(res.data));\r\n }\r\n } catch (error) {\r\n logDebug(\">>> Creating / updating template failed\", null);\r\n }\r\n};\r\n\r\n/**\r\n * BEGIN: Create or update template\r\n */\r\nexport function* watchSortTemplates() {\r\n yield takeEvery(SORT_TEMPLATES, sortTemplates);\r\n};\r\n\r\nconst sortTemplatesAsync = async (data: any) => {\r\n return await sortTemplatesOrder(data);\r\n};\r\n\r\nfunction* sortTemplates(action: any): any {\r\n try {\r\n const templateIdsArr = action.payload.map((item: ITemplate) => item.id);\r\n yield call(sortTemplatesAsync, { templateIds: templateIdsArr });\r\n } catch (error) {\r\n logDebug(\">>> Sorting templates failed\", null);\r\n }\r\n};\r\n\r\n/**\r\n * BEGIN: Get Categories\r\n */\r\nexport function* watchGetCategories() {\r\n yield takeEvery(GET_TEMPLATES_CATEGORIES, getCategoriesList);\r\n};\r\n\r\nconst getCategoriesAsync = async (culture: string) => {\r\n const user = getCurrentUser();\r\n return await listCategories(user!.id, culture);\r\n};\r\n\r\nfunction* getCategoriesList(action: any): any {\r\n try {\r\n const res = yield call(getCategoriesAsync, action.payload);\r\n yield put(getCategoriesSuccess(res.data));\r\n } catch (error) {\r\n logDebug(\">>> get Categories dentist failed\", null);\r\n }\r\n};\r\n\r\n// update category name\r\n\r\nexport function* watchUpdateTemplateCategory() {\r\n yield takeEvery(UPDATE_TEMPLATES_CATEGORY, updateTemplateCategoy);\r\n};\r\n\r\nconst updateTemlateCategoryAsync = async (data: any) => {\r\n return await updateTemplateCategoryAPI(data);\r\n};\r\n\r\nfunction* updateTemplateCategoy(action: any): any {\r\n\r\n try {\r\n const res = yield call(updateTemlateCategoryAsync, action.payload);\r\n yield put(updateTemplateCategorySuccess(res.data));\r\n } catch (error) {\r\n logDebug(\">>> update Category dentist failed\", null);\r\n }\r\n}\r\n\r\n// delete category name\r\nexport function* watchDeleteTemplateCategory() {\r\n yield takeEvery(DELETE_TEMPLATES_CATEGORY, deleteTemplateCategory);\r\n};\r\n\r\nconst deleteTemplateCategoryAsync = async (data: any) => {\r\n return await deleteTemplateCategoryAPI(data);\r\n};\r\n\r\nfunction* deleteTemplateCategory(action: any): any {\r\n\r\n try {\r\n const res = yield call(deleteTemplateCategoryAsync, action.payload);\r\n yield put(deleteTemplateCategorySuccess(res.data));\r\n } catch (error) {\r\n logDebug(\">>> update Category dentist failed\", null);\r\n }\r\n};\r\n\r\n/**\r\n * BEGIN: Get taglist\r\n */\r\nexport function* watchGetTagList() {\r\n yield takeEvery(GET_TAGLIST, getTagListFunc);\r\n}\r\n\r\nconst getTagListAsync = async () => {\r\n return await listTaglist();\r\n};\r\n\r\nfunction* getTagListFunc(action: any): any {\r\n try {\r\n const res = yield call(getTagListAsync);\r\n yield put(getTagListSuccess(res.data));\r\n } catch (error) {\r\n logDebug(\">>> Authorizing dentist failed\", null);\r\n }\r\n};\r\n\r\n// get whatsapptemplate\r\nexport function* watchGetWhatTemplate() {\r\n yield takeEvery(GET_WHATSAPP_TEMPLATE, getWhatsappTemplate);\r\n};\r\n\r\nconst getWhatTemplateAsync = async () => {\r\n return await whatsappTempalteAPI();\r\n};\r\n\r\nfunction* getWhatsappTemplate(action: any): any {\r\n try {\r\n const res = yield call(getWhatTemplateAsync);\r\n yield put(getWhatsAppTemplateSuccess(res?.data[0]));\r\n } catch (error) {\r\n logDebug(\">>> update ChatBot status Failed\", null);\r\n }\r\n}\r\n\r\n// send whatsapptemplate\r\nexport function* watchSendWhatTemplate() {\r\n yield takeEvery(SEND_WHATSAPP_TEMPLATE, sendWhatAppTemplate);\r\n};\r\n\r\nconst sendWhatTemplateAsync = async (data: any) => {\r\n return await sendWhatsappTempalteAPI(data);\r\n};\r\n\r\nfunction* sendWhatAppTemplate(action: any): any {\r\n console.log('sendWhatAppTemplate', action)\r\n try {\r\n const res = yield call(sendWhatTemplateAsync, action.payload);\r\n // yield put(setDefaulDentist(res.data.conversationId));\r\n } catch (error) {\r\n logDebug(\">>> update ChatBot status Failed\", null);\r\n }\r\n};\r\n\r\n// translate Template data\r\nexport function* watchTranslateTemplate() {\r\n yield takeEvery(TRANSLATE_TEMPLATE_DATA, translateTemplate);\r\n};\r\n\r\nconst translateTemplateAsync = async (data: any) => {\r\n const { translateId, ...translateData } = data\r\n return await translateTemplateAPI(translateData);\r\n};\r\n\r\nfunction* translateTemplate(action: any): any {\r\n try {\r\n const res = yield call(translateTemplateAsync, action.payload);\r\n yield put(translateTemplateDataSuccess(res.data));\r\n } catch (error) {\r\n logDebug(\">>> update ChatBot status Failed\", null);\r\n }\r\n};\r\n\r\nexport default function* rootSaga() {\r\n yield all([\r\n fork(watchGetTemplates),\r\n fork(watchGetTagList),\r\n fork(watchDeleteTemplate),\r\n fork(watchCreateOrUpdateTemplate),\r\n fork(watchSortTemplates),\r\n fork(watchGetCategories),\r\n fork(watchUpdateTemplateCategory),\r\n fork(watchDeleteTemplateCategory),\r\n fork(watchGetWhatTemplate),\r\n fork(watchSendWhatTemplate),\r\n fork(watchTranslateTemplate),\r\n ]);\r\n}\r\n","import axiosInstance from \"./api-controller\";\r\n\r\n// Get Active Chat Users\r\nexport const getActiveChatUsers = async (conversationId: number | null) => {\r\n try {\r\n const response = await axiosInstance.get(\r\n \"/Participant/GetParticipantsInChat/\" + conversationId\r\n );\r\n return response;\r\n } catch (e) {\r\n throw e;\r\n }\r\n};\r\n\r\n// Delete Chat User\r\nexport const deletActiveChatUser = async (\r\n conversationId: number | null,\r\n participantId: number | null\r\n) => {\r\n try {\r\n const response = await axiosInstance.post(\r\n \"/Participant/RemoveParticipantsInChat/\" +\r\n conversationId +\r\n \"/\" +\r\n participantId\r\n );\r\n return response;\r\n } catch (e) {\r\n throw e;\r\n }\r\n};\r\n\r\n// Invite Chat User\r\nexport const inviteAddChatUser = async (obj: any) => {\r\n try {\r\n const response = await axiosInstance.post(\"/Participant/Invite\", obj);\r\n return response;\r\n } catch (e) {\r\n throw e;\r\n }\r\n};\r\n","import { all, call, delay, fork, put, takeEvery } from \"redux-saga/effects\";\r\n\r\nimport { activeChatUsersSuccess } from \"./actions\";\r\nimport { logDebug, getCurrentUser } from \"../../helpers/utils\";\r\n\r\nimport {\r\n ADD_CHAT_USER,\r\n GET_ACTIVE_CHAT_USERS,\r\n REMOVE_CHAT_USER,\r\n} from \"../actions\";\r\nimport {\r\n getActiveChatUsers,\r\n deletActiveChatUser,\r\n inviteAddChatUser,\r\n} from \"../../api/addUser\";\r\nimport { IAddChatUser } from \"../../models/addUser\";\r\n// import { ITemplate } from \"../../models/template\";\r\n\r\n/**\r\n * BEGIN: Get Active Chat Users\r\n */\r\nexport function* watchGetActiveChatUsers() {\r\n yield takeEvery(GET_ACTIVE_CHAT_USERS, getActiveChatUsersList);\r\n}\r\nconst getActiveChatUsersAsync = async (id: number) => {\r\n return await getActiveChatUsers(id);\r\n};\r\n\r\nfunction* getActiveChatUsersList(action: any): any {\r\n try {\r\n const res = yield call(getActiveChatUsersAsync, action.payload);\r\n yield put(activeChatUsersSuccess(res.data));\r\n } catch (error) {\r\n logDebug(\">>> GET Active Users List Failed\", null);\r\n }\r\n}\r\n\r\n// /**\r\n// * BEGIN: Remove Chat User\r\nexport function* watchDeleteActiveChatUser() {\r\n yield takeEvery(REMOVE_CHAT_USER, getUpdatedChatUsersList);\r\n}\r\n\r\nconst deleteActiveChatUserAsync = async (data: {\r\n conversationId: number;\r\n participantId: number;\r\n}) => {\r\n return await deletActiveChatUser(data.conversationId, data.participantId);\r\n};\r\n\r\nfunction* getUpdatedChatUsersList(action: any): any {\r\n try {\r\n const res = yield call(deleteActiveChatUserAsync, action.payload);\r\n yield put(activeChatUsersSuccess(res.data));\r\n } catch (error) {\r\n logDebug(\">>> GET updated Active Users List Failed\", null);\r\n }\r\n}\r\n\r\n// /**\r\n// * BEGIN: Add Chat User\r\n// */\r\nexport function* watchAddActiveChatUser() {\r\n yield takeEvery(ADD_CHAT_USER, getUpdatedChatUsers);\r\n}\r\n\r\nconst addActiveChatUserAsync = async (data: IAddChatUser) => {\r\n const user = getCurrentUser();\r\n const obj: IAddChatUser = {\r\n conversationId: data.conversationId,\r\n userType: user?.role,\r\n participantEmail: data.participantEmail,\r\n culture: data.culture\r\n };\r\n return await inviteAddChatUser(obj);\r\n};\r\n\r\nfunction* getUpdatedChatUsers(action: any): any {\r\n try {\r\n const res = yield call(addActiveChatUserAsync, action.payload);\r\n yield put(activeChatUsersSuccess(res.data));\r\n } catch (error) {\r\n logDebug(\">>> GET Add Active User to List Failed\", null);\r\n }\r\n}\r\n\r\nexport default function* rootSaga() {\r\n yield all([\r\n fork(watchGetActiveChatUsers),\r\n fork(watchDeleteActiveChatUser),\r\n fork(watchAddActiveChatUser),\r\n ]);\r\n}\r\n","import { IGetStatusMessageData, IStatusMessageData } from '../models/statusMessage';\r\nimport axiosInstance from './api-controller';\r\n\r\nconst addStatusMessageApi = async (obj: IStatusMessageData) => {\r\n try {\r\n const response = await axiosInstance.post(`/messageTemplate/add`, obj);\r\n return response;\r\n } catch (e) {\r\n throw e;\r\n }\r\n};\r\n\r\nconst getStatusMessageApi = async ({ culture, dentistId, status }: IGetStatusMessageData) => {\r\n try {\r\n const response = await axiosInstance.get(`/MessageTemplate/getMessage/${dentistId}/${culture}/${status}`);\r\n return response;\r\n } catch (e) {\r\n throw e;\r\n }\r\n};\r\n\r\nconst getLanguageListApi = async () => {\r\n try {\r\n const response = await axiosInstance.get(`/Language/LanguagesList`);\r\n return response;\r\n } catch (e) {\r\n throw e;\r\n }\r\n};\r\n\r\nexport { addStatusMessageApi, getStatusMessageApi, getLanguageListApi }","import { all, call, fork, put, takeEvery } from \"redux-saga/effects\";\r\nimport { addStatusMessageApi, getLanguageListApi, getStatusMessageApi } from \"../../api/statusMessage\";\r\n\r\nimport {\r\n getCurrentUser,\r\n logDebug,\r\n} from \"../../helpers/utils\";\r\nimport { IGetStatusMessageData, IStatusMessageData } from \"../../models/statusMessage\";\r\n\r\nimport { ADD_STATUS_MESSAGE, GET_LANGUAGE_LIST, GET_STATUS_MESSAGE } from \"../actions\";\r\nimport { addStatusMessageSuccess, getLanguageListSuccess, getStatusMessageSuccess } from \"./actions\";\r\n\r\n/**\r\n * BEGIN: set status message update\r\n */\r\nexport function* watchsetStatusMessage() {\r\n yield takeEvery(ADD_STATUS_MESSAGE, setStatusMessage);\r\n}\r\n\r\nconst setStatusMessageAsync = async (data: any) => {\r\n return await addStatusMessageApi(data);\r\n};\r\n\r\nfunction* setStatusMessage(action: any): any {\r\n const user = getCurrentUser();\r\n const statusMessageData: IStatusMessageData = { dentistId: user?.id, ...action.payload }\r\n try {\r\n const res = yield call(setStatusMessageAsync, statusMessageData);\r\n if (res) {\r\n yield put(addStatusMessageSuccess(res.data))\r\n };\r\n } catch (error) {\r\n logDebug(\">>> Set status Message failed\", null);\r\n }\r\n}\r\n/**\r\n * End: set status message update\r\n */\r\n/**\r\n * BEGIN: get availble status message \r\n */\r\nexport function* watchGetStatusMessage() {\r\n yield takeEvery(GET_STATUS_MESSAGE, getStatusMessage);\r\n}\r\n\r\nconst getStatusMessageAsync = async (data: any) => {\r\n return await getStatusMessageApi(data);\r\n};\r\n\r\nfunction* getStatusMessage(action: any): any {\r\n const user = getCurrentUser();\r\n const getStatusMessageData: IGetStatusMessageData = { dentistId: user?.id, ...action.payload }\r\n try {\r\n const res = yield call(getStatusMessageAsync, getStatusMessageData);\r\n if (res) {\r\n yield put(getStatusMessageSuccess(res.data))\r\n };\r\n } catch (error) {\r\n logDebug(\">>> update status failed\", null);\r\n }\r\n}\r\n\r\n/**\r\n * End: get availble status message \r\n */\r\n/**\r\n * BEGIN: get languageList\r\n */\r\nexport function* watchGetLangugeList() {\r\n yield takeEvery(GET_LANGUAGE_LIST, getLanguageList);\r\n}\r\n\r\nconst getLanguageListAsync = async () => {\r\n return await getLanguageListApi();\r\n};\r\n\r\nfunction* getLanguageList() : any {\r\n try {\r\n const res = yield call(getLanguageListAsync);\r\n if (res) {\r\n yield put(getLanguageListSuccess(res.data))\r\n }; \r\n } catch (error) {\r\n logDebug(\">>> update status failed\", null);\r\n }\r\n}\r\n\r\nexport default function* rootSaga() {\r\n yield all([fork(watchsetStatusMessage), fork(watchGetStatusMessage), fork(watchGetLangugeList)]);\r\n}\r\n","import axiosInstance from './api-controller';\r\n\r\n/**\r\n * Get Selected Language Lsit.\r\n */\r\nconst selectedLanguageApi = async (cultureCode: string ) => {\r\n try {\r\n const response = await axiosInstance.get('/Language/GetTranslations/' + cultureCode);\r\n return response;\r\n } catch (e) {\r\n throw e;\r\n }\r\n}\r\n\r\nexport { selectedLanguageApi }","import { all, call, fork, put, takeEvery } from \"redux-saga/effects\";\r\nimport { selectedLanguageApi } from \"../../api/core\";\r\nimport { logDebug } from \"../../helpers/utils\";\r\nimport { GET_SELECTED_LANGUAGE_LIST } from \"../actions\";\r\nimport { getLanguageSelectedListSuccess } from \"./actions\";\r\n\r\n/**\r\n * BEGIN: Get Language List \r\n */\r\nexport function* watchGetSelectedLanguageList() {\r\n yield takeEvery(GET_SELECTED_LANGUAGE_LIST, getSelectedLanguageList);\r\n}\r\n\r\nconst getTemplatesAsync = async (data: any) => {\r\n return await selectedLanguageApi(data);\r\n};\r\n\r\nfunction* getSelectedLanguageList(action: any): any {\r\n try {\r\n const res = yield call(getTemplatesAsync, action.payload);\r\n yield put(getLanguageSelectedListSuccess(res.data));\r\n } catch (error) {\r\n logDebug(\">>> get Selected Language failed\", null);\r\n }\r\n};\r\n\r\n\r\n\r\nexport default function* rootSaga() {\r\n yield all([\r\n fork(watchGetSelectedLanguageList)\r\n ]);\r\n}\r\n","import { all } from \"redux-saga/effects\";\r\n\r\nimport authSagas from \"./auth/saga\";\r\nimport dentistSagas from \"./dentist/saga\";\r\nimport conversationSagas from \"./conversation/saga\";\r\nimport templatesSagas from \"./templates/saga\";\r\nimport addUserSaga from \"./addUser/saga\";\r\nimport statusMessagesSaga from \"./statusMessages/saga\";\r\nimport coreSaga from \"./core/saga\";\r\n\r\nexport default function* rootSaga(getState: any) {\r\n yield all([\r\n authSagas(),\r\n dentistSagas(),\r\n conversationSagas(),\r\n templatesSagas(),\r\n addUserSaga(),\r\n statusMessagesSaga(),\r\n coreSaga(),\r\n ]);\r\n}\r\n","import { createStore, applyMiddleware, compose } from 'redux';\r\nimport createSagaMiddleware from 'redux-saga';\r\nimport reducers from './reducers';\r\nimport sagas from './sagas';\r\nimport { composeWithDevTools } from 'redux-devtools-extension';\r\n\r\nconst sagaMiddleware = createSagaMiddleware();\r\n\r\nconst middlewares = [sagaMiddleware];\r\n\r\nexport function configureStore(initialState) {\r\n const store = createStore(reducers, initialState, composeWithDevTools(applyMiddleware(...middlewares)));\r\n\r\n sagaMiddleware.run(sagas);\r\n\r\n if (module.hot) {\r\n module.hot.accept('./reducers', () => {\r\n const nextRootReducer = require('./reducers');\r\n store.replaceReducer(nextRootReducer);\r\n });\r\n }\r\n\r\n return store;\r\n}","import React, { Component } from 'react';\r\nimport { Provider } from 'react-redux';\r\nimport Layout from './components/layout';\r\nimport AppRenderer from './app-renderer';\r\nimport { configureStore } from './redux/store';\r\nimport './app.scss';\r\nexport default class App extends Component {\r\n static displayName = App.name;\r\n\r\n render() {\r\n console.log('v_1.9.3');\r\n return (\r\n \r\n
\r\n \r\n {/* }>\r\n \r\n */}\r\n \r\n \r\n
\r\n
\r\n );\r\n }\r\n}","// This optional code is used to register a service worker.\r\n// register() is not called by default.\r\n\r\n// This lets the app load faster on subsequent visits in production, and gives\r\n// it offline capabilities. However, it also means that developers (and users)\r\n// will only see deployed updates on subsequent visits to a page, after all the\r\n// existing tabs open on the page have been closed, since previously cached\r\n// resources are updated in the background.\r\n\r\n// To learn more about the benefits of this model and instructions on how to\r\n// opt-in, read https://cra.link/PWA\r\n\r\nconst isLocalhost = Boolean(\r\n window.location.hostname === 'localhost' ||\r\n // [::1] is the IPv6 localhost address.\r\n window.location.hostname === '[::1]' ||\r\n // 127.0.0.0/8 are considered localhost for IPv4.\r\n window.location.hostname.match(/^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/)\r\n);\r\n\r\nexport function register(config) {\r\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\r\n // The URL constructor is available in all browsers that support SW.\r\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\r\n if (publicUrl.origin !== window.location.origin) {\r\n // Our service worker won't work if PUBLIC_URL is on a different origin\r\n // from what our page is served on. This might happen if a CDN is used to\r\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\r\n return;\r\n }\r\n\r\n window.addEventListener('load', () => {\r\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\r\n\r\n if (isLocalhost) {\r\n // This is running on localhost. Let's check if a service worker still exists or not.\r\n checkValidServiceWorker(swUrl, config);\r\n\r\n // Add some additional logging to localhost, pointing developers to the\r\n // service worker/PWA documentation.\r\n navigator.serviceWorker.ready.then(() => {\r\n console.log(\r\n 'This web app is being served cache-first by a service ' +\r\n 'worker. To learn more, visit https://cra.link/PWA'\r\n );\r\n });\r\n } else {\r\n // Is not localhost. Just register service worker\r\n registerValidSW(swUrl, config);\r\n }\r\n });\r\n }\r\n}\r\n\r\nfunction registerValidSW(swUrl, config) {\r\n navigator.serviceWorker\r\n .register(swUrl)\r\n .then((registration) => {\r\n registration.onupdatefound = () => {\r\n const installingWorker = registration.installing;\r\n if (installingWorker == null) {\r\n return;\r\n }\r\n installingWorker.onstatechange = () => {\r\n if (installingWorker.state === 'installed') {\r\n if (navigator.serviceWorker.controller) {\r\n // At this point, the updated precached content has been fetched,\r\n // but the previous service worker will still serve the older\r\n // content until all client tabs are closed.\r\n console.log(\r\n 'New content is available and will be used when all ' +\r\n 'tabs for this page are closed. See https://cra.link/PWA.'\r\n );\r\n\r\n // Execute callback\r\n if (config && config.onUpdate) {\r\n config.onUpdate(registration);\r\n }\r\n } else {\r\n // At this point, everything has been precached.\r\n // It's the perfect time to display a\r\n // \"Content is cached for offline use.\" message.\r\n console.log('Content is cached for offline use.');\r\n\r\n // Execute callback\r\n if (config && config.onSuccess) {\r\n config.onSuccess(registration);\r\n }\r\n }\r\n }\r\n };\r\n };\r\n })\r\n .catch((error) => {\r\n console.error('Error during service worker registration:', error);\r\n });\r\n}\r\n\r\nfunction checkValidServiceWorker(swUrl, config) {\r\n // Check if the service worker can be found. If it can't reload the page.\r\n fetch(swUrl, {\r\n headers: { 'Service-Worker': 'script' },\r\n })\r\n .then((response) => {\r\n // Ensure service worker exists, and that we really are getting a JS file.\r\n const contentType = response.headers.get('content-type');\r\n if (\r\n response.status === 404 ||\r\n (contentType != null && contentType.indexOf('javascript') === -1)\r\n ) {\r\n // No service worker found. Probably a different app. Reload the page.\r\n navigator.serviceWorker.ready.then((registration) => {\r\n registration.unregister().then(() => {\r\n window.location.reload();\r\n });\r\n });\r\n } else {\r\n // Service worker found. Proceed as normal.\r\n registerValidSW(swUrl, config);\r\n }\r\n })\r\n .catch(() => {\r\n console.log('No internet connection found. App is running in offline mode.');\r\n });\r\n}\r\n\r\nexport function unregister() {\r\n if ('serviceWorker' in navigator) {\r\n navigator.serviceWorker.ready\r\n .then((registration) => {\r\n registration.unregister();\r\n })\r\n .catch((error) => {\r\n console.error(error.message);\r\n });\r\n }\r\n}\r\n","const reportWebVitals = (onPerfEntry) => {\r\n if (onPerfEntry && onPerfEntry instanceof Function) {\r\n import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {\r\n getCLS(onPerfEntry);\r\n getFID(onPerfEntry);\r\n getFCP(onPerfEntry);\r\n getLCP(onPerfEntry);\r\n getTTFB(onPerfEntry);\r\n });\r\n }\r\n};\r\n\r\nexport default reportWebVitals;\r\n","import React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport { BrowserRouter } from 'react-router-dom';\r\n\r\nimport App from './App';\r\n\r\nimport * as serviceWorkerRegistration from './serviceWorkerRegistration';\r\nimport reportWebVitals from './reportWebVitals';\r\n\r\nimport './assets/scss/main.scss'\r\n\r\nconst rootElement = document.getElementById('root');\r\n\r\nReactDOM.render(\r\n \r\n \r\n ,\r\n rootElement);\r\n\r\n// If you want your app to work offline and load faster, you can change\r\n// unregister() to register() below. Note this comes with some pitfalls.\r\n// Learn more about service workers: https://cra.link/PWA\r\nserviceWorkerRegistration.unregister();\r\n\r\n// If you want to start measuring performance in your app, pass a function\r\n// to log results (for example: reportWebVitals(console.log))\r\n// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals\r\nreportWebVitals();\r\n","import { IUpdateChatBotData } from '../models/dentist';\r\nimport axiosInstance from './api-controller';\r\n\r\n/**\r\n * Authorize dentist.\r\n */\r\nconst authorizeDentist = async (code: string) => {\r\n try {\r\n const response = await axiosInstance.get('/user/authorize/' + code);\r\n return response;\r\n } catch (e) {\r\n throw e;\r\n }\r\n}\r\n\r\n/**\r\n * Fetches the clients by dentist id.\r\n * @param dentistId Id of the dentist.\r\n */\r\n//const getClientsByDentistId = async (dentistId: number) => {\r\nconst getClientsByDentistId = async (email: string | undefined | null) => {\r\n try {\r\n //const response = await axiosInstance.get('/dentist/clients/' + dentistId);\r\n const response = await axiosInstance.get(`dentist/list/patient/${email}`);\r\n return response;\r\n\r\n } catch (e) {\r\n throw e;\r\n }\r\n}\r\n\r\n/**\r\n * Get the conversation info for dentist and the selected client.\r\n */\r\nconst getConversationDentist = async (Obj: any) => {\r\n try {\r\n //const response = await axiosInstance.post('/dentist/conversation', Obj);\r\n const response = await axiosInstance.post(`dentist/conversation/GetById/${Obj.id}/${Obj.dentistId}`);\r\n\r\n return response;\r\n } catch (e) {\r\n throw e;\r\n }\r\n}\r\n\r\n/**\r\n * Creates a new message template.\r\n */\r\nconst createTemplate = async (obj: any) => {\r\n try {\r\n const { translateUpdateClicked, ...newObject } = obj;\r\n const response = await axiosInstance.post('/template/add', newObject);\r\n return response;\r\n } catch (e) {\r\n throw e;\r\n }\r\n}\r\n\r\n/**\r\n * Lists templates.\r\n */\r\nconst listTemplates = async (dentistId: number, culture: string) => {\r\n try {\r\n const response = await axiosInstance.get('/template/list/' + dentistId + '?culture=' + culture);\r\n return response;\r\n } catch (e) {\r\n throw e;\r\n }\r\n}\r\n\r\n/**\r\n * Updates a template.\r\n */\r\nconst updateTemplate = async (obj: any) => {\r\n try {\r\n const { translateUpdateClicked, ...newObject } = obj;\r\n const response = await axiosInstance.post('/template/update', newObject);\r\n return response;\r\n } catch (e) {\r\n throw e;\r\n }\r\n}\r\n\r\n/**\r\n * Deletes a template.\r\n */\r\nconst deleteTemplateById = async (templateId: number) => {\r\n try {\r\n const response = await axiosInstance.post('/template/delete/' + templateId);\r\n return response;\r\n } catch (e) {\r\n throw e;\r\n }\r\n}\r\n\r\n/**\r\n * Updates a template category name.\r\n */\r\nconst updateTemplateCategoryAPI = async (obj: any) => {\r\n try {\r\n const response = await axiosInstance.post('/Template/category/edit', obj);\r\n return response;\r\n } catch (e) {\r\n throw e;\r\n }\r\n}\r\n\r\n/**\r\n * Updates a template category name.\r\n */\r\nconst deleteTemplateCategoryAPI = async (obj: any) => {\r\n try {\r\n const response = await axiosInstance.post('/Template/category/delete', obj);\r\n return response;\r\n } catch (e) {\r\n throw e;\r\n }\r\n}\r\n\r\n/**\r\n * \r\n */\r\nconst sortTemplatesOrder = async (obj: any) => {\r\n try {\r\n const response = await axiosInstance.post('/template/sort', obj);\r\n return response;\r\n } catch (e) {\r\n throw e;\r\n }\r\n}\r\n\r\n/**\r\n * Update a conversation record for dentist.\r\n */\r\nconst updateDentistConversationRecord = async (obj: any) => {\r\n try {\r\n const response = await axiosInstance.post('/dentist/conversation/UpdateRecord/' + obj);\r\n return response;\r\n } catch (e) {\r\n throw e;\r\n }\r\n}\r\n\r\n/**\r\n * Lists Categories.\r\n */\r\nconst listCategories = async (id: number, culture: string) => {\r\n try {\r\n const response = await axiosInstance.get('/Template/category/' + id +'?culture=' + culture);\r\n return response;\r\n } catch (e) {\r\n throw e;\r\n }\r\n}\r\n\r\nconst updatedentistStatus = async (obj: { email: string, status: number, isReset: boolean }) => {\r\n try {\r\n const response = await axiosInstance.post(`/dentist/updateStatus`, obj);\r\n return response;\r\n } catch (e) {\r\n throw e;\r\n }\r\n};\r\n\r\nconst getCurrentDentistStatus = async (dentistId: number) => {\r\n try {\r\n const response = await axiosInstance.get(`/Dentist/getDentistStatus/${dentistId}`);\r\n return response;\r\n } catch (e) {\r\n throw e;\r\n }\r\n};\r\n\r\n/**\r\n * get User Id.\r\n */\r\nconst getUpdateUserIdAPI = async (email: string) => {\r\n try {\r\n const response = await axiosInstance.get(`/User/details/${email}`);\r\n return response;\r\n } catch (e) {\r\n throw e;\r\n }\r\n};\r\n\r\n/**\r\n * enable chat bot.\r\n */\r\n\r\nconst updateChatBotStatusAPI = async (obj: IUpdateChatBotData) => {\r\n try {\r\n const response = await axiosInstance.post('/Conversation/ChangeBotStatus', obj);\r\n return response;\r\n } catch (e) {\r\n throw e;\r\n }\r\n}\r\n\r\n/**\r\n * get Tag List templates.\r\n */\r\nconst listTaglist = async () => {\r\n try {\r\n const response = await axiosInstance.get('/Template/taglist/');\r\n return response;\r\n } catch (e) {\r\n throw e;\r\n }\r\n}\r\n/**\r\n * get whatasapp template.\r\n */\r\nconst whatsappTempalteAPI = async () => {\r\n try {\r\n const response = await axiosInstance.get('/Template/whatsapp/');\r\n return response;\r\n } catch (e) {\r\n throw e;\r\n }\r\n}\r\n/**\r\n * send whatasapp template.\r\n */\r\nconst sendWhatsappTempalteAPI = async (obj: any) => {\r\n try {\r\n const response = await axiosInstance.post('/Template/whatsapp/send', obj);\r\n return response;\r\n } catch (e) {\r\n throw e;\r\n }\r\n}\r\n/**\r\n * translate template.\r\n */\r\nconst translateTemplateAPI = async (obj: any) => {\r\n try {\r\n const response = await axiosInstance.post('template/translate', obj);\r\n return response;\r\n } catch (e) {\r\n throw e;\r\n }\r\n}\r\n\r\nexport {\r\n authorizeDentist,\r\n getClientsByDentistId,\r\n getConversationDentist,\r\n createTemplate,\r\n listTemplates,\r\n updateTemplate,\r\n deleteTemplateById,\r\n sortTemplatesOrder,\r\n updateDentistConversationRecord,\r\n listCategories,\r\n updatedentistStatus,\r\n getCurrentDentistStatus,\r\n updateTemplateCategoryAPI,\r\n deleteTemplateCategoryAPI,\r\n updateChatBotStatusAPI,\r\n getUpdateUserIdAPI,\r\n listTaglist,\r\n whatsappTempalteAPI,\r\n sendWhatsappTempalteAPI,\r\n translateTemplateAPI\r\n}","export const UserRole = Object.freeze({\r\n DENTIST: 1,\r\n CLIENT: 2,\r\n SMYLOR_BOT: 3,\r\n PARTICIPANT: 4,\r\n ADMIN: 5\r\n });","const RouteRegistry = {\r\n landing: {\r\n path: '/',\r\n },\r\n clientChat: {\r\n path: '/client/chat',\r\n },\r\n dentist: {\r\n path: '/dentist',\r\n subroutes: {\r\n dentistChat: {\r\n path: '/chat',\r\n },\r\n messageTemplates: {\r\n path: '/templates',\r\n },\r\n chatWidget: {\r\n path: '/widget',\r\n },\r\n }\r\n },\r\n error: {\r\n path: '/error',\r\n },\r\n}\r\n\r\nexport default RouteRegistry;","import { DeleteTemplate, ITemplate, UpdateTemplate, WhatsappTemplateData, WhatsappTemplateSendData } from \"../../models/template\";\r\nimport {\r\n SORT_TEMPLATES,\r\n CLOSE_TEMPLATE_MODAL,\r\n CREATE_TEMPLATE_SUCCESS,\r\n DELETE_TEMPLATE,\r\n DELETE_TEMPLATE_SUCCESS,\r\n GET_TEMPLATES,\r\n GET_TEMPLATES_SUCCESS,\r\n INIT_CREATE_TEMPLATE,\r\n INIT_UPDATE_TEMPLATE,\r\n CREATE_UPDATE_TEMPLATE,\r\n UPDATE_TEMPLATE_SUCCESS,\r\n GET_TEMPLATES_CATEGORIES,\r\n GET_TEMPLATES_CATEGORIES_SUCCESS,\r\n UPDATE_TEMPLATES_CATEGORY,\r\n DELETE_TEMPLATES_CATEGORY,\r\n UPDATE_TEMPLATES_CATEGORY_SUCCESS,\r\n DELETE_TEMPLATES_CATEGORY_SUCCESS,\r\n GET_TAGLIST,\r\n GET_TAGLIST_SUCCESS,\r\n GET_WHATSAPP_TEMPLATE,\r\n GET_WHATSAPP_TEMPLATE_SUCCESS,\r\n SEND_WHATSAPP_TEMPLATE,\r\n SEND_WHATSAPP_TEMPLATE_SUCCESS,\r\n SHOW_WHATSAPP_TEMPLATE,\r\n SET_WHATSAPP_TEMPLATE_STATUS,\r\n TEMPLATE_MESSAGE_SEND,\r\n TRANSLATE_TEMPLATE_DATA,\r\n TRANSLATE_TEMPLATE_DATA_SUCCESS\r\n} from \"../actions\";\r\n\r\nexport const getTemplates = (culture: string) => ({\r\n type: GET_TEMPLATES,\r\n payload: culture\r\n});\r\n\r\nexport const getTemplatesSuccess = (templates: []) => ({\r\n type: GET_TEMPLATES_SUCCESS,\r\n payload: templates,\r\n});\r\n\r\nexport const getTagList = () => ({\r\n type: GET_TAGLIST,\r\n});\r\n\r\nexport const getTagListSuccess = (tagList: any) => ({\r\n type: GET_TAGLIST_SUCCESS,\r\n payload: tagList,\r\n});\r\n\r\nexport const createTemplateSuccess = (template: ITemplate) => ({\r\n type: CREATE_TEMPLATE_SUCCESS,\r\n payload: template,\r\n});\r\n\r\nexport const initUpdateTemplate = (templateId: number) => ({\r\n type: INIT_UPDATE_TEMPLATE,\r\n payload: templateId,\r\n});\r\n\r\nexport const initCreateTemplate = () => ({\r\n type: INIT_CREATE_TEMPLATE,\r\n payload: null,\r\n});\r\n\r\nexport const createOrupdateTemplate = (template: ITemplate) => ({\r\n type: CREATE_UPDATE_TEMPLATE,\r\n payload: template,\r\n});\r\n\r\nexport const translateTemplateData = (template: ITemplate) => ({\r\n type: TRANSLATE_TEMPLATE_DATA,\r\n payload: template,\r\n});\r\n\r\nexport const translateTemplateDataSuccess = (template: ITemplate) => ({\r\n type: TRANSLATE_TEMPLATE_DATA_SUCCESS,\r\n payload: template,\r\n});\r\n\r\nexport const updateTemplateSuccess = (template: ITemplate) => ({\r\n type: UPDATE_TEMPLATE_SUCCESS,\r\n payload: template,\r\n});\r\n\r\nexport const deleteTemplate = (templateId: number) => ({\r\n type: DELETE_TEMPLATE,\r\n payload: templateId,\r\n});\r\n\r\nexport const deleteTemplateSuccess = (templateId: number) => ({\r\n type: DELETE_TEMPLATE_SUCCESS,\r\n payload: templateId,\r\n});\r\n\r\nexport const sortTemplates = (templates: []) => ({\r\n type: SORT_TEMPLATES,\r\n payload: templates,\r\n});\r\n\r\nexport const closeTemplateModal = () => ({\r\n type: CLOSE_TEMPLATE_MODAL\r\n});\r\n\r\nexport const getCategories = (culture: string) => ({\r\n type: GET_TEMPLATES_CATEGORIES,\r\n payload: culture\r\n});\r\n\r\nexport const getCategoriesSuccess = (categories: []) => ({\r\n type: GET_TEMPLATES_CATEGORIES_SUCCESS,\r\n payload: categories,\r\n});\r\n\r\nexport const updateTemplateCategory = (data: UpdateTemplate) => ({\r\n type: UPDATE_TEMPLATES_CATEGORY,\r\n payload: data,\r\n});\r\n\r\nexport const deleteTemplateCategory = (data: DeleteTemplate) => ({\r\n type: DELETE_TEMPLATES_CATEGORY,\r\n payload: data,\r\n});\r\n\r\nexport const updateTemplateCategorySuccess = (data: UpdateTemplate) => ({\r\n type: UPDATE_TEMPLATES_CATEGORY_SUCCESS,\r\n payload: data,\r\n});\r\n\r\nexport const deleteTemplateCategorySuccess = (data: DeleteTemplate) => ({\r\n type: DELETE_TEMPLATES_CATEGORY_SUCCESS,\r\n payload: data,\r\n});\r\n\r\nexport const getWhatsAppTemplate = () => ({\r\n type: GET_WHATSAPP_TEMPLATE,\r\n});\r\n\r\nexport const showWhatsAppTemplate = (data: boolean) => ({\r\n type: SHOW_WHATSAPP_TEMPLATE,\r\n payload: data,\r\n});\r\n\r\nexport const setWhatsAppTemplateStatus = (data: boolean) => ({\r\n type: SET_WHATSAPP_TEMPLATE_STATUS,\r\n payload: data,\r\n});\r\n\r\nexport const getWhatsAppTemplateSuccess = (payload: WhatsappTemplateData) => ({\r\n type: GET_WHATSAPP_TEMPLATE_SUCCESS,\r\n payload,\r\n});\r\n\r\nexport const sendWhatsAppTemplate = (payload: WhatsappTemplateSendData) => ({\r\n type: SEND_WHATSAPP_TEMPLATE,\r\n payload,\r\n});\r\n\r\nexport const sendWhatsAppTemplateSuccess = (payload: any) => ({\r\n type: SEND_WHATSAPP_TEMPLATE_SUCCESS,\r\n payload,\r\n});\r\n\r\nexport const templateMessageSend = (payload: boolean) => ({\r\n type: TEMPLATE_MESSAGE_SEND,\r\n payload,\r\n});\r\n","import axiosInstance from \"./api-controller\";\r\n\r\n/**\r\n * Checks if a client exist.\r\n */\r\nconst checkClient = async (email: string) => {\r\n try {\r\n const response = await axiosInstance.get(\"/client/check/\" + email);\r\n return response;\r\n } catch (e) {\r\n throw e;\r\n }\r\n};\r\n\r\n/**\r\n * Fetches the client details.\r\n */\r\nconst getClient = async (email: string) => {\r\n try {\r\n const response = await axiosInstance.get(\"/client/get/\" + email);\r\n return response;\r\n } catch (e) {\r\n throw e;\r\n }\r\n};\r\n\r\n/**\r\n * Creates a client.\r\n */\r\nconst createClient = async (obj: Object) => {\r\n try {\r\n const response = await axiosInstance.post(\"/client/create\", obj);\r\n return response;\r\n } catch (e) {\r\n throw e;\r\n }\r\n};\r\n\r\n/**\r\n * Fetches dentists.\r\n */\r\nconst getDentists = async (email: string | null) => {\r\n try {\r\n const response = await axiosInstance.get('/client/list/dentists/' + email);\r\n return response;\r\n } catch (e) {\r\n throw e;\r\n }\r\n}\r\n\r\n/**\r\n * Creates a conversation for client.\r\n */\r\nconst createConversation = async (Obj: any) => {\r\n\r\n try {\r\n //const response = await axiosInstance.post('/client/conversation/create', Obj);\r\n // const response = await axiosInstance.post(`client/conversation/GetById, ${Obj.id}/${Obj.clientId}`);\r\n const response = await axiosInstance.post(`client/conversation/GetById`, Obj);\r\n return response;\r\n } catch (e) {\r\n throw e;\r\n }\r\n}\r\n\r\n/**\r\n * Update a conversation record for client.\r\n */\r\nconst updateClientConversationRecord = async (obj: any) => {\r\n try {\r\n const response = await axiosInstance.post('/client/conversation/UpdateRecord/' + obj);\r\n return response;\r\n } catch (e) {\r\n throw e;\r\n }\r\n}\r\n\r\n\r\nconst getChatHistory = async (obj: any) => {\r\n try {\r\n const response = await axiosInstance.post('/client/updatechathistory', obj);\r\n return response;\r\n } catch (e) {\r\n throw e;\r\n }\r\n}\r\n\r\nconst enableChatBotAPI = async (obj: any) => {\r\n try {\r\n const response = await axiosInstance.get(`/Conversation/enable/chatbot?conversationId=${obj.conversationId}&culture=${obj.culture}`);\r\n return response;\r\n } catch (e) {\r\n throw e;\r\n }\r\n}\r\nconst cerateConversationAPI = async (obj: any) => {\r\n try {\r\n const response = await axiosInstance.post(`client/patient`, obj);\r\n return response;\r\n } catch (e) {\r\n throw e;\r\n }\r\n}\r\n\r\nexport {\r\n checkClient,\r\n getClient,\r\n createClient,\r\n getDentists,\r\n createConversation,\r\n updateClientConversationRecord,\r\n getChatHistory,\r\n enableChatBotAPI,\r\n cerateConversationAPI\r\n};","import {\r\n INIT_USER,\r\n SIGNOUT,\r\n AUTHORIZE_DENTIST,\r\n AUTHORIZE_DENTIST_SUCCESS,\r\n INIT_USER_STATUS,\r\n STATUS_CHANGED,\r\n STATUS_CHANGED_SUCCESS,\r\n GET_STATUS,\r\n GET_STATUS_SUCCESS,\r\n GET_USER_ID,\r\n SET_USER_ID\r\n} from \"../actions\";\r\n\r\nexport const initUser = (inituser: any) => ({\r\n type: INIT_USER,\r\n payload: inituser\r\n});\r\n\r\nexport const getUserId = (email: string) => ({\r\n type: GET_USER_ID,\r\n payload: email\r\n});\r\n\r\nexport const setUserId = (id: any) => ({\r\n type: SET_USER_ID,\r\n payload: id\r\n});\r\n\r\nexport const initUserStatus = (status: boolean, user: any) => ({\r\n type: INIT_USER_STATUS,\r\n payload: { status: status, user: user },\r\n});\r\n\r\nexport const signout = (history: any) => ({\r\n type: SIGNOUT,\r\n payload: history,\r\n});\r\n\r\nexport const authorizeDentist = (code: string) => ({\r\n type: AUTHORIZE_DENTIST,\r\n payload: code,\r\n});\r\n\r\nexport const authorizeDentistSuccess = (conversation: any) => ({\r\n type: AUTHORIZE_DENTIST_SUCCESS,\r\n payload: conversation,\r\n});\r\n\r\nexport const userStatus = (status: { key: number, name: string }) => ({\r\n type: STATUS_CHANGED,\r\n payload: status,\r\n});\r\n\r\nexport const userStatusSuccess = (status: { key: number, name: string }) => ({\r\n type: STATUS_CHANGED_SUCCESS,\r\n payload: status,\r\n});\r\n\r\nexport const getUserStatus = (dentistId: number) => ({\r\n type: GET_STATUS,\r\n payload: dentistId,\r\n});\r\n\r\nexport const getUserStatusSuccess = (status: { dentistId: number, status: number }) => ({\r\n type: GET_STATUS_SUCCESS,\r\n payload: status,\r\n});\r\n","import { IUpdateChatBotData, IUpdatedChatBotData } from \"../../models/dentist\";\r\nimport {\r\n GET_CLIENTS,\r\n GET_CLIENTS_SUCCESS,\r\n GET_DENTISTS,\r\n GET_DENTISTS_SUCCESS,\r\n SET_CLIENT_NOTIFICATION,\r\n SET_DENTIST_NOTIFICATION,\r\n UPDATE_NOTIFICATION,\r\n UPDATE_PARTICIPANT_LIST,\r\n UPDATE_NEW_PARTICIPANT_LIST,\r\n UPDATE_CHATBOT_STATUS,\r\n UPDATE_CHATBOT_STATUS_SUCCESS\r\n} from \"../actions\";\r\n\r\nexport const getDentists = () => ({\r\n type: GET_DENTISTS,\r\n payload: {},\r\n})\r\n\r\nexport const getDentistsSuccess = (payload: []) => ({\r\n type: GET_DENTISTS_SUCCESS,\r\n payload: payload,\r\n})\r\n\r\nexport const getClients = () => ({\r\n type: GET_CLIENTS,\r\n payload: {},\r\n})\r\n\r\nexport const getClientsSuccess = (payload: []) => ({\r\n type: GET_CLIENTS_SUCCESS,\r\n payload: payload,\r\n})\r\n\r\nexport const setDentistNotification = (payload: any) => ({\r\n type: SET_DENTIST_NOTIFICATION,\r\n payload: payload,\r\n})\r\n\r\nexport const setClientNotification = (payload: any) => ({\r\n type: SET_CLIENT_NOTIFICATION,\r\n payload: payload,\r\n})\r\n\r\nexport const updateNotification = (payload: any) => ({\r\n type: UPDATE_NOTIFICATION,\r\n payload: payload,\r\n})\r\n\r\n// Dentist Cliet list update action\r\n\r\nexport const updateParticipantList = (payload: any) => ({\r\n type: UPDATE_PARTICIPANT_LIST,\r\n payload: payload,\r\n})\r\n\r\nexport const updateNewParticipantList = (payload: any) => ({\r\n type: UPDATE_NEW_PARTICIPANT_LIST,\r\n payload: payload,\r\n})\r\n\r\n// Update Chatbot Status\r\n\r\nexport const updateChatBotStatus = (obj: IUpdateChatBotData) => ({\r\n type: UPDATE_CHATBOT_STATUS,\r\n payload: obj,\r\n});\r\n\r\nexport const updateChatBotStatusSuccess = (payload: IUpdatedChatBotData) => ({\r\n type: UPDATE_CHATBOT_STATUS_SUCCESS,\r\n payload: payload,\r\n});","export const StatusTypes = Object.freeze({\r\n ACTIVE: 1,\r\n OFFLINE: 2,\r\n AWAY: 3,\r\n});\r\n\r\nexport const statusNameList = [\r\n { key: 1, msgKey: \"chat_app_profile_active\", name: \"aktiv\" },\r\n { key: 2, msgKey: \"chat_app_profile_offline\", name: \"offline\" },\r\n { key: 3, msgKey: \"chat_app_profile_away\", name: \"weg\" },\r\n];\r\n\r\nexport const StatusCode = Object.freeze({\r\n success: 200,\r\n unAuthenticated: 401,\r\n notVerified: 406,\r\n serverError: 500,\r\n alreadyExist: 300\r\n});\r\n\r\nexport const enum MESAAGEPRIVACYLINKDATA {\r\n ISLINK = 1,\r\n ACCEPTED = 2,\r\n CANCELLED = 3,\r\n DEFAULT = 4\r\n}\r\n// export const statusNameList = Object.freeze(statusNameListArray);\r\n","import {\r\n GET_SELECTED_LANGUAGE_LIST,\r\n GET_SELECTED_LANGUAGE_LIST_SUCCESS,\r\n SET_BROWSER_SELECTED_LANGUAGE,\r\n SET_DEFAULT_DENTIST,\r\n SET_SEARCH_TEXT,\r\n SET_SELECTED_LANGUAGE,\r\n SET_SIGNALR_CONNECTION\r\n} from \"../actions\";\r\n\r\nexport const setSelectedLanguage = (key: string) => ({\r\n type: SET_SELECTED_LANGUAGE,\r\n payload: key,\r\n});\r\n\r\nexport const setBrowserSelectedLanguage = (key: string) => ({\r\n type: SET_BROWSER_SELECTED_LANGUAGE,\r\n payload: key,\r\n});\r\n\r\nexport const getLanguageSelectedList = (key: string) => ({\r\n type: GET_SELECTED_LANGUAGE_LIST,\r\n payload: key,\r\n});\r\n\r\nexport const getLanguageSelectedListSuccess = (data: any) => ({\r\n type: GET_SELECTED_LANGUAGE_LIST_SUCCESS,\r\n payload: data,\r\n});\r\n\r\nexport const setSignalRConnection = (data: any) => ({\r\n type: SET_SIGNALR_CONNECTION,\r\n payload: data,\r\n});\r\n\r\nexport const setDefaulDentist = (data: any) => ({\r\n type: SET_DEFAULT_DENTIST,\r\n payload: data,\r\n});\r\nexport const setSearchText = (data: string) => ({\r\n type: SET_SEARCH_TEXT,\r\n payload: data,\r\n});","import { IRemoveChatUser, IAddChatUser } from \"../../models/addUser\";\r\nimport { ITemplate } from \"../../models/template\";\r\nimport {\r\n OPEN_ADD_USER_POPUP,\r\n CLOSE_ADD_USER_POPUP,\r\n ADD_CHAT_USER,\r\n REMOVE_CHAT_USER,\r\n GET_ACTIVE_CHAT_USERS,\r\n GET_ACTIVE_CHAT_USERS_SUCCESS,\r\n UPDATE_ACTIVE_CHAT_USERS\r\n} from \"../actions\";\r\n\r\nexport const openAddUserModal = () => ({\r\n type: OPEN_ADD_USER_POPUP,\r\n});\r\n\r\nexport const closeAddUserModal = () => ({\r\n type: CLOSE_ADD_USER_POPUP,\r\n});\r\n\r\nexport const addChatUser = (obj: IAddChatUser) => ({\r\n type: ADD_CHAT_USER,\r\n payload: obj,\r\n});\r\n\r\nexport const removeChatUser = (obj: IRemoveChatUser) => ({\r\n type: REMOVE_CHAT_USER,\r\n payload: obj,\r\n});\r\n\r\nexport const activeChatUsers = (conversationId: number) => ({\r\n type: GET_ACTIVE_CHAT_USERS,\r\n payload: conversationId,\r\n});\r\n\r\nexport const activeChatUsersSuccess = (users: any) => ({\r\n type: GET_ACTIVE_CHAT_USERS_SUCCESS,\r\n payload: users,\r\n});\r\n\r\nexport const updateActiveChatUsers = (data: any) => ({\r\n type: UPDATE_ACTIVE_CHAT_USERS,\r\n payload: data,\r\n});\r\n","import { IGetStatusMessageData, IStatusMessageData } from \"../../models/statusMessage\";\r\nimport {\r\n ADD_STATUS_MESSAGE,\r\n ADD_STATUS_MESSAGE_SUCCESS,\r\n GET_LANGUAGE_LIST,\r\n GET_LANGUAGE_LIST_SUCCESS,\r\n GET_STATUS_MESSAGE,\r\n GET_STATUS_MESSAGE_SUCCESS,\r\n} from \"../actions\";\r\n\r\nexport const addStatusMessage = (data: IStatusMessageData) => ({\r\n type: ADD_STATUS_MESSAGE,\r\n payload: data\r\n});\r\n\r\nexport const addStatusMessageSuccess = (data: any) => ({\r\n type: ADD_STATUS_MESSAGE_SUCCESS,\r\n payload: data,\r\n});\r\n\r\nexport const getStatusMessage = (data: IGetStatusMessageData) => ({\r\n type: GET_STATUS_MESSAGE,\r\n payload: data\r\n});\r\n\r\nexport const getStatusMessageSuccess = (data: any) => ({\r\n type: GET_STATUS_MESSAGE_SUCCESS,\r\n payload: data,\r\n});\r\n\r\nexport const getLanguageList = () => ({ type: GET_LANGUAGE_LIST });\r\n\r\nexport const getLanguageListSuccess = (data: any) => ({\r\n type: GET_LANGUAGE_LIST_SUCCESS,\r\n payload: data,\r\n});\r\n","import { IUpdatedChatBotData } from \"../../models/dentist\";\r\nimport {\r\n ADD_CONVERSATION_CHATBOT_DATA,\r\n GET_ACCESS_TOKEN_SUCCESS,\r\n INIT_CONVERSATION,\r\n INIT_CONVERSATION_SUCCESS,\r\n REMOVE_CONVERSATION_DATA,\r\n SHOW_CHAT_LIST_MENU,\r\n SET_SUGGETION_MESSAGE,\r\n SET_EXPAND_SUGGESTION,\r\n SET_AI_SUGGESTION_DATA,\r\n SET_AI_LOADING_SUGGESTION_DATA,\r\n REMOVE_TYPING_PARTICIPANT,\r\n SET_TYPING_PARTICIPANT,\r\n SET_TYPING_SMYLOR_BOT,\r\n SET_ENABLE_SMYLOR_BOT,\r\n CREATE_CONVERSATION,\r\n CREATE_CONVERSATION_SUCCESS,\r\n SET_DENTIST_REPLY,\r\n SET_LAST_MESSAGE,\r\n} from \"../actions\";\r\n\r\nexport const initConversation = (obj: { conversationId: number, culture: string }) => ({\r\n type: INIT_CONVERSATION,\r\n payload: obj,\r\n});\r\n\r\nexport const initConversationSuccess = (conversation: any) => ({\r\n type: INIT_CONVERSATION_SUCCESS,\r\n payload: conversation,\r\n});\r\n\r\nexport const getAccessTokenSuccess = (payload: any) => ({\r\n type: GET_ACCESS_TOKEN_SUCCESS,\r\n payload: payload,\r\n});\r\n\r\nexport const showChatListMenu = (payload: any) => ({\r\n type: SHOW_CHAT_LIST_MENU,\r\n payload: payload,\r\n});\r\n\r\nexport const addCoversationChatBotData = (payload: IUpdatedChatBotData) => ({\r\n type: ADD_CONVERSATION_CHATBOT_DATA,\r\n payload,\r\n});\r\n\r\nexport const removeConversation = (payload: string) => ({\r\n type: REMOVE_CONVERSATION_DATA,\r\n payload,\r\n});\r\n\r\nexport const setSuggetionMessage = (payload: string) => ({\r\n type: SET_SUGGETION_MESSAGE,\r\n payload,\r\n});\r\n\r\nexport const setExpandSuggestion = (payload: any) => ({\r\n type: SET_EXPAND_SUGGESTION,\r\n payload,\r\n});\r\n\r\nexport const setAiSuggestionData = (payload: any) => ({\r\n type: SET_AI_SUGGESTION_DATA,\r\n payload,\r\n});\r\n\r\nexport const setAiSuggestionLoadingData = (payload: any) => ({\r\n type: SET_AI_LOADING_SUGGESTION_DATA,\r\n payload,\r\n});\r\n\r\nexport const setTypingParticipant = (payload: string) => ({\r\n type: SET_TYPING_PARTICIPANT,\r\n payload,\r\n});\r\n\r\nexport const removeTypingParticipant = (payload: string) => ({\r\n type: REMOVE_TYPING_PARTICIPANT,\r\n payload,\r\n});\r\n\r\nexport const setSmylorBotTyping = (payload: { conversationId: number, isTyping: boolean}) => ({\r\n type: SET_TYPING_SMYLOR_BOT,\r\n payload,\r\n});\r\n\r\nexport const setEnableChatBot = (payload: { conversationId: number, culture: string}) => ({\r\n type: SET_ENABLE_SMYLOR_BOT,\r\n payload,\r\n});\r\n\r\nexport const createNewConversationAction = (payload: { culture: string, dentistId: any, email: string, name: string}) => ({\r\n type: CREATE_CONVERSATION,\r\n payload,\r\n});\r\n\r\nexport const createNewConversationSuccess = (payload: { conversationId: number, culture: string}) => ({\r\n type: CREATE_CONVERSATION_SUCCESS,\r\n payload,\r\n});\r\n\r\nexport const setDentistReply = (payload: boolean) => ({\r\n type: SET_DENTIST_REPLY,\r\n payload,\r\n});\r\n\r\nexport const setConversationLastMessage = (payload: any) => ({\r\n type: SET_LAST_MESSAGE,\r\n payload,\r\n});\r\n\r\n","import { decrypt } from \"../components/encyptor\";\r\nimport { UserRole } from \"../constants/user-role\";\r\nimport { IUser } from \"../models/user\";\r\nimport Cookies from 'js-cookie';\r\n\r\nconst getCurrentUser = (): IUser | null => {\r\n try {\r\n const user = getValue(process.env.REACT_APP_USER_INFO!);\r\n return user ? JSON.parse(user) : null;\r\n } catch (error) {\r\n console.log(\">>>>: src/helpers/Utils.js : getCurrentUser -> error\", error);\r\n return null;\r\n }\r\n};\r\n\r\nconst setCurrentUser = (user: IUser | null) => {\r\n try {\r\n if (user) {\r\n setValue(process.env.REACT_APP_USER_INFO!, JSON.stringify(user));\r\n } else {\r\n removeValue(process.env.REACT_APP_USER_INFO!);\r\n }\r\n } catch (error) {\r\n console.log(\">>>>: src/helpers/Utils.js : setCurrentUser -> error\", error);\r\n }\r\n};\r\n\r\nconst setValue = (key: string, value: any, needEncrypt = false) => {\r\n try {\r\n let prepValue = value;\r\n // if (process.env.REACT_APP_HASH_STORAGE && needEncrypt) {\r\n // prepValue = crypto.AES.encrypt(value.toString(), process.env.REACT_APP_LOCAL_STORAGE_SECRET);\r\n // }\r\n localStorage.setItem(key, prepValue);\r\n Cookies.set(key, value, { domain: `${process.env.REACT_APP_DOMAIN_URL}` });\r\n } catch (e) {\r\n if (process.env.REACT_APP_DEBUG === \"true\") {\r\n console.log(\"-------- storage setting error --------\");\r\n console.log(\"value \", value);\r\n console.log(e);\r\n }\r\n }\r\n};\r\n\r\nconst getValue = (key: string, needDecrypt = false) => {\r\n try {\r\n const prepValueLocal: any = localStorage.getItem(key);\r\n const prepValue = Cookies.get(key);\r\n // if (prepValue && process.env.REACT_APP_HASH_STORAGE && needDecrypt) {\r\n // prepValue = crypto.AES.decrypt(prepValue, process.env.REACT_APP_LOCAL_STORAGE_SECRET).toString(crypto.enc.Utf8);\r\n // }\r\n // if (process.env.REACT_APP_DEBUG === \"true\") {\r\n // return prepValueLocal;\r\n // }\r\n // return prepValue;\r\n if (prepValue) {\r\n return prepValue;\r\n } else if (prepValueLocal) {\r\n return prepValueLocal;\r\n }\r\n } catch (e) {\r\n if (process.env.REACT_APP_DEBUG === \"true\") {\r\n console.log(\"-------- storage getting error --------\");\r\n console.log(\"key \", key);\r\n console.log(e);\r\n }\r\n return null;\r\n }\r\n};\r\n\r\nconst getAccessToken = (key: string, needDecrypt = false) => {\r\n try {\r\n const prepValue = Cookies.get(key);\r\n if(prepValue){\r\n return prepValue;\r\n }\r\n } catch (error) {\r\n if (process.env.REACT_APP_DEBUG === \"true\") {\r\n console.log(\"-------- storage getting error --------\");\r\n console.log(\"key \", key);\r\n console.log(error);\r\n }\r\n return null;\r\n }\r\n};\r\n\r\nconst removeValue = (key: string) => {\r\n try {\r\n console.log('removeValue', key);\r\n localStorage.removeItem(key);\r\n Cookies.remove(key, { domain: `${process.env.REACT_APP_DOMAIN_URL}` });\r\n // Cookies.remove(key, { domain: 'smylor.ch' });\r\n } catch (e) {\r\n if (process.env.REACT_APP_DEBUG === \"true\") {\r\n console.log(\"-------- storage removing error --------\");\r\n console.log(\"key \", key);\r\n console.log(e);\r\n }\r\n }\r\n};\r\n\r\nconst logDebug = (name: string, message: any) => {\r\n if (process.env.REACT_APP_DEBUG === \"true\") {\r\n console.log(name);\r\n\r\n if (message) console.log(message);\r\n }\r\n};\r\n\r\nexport const generateResultObject = (array: string[]) => {\r\n\r\n const [quection, ...answers] = array;\r\n\r\n const msg = {\r\n msgType: \"replay\",\r\n text: quection,\r\n suggestedActions: answers.map(obj => ({ type: \"reply\", value: obj }))\r\n }\r\n return msg\r\n};\r\n\r\nexport const userRoleDentist = (role: number) => {\r\n if (role === UserRole.DENTIST || role === UserRole.PARTICIPANT) return true;\r\n else return false;\r\n};\r\n\r\nexport {\r\n getCurrentUser,\r\n setCurrentUser,\r\n setValue,\r\n getValue,\r\n removeValue,\r\n logDebug,\r\n getAccessToken\r\n};\r\n","import React from 'react';\r\n\r\nconst Layout = (props: any) => {\r\n\r\n return (\r\n
\r\n
\r\n {props.children}\r\n
\r\n
\r\n );\r\n \r\n}\r\n\r\nexport default Layout;","import { eventChannel, END } from \"redux-saga\";\r\nimport { logDebug } from \"../helpers/utils\";\r\n\r\ndeclare global {\r\n var Twilio: any;\r\n}\r\n\r\n/**\r\n * Initializes the Twilio Conversation.\r\n * @param token\r\n */\r\nexport const initConversationSrvc = async (token: string) => {\r\n logDebug(\">>> Initializing Twilio conversation.\", null);\r\n const conversationClient: any = await window.Twilio.Conversations.Client.create(token, { region: process.env.REACT_APP_TWILIO_REGION });\r\n\r\n return eventChannel((emitter: any) => {\r\n conversationClient.on(\"connectionStateChanged\", (state: string) => {\r\n if (state === \"connecting\") {\r\n logDebug(\">>> Connecting to Twilio.\", null);\r\n }\r\n if (state === \"connected\") {\r\n logDebug(\">>> You are connected.\", null);\r\n }\r\n if (state === \"disconnecting\") {\r\n logDebug(\">>> Disconnecting from Twilio.\", null);\r\n }\r\n if (state === \"disconnected\") {\r\n logDebug(\">>> Disconnected.\", null);\r\n }\r\n if (state === \"denied\") {\r\n logDebug(\">>> Failed to connect.\", null);\r\n }\r\n });\r\n\r\n conversationClient.on(\"conversationLeft\", (conversation: any) => {\r\n logDebug(\">>> Left.\", null);\r\n });\r\n\r\n conversationClient.on(\"conversationJoined\", (conversation: any) => {\r\n // logDebug(\">>> Joined.\", conversation);\r\n\r\n emitter({ conversationClient, conversation });\r\n\r\n emitter(END);\r\n });\r\n return () => { };\r\n });\r\n};\r\n\r\n/**\r\n * Loads the chat history.\r\n * @param conversation\r\n */\r\nexport const loadConversation = async (conversation: any) => {\r\n try {\r\n logDebug(\">>> Fetching messages.\", null);\r\n const res = await conversation.getMessages();\r\n return res;\r\n } catch (e) {\r\n throw e;\r\n }\r\n}\r\n\r\n/**\r\n * Starts listening to new messages.\r\n */\r\nexport const startMessageAdded = (conversation: any, callback: Function) => {\r\n logDebug(\">>> Starting message added listener.\", null);\r\n\r\n conversation.on(\"messageAdded\", (m: any) => {\r\n logDebug(\">>> New message added.\", '');\r\n\r\n callback(m);\r\n });\r\n}\r\n/**\r\n * Initializes the Twilio Conversation.\r\n * @param token\r\n */\r\n// export const initConversationSrvc = async (token: string) => {\r\n// logDebug(\">>> Initializing Twilio conversation.\", null);\r\n\r\n// const conversationsClient: any = await window.Twilio.Conversations.Client.create(token);\r\n\r\n// conversationsClient.on(\"connectionStateChanged\", (state: string) => {\r\n// if (state === \"connecting\") {\r\n// logDebug(\">>> Connecting to Twilio.\", null);\r\n// }\r\n// if (state === \"connected\") {\r\n// logDebug(\">>> You are connected.\", null);\r\n// }\r\n// if (state === \"disconnecting\") {\r\n// logDebug(\">>> Disconnecting from Twilio.\", null);\r\n// }\r\n// if (state === \"disconnected\") {\r\n// logDebug(\">>> Disconnected.\", null);\r\n// }\r\n// if (state === \"denied\") {\r\n// logDebug(\">>> Failed to connect.\", null);\r\n// }\r\n// });\r\n\r\n// conversationsClient.on(\"conversationLeft\", (conversation: any) => {\r\n// logDebug(\">>> Left.\", null);\r\n// });\r\n\r\n// conversationsClient.on(\"conversationJoined\", (conversation: any) => {\r\n// logDebug(\">>> Joined.\", conversation);\r\n// });\r\n// };\r\n","import TagManager, { TagManagerArgs } from \"react-gtm-module\";\r\n\r\nexport interface useGTMRetunProps {\r\n getCode: (code: string) => void;\r\n triggerEvent: (eventName: string) => void;\r\n}\r\nconst useGTM = (): useGTMRetunProps => {\r\n const getCode = (code: string) => {\r\n if (code) {\r\n const tagManagerArgs: TagManagerArgs = { gtmId: code };\r\n try {\r\n TagManager.initialize(tagManagerArgs);\r\n } catch (error) {\r\n console.error(\"Error initializing Google Tag Manager:\", error);\r\n }\r\n } else {\r\n console.warn(\"No GTM ID provided.\");\r\n }\r\n };\r\n const triggerEvent = (eventName: string) => {\r\n console.log('eventName', eventName)\r\n if (eventName) {\r\n try {\r\n TagManager.dataLayer({\r\n dataLayer: {\r\n event: eventName,\r\n },\r\n });\r\n } catch (error) {\r\n console.error(\"Error triggering GTM event:\", error);\r\n }\r\n } else {\r\n console.warn(\"No event name provided.\");\r\n }\r\n };\r\n\r\n return { getCode, triggerEvent };\r\n};\r\n\r\nexport default useGTM;\r\n","import axios from \"axios\";\r\nimport { getAccessToken, removeValue, setCurrentUser } from \"../helpers/utils\";\r\nimport { StatusCode } from \"../constants/status-types\";\r\n\r\nconst apiFectingError = (error: any) => {\r\n if (error.status === StatusCode.unAuthenticated) {\r\n console.log('endCurrentUserSession');\r\n setCurrentUser(null);\r\n removeValue(process.env.REACT_APP_USER_SESSION!);\r\n removeValue(process.env.REACT_APP_USER_INFO!);\r\n window.open(`${process.env.REACT_APP_SMYLOR_URL}?returnTo=${window.location.href}`, \"_self\");\r\n } \r\n};\r\n\r\nconst axiosInstance = axios.create({\r\n baseURL: `${process.env.REACT_APP_BASE_URL}/api`,\r\n // timeout: 1000,\r\n headers: { Accept: \"application/json\", \"Content-type\": \"application/json\" },\r\n});\r\n\r\naxiosInstance.interceptors.request.use(\r\n (config) => {\r\n const updatedConfig = { ...config };\r\n const accessToken = getAccessToken(process.env.REACT_APP_USER_SESSION!, false);\r\n\r\n if (accessToken)\r\n updatedConfig.headers!.Authorization = `Bearer ${accessToken}`;\r\n\r\n return updatedConfig;\r\n },\r\n (error) => {\r\n return Promise.reject(error);\r\n }\r\n);\r\n\r\naxiosInstance.interceptors.response.use(\r\n (response) => {\r\n return response;\r\n },\r\n (error) => {\r\n apiFectingError(error.response);\r\n return Promise.reject(error);\r\n }\r\n);\r\n\r\nexport default axiosInstance;\r\n"],"sourceRoot":""}