feat(shell): red: add entity types

This commit is contained in:
Il Harper 2024-03-05 01:09:42 +08:00
parent e23523b04e
commit 3ab0c1432f
No known key found for this signature in database
GPG Key ID: 4B71FCA698E7E8EC
2 changed files with 644 additions and 0 deletions

View File

@ -0,0 +1 @@
export * from './redEntity'

View File

@ -0,0 +1,643 @@
export interface Profile {
uid: string
qid: string
uin: string
nick: string
remark: string
longNick: string
avatarUrl: string
birthday_year: number
birthday_month: number
birthday_day: number
sex: number
topTime: string
isBlock: boolean
isMsgDisturb: boolean
isSpecialCareOpen: boolean
isSpecialCareZone: boolean
ringId: string
status: number
extStatus: number
categoryId: number
onlyChat: boolean
qzoneNotWatch: boolean
qzoneNotWatched: boolean
vipFlag: boolean
yearVipFlag: boolean
svipFlag: boolean
vipLevel: number
// 以下为 >9.9.1 添加
qidianMasterFlag: number
qidianCrewFlag: number
qidianCrewFlag2: number
isZPlanCoupleOpen: boolean
zplanCoupleSceneId: number
teenagerFlag: number
studyFlag: number
}
export interface Member {
uid: string
qid: string
uin: string
nick: string
remark: string
cardType: number
cardName: string
role: number
avatarPath: string
shutUpTime: number
isDelete: boolean
}
export interface Peer {
chatType: 1 | 2
peerUid: string
peerUin: string
guildId?: string
}
export interface Group {
/**
* {@link String}
*/
groupCode: string
/**
*
*/
maxMember: number
/**
*
*/
memberCount: number
/**
*
*/
groupName: string
groupStatus: 0
/**
* 2 3
*/
memberRole: 2 | 3
/**
*
*/
isTop: boolean
/**
*
*/
toppedTimestamp: string
/**
* flag
*/
privilegeFlag: number
isConf: boolean
/**
*
*/
hasModifyConfGroupFace: boolean
/**
*
*/
hasModifyConfGroupName: boolean
/**
*
*/
remarkName: string
avatarUrl?: string
hasMemo: boolean
groupShutupExpireTime: string
personShutupExpireTime: string
discussToGroupUin: string
discussToGroupMaxMsgSeq: number
discussToGroupTime: number
// 以下为 >9.9.1 添加
groupFlagExt: number
authGroupType: number
groupCreditLevel: number
groupFlagExt3: number
groupOwnerId: {
memberUin: '0'
/**
* 使
*/
memberUid: ''
}
}
export enum ChatType {
Private = 1,
Group = 2,
Guild = 4,
}
export enum MsgType {
/**
*
*
*
*/
Value1 = 1,
/**
*
*/
Normal = 2,
Value3 = 3,
/**
*
*/
System = 5,
/**
*
*/
Ptt = 6,
/**
*
*/
Video = 7,
Value8 = 8,
/**
* Quote
*/
WithRecords = 9,
/**
*
*/
Wallet = 10,
/**
*
*/
Ark = 11,
Vaule17 = 17,
}
export enum SendType {
Normal = 0,
System = 3,
}
export interface Message {
msgId: string
msgRandom: string
msgSeq: string
cntSeq: string
chatType: ChatType
msgType: MsgType
subMsgType: number
sendType: SendType
senderUid: string
peerUid: string
channelId: string
guildId: string
guildCode: string
fromUid: string
fromAppid: string
msgTime: string
msgMeta: string
sendStatus: number
sendMemberName: string
sendNickName: string
guildName: string
channelName: string
elements: Element[]
records: Message[]
emojiLikesList: unknown[]
commentCnt: string
directMsgFlag: number
directMsgMembers: unknown[]
peerName: string
editable: boolean
avatarMeta: string
avatarPendant: string
feedId: string
roleId: string
timeStamp: string
isImportMsg: boolean
atType: number
roleType: number
fromChannelRoleInfo: RoleInfo
fromGuildRoleInfo: RoleInfo
levelRoleInfo: RoleInfo
recallTime: string
isOnlineMsg: boolean
generalFlags: string
clientSeq: string
nameType: number
avatarFlag: number
senderUin: string
}
export interface Element {
elementType: number
elementId: string
extBufForUI: string
picElement?: PicElement
textElement?: TextElement
arkElement?: ArkElement
avRecordElement?: unknown
calendarElement?: unknown
faceElement?: FaceElement
fileElement?: FileElement
giphyElement?: unknown
grayTipElement?: GrayTipElement
inlineKeyboardElement?: unknown
liveGiftElement?: unknown
markdownElement?: unknown
marketFaceElement?: unknown
multiForwardMsgElement?: unknown
pttElement?: PttElement
replyElement?: ReplyElement
structLongMsgElement?: unknown
textGiftElement?: unknown
videoElement?: VideoElement
walletElement?: unknown
yoloGameResultElement?: unknown
structMsgElement: unknown
faceBubbleElement: unknown
shareLocationElement: unknown
tofuRecordElement: unknown
taskTopMsgElement: unknown
}
export interface PicElement {
picSubType: number
fileName: string
fileSize: string
picWidth: number
picHeight: number
original: boolean
md5HexStr: string
sourcePath: string
thumbPath: ThumbPath
transferStatus: number
progress: number
picType: number
invalidState: number
fileUuid: string
fileSubId: string
thumbFileSize: number
summary: string
emojiAd: EmojiAd
emojiMall: EmojiMall
emojiZplan: EmojiZplan
}
export interface FaceElement {
faceIndex: number
faceText: string
faceType: FaceType
packId?: QFace['AniStickerPackId']
stickerId?: QFace['AniStickerId']
sourceType?: 1
stickerType?: QFace['AniStickerType']
resultId?: '' | '1' | '2' | '3' | '4' | '5' | '6'
randomType?: 1
imageType?: unknown
pokeType?: number // 0 非 poke1 PC 戳一戳,依此类推
spokeSummary?: unknown
doubleHit?: unknown
vaspokeId?: unknown
vaspokeName?: unknown
vaspokeMinver?: unknown
pokeStrength?: unknown
msgType?: unknown
faceBubbleCount?: unknown
pokeFlag?: unknown
oldVersionStr?: unknown
/**
* 2024使
*/
chainCount?: 1
/**
*
*/
surpriseId?: ''
/**
* typo
*/
superisedId?: ''
}
export enum FaceType {
Normal = 2,
Super = 3,
PCPoke = 5,
}
export interface QFace {
QSid: string
QDes: string
IQLid: string
AQLid: string
EMCode: string
isStatic?: '1'
isCMEmoji?: '1'
AniStickerType?: 1 | 3
AniStickerPackId?: '1'
AniStickerId?: string // '1'
QHide?: '1'
Input: string[]
}
export interface FileElement {
fileMd5: string
fileName: string
filePath: string
fileSize: string
picHeight: number
picWidth: number
picThumbPath: Record<string, unknown>
expireTime: string
file10MMd5: string
fileSha: string
fileSha3: string
videoDuration: number
transferStatus: number
progress: number
invalidState: number
fileUuid: string
fileSubId: string
thumbFileSize: number
fileBizId: unknown
thumbMd5: unknown
folderId: unknown
fileGroupIndex: number
fileTransType: unknown
}
export interface GrayTipElement {
subElementType?: unknown
revokeElement?: unknown
proclamationElement?: unknown
emojiReplyElement?: unknown
groupElement?: GroupElement
buddyElement?: unknown
feedMsgElement?: unknown
essenceElement?: unknown
groupNotifyElement?: unknown
buddyNotifyElement?: unknown
xmlElement?: XmlElement
fileReceiptElement?: unknown
localGrayTipElement?: unknown
blockGrayTipElement?: unknown
aioOpGrayTipElement?: unknown
jsonGrayTipElement?: JsonGrayTipElement
}
export interface JsonGrayTipElement {
busiId: string
jsonStr: string
isServer: boolean
}
export interface PttElement {
fileName: string
filePath: string
md5HexStr: string
fileSize: string
duration: number
formatType: number
voiceType: number
voiceChangeType: number
canConvert2Text: boolean
fileId: number
fileUuid: string
text: string
translateStatus: number
transferStatus: number
progress: number
playState: number
waveAmplitudes: number[]
invalidState: number
fileSubId: string
fileBizId: unknown
}
export interface ReplyElement {
replayMsgId: string
replayMsgSeq: string
replayMsgRootSeq: string
replayMsgRootMsgId: string
replayMsgRootCommentCnt: string
sourceMsgIdInRecords: string
sourceMsgText: string
sourceMsgTextElems: {
replyAbsElemType: number
textElemContent: string
faceElem: unknown
}[]
senderUid: string
senderUidStr: string
replyMsgClientSeq: string
replyMsgTime: string
replyMsgRevokeType: number
sourceMsgIsIncPic: boolean
sourceMsgExpired: boolean
anonymousNickName: unknown
originalMsgState: unknown
senderUin: string
senderUinStr: string
}
export interface VideoElement {
filePath: string
fileName: string
videoMd5: string
thumbMd5: string
fileTime: number
thumbSize: number
fileFormat: number
fileSize: string
thumbWidth: number
thumbHeight: number
busiType: number
subBusiType: number
thumbPath: Record<string, unknown>
transferStatus: number
progress: number
invalidState: number
fileUuid: string
fileSubId: string
fileBizId: unknown
}
export interface GroupElement {
type: number
role: number
groupName?: string
memberUid?: string
memberNick?: string
memberRemark?: string
adminUid?: string
adminNick?: string
adminRemark?: string
createGroup?: unknown
memberAdd?: {
showType: number
otherAdd?: OtherAdd
otherAddByOtherQRCode?: unknown
otherAddByYourQRCode?: unknown
youAddByOtherQRCode?: unknown
otherInviteOther?: unknown
otherInviteYou?: unknown
youInviteOther?: unknown
}
shutUp?: {
curTime: string
duration: string
admin: {
uid: string
card: string
name: string
role: number
uin: string
}
member: {
uid: string
card: string
name: string
role: number
uin: string
}
}
memberUin?: string
adminUin?: string
}
export interface OtherAdd {
uid?: string
name?: string
uin?: string
}
export interface XmlElement {
busiType?: string
busiId?: string
c2cType: number
serviceType: number
ctrlFlag: number
content?: string
templId?: string
seqId?: string
templParam?: unknown
pbReserv?: string
members?: unknown
}
export interface EmojiAd {
url: string
desc: string
}
export interface EmojiMall {
packageId: number
emojiId: number
}
export interface EmojiZplan {
actionId: number
actionName: string
actionType: number
playerNumber: number
peerUid: string
bytesReserveInfo: string
}
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface ThumbPath {}
export interface TextElement {
content: string
atType: number
atUid: string
atTinyId: string
atNtUid: string
atNtUin: string
subElementType: number
atChannelId: string
atRoleId: string
atRoleColor: number
atRoleName: string
needNotify: number
}
export interface RoleInfo {
roleId: string
name: string
color: number
}
export interface Media {
msgId: string
chatType: number
peerUid: string
elementId: string
thumbSize: number
downloadType: number
}
export interface ArkElement {
bytesData: string
linkInfo: never
subElementType: never
}
export type ArkElementData =
| ArkQQMusicShare
| ArkNeteaseMusicShare
| ArkContact
| ArkForum
export interface ArkMusicShareBase {
app: 'com.tencent.structmsg'
config: {
ctime: number // 1700000000
forward: 0 | 1
token: string
type: 'normal'
}
}
export interface ArkQQMusicShare extends ArkMusicShareBase {}
export interface ArkNeteaseMusicShare extends ArkMusicShareBase {}
export interface ArkContact {}
export interface ArkForum {}