NapCatQQ source snapshot
This commit is contained in:
commit
f954252a34
1111 files changed
+139867
No files matched your search
@@ -0,0 +1,114 @@
|
||||
import { ScalarType } from '@protobuf-ts/runtime';
|
||||
import { ProtoField } from 'napcat-protobuf';
|
||||
import { ContentHead, MessageBody, MessageControl, RoutingHead } from '@/napcat-core/packet/transformer/proto';
|
||||
|
||||
export const FaceRoamRequest = {
|
||||
comm: ProtoField(1, () => PlatInfo, true),
|
||||
selfUin: ProtoField(2, ScalarType.UINT32),
|
||||
subCmd: ProtoField(3, ScalarType.UINT32),
|
||||
field6: ProtoField(6, ScalarType.UINT32),
|
||||
};
|
||||
|
||||
export const PlatInfo = {
|
||||
imPlat: ProtoField(1, ScalarType.UINT32),
|
||||
osVersion: ProtoField(2, ScalarType.STRING, true),
|
||||
qVersion: ProtoField(3, ScalarType.STRING, true),
|
||||
};
|
||||
|
||||
export const FaceRoamResponse = {
|
||||
retCode: ProtoField(1, ScalarType.UINT32),
|
||||
errMsg: ProtoField(2, ScalarType.STRING),
|
||||
subCmd: ProtoField(3, ScalarType.UINT32),
|
||||
userInfo: ProtoField(6, () => FaceRoamUserInfo),
|
||||
};
|
||||
|
||||
export const FaceRoamUserInfo = {
|
||||
fileName: ProtoField(1, ScalarType.STRING, false, true),
|
||||
deleteFile: ProtoField(2, ScalarType.STRING, false, true),
|
||||
bid: ProtoField(3, ScalarType.STRING),
|
||||
maxRoamSize: ProtoField(4, ScalarType.UINT32),
|
||||
emojiType: ProtoField(5, ScalarType.UINT32, false, true),
|
||||
};
|
||||
|
||||
export const SendMessageRequest = {
|
||||
state: ProtoField(1, ScalarType.INT32),
|
||||
sizeCache: ProtoField(2, ScalarType.INT32),
|
||||
unknownFields: ProtoField(3, ScalarType.BYTES),
|
||||
routingHead: ProtoField(4, () => RoutingHead),
|
||||
contentHead: ProtoField(5, () => ContentHead),
|
||||
messageBody: ProtoField(6, () => MessageBody),
|
||||
msgSeq: ProtoField(7, ScalarType.INT32),
|
||||
msgRand: ProtoField(8, ScalarType.INT32),
|
||||
syncCookie: ProtoField(9, ScalarType.BYTES),
|
||||
msgVia: ProtoField(10, ScalarType.INT32),
|
||||
dataStatist: ProtoField(11, ScalarType.INT32),
|
||||
messageControl: ProtoField(12, () => MessageControl),
|
||||
multiSendSeq: ProtoField(13, ScalarType.INT32),
|
||||
};
|
||||
|
||||
export const SendMessageResponse = {
|
||||
result: ProtoField(1, ScalarType.INT32),
|
||||
errMsg: ProtoField(2, ScalarType.STRING, true),
|
||||
timestamp1: ProtoField(3, ScalarType.UINT32),
|
||||
field10: ProtoField(10, ScalarType.UINT32),
|
||||
groupSequence: ProtoField(11, ScalarType.UINT32, true),
|
||||
timestamp2: ProtoField(12, ScalarType.UINT32),
|
||||
privateSequence: ProtoField(14, ScalarType.UINT32),
|
||||
};
|
||||
|
||||
export const SetStatus = {
|
||||
status: ProtoField(1, ScalarType.UINT32),
|
||||
extStatus: ProtoField(2, ScalarType.UINT32),
|
||||
batteryStatus: ProtoField(3, ScalarType.UINT32),
|
||||
customExt: ProtoField(4, () => SetStatusCustomExt, true),
|
||||
};
|
||||
|
||||
export const SetStatusCustomExt = {
|
||||
faceId: ProtoField(1, ScalarType.UINT32),
|
||||
text: ProtoField(2, ScalarType.STRING, true),
|
||||
field3: ProtoField(3, ScalarType.UINT32),
|
||||
};
|
||||
|
||||
export const SetStatusResponse = {
|
||||
message: ProtoField(2, ScalarType.STRING),
|
||||
};
|
||||
|
||||
export const HttpConn = {
|
||||
field1: ProtoField(1, ScalarType.INT32),
|
||||
field2: ProtoField(2, ScalarType.INT32),
|
||||
field3: ProtoField(3, ScalarType.INT32),
|
||||
field4: ProtoField(4, ScalarType.INT32),
|
||||
tgt: ProtoField(5, ScalarType.STRING),
|
||||
field6: ProtoField(6, ScalarType.INT32),
|
||||
serviceTypes: ProtoField(7, ScalarType.INT32, false, true),
|
||||
field9: ProtoField(9, ScalarType.INT32),
|
||||
field10: ProtoField(10, ScalarType.INT32),
|
||||
field11: ProtoField(11, ScalarType.INT32),
|
||||
ver: ProtoField(15, ScalarType.STRING),
|
||||
};
|
||||
|
||||
export const HttpConn0x6ff_501 = {
|
||||
httpConn: ProtoField(0x501, () => HttpConn),
|
||||
};
|
||||
|
||||
export const HttpConn0x6ff_501Response = {
|
||||
httpConn: ProtoField(0x501, () => HttpConnResponse),
|
||||
};
|
||||
|
||||
export const HttpConnResponse = {
|
||||
sigSession: ProtoField(1, ScalarType.BYTES),
|
||||
sessionKey: ProtoField(2, ScalarType.BYTES),
|
||||
serverInfos: ProtoField(3, () => ServerInfo, false, true),
|
||||
};
|
||||
|
||||
export const ServerAddr = {
|
||||
type: ProtoField(1, ScalarType.UINT32),
|
||||
ip: ProtoField(2, ScalarType.FIXED32),
|
||||
port: ProtoField(3, ScalarType.UINT32),
|
||||
area: ProtoField(4, ScalarType.UINT32),
|
||||
};
|
||||
|
||||
export const ServerInfo = {
|
||||
serviceType: ProtoField(1, ScalarType.UINT32),
|
||||
serverAddrs: ProtoField(2, () => ServerAddr, false, true),
|
||||
};
|
||||
@@ -0,0 +1,48 @@
|
||||
import { ProtoField, ScalarType } from 'napcat-protobuf';
|
||||
|
||||
export const MiniAppAdaptShareInfoReq = {
|
||||
appId: ProtoField(2, ScalarType.STRING),
|
||||
body: ProtoField(4, () => MiniAppAdaptShareInfoReqBody),
|
||||
};
|
||||
|
||||
export const MiniAppAdaptShareInfoReqBody = {
|
||||
extInfo: ProtoField(1, () => ExtInfo),
|
||||
appid: ProtoField(2, ScalarType.STRING),
|
||||
title: ProtoField(3, ScalarType.STRING),
|
||||
desc: ProtoField(4, ScalarType.STRING),
|
||||
time: ProtoField(5, ScalarType.UINT64),
|
||||
scene: ProtoField(6, ScalarType.UINT32),
|
||||
templateType: ProtoField(7, ScalarType.UINT32),
|
||||
businessType: ProtoField(8, ScalarType.UINT32),
|
||||
picUrl: ProtoField(9, ScalarType.STRING),
|
||||
vidUrl: ProtoField(10, ScalarType.STRING),
|
||||
jumpUrl: ProtoField(11, ScalarType.STRING),
|
||||
iconUrl: ProtoField(12, ScalarType.STRING),
|
||||
verType: ProtoField(13, ScalarType.UINT32),
|
||||
shareType: ProtoField(14, ScalarType.UINT32),
|
||||
versionId: ProtoField(15, ScalarType.STRING),
|
||||
withShareTicket: ProtoField(16, ScalarType.UINT32),
|
||||
webURL: ProtoField(17, ScalarType.STRING),
|
||||
appidRich: ProtoField(18, ScalarType.BYTES),
|
||||
template: ProtoField(19, () => Template),
|
||||
field20: ProtoField(20, ScalarType.STRING),
|
||||
};
|
||||
|
||||
export const ExtInfo = {
|
||||
field2: ProtoField(2, ScalarType.BYTES),
|
||||
};
|
||||
|
||||
export const Template = {
|
||||
templateId: ProtoField(1, ScalarType.STRING),
|
||||
templateData: ProtoField(2, ScalarType.STRING),
|
||||
};
|
||||
|
||||
export const MiniAppAdaptShareInfoResp = {
|
||||
field2: ProtoField(2, ScalarType.UINT32),
|
||||
field3: ProtoField(3, ScalarType.STRING),
|
||||
content: ProtoField(4, () => MiniAppAdaptShareInfoRespContent),
|
||||
};
|
||||
|
||||
export const MiniAppAdaptShareInfoRespContent = {
|
||||
jsonContent: ProtoField(2, ScalarType.STRING),
|
||||
};
|
||||
@@ -0,0 +1,154 @@
|
||||
import { ProtoField, ScalarType } from 'napcat-protobuf';
|
||||
import { MsgInfoBody } from '@/napcat-core/packet/transformer/proto';
|
||||
|
||||
export const DataHighwayHead = {
|
||||
version: ProtoField(1, ScalarType.UINT32),
|
||||
uin: ProtoField(2, ScalarType.STRING, true),
|
||||
command: ProtoField(3, ScalarType.STRING, true),
|
||||
seq: ProtoField(4, ScalarType.UINT32, true),
|
||||
retryTimes: ProtoField(5, ScalarType.UINT32, true),
|
||||
appId: ProtoField(6, ScalarType.UINT32),
|
||||
dataFlag: ProtoField(7, ScalarType.UINT32),
|
||||
commandId: ProtoField(8, ScalarType.UINT32),
|
||||
buildVer: ProtoField(9, ScalarType.BYTES, true),
|
||||
};
|
||||
|
||||
export const FileUploadExt = {
|
||||
unknown1: ProtoField(1, ScalarType.INT32),
|
||||
unknown2: ProtoField(2, ScalarType.INT32),
|
||||
unknown3: ProtoField(3, ScalarType.INT32),
|
||||
entry: ProtoField(100, () => FileUploadEntry),
|
||||
unknown200: ProtoField(200, ScalarType.INT32),
|
||||
};
|
||||
|
||||
export const FileUploadEntry = {
|
||||
busiBuff: ProtoField(100, () => ExcitingBusiInfo),
|
||||
fileEntry: ProtoField(200, () => ExcitingFileEntry),
|
||||
clientInfo: ProtoField(300, () => ExcitingClientInfo),
|
||||
fileNameInfo: ProtoField(400, () => ExcitingFileNameInfo),
|
||||
host: ProtoField(500, () => ExcitingHostConfig),
|
||||
};
|
||||
|
||||
export const ExcitingBusiInfo = {
|
||||
busId: ProtoField(1, ScalarType.INT32),
|
||||
senderUin: ProtoField(100, ScalarType.UINT64),
|
||||
receiverUin: ProtoField(200, ScalarType.UINT64),
|
||||
groupCode: ProtoField(400, ScalarType.UINT64),
|
||||
};
|
||||
|
||||
export const ExcitingFileEntry = {
|
||||
fileSize: ProtoField(100, ScalarType.UINT64),
|
||||
md5: ProtoField(200, ScalarType.BYTES),
|
||||
checkKey: ProtoField(300, ScalarType.BYTES),
|
||||
md5S2: ProtoField(400, ScalarType.BYTES),
|
||||
fileId: ProtoField(600, ScalarType.STRING),
|
||||
uploadKey: ProtoField(700, ScalarType.BYTES),
|
||||
};
|
||||
|
||||
export const ExcitingClientInfo = {
|
||||
clientType: ProtoField(100, ScalarType.INT32),
|
||||
appId: ProtoField(200, ScalarType.STRING),
|
||||
terminalType: ProtoField(300, ScalarType.INT32),
|
||||
clientVer: ProtoField(400, ScalarType.STRING),
|
||||
unknown: ProtoField(600, ScalarType.INT32),
|
||||
};
|
||||
|
||||
export const ExcitingFileNameInfo = {
|
||||
fileName: ProtoField(100, ScalarType.STRING),
|
||||
};
|
||||
|
||||
export const ExcitingHostConfig = {
|
||||
hosts: ProtoField(200, () => ExcitingHostInfo, false, true),
|
||||
};
|
||||
|
||||
export const ExcitingHostInfo = {
|
||||
url: ProtoField(1, () => ExcitingUrlInfo),
|
||||
port: ProtoField(2, ScalarType.UINT32),
|
||||
};
|
||||
|
||||
export const ExcitingUrlInfo = {
|
||||
unknown: ProtoField(1, ScalarType.INT32),
|
||||
host: ProtoField(2, ScalarType.STRING),
|
||||
};
|
||||
|
||||
export const LoginSigHead = {
|
||||
uint32LoginSigType: ProtoField(1, ScalarType.UINT32),
|
||||
bytesLoginSig: ProtoField(2, ScalarType.BYTES),
|
||||
appId: ProtoField(3, ScalarType.UINT32),
|
||||
};
|
||||
|
||||
export const NTV2RichMediaHighwayExt = {
|
||||
fileUuid: ProtoField(1, ScalarType.STRING),
|
||||
uKey: ProtoField(2, ScalarType.STRING),
|
||||
network: ProtoField(5, () => NTHighwayNetwork),
|
||||
msgInfoBody: ProtoField(6, () => MsgInfoBody, false, true),
|
||||
blockSize: ProtoField(10, ScalarType.UINT32),
|
||||
hash: ProtoField(11, () => NTHighwayHash),
|
||||
};
|
||||
|
||||
export const NTHighwayHash = {
|
||||
fileSha1: ProtoField(1, ScalarType.BYTES, false, true),
|
||||
};
|
||||
|
||||
export const NTHighwayNetwork = {
|
||||
ipv4s: ProtoField(1, () => NTHighwayIPv4, false, true),
|
||||
};
|
||||
|
||||
export const NTHighwayIPv4 = {
|
||||
domain: ProtoField(1, () => NTHighwayDomain),
|
||||
port: ProtoField(2, ScalarType.UINT32),
|
||||
};
|
||||
|
||||
export const NTHighwayDomain = {
|
||||
isEnable: ProtoField(1, ScalarType.BOOL),
|
||||
ip: ProtoField(2, ScalarType.STRING),
|
||||
};
|
||||
|
||||
export const ReqDataHighwayHead = {
|
||||
msgBaseHead: ProtoField(1, () => DataHighwayHead, true),
|
||||
msgSegHead: ProtoField(2, () => SegHead, true),
|
||||
bytesReqExtendInfo: ProtoField(3, ScalarType.BYTES, true),
|
||||
timestamp: ProtoField(4, ScalarType.UINT64),
|
||||
msgLoginSigHead: ProtoField(5, () => LoginSigHead, true),
|
||||
};
|
||||
|
||||
export const RespDataHighwayHead = {
|
||||
msgBaseHead: ProtoField(1, () => DataHighwayHead, true),
|
||||
msgSegHead: ProtoField(2, () => SegHead, true),
|
||||
errorCode: ProtoField(3, ScalarType.UINT32),
|
||||
allowRetry: ProtoField(4, ScalarType.UINT32),
|
||||
cacheCost: ProtoField(5, ScalarType.UINT32),
|
||||
htCost: ProtoField(6, ScalarType.UINT32),
|
||||
bytesRspExtendInfo: ProtoField(7, ScalarType.BYTES, true),
|
||||
timestamp: ProtoField(8, ScalarType.UINT64),
|
||||
range: ProtoField(9, ScalarType.UINT64),
|
||||
isReset: ProtoField(10, ScalarType.UINT32),
|
||||
};
|
||||
|
||||
export const SegHead = {
|
||||
serviceId: ProtoField(1, ScalarType.UINT32, true),
|
||||
filesize: ProtoField(2, ScalarType.UINT64),
|
||||
dataOffset: ProtoField(3, ScalarType.UINT64, true),
|
||||
dataLength: ProtoField(4, ScalarType.UINT32),
|
||||
retCode: ProtoField(5, ScalarType.UINT32, true),
|
||||
serviceTicket: ProtoField(6, ScalarType.BYTES),
|
||||
flag: ProtoField(7, ScalarType.UINT32, true),
|
||||
md5: ProtoField(8, ScalarType.BYTES),
|
||||
fileMd5: ProtoField(9, ScalarType.BYTES),
|
||||
cacheAddr: ProtoField(10, ScalarType.UINT32, true),
|
||||
queryTimes: ProtoField(11, ScalarType.UINT32),
|
||||
updateCacheIp: ProtoField(12, ScalarType.UINT32),
|
||||
cachePort: ProtoField(13, ScalarType.UINT32, true),
|
||||
};
|
||||
|
||||
export const GroupAvatarExtra = {
|
||||
type: ProtoField(1, ScalarType.UINT32),
|
||||
groupUin: ProtoField(2, ScalarType.UINT32),
|
||||
field3: ProtoField(3, () => GroupAvatarExtraField3),
|
||||
field5: ProtoField(5, ScalarType.UINT32),
|
||||
field6: ProtoField(6, ScalarType.UINT32),
|
||||
};
|
||||
|
||||
export const GroupAvatarExtraField3 = {
|
||||
field1: ProtoField(1, ScalarType.UINT32),
|
||||
};
|
||||
@@ -0,0 +1,34 @@
|
||||
// action folder
|
||||
export * from './action/action';
|
||||
export * from './action/miniAppAdaptShareInfo';
|
||||
|
||||
// highway folder
|
||||
export * from './highway/highway';
|
||||
|
||||
// message folder
|
||||
export * from './message/action';
|
||||
export * from './message/c2c';
|
||||
export * from './message/component';
|
||||
export * from './message/element';
|
||||
export * from './message/group';
|
||||
export * from './message/message';
|
||||
export * from './message/notify';
|
||||
export * from './message/routing';
|
||||
|
||||
// oidb folder
|
||||
export * from './oidb/common/Ntv2.RichMediaReq';
|
||||
export * from './oidb/common/Ntv2.RichMediaResp';
|
||||
export * from './oidb/Oidb.0x6D6';
|
||||
export * from './oidb/Oidb.0x8FC_2';
|
||||
export * from './oidb/Oidb.0x9067_202';
|
||||
export * from './oidb/Oidb.0x929';
|
||||
export * from './oidb/Oidb.0xE37_1200';
|
||||
export * from './oidb/Oidb.0xE37_1700';
|
||||
export * from './oidb/Oidb.0XE37_800';
|
||||
export * from './oidb/Oidb.0xCDE_2';
|
||||
export * from './oidb/Oidb.0xEB7';
|
||||
export * from './oidb/Oidb.0xED3_1';
|
||||
export * from './oidb/Oidb.0XFE1_2';
|
||||
export * from './oidb/OidbBase';
|
||||
export * from './oidb/Oidb.0xE07';
|
||||
export * from './oidb/Oidb.0xf90';
|
||||
@@ -0,0 +1,116 @@
|
||||
import { ProtoField, ScalarType } from 'napcat-protobuf';
|
||||
import { PushMsgBody } from '@/napcat-core/packet/transformer/proto';
|
||||
|
||||
export const LongMsgResult = {
|
||||
action: ProtoField(2, () => LongMsgAction, false, true),
|
||||
};
|
||||
|
||||
export const LongMsgAction = {
|
||||
actionCommand: ProtoField(1, ScalarType.STRING),
|
||||
actionData: ProtoField(2, () => LongMsgContent),
|
||||
};
|
||||
|
||||
export const LongMsgContent = {
|
||||
msgBody: ProtoField(1, () => PushMsgBody, false, true),
|
||||
};
|
||||
|
||||
export const RecvLongMsgReq = {
|
||||
info: ProtoField(1, () => RecvLongMsgInfo, true),
|
||||
settings: ProtoField(15, () => LongMsgSettings, true),
|
||||
};
|
||||
|
||||
export const RecvLongMsgInfo = {
|
||||
uid: ProtoField(1, () => LongMsgUid, true),
|
||||
resId: ProtoField(2, ScalarType.STRING, true),
|
||||
acquire: ProtoField(3, ScalarType.BOOL),
|
||||
};
|
||||
|
||||
export const LongMsgUid = {
|
||||
uid: ProtoField(2, ScalarType.STRING, true),
|
||||
};
|
||||
|
||||
export const LongMsgSettings = {
|
||||
field1: ProtoField(1, ScalarType.UINT32),
|
||||
field2: ProtoField(2, ScalarType.UINT32),
|
||||
field3: ProtoField(3, ScalarType.UINT32),
|
||||
field4: ProtoField(4, ScalarType.UINT32),
|
||||
};
|
||||
|
||||
export const RecvLongMsgResp = {
|
||||
result: ProtoField(1, () => RecvLongMsgResult),
|
||||
settings: ProtoField(15, () => LongMsgSettings),
|
||||
};
|
||||
|
||||
export const RecvLongMsgResult = {
|
||||
resId: ProtoField(3, ScalarType.STRING),
|
||||
payload: ProtoField(4, ScalarType.BYTES),
|
||||
};
|
||||
|
||||
export const SendLongMsgReq = {
|
||||
info: ProtoField(2, () => SendLongMsgInfo),
|
||||
settings: ProtoField(15, () => LongMsgSettings),
|
||||
};
|
||||
|
||||
export const SendLongMsgInfo = {
|
||||
type: ProtoField(1, ScalarType.UINT32),
|
||||
uid: ProtoField(2, () => LongMsgUid, true),
|
||||
groupUin: ProtoField(3, ScalarType.UINT32, true),
|
||||
payload: ProtoField(4, ScalarType.BYTES, true),
|
||||
};
|
||||
|
||||
export const SendLongMsgResp = {
|
||||
result: ProtoField(2, () => SendLongMsgResult),
|
||||
settings: ProtoField(15, () => LongMsgSettings),
|
||||
};
|
||||
|
||||
export const SendLongMsgResult = {
|
||||
resId: ProtoField(3, ScalarType.STRING),
|
||||
};
|
||||
|
||||
export const SsoGetGroupMsg = {
|
||||
info: ProtoField(1, () => SsoGetGroupMsgInfo),
|
||||
direction: ProtoField(2, ScalarType.BOOL),
|
||||
};
|
||||
|
||||
export const SsoGetGroupMsgInfo = {
|
||||
groupUin: ProtoField(1, ScalarType.UINT32),
|
||||
startSequence: ProtoField(2, ScalarType.UINT32),
|
||||
endSequence: ProtoField(3, ScalarType.UINT32),
|
||||
};
|
||||
|
||||
export const SsoGetGroupMsgResponse = {
|
||||
body: ProtoField(3, () => SsoGetGroupMsgResponseBody),
|
||||
};
|
||||
|
||||
export const SsoGetGroupMsgResponseBody = {
|
||||
groupUin: ProtoField(3, ScalarType.UINT32),
|
||||
startSequence: ProtoField(4, ScalarType.UINT32),
|
||||
endSequence: ProtoField(5, ScalarType.UINT32),
|
||||
messages: ProtoField(6, () => PushMsgBody, false, true),
|
||||
};
|
||||
|
||||
export const SsoGetRoamMsg = {
|
||||
friendUid: ProtoField(1, ScalarType.STRING, true),
|
||||
time: ProtoField(2, ScalarType.UINT32),
|
||||
random: ProtoField(3, ScalarType.UINT32),
|
||||
count: ProtoField(4, ScalarType.UINT32),
|
||||
direction: ProtoField(5, ScalarType.BOOL),
|
||||
};
|
||||
|
||||
export const SsoGetRoamMsgResponse = {
|
||||
friendUid: ProtoField(3, ScalarType.STRING),
|
||||
timestamp: ProtoField(5, ScalarType.UINT32),
|
||||
random: ProtoField(6, ScalarType.UINT32),
|
||||
messages: ProtoField(7, () => PushMsgBody, false, true),
|
||||
};
|
||||
|
||||
export const SsoGetC2cMsg = {
|
||||
friendUid: ProtoField(2, ScalarType.STRING, true),
|
||||
startSequence: ProtoField(3, ScalarType.UINT32),
|
||||
endSequence: ProtoField(4, ScalarType.UINT32),
|
||||
};
|
||||
|
||||
export const SsoGetC2cMsgResponse = {
|
||||
friendUid: ProtoField(4, ScalarType.STRING),
|
||||
messages: ProtoField(7, () => PushMsgBody, false, true),
|
||||
};
|
||||
@@ -0,0 +1,10 @@
|
||||
import { ProtoField, ScalarType } from 'napcat-protobuf';
|
||||
|
||||
export const C2C = {
|
||||
uin: ProtoField(1, ScalarType.UINT32, true),
|
||||
uid: ProtoField(2, ScalarType.STRING, true),
|
||||
field3: ProtoField(3, ScalarType.UINT32, true),
|
||||
sig: ProtoField(4, ScalarType.UINT32, true),
|
||||
receiverUin: ProtoField(5, ScalarType.UINT32, true),
|
||||
receiverUid: ProtoField(6, ScalarType.STRING, true),
|
||||
};
|
||||
@@ -0,0 +1,165 @@
|
||||
import { ProtoField, ScalarType } from 'napcat-protobuf';
|
||||
import { Elem } from '@/napcat-core/packet/transformer/proto';
|
||||
|
||||
export const Attr = {
|
||||
codePage: ProtoField(1, ScalarType.INT32),
|
||||
time: ProtoField(2, ScalarType.INT32),
|
||||
random: ProtoField(3, ScalarType.INT32),
|
||||
color: ProtoField(4, ScalarType.INT32),
|
||||
size: ProtoField(5, ScalarType.INT32),
|
||||
effect: ProtoField(6, ScalarType.INT32),
|
||||
charSet: ProtoField(7, ScalarType.INT32),
|
||||
pitchAndFamily: ProtoField(8, ScalarType.INT32),
|
||||
fontName: ProtoField(9, ScalarType.STRING),
|
||||
reserveData: ProtoField(10, ScalarType.BYTES),
|
||||
};
|
||||
|
||||
export const NotOnlineFile = {
|
||||
fileType: ProtoField(1, ScalarType.INT32, true),
|
||||
sig: ProtoField(2, ScalarType.BYTES, true),
|
||||
fileUuid: ProtoField(3, ScalarType.STRING, true),
|
||||
fileMd5: ProtoField(4, ScalarType.BYTES, true),
|
||||
fileName: ProtoField(5, ScalarType.STRING, true),
|
||||
fileSize: ProtoField(6, ScalarType.INT64, true),
|
||||
note: ProtoField(7, ScalarType.BYTES, true),
|
||||
reserved: ProtoField(8, ScalarType.INT32, true),
|
||||
subcmd: ProtoField(9, ScalarType.INT32, true),
|
||||
microCloud: ProtoField(10, ScalarType.INT32, true),
|
||||
bytesFileUrls: ProtoField(11, ScalarType.BYTES, false, true),
|
||||
downloadFlag: ProtoField(12, ScalarType.INT32, true),
|
||||
dangerEvel: ProtoField(50, ScalarType.INT32, true),
|
||||
lifeTime: ProtoField(51, ScalarType.INT32, true),
|
||||
uploadTime: ProtoField(52, ScalarType.INT32, true),
|
||||
absFileType: ProtoField(53, ScalarType.INT32, true),
|
||||
clientType: ProtoField(54, ScalarType.INT32, true),
|
||||
expireTime: ProtoField(55, ScalarType.INT32, true),
|
||||
pbReserve: ProtoField(56, ScalarType.BYTES, true),
|
||||
fileHash: ProtoField(57, ScalarType.STRING, true),
|
||||
};
|
||||
|
||||
export const Ptt = {
|
||||
fileType: ProtoField(1, ScalarType.INT32),
|
||||
srcUin: ProtoField(2, ScalarType.UINT64),
|
||||
fileUuid: ProtoField(3, ScalarType.STRING),
|
||||
fileMd5: ProtoField(4, ScalarType.BYTES),
|
||||
fileName: ProtoField(5, ScalarType.STRING),
|
||||
fileSize: ProtoField(6, ScalarType.INT32),
|
||||
reserve: ProtoField(7, ScalarType.BYTES),
|
||||
fileId: ProtoField(8, ScalarType.INT32),
|
||||
serverIp: ProtoField(9, ScalarType.INT32),
|
||||
serverPort: ProtoField(10, ScalarType.INT32),
|
||||
boolValid: ProtoField(11, ScalarType.BOOL),
|
||||
signature: ProtoField(12, ScalarType.BYTES),
|
||||
shortcut: ProtoField(13, ScalarType.BYTES),
|
||||
fileKey: ProtoField(14, ScalarType.BYTES),
|
||||
magicPttIndex: ProtoField(15, ScalarType.INT32),
|
||||
voiceSwitch: ProtoField(16, ScalarType.INT32),
|
||||
pttUrl: ProtoField(17, ScalarType.BYTES),
|
||||
groupFileKey: ProtoField(18, ScalarType.STRING),
|
||||
time: ProtoField(19, ScalarType.INT32),
|
||||
downPara: ProtoField(20, ScalarType.BYTES),
|
||||
format: ProtoField(29, ScalarType.INT32),
|
||||
pbReserve: ProtoField(30, ScalarType.BYTES),
|
||||
bytesPttUrls: ProtoField(31, ScalarType.BYTES, false, true),
|
||||
downloadFlag: ProtoField(32, ScalarType.INT32),
|
||||
};
|
||||
|
||||
export const RichText = {
|
||||
attr: ProtoField(1, () => Attr, true),
|
||||
elems: ProtoField(2, () => Elem, false, true),
|
||||
notOnlineFile: ProtoField(3, () => NotOnlineFile, true),
|
||||
ptt: ProtoField(4, () => Ptt, true),
|
||||
};
|
||||
|
||||
export const ButtonExtra = {
|
||||
data: ProtoField(1, () => KeyboardData),
|
||||
};
|
||||
|
||||
export const KeyboardData = {
|
||||
rows: ProtoField(1, () => Row, false, true),
|
||||
};
|
||||
|
||||
export const Row = {
|
||||
buttons: ProtoField(1, () => Button, false, true),
|
||||
};
|
||||
|
||||
export const Button = {
|
||||
id: ProtoField(1, ScalarType.STRING),
|
||||
renderData: ProtoField(2, () => RenderData),
|
||||
action: ProtoField(3, () => Action),
|
||||
};
|
||||
|
||||
export const RenderData = {
|
||||
label: ProtoField(1, ScalarType.STRING),
|
||||
visitedLabel: ProtoField(2, ScalarType.STRING),
|
||||
style: ProtoField(3, ScalarType.INT32),
|
||||
};
|
||||
|
||||
export const Action = {
|
||||
type: ProtoField(1, ScalarType.INT32),
|
||||
permission: ProtoField(2, () => Permission),
|
||||
unsupportTips: ProtoField(4, ScalarType.STRING),
|
||||
data: ProtoField(5, ScalarType.STRING),
|
||||
reply: ProtoField(7, ScalarType.BOOL),
|
||||
enter: ProtoField(8, ScalarType.BOOL),
|
||||
};
|
||||
|
||||
export const Permission = {
|
||||
type: ProtoField(1, ScalarType.INT32),
|
||||
specifyRoleIds: ProtoField(2, ScalarType.STRING, false, true),
|
||||
specifyUserIds: ProtoField(3, ScalarType.STRING, false, true),
|
||||
};
|
||||
|
||||
export const FileExtra = {
|
||||
file: ProtoField(1, () => NotOnlineFile),
|
||||
field6: ProtoField(6, () => PrivateFileExtra),
|
||||
};
|
||||
|
||||
export const PrivateFileExtra = {
|
||||
field2: ProtoField(2, () => PrivateFileExtraField2),
|
||||
};
|
||||
|
||||
export const PrivateFileExtraField2 = {
|
||||
field1: ProtoField(1, ScalarType.UINT32),
|
||||
fileUuid: ProtoField(4, ScalarType.STRING),
|
||||
fileName: ProtoField(5, ScalarType.STRING),
|
||||
field6: ProtoField(6, ScalarType.UINT32),
|
||||
field7: ProtoField(7, ScalarType.BYTES),
|
||||
field8: ProtoField(8, ScalarType.BYTES),
|
||||
timestamp1: ProtoField(9, ScalarType.UINT32),
|
||||
fileHash: ProtoField(14, ScalarType.STRING),
|
||||
selfUid: ProtoField(15, ScalarType.STRING),
|
||||
destUid: ProtoField(16, ScalarType.STRING),
|
||||
};
|
||||
|
||||
export const GroupFileExtra = {
|
||||
field1: ProtoField(1, ScalarType.UINT32),
|
||||
fileName: ProtoField(2, ScalarType.STRING),
|
||||
display: ProtoField(3, ScalarType.STRING),
|
||||
inner: ProtoField(7, () => GroupFileExtraInner),
|
||||
};
|
||||
|
||||
export const GroupFileExtraInner = {
|
||||
info: ProtoField(2, () => GroupFileExtraInfo),
|
||||
};
|
||||
|
||||
export const GroupFileExtraInfo = {
|
||||
busId: ProtoField(1, ScalarType.UINT32),
|
||||
fileId: ProtoField(2, ScalarType.STRING),
|
||||
fileSize: ProtoField(3, ScalarType.UINT64),
|
||||
fileName: ProtoField(4, ScalarType.STRING),
|
||||
field5: ProtoField(5, ScalarType.UINT32),
|
||||
fileSha: ProtoField(6, ScalarType.BYTES),
|
||||
extInfoString: ProtoField(7, ScalarType.STRING),
|
||||
fileMd5: ProtoField(8, ScalarType.BYTES),
|
||||
};
|
||||
|
||||
export const ImageExtraUrl = {
|
||||
origUrl: ProtoField(30, ScalarType.STRING),
|
||||
};
|
||||
|
||||
export const PokeExtra = {
|
||||
type: ProtoField(1, ScalarType.UINT32),
|
||||
field7: ProtoField(7, ScalarType.UINT32),
|
||||
field8: ProtoField(8, ScalarType.UINT32),
|
||||
};
|
||||
@@ -0,0 +1,360 @@
|
||||
import { ProtoField, ScalarType } from 'napcat-protobuf';
|
||||
|
||||
export const Elem = {
|
||||
text: ProtoField(1, () => Text, true),
|
||||
face: ProtoField(2, () => Face, true),
|
||||
onlineImage: ProtoField(3, () => OnlineImage, true),
|
||||
notOnlineImage: ProtoField(4, () => NotOnlineImage, true),
|
||||
transElem: ProtoField(5, () => TransElem, true),
|
||||
marketFace: ProtoField(6, () => MarketFace, true),
|
||||
customFace: ProtoField(8, () => CustomFace, true),
|
||||
elemFlags2: ProtoField(9, () => ElemFlags2, true),
|
||||
richMsg: ProtoField(12, () => RichMsg, true),
|
||||
groupFile: ProtoField(13, () => GroupFile, true),
|
||||
extraInfo: ProtoField(16, () => ExtraInfo, true),
|
||||
videoFile: ProtoField(19, () => VideoFile, true),
|
||||
anonymousGroupMessage: ProtoField(21, () => AnonymousGroupMessage, true),
|
||||
customElem: ProtoField(31, () => CustomElem, true),
|
||||
generalFlags: ProtoField(37, () => GeneralFlags, true),
|
||||
srcMsg: ProtoField(45, () => SrcMsg, true),
|
||||
lightAppElem: ProtoField(51, () => LightAppElem, true),
|
||||
commonElem: ProtoField(53, () => CommonElem, true),
|
||||
};
|
||||
|
||||
export const Text = {
|
||||
str: ProtoField(1, ScalarType.STRING, true),
|
||||
lint: ProtoField(2, ScalarType.STRING, true),
|
||||
attr6Buf: ProtoField(3, ScalarType.BYTES, true),
|
||||
attr7Buf: ProtoField(4, ScalarType.BYTES, true),
|
||||
buf: ProtoField(11, ScalarType.BYTES, true),
|
||||
pbReserve: ProtoField(12, ScalarType.BYTES, true),
|
||||
};
|
||||
|
||||
export const Face = {
|
||||
index: ProtoField(1, ScalarType.INT32, true),
|
||||
old: ProtoField(2, ScalarType.BYTES, true),
|
||||
buf: ProtoField(11, ScalarType.BYTES, true),
|
||||
};
|
||||
|
||||
export const OnlineImage = {
|
||||
guid: ProtoField(1, ScalarType.BYTES),
|
||||
filePath: ProtoField(2, ScalarType.BYTES),
|
||||
oldVerSendFile: ProtoField(3, ScalarType.BYTES),
|
||||
};
|
||||
|
||||
export const NotOnlineImage = {
|
||||
filePath: ProtoField(1, ScalarType.STRING),
|
||||
fileLen: ProtoField(2, ScalarType.UINT32),
|
||||
downloadPath: ProtoField(3, ScalarType.STRING),
|
||||
oldVerSendFile: ProtoField(4, ScalarType.BYTES),
|
||||
imgType: ProtoField(5, ScalarType.INT32),
|
||||
previewsImage: ProtoField(6, ScalarType.BYTES),
|
||||
picMd5: ProtoField(7, ScalarType.BYTES),
|
||||
picHeight: ProtoField(8, ScalarType.UINT32),
|
||||
picWidth: ProtoField(9, ScalarType.UINT32),
|
||||
resId: ProtoField(10, ScalarType.STRING),
|
||||
flag: ProtoField(11, ScalarType.BYTES),
|
||||
thumbUrl: ProtoField(12, ScalarType.STRING),
|
||||
original: ProtoField(13, ScalarType.INT32),
|
||||
bigUrl: ProtoField(14, ScalarType.STRING),
|
||||
origUrl: ProtoField(15, ScalarType.STRING),
|
||||
bizType: ProtoField(16, ScalarType.INT32),
|
||||
result: ProtoField(17, ScalarType.INT32),
|
||||
index: ProtoField(18, ScalarType.INT32),
|
||||
opFaceBuf: ProtoField(19, ScalarType.BYTES),
|
||||
oldPicMd5: ProtoField(20, ScalarType.BOOL),
|
||||
thumbWidth: ProtoField(21, ScalarType.INT32),
|
||||
thumbHeight: ProtoField(22, ScalarType.INT32),
|
||||
fileId: ProtoField(23, ScalarType.INT32),
|
||||
showLen: ProtoField(24, ScalarType.UINT32),
|
||||
downloadLen: ProtoField(25, ScalarType.UINT32),
|
||||
x400Url: ProtoField(26, ScalarType.STRING),
|
||||
x400Width: ProtoField(27, ScalarType.INT32),
|
||||
x400Height: ProtoField(28, ScalarType.INT32),
|
||||
pbRes: ProtoField(29, () => NotOnlineImage_PbReserve),
|
||||
};
|
||||
|
||||
export const NotOnlineImage_PbReserve = {
|
||||
subType: ProtoField(1, ScalarType.INT32),
|
||||
field3: ProtoField(3, ScalarType.INT32),
|
||||
field4: ProtoField(4, ScalarType.INT32),
|
||||
summary: ProtoField(8, ScalarType.STRING),
|
||||
field10: ProtoField(10, ScalarType.INT32),
|
||||
field20: ProtoField(20, () => NotOnlineImage_PbReserve2),
|
||||
url: ProtoField(30, ScalarType.STRING),
|
||||
md5Str: ProtoField(31, ScalarType.STRING),
|
||||
};
|
||||
|
||||
export const NotOnlineImage_PbReserve2 = {
|
||||
field1: ProtoField(1, ScalarType.INT32),
|
||||
field2: ProtoField(2, ScalarType.STRING),
|
||||
field3: ProtoField(3, ScalarType.INT32),
|
||||
field4: ProtoField(4, ScalarType.INT32),
|
||||
field5: ProtoField(5, ScalarType.INT32),
|
||||
field7: ProtoField(7, ScalarType.STRING),
|
||||
};
|
||||
|
||||
export const TransElem = {
|
||||
elemType: ProtoField(1, ScalarType.INT32),
|
||||
elemValue: ProtoField(2, ScalarType.BYTES),
|
||||
};
|
||||
|
||||
export const MarketFace = {
|
||||
faceName: ProtoField(1, ScalarType.STRING),
|
||||
itemType: ProtoField(2, ScalarType.INT32),
|
||||
faceInfo: ProtoField(3, ScalarType.INT32),
|
||||
faceId: ProtoField(4, ScalarType.BYTES),
|
||||
tabId: ProtoField(5, ScalarType.INT32),
|
||||
subType: ProtoField(6, ScalarType.INT32),
|
||||
key: ProtoField(7, ScalarType.STRING),
|
||||
param: ProtoField(8, ScalarType.BYTES),
|
||||
mediaType: ProtoField(9, ScalarType.INT32),
|
||||
imageWidth: ProtoField(10, ScalarType.INT32),
|
||||
imageHeight: ProtoField(11, ScalarType.INT32),
|
||||
mobileparam: ProtoField(12, ScalarType.BYTES),
|
||||
pbReserve: ProtoField(13, () => MarketFacePbRes),
|
||||
};
|
||||
|
||||
export const MarketFacePbRes = {
|
||||
field8: ProtoField(8, ScalarType.INT32),
|
||||
};
|
||||
|
||||
export const CustomFace = {
|
||||
guid: ProtoField(1, ScalarType.BYTES),
|
||||
filePath: ProtoField(2, ScalarType.STRING),
|
||||
shortcut: ProtoField(3, ScalarType.STRING),
|
||||
buffer: ProtoField(4, ScalarType.BYTES),
|
||||
flag: ProtoField(5, ScalarType.BYTES),
|
||||
oldData: ProtoField(6, ScalarType.BYTES, true),
|
||||
fileId: ProtoField(7, ScalarType.UINT32),
|
||||
serverIp: ProtoField(8, ScalarType.INT32, true),
|
||||
serverPort: ProtoField(9, ScalarType.INT32, true),
|
||||
fileType: ProtoField(10, ScalarType.INT32),
|
||||
signature: ProtoField(11, ScalarType.BYTES),
|
||||
useful: ProtoField(12, ScalarType.INT32),
|
||||
md5: ProtoField(13, ScalarType.BYTES),
|
||||
thumbUrl: ProtoField(14, ScalarType.STRING),
|
||||
bigUrl: ProtoField(15, ScalarType.STRING),
|
||||
origUrl: ProtoField(16, ScalarType.STRING),
|
||||
bizType: ProtoField(17, ScalarType.INT32),
|
||||
repeatIndex: ProtoField(18, ScalarType.INT32),
|
||||
repeatImage: ProtoField(19, ScalarType.INT32),
|
||||
imageType: ProtoField(20, ScalarType.INT32),
|
||||
index: ProtoField(21, ScalarType.INT32),
|
||||
width: ProtoField(22, ScalarType.INT32),
|
||||
height: ProtoField(23, ScalarType.INT32),
|
||||
source: ProtoField(24, ScalarType.INT32),
|
||||
size: ProtoField(25, ScalarType.UINT32),
|
||||
origin: ProtoField(26, ScalarType.INT32),
|
||||
thumbWidth: ProtoField(27, ScalarType.INT32, true),
|
||||
thumbHeight: ProtoField(28, ScalarType.INT32, true),
|
||||
showLen: ProtoField(29, ScalarType.INT32),
|
||||
downloadLen: ProtoField(30, ScalarType.INT32),
|
||||
x400Url: ProtoField(31, ScalarType.STRING, true),
|
||||
x400Width: ProtoField(32, ScalarType.INT32),
|
||||
x400Height: ProtoField(33, ScalarType.INT32),
|
||||
pbRes: ProtoField(34, () => CustomFace_PbReserve, true),
|
||||
};
|
||||
|
||||
export const CustomFace_PbReserve = {
|
||||
subType: ProtoField(1, ScalarType.INT32),
|
||||
summary: ProtoField(9, ScalarType.STRING),
|
||||
};
|
||||
|
||||
export const ElemFlags2 = {
|
||||
colorTextId: ProtoField(1, ScalarType.UINT32),
|
||||
msgId: ProtoField(2, ScalarType.UINT64),
|
||||
whisperSessionId: ProtoField(3, ScalarType.UINT32),
|
||||
pttChangeBit: ProtoField(4, ScalarType.UINT32),
|
||||
vipStatus: ProtoField(5, ScalarType.UINT32),
|
||||
compatibleId: ProtoField(6, ScalarType.UINT32),
|
||||
insts: ProtoField(7, () => Instance, false, true),
|
||||
msgRptCnt: ProtoField(8, ScalarType.UINT32),
|
||||
srcInst: ProtoField(9, () => Instance),
|
||||
longtitude: ProtoField(10, ScalarType.UINT32),
|
||||
latitude: ProtoField(11, ScalarType.UINT32),
|
||||
customFont: ProtoField(12, ScalarType.UINT32),
|
||||
pcSupportDef: ProtoField(13, () => PcSupportDef),
|
||||
crmFlags: ProtoField(14, ScalarType.UINT32, true),
|
||||
};
|
||||
|
||||
export const PcSupportDef = {
|
||||
pcPtlBegin: ProtoField(1, ScalarType.UINT32),
|
||||
pcPtlEnd: ProtoField(2, ScalarType.UINT32),
|
||||
macPtlBegin: ProtoField(3, ScalarType.UINT32),
|
||||
macPtlEnd: ProtoField(4, ScalarType.UINT32),
|
||||
ptlsSupport: ProtoField(5, ScalarType.INT32, false, true),
|
||||
ptlsNotSupport: ProtoField(6, ScalarType.UINT32, false, true),
|
||||
};
|
||||
|
||||
export const Instance = {
|
||||
appId: ProtoField(1, ScalarType.UINT32),
|
||||
instId: ProtoField(2, ScalarType.UINT32),
|
||||
};
|
||||
|
||||
export const RichMsg = {
|
||||
template1: ProtoField(1, ScalarType.BYTES, true),
|
||||
serviceId: ProtoField(2, ScalarType.INT32, true),
|
||||
msgResId: ProtoField(3, ScalarType.BYTES, true),
|
||||
rand: ProtoField(4, ScalarType.INT32, true),
|
||||
seq: ProtoField(5, ScalarType.UINT32, true),
|
||||
};
|
||||
|
||||
export const GroupFile = {
|
||||
filename: ProtoField(1, ScalarType.BYTES),
|
||||
fileSize: ProtoField(2, ScalarType.UINT64),
|
||||
fileId: ProtoField(3, ScalarType.BYTES),
|
||||
batchId: ProtoField(4, ScalarType.BYTES),
|
||||
fileKey: ProtoField(5, ScalarType.BYTES),
|
||||
mark: ProtoField(6, ScalarType.BYTES),
|
||||
sequence: ProtoField(7, ScalarType.UINT64),
|
||||
batchItemId: ProtoField(8, ScalarType.BYTES),
|
||||
feedMsgTime: ProtoField(9, ScalarType.INT32),
|
||||
pbReserve: ProtoField(10, ScalarType.BYTES),
|
||||
};
|
||||
|
||||
export const ExtraInfo = {
|
||||
nick: ProtoField(1, ScalarType.BYTES),
|
||||
groupCard: ProtoField(2, ScalarType.BYTES),
|
||||
level: ProtoField(3, ScalarType.INT32),
|
||||
flags: ProtoField(4, ScalarType.INT32),
|
||||
groupMask: ProtoField(5, ScalarType.INT32),
|
||||
msgTailId: ProtoField(6, ScalarType.INT32),
|
||||
senderTitle: ProtoField(7, ScalarType.BYTES),
|
||||
apnsTips: ProtoField(8, ScalarType.BYTES),
|
||||
uin: ProtoField(9, ScalarType.UINT64),
|
||||
msgStateFlag: ProtoField(10, ScalarType.INT32),
|
||||
apnsSoundType: ProtoField(11, ScalarType.INT32),
|
||||
newGroupFlag: ProtoField(12, ScalarType.INT32),
|
||||
};
|
||||
|
||||
export const VideoFile = {
|
||||
fileUuid: ProtoField(1, ScalarType.STRING),
|
||||
fileMd5: ProtoField(2, ScalarType.BYTES),
|
||||
fileName: ProtoField(3, ScalarType.STRING),
|
||||
fileFormat: ProtoField(4, ScalarType.INT32),
|
||||
fileTime: ProtoField(5, ScalarType.INT32),
|
||||
fileSize: ProtoField(6, ScalarType.INT32),
|
||||
thumbWidth: ProtoField(7, ScalarType.INT32),
|
||||
thumbHeight: ProtoField(8, ScalarType.INT32),
|
||||
thumbFileMd5: ProtoField(9, ScalarType.BYTES),
|
||||
source: ProtoField(10, ScalarType.BYTES),
|
||||
thumbFileSize: ProtoField(11, ScalarType.INT32),
|
||||
busiType: ProtoField(12, ScalarType.INT32),
|
||||
fromChatType: ProtoField(13, ScalarType.INT32),
|
||||
toChatType: ProtoField(14, ScalarType.INT32),
|
||||
boolSupportProgressive: ProtoField(15, ScalarType.BOOL),
|
||||
fileWidth: ProtoField(16, ScalarType.INT32),
|
||||
fileHeight: ProtoField(17, ScalarType.INT32),
|
||||
subBusiType: ProtoField(18, ScalarType.INT32),
|
||||
videoAttr: ProtoField(19, ScalarType.INT32),
|
||||
bytesThumbFileUrls: ProtoField(20, ScalarType.BYTES, false, true),
|
||||
bytesVideoFileUrls: ProtoField(21, ScalarType.BYTES, false, true),
|
||||
thumbDownloadFlag: ProtoField(22, ScalarType.INT32),
|
||||
videoDownloadFlag: ProtoField(23, ScalarType.INT32),
|
||||
pbReserve: ProtoField(24, ScalarType.BYTES),
|
||||
};
|
||||
|
||||
export const AnonymousGroupMessage = {
|
||||
flags: ProtoField(1, ScalarType.INT32),
|
||||
anonId: ProtoField(2, ScalarType.BYTES),
|
||||
anonNick: ProtoField(3, ScalarType.BYTES),
|
||||
headPortrait: ProtoField(4, ScalarType.INT32),
|
||||
expireTime: ProtoField(5, ScalarType.INT32),
|
||||
bubbleId: ProtoField(6, ScalarType.INT32),
|
||||
rankColor: ProtoField(7, ScalarType.BYTES),
|
||||
};
|
||||
|
||||
export const CustomElem = {
|
||||
desc: ProtoField(1, ScalarType.BYTES),
|
||||
data: ProtoField(2, ScalarType.BYTES),
|
||||
enumType: ProtoField(3, ScalarType.INT32),
|
||||
ext: ProtoField(4, ScalarType.BYTES),
|
||||
sound: ProtoField(5, ScalarType.BYTES),
|
||||
};
|
||||
|
||||
export const GeneralFlags = {
|
||||
bubbleDiyTextId: ProtoField(1, ScalarType.INT32),
|
||||
groupFlagNew: ProtoField(2, ScalarType.INT32),
|
||||
uin: ProtoField(3, ScalarType.UINT64),
|
||||
rpId: ProtoField(4, ScalarType.BYTES),
|
||||
prpFold: ProtoField(5, ScalarType.INT32),
|
||||
longTextFlag: ProtoField(6, ScalarType.INT32),
|
||||
longTextResId: ProtoField(7, ScalarType.STRING, true),
|
||||
groupType: ProtoField(8, ScalarType.INT32),
|
||||
toUinFlag: ProtoField(9, ScalarType.INT32),
|
||||
glamourLevel: ProtoField(10, ScalarType.INT32),
|
||||
memberLevel: ProtoField(11, ScalarType.INT32),
|
||||
groupRankSeq: ProtoField(12, ScalarType.UINT64),
|
||||
olympicTorch: ProtoField(13, ScalarType.INT32),
|
||||
babyqGuideMsgCookie: ProtoField(14, ScalarType.BYTES),
|
||||
uin32ExpertFlag: ProtoField(15, ScalarType.INT32),
|
||||
bubbleSubId: ProtoField(16, ScalarType.INT32),
|
||||
pendantId: ProtoField(17, ScalarType.UINT64),
|
||||
rpIndex: ProtoField(18, ScalarType.BYTES),
|
||||
pbReserve: ProtoField(19, ScalarType.BYTES),
|
||||
};
|
||||
|
||||
export const SrcMsg = {
|
||||
origSeqs: ProtoField(1, ScalarType.UINT32, false, true),
|
||||
senderUin: ProtoField(2, ScalarType.UINT64),
|
||||
time: ProtoField(3, ScalarType.INT32, true),
|
||||
flag: ProtoField(4, ScalarType.INT32, true),
|
||||
elems: ProtoField(5, () => Elem, false, true),
|
||||
type: ProtoField(6, ScalarType.INT32, true),
|
||||
richMsg: ProtoField(7, ScalarType.BYTES, true),
|
||||
pbReserve: ProtoField(8, () => SrcMsgPbRes, true),
|
||||
sourceMsg: ProtoField(9, ScalarType.BYTES, true),
|
||||
toUin: ProtoField(10, ScalarType.UINT64, true),
|
||||
troopName: ProtoField(11, ScalarType.BYTES, true),
|
||||
};
|
||||
|
||||
export const SrcMsgPbRes = {
|
||||
messageId: ProtoField(3, ScalarType.UINT64),
|
||||
senderUid: ProtoField(6, ScalarType.STRING, true),
|
||||
receiverUid: ProtoField(7, ScalarType.STRING, true),
|
||||
friendSeq: ProtoField(8, ScalarType.UINT32, true),
|
||||
};
|
||||
|
||||
export const LightAppElem = {
|
||||
data: ProtoField(1, ScalarType.BYTES),
|
||||
msgResid: ProtoField(2, ScalarType.BYTES, true),
|
||||
};
|
||||
|
||||
export const CommonElem = {
|
||||
serviceType: ProtoField(1, ScalarType.INT32),
|
||||
pbElem: ProtoField(2, ScalarType.BYTES),
|
||||
businessType: ProtoField(3, ScalarType.UINT32),
|
||||
};
|
||||
|
||||
export const FaceExtra = {
|
||||
faceId: ProtoField(1, ScalarType.INT32, true),
|
||||
};
|
||||
|
||||
export const MentionExtra = {
|
||||
type: ProtoField(3, ScalarType.INT32, true),
|
||||
uin: ProtoField(4, ScalarType.UINT32, true),
|
||||
field5: ProtoField(5, ScalarType.INT32, true),
|
||||
uid: ProtoField(9, ScalarType.STRING, true),
|
||||
};
|
||||
|
||||
export const QBigFaceExtra = {
|
||||
AniStickerPackId: ProtoField(1, ScalarType.STRING, true),
|
||||
AniStickerId: ProtoField(2, ScalarType.STRING, true),
|
||||
faceId: ProtoField(3, ScalarType.INT32, true),
|
||||
sourceType: ProtoField(4, ScalarType.INT32, true),
|
||||
AniStickerType: ProtoField(5, ScalarType.INT32, true),
|
||||
resultId: ProtoField(6, ScalarType.STRING, true),
|
||||
preview: ProtoField(7, ScalarType.STRING, true),
|
||||
randomType: ProtoField(9, ScalarType.INT32, true),
|
||||
};
|
||||
|
||||
export const QSmallFaceExtra = {
|
||||
faceId: ProtoField(1, ScalarType.UINT32),
|
||||
preview: ProtoField(2, ScalarType.STRING),
|
||||
preview2: ProtoField(3, ScalarType.STRING),
|
||||
};
|
||||
|
||||
export const MarkdownData = {
|
||||
content: ProtoField(1, ScalarType.STRING),
|
||||
};
|
||||
@@ -0,0 +1,18 @@
|
||||
import { ProtoField, ScalarType } from 'napcat-protobuf';
|
||||
|
||||
export const GroupRecallMsg = {
|
||||
type: ProtoField(1, ScalarType.UINT32),
|
||||
groupUin: ProtoField(2, ScalarType.UINT32),
|
||||
field3: ProtoField(3, () => GroupRecallMsgField3),
|
||||
field4: ProtoField(4, () => GroupRecallMsgField4),
|
||||
};
|
||||
|
||||
export const GroupRecallMsgField3 = {
|
||||
sequence: ProtoField(1, ScalarType.UINT32),
|
||||
random: ProtoField(2, ScalarType.UINT32),
|
||||
field3: ProtoField(3, ScalarType.UINT32),
|
||||
};
|
||||
|
||||
export const GroupRecallMsgField4 = {
|
||||
field1: ProtoField(1, ScalarType.UINT32),
|
||||
};
|
||||
@@ -0,0 +1,18 @@
|
||||
import { ProtoField, ScalarType } from 'napcat-protobuf';
|
||||
|
||||
export const GroupAdminExtra = {
|
||||
adminUid: ProtoField(1, ScalarType.STRING),
|
||||
isPromote: ProtoField(2, ScalarType.BOOL),
|
||||
};
|
||||
|
||||
export const GroupAdminBody = {
|
||||
extraDisable: ProtoField(1, () => GroupAdminExtra),
|
||||
extraEnable: ProtoField(2, () => GroupAdminExtra),
|
||||
};
|
||||
|
||||
export const GroupAdmin = {
|
||||
groupUin: ProtoField(1, ScalarType.UINT32),
|
||||
flag: ProtoField(2, ScalarType.UINT32),
|
||||
isPromote: ProtoField(3, ScalarType.BOOL),
|
||||
body: ProtoField(4, () => GroupAdminBody),
|
||||
};
|
||||
@@ -0,0 +1,138 @@
|
||||
import { ProtoField, ScalarType } from 'napcat-protobuf';
|
||||
import {
|
||||
C2C,
|
||||
ForwardHead,
|
||||
Grp,
|
||||
GrpTmp,
|
||||
ResponseForward,
|
||||
ResponseGrp, RichText,
|
||||
Trans0X211,
|
||||
WPATmp,
|
||||
} from '@/napcat-core/packet/transformer/proto';
|
||||
|
||||
export const ContentHead = {
|
||||
type: ProtoField(1, ScalarType.UINT32),
|
||||
subType: ProtoField(2, ScalarType.UINT32, true),
|
||||
c2cCmd: ProtoField(3, ScalarType.UINT32, true),
|
||||
ranDom: ProtoField(4, ScalarType.UINT32, true),
|
||||
sequence: ProtoField(5, ScalarType.UINT32, true),
|
||||
timeStamp: ProtoField(6, ScalarType.UINT32, true),
|
||||
pkgNum: ProtoField(7, ScalarType.UINT64, true),
|
||||
pkgIndex: ProtoField(8, ScalarType.UINT32, true),
|
||||
divSeq: ProtoField(9, ScalarType.UINT32, true),
|
||||
autoReply: ProtoField(10, ScalarType.UINT32),
|
||||
ntMsgSeq: ProtoField(10, ScalarType.UINT32, true),
|
||||
newId: ProtoField(12, ScalarType.UINT64, true),
|
||||
forward: ProtoField(15, () => ForwardHead, true),
|
||||
};
|
||||
|
||||
export const MessageBody = {
|
||||
richText: ProtoField(1, () => RichText, true),
|
||||
msgContent: ProtoField(2, ScalarType.BYTES, true),
|
||||
msgEncryptContent: ProtoField(3, ScalarType.BYTES, true),
|
||||
};
|
||||
|
||||
export const Message = {
|
||||
routingHead: ProtoField(1, () => RoutingHead, true),
|
||||
contentHead: ProtoField(2, () => ContentHead, true),
|
||||
body: ProtoField(3, () => MessageBody, true),
|
||||
clientSequence: ProtoField(4, ScalarType.UINT32, true),
|
||||
random: ProtoField(5, ScalarType.UINT32, true),
|
||||
syncCookie: ProtoField(6, ScalarType.BYTES, true),
|
||||
via: ProtoField(8, ScalarType.UINT32, true),
|
||||
dataStatist: ProtoField(9, ScalarType.UINT32, true),
|
||||
ctrl: ProtoField(12, () => MessageControl, true),
|
||||
multiSendSeq: ProtoField(14, ScalarType.UINT32),
|
||||
};
|
||||
|
||||
export const MessageControl = {
|
||||
msgFlag: ProtoField(1, ScalarType.INT32),
|
||||
};
|
||||
|
||||
export const PushMsg = {
|
||||
message: ProtoField(1, () => PushMsgBody),
|
||||
status: ProtoField(3, ScalarType.INT32, true),
|
||||
pingFlag: ProtoField(5, ScalarType.INT32, true),
|
||||
generalFlag: ProtoField(9, ScalarType.INT32, true),
|
||||
};
|
||||
|
||||
export const GroupChangeInfo = {
|
||||
operator: ProtoField(1, () => GroupChangeOperator, true),
|
||||
};
|
||||
|
||||
export const GroupChangeOperator = {
|
||||
operatorUid: ProtoField(1, ScalarType.STRING, true),
|
||||
};
|
||||
|
||||
export const GroupChange = {
|
||||
groupUin: ProtoField(1, ScalarType.UINT32),
|
||||
flag: ProtoField(2, ScalarType.UINT32),
|
||||
memberUid: ProtoField(3, ScalarType.STRING, true),
|
||||
decreaseType: ProtoField(4, ScalarType.UINT32),
|
||||
operatorInfo: ProtoField(5, ScalarType.BYTES, true),
|
||||
increaseType: ProtoField(6, ScalarType.UINT32),
|
||||
field7: ProtoField(7, ScalarType.BYTES, true),
|
||||
};
|
||||
|
||||
// Group Reaction Related
|
||||
export const GroupReactionDataInnerDataTarget = {
|
||||
seq: ProtoField(1, ScalarType.UINT64, true),
|
||||
};
|
||||
|
||||
export const GroupReactionDataContent = {
|
||||
code: ProtoField(1, ScalarType.STRING, true),
|
||||
count: ProtoField(3, ScalarType.UINT32, true),
|
||||
operatorUid: ProtoField(4, ScalarType.STRING, true),
|
||||
type: ProtoField(5, ScalarType.UINT32, true),
|
||||
};
|
||||
|
||||
export const GroupReactionDataInnerData = {
|
||||
groupReactionTarget: ProtoField(2, () => GroupReactionDataInnerDataTarget, true),
|
||||
groupReactionDataContent: ProtoField(3, () => GroupReactionDataContent, true),
|
||||
};
|
||||
export const GroupReactionDataInner = {
|
||||
data: ProtoField(1, () => GroupReactionDataInnerData, true),
|
||||
};
|
||||
export const GroupReactionData = {
|
||||
data: ProtoField(1, () => GroupReactionDataInner, true),
|
||||
};
|
||||
|
||||
export const GroupReactNotify = {
|
||||
groupUin: ProtoField(4, ScalarType.UINT64, true),
|
||||
field13: ProtoField(13, ScalarType.UINT32, true),
|
||||
groupReactionData: ProtoField(44, () => GroupReactionData, true),
|
||||
};
|
||||
|
||||
// Group Invite Related
|
||||
export const GroupInvite = {
|
||||
groupUin: ProtoField(1, ScalarType.UINT32),
|
||||
field2: ProtoField(2, ScalarType.UINT32),
|
||||
field3: ProtoField(2, ScalarType.UINT32),
|
||||
field4: ProtoField(2, ScalarType.UINT32),
|
||||
invitorUid: ProtoField(5, ScalarType.STRING),
|
||||
};
|
||||
|
||||
export const PushMsgBody = {
|
||||
responseHead: ProtoField(1, () => ResponseHead),
|
||||
contentHead: ProtoField(2, () => ContentHead),
|
||||
body: ProtoField(3, () => MessageBody, true),
|
||||
};
|
||||
|
||||
export const ResponseHead = {
|
||||
fromUin: ProtoField(1, ScalarType.UINT32),
|
||||
fromUid: ProtoField(2, ScalarType.STRING, true),
|
||||
type: ProtoField(3, ScalarType.UINT32),
|
||||
sigMap: ProtoField(4, ScalarType.UINT32),
|
||||
toUin: ProtoField(5, ScalarType.UINT32),
|
||||
toUid: ProtoField(6, ScalarType.STRING, true),
|
||||
forward: ProtoField(7, () => ResponseForward, true),
|
||||
grp: ProtoField(8, () => ResponseGrp, true),
|
||||
};
|
||||
|
||||
export const RoutingHead = {
|
||||
c2c: ProtoField(1, () => C2C, true),
|
||||
grp: ProtoField(2, () => Grp, true),
|
||||
grpTmp: ProtoField(3, () => GrpTmp, true),
|
||||
wpaTmp: ProtoField(6, () => WPATmp, true),
|
||||
trans0X211: ProtoField(15, () => Trans0X211, true),
|
||||
};
|
||||
@@ -0,0 +1,21 @@
|
||||
import { ProtoField, ScalarType } from 'napcat-protobuf';
|
||||
|
||||
export const FriendRecall = {
|
||||
info: ProtoField(1, () => FriendRecallInfo),
|
||||
instId: ProtoField(2, ScalarType.UINT32),
|
||||
appId: ProtoField(3, ScalarType.UINT32),
|
||||
longMessageFlag: ProtoField(4, ScalarType.UINT32),
|
||||
reserved: ProtoField(5, ScalarType.BYTES),
|
||||
};
|
||||
|
||||
export const FriendRecallInfo = {
|
||||
fromUid: ProtoField(1, ScalarType.STRING),
|
||||
toUid: ProtoField(2, ScalarType.STRING),
|
||||
sequence: ProtoField(3, ScalarType.UINT32),
|
||||
newId: ProtoField(4, ScalarType.UINT64),
|
||||
time: ProtoField(5, ScalarType.UINT32),
|
||||
random: ProtoField(6, ScalarType.UINT32),
|
||||
pkgNum: ProtoField(7, ScalarType.UINT32),
|
||||
pkgIndex: ProtoField(8, ScalarType.UINT32),
|
||||
divSeq: ProtoField(9, ScalarType.UINT32),
|
||||
};
|
||||
@@ -0,0 +1,40 @@
|
||||
import { ProtoField, ScalarType } from 'napcat-protobuf';
|
||||
|
||||
export const ForwardHead = {
|
||||
field1: ProtoField(1, ScalarType.UINT32, true),
|
||||
field2: ProtoField(2, ScalarType.UINT32, true),
|
||||
field3: ProtoField(3, ScalarType.UINT32, true),
|
||||
unknownBase64: ProtoField(5, ScalarType.STRING, true),
|
||||
avatar: ProtoField(6, ScalarType.STRING, true),
|
||||
};
|
||||
|
||||
export const Grp = {
|
||||
groupCode: ProtoField(1, ScalarType.UINT32, true),
|
||||
};
|
||||
|
||||
export const GrpTmp = {
|
||||
groupUin: ProtoField(1, ScalarType.UINT32, true),
|
||||
toUin: ProtoField(2, ScalarType.UINT32, true),
|
||||
};
|
||||
|
||||
export const ResponseForward = {
|
||||
friendName: ProtoField(6, ScalarType.STRING, true),
|
||||
};
|
||||
|
||||
export const ResponseGrp = {
|
||||
groupUin: ProtoField(1, ScalarType.UINT32),
|
||||
memberName: ProtoField(4, ScalarType.STRING),
|
||||
unknown5: ProtoField(5, ScalarType.UINT32),
|
||||
groupName: ProtoField(7, ScalarType.STRING),
|
||||
};
|
||||
|
||||
export const Trans0X211 = {
|
||||
toUin: ProtoField(1, ScalarType.UINT64, true),
|
||||
ccCmd: ProtoField(2, ScalarType.UINT32, true),
|
||||
uid: ProtoField(8, ScalarType.STRING, true),
|
||||
};
|
||||
|
||||
export const WPATmp = {
|
||||
toUin: ProtoField(1, ScalarType.UINT64),
|
||||
sig: ProtoField(2, ScalarType.BYTES),
|
||||
};
|
||||
@@ -0,0 +1,6 @@
|
||||
import { ProtoField, ScalarType } from 'napcat-protobuf';
|
||||
|
||||
export const FileId = {
|
||||
appid: ProtoField(4, ScalarType.UINT32, true),
|
||||
ttl: ProtoField(10, ScalarType.UINT32, true),
|
||||
};
|
||||
@@ -0,0 +1,61 @@
|
||||
import { ProtoField, ScalarType } from 'napcat-protobuf';
|
||||
import { OidbSvcTrpcTcp0XE37_800_1200Metadata } from '@/napcat-core/packet/transformer/proto';
|
||||
|
||||
export const OidbSvcTrpcTcp0XE37_800 = {
|
||||
subCommand: ProtoField(1, ScalarType.UINT32),
|
||||
field2: ProtoField(2, ScalarType.INT32),
|
||||
body: ProtoField(10, () => OidbSvcTrpcTcp0XE37_800Body, true),
|
||||
field101: ProtoField(101, ScalarType.INT32),
|
||||
field102: ProtoField(102, ScalarType.INT32),
|
||||
field200: ProtoField(200, ScalarType.INT32),
|
||||
};
|
||||
|
||||
export const OidbSvcTrpcTcp0XE37_800Body = {
|
||||
senderUid: ProtoField(10, ScalarType.STRING, true),
|
||||
receiverUid: ProtoField(20, ScalarType.STRING, true),
|
||||
fileUuid: ProtoField(30, ScalarType.STRING, true),
|
||||
fileHash: ProtoField(40, ScalarType.STRING, true),
|
||||
};
|
||||
|
||||
export const OidbSvcTrpcTcp0XE37Response = {
|
||||
command: ProtoField(1, ScalarType.UINT32),
|
||||
seq: ProtoField(2, ScalarType.INT32),
|
||||
upload: ProtoField(19, () => ApplyUploadRespV3, true),
|
||||
businessId: ProtoField(101, ScalarType.INT32),
|
||||
clientType: ProtoField(102, ScalarType.INT32),
|
||||
flagSupportMediaPlatform: ProtoField(200, ScalarType.INT32),
|
||||
};
|
||||
|
||||
export const ApplyUploadRespV3 = {
|
||||
retCode: ProtoField(10, ScalarType.INT32),
|
||||
retMsg: ProtoField(20, ScalarType.STRING, true),
|
||||
totalSpace: ProtoField(30, ScalarType.INT64),
|
||||
usedSpace: ProtoField(40, ScalarType.INT64),
|
||||
uploadedSize: ProtoField(50, ScalarType.INT64),
|
||||
uploadIp: ProtoField(60, ScalarType.STRING, true),
|
||||
uploadDomain: ProtoField(70, ScalarType.STRING, true),
|
||||
uploadPort: ProtoField(80, ScalarType.UINT32),
|
||||
uuid: ProtoField(90, ScalarType.STRING, true),
|
||||
uploadKey: ProtoField(100, ScalarType.BYTES, true),
|
||||
boolFileExist: ProtoField(110, ScalarType.BOOL),
|
||||
packSize: ProtoField(120, ScalarType.INT32),
|
||||
uploadIpList: ProtoField(130, ScalarType.STRING, false, true), // repeated
|
||||
uploadHttpsPort: ProtoField(140, ScalarType.INT32),
|
||||
uploadHttpsDomain: ProtoField(150, ScalarType.STRING, true),
|
||||
uploadDns: ProtoField(160, ScalarType.STRING, true),
|
||||
uploadLanip: ProtoField(170, ScalarType.STRING, true),
|
||||
fileAddon: ProtoField(200, ScalarType.STRING, true),
|
||||
mediaPlatformUploadKey: ProtoField(220, ScalarType.BYTES, true),
|
||||
};
|
||||
|
||||
export const OidbSvcTrpcTcp0XE37_800Response = {
|
||||
command: ProtoField(1, ScalarType.UINT32, true),
|
||||
subCommand: ProtoField(2, ScalarType.UINT32, true),
|
||||
body: ProtoField(10, () => OidbSvcTrpcTcp0XE37_800ResponseBody, true),
|
||||
field50: ProtoField(50, ScalarType.UINT32, true),
|
||||
};
|
||||
|
||||
export const OidbSvcTrpcTcp0XE37_800ResponseBody = {
|
||||
field10: ProtoField(10, ScalarType.UINT32, true),
|
||||
field30: ProtoField(30, () => OidbSvcTrpcTcp0XE37_800_1200Metadata, true),
|
||||
};
|
||||
@@ -0,0 +1,22 @@
|
||||
import { ProtoField, ScalarType } from 'napcat-protobuf';
|
||||
|
||||
export const OidbSvcTrpcTcp0XFE1_2 = {
|
||||
uin: ProtoField(1, ScalarType.UINT32),
|
||||
key: ProtoField(3, () => OidbSvcTrpcTcp0XFE1_2Key, false, true),
|
||||
};
|
||||
|
||||
export const OidbSvcTrpcTcp0XFE1_2Key = {
|
||||
key: ProtoField(1, ScalarType.UINT32),
|
||||
};
|
||||
export const OidbSvcTrpcTcp0XFE1_2RSP_Status = {
|
||||
key: ProtoField(1, ScalarType.UINT32),
|
||||
value: ProtoField(2, ScalarType.UINT64),
|
||||
};
|
||||
|
||||
export const OidbSvcTrpcTcp0XFE1_2RSP_Data = {
|
||||
status: ProtoField(2, () => OidbSvcTrpcTcp0XFE1_2RSP_Status),
|
||||
};
|
||||
|
||||
export const OidbSvcTrpcTcp0XFE1_2RSP = {
|
||||
data: ProtoField(1, () => OidbSvcTrpcTcp0XFE1_2RSP_Data),
|
||||
};
|
||||
@@ -0,0 +1,99 @@
|
||||
import { ProtoField, ScalarType } from 'napcat-protobuf';
|
||||
|
||||
export const OidbSvcTrpcTcp0x6D6 = {
|
||||
file: ProtoField(1, () => OidbSvcTrpcTcp0x6D6Upload, true),
|
||||
download: ProtoField(3, () => OidbSvcTrpcTcp0x6D6Download, true),
|
||||
delete: ProtoField(4, () => OidbSvcTrpcTcp0x6D6Delete, true),
|
||||
rename: ProtoField(5, () => OidbSvcTrpcTcp0x6D6Rename, true),
|
||||
move: ProtoField(6, () => OidbSvcTrpcTcp0x6D6Move, true),
|
||||
};
|
||||
|
||||
export const OidbSvcTrpcTcp0x6D6Upload = {
|
||||
groupUin: ProtoField(1, ScalarType.UINT32),
|
||||
appId: ProtoField(2, ScalarType.UINT32),
|
||||
busId: ProtoField(3, ScalarType.UINT32),
|
||||
entrance: ProtoField(4, ScalarType.UINT32),
|
||||
targetDirectory: ProtoField(5, ScalarType.STRING),
|
||||
fileName: ProtoField(6, ScalarType.STRING),
|
||||
localDirectory: ProtoField(7, ScalarType.STRING),
|
||||
fileSize: ProtoField(8, ScalarType.UINT64),
|
||||
fileSha1: ProtoField(9, ScalarType.BYTES),
|
||||
fileSha3: ProtoField(10, ScalarType.BYTES),
|
||||
fileMd5: ProtoField(11, ScalarType.BYTES),
|
||||
field15: ProtoField(15, ScalarType.BOOL),
|
||||
};
|
||||
|
||||
export const OidbSvcTrpcTcp0x6D6Download = {
|
||||
groupUin: ProtoField(1, ScalarType.UINT32),
|
||||
appId: ProtoField(2, ScalarType.UINT32),
|
||||
busId: ProtoField(3, ScalarType.UINT32),
|
||||
fileId: ProtoField(4, ScalarType.STRING),
|
||||
};
|
||||
|
||||
export const OidbSvcTrpcTcp0x6D6Delete = {
|
||||
groupUin: ProtoField(1, ScalarType.UINT32),
|
||||
busId: ProtoField(3, ScalarType.UINT32),
|
||||
fileId: ProtoField(5, ScalarType.STRING),
|
||||
};
|
||||
|
||||
export const OidbSvcTrpcTcp0x6D6Rename = {
|
||||
groupUin: ProtoField(1, ScalarType.UINT32),
|
||||
busId: ProtoField(3, ScalarType.UINT32),
|
||||
fileId: ProtoField(4, ScalarType.STRING),
|
||||
parentFolder: ProtoField(5, ScalarType.STRING),
|
||||
newFileName: ProtoField(6, ScalarType.STRING),
|
||||
};
|
||||
|
||||
export const OidbSvcTrpcTcp0x6D6Move = {
|
||||
groupUin: ProtoField(1, ScalarType.UINT32),
|
||||
appId: ProtoField(2, ScalarType.UINT32),
|
||||
busId: ProtoField(3, ScalarType.UINT32),
|
||||
fileId: ProtoField(4, ScalarType.STRING),
|
||||
parentDirectory: ProtoField(5, ScalarType.STRING),
|
||||
targetDirectory: ProtoField(6, ScalarType.STRING),
|
||||
};
|
||||
|
||||
export const OidbSvcTrpcTcp0x6D6Response = {
|
||||
upload: ProtoField(1, () => OidbSvcTrpcTcp0x6D6_0Response),
|
||||
download: ProtoField(3, () => OidbSvcTrpcTcp0x6D6_2Response),
|
||||
delete: ProtoField(4, () => OidbSvcTrpcTcp0x6D6_3_4_5Response),
|
||||
rename: ProtoField(5, () => OidbSvcTrpcTcp0x6D6_3_4_5Response),
|
||||
move: ProtoField(6, () => OidbSvcTrpcTcp0x6D6_3_4_5Response),
|
||||
};
|
||||
|
||||
export const OidbSvcTrpcTcp0x6D6_0Response = {
|
||||
retCode: ProtoField(1, ScalarType.INT32),
|
||||
retMsg: ProtoField(2, ScalarType.STRING),
|
||||
clientWording: ProtoField(3, ScalarType.STRING),
|
||||
uploadIp: ProtoField(4, ScalarType.STRING),
|
||||
serverDns: ProtoField(5, ScalarType.STRING),
|
||||
busId: ProtoField(6, ScalarType.INT32),
|
||||
fileId: ProtoField(7, ScalarType.STRING),
|
||||
checkKey: ProtoField(8, ScalarType.BYTES),
|
||||
fileKey: ProtoField(9, ScalarType.BYTES),
|
||||
boolFileExist: ProtoField(10, ScalarType.BOOL),
|
||||
uploadIpLanV4: ProtoField(12, ScalarType.STRING, false, true),
|
||||
uploadIpLanV6: ProtoField(13, ScalarType.STRING, false, true),
|
||||
uploadPort: ProtoField(14, ScalarType.UINT32),
|
||||
};
|
||||
|
||||
export const OidbSvcTrpcTcp0x6D6_2Response = {
|
||||
retCode: ProtoField(1, ScalarType.INT32),
|
||||
retMsg: ProtoField(2, ScalarType.STRING),
|
||||
clientWording: ProtoField(3, ScalarType.STRING),
|
||||
downloadIp: ProtoField(4, ScalarType.STRING),
|
||||
downloadDns: ProtoField(5, ScalarType.STRING),
|
||||
downloadUrl: ProtoField(6, ScalarType.BYTES),
|
||||
fileSha1: ProtoField(7, ScalarType.BYTES),
|
||||
fileSha3: ProtoField(8, ScalarType.BYTES),
|
||||
fileMd5: ProtoField(9, ScalarType.BYTES),
|
||||
cookieVal: ProtoField(10, ScalarType.BYTES),
|
||||
saveFileName: ProtoField(11, ScalarType.STRING),
|
||||
previewPort: ProtoField(12, ScalarType.UINT32),
|
||||
};
|
||||
|
||||
export const OidbSvcTrpcTcp0x6D6_3_4_5Response = {
|
||||
retCode: ProtoField(1, ScalarType.INT32),
|
||||
retMsg: ProtoField(2, ScalarType.STRING),
|
||||
clientWording: ProtoField(3, ScalarType.STRING),
|
||||
};
|
||||
@@ -0,0 +1,14 @@
|
||||
import { ProtoField, ScalarType } from 'napcat-protobuf';
|
||||
|
||||
// 设置群头衔 OidbSvcTrpcTcp.0x8fc_2
|
||||
export const OidbSvcTrpcTcp0X8FC_2_Body = {
|
||||
targetUid: ProtoField(1, ScalarType.STRING),
|
||||
specialTitle: ProtoField(5, ScalarType.STRING, true),
|
||||
expiredTime: ProtoField(6, ScalarType.INT32),
|
||||
uinName: ProtoField(7, ScalarType.STRING, true),
|
||||
targetName: ProtoField(8, ScalarType.STRING),
|
||||
};
|
||||
export const OidbSvcTrpcTcp0X8FC_2 = {
|
||||
groupUin: ProtoField(1, ScalarType.UINT32),
|
||||
body: ProtoField(3, () => OidbSvcTrpcTcp0X8FC_2_Body),
|
||||
};
|
||||
@@ -0,0 +1,26 @@
|
||||
import { ProtoField, ScalarType } from 'napcat-protobuf';
|
||||
import { MultiMediaReqHead } from './common/Ntv2.RichMediaReq';
|
||||
|
||||
// Req
|
||||
export const OidbSvcTrpcTcp0X9067_202 = {
|
||||
ReqHead: ProtoField(1, () => MultiMediaReqHead),
|
||||
DownloadRKeyReq: ProtoField(4, () => OidbSvcTrpcTcp0X9067_202Key),
|
||||
};
|
||||
export const OidbSvcTrpcTcp0X9067_202Key = {
|
||||
key: ProtoField(1, ScalarType.INT32, false, true),
|
||||
};
|
||||
|
||||
// Rsp
|
||||
export const OidbSvcTrpcTcp0X9067_202_RkeyList = {
|
||||
rkey: ProtoField(1, ScalarType.STRING),
|
||||
ttl: ProtoField(2, ScalarType.UINT64),
|
||||
time: ProtoField(4, ScalarType.UINT32),
|
||||
type: ProtoField(5, ScalarType.UINT32),
|
||||
|
||||
};
|
||||
export const OidbSvcTrpcTcp0X9067_202_Data = {
|
||||
rkeyList: ProtoField(1, () => OidbSvcTrpcTcp0X9067_202_RkeyList, false, true),
|
||||
};
|
||||
export const OidbSvcTrpcTcp0X9067_202_Rsp_Body = {
|
||||
data: ProtoField(4, () => OidbSvcTrpcTcp0X9067_202_Data),
|
||||
};
|
||||
@@ -0,0 +1,41 @@
|
||||
import { ProtoField, ScalarType } from 'napcat-protobuf';
|
||||
import { MsgInfo } from '@/napcat-core/packet/transformer/proto';
|
||||
|
||||
export const OidbSvcTrpcTcp0X929D_0 = {
|
||||
groupUin: ProtoField(1, ScalarType.UINT32),
|
||||
chatType: ProtoField(2, ScalarType.UINT32),
|
||||
};
|
||||
|
||||
export const OidbSvcTrpcTcp0X929D_0Resp = {
|
||||
content: ProtoField(1, () => OidbSvcTrpcTcp0X929D_0RespContent, false, true),
|
||||
};
|
||||
|
||||
export const OidbSvcTrpcTcp0X929D_0RespContent = {
|
||||
category: ProtoField(1, ScalarType.STRING),
|
||||
voices: ProtoField(2, () => OidbSvcTrpcTcp0X929D_0RespContentVoice, false, true),
|
||||
};
|
||||
|
||||
export const OidbSvcTrpcTcp0X929D_0RespContentVoice = {
|
||||
voiceId: ProtoField(1, ScalarType.STRING),
|
||||
voiceDisplayName: ProtoField(2, ScalarType.STRING),
|
||||
voiceExampleUrl: ProtoField(3, ScalarType.STRING),
|
||||
};
|
||||
|
||||
export const OidbSvcTrpcTcp0X929B_0 = {
|
||||
groupUin: ProtoField(1, ScalarType.UINT32),
|
||||
voiceId: ProtoField(2, ScalarType.STRING),
|
||||
text: ProtoField(3, ScalarType.STRING),
|
||||
chatType: ProtoField(4, ScalarType.UINT32),
|
||||
session: ProtoField(5, () => OidbSvcTrpcTcp0X929B_0_Session),
|
||||
};
|
||||
|
||||
export const OidbSvcTrpcTcp0X929B_0_Session = {
|
||||
sessionId: ProtoField(1, ScalarType.UINT32),
|
||||
};
|
||||
|
||||
export const OidbSvcTrpcTcp0X929B_0Resp = {
|
||||
statusCode: ProtoField(1, ScalarType.UINT32),
|
||||
field2: ProtoField(2, ScalarType.UINT32, true),
|
||||
field3: ProtoField(3, ScalarType.UINT32),
|
||||
msgInfo: ProtoField(4, () => MsgInfo, true),
|
||||
};
|
||||
@@ -0,0 +1,11 @@
|
||||
import { ProtoField, ScalarType } from 'napcat-protobuf';
|
||||
|
||||
// OidbSvcTrpcTcp.0xcde_2 响应体
|
||||
// body.field2.field1 为目标字符串值
|
||||
export const OidbSvcTrpcTcp0XCDE_2RespBodyInner = {
|
||||
value: ProtoField(1, ScalarType.STRING),
|
||||
};
|
||||
|
||||
export const OidbSvcTrpcTcp0XCDE_2RespBody = {
|
||||
inner: ProtoField(2, () => OidbSvcTrpcTcp0XCDE_2RespBodyInner),
|
||||
};
|
||||
@@ -0,0 +1,59 @@
|
||||
import { ProtoField, ScalarType } from 'napcat-protobuf';
|
||||
|
||||
export const OidbSvcTrpcTcp0xE07_0 = {
|
||||
version: ProtoField(1, ScalarType.UINT32),
|
||||
client: ProtoField(2, ScalarType.UINT32),
|
||||
entrance: ProtoField(3, ScalarType.UINT32),
|
||||
ocrReqBody: ProtoField(10, () => OcrReqBody, true),
|
||||
};
|
||||
|
||||
export const OcrReqBody = {
|
||||
imageUrl: ProtoField(1, ScalarType.STRING),
|
||||
languageType: ProtoField(2, ScalarType.UINT32),
|
||||
scene: ProtoField(3, ScalarType.UINT32),
|
||||
originMd5: ProtoField(10, ScalarType.STRING),
|
||||
afterCompressMd5: ProtoField(11, ScalarType.STRING),
|
||||
afterCompressFileSize: ProtoField(12, ScalarType.STRING),
|
||||
afterCompressWeight: ProtoField(13, ScalarType.STRING),
|
||||
afterCompressHeight: ProtoField(14, ScalarType.STRING),
|
||||
isCut: ProtoField(15, ScalarType.BOOL),
|
||||
};
|
||||
|
||||
export const OidbSvcTrpcTcp0xE07_0_Response = {
|
||||
retCode: ProtoField(1, ScalarType.INT32),
|
||||
errMsg: ProtoField(2, ScalarType.STRING),
|
||||
wording: ProtoField(3, ScalarType.STRING),
|
||||
ocrRspBody: ProtoField(10, () => OcrRspBody),
|
||||
};
|
||||
|
||||
export const OcrRspBody = {
|
||||
textDetections: ProtoField(1, () => TextDetection, false, true),
|
||||
language: ProtoField(2, ScalarType.STRING),
|
||||
requestId: ProtoField(3, ScalarType.STRING),
|
||||
ocrLanguageList: ProtoField(101, ScalarType.STRING, false, true),
|
||||
dstTranslateLanguageList: ProtoField(102, ScalarType.STRING, false, true),
|
||||
languageList: ProtoField(103, () => Language, false, true),
|
||||
afterCompressWeight: ProtoField(111, ScalarType.UINT32),
|
||||
afterCompressHeight: ProtoField(112, ScalarType.UINT32),
|
||||
};
|
||||
|
||||
export const TextDetection = {
|
||||
detectedText: ProtoField(1, ScalarType.STRING),
|
||||
confidence: ProtoField(2, ScalarType.UINT32),
|
||||
polygon: ProtoField(3, () => Polygon),
|
||||
advancedInfo: ProtoField(4, ScalarType.STRING),
|
||||
};
|
||||
|
||||
export const Polygon = {
|
||||
coordinates: ProtoField(1, () => Coordinate, false, true),
|
||||
};
|
||||
|
||||
export const Coordinate = {
|
||||
x: ProtoField(1, ScalarType.INT32),
|
||||
y: ProtoField(2, ScalarType.INT32),
|
||||
};
|
||||
|
||||
export const Language = {
|
||||
languageCode: ProtoField(1, ScalarType.STRING),
|
||||
languageDesc: ProtoField(2, ScalarType.STRING),
|
||||
};
|
||||
@@ -0,0 +1,60 @@
|
||||
import { ProtoField, ScalarType } from 'napcat-protobuf';
|
||||
|
||||
export const OidbSvcTrpcTcp0XE37_1200 = {
|
||||
subCommand: ProtoField(1, ScalarType.UINT32, true),
|
||||
field2: ProtoField(2, ScalarType.INT32, true),
|
||||
body: ProtoField(14, () => OidbSvcTrpcTcp0XE37_1200Body, true),
|
||||
field101: ProtoField(101, ScalarType.INT32, true),
|
||||
field102: ProtoField(102, ScalarType.INT32, true),
|
||||
field200: ProtoField(200, ScalarType.INT32, true),
|
||||
field99999: ProtoField(99999, ScalarType.BYTES, true),
|
||||
};
|
||||
|
||||
export const OidbSvcTrpcTcp0XE37_1200Body = {
|
||||
receiverUid: ProtoField(10, ScalarType.STRING, true),
|
||||
fileUuid: ProtoField(20, ScalarType.STRING, true),
|
||||
type: ProtoField(30, ScalarType.INT32, true),
|
||||
fileHash: ProtoField(60, ScalarType.STRING, true),
|
||||
t2: ProtoField(601, ScalarType.INT32, true),
|
||||
};
|
||||
|
||||
export const OidbSvcTrpcTcp0XE37_1200Response = {
|
||||
command: ProtoField(1, ScalarType.UINT32, true),
|
||||
subCommand: ProtoField(2, ScalarType.UINT32, true),
|
||||
body: ProtoField(14, () => OidbSvcTrpcTcp0XE37_1200ResponseBody, true),
|
||||
field50: ProtoField(50, ScalarType.UINT32, true),
|
||||
};
|
||||
|
||||
export const OidbSvcTrpcTcp0XE37_1200ResponseBody = {
|
||||
field10: ProtoField(10, ScalarType.UINT32, true),
|
||||
state: ProtoField(20, ScalarType.STRING, true),
|
||||
result: ProtoField(30, () => OidbSvcTrpcTcp0XE37_1200Result, true),
|
||||
metadata: ProtoField(40, () => OidbSvcTrpcTcp0XE37_800_1200Metadata, true),
|
||||
};
|
||||
|
||||
export const OidbSvcTrpcTcp0XE37_1200Result = {
|
||||
server: ProtoField(20, ScalarType.STRING, true),
|
||||
port: ProtoField(40, ScalarType.UINT32, true),
|
||||
url: ProtoField(50, ScalarType.STRING, true),
|
||||
additionalServer: ProtoField(60, ScalarType.STRING, false, true),
|
||||
ssoPort: ProtoField(80, ScalarType.UINT32, true),
|
||||
ssoUrl: ProtoField(90, ScalarType.STRING, true),
|
||||
extra: ProtoField(120, ScalarType.BYTES, true),
|
||||
};
|
||||
|
||||
export const OidbSvcTrpcTcp0XE37_800_1200Metadata = {
|
||||
uin: ProtoField(1, ScalarType.UINT32, true),
|
||||
field2: ProtoField(2, ScalarType.UINT32, true),
|
||||
field3: ProtoField(3, ScalarType.UINT32, true),
|
||||
size: ProtoField(4, ScalarType.UINT32, true),
|
||||
timestamp: ProtoField(5, ScalarType.UINT32, true),
|
||||
fileUuid: ProtoField(6, ScalarType.STRING, true),
|
||||
fileName: ProtoField(7, ScalarType.STRING, true),
|
||||
field100: ProtoField(100, ScalarType.BYTES, true),
|
||||
field101: ProtoField(101, ScalarType.BYTES, true),
|
||||
field110: ProtoField(110, ScalarType.UINT32, true),
|
||||
timestamp1: ProtoField(130, ScalarType.UINT32, true),
|
||||
fileHash: ProtoField(140, ScalarType.STRING, true),
|
||||
field141: ProtoField(141, ScalarType.BYTES, true),
|
||||
field142: ProtoField(142, ScalarType.BYTES, true),
|
||||
};
|
||||
@@ -0,0 +1,22 @@
|
||||
import { ProtoField, ScalarType } from 'napcat-protobuf';
|
||||
|
||||
export const OidbSvcTrpcTcp0XE37_1700 = {
|
||||
command: ProtoField(1, ScalarType.UINT32, true),
|
||||
seq: ProtoField(2, ScalarType.INT32, true),
|
||||
upload: ProtoField(19, () => ApplyUploadReqV3, true),
|
||||
businessId: ProtoField(101, ScalarType.INT32, true),
|
||||
clientType: ProtoField(102, ScalarType.INT32, true),
|
||||
flagSupportMediaPlatform: ProtoField(200, ScalarType.INT32, true),
|
||||
};
|
||||
|
||||
export const ApplyUploadReqV3 = {
|
||||
senderUid: ProtoField(10, ScalarType.STRING, true),
|
||||
receiverUid: ProtoField(20, ScalarType.STRING, true),
|
||||
fileSize: ProtoField(30, ScalarType.UINT32, true),
|
||||
fileName: ProtoField(40, ScalarType.STRING, true),
|
||||
md510MCheckSum: ProtoField(50, ScalarType.BYTES, true),
|
||||
sha1CheckSum: ProtoField(60, ScalarType.BYTES, true),
|
||||
localPath: ProtoField(70, ScalarType.STRING, true),
|
||||
md5CheckSum: ProtoField(110, ScalarType.BYTES, true),
|
||||
sha3CheckSum: ProtoField(120, ScalarType.BYTES, true),
|
||||
};
|
||||
@@ -0,0 +1,11 @@
|
||||
import { ProtoField, ScalarType } from 'napcat-protobuf';
|
||||
|
||||
export const OidbSvcTrpcTcp0XEB7_Body = {
|
||||
uin: ProtoField(1, ScalarType.STRING),
|
||||
groupUin: ProtoField(2, ScalarType.STRING),
|
||||
version: ProtoField(3, ScalarType.STRING),
|
||||
};
|
||||
|
||||
export const OidbSvcTrpcTcp0XEB7 = {
|
||||
body: ProtoField(2, () => OidbSvcTrpcTcp0XEB7_Body),
|
||||
};
|
||||
@@ -0,0 +1,9 @@
|
||||
import { ProtoField, ScalarType } from 'napcat-protobuf';
|
||||
|
||||
// Send Poke
|
||||
export const OidbSvcTrpcTcp0XED3_1 = {
|
||||
uin: ProtoField(1, ScalarType.UINT32),
|
||||
groupUin: ProtoField(2, ScalarType.UINT32),
|
||||
friendUin: ProtoField(5, ScalarType.UINT32),
|
||||
ext: ProtoField(6, ScalarType.UINT32, true),
|
||||
};
|
||||
@@ -0,0 +1,6 @@
|
||||
import { ProtoField, ScalarType } from 'napcat-protobuf';
|
||||
|
||||
export const OidbSvcTrpcTcp0XF90 = {
|
||||
groupUin: ProtoField(1, ScalarType.UINT32),
|
||||
msgSeq: ProtoField(2, ScalarType.UINT64),
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
import { ProtoField, ScalarType } from 'napcat-protobuf';
|
||||
|
||||
export const OidbSvcTrpcTcpBase = {
|
||||
command: ProtoField(1, ScalarType.UINT32),
|
||||
subCommand: ProtoField(2, ScalarType.UINT32),
|
||||
errorCode: ProtoField(3, ScalarType.UINT32),
|
||||
body: ProtoField(4, ScalarType.BYTES),
|
||||
errorMsg: ProtoField(5, ScalarType.STRING, true),
|
||||
isReserved: ProtoField(12, ScalarType.UINT32),
|
||||
};
|
||||
export const OidbSvcTrpcTcpBaseRsp = {
|
||||
body: ProtoField(4, ScalarType.BYTES),
|
||||
};
|
||||
@@ -0,0 +1,237 @@
|
||||
import { ProtoField, ScalarType } from 'napcat-protobuf';
|
||||
|
||||
export const NTV2RichMediaReq = {
|
||||
ReqHead: ProtoField(1, () => MultiMediaReqHead),
|
||||
Upload: ProtoField(2, () => UploadReq),
|
||||
Download: ProtoField(3, () => DownloadReq),
|
||||
DownloadRKey: ProtoField(4, () => DownloadRKeyReq),
|
||||
Delete: ProtoField(5, () => DeleteReq),
|
||||
UploadCompleted: ProtoField(6, () => UploadCompletedReq),
|
||||
MsgInfoAuth: ProtoField(7, () => MsgInfoAuthReq),
|
||||
UploadKeyRenewal: ProtoField(8, () => UploadKeyRenewalReq),
|
||||
DownloadSafe: ProtoField(9, () => DownloadSafeReq),
|
||||
Extension: ProtoField(99, ScalarType.BYTES, true),
|
||||
};
|
||||
|
||||
export const MultiMediaReqHead = {
|
||||
Common: ProtoField(1, () => CommonHead),
|
||||
Scene: ProtoField(2, () => SceneInfo),
|
||||
Client: ProtoField(3, () => ClientMeta),
|
||||
};
|
||||
|
||||
export const CommonHead = {
|
||||
RequestId: ProtoField(1, ScalarType.UINT32),
|
||||
Command: ProtoField(2, ScalarType.UINT32),
|
||||
};
|
||||
|
||||
export const SceneInfo = {
|
||||
RequestType: ProtoField(101, ScalarType.UINT32),
|
||||
BusinessType: ProtoField(102, ScalarType.UINT32),
|
||||
SceneType: ProtoField(200, ScalarType.UINT32),
|
||||
C2C: ProtoField(201, () => C2CUserInfo, true),
|
||||
Group: ProtoField(202, () => NTGroupInfo, true),
|
||||
};
|
||||
|
||||
export const C2CUserInfo = {
|
||||
AccountType: ProtoField(1, ScalarType.UINT32),
|
||||
TargetUid: ProtoField(2, ScalarType.STRING),
|
||||
};
|
||||
|
||||
export const NTGroupInfo = {
|
||||
GroupUin: ProtoField(1, ScalarType.UINT32),
|
||||
};
|
||||
|
||||
export const ClientMeta = {
|
||||
AgentType: ProtoField(1, ScalarType.UINT32),
|
||||
};
|
||||
|
||||
export const DownloadReq = {
|
||||
Node: ProtoField(1, () => IndexNode),
|
||||
Download: ProtoField(2, () => DownloadExt),
|
||||
};
|
||||
|
||||
export const IndexNode = {
|
||||
Info: ProtoField(1, () => FileInfo),
|
||||
FileUuid: ProtoField(2, ScalarType.STRING),
|
||||
StoreId: ProtoField(3, ScalarType.UINT32),
|
||||
UploadTime: ProtoField(4, ScalarType.UINT32),
|
||||
Ttl: ProtoField(5, ScalarType.UINT32),
|
||||
SubType: ProtoField(6, ScalarType.UINT32),
|
||||
};
|
||||
|
||||
export const FileInfo = {
|
||||
FileSize: ProtoField(1, ScalarType.UINT32),
|
||||
FileHash: ProtoField(2, ScalarType.STRING),
|
||||
FileSha1: ProtoField(3, ScalarType.STRING),
|
||||
FileName: ProtoField(4, ScalarType.STRING),
|
||||
Type: ProtoField(5, () => FileType),
|
||||
Width: ProtoField(6, ScalarType.UINT32),
|
||||
Height: ProtoField(7, ScalarType.UINT32),
|
||||
Time: ProtoField(8, ScalarType.UINT32),
|
||||
Original: ProtoField(9, ScalarType.UINT32),
|
||||
};
|
||||
|
||||
export const FileType = {
|
||||
Type: ProtoField(1, ScalarType.UINT32),
|
||||
PicFormat: ProtoField(2, ScalarType.UINT32),
|
||||
VideoFormat: ProtoField(3, ScalarType.UINT32),
|
||||
VoiceFormat: ProtoField(4, ScalarType.UINT32),
|
||||
};
|
||||
|
||||
export const DownloadExt = {
|
||||
Pic: ProtoField(1, () => PicDownloadExt),
|
||||
Video: ProtoField(2, () => VideoDownloadExt),
|
||||
Ptt: ProtoField(3, () => PttDownloadExt),
|
||||
};
|
||||
|
||||
export const VideoDownloadExt = {
|
||||
BusiType: ProtoField(1, ScalarType.UINT32),
|
||||
SceneType: ProtoField(2, ScalarType.UINT32),
|
||||
SubBusiType: ProtoField(3, ScalarType.UINT32),
|
||||
};
|
||||
|
||||
export const PicDownloadExt = {};
|
||||
|
||||
export const PttDownloadExt = {};
|
||||
|
||||
export const DownloadRKeyReq = {
|
||||
Types: ProtoField(1, ScalarType.INT32, false, true),
|
||||
};
|
||||
|
||||
export const DeleteReq = {
|
||||
Index: ProtoField(1, () => IndexNode, false, true),
|
||||
NeedRecallMsg: ProtoField(2, ScalarType.BOOL),
|
||||
MsgSeq: ProtoField(3, ScalarType.UINT64),
|
||||
MsgRandom: ProtoField(4, ScalarType.UINT64),
|
||||
MsgTime: ProtoField(5, ScalarType.UINT64),
|
||||
};
|
||||
|
||||
export const UploadCompletedReq = {
|
||||
SrvSendMsg: ProtoField(1, ScalarType.BOOL),
|
||||
ClientRandomId: ProtoField(2, ScalarType.UINT64),
|
||||
MsgInfo: ProtoField(3, () => MsgInfo),
|
||||
ClientSeq: ProtoField(4, ScalarType.UINT32),
|
||||
};
|
||||
|
||||
export const MsgInfoAuthReq = {
|
||||
Msg: ProtoField(1, ScalarType.BYTES),
|
||||
AuthTime: ProtoField(2, ScalarType.UINT64),
|
||||
};
|
||||
|
||||
export const DownloadSafeReq = {
|
||||
Index: ProtoField(1, () => IndexNode),
|
||||
};
|
||||
|
||||
export const UploadKeyRenewalReq = {
|
||||
OldUKey: ProtoField(1, ScalarType.STRING),
|
||||
SubType: ProtoField(2, ScalarType.UINT32),
|
||||
};
|
||||
|
||||
export const MsgInfo = {
|
||||
MsgInfoBody: ProtoField(1, () => MsgInfoBody, false, true),
|
||||
ExtBizInfo: ProtoField(2, () => ExtBizInfo),
|
||||
};
|
||||
|
||||
export const MsgInfoBody = {
|
||||
Index: ProtoField(1, () => IndexNode),
|
||||
Picture: ProtoField(2, () => PictureInfo),
|
||||
Video: ProtoField(3, () => VideoInfo),
|
||||
Audio: ProtoField(4, () => AudioInfo),
|
||||
FileExist: ProtoField(5, ScalarType.BOOL),
|
||||
HashSum: ProtoField(6, ScalarType.BYTES),
|
||||
};
|
||||
|
||||
export const VideoInfo = {};
|
||||
|
||||
export const AudioInfo = {};
|
||||
|
||||
export const PictureInfo = {
|
||||
UrlPath: ProtoField(1, ScalarType.STRING),
|
||||
Ext: ProtoField(2, () => PicUrlExtInfo),
|
||||
Domain: ProtoField(3, ScalarType.STRING),
|
||||
};
|
||||
|
||||
export const PicUrlExtInfo = {
|
||||
OriginalParameter: ProtoField(1, ScalarType.STRING),
|
||||
BigParameter: ProtoField(2, ScalarType.STRING),
|
||||
ThumbParameter: ProtoField(3, ScalarType.STRING),
|
||||
};
|
||||
|
||||
export const VideoExtInfo = {
|
||||
VideoCodecFormat: ProtoField(1, ScalarType.UINT32),
|
||||
};
|
||||
|
||||
export const ExtBizInfo = {
|
||||
Pic: ProtoField(1, () => PicExtBizInfo),
|
||||
Video: ProtoField(2, () => VideoExtBizInfo),
|
||||
Ptt: ProtoField(3, () => PttExtBizInfo),
|
||||
BusiType: ProtoField(10, ScalarType.UINT32),
|
||||
};
|
||||
|
||||
export const PttExtBizInfo = {
|
||||
SrcUin: ProtoField(1, ScalarType.UINT64),
|
||||
PttScene: ProtoField(2, ScalarType.UINT32),
|
||||
PttType: ProtoField(3, ScalarType.UINT32),
|
||||
ChangeVoice: ProtoField(4, ScalarType.UINT32),
|
||||
Waveform: ProtoField(5, ScalarType.BYTES),
|
||||
AutoConvertText: ProtoField(6, ScalarType.UINT32),
|
||||
BytesReserve: ProtoField(11, ScalarType.BYTES),
|
||||
BytesPbReserve: ProtoField(12, ScalarType.BYTES),
|
||||
BytesGeneralFlags: ProtoField(13, ScalarType.BYTES),
|
||||
};
|
||||
|
||||
export const VideoExtBizInfo = {
|
||||
FromScene: ProtoField(1, ScalarType.UINT32),
|
||||
ToScene: ProtoField(2, ScalarType.UINT32),
|
||||
BytesPbReserve: ProtoField(3, ScalarType.BYTES),
|
||||
};
|
||||
|
||||
export const PicExtBizInfo = {
|
||||
BizType: ProtoField(1, ScalarType.UINT32),
|
||||
TextSummary: ProtoField(2, ScalarType.STRING),
|
||||
BytesPbReserveC2c: ProtoField(11, () => BytesPbReserveC2c),
|
||||
BytesPbReserveTroop: ProtoField(12, () => BytesPbReserveTroop),
|
||||
FromScene: ProtoField(1001, ScalarType.UINT32),
|
||||
ToScene: ProtoField(1002, ScalarType.UINT32),
|
||||
OldFileId: ProtoField(1003, ScalarType.UINT32),
|
||||
};
|
||||
|
||||
export const UploadReq = {
|
||||
UploadInfo: ProtoField(1, () => UploadInfo, false, true),
|
||||
TryFastUploadCompleted: ProtoField(2, ScalarType.BOOL),
|
||||
SrvSendMsg: ProtoField(3, ScalarType.BOOL),
|
||||
ClientRandomId: ProtoField(4, ScalarType.UINT64),
|
||||
CompatQMsgSceneType: ProtoField(5, ScalarType.UINT32),
|
||||
ExtBizInfo: ProtoField(6, () => ExtBizInfo),
|
||||
ClientSeq: ProtoField(7, ScalarType.UINT32),
|
||||
NoNeedCompatMsg: ProtoField(8, ScalarType.BOOL),
|
||||
};
|
||||
|
||||
export const UploadInfo = {
|
||||
FileInfo: ProtoField(1, () => FileInfo),
|
||||
SubFileType: ProtoField(2, ScalarType.UINT32),
|
||||
};
|
||||
|
||||
export const BytesPbReserveC2c = {
|
||||
subType: ProtoField(1, ScalarType.UINT32),
|
||||
field3: ProtoField(3, ScalarType.UINT32),
|
||||
field4: ProtoField(4, ScalarType.UINT32),
|
||||
field8: ProtoField(8, ScalarType.STRING),
|
||||
field10: ProtoField(10, ScalarType.UINT32),
|
||||
field12: ProtoField(12, ScalarType.STRING),
|
||||
field18: ProtoField(18, ScalarType.STRING),
|
||||
field19: ProtoField(19, ScalarType.STRING),
|
||||
field20: ProtoField(20, ScalarType.BYTES),
|
||||
};
|
||||
|
||||
export const BytesPbReserveTroop = {
|
||||
subType: ProtoField(1, ScalarType.UINT32),
|
||||
field3: ProtoField(3, ScalarType.UINT32),
|
||||
field4: ProtoField(4, ScalarType.UINT32),
|
||||
field9: ProtoField(9, ScalarType.STRING),
|
||||
field10: ProtoField(10, ScalarType.UINT32),
|
||||
field12: ProtoField(12, ScalarType.STRING),
|
||||
field18: ProtoField(18, ScalarType.STRING),
|
||||
field19: ProtoField(19, ScalarType.STRING),
|
||||
field21: ProtoField(21, ScalarType.BYTES),
|
||||
};
|
||||
@@ -0,0 +1,113 @@
|
||||
import { ProtoField, ScalarType } from 'napcat-protobuf';
|
||||
import { CommonHead, MsgInfo, PicUrlExtInfo, VideoExtInfo } from '@/napcat-core/packet/transformer/proto';
|
||||
|
||||
export const NTV2RichMediaResp = {
|
||||
respHead: ProtoField(1, () => MultiMediaRespHead),
|
||||
upload: ProtoField(2, () => UploadResp),
|
||||
download: ProtoField(3, () => DownloadResp),
|
||||
downloadRKey: ProtoField(4, () => DownloadRKeyResp),
|
||||
delete: ProtoField(5, () => DeleteResp),
|
||||
uploadCompleted: ProtoField(6, () => UploadCompletedResp),
|
||||
msgInfoAuth: ProtoField(7, () => MsgInfoAuthResp),
|
||||
uploadKeyRenewal: ProtoField(8, () => UploadKeyRenewalResp),
|
||||
downloadSafe: ProtoField(9, () => DownloadSafeResp),
|
||||
extension: ProtoField(99, ScalarType.BYTES, true),
|
||||
};
|
||||
|
||||
export const MultiMediaRespHead = {
|
||||
common: ProtoField(1, () => CommonHead),
|
||||
retCode: ProtoField(2, ScalarType.UINT32),
|
||||
message: ProtoField(3, ScalarType.STRING),
|
||||
};
|
||||
|
||||
export const DownloadResp = {
|
||||
rKeyParam: ProtoField(1, ScalarType.STRING),
|
||||
rKeyTtlSecond: ProtoField(2, ScalarType.UINT32),
|
||||
info: ProtoField(3, () => DownloadInfo),
|
||||
rKeyCreateTime: ProtoField(4, ScalarType.UINT32),
|
||||
};
|
||||
|
||||
export const DownloadInfo = {
|
||||
domain: ProtoField(1, ScalarType.STRING),
|
||||
urlPath: ProtoField(2, ScalarType.STRING),
|
||||
httpsPort: ProtoField(3, ScalarType.UINT32),
|
||||
ipv4s: ProtoField(4, () => IPv4, false, true),
|
||||
ipv6s: ProtoField(5, () => IPv6, false, true),
|
||||
picUrlExtInfo: ProtoField(6, () => PicUrlExtInfo),
|
||||
videoExtInfo: ProtoField(7, () => VideoExtInfo),
|
||||
};
|
||||
|
||||
export const IPv4 = {
|
||||
outIP: ProtoField(1, ScalarType.UINT32),
|
||||
outPort: ProtoField(2, ScalarType.UINT32),
|
||||
inIP: ProtoField(3, ScalarType.UINT32),
|
||||
inPort: ProtoField(4, ScalarType.UINT32),
|
||||
ipType: ProtoField(5, ScalarType.UINT32),
|
||||
};
|
||||
|
||||
export const IPv6 = {
|
||||
outIP: ProtoField(1, ScalarType.BYTES),
|
||||
outPort: ProtoField(2, ScalarType.UINT32),
|
||||
inIP: ProtoField(3, ScalarType.BYTES),
|
||||
inPort: ProtoField(4, ScalarType.UINT32),
|
||||
ipType: ProtoField(5, ScalarType.UINT32),
|
||||
};
|
||||
|
||||
export const UploadResp = {
|
||||
uKey: ProtoField(1, ScalarType.STRING, true),
|
||||
uKeyTtlSecond: ProtoField(2, ScalarType.UINT32),
|
||||
ipv4s: ProtoField(3, () => IPv4, false, true),
|
||||
ipv6s: ProtoField(4, () => IPv6, false, true),
|
||||
msgSeq: ProtoField(5, ScalarType.UINT64),
|
||||
msgInfo: ProtoField(6, () => MsgInfo),
|
||||
ext: ProtoField(7, () => RichMediaStorageTransInfo, false, true),
|
||||
compatQMsg: ProtoField(8, ScalarType.BYTES),
|
||||
subFileInfos: ProtoField(10, () => SubFileInfo, false, true),
|
||||
};
|
||||
|
||||
export const RichMediaStorageTransInfo = {
|
||||
subType: ProtoField(1, ScalarType.UINT32),
|
||||
extType: ProtoField(2, ScalarType.UINT32),
|
||||
extValue: ProtoField(3, ScalarType.BYTES),
|
||||
};
|
||||
|
||||
export const SubFileInfo = {
|
||||
subType: ProtoField(1, ScalarType.UINT32),
|
||||
uKey: ProtoField(2, ScalarType.STRING),
|
||||
uKeyTtlSecond: ProtoField(3, ScalarType.UINT32),
|
||||
ipv4s: ProtoField(4, () => IPv4, false, true),
|
||||
ipv6s: ProtoField(5, () => IPv6, false, true),
|
||||
};
|
||||
|
||||
export const DownloadSafeResp = {
|
||||
};
|
||||
|
||||
export const UploadKeyRenewalResp = {
|
||||
ukey: ProtoField(1, ScalarType.STRING),
|
||||
ukeyTtlSec: ProtoField(2, ScalarType.UINT64),
|
||||
};
|
||||
|
||||
export const MsgInfoAuthResp = {
|
||||
authCode: ProtoField(1, ScalarType.UINT32),
|
||||
msg: ProtoField(2, ScalarType.BYTES),
|
||||
resultTime: ProtoField(3, ScalarType.UINT64),
|
||||
};
|
||||
|
||||
export const UploadCompletedResp = {
|
||||
msgSeq: ProtoField(1, ScalarType.UINT64),
|
||||
};
|
||||
|
||||
export const DeleteResp = {
|
||||
};
|
||||
|
||||
export const DownloadRKeyResp = {
|
||||
rKeys: ProtoField(1, () => RKeyInfo, false, true),
|
||||
};
|
||||
|
||||
export const RKeyInfo = {
|
||||
rkey: ProtoField(1, ScalarType.STRING),
|
||||
rkeyTtlSec: ProtoField(2, ScalarType.UINT64),
|
||||
storeId: ProtoField(3, ScalarType.UINT32),
|
||||
rkeyCreateTime: ProtoField(4, ScalarType.UINT32, true),
|
||||
type: ProtoField(5, ScalarType.UINT32, true),
|
||||
};
|
||||
Reference in new issue
Block a user