@hyext/types-ext-sdk-hy 3.17.0-beta.9 → 3.17.0
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/index.d.ts +271 -25
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -853,6 +853,12 @@ namespace advance {
|
|
|
853
853
|
* @param params - 礼物信息
|
|
854
854
|
*/
|
|
855
855
|
function sendGiftToUser(params: SendGiftTUInfo): Promise<void>;
|
|
856
|
+
/**
|
|
857
|
+
* 定制送礼接口
|
|
858
|
+
* @param params - 参数
|
|
859
|
+
* @returns 调用结果
|
|
860
|
+
*/
|
|
861
|
+
function sendActivityGift(params: SendActivityGiftReq): Promise<SendActivityGiftRsp>;
|
|
856
862
|
/**
|
|
857
863
|
* 获取交友直播间上麦用户信息
|
|
858
864
|
* @returns 上麦用户信息列表
|
|
@@ -992,6 +998,24 @@ namespace advance {
|
|
|
992
998
|
* @returns 调用结果
|
|
993
999
|
*/
|
|
994
1000
|
function offCommonQueueStatusChange(params: OffCommonQueueStatusChangeReq): Promise<void>;
|
|
1001
|
+
/**
|
|
1002
|
+
* 获取直播间当前特效状态
|
|
1003
|
+
* @param params - 参数
|
|
1004
|
+
* @returns 调用结果
|
|
1005
|
+
*/
|
|
1006
|
+
function getLiveroomEffectStatus(params: GetLiveroomEffectStatusReq): Promise<GetLiveroomEffectStatusRsp>;
|
|
1007
|
+
/**
|
|
1008
|
+
* 监听直播间特效状态变化
|
|
1009
|
+
* @param params - 参数
|
|
1010
|
+
* @returns 调用结果
|
|
1011
|
+
*/
|
|
1012
|
+
function onLiveroomEffectStatusChange(params: OnLiveroomEffectStatusChangeReq): Promise<void>;
|
|
1013
|
+
/**
|
|
1014
|
+
* 取消监听直播间特效状态变化
|
|
1015
|
+
* @param params - 参数
|
|
1016
|
+
* @returns 调用结果
|
|
1017
|
+
*/
|
|
1018
|
+
function offLiveroomEffectStatusChange(params: OffLiveroomEffectStatusChangeReq): Promise<void>;
|
|
995
1019
|
}
|
|
996
1020
|
|
|
997
1021
|
/**
|
|
@@ -1309,6 +1333,38 @@ type SendGiftTUInfo = {
|
|
|
1309
1333
|
mapParam?: any;
|
|
1310
1334
|
};
|
|
1311
1335
|
|
|
1336
|
+
/**
|
|
1337
|
+
* 定制送礼接口结果
|
|
1338
|
+
* @property code - 端上送礼结果返回, 0-成功, 1-余额不足, 2-弹窗确认取消送出, 3-需要鉴权的礼物没有这个身份(比如守护、贵族), 4-断网
|
|
1339
|
+
* @property err - 错误信息
|
|
1340
|
+
* @property consumeRsp - 接口回包的base64字符串
|
|
1341
|
+
*/
|
|
1342
|
+
type SendActivityGiftRsp = {
|
|
1343
|
+
code: number;
|
|
1344
|
+
err: string;
|
|
1345
|
+
consumeRsp: string;
|
|
1346
|
+
};
|
|
1347
|
+
|
|
1348
|
+
/**
|
|
1349
|
+
* 定制送礼接口参数
|
|
1350
|
+
* @property giftId - giftId
|
|
1351
|
+
* @property giftCount - giftCount
|
|
1352
|
+
* @property [useSelectMic] - useSelectMic
|
|
1353
|
+
* @property sourceType - sourceTyp
|
|
1354
|
+
* @property [mapParam] - mapParam
|
|
1355
|
+
* @property [uid] - uid
|
|
1356
|
+
* @property [secondConfirm] - secondConfirm
|
|
1357
|
+
*/
|
|
1358
|
+
type SendActivityGiftReq = {
|
|
1359
|
+
giftId: number;
|
|
1360
|
+
giftCount: number;
|
|
1361
|
+
useSelectMic?: boolean;
|
|
1362
|
+
sourceType: string;
|
|
1363
|
+
mapParam?: any;
|
|
1364
|
+
uid?: string;
|
|
1365
|
+
secondConfirm?: boolean;
|
|
1366
|
+
};
|
|
1367
|
+
|
|
1312
1368
|
/**
|
|
1313
1369
|
* 上麦用户信息
|
|
1314
1370
|
* @property uid - 用户的uid
|
|
@@ -1671,6 +1727,55 @@ type OffCommonQueueStatusChangeReq = {
|
|
|
1671
1727
|
type: string;
|
|
1672
1728
|
};
|
|
1673
1729
|
|
|
1730
|
+
/**
|
|
1731
|
+
* 获取直播间当前特效状态结果
|
|
1732
|
+
* @property id - 当前生效的特效,id为空则表示没有此类型的特效在播
|
|
1733
|
+
*/
|
|
1734
|
+
type GetLiveroomEffectStatusRsp = {
|
|
1735
|
+
id: string;
|
|
1736
|
+
};
|
|
1737
|
+
|
|
1738
|
+
/**
|
|
1739
|
+
* 获取直播间当前特效状态参数
|
|
1740
|
+
* @property type - 类型
|
|
1741
|
+
*/
|
|
1742
|
+
type GetLiveroomEffectStatusReq = {
|
|
1743
|
+
type: string;
|
|
1744
|
+
};
|
|
1745
|
+
|
|
1746
|
+
/**
|
|
1747
|
+
* 队列状态变化
|
|
1748
|
+
* @property id - 特效id
|
|
1749
|
+
* @property status - 状态, show-显示, hide-隐藏
|
|
1750
|
+
*/
|
|
1751
|
+
type LiveroomEffectStatus = {
|
|
1752
|
+
id: string;
|
|
1753
|
+
status: string;
|
|
1754
|
+
};
|
|
1755
|
+
|
|
1756
|
+
/**
|
|
1757
|
+
* @param status - 回调参数
|
|
1758
|
+
*/
|
|
1759
|
+
type LiveroomEffectStatusChange = (status: LiveroomEffectStatus) => void;
|
|
1760
|
+
|
|
1761
|
+
/**
|
|
1762
|
+
* 监听直播间特效状态变化参数
|
|
1763
|
+
* @property type - 类型
|
|
1764
|
+
* @property callback - 特效状态变化回调
|
|
1765
|
+
*/
|
|
1766
|
+
type OnLiveroomEffectStatusChangeReq = {
|
|
1767
|
+
type: string;
|
|
1768
|
+
callback: LiveroomEffectStatusChange;
|
|
1769
|
+
};
|
|
1770
|
+
|
|
1771
|
+
/**
|
|
1772
|
+
* 取消监听直播间特效状态变化参数
|
|
1773
|
+
* @property type - 类型
|
|
1774
|
+
*/
|
|
1775
|
+
type OffLiveroomEffectStatusChangeReq = {
|
|
1776
|
+
type: string;
|
|
1777
|
+
};
|
|
1778
|
+
|
|
1674
1779
|
/**
|
|
1675
1780
|
* app模块
|
|
1676
1781
|
*/
|
|
@@ -1724,6 +1829,129 @@ function onAppear(callback: LifeCallback): void;
|
|
|
1724
1829
|
*/
|
|
1725
1830
|
function onDisappear(callback: LifeCallback): void;
|
|
1726
1831
|
|
|
1832
|
+
/**
|
|
1833
|
+
* audio模块
|
|
1834
|
+
*/
|
|
1835
|
+
namespace audio {
|
|
1836
|
+
/**
|
|
1837
|
+
* 创建音频播放器
|
|
1838
|
+
* @param params - 传入参数
|
|
1839
|
+
* @returns 调用结果
|
|
1840
|
+
*/
|
|
1841
|
+
function createAudio(params: CreateAudioReq): Promise<CreateAudioRsp>;
|
|
1842
|
+
/**
|
|
1843
|
+
* 监听音频播放器事件
|
|
1844
|
+
* @param params - 传入参数
|
|
1845
|
+
* @returns 调用结果
|
|
1846
|
+
*/
|
|
1847
|
+
function onAudioNotices(params: OnAudioNoticesReq): Promise<void>;
|
|
1848
|
+
/**
|
|
1849
|
+
* 取消监听音频播放器事件
|
|
1850
|
+
* @param [params] - 传入参数
|
|
1851
|
+
* @returns 调用结果
|
|
1852
|
+
*/
|
|
1853
|
+
function offAudioNotices(params?: OffAudioNoticesReq): Promise<void>;
|
|
1854
|
+
/**
|
|
1855
|
+
* 播放音频
|
|
1856
|
+
* @param params - 传入参数
|
|
1857
|
+
* @returns 调用结果
|
|
1858
|
+
*/
|
|
1859
|
+
function playAudio(params: PlayAudioReq): Promise<void>;
|
|
1860
|
+
/**
|
|
1861
|
+
* 停止音频播放
|
|
1862
|
+
* @param params - 传入参数
|
|
1863
|
+
* @returns 调用结果
|
|
1864
|
+
*/
|
|
1865
|
+
function stopAudio(params: StopAudioReq): Promise<void>;
|
|
1866
|
+
/**
|
|
1867
|
+
* 音频是否在播放中
|
|
1868
|
+
* @param params - 传入参数
|
|
1869
|
+
* @returns 调用结果
|
|
1870
|
+
*/
|
|
1871
|
+
function isAudioPlaying(params: IsAudioPlayingReq): Promise<IsAudioPlayingRsp>;
|
|
1872
|
+
}
|
|
1873
|
+
|
|
1874
|
+
/**
|
|
1875
|
+
* 创建音频播放器参数
|
|
1876
|
+
* @property url - 音频地址
|
|
1877
|
+
*/
|
|
1878
|
+
type CreateAudioReq = {
|
|
1879
|
+
url: string;
|
|
1880
|
+
};
|
|
1881
|
+
|
|
1882
|
+
/**
|
|
1883
|
+
* 创建音频播放器结果
|
|
1884
|
+
* @property audioId - 播放器实例播放器ID
|
|
1885
|
+
*/
|
|
1886
|
+
type CreateAudioRsp = {
|
|
1887
|
+
audioId: string;
|
|
1888
|
+
};
|
|
1889
|
+
|
|
1890
|
+
/**
|
|
1891
|
+
* 音频播放器事件回调信息
|
|
1892
|
+
* @property audioId - 播放器实例ID
|
|
1893
|
+
* @property eventName - 事件名, ended-播放完毕, error-播放出错
|
|
1894
|
+
* @property data - 回调信息
|
|
1895
|
+
*/
|
|
1896
|
+
type AudioEventInfo = {
|
|
1897
|
+
audioId: string;
|
|
1898
|
+
eventName: string;
|
|
1899
|
+
data: any;
|
|
1900
|
+
};
|
|
1901
|
+
|
|
1902
|
+
/**
|
|
1903
|
+
* @param info - 回调信息
|
|
1904
|
+
*/
|
|
1905
|
+
type AudioEventCallback = (info: AudioEventInfo) => void;
|
|
1906
|
+
|
|
1907
|
+
/**
|
|
1908
|
+
* 监听音频播放器事件参数
|
|
1909
|
+
* @property callback - 音频播放器事件回调
|
|
1910
|
+
*/
|
|
1911
|
+
type OnAudioNoticesReq = {
|
|
1912
|
+
callback: AudioEventCallback;
|
|
1913
|
+
};
|
|
1914
|
+
|
|
1915
|
+
/**
|
|
1916
|
+
* 取消监听音频播放器事件参数
|
|
1917
|
+
* @property [callback] - 音频播放器事件回调
|
|
1918
|
+
*/
|
|
1919
|
+
type OffAudioNoticesReq = {
|
|
1920
|
+
callback?: AudioEventCallback;
|
|
1921
|
+
};
|
|
1922
|
+
|
|
1923
|
+
/**
|
|
1924
|
+
* 播放音频参数
|
|
1925
|
+
* @property audioId - 播放器实例ID
|
|
1926
|
+
*/
|
|
1927
|
+
type PlayAudioReq = {
|
|
1928
|
+
audioId: string;
|
|
1929
|
+
};
|
|
1930
|
+
|
|
1931
|
+
/**
|
|
1932
|
+
* 停止播放参数
|
|
1933
|
+
* @property audioId - 播放器实例ID
|
|
1934
|
+
*/
|
|
1935
|
+
type StopAudioReq = {
|
|
1936
|
+
audioId: string;
|
|
1937
|
+
};
|
|
1938
|
+
|
|
1939
|
+
/**
|
|
1940
|
+
* 音频是否在播放中参数
|
|
1941
|
+
* @property audioId - 播放器实例ID
|
|
1942
|
+
*/
|
|
1943
|
+
type IsAudioPlayingReq = {
|
|
1944
|
+
audioId: string;
|
|
1945
|
+
};
|
|
1946
|
+
|
|
1947
|
+
/**
|
|
1948
|
+
* 音频是否在播放中结果
|
|
1949
|
+
* @property isPlaying - 是否在播放中
|
|
1950
|
+
*/
|
|
1951
|
+
type IsAudioPlayingRsp = {
|
|
1952
|
+
isPlaying: boolean;
|
|
1953
|
+
};
|
|
1954
|
+
|
|
1727
1955
|
/**
|
|
1728
1956
|
* auth模块
|
|
1729
1957
|
*/
|
|
@@ -4770,7 +4998,7 @@ type AccessReq = {
|
|
|
4770
4998
|
* @property filePath - 要追加内容的文件路径 (本地路径)
|
|
4771
4999
|
* @property data - 要追加的文本或二进制数据
|
|
4772
5000
|
* @property [dataType] - 追加数据类型, string-string, ArrayBuffer-ArrayBuffer
|
|
4773
|
-
* @property [encoding] - 指定读取文件的字符编码, base64-base64, utf8-utf8
|
|
5001
|
+
* @property [encoding] - 指定读取文件的字符编码, base64-base64, utf8-utf8, binary-二进制
|
|
4774
5002
|
*/
|
|
4775
5003
|
type AppendFileReq = {
|
|
4776
5004
|
filePath: string;
|
|
@@ -4869,10 +5097,12 @@ type OpenReq = {
|
|
|
4869
5097
|
* 文件信息
|
|
4870
5098
|
* @property bytesRead - 实际读取的字节数
|
|
4871
5099
|
* @property arrayBuffer - 被写入的缓存区的对象
|
|
5100
|
+
* @property originData - 原始数据
|
|
4872
5101
|
*/
|
|
4873
5102
|
type ReadRsp = {
|
|
4874
5103
|
bytesRead: number;
|
|
4875
5104
|
arrayBuffer: ArrayBuffer;
|
|
5105
|
+
originData: string;
|
|
4876
5106
|
};
|
|
4877
5107
|
|
|
4878
5108
|
/**
|
|
@@ -4894,9 +5124,11 @@ type ReadReq = {
|
|
|
4894
5124
|
/**
|
|
4895
5125
|
* 压缩类型的本地文件内容
|
|
4896
5126
|
* @property data - 文件内容
|
|
5127
|
+
* @property originData - 原始数据
|
|
4897
5128
|
*/
|
|
4898
5129
|
type ReadCompressedFileRsp = {
|
|
4899
5130
|
data: ArrayBuffer;
|
|
5131
|
+
originData: string;
|
|
4900
5132
|
};
|
|
4901
5133
|
|
|
4902
5134
|
/**
|
|
@@ -4936,7 +5168,7 @@ type ReadFileRsp = {
|
|
|
4936
5168
|
/**
|
|
4937
5169
|
* 读取文件参数
|
|
4938
5170
|
* @property filePath - 要读取的文件的路径 (本地路径)
|
|
4939
|
-
* @property [encoding] - 指定读取文件的字符编码, base64-base64, utf8-utf8
|
|
5171
|
+
* @property [encoding] - 指定读取文件的字符编码, base64-base64, utf8-utf8, binary-二进制
|
|
4940
5172
|
* @property [position] - 从文件指定位置开始读,如果不指定,则从文件头开始读
|
|
4941
5173
|
* @property [length] - 指定文件的长度,如果不指定,则读到文件末尾。
|
|
4942
5174
|
*/
|
|
@@ -4965,16 +5197,30 @@ type ReadZipEntryRsp = {
|
|
|
4965
5197
|
entries: any;
|
|
4966
5198
|
};
|
|
4967
5199
|
|
|
5200
|
+
/**
|
|
5201
|
+
* 读取压缩包内的文件参数
|
|
5202
|
+
* @property path - 压缩包内文件路径
|
|
5203
|
+
* @property [encoding] - 指定读取文件的字符编码, base64-base64, utf8-utf8, binary-二进制
|
|
5204
|
+
* @property [position] - 从文件指定位置开始读,如果不指定,则从文件头开始读
|
|
5205
|
+
* @property [length] - 指定文件的长度,如果不指定,则读到文件末尾
|
|
5206
|
+
*/
|
|
5207
|
+
type EntrieInfo = {
|
|
5208
|
+
path: string;
|
|
5209
|
+
encoding?: string;
|
|
5210
|
+
position?: number;
|
|
5211
|
+
length?: number;
|
|
5212
|
+
};
|
|
5213
|
+
|
|
4968
5214
|
/**
|
|
4969
5215
|
* 读取压缩包内的文件参数
|
|
4970
5216
|
* @property filePath - 要读取的文件的路径 (本地路径)
|
|
4971
|
-
* @property [encoding] -
|
|
5217
|
+
* @property [encoding] - 统一指定读取文件的字符编码,只在entries值为"all"时有效,entries值为"all"时不传默认返回二进制内容
|
|
4972
5218
|
* @property entries - 要读取的压缩包内的文件列表(当传入"all" 时表示读取压缩包内所有文件)
|
|
4973
5219
|
*/
|
|
4974
5220
|
type ReadZipEntryReq = {
|
|
4975
5221
|
filePath: string;
|
|
4976
5222
|
encoding?: string;
|
|
4977
|
-
entries:
|
|
5223
|
+
entries: EntrieInfo[] | 'all';
|
|
4978
5224
|
};
|
|
4979
5225
|
|
|
4980
5226
|
/**
|
|
@@ -5033,12 +5279,30 @@ type SaveFileReq = {
|
|
|
5033
5279
|
filePath?: string;
|
|
5034
5280
|
};
|
|
5035
5281
|
|
|
5282
|
+
/**
|
|
5283
|
+
* 文件状态
|
|
5284
|
+
* @property mode - 文件的类型和存取的权限
|
|
5285
|
+
* @property size - 文件大小,单位:B
|
|
5286
|
+
* @property lastAccessedTime - 文件最近一次被存取或被执行的时间戳
|
|
5287
|
+
* @property lastModifiedTime - 文件最后一次被修改的时间戳
|
|
5288
|
+
* @property isDirectory - 判断当前文件是否一个目录
|
|
5289
|
+
* @property isFile - 判断当前文件是否一个普通文件
|
|
5290
|
+
*/
|
|
5291
|
+
type FileStats = {
|
|
5292
|
+
mode: number;
|
|
5293
|
+
size: number;
|
|
5294
|
+
lastAccessedTime: number;
|
|
5295
|
+
lastModifiedTime: number;
|
|
5296
|
+
isDirectory: boolean;
|
|
5297
|
+
isFile: boolean;
|
|
5298
|
+
};
|
|
5299
|
+
|
|
5036
5300
|
/**
|
|
5037
5301
|
* 文件Stats对象结果
|
|
5038
5302
|
* @property stats - 当recursive为false时,res.stats是一个Stats对象。当recursive为true且path是一个目录的路径时,res.stats是一个Array,数组的每一项是一个对象,每个对象包含path和stats
|
|
5039
5303
|
*/
|
|
5040
5304
|
type StatRsp = {
|
|
5041
|
-
stats: FileStats | FileStats
|
|
5305
|
+
stats: FileStats[] | FileStats;
|
|
5042
5306
|
};
|
|
5043
5307
|
|
|
5044
5308
|
/**
|
|
@@ -5076,7 +5340,7 @@ type UnlinkReq = {
|
|
|
5076
5340
|
* @property [dataType] - 追加数据类型, string-string, ArrayBuffer-ArrayBuffer
|
|
5077
5341
|
* @property [offset] - 在 data 是 ArrayBuffer 时要写入的 arrayBuffer 中的索引,默认0
|
|
5078
5342
|
* @property [length] - 在 data 是 ArrayBuffer 时指定要写入的字节数
|
|
5079
|
-
* @property [encoding] - 指定写入文件的字符编码, base64-base64, utf8-utf8
|
|
5343
|
+
* @property [encoding] - 指定写入文件的字符编码, base64-base64, utf8-utf8, binary-二进制
|
|
5080
5344
|
* @property [position] - 指定文件开头的偏移量,即数据要被写入的位置
|
|
5081
5345
|
*/
|
|
5082
5346
|
type WriteReq = {
|
|
@@ -5102,7 +5366,7 @@ type WriteRsp = {
|
|
|
5102
5366
|
* @property filePath - 要写入的文件路径 (本地路径)
|
|
5103
5367
|
* @property data - 要写入的文本或二进制数据
|
|
5104
5368
|
* @property [dataType] - 追加数据类型, string-string, ArrayBuffer-ArrayBuffer
|
|
5105
|
-
* @property [encoding] - 指定写入文件的字符编码, base64-base64, utf8-utf8
|
|
5369
|
+
* @property [encoding] - 指定写入文件的字符编码, base64-base64, utf8-utf8, binary-二进制
|
|
5106
5370
|
*/
|
|
5107
5371
|
type WriteFileReq = {
|
|
5108
5372
|
filePath: string;
|
|
@@ -5111,24 +5375,6 @@ type WriteFileReq = {
|
|
|
5111
5375
|
encoding?: string;
|
|
5112
5376
|
};
|
|
5113
5377
|
|
|
5114
|
-
/**
|
|
5115
|
-
* 文件状态
|
|
5116
|
-
* @property mode - 文件的类型和存取的权限
|
|
5117
|
-
* @property size - 文件大小,单位:B
|
|
5118
|
-
* @property lastAccessedTime - 文件最近一次被存取或被执行的时间戳
|
|
5119
|
-
* @property lastModifiedTime - 文件最后一次被修改的时间戳
|
|
5120
|
-
* @property isDirectory - 判断当前文件是否一个目录
|
|
5121
|
-
* @property isFile - 判断当前文件是否一个普通文件
|
|
5122
|
-
*/
|
|
5123
|
-
type FileStats = {
|
|
5124
|
-
mode: number;
|
|
5125
|
-
size: number;
|
|
5126
|
-
lastAccessedTime: number;
|
|
5127
|
-
lastModifiedTime: number;
|
|
5128
|
-
isDirectory: boolean;
|
|
5129
|
-
isFile: boolean;
|
|
5130
|
-
};
|
|
5131
|
-
|
|
5132
5378
|
/**
|
|
5133
5379
|
* 获取文件的状态信息参数
|
|
5134
5380
|
* @property stats - 文件状态
|