Use new socket in webRTC client

- Replace fake socket in WebRCT context in client
- Add ice candidate to websocket
- Add accountID and contactID dependency to webRTC context

GitLab: #28
Change-Id: I01bf41086dc7bd847a74b5670a732d3a6fb95bf9
diff --git a/common/src/enums/websocket-message-type.ts b/common/src/enums/websocket-message-type.ts
index 4337d3a..b896034 100644
--- a/common/src/enums/websocket-message-type.ts
+++ b/common/src/enums/websocket-message-type.ts
@@ -18,4 +18,5 @@
 export enum WebSocketMessageType {
   WebRTCOffer = 'webrtc-offer',
   WebRTCAnswer = 'webrtc-answer',
+  IceCandidate = 'ice-candidate',
 }
diff --git a/common/src/index.ts b/common/src/index.ts
index e6c2b2c..243f515 100644
--- a/common/src/index.ts
+++ b/common/src/index.ts
@@ -22,5 +22,7 @@
 export * from './enums/http-status-code.js';
 export * from './enums/websocket-message-type.js';
 export * from './interfaces/account-text-message.js';
+export * from './interfaces/webrtc-ice-candidate.js';
+export * from './interfaces/webrtc-sdp.js';
 export * from './interfaces/websocket-message.js';
 export * from './util.js';
diff --git a/common/src/interfaces/account-text-message.ts b/common/src/interfaces/account-text-message.ts
index d8f52ec..832762f 100644
--- a/common/src/interfaces/account-text-message.ts
+++ b/common/src/interfaces/account-text-message.ts
@@ -15,8 +15,10 @@
  * 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 {
   from: string;
   to: string;
-  message: JSON;
+  message: WebRTCIceCandidate | WebRTCSDP;
 }
diff --git a/common/src/interfaces/webrtc-ice-candidate.ts b/common/src/interfaces/webrtc-ice-candidate.ts
new file mode 100644
index 0000000..9a64465
--- /dev/null
+++ b/common/src/interfaces/webrtc-ice-candidate.ts
@@ -0,0 +1,20 @@
+/*
+ * 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 WebRTCIceCandidate {
+  candidate: RTCIceCandidate;
+}
diff --git a/common/src/interfaces/webrtc-sdp.ts b/common/src/interfaces/webrtc-sdp.ts
new file mode 100644
index 0000000..cd75fbb
--- /dev/null
+++ b/common/src/interfaces/webrtc-sdp.ts
@@ -0,0 +1,20 @@
+/*
+ * 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 WebRTCSDP {
+  sdp: RTCSessionDescriptionInit;
+}