@94ai/nf-microphone 3.3.36 → 3.3.37
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/lib/index.d.ts +1412 -18
- package/lib/microphone.d.ts +17 -0
- package/lib/nf-microphone.cjs.js +17017 -17
- package/lib/nf-microphone.esm-bundler.js +17016 -16
- package/lib/nf-microphone.vue.d.ts +278 -7
- package/lib/types.d.ts +76 -0
- package/lib/util.d.ts +1 -0
- package/package/index.ts +9 -1
- package/package/microphone.ts +746 -0
- package/package/nf-microphone.vue +846 -14
- package/package/types.ts +114 -0
- package/package/util.ts +17 -0
- package/package.json +6 -4
package/package/types.ts
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
export type Env = 'test' |'dev'| 'sg'| 'gray'| 'prod'
|
|
2
|
+
|
|
3
|
+
export type Option = {
|
|
4
|
+
mode?: 'qiankun' | 'wujie'
|
|
5
|
+
|
|
6
|
+
envMap?: Partial<Record<Env, Record<string, any>>>,
|
|
7
|
+
env?: Env,
|
|
8
|
+
|
|
9
|
+
agentId?: string,
|
|
10
|
+
agentTag?: string,
|
|
11
|
+
appKey?: string,
|
|
12
|
+
appSecret?: string,
|
|
13
|
+
extStatus?: string,
|
|
14
|
+
|
|
15
|
+
origin?: string,
|
|
16
|
+
ancestorOrigin?: string,
|
|
17
|
+
destinationOrigin?: string,
|
|
18
|
+
|
|
19
|
+
callShow?: '0' | '1',
|
|
20
|
+
transferToLaborShow?: '0' | '1',
|
|
21
|
+
restShow?: '0' | '1',
|
|
22
|
+
networkDetectShow?: '0' | '1',
|
|
23
|
+
muteShow?: '0' | '1',
|
|
24
|
+
logShow?: '0' | '1',
|
|
25
|
+
timingShow?: '0' | '1',
|
|
26
|
+
signShow?: '0' | '1',
|
|
27
|
+
|
|
28
|
+
lang?: 'zh' | 'en',
|
|
29
|
+
|
|
30
|
+
name?: string,
|
|
31
|
+
|
|
32
|
+
extensionInfo?: {
|
|
33
|
+
/** 软电话状态 { status: 0 | 1 } 0 未签入 1 已签入 */
|
|
34
|
+
status: 0 | 1
|
|
35
|
+
/** socket地址 */
|
|
36
|
+
wsRegisterAddress?: string,
|
|
37
|
+
/** socket协议 */
|
|
38
|
+
wsProtocol?: string,
|
|
39
|
+
/** 分机号 */
|
|
40
|
+
accountCode?: string
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
blackList?: string[],
|
|
44
|
+
|
|
45
|
+
extPassword?: string,
|
|
46
|
+
extensionNumber?: string,
|
|
47
|
+
wsRegisterAddress?: string,
|
|
48
|
+
wsProtocol?: string,
|
|
49
|
+
|
|
50
|
+
isOem?: boolean,
|
|
51
|
+
numberKeyBoard?: boolean,
|
|
52
|
+
|
|
53
|
+
accessMode?: 'mobile' | 'pc',
|
|
54
|
+
sipHeaders?: string[],
|
|
55
|
+
sgGateway?: string,
|
|
56
|
+
open?: string,
|
|
57
|
+
|
|
58
|
+
sgOpen?: string,
|
|
59
|
+
sgDomain?: string,
|
|
60
|
+
sgBase?: string,
|
|
61
|
+
|
|
62
|
+
token?: string,
|
|
63
|
+
timeZone?: string,
|
|
64
|
+
|
|
65
|
+
getOfflineInfo?: Function
|
|
66
|
+
changeALittleRest?: Function
|
|
67
|
+
quickCallWin?: Function
|
|
68
|
+
|
|
69
|
+
/** 校验号码正则 */
|
|
70
|
+
phoneRegex?: string
|
|
71
|
+
/** 坐席账号 */
|
|
72
|
+
account?: string,
|
|
73
|
+
/** 分机号 */
|
|
74
|
+
extAccount?: string,
|
|
75
|
+
/** socketHost地址 */
|
|
76
|
+
socketHost?: string,
|
|
77
|
+
/** 坐席id */
|
|
78
|
+
sid?: number,
|
|
79
|
+
/** 唯一id */
|
|
80
|
+
uid?: number,
|
|
81
|
+
/** 用户id */
|
|
82
|
+
newUserId?: number,
|
|
83
|
+
/** 公司id */
|
|
84
|
+
companyId?: number,
|
|
85
|
+
/** 公司名 */
|
|
86
|
+
company?: string
|
|
87
|
+
/** 国家id */
|
|
88
|
+
countryId?: number,
|
|
89
|
+
/** 国家名 */
|
|
90
|
+
countryName?: string,
|
|
91
|
+
/** 用户类型, 2是企业主账号、3是员工子账号、4是坐席账号 */
|
|
92
|
+
authUserType?: 4 | 3 | 2 | 1
|
|
93
|
+
/** 用户类型,1是超级管理员,2是企业用户,3普通用户,4坐席用户 */
|
|
94
|
+
userType?: 4 | 3 | 2 | 1
|
|
95
|
+
/** 语音文件前缀 */
|
|
96
|
+
recordPath?: string,
|
|
97
|
+
/** constMap */
|
|
98
|
+
constMap?: Record<string, any>,
|
|
99
|
+
|
|
100
|
+
el: string
|
|
101
|
+
|
|
102
|
+
instanceMap: Record<string, any>,
|
|
103
|
+
|
|
104
|
+
softphoneConnectCallBack: Function
|
|
105
|
+
softphoneCallRefreshCallBack: Function
|
|
106
|
+
softphoneSeatStatusChangeCallBack: Function
|
|
107
|
+
softphoneAcceptCallBack: Function
|
|
108
|
+
softphoneIgnoreCallBack: Function
|
|
109
|
+
softphoneHangupCallBack: Function
|
|
110
|
+
softphoneSessionStateChangeCallBack: Function
|
|
111
|
+
softphoneIncomingCallBack: Function
|
|
112
|
+
softphoneSendDtmfCallBack: Function
|
|
113
|
+
softphoneConnectRegisteredCallBack: Function
|
|
114
|
+
}
|
package/package/util.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export function isDomainOrIP (str: string) {
|
|
2
|
+
const ipPattern = /^(\d{1,3}\.){3}\d{1,3}$/
|
|
3
|
+
const domainPattern = /^[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z]{2,}$/
|
|
4
|
+
if (ipPattern.test(str)) {
|
|
5
|
+
return true
|
|
6
|
+
}
|
|
7
|
+
if (str.slice(0, 2) === '//') {
|
|
8
|
+
return domainPattern.test(str.slice(2, str.length))
|
|
9
|
+
}
|
|
10
|
+
if (str.slice(0, 7) === 'http://') {
|
|
11
|
+
return domainPattern.test(str.slice(7, str.length))
|
|
12
|
+
}
|
|
13
|
+
if (str.slice(0, 8) === 'https://') {
|
|
14
|
+
return domainPattern.test(str.slice(8, str.length))
|
|
15
|
+
}
|
|
16
|
+
return domainPattern.test(str)
|
|
17
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@94ai/nf-microphone",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.37",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "zoujiahe <zoujiahe@94ai.com>",
|
|
@@ -14,9 +14,11 @@
|
|
|
14
14
|
"url": "http://94ai.gitlab.com/ui/common-ui.git"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@94ai/nf-theme-chalk": "^3.3.
|
|
17
|
+
"@94ai/nf-theme-chalk": "^3.3.37",
|
|
18
|
+
"crypto-js": "^4.2.0",
|
|
18
19
|
"qiankun": "^2.10.16",
|
|
19
|
-
"vue-demi": "^0.14.5"
|
|
20
|
+
"vue-demi": "^0.14.5",
|
|
21
|
+
"wujie": "^1.0.22"
|
|
20
22
|
},
|
|
21
23
|
"peerDependenciesMeta": {
|
|
22
24
|
"@vue/composition-api": {
|
|
@@ -31,5 +33,5 @@
|
|
|
31
33
|
"types": "lib/index.d.ts",
|
|
32
34
|
"main": "lib/nf-microphone.cjs.js",
|
|
33
35
|
"module": "lib/nf-microphone.esm-bundler.js",
|
|
34
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "96262c713f0e9d8a47f1c94875d504c89097aa7f"
|
|
35
37
|
}
|