@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.
@@ -1,10 +1,273 @@
1
- declare const _default: import("vue-demi").DefineComponent<__VLS_TypePropsToRuntimeProps<{
2
- 'nf-microphone': string;
3
- }>, {}, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {
4
- click: (event: Event) => void;
5
- }, string, Readonly<import("vue-demi").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
6
- 'nf-microphone': string;
7
- }>>>, {}>;
1
+ import { Env } from './types';
2
+ declare const _default: import("vue-demi").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
3
+ mode?: "qiankun" | "wujie" | undefined;
4
+ envMap?: Partial<Record<Env, Record<string, any>>> | undefined;
5
+ env?: Env | undefined;
6
+ agentId?: string | undefined;
7
+ agentTag?: string | undefined;
8
+ appKey?: string | undefined;
9
+ appSecret?: string | undefined;
10
+ extStatus?: string | undefined;
11
+ origin?: string | undefined;
12
+ ancestorOrigin?: string | undefined;
13
+ destinationOrigin?: string | undefined;
14
+ callShow?: "0" | "1" | undefined;
15
+ transferToLaborShow?: "0" | "1" | undefined;
16
+ restShow?: "0" | "1" | undefined;
17
+ networkDetectShow?: "0" | "1" | undefined;
18
+ muteShow?: "0" | "1" | undefined;
19
+ logShow?: "0" | "1" | undefined;
20
+ timingShow?: "0" | "1" | undefined;
21
+ signShow?: "0" | "1" | undefined;
22
+ lang?: "zh" | "en" | undefined;
23
+ name?: string | undefined;
24
+ extensionInfo?: {
25
+ status: 0 | 1;
26
+ wsRegisterAddress?: string | undefined;
27
+ wsProtocol?: string | undefined;
28
+ accountCode?: string | undefined;
29
+ } | undefined;
30
+ blackList?: string[] | undefined;
31
+ extPassword?: string | undefined;
32
+ extensionNumber?: string | undefined;
33
+ wsRegisterAddress?: string | undefined;
34
+ wsProtocol?: string | undefined;
35
+ isOem?: boolean | undefined;
36
+ numberKeyBoard?: boolean | undefined;
37
+ accessMode?: "mobile" | "pc" | undefined;
38
+ sipHeaders?: string[] | undefined;
39
+ sgGateway?: string | undefined;
40
+ open?: string | undefined;
41
+ sgOpen?: string | undefined;
42
+ sgDomain?: string | undefined;
43
+ sgBase?: string | undefined;
44
+ token?: string | undefined;
45
+ timeZone?: string | undefined;
46
+ getOfflineInfo?: Function | undefined;
47
+ changeALittleRest?: Function | undefined;
48
+ quickCallWin?: Function | undefined;
49
+ phoneRegex?: string | undefined;
50
+ account?: string | undefined;
51
+ extAccount?: string | undefined;
52
+ socketHost?: string | undefined;
53
+ sid?: number | undefined;
54
+ uid?: number | undefined;
55
+ newUserId?: number | undefined;
56
+ companyId?: number | undefined;
57
+ company?: string | undefined;
58
+ countryId?: number | undefined;
59
+ countryName?: string | undefined;
60
+ authUserType?: 2 | 1 | 4 | 3 | undefined;
61
+ userType?: 2 | 1 | 4 | 3 | undefined;
62
+ recordPath?: string | undefined;
63
+ constMap?: Record<string, any> | undefined;
64
+ }>, {
65
+ mode: string;
66
+ envMap: () => {
67
+ dev: {
68
+ host: string;
69
+ port: string;
70
+ base: string;
71
+ };
72
+ test: {
73
+ host: string;
74
+ port: string;
75
+ base: string;
76
+ };
77
+ sg: {
78
+ host: string;
79
+ port: string;
80
+ base: string;
81
+ };
82
+ gray: {
83
+ host: string;
84
+ port: number;
85
+ base: string;
86
+ };
87
+ prod: {
88
+ host: string;
89
+ port: number;
90
+ base: string;
91
+ };
92
+ };
93
+ env: string;
94
+ extStatus: string;
95
+ origin: string;
96
+ ancestorOrigin: string;
97
+ destinationOrigin: string;
98
+ callShow: string;
99
+ transferToLaborShow: string;
100
+ restShow: string;
101
+ networkDetectShow: string;
102
+ muteShow: string;
103
+ logShow: string;
104
+ timingShow: string;
105
+ signShow: string;
106
+ lang: string;
107
+ name: string;
108
+ blackList: () => string[];
109
+ isOem: boolean;
110
+ accessMode: string;
111
+ numberKeyBoard: boolean;
112
+ sgOpen: string;
113
+ open: string;
114
+ }>, {
115
+ connect: () => void;
116
+ disconnect: () => void;
117
+ seatsStatusChange: (status: boolean) => void;
118
+ accept: () => void;
119
+ ignore: () => void;
120
+ hangup: () => void;
121
+ sendDtmf: () => void;
122
+ changeServerToRegister: () => void;
123
+ }, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {
124
+ "softphone-connect": (event: any) => void;
125
+ "softphone-seats-status-change": (event: any) => void;
126
+ "softphone-accept": (event: any) => void;
127
+ "softphone-ignore": (event: any) => void;
128
+ "softphone-hangup": (event: any) => void;
129
+ "softphone-send-dtmf": (event: any) => void;
130
+ "softphone-call-refresh": (event: any) => void;
131
+ "softphone-session-state-change": (event: any) => void;
132
+ "softphone-incoming": (event: any) => void;
133
+ "softphone-connect-registered": (event: any) => void;
134
+ }, string, Readonly<import("vue-demi").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
135
+ mode?: "qiankun" | "wujie" | undefined;
136
+ envMap?: Partial<Record<Env, Record<string, any>>> | undefined;
137
+ env?: Env | undefined;
138
+ agentId?: string | undefined;
139
+ agentTag?: string | undefined;
140
+ appKey?: string | undefined;
141
+ appSecret?: string | undefined;
142
+ extStatus?: string | undefined;
143
+ origin?: string | undefined;
144
+ ancestorOrigin?: string | undefined;
145
+ destinationOrigin?: string | undefined;
146
+ callShow?: "0" | "1" | undefined;
147
+ transferToLaborShow?: "0" | "1" | undefined;
148
+ restShow?: "0" | "1" | undefined;
149
+ networkDetectShow?: "0" | "1" | undefined;
150
+ muteShow?: "0" | "1" | undefined;
151
+ logShow?: "0" | "1" | undefined;
152
+ timingShow?: "0" | "1" | undefined;
153
+ signShow?: "0" | "1" | undefined;
154
+ lang?: "zh" | "en" | undefined;
155
+ name?: string | undefined;
156
+ extensionInfo?: {
157
+ status: 0 | 1;
158
+ wsRegisterAddress?: string | undefined;
159
+ wsProtocol?: string | undefined;
160
+ accountCode?: string | undefined;
161
+ } | undefined;
162
+ blackList?: string[] | undefined;
163
+ extPassword?: string | undefined;
164
+ extensionNumber?: string | undefined;
165
+ wsRegisterAddress?: string | undefined;
166
+ wsProtocol?: string | undefined;
167
+ isOem?: boolean | undefined;
168
+ numberKeyBoard?: boolean | undefined;
169
+ accessMode?: "mobile" | "pc" | undefined;
170
+ sipHeaders?: string[] | undefined;
171
+ sgGateway?: string | undefined;
172
+ open?: string | undefined;
173
+ sgOpen?: string | undefined;
174
+ sgDomain?: string | undefined;
175
+ sgBase?: string | undefined;
176
+ token?: string | undefined;
177
+ timeZone?: string | undefined;
178
+ getOfflineInfo?: Function | undefined;
179
+ changeALittleRest?: Function | undefined;
180
+ quickCallWin?: Function | undefined;
181
+ phoneRegex?: string | undefined;
182
+ account?: string | undefined;
183
+ extAccount?: string | undefined;
184
+ socketHost?: string | undefined;
185
+ sid?: number | undefined;
186
+ uid?: number | undefined;
187
+ newUserId?: number | undefined;
188
+ companyId?: number | undefined;
189
+ company?: string | undefined;
190
+ countryId?: number | undefined;
191
+ countryName?: string | undefined;
192
+ authUserType?: 2 | 1 | 4 | 3 | undefined;
193
+ userType?: 2 | 1 | 4 | 3 | undefined;
194
+ recordPath?: string | undefined;
195
+ constMap?: Record<string, any> | undefined;
196
+ }>, {
197
+ mode: string;
198
+ envMap: () => {
199
+ dev: {
200
+ host: string;
201
+ port: string;
202
+ base: string;
203
+ };
204
+ test: {
205
+ host: string;
206
+ port: string;
207
+ base: string;
208
+ };
209
+ sg: {
210
+ host: string;
211
+ port: string;
212
+ base: string;
213
+ };
214
+ gray: {
215
+ host: string;
216
+ port: number;
217
+ base: string;
218
+ };
219
+ prod: {
220
+ host: string;
221
+ port: number;
222
+ base: string;
223
+ };
224
+ };
225
+ env: string;
226
+ extStatus: string;
227
+ origin: string;
228
+ ancestorOrigin: string;
229
+ destinationOrigin: string;
230
+ callShow: string;
231
+ transferToLaborShow: string;
232
+ restShow: string;
233
+ networkDetectShow: string;
234
+ muteShow: string;
235
+ logShow: string;
236
+ timingShow: string;
237
+ signShow: string;
238
+ lang: string;
239
+ name: string;
240
+ blackList: () => string[];
241
+ isOem: boolean;
242
+ accessMode: string;
243
+ numberKeyBoard: boolean;
244
+ sgOpen: string;
245
+ open: string;
246
+ }>>>, {
247
+ mode: 'qiankun' | 'wujie';
248
+ envMap: Partial<Record<Env, Record<string, any>>>;
249
+ env: Env;
250
+ extStatus: string;
251
+ origin: string;
252
+ ancestorOrigin: string;
253
+ destinationOrigin: string;
254
+ callShow: '0' | '1';
255
+ transferToLaborShow: '0' | '1';
256
+ restShow: '0' | '1';
257
+ networkDetectShow: '0' | '1';
258
+ muteShow: '0' | '1';
259
+ logShow: '0' | '1';
260
+ timingShow: '0' | '1';
261
+ signShow: '0' | '1';
262
+ lang: 'zh' | 'en';
263
+ name: string;
264
+ blackList: string[];
265
+ isOem: boolean;
266
+ numberKeyBoard: boolean;
267
+ accessMode: 'mobile' | 'pc';
268
+ open: string;
269
+ sgOpen: string;
270
+ }>;
8
271
  export default _default;
9
272
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
10
273
  type __VLS_TypePropsToRuntimeProps<T> = {
@@ -15,3 +278,11 @@ type __VLS_TypePropsToRuntimeProps<T> = {
15
278
  required: true;
16
279
  };
17
280
  };
281
+ type __VLS_WithDefaults<P, D> = {
282
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
283
+ default: D[K];
284
+ }> : P[K];
285
+ };
286
+ type __VLS_Prettify<T> = {
287
+ [K in keyof T]: T[K];
288
+ } & {};
package/lib/types.d.ts ADDED
@@ -0,0 +1,76 @@
1
+ export type Env = 'test' | 'dev' | 'sg' | 'gray' | 'prod';
2
+ export type Option = {
3
+ mode?: 'qiankun' | 'wujie';
4
+ envMap?: Partial<Record<Env, Record<string, any>>>;
5
+ env?: Env;
6
+ agentId?: string;
7
+ agentTag?: string;
8
+ appKey?: string;
9
+ appSecret?: string;
10
+ extStatus?: string;
11
+ origin?: string;
12
+ ancestorOrigin?: string;
13
+ destinationOrigin?: string;
14
+ callShow?: '0' | '1';
15
+ transferToLaborShow?: '0' | '1';
16
+ restShow?: '0' | '1';
17
+ networkDetectShow?: '0' | '1';
18
+ muteShow?: '0' | '1';
19
+ logShow?: '0' | '1';
20
+ timingShow?: '0' | '1';
21
+ signShow?: '0' | '1';
22
+ lang?: 'zh' | 'en';
23
+ name?: string;
24
+ extensionInfo?: {
25
+ status: 0 | 1;
26
+ wsRegisterAddress?: string;
27
+ wsProtocol?: string;
28
+ accountCode?: string;
29
+ };
30
+ blackList?: string[];
31
+ extPassword?: string;
32
+ extensionNumber?: string;
33
+ wsRegisterAddress?: string;
34
+ wsProtocol?: string;
35
+ isOem?: boolean;
36
+ numberKeyBoard?: boolean;
37
+ accessMode?: 'mobile' | 'pc';
38
+ sipHeaders?: string[];
39
+ sgGateway?: string;
40
+ open?: string;
41
+ sgOpen?: string;
42
+ sgDomain?: string;
43
+ sgBase?: string;
44
+ token?: string;
45
+ timeZone?: string;
46
+ getOfflineInfo?: Function;
47
+ changeALittleRest?: Function;
48
+ quickCallWin?: Function;
49
+ phoneRegex?: string;
50
+ account?: string;
51
+ extAccount?: string;
52
+ socketHost?: string;
53
+ sid?: number;
54
+ uid?: number;
55
+ newUserId?: number;
56
+ companyId?: number;
57
+ company?: string;
58
+ countryId?: number;
59
+ countryName?: string;
60
+ authUserType?: 4 | 3 | 2 | 1;
61
+ userType?: 4 | 3 | 2 | 1;
62
+ recordPath?: string;
63
+ constMap?: Record<string, any>;
64
+ el: string;
65
+ instanceMap: Record<string, any>;
66
+ softphoneConnectCallBack: Function;
67
+ softphoneCallRefreshCallBack: Function;
68
+ softphoneSeatStatusChangeCallBack: Function;
69
+ softphoneAcceptCallBack: Function;
70
+ softphoneIgnoreCallBack: Function;
71
+ softphoneHangupCallBack: Function;
72
+ softphoneSessionStateChangeCallBack: Function;
73
+ softphoneIncomingCallBack: Function;
74
+ softphoneSendDtmfCallBack: Function;
75
+ softphoneConnectRegisteredCallBack: Function;
76
+ };
package/lib/util.d.ts ADDED
@@ -0,0 +1 @@
1
+ export declare function isDomainOrIP(str: string): boolean;
package/package/index.ts CHANGED
@@ -1,8 +1,16 @@
1
1
  import NfMicrophone from './nf-microphone.vue'
2
2
  import { Vue2, PluginObject } from 'vue-demi'
3
+ import softphoneManager, { SoftphoneManager } from './microphone'
3
4
 
4
5
  NfMicrophone.install = (app: typeof Vue2) => {
6
+ app!.prototype.$softphoneManager = softphoneManager
7
+ NfMicrophone.$softphoneManager = softphoneManager
5
8
  app!.component('nf-microphone', NfMicrophone)
6
9
  }
7
10
 
8
- export default NfMicrophone as typeof NfMicrophone & PluginObject<undefined>
11
+ export default NfMicrophone as typeof NfMicrophone & PluginObject<undefined>
12
+
13
+ export {
14
+ softphoneManager,
15
+ SoftphoneManager
16
+ }