ysyt-agent-sdk 1.0.74 → 1.0.76
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/dist/src/core/api-client.d.ts +1 -0
- package/dist/src/core/sip-client.d.ts +28 -0
- package/dist/src/index.d.ts +1 -1
- package/dist/src/internal/_internalStore.d.ts +2 -1
- package/dist/src/types/index.d.ts +40 -0
- package/dist/src/utils/http.d.ts +1 -0
- package/dist/ysyt-agent-sdk.cjs.js +5 -5
- package/dist/ysyt-agent-sdk.esm.js +5 -5
- package/dist/ysyt-agent-sdk.umd.js +5 -5
- package/package.json +1 -1
|
@@ -28,6 +28,34 @@ export declare class SIPClient {
|
|
|
28
28
|
private handleOnline;
|
|
29
29
|
/**
|
|
30
30
|
* 启动 SIP 客户端(创建 userAgent 实例、注册)
|
|
31
|
+
* 字段 说明
|
|
32
|
+
* allowLegacyNotifications 是否允许接收 会话外的 NOTIFY 请求。RFC 6665 废弃了这种用法,默认 false。
|
|
33
|
+
* authorizationHa1 直接提供 Digest 认证的 HA1 值(用户名、域、密码的哈希)。
|
|
34
|
+
* authorizationPassword 认证密码(常用)。
|
|
35
|
+
* authorizationUsername 认证用户名(常用)。
|
|
36
|
+
* contactName Contact URI 里 user 部分(如果不填会随机生成)。
|
|
37
|
+
* contactParams Contact URI 的参数,默认 { transport: "ws" }。
|
|
38
|
+
* delegate 事件回调接口,例如处理来电、消息等。
|
|
39
|
+
* displayName From 头里的显示名称(对方看到的主叫名称)。
|
|
40
|
+
* forceRport 是否强制在 Via 头加 rport 参数。
|
|
41
|
+
* gracefulShutdown stop() 时是否优雅断开,结束所有注册和对话。
|
|
42
|
+
* hackIpInContact 过时参数,用来强行修改 Contact 里的 IP。
|
|
43
|
+
* instanceId "+sip.instance" Contact 参数值,默认随机 UUID。
|
|
44
|
+
* instanceIdAlwaysAdded 是否强制在所有请求 Contact 里加 "+sip.instance" 参数。
|
|
45
|
+
* logBuiltinEnabled 是否允许写日志到控制台。
|
|
46
|
+
* logConfiguration 是否打印 UA 配置。
|
|
47
|
+
* logLevel 日志级别(log/debug/warn/error)。
|
|
48
|
+
* noAnswerTimeout 呼叫未接听的超时时间(秒)。
|
|
49
|
+
* preloadedRouteSet 给所有请求预先加上 Route 头(数组)。
|
|
50
|
+
* sendInitialProvisionalResponse 对于呼入 INVITE,是否自动发送 180 Ringing 等临时响应。
|
|
51
|
+
* sipExtension100rel 是否支持 100rel(可靠临时响应)。
|
|
52
|
+
* sipExtensionReplaces 是否支持 Replaces 头(呼叫替换)。
|
|
53
|
+
* sipExtensionExtraSupported 手动添加 Supported 头里的额外扩展标签。
|
|
54
|
+
* transportConstructor 自定义 Transport 构造函数,默认 WebSocketTransport。
|
|
55
|
+
* transportOptions 传给 transport 的参数(如 ws/wss URL)。
|
|
56
|
+
* uri UA 的地址(通常是 sip:xxx@domain)。
|
|
57
|
+
* userAgentString User-Agent 头部的值。
|
|
58
|
+
* viaHost Via 头里的 host 值,默认随机生成。
|
|
31
59
|
*/
|
|
32
60
|
start(): Promise<void>;
|
|
33
61
|
/**
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { AgentDataType, AgentItemType, AgentStateDataType, DeviceType, InitInfoType, RequestBodyType, StateType, Events } from './types';
|
|
2
2
|
export type * from './types';
|
|
3
3
|
export * from './types/Enum';
|
|
4
4
|
declare class YSYTAgentSdk {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { AgentObjectType } from '@/types';
|
|
1
|
+
import { AgentObjectType, EmployeeDetailType } from '@/types';
|
|
2
2
|
import { AgentStatus } from '@/types/Enum';
|
|
3
3
|
type InternalState = {
|
|
4
4
|
agentInfo: AgentObjectType;
|
|
5
|
+
globalInfo: EmployeeDetailType;
|
|
5
6
|
isRtcReconnecting: boolean;
|
|
6
7
|
sessionId: string;
|
|
7
8
|
enableBrowserAlert: boolean;
|
|
@@ -142,6 +142,46 @@ export interface CallCrmObject {
|
|
|
142
142
|
*/
|
|
143
143
|
province: string;
|
|
144
144
|
}
|
|
145
|
+
export interface EmployeeDetailType {
|
|
146
|
+
/**
|
|
147
|
+
* 自动切换状态,0:关闭 1:开启
|
|
148
|
+
*/
|
|
149
|
+
auto_switch_state: 0 | 1;
|
|
150
|
+
/**
|
|
151
|
+
* 默认登录设备,1:软电话 2:手机模式 3:SIP 话机
|
|
152
|
+
*/
|
|
153
|
+
default_device: DeviceType;
|
|
154
|
+
/**
|
|
155
|
+
* 座席手机号禁止重复,0:关闭 1:开启
|
|
156
|
+
*/
|
|
157
|
+
forbid_agent_phone_repeat: 0 | 1;
|
|
158
|
+
/**
|
|
159
|
+
* 禁止话机摘机外呼,0:关闭 1:开启
|
|
160
|
+
*/
|
|
161
|
+
forbid_sip_call: 0 | 1;
|
|
162
|
+
/**
|
|
163
|
+
* 初始状态,1:空闲 2:忙碌
|
|
164
|
+
*/
|
|
165
|
+
init_state: 1 | 2;
|
|
166
|
+
/**
|
|
167
|
+
* 登出自动迁离线接听,0:关闭 1:开启
|
|
168
|
+
*/
|
|
169
|
+
logout_auto_offline_answer: 0 | 1;
|
|
170
|
+
/**
|
|
171
|
+
* 未接次数
|
|
172
|
+
*/
|
|
173
|
+
missed_calls_count: number;
|
|
174
|
+
/**
|
|
175
|
+
* 话后处理时间,单位秒
|
|
176
|
+
*/
|
|
177
|
+
post_call_process_time: number;
|
|
178
|
+
/**
|
|
179
|
+
* 电话条是否显示满意度,0:否 1:是
|
|
180
|
+
*/
|
|
181
|
+
show_satisfaction: 0 | 1;
|
|
182
|
+
enable_default_device_selection: 0 | 1;
|
|
183
|
+
enable_init_state_selection: 0 | 1;
|
|
184
|
+
}
|
|
145
185
|
export interface AgentDataType {
|
|
146
186
|
agent_no: string;
|
|
147
187
|
agent_name: string;
|
package/dist/src/utils/http.d.ts
CHANGED