@lnltch/unitalk-sdk 1.1.4 → 1.1.6

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