mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-16 04:45:46 +00:00
style: ScalarType
This commit is contained in:
parent
d332b199b5
commit
b663f47713
@ -1,13 +1,13 @@
|
||||
import { MessageType, BinaryReader } from '@protobuf-ts/runtime';
|
||||
import { MessageType, BinaryReader, ScalarType } from '@protobuf-ts/runtime';
|
||||
|
||||
export const BodyInner = new MessageType("BodyInner", [
|
||||
{ no: 1, name: "msgType", kind: "scalar", T: 13 /* uint32 */, opt: true },
|
||||
{ no: 2, name: "subType", kind: "scalar", T: 13 /* uint32 */, opt: true }
|
||||
{ no: 1, name: "msgType", kind: "scalar", T: ScalarType.UINT32 /* uint32 */, opt: true },
|
||||
{ no: 2, name: "subType", kind: "scalar", T: ScalarType.UINT32 /* uint32 */, opt: true }
|
||||
]);
|
||||
|
||||
export const NoifyData = new MessageType("NoifyData", [
|
||||
{ no: 1, name: "skip", kind: "scalar", T: 12 /* bytes */, opt: true },
|
||||
{ no: 2, name: "innerData", kind: "scalar", T: 12 /* bytes */, opt: true }
|
||||
{ no: 1, name: "skip", kind: "scalar", T: ScalarType.BYTES /* bytes */, opt: true },
|
||||
{ no: 2, name: "innerData", kind: "scalar", T: ScalarType.BYTES /* bytes */, opt: true }
|
||||
]);
|
||||
|
||||
export const MsgHead = new MessageType("MsgHead", [
|
||||
@ -20,26 +20,28 @@ export const Message = new MessageType("Message", [
|
||||
]);
|
||||
|
||||
export const SubDetail = new MessageType("SubDetail", [
|
||||
{ no: 1, name: "msgSeq", kind: "scalar", T: 13 /* uint32 */ },
|
||||
{ no: 2, name: "msgTime", kind: "scalar", T: 13 /* uint32 */ },
|
||||
{ no: 6, name: "senderUid", kind: "scalar", T: 9 /* string */ }
|
||||
{ no: 1, name: "msgSeq", kind: "scalar", T: ScalarType.UINT32 /* uint32 */ },
|
||||
{ no: 2, name: "msgTime", kind: "scalar", T: ScalarType.UINT32 /* uint32 */ },
|
||||
{ no: 6, name: "senderUid", kind: "scalar", T: ScalarType.STRING /* string */ }
|
||||
]);
|
||||
|
||||
export const RecallDetails = new MessageType("RecallDetails", [
|
||||
{ no: 1, name: "operatorUid", kind: "scalar", T: 9 /* string */ },
|
||||
{ no: 1, name: "operatorUid", kind: "scalar", T: ScalarType.STRING /* string */ },
|
||||
{ no: 3, name: "subDetail", kind: "message", T: () => SubDetail }
|
||||
]);
|
||||
|
||||
export const RecallGroup = new MessageType("RecallGroup", [
|
||||
{ no: 1, name: "type", kind: "scalar", T: 5 /* int32 */ },
|
||||
{ no: 4, name: "peerUid", kind: "scalar", T: 13 /* uint32 */ },
|
||||
{ no: 1, name: "type", kind: "scalar", T: ScalarType.INT32 /* int32 */ },
|
||||
{ no: 4, name: "peerUid", kind: "scalar", T: ScalarType.UINT32 /* uint32 */ },
|
||||
{ no: 11, name: "recallDetails", kind: "message", T: () => RecallDetails },
|
||||
{ no: 37, name: "grayTipsSeq", kind: "scalar", T: 13 /* uint32 */ }
|
||||
{ no: 37, name: "grayTipsSeq", kind: "scalar", T: ScalarType.UINT32 /* uint32 */ }
|
||||
]);
|
||||
|
||||
export function decodeMessage(buffer: Uint8Array): any {
|
||||
const reader = new BinaryReader(buffer);
|
||||
return Message.internalBinaryRead(reader, reader.len, { readUnknownField: true, readerFactory: () => new BinaryReader(buffer) });
|
||||
}
|
||||
|
||||
export function decodeRecallGroup(buffer: Uint8Array): any {
|
||||
const reader = new BinaryReader(buffer);
|
||||
return RecallGroup.internalBinaryRead(reader, reader.len, { readUnknownField: true, readerFactory: () => new BinaryReader(buffer) });
|
||||
|
@ -1,14 +1,14 @@
|
||||
import { MessageType, BinaryReader, RepeatType } from '@protobuf-ts/runtime';
|
||||
import { MessageType, BinaryReader, ScalarType, RepeatType } from '@protobuf-ts/runtime';
|
||||
|
||||
export const LikeDetailType = new MessageType("LikeDetailType", [
|
||||
{ no: 1, name: "txt", kind: "scalar", T: 9 /* string */ },
|
||||
{ no: 2, name: "uin", kind: "scalar", T: 3 /* int64 */ },
|
||||
{ no: 3, name: "nickname", kind: "scalar", T: 9 /* string */ }
|
||||
{ no: 1, name: "txt", kind: "scalar", T: ScalarType.STRING /* string */ },
|
||||
{ no: 2, name: "uin", kind: "scalar", T: ScalarType.INT64 /* int64 */ },
|
||||
{ no: 3, name: "nickname", kind: "scalar", T: ScalarType.STRING /* string */ }
|
||||
]);
|
||||
|
||||
export const LikeMsgType = new MessageType("LikeMsgType", [
|
||||
{ no: 1, name: "times", kind: "scalar", T: 5 /* int32 */ },
|
||||
{ no: 2, name: "time", kind: "scalar", T: 5 /* int32 */ },
|
||||
{ no: 1, name: "times", kind: "scalar", T: ScalarType.INT32 /* int32 */ },
|
||||
{ no: 2, name: "time", kind: "scalar", T: ScalarType.INT32 /* int32 */ },
|
||||
{ no: 3, name: "detail", kind: "message", T: () => LikeDetailType }
|
||||
]);
|
||||
|
||||
@ -17,29 +17,29 @@ export const ProfileLikeSubTipType = new MessageType("ProfileLikeSubTipType", [
|
||||
]);
|
||||
|
||||
export const ProfileLikeTipType = new MessageType("ProfileLikeTipType", [
|
||||
{ no: 1, name: "msgType", kind: "scalar", T: 5 /* int32 */ },
|
||||
{ no: 2, name: "subType", kind: "scalar", T: 5 /* int32 */ },
|
||||
{ no: 1, name: "msgType", kind: "scalar", T: ScalarType.INT32 /* int32 */ },
|
||||
{ no: 2, name: "subType", kind: "scalar", T: ScalarType.INT32 /* int32 */ },
|
||||
{ no: 3, name: "content", kind: "message", T: () => ProfileLikeSubTipType }
|
||||
]);
|
||||
|
||||
export const SysMessageHeaderType = new MessageType("SysMessageHeaderType", [
|
||||
{ no: 1, name: "id", kind: "scalar", T: 9 /* string */ },
|
||||
{ no: 2, name: "timestamp", kind: "scalar", T: 5 /* int32 */ },
|
||||
{ no: 3, name: "sender", kind: "scalar", T: 9 /* string */ }
|
||||
{ no: 1, name: "id", kind: "scalar", T: ScalarType.STRING /* string */ },
|
||||
{ no: 2, name: "timestamp", kind: "scalar", T: ScalarType.INT32 /* int32 */ },
|
||||
{ no: 3, name: "sender", kind: "scalar", T: ScalarType.STRING /* string */ }
|
||||
]);
|
||||
|
||||
export const SysMessageMsgSpecType = new MessageType("SysMessageMsgSpecType", [
|
||||
{ no: 1, name: "msgType", kind: "scalar", T: 5 /* int32 */ },
|
||||
{ no: 2, name: "subType", kind: "scalar", T: 5 /* int32 */ },
|
||||
{ no: 3, name: "subSubType", kind: "scalar", T: 5 /* int32 */ },
|
||||
{ no: 4, name: "msgSeq", kind: "scalar", T: 5 /* int32 */ },
|
||||
{ no: 5, name: "time", kind: "scalar", T: 5 /* int32 */ },
|
||||
{ no: 6, name: "msgId", kind: "scalar", T: 3 /* int64 */ },
|
||||
{ no: 7, name: "other", kind: "scalar", T: 5 /* int32 */ }
|
||||
{ no: 1, name: "msgType", kind: "scalar", T: ScalarType.INT32 /* int32 */ },
|
||||
{ no: 2, name: "subType", kind: "scalar", T: ScalarType.INT32 /* int32 */ },
|
||||
{ no: 3, name: "subSubType", kind: "scalar", T: ScalarType.INT32 /* int32 */ },
|
||||
{ no: 4, name: "msgSeq", kind: "scalar", T: ScalarType.INT32 /* int32 */ },
|
||||
{ no: 5, name: "time", kind: "scalar", T: ScalarType.INT32 /* int32 */ },
|
||||
{ no: 6, name: "msgId", kind: "scalar", T: ScalarType.INT64 /* int64 */ },
|
||||
{ no: 7, name: "other", kind: "scalar", T: ScalarType.INT32 /* int32 */ }
|
||||
]);
|
||||
|
||||
export const SysMessageBodyWrapperType = new MessageType("SysMessageBodyWrapperType", [
|
||||
{ no: 1, name: "wrappedBody", kind: "scalar", T: 12 /* bytes */ }
|
||||
{ no: 1, name: "wrappedBody", kind: "scalar", T: ScalarType.BYTES /* bytes */ }
|
||||
]);
|
||||
|
||||
export const SysMessageType = new MessageType("SysMessageType", [
|
||||
|
Loading…
Reference in New Issue
Block a user