Send received message through WebSocket

- send received message from through WebSocket
- remove SocketIO from client

GitLab: #96
Change-Id: I7a8eec04010f0773428f914792c13decef393ebf
diff --git a/common/src/interfaces/account-text-message.ts b/common/src/interfaces/account-text-message.ts
index 832762f..68eea24 100644
--- a/common/src/interfaces/account-text-message.ts
+++ b/common/src/interfaces/account-text-message.ts
@@ -15,10 +15,8 @@
  * License along with this program.  If not, see
  * <https://www.gnu.org/licenses/>.
  */
-import { WebRTCIceCandidate } from './webrtc-ice-candidate';
-import { WebRTCSDP } from './webrtc-sdp';
-export interface AccountTextMessage {
+export interface AccountTextMessage<T> {
   from: string;
   to: string;
-  message: WebRTCIceCandidate | WebRTCSDP;
+  message: T;
 }
diff --git a/common/src/interfaces/conversation-message.ts b/common/src/interfaces/conversation-message.ts
new file mode 100644
index 0000000..e921a28
--- /dev/null
+++ b/common/src/interfaces/conversation-message.ts
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2022 Savoir-faire Linux Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation; either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this program.  If not, see
+ * <https://www.gnu.org/licenses/>.
+ */
+import { Message } from '../Conversation.js';
+
+export interface ConversationMessage {
+  conversationId: string;
+  message: Message;
+}
diff --git a/common/src/interfaces/conversation-view.ts b/common/src/interfaces/conversation-view.ts
new file mode 100644
index 0000000..cc4a038
--- /dev/null
+++ b/common/src/interfaces/conversation-view.ts
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 2022 Savoir-faire Linux Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation; either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this program.  If not, see
+ * <https://www.gnu.org/licenses/>.
+ */
+export interface ConversationView {
+  accountId: string;
+  conversationId: string;
+}
diff --git a/common/src/interfaces/websocket-message.ts b/common/src/interfaces/websocket-message.ts
index efc412e..f94c20f 100644
--- a/common/src/interfaces/websocket-message.ts
+++ b/common/src/interfaces/websocket-message.ts
@@ -15,10 +15,22 @@
  * License along with this program.  If not, see
  * <https://www.gnu.org/licenses/>.
  */
-import { WebSocketMessageType } from '../enums/websocket-message-type';
-import { AccountTextMessage } from './account-text-message';
+import { WebSocketMessageType } from '../enums/websocket-message-type.js';
+import { AccountTextMessage } from './account-text-message.js';
+import { ConversationMessage } from './conversation-message.js';
+import { ConversationView } from './conversation-view.js';
+import { WebRTCIceCandidate } from './webrtc-ice-candidate.js';
+import { WebRTCSDP } from './webrtc-sdp.js';
 
-export interface WebSocketMessage {
-  type: WebSocketMessageType;
-  data: AccountTextMessage; // Union type for data (Ex: data: AccountTextMessage | SomethingElse)
+export interface WebSocketMessageTable {
+  [WebSocketMessageType.ConversationMessage]: ConversationMessage;
+  [WebSocketMessageType.ConversationView]: ConversationView;
+  [WebSocketMessageType.WebRTCOffer]: AccountTextMessage<WebRTCSDP>;
+  [WebSocketMessageType.WebRTCAnswer]: AccountTextMessage<WebRTCSDP>;
+  [WebSocketMessageType.IceCandidate]: AccountTextMessage<WebRTCIceCandidate>;
+}
+
+export interface WebSocketMessage<T extends WebSocketMessageType> {
+  type: T;
+  data: WebSocketMessageTable[T];
 }