@onyx-p/imlib-web 1.5.1 → 1.5.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.esm.js
CHANGED
@@ -18817,12 +18817,13 @@ const MessageTypes = {
|
|
18817
18817
|
FILE: 0x3000100A,
|
18818
18818
|
AUDIO: 0x30001011,
|
18819
18819
|
VIDEO: 0x30001006,
|
18820
|
-
CUST_COMMAND: 0x1000101d,
|
18821
|
-
CUST_STORAGE: 0x1000102d,
|
18822
|
-
CUST_NORMAL: 0x1000103d,
|
18823
|
-
CUST_STATUS: 0x1000104d,
|
18824
18820
|
RECALL: 0x6001001d,
|
18825
|
-
|
18821
|
+
LOCATION: 0x30001005,
|
18822
|
+
CHAT_RECORD: 0x30001019,
|
18823
|
+
CONTACT: 0x10001002,
|
18824
|
+
GROUP_INVITATION: 0x30001003,
|
18825
|
+
REDPACKET: 0x10001040,
|
18826
|
+
TRANSFER: 0x10001030
|
18826
18827
|
};
|
18827
18828
|
|
18828
18829
|
const STATUSMESSAGE_ALIVE_TIMEMS = 6000;
|
@@ -28731,7 +28732,7 @@ const recallMessage = async (conversation, options) => {
|
|
28731
28732
|
return response;
|
28732
28733
|
};
|
28733
28734
|
const getHistoryMessages = async (conversation, options) => {
|
28734
|
-
assert('options.timestamp', options.timestamp ?? 0, AssertRules.
|
28735
|
+
assert('options.timestamp', options.timestamp ?? '0', AssertRules.ONLY_STRING);
|
28735
28736
|
assert('options.count', options.count ?? 0, AssertRules.NUMBER);
|
28736
28737
|
assert('options.order', options.order ?? 0, value => {
|
28737
28738
|
return value === 0 || value === 1;
|
package/index.umd.js
CHANGED
@@ -18823,12 +18823,13 @@
|
|
18823
18823
|
FILE: 0x3000100A,
|
18824
18824
|
AUDIO: 0x30001011,
|
18825
18825
|
VIDEO: 0x30001006,
|
18826
|
-
CUST_COMMAND: 0x1000101d,
|
18827
|
-
CUST_STORAGE: 0x1000102d,
|
18828
|
-
CUST_NORMAL: 0x1000103d,
|
18829
|
-
CUST_STATUS: 0x1000104d,
|
18830
18826
|
RECALL: 0x6001001d,
|
18831
|
-
|
18827
|
+
LOCATION: 0x30001005,
|
18828
|
+
CHAT_RECORD: 0x30001019,
|
18829
|
+
CONTACT: 0x10001002,
|
18830
|
+
GROUP_INVITATION: 0x30001003,
|
18831
|
+
REDPACKET: 0x10001040,
|
18832
|
+
TRANSFER: 0x10001030
|
18832
18833
|
};
|
18833
18834
|
|
18834
18835
|
const STATUSMESSAGE_ALIVE_TIMEMS = 6000;
|
@@ -28737,7 +28738,7 @@
|
|
28737
28738
|
return response;
|
28738
28739
|
};
|
28739
28740
|
const getHistoryMessages = async (conversation, options) => {
|
28740
|
-
assert('options.timestamp', options.timestamp ?? 0, AssertRules.
|
28741
|
+
assert('options.timestamp', options.timestamp ?? '0', AssertRules.ONLY_STRING);
|
28741
28742
|
assert('options.count', options.count ?? 0, AssertRules.NUMBER);
|
28742
28743
|
assert('options.order', options.order ?? 0, value => {
|
28743
28744
|
return value === 0 || value === 1;
|
package/package.json
CHANGED
@@ -5,10 +5,11 @@ export declare const MessageTypes: {
|
|
5
5
|
FILE: number;
|
6
6
|
AUDIO: number;
|
7
7
|
VIDEO: number;
|
8
|
-
CUST_COMMAND: number;
|
9
|
-
CUST_STORAGE: number;
|
10
|
-
CUST_NORMAL: number;
|
11
|
-
CUST_STATUS: number;
|
12
8
|
RECALL: number;
|
13
|
-
|
9
|
+
LOCATION: number;
|
10
|
+
CHAT_RECORD: number;
|
11
|
+
CONTACT: number;
|
12
|
+
GROUP_INVITATION: number;
|
13
|
+
REDPACKET: number;
|
14
|
+
TRANSFER: number;
|
14
15
|
};
|
package/types/index.d.ts
CHANGED
@@ -7,7 +7,7 @@ import IReceivedConversation from './model/iReceivedConversation';
|
|
7
7
|
import { CommonReqResult, PBCodec } from './net/connection/webSocketServer';
|
8
8
|
import { BaseResp } from './net/pbs/rpc.base';
|
9
9
|
export { TextMessage, ImageMessage, HQVoiceMessage, GIFMessage, FileMessage, VideoMessage } from './model/messages';
|
10
|
-
export type { ITextMessageBody, IImageMessageBody, IGIFMessageBody, IFileMessageBody, IHQVoiceMessageBody, IRecallCommandMessageBody, IVideoMessageBody } from './model/messages';
|
10
|
+
export type { ITextMessageBody, IImageMessageBody, IGIFMessageBody, IFileMessageBody, IHQVoiceMessageBody, IRecallCommandMessageBody, IVideoMessageBody, ILocationMessageBody, IChatRecordMessageBody, IContactMessageBody, IInvitationMessageBody, IRedEnvelopeMessageBody, ITransferMessageBody } from './model/messages';
|
11
11
|
export { MessageTypes } from './constants/messageTypes';
|
12
12
|
export type { IBaseMessageBody, IReceivedMessage, IReceivedConversation };
|
13
13
|
export * from './types';
|
@@ -5,5 +5,6 @@ import HQVoiceMessage, { IHQVoiceMessageBody } from './voiceMessage';
|
|
5
5
|
import FileMessage, { IFileMessageBody } from './fileMessage';
|
6
6
|
import VideoMessage, { IVideoMessageBody } from './videoMessage';
|
7
7
|
import RecallCommandMessage, { IRecallCommandMessageBody } from './recallCommandMessage';
|
8
|
+
import { ILocationMessageBody, IChatRecordMessageBody, IContactMessageBody, IInvitationMessageBody, IRedEnvelopeMessageBody, ITransferMessageBody } from './otherMediaMessages';
|
8
9
|
export { TextMessage, ImageMessage, GIFMessage, HQVoiceMessage, FileMessage, RecallCommandMessage, VideoMessage };
|
9
|
-
export type { ITextMessageBody, IImageMessageBody, IGIFMessageBody, IHQVoiceMessageBody, IFileMessageBody, IRecallCommandMessageBody, IVideoMessageBody };
|
10
|
+
export type { ITextMessageBody, IImageMessageBody, IGIFMessageBody, IHQVoiceMessageBody, IFileMessageBody, IRecallCommandMessageBody, IVideoMessageBody, ILocationMessageBody, IChatRecordMessageBody, IContactMessageBody, IInvitationMessageBody, IRedEnvelopeMessageBody, ITransferMessageBody };
|
@@ -0,0 +1,80 @@
|
|
1
|
+
export interface ILocationMessageBody {
|
2
|
+
thumbnailObjectKey: string;
|
3
|
+
title: string;
|
4
|
+
desc: string;
|
5
|
+
locationType: number;
|
6
|
+
encryptKey?: string;
|
7
|
+
lat: number;
|
8
|
+
lon: number;
|
9
|
+
}
|
10
|
+
export interface IChatRecordMessageBody {
|
11
|
+
chatTitle: string;
|
12
|
+
msgDataFileKey: string;
|
13
|
+
msgList: Array<{
|
14
|
+
srcId: string;
|
15
|
+
senderNickname: string;
|
16
|
+
mediaConstructor: number;
|
17
|
+
msgPostContent: string;
|
18
|
+
}>;
|
19
|
+
encryptKey?: string;
|
20
|
+
}
|
21
|
+
export interface IContactMessageBody {
|
22
|
+
uid: string;
|
23
|
+
nickname: string;
|
24
|
+
phoneNumber: string;
|
25
|
+
langcode: string;
|
26
|
+
smallAvatarUrl?: string;
|
27
|
+
gender: number;
|
28
|
+
}
|
29
|
+
export interface IInvitationMessageBody {
|
30
|
+
groupUin: string;
|
31
|
+
groupTitle: string;
|
32
|
+
inviteFromUin: string;
|
33
|
+
inviteFromNickName: string;
|
34
|
+
totalMemberCount: number;
|
35
|
+
createTime: number;
|
36
|
+
smallAvatarUrl?: string;
|
37
|
+
groupMemberSmallAvatarUrlArr?: string[];
|
38
|
+
}
|
39
|
+
export interface IRedEnvelopeMessageBody {
|
40
|
+
id: number;
|
41
|
+
createTime: string;
|
42
|
+
updateTime: string;
|
43
|
+
amount: string;
|
44
|
+
count: number;
|
45
|
+
uid: string;
|
46
|
+
nativeNumber: string;
|
47
|
+
nativeType: number;
|
48
|
+
sendSign: string;
|
49
|
+
title: string;
|
50
|
+
symbol: string;
|
51
|
+
receivedStatus: number;
|
52
|
+
status: number;
|
53
|
+
expireTime: number;
|
54
|
+
currency: string;
|
55
|
+
currencyLogo: string;
|
56
|
+
refundAmount: string;
|
57
|
+
receivedAmount?: string;
|
58
|
+
}
|
59
|
+
export interface ITransferMessageBody {
|
60
|
+
id: number;
|
61
|
+
createTime: string;
|
62
|
+
updateTime: string;
|
63
|
+
uid: string;
|
64
|
+
orderId: string;
|
65
|
+
src: string;
|
66
|
+
symbol: string;
|
67
|
+
type: number;
|
68
|
+
toUid: string;
|
69
|
+
nativeType: number;
|
70
|
+
money: number;
|
71
|
+
refName: string;
|
72
|
+
transNo: string;
|
73
|
+
status: number;
|
74
|
+
pushStatus: number;
|
75
|
+
currency: string;
|
76
|
+
currencyLogo: string;
|
77
|
+
network: string;
|
78
|
+
networkLogo: string;
|
79
|
+
refId: string;
|
80
|
+
}
|