@coze/realtime-api 1.2.1-beta.2 → 1.2.1-beta.3

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.
@@ -49,6 +49,10 @@ var EventNames = /*#__PURE__*/ function(EventNames) {
49
49
  * zh: 所有服务端事件
50
50
  */ EventNames["ALL_SERVER"] = "server.*";
51
51
  /**
52
+ * en: Room info
53
+ * zh: 房间信息
54
+ */ EventNames["ROOM_INFO"] = "client.room.info";
55
+ /**
52
56
  * en: Client connected
53
57
  * zh: 客户端连接
54
58
  */ EventNames["CONNECTED"] = "client.connected";
package/dist/cjs/index.js CHANGED
@@ -162,6 +162,10 @@ var event_names_EventNames = /*#__PURE__*/ function(EventNames) {
162
162
  * zh: 所有服务端事件
163
163
  */ EventNames["ALL_SERVER"] = "server.*";
164
164
  /**
165
+ * en: Room info
166
+ * zh: 房间信息
167
+ */ EventNames["ROOM_INFO"] = "client.room.info";
168
+ /**
165
169
  * en: Client connected
166
170
  * zh: 客户端连接
167
171
  */ EventNames["CONNECTED"] = "client.connected";
@@ -650,6 +654,12 @@ class RealtimeClient extends RealtimeEventHandler {
650
654
  this.dispatch(event_names.ERROR, error);
651
655
  throw new RealtimeAPIError(error_RealtimeError.CREATE_ROOM_ERROR, error instanceof Error ? error.message : 'Unknown error', error);
652
656
  }
657
+ this.dispatch(event_names.ROOM_INFO, {
658
+ roomId: roomInfo.room_id,
659
+ uid: roomInfo.uid,
660
+ token: roomInfo.token,
661
+ appId: roomInfo.app_id
662
+ });
653
663
  this._isTestEnv = TEST_APP_ID === roomInfo.app_id;
654
664
  // Step2 create engine
655
665
  this._client = new EngineClient(roomInfo.app_id, this._config.debug, this._isTestEnv, this._isSupportVideo, this._config.videoConfig);
@@ -12,6 +12,10 @@ var event_names_EventNames = /*#__PURE__*/ function(EventNames) {
12
12
  * zh: 所有服务端事件
13
13
  */ EventNames["ALL_SERVER"] = "server.*";
14
14
  /**
15
+ * en: Room info
16
+ * zh: 房间信息
17
+ */ EventNames["ROOM_INFO"] = "client.room.info";
18
+ /**
15
19
  * en: Client connected
16
20
  * zh: 客户端连接
17
21
  */ EventNames["CONNECTED"] = "client.connected";
package/dist/esm/index.js CHANGED
@@ -135,6 +135,10 @@ var event_names_EventNames = /*#__PURE__*/ function(EventNames) {
135
135
  * zh: 所有服务端事件
136
136
  */ EventNames["ALL_SERVER"] = "server.*";
137
137
  /**
138
+ * en: Room info
139
+ * zh: 房间信息
140
+ */ EventNames["ROOM_INFO"] = "client.room.info";
141
+ /**
138
142
  * en: Client connected
139
143
  * zh: 客户端连接
140
144
  */ EventNames["CONNECTED"] = "client.connected";
@@ -621,6 +625,12 @@ class RealtimeClient extends RealtimeEventHandler {
621
625
  this.dispatch(event_names.ERROR, error);
622
626
  throw new RealtimeAPIError(error_RealtimeError.CREATE_ROOM_ERROR, error instanceof Error ? error.message : 'Unknown error', error);
623
627
  }
628
+ this.dispatch(event_names.ROOM_INFO, {
629
+ roomId: roomInfo.room_id,
630
+ uid: roomInfo.uid,
631
+ token: roomInfo.token,
632
+ appId: roomInfo.app_id
633
+ });
624
634
  this._isTestEnv = TEST_APP_ID === roomInfo.app_id;
625
635
  // Step2 create engine
626
636
  this._client = new EngineClient(roomInfo.app_id, this._config.debug, this._isTestEnv, this._isSupportVideo, this._config.videoConfig);
@@ -14,6 +14,11 @@ declare enum EventNames {
14
14
  * zh: 所有服务端事件
15
15
  */
16
16
  ALL_SERVER = "server.*",
17
+ /**
18
+ * en: Room info
19
+ * zh: 房间信息
20
+ */
21
+ ROOM_INFO = "client.room.info",
17
22
  /**
18
23
  * en: Client connected
19
24
  * zh: 客户端连接
@@ -14,6 +14,11 @@ declare enum EventNames {
14
14
  * zh: 所有服务端事件
15
15
  */
16
16
  ALL_SERVER = "server.*",
17
+ /**
18
+ * en: Room info
19
+ * zh: 房间信息
20
+ */
21
+ ROOM_INFO = "client.room.info",
17
22
  /**
18
23
  * en: Client connected
19
24
  * zh: 客户端连接
package/dist/umd/index.js CHANGED
@@ -199,6 +199,10 @@
199
199
  * zh: 所有服务端事件
200
200
  */ EventNames["ALL_SERVER"] = "server.*";
201
201
  /**
202
+ * en: Room info
203
+ * zh: 房间信息
204
+ */ EventNames["ROOM_INFO"] = "client.room.info";
205
+ /**
202
206
  * en: Client connected
203
207
  * zh: 客户端连接
204
208
  */ EventNames["CONNECTED"] = "client.connected";
@@ -688,6 +692,12 @@
688
692
  this.dispatch(event_names.ERROR, error);
689
693
  throw new RealtimeAPIError(error_RealtimeError.CREATE_ROOM_ERROR, error instanceof Error ? error.message : 'Unknown error', error);
690
694
  }
695
+ this.dispatch(event_names.ROOM_INFO, {
696
+ roomId: roomInfo.room_id,
697
+ uid: roomInfo.uid,
698
+ token: roomInfo.token,
699
+ appId: roomInfo.app_id
700
+ });
691
701
  this._isTestEnv = TEST_APP_ID === roomInfo.app_id;
692
702
  // Step2 create engine
693
703
  this._client = new EngineClient(roomInfo.app_id, this._config.debug, this._isTestEnv, this._isSupportVideo, this._config.videoConfig);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coze/realtime-api",
3
- "version": "1.2.1-beta.2",
3
+ "version": "1.2.1-beta.3",
4
4
  "description": "A powerful real-time communication SDK for voice interactions with Coze AI bots | 扣子官方实时通信 SDK,用于与 Coze AI bots 进行语音交互",
5
5
  "keywords": [
6
6
  "coze",