@coze/realtime-api 1.0.4 → 1.0.5

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.
@@ -1 +1,23 @@
1
+ /*!
2
+ * Reconnecting WebSocket
3
+ * by Pedro Ladaria <pedro.ladaria@gmail.com>
4
+ * https://github.com/pladaria/reconnecting-websocket
5
+ * License MIT
6
+ */
7
+
8
+ /*! *****************************************************************************
9
+ Copyright (c) Microsoft Corporation. All rights reserved.
10
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
11
+ this file except in compliance with the License. You may obtain a copy of the
12
+ License at http://www.apache.org/licenses/LICENSE-2.0
13
+
14
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
16
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
17
+ MERCHANTABLITY OR NON-INFRINGEMENT.
18
+
19
+ See the Apache Version 2.0 License for specific language governing permissions
20
+ and limitations under the License.
21
+ ***************************************************************************** */
22
+
1
23
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
@@ -1,4 +1,4 @@
1
- import { type AudioPropertiesConfig, type onUserJoinedEvent, type onUserLeaveEvent, type UserMessageEvent } from '@volcengine/rtc';
1
+ import { type AudioPropertiesConfig, type IRTCEngine, type onUserJoinedEvent, type onUserLeaveEvent, type UserMessageEvent } from '@volcengine/rtc';
2
2
  import { RealtimeEventHandler } from './event-handler';
3
3
  import { type VideoConfig } from '.';
4
4
  export declare class EngineClient extends RealtimeEventHandler {
@@ -43,4 +43,5 @@ export declare class EngineClient extends RealtimeEventHandler {
43
43
  changeAIAnsExtension(enable: boolean): void;
44
44
  startAudioPlaybackDeviceTest(): Promise<void>;
45
45
  stopAudioPlaybackDeviceTest(): void;
46
+ getRtcEngine(): IRTCEngine;
46
47
  }
@@ -1,4 +1,4 @@
1
- import { type ScreenConfig, type AudioPropertiesConfig } from '@volcengine/rtc';
1
+ import { type ScreenConfig, type AudioPropertiesConfig, type IRTCEngine } from '@volcengine/rtc';
2
2
  import { type GetToken } from '@coze/api';
3
3
  import * as RealtimeUtils from './utils';
4
4
  import { RealtimeEventHandler, EventNames } from './event-handler';
@@ -14,6 +14,8 @@ export interface RealtimeClientConfig {
14
14
  botId: string /** required, Bot Id */;
15
15
  voiceId?: string /** optional, Voice Id */;
16
16
  conversationId?: string /** optional, Conversation Id */;
17
+ userId?: string /** optional, User Id */;
18
+ workflowId?: string /** optional, Workflow Id */;
17
19
  baseURL?: string /** optional, defaults to "https://api.coze.cn" */;
18
20
  debug?: boolean /** optional, defaults to false */;
19
21
  /** Whether Personal Access Tokens (PAT) are allowed in browser environments */
@@ -48,6 +50,8 @@ declare class RealtimeClient extends RealtimeEventHandler {
48
50
  * 可选,音色Id。
49
51
  * @param config.conversationId - Optional, Conversation Id. |
50
52
  * 可选,会话Id。
53
+ * @param config.userId - Optional, User Id. |
54
+ * 可选,用户Id。
51
55
  * @param config.baseURL - Optional, defaults to "https://api.coze.cn". |
52
56
  * 可选,默认值为 "https://api.coze.cn"。
53
57
  * @param config.debug - Optional, defaults to false.
@@ -138,5 +142,11 @@ declare class RealtimeClient extends RealtimeEventHandler {
138
142
  */
139
143
  setAudioOutputDevice(deviceId: string): Promise<void>;
140
144
  setVideoInputDevice(deviceId: string): Promise<void>;
145
+ /**
146
+ * en: Get the RTC engine instance, for detail visit https://www.volcengine.com/docs/6348/104481
147
+ *
148
+ * zh: 获取 RTC 引擎实例,详情请访问 https://www.volcengine.com/docs/6348/104481
149
+ */
150
+ getRtcEngine(): IRTCEngine | undefined;
141
151
  }
142
152
  export { RealtimeUtils, RealtimeClient, RealtimeAPIError, RealtimeError, EventNames, };