@rongcloud/imlib-v2-adapter 5.8.4 → 5.8.5-alpha.2

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 CHANGED
@@ -151,6 +151,38 @@ declare class BaseMessage<T = any> {
151
151
  readonly isCounted: boolean;
152
152
  constructor(messageType: string, objectName: string, content: T, isPersited?: boolean, isCounted?: boolean);
153
153
  }
154
+ interface IExtraData {
155
+ /**
156
+ * 消息中的附加信息
157
+ */
158
+ extra?: string;
159
+ }
160
+ interface IUserInfo {
161
+ user?: {
162
+ /**
163
+ * 用户 ID
164
+ */
165
+ id?: string;
166
+ /**
167
+ * 用户名
168
+ */
169
+ name?: string;
170
+ /**
171
+ * 用户头像地址
172
+ */
173
+ portraitUri?: string;
174
+ /**
175
+ * user info 中附加信息
176
+ */
177
+ extra?: string;
178
+ };
179
+ }
180
+ interface IBurnDuration {
181
+ /**
182
+ * 阅后即焚时间间隔
183
+ */
184
+ burnDuration?: number;
185
+ }
154
186
 
155
187
  interface IConversationStatus {
156
188
  /**
@@ -1762,34 +1794,220 @@ declare class MentionedInfo {
1762
1794
  mentionedContent?: string | undefined;
1763
1795
  constructor(type?: MentionedType$1 | undefined, userIdList?: string[] | undefined, mentionedContent?: string | undefined);
1764
1796
  }
1797
+ interface IMentionedInfo {
1798
+ /**
1799
+ * 群组消息中的 @ 信息
1800
+ */
1801
+ mentionedInfo?: MentionedInfo;
1802
+ }
1765
1803
 
1766
- declare const _default$h: any;
1804
+ interface TextMessageContent extends IMentionedInfo, IExtraData, IUserInfo, IBurnDuration {
1805
+ /**
1806
+ * 文本消息内容
1807
+ */
1808
+ content: string;
1809
+ }
1810
+ declare const _default$h: new (content: TextMessageContent) => BaseMessage<TextMessageContent>;
1767
1811
 
1768
- declare const _default$g: any;
1812
+ interface LocationMessageContent extends IExtraData, IMentionedInfo, IUserInfo {
1813
+ /**
1814
+ * 经度
1815
+ */
1816
+ longitude: number;
1817
+ /**
1818
+ * 维度
1819
+ */
1820
+ latitude: number;
1821
+ /**
1822
+ * 位置信息
1823
+ */
1824
+ poi: string;
1825
+ /**
1826
+ * 位置缩略图,图片需要是不带前缀的 base64 字符串
1827
+ */
1828
+ content: string;
1829
+ }
1830
+ declare const _default$g: new (content: LocationMessageContent) => BaseMessage<LocationMessageContent>;
1769
1831
 
1770
- declare const _default$f: any;
1832
+ interface TypingStatusMessageOptions {
1833
+ /**
1834
+ * 正在输入的消息 ObjectName,可以通过各消息类型的静态属性获取,如 RongIMLib.TextMessage.ObjectName
1835
+ */
1836
+ typingContentType: string;
1837
+ /**
1838
+ * 附加信息
1839
+ */
1840
+ data?: string;
1841
+ }
1842
+ declare const _default$f: new (content: TypingStatusMessageOptions) => BaseMessage<TypingStatusMessageOptions>;
1771
1843
 
1772
- declare const _default$e: any;
1844
+ interface ImageMessageOptions extends IExtraData, IMentionedInfo, IUserInfo, IBurnDuration {
1845
+ /**
1846
+ * 图片的略缩图
1847
+ * @description
1848
+ * 1. 必须是 base64 字符串, 图片类型为 JPG
1849
+ * 2. base64 字符串大小不可超过 80 KB
1850
+ * 3. 字符串前无媒体类型前缀
1851
+ */
1852
+ content: string;
1853
+ /**
1854
+ * 原图远程地址
1855
+ */
1856
+ imageUri: string;
1857
+ }
1858
+ declare const _default$e: new (content: ImageMessageOptions) => BaseMessage<ImageMessageOptions>;
1773
1859
 
1774
- declare const _default$d: any;
1860
+ interface IArticle {
1861
+ title: string;
1862
+ content: string;
1863
+ imageUri: string;
1864
+ url: string;
1865
+ }
1866
+ interface RichContentMessageOptions extends IArticle, IExtraData, IMentionedInfo, IUserInfo {
1867
+ }
1868
+ declare const _default$d: new (content: RichContentMessageOptions) => BaseMessage<RichContentMessageOptions>;
1775
1869
 
1776
- declare const _default$c: any;
1870
+ interface VoiceMessageOptions extends IExtraData, IMentionedInfo, IUserInfo, IBurnDuration {
1871
+ content: string;
1872
+ duration: number;
1873
+ extra: string;
1874
+ }
1875
+ declare const _default$c: new (content: VoiceMessageOptions) => BaseMessage<VoiceMessageOptions>;
1777
1876
 
1778
- declare const _default$b: any;
1877
+ interface HQVoiceMessageOptions extends IExtraData, IMentionedInfo, IBurnDuration {
1878
+ /**
1879
+ * 远程媒体资源地址
1880
+ */
1881
+ remoteUrl: string;
1882
+ /**
1883
+ * 编解码类型,默认为 aac 音频
1884
+ */
1885
+ type?: string;
1886
+ /**
1887
+ * 语音消息的时长,最大值为 60 (单位:秒)
1888
+ */
1889
+ duration: number;
1890
+ }
1891
+ declare const _default$b: new (content: HQVoiceMessageOptions) => BaseMessage<HQVoiceMessageOptions>;
1779
1892
 
1780
- declare const _default$a: any;
1893
+ interface FileMessageOptions extends IExtraData, IUserInfo {
1894
+ /**
1895
+ * 文件名称
1896
+ */
1897
+ name: string;
1898
+ /**
1899
+ * 文件尺寸,单位: Byte
1900
+ */
1901
+ size: number;
1902
+ /**
1903
+ * 文件类型
1904
+ */
1905
+ type: string;
1906
+ /**
1907
+ * 远程文件资源地址
1908
+ */
1909
+ fileUrl: string;
1910
+ }
1911
+ declare const _default$a: new (content: FileMessageOptions) => BaseMessage<FileMessageOptions>;
1781
1912
 
1782
- declare const _default$9: any;
1913
+ interface SightMessageOptions extends IExtraData, IMentionedInfo, IUserInfo {
1914
+ /**
1915
+ * 远程视频资源 url 地址
1916
+ */
1917
+ sightUrl: string;
1918
+ /**
1919
+ * 小视频首帧的缩略图进行 Base64 编码的结果值,格式为 JPG
1920
+ * @description 注意在 Base64 进行 Encode 后需要将所有 \r\n 和 \r 和 \n 替换成空
1921
+ */
1922
+ content: string;
1923
+ /**
1924
+ * 视频时长,单位:秒
1925
+ */
1926
+ duration: number;
1927
+ /**
1928
+ * 视频尺寸,单位:Byte
1929
+ */
1930
+ size: number;
1931
+ /**
1932
+ * 视频文件名称
1933
+ */
1934
+ name: string;
1935
+ }
1936
+ declare const _default$9: new (content: SightMessageOptions) => BaseMessage<SightMessageOptions>;
1783
1937
 
1784
- declare const _default$8: any;
1938
+ interface GIFMessageOptions extends IExtraData, IUserInfo {
1939
+ /**
1940
+ * GIF 图片文件大小,单位为 KB
1941
+ */
1942
+ gifDataSize: number;
1943
+ /**
1944
+ * GIF 图片资源 url 地址
1945
+ */
1946
+ remoteUrl: string;
1947
+ /**
1948
+ * 图片宽度
1949
+ */
1950
+ width: number;
1951
+ /**
1952
+ * 图片高度
1953
+ */
1954
+ height: number;
1955
+ }
1956
+ declare const _default$8: new (content: GIFMessageOptions) => BaseMessage<GIFMessageOptions>;
1785
1957
 
1786
- declare const _default$7: any;
1958
+ interface ReadReceiptMessageContent {
1959
+ /**
1960
+ * 消息唯一 ID
1961
+ */
1962
+ messageUId: String;
1963
+ /**
1964
+ * 最后一条消息的发送时间
1965
+ */
1966
+ lastMessageSendTime: Number;
1967
+ /**
1968
+ * 备用,默认赋值 1 即可
1969
+ */
1970
+ type: String;
1971
+ }
1972
+ declare const _default$7: new (content: ReadReceiptMessageContent) => BaseMessage<ReadReceiptMessageContent>;
1787
1973
 
1788
- declare const _default$6: any;
1974
+ interface ReadReceiptRequestMessageContent {
1975
+ /**
1976
+ * 消息唯一 ID
1977
+ */
1978
+ messageUId: String;
1979
+ }
1980
+ declare const _default$6: new (content: ReadReceiptRequestMessageContent) => BaseMessage<ReadReceiptRequestMessageContent>;
1789
1981
 
1790
- declare const _default$5: any;
1982
+ interface ReadReceiptResponseMessageContent {
1983
+ /**
1984
+ * 回复已读通知信息,{userId: [messageUId]}
1985
+ */
1986
+ receiptMessageDic: {
1987
+ [userId: string]: string[];
1988
+ };
1989
+ }
1990
+ declare const _default$5: new (content: ReadReceiptResponseMessageContent) => BaseMessage<ReadReceiptResponseMessageContent>;
1791
1991
 
1792
- declare const _default$4: any;
1992
+ interface CombineMessageOptions extends IExtraData, IUserInfo {
1993
+ /**
1994
+ * 存储在融云服务器的远端 HTML 文件路径
1995
+ */
1996
+ remoteUrl: string;
1997
+ /**
1998
+ * 在会话界面显示的合并转发消息中,前 4 条消息的用户名称
1999
+ */
2000
+ nameList: string;
2001
+ /**
2002
+ * 在会话界面显示的合并转发消息中,前 4 条消息的简略信息,与 nameList 属性相对应
2003
+ */
2004
+ summaryList: string;
2005
+ /**
2006
+ * 会话类型,目前合并转发功能支持二人会话及群聊会话,二人会话是 1 、群组会话是 3
2007
+ */
2008
+ conversationType: ConversationType;
2009
+ }
2010
+ declare const _default$4: new (content: CombineMessageOptions) => BaseMessage<CombineMessageOptions>;
1793
2011
 
1794
2012
  declare class Message implements IReceivedMessageV2 {
1795
2013
  conversationType: ConversationType;
@@ -1823,21 +2041,115 @@ declare enum VoIPMediaType {
1823
2041
  MEDIA_VIDEO = 2
1824
2042
  }
1825
2043
 
1826
- declare const AcceptMessage: any;
1827
- declare const RingingMessage: any;
1828
- declare const SummaryMessage: any;
1829
- declare const HungupMessage: any;
1830
- declare const InviteMessage: any;
1831
- declare const MediaModifyMessage: any;
1832
- declare const MemberModifyMessage: any;
2044
+ interface AcceptMessageOption {
2045
+ messageName: string;
2046
+ callId: string;
2047
+ mediaId: string;
2048
+ mediaType: VoIPMediaType;
2049
+ mode: string;
2050
+ subInfo: string[];
2051
+ }
2052
+ declare const AcceptMessage: new (content: AcceptMessageOption) => BaseMessage<AcceptMessageOption>;
2053
+ interface RingingMessageOption {
2054
+ messageName: string;
2055
+ callId: string;
2056
+ }
2057
+ declare const RingingMessage: new (content: RingingMessageOption) => BaseMessage<RingingMessageOption>;
2058
+ interface SummaryMessageOptions {
2059
+ messageName: string;
2060
+ caller: string;
2061
+ inviter: string;
2062
+ mediaType: VoIPMediaType;
2063
+ memberIdList: string[];
2064
+ startTime: number;
2065
+ connectedTime: number;
2066
+ duration: number;
2067
+ status: ErrorCode;
2068
+ }
2069
+ declare const SummaryMessage: new (content: SummaryMessageOptions) => BaseMessage<SummaryMessageOptions>;
2070
+ interface HungupMessageOptions {
2071
+ messageName: string;
2072
+ callId: string;
2073
+ reason: string;
2074
+ mode: string;
2075
+ subInfo: string[];
2076
+ }
2077
+ declare const HungupMessage: new (content: HungupMessageOptions) => BaseMessage<HungupMessageOptions>;
2078
+ declare class ChannelInfo {
2079
+ Id: string;
2080
+ Key: string;
2081
+ constructor(Id: string, Key: string);
2082
+ }
2083
+ interface InviteMessageOptions {
2084
+ messageName: string;
2085
+ mediaId: string;
2086
+ callId: string;
2087
+ engineType: number;
2088
+ channelInfo: ChannelInfo;
2089
+ mediaType: VoIPMediaType;
2090
+ inviteUserIds: string[];
2091
+ observerUserIds: any[];
2092
+ extra: string;
2093
+ mode: string;
2094
+ subInfo: string[];
2095
+ }
2096
+ declare const InviteMessage: new (content: InviteMessageOptions) => BaseMessage<InviteMessageOptions>;
2097
+ interface MediaModifyMessageOptions {
2098
+ messageName: string;
2099
+ callId: string;
2100
+ mediaType: VoIPMediaType;
2101
+ mode: string;
2102
+ subInfo: string[];
2103
+ }
2104
+ declare const MediaModifyMessage: new (content: MediaModifyMessageOptions) => BaseMessage<MediaModifyMessageOptions>;
2105
+ interface MemberModifyMessageOptions {
2106
+ messageName: string;
2107
+ modifyMemType: number;
2108
+ callId: string;
2109
+ caller: string;
2110
+ engineType: number;
2111
+ channelInfo: ChannelInfo;
2112
+ mediaType: VoIPMediaType;
2113
+ extra: string;
2114
+ inviteUserIds: string[];
2115
+ existedMemberStatusList: string[];
2116
+ existedUserPofiles: any;
2117
+ observerUserIds: any;
2118
+ mode: string;
2119
+ subInfo: string[];
2120
+ }
2121
+ declare const MemberModifyMessage: new (content: MemberModifyMessageOptions) => BaseMessage<MemberModifyMessageOptions>;
1833
2122
 
1834
- declare const _default$3: any;
2123
+ interface SyncReadStatusMessage {
2124
+ /**
2125
+ * 最后一条消息时间
2126
+ */
2127
+ lastMessageSendTime: number;
2128
+ }
2129
+ declare const _default$3: new (content: SyncReadStatusMessage) => BaseMessage<SyncReadStatusMessage>;
1835
2130
 
1836
- declare const _default$2: any;
2131
+ interface ReferenceMessageContent extends IExtraData, IMentionedInfo, IUserInfo {
2132
+ /**
2133
+ * 被引用消息的发送用户 Id
2134
+ */
2135
+ referMsgUserId: String;
2136
+ /**
2137
+ * 引用消息对象
2138
+ */
2139
+ referMsg: any;
2140
+ /**
2141
+ * 输入的文本消息内容
2142
+ */
2143
+ content: string;
2144
+ }
2145
+ declare const _default$2: new (content: ReferenceMessageContent) => BaseMessage<ReferenceMessageContent>;
1837
2146
 
1838
- declare const _default$1: any;
2147
+ interface IPSMessageContent extends IExtraData {
2148
+ articles: IArticle[];
2149
+ }
2150
+ declare const _default$1: new (content: IPSMessageContent) => BaseMessage<IPSMessageContent>;
1839
2151
 
1840
- declare const _default: any;
2152
+ declare const _default: new (content: IPSMessageContent) => BaseMessage<IPSMessageContent>;
1841
2153
 
1842
2154
  /**
1843
2155
  * 群组 @ 类型