@lnltch/unitalk-sdk 1.1.4 → 1.1.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.
- package/dist/unitalk-sdk.js +51 -21
- package/dist/unitalk-sdk.umd.cjs +2 -2
- package/package.json +1 -1
- package/types/core/crosApi.d.ts +5 -0
- package/types/core/sdk.d.ts +13 -2
- package/types/index.d.ts +3 -3
package/types/core/sdk.d.ts
CHANGED
|
@@ -3,6 +3,11 @@ export interface UnitalkSDKOptions {
|
|
|
3
3
|
unitalkServerToken?: string;
|
|
4
4
|
debug?: boolean;
|
|
5
5
|
}
|
|
6
|
+
export interface AuthCodeParams {
|
|
7
|
+
clientId: string;
|
|
8
|
+
success?: (res: any) => void;
|
|
9
|
+
fail?: (error: any) => void;
|
|
10
|
+
}
|
|
6
11
|
export interface VoicePrintCfg {
|
|
7
12
|
baseH?: number;
|
|
8
13
|
maxH?: number;
|
|
@@ -31,12 +36,13 @@ export declare class UnitalkSDK {
|
|
|
31
36
|
* 设置 Unitalk 服务器 URL
|
|
32
37
|
* @param url Unitalk 服务器 URL
|
|
33
38
|
*/
|
|
34
|
-
|
|
39
|
+
setUnitalkServerUrl(url: string): void;
|
|
35
40
|
/**
|
|
36
41
|
* 设置 Unitalk 服务器 Token
|
|
37
42
|
* @param token Unitalk 服务器 Token
|
|
38
43
|
*/
|
|
39
|
-
|
|
44
|
+
setUnitalkServerToken(token: string): void;
|
|
45
|
+
getAuthCode(params: AuthCodeParams): void;
|
|
40
46
|
/**
|
|
41
47
|
* 获取连接设备图标
|
|
42
48
|
* @param idMark 设备 厂商 标记
|
|
@@ -75,6 +81,11 @@ export declare class UnitalkSDK {
|
|
|
75
81
|
checkConnection(callback?: (success?: boolean, response?: any) => void): void;
|
|
76
82
|
startRecord(params?: object, callback?: (result?: any) => void): void;
|
|
77
83
|
stopRecord(params?: object, callback?: (result?: any) => void): void;
|
|
84
|
+
getRecordSounds(): {
|
|
85
|
+
recordStartSounds: any;
|
|
86
|
+
recordStopSounds: any;
|
|
87
|
+
};
|
|
88
|
+
clearRecordSounds(): void;
|
|
78
89
|
on(eventName: string, callback: (result?: any) => void): void;
|
|
79
90
|
off(eventName: string, callback: (result?: any) => void): void;
|
|
80
91
|
/**
|
package/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UnitalkSDK } from
|
|
2
|
-
import type { UnitalkSDKOptions } from
|
|
3
|
-
export type { UnitalkSDKOptions };
|
|
1
|
+
import { UnitalkSDK } from "./core/sdk";
|
|
2
|
+
import type { UnitalkSDKOptions, AuthCodeParams } from "./core/sdk";
|
|
3
|
+
export type { UnitalkSDKOptions, AuthCodeParams };
|
|
4
4
|
export { UnitalkSDK };
|