@ecodrix/erix-api 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ecodrix/erix-api",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "author": "ECODrIx Team <contact@ecodrix.com>",
5
5
  "license": "MIT",
6
6
  "description": "Official Isomorphic SDK for the ECODrIx platform. Native support for WhatsApp, CRM, Storage, and Meetings across TS, JS, Python, and Java.",
package/src/core.ts CHANGED
@@ -181,6 +181,24 @@ export class Ecodrix {
181
181
  this.setupSocket(options.clientCode);
182
182
  }
183
183
 
184
+ /**
185
+ * Join a specific real-time room (e.g., a conversation or a lead).
186
+ *
187
+ * @param roomId - The unique identifier for the room.
188
+ */
189
+ public joinRoom(roomId: string) {
190
+ this.socket.emit("join-room", roomId);
191
+ }
192
+
193
+ /**
194
+ * Leave a previously joined real-time room.
195
+ *
196
+ * @param roomId - The unique identifier for the room.
197
+ */
198
+ public leaveRoom(roomId: string) {
199
+ this.socket.emit("leave-room", roomId);
200
+ }
201
+
184
202
  private setupSocket(clientCode?: string) {
185
203
  this.socket.on("connect", () => {
186
204
  if (clientCode) {