Remove bridge proto schemas and parity test
Delete proto schema modules under packages/core/src/bridge/proto (action.ts, element.ts, highway.ts, longmsg.ts, message.ts, notify.ts, oidb-action.ts, oidb.ts) and the related test packages/core/tests/proton-parity.test.ts. These files contained protobuf schema definitions for the bridge layer; remove them as part of a cleanup/refactor. Update any imports or references to these modules to their new locations or replacements.
This commit is contained in:
1 parent
02bab710b8
commit
5ea1c3a961
45 files changed
+1361
-4230
No files matched your search
@@ -7,15 +7,17 @@ import { protobuf_decode, protobuf_encode } from '@snowluma/proton';
|
||||
import type { Bridge } from '../bridge';
|
||||
import { runOidb, makeOidbEnvelope } from '../bridge-oidb';
|
||||
import { OidbBase } from '../proto/proton/oidb';
|
||||
import type {
|
||||
OidbGroupTodo,
|
||||
OidbStrangerStatusReq,
|
||||
OidbStrangerStatusResp,
|
||||
} from '../proto/proton/oidb-actions/base';
|
||||
import type {
|
||||
OidbAiVoiceListReq,
|
||||
OidbAiVoiceListResp,
|
||||
OidbAiVoiceReq,
|
||||
OidbAiVoiceResp,
|
||||
OidbGroupTodo,
|
||||
OidbStrangerStatusReq,
|
||||
OidbStrangerStatusResp,
|
||||
} from '../proto/proton/oidb-action';
|
||||
} from '../proto/proton/oidb-actions/media';
|
||||
import type { MediaIndexNode } from './shared';
|
||||
|
||||
// ─────────────── Group todo (0xF90) ───────────────
|
||||
|
||||
@@ -9,7 +9,7 @@ import type {
|
||||
OidbDeleteFriend,
|
||||
OidbFriendRequestAction,
|
||||
OidbSetFriendRemark,
|
||||
} from '../proto/proton/oidb-action';
|
||||
} from '../proto/proton/oidb-actions/base';
|
||||
import { OidbBase } from '../proto/proton/oidb';
|
||||
|
||||
export async function setFriendAddRequest(bridge: Bridge, uidOrFlag: string, approve: boolean): Promise<void> {
|
||||
|
||||
@@ -23,7 +23,7 @@ import type {
|
||||
OidbRenameMember,
|
||||
OidbSetAdmin,
|
||||
OidbSpecialTitle,
|
||||
} from '../proto/proton/oidb-action';
|
||||
} from '../proto/proton/oidb-actions/base';
|
||||
|
||||
// ─────────────── mute / un-mute ───────────────
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ import type {
|
||||
DoQunLikeResponse,
|
||||
DeleteMediasRequest,
|
||||
DeleteMediasResponse,
|
||||
} from '../proto/proton/oidb-action';
|
||||
} from '../proto/proton/oidb-actions/group-album';
|
||||
|
||||
export interface GroupAlbumMediaResult {
|
||||
mediaList: any[];
|
||||
|
||||
@@ -20,13 +20,15 @@ import type {
|
||||
OidbGroupFileViewReq,
|
||||
OidbGroupFileViewResp,
|
||||
OidbGroupSendFileReq,
|
||||
} from '../proto/proton/oidb-actions/group-file';
|
||||
import type {
|
||||
OidbPrivateFileDownloadReq,
|
||||
OidbPrivateFileDownloadResp,
|
||||
OidbPrivateFileUploadReq,
|
||||
OidbPrivateFileUploadResp,
|
||||
NTV2RichMediaReq,
|
||||
NTV2RichMediaResp,
|
||||
} from '../proto/proton/oidb-action';
|
||||
} from '../proto/proton/oidb-actions/media';
|
||||
import type { FileUploadExt } from '../proto/proton/highway';
|
||||
import { toHexUpper } from '../../utils/hex';
|
||||
import { createLogger } from '../../utils/logger';
|
||||
@@ -579,7 +581,7 @@ export async function uploadPrivateFile(
|
||||
// (or whether it returned nothing at all — which would point at
|
||||
// a request mismatch rather than a missing decoder).
|
||||
const rtpDump = Array.isArray(upload.rtpMediaPlatformUploadAddress)
|
||||
? JSON.stringify(upload.rtpMediaPlatformUploadAddress.map((e) => ({
|
||||
? JSON.stringify(upload.rtpMediaPlatformUploadAddress.map((e: any) => ({
|
||||
outIP: e.outIP, outPort: e.outPort, inIP: e.inIP, inPort: e.inPort,
|
||||
iPType: e.iPType,
|
||||
})))
|
||||
|
||||
@@ -4,24 +4,18 @@
|
||||
// without producing a downstream observable event.
|
||||
|
||||
import type { Bridge } from '../bridge';
|
||||
import { protoEncode } from '../../protobuf/decode';
|
||||
import { runOidb, makeOidbEnvelope } from '../bridge-oidb';
|
||||
import {
|
||||
C2CRecallRequestSchema,
|
||||
GroupRecallRequestSchema,
|
||||
SsoReadedReportReqSchema,
|
||||
} from '../proto/oidb-action';
|
||||
import type { OidbEssence } from '../proto/proton/oidb-action';
|
||||
import type { C2CRecallRequest, GroupRecallRequest, OidbEssence, SsoReadedReportReq } from '../proto/proton/oidb-actions/base';
|
||||
import { protobuf_encode } from '@snowluma/proton';
|
||||
import { OidbBase } from '../proto/proton/oidb';
|
||||
|
||||
export async function recallGroupMessage(bridge: Bridge, groupId: number, sequence: number): Promise<void> {
|
||||
const request = protoEncode({
|
||||
const request = protobuf_encode<GroupRecallRequest>({
|
||||
type: 1,
|
||||
groupUin: groupId,
|
||||
info: { sequence, random: 0, field3: 0 },
|
||||
settings: { field1: 0 },
|
||||
}, GroupRecallRequestSchema);
|
||||
});
|
||||
const result = await bridge.sendRawPacket('trpc.msg.msg_svc.MsgService.SsoGroupRecallMsg', request);
|
||||
if (!result.success) throw new Error(result.errorMessage || 'recall group message failed');
|
||||
}
|
||||
@@ -31,7 +25,7 @@ export async function recallPrivateMessage(
|
||||
msgSeq: number, random: number, timestamp: number,
|
||||
): Promise<void> {
|
||||
const targetUid = await bridge.resolveUserUid(userUin);
|
||||
const request = protoEncode({
|
||||
const request = protobuf_encode<C2CRecallRequest>({
|
||||
type: 1,
|
||||
targetUid,
|
||||
info: {
|
||||
@@ -44,7 +38,7 @@ export async function recallPrivateMessage(
|
||||
},
|
||||
settings: { field1: false, field2: false },
|
||||
field6: false,
|
||||
}, C2CRecallRequestSchema);
|
||||
});
|
||||
const result = await bridge.sendRawPacket('trpc.msg.msg_svc.MsgService.SsoC2CRecallMsg', request);
|
||||
if (!result.success) throw new Error(result.errorMessage || 'recall private message failed');
|
||||
}
|
||||
@@ -57,7 +51,7 @@ export async function markPrivateMessageRead(
|
||||
): Promise<void> {
|
||||
const uid = await bridge.resolveUserUid(userId);
|
||||
|
||||
const request = protoEncode({
|
||||
const request = protobuf_encode<SsoReadedReportReq>({
|
||||
c2cList: [
|
||||
{
|
||||
uid,
|
||||
@@ -65,7 +59,7 @@ export async function markPrivateMessageRead(
|
||||
lastReadSeq: BigInt(msgSeq),
|
||||
},
|
||||
],
|
||||
}, SsoReadedReportReqSchema);
|
||||
});
|
||||
|
||||
const result = await bridge.sendRawPacket('trpc.msg.msg_svc.MsgService.SsoReadedReport', request);
|
||||
|
||||
@@ -79,14 +73,14 @@ export async function markGroupMessageRead(
|
||||
groupId: number,
|
||||
msgSeq: number,
|
||||
): Promise<void> {
|
||||
const request = protoEncode({
|
||||
const request = protobuf_encode<SsoReadedReportReq>({
|
||||
groupList: [
|
||||
{
|
||||
groupUin: BigInt(groupId),
|
||||
lastReadSeq: BigInt(msgSeq),
|
||||
},
|
||||
],
|
||||
}, SsoReadedReportReqSchema);
|
||||
});
|
||||
|
||||
const result = await bridge.sendRawPacket('trpc.msg.msg_svc.MsgService.SsoReadedReport', request);
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import type {
|
||||
OidbGroupReaction,
|
||||
OidbLike,
|
||||
OidbPoke,
|
||||
} from '../proto/proton/oidb-action';
|
||||
} from '../proto/proton/oidb-actions/base';
|
||||
import { OidbBase } from '../proto/proton/oidb';
|
||||
|
||||
export async function sendPoke(bridge: Bridge, isGroup: boolean, peerUin: number, targetUin?: number): Promise<void> {
|
||||
|
||||
@@ -3,20 +3,17 @@
|
||||
// related siblings, lift the whole group out into its own file.
|
||||
|
||||
import type { Bridge } from '../bridge';
|
||||
import { protoDecode, protoEncode } from '../../protobuf/decode';
|
||||
import { runOidb, makeOidbEnvelope } from '../bridge-oidb';
|
||||
import {
|
||||
MiniAppShareReqSchema,
|
||||
MiniAppShareRespSchema,
|
||||
} from '../proto/oidb-action';
|
||||
import type {
|
||||
MiniAppShareReq,
|
||||
MiniAppShareResp,
|
||||
Oidb0x112eReq,
|
||||
Oidb0x112eResp,
|
||||
Oidb0x990Req,
|
||||
Oidb0x990Resp,
|
||||
Oidb0xeb7Req,
|
||||
Oidb0xeb7Resp,
|
||||
} from '../proto/proton/oidb-action';
|
||||
} from '../proto/proton/oidb-actions/base';
|
||||
import { protobuf_decode, protobuf_encode } from '@snowluma/proton';
|
||||
import { OidbBase } from '../proto/proton/oidb';
|
||||
|
||||
@@ -64,7 +61,7 @@ export async function getMiniAppArk(
|
||||
throw new Error(`unsupported type: ${type}, only support bili and weibo`);
|
||||
}
|
||||
|
||||
const request = protoEncode({
|
||||
const request = protobuf_encode<MiniAppShareReq>({
|
||||
sdkVersion: 'V1_PC_MINISDK_99.99.99_1_APP_A',
|
||||
body: {
|
||||
appid,
|
||||
@@ -74,7 +71,7 @@ export async function getMiniAppArk(
|
||||
jumpUrl,
|
||||
iconUrl,
|
||||
},
|
||||
}, MiniAppShareReqSchema);
|
||||
});
|
||||
|
||||
const result = await bridge.sendRawPacket('LightAppSvc.mini_app_share.AdaptShareInfo', request);
|
||||
|
||||
@@ -82,7 +79,7 @@ export async function getMiniAppArk(
|
||||
throw new Error(result.errorMessage || 'get mini app ark failed');
|
||||
}
|
||||
|
||||
const decoded = protoDecode(result.responseData, MiniAppShareRespSchema);
|
||||
const decoded = protobuf_decode<MiniAppShareResp>(result.responseData);
|
||||
const jsonStr = decoded?.body?.jsonStr;
|
||||
|
||||
if (!jsonStr) {
|
||||
|
||||
@@ -3,18 +3,13 @@
|
||||
// All of these read/write fields on the self-uin via OIDB.
|
||||
|
||||
import type { Bridge } from '../bridge';
|
||||
import { protoDecode, protoEncode } from '../../protobuf/decode';
|
||||
import { runOidb, makeOidbEnvelope } from '../bridge-oidb';
|
||||
import { fetchHighwaySession, uploadHighwayHttp } from '../highway/highway-client';
|
||||
import { computeHashes, loadBinarySource } from '../highway/utils';
|
||||
import {
|
||||
FaceroamOpReqSchema,
|
||||
FaceroamOpRespSchema,
|
||||
GroupAvatarExtraSchema,
|
||||
SetStatusReqSchema,
|
||||
SetStatusRespSchema,
|
||||
} from '../proto/oidb-action';
|
||||
import type {
|
||||
FaceroamOpReq,
|
||||
FaceroamOpResp,
|
||||
GroupAvatarExtra,
|
||||
Oidb0x112aReq,
|
||||
Oidb0x112aResp,
|
||||
Oidb0x7edReq,
|
||||
@@ -24,7 +19,9 @@ import type {
|
||||
Oidb0xe17Req,
|
||||
Oidb0xe17Resp,
|
||||
OidbSetProfile,
|
||||
} from '../proto/proton/oidb-action';
|
||||
SetStatusReq,
|
||||
SetStatusResp,
|
||||
} from '../proto/proton/oidb-actions/base';
|
||||
import { resolveSelfUid } from './shared';
|
||||
import { protobuf_decode, protobuf_encode } from '@snowluma/proton';
|
||||
import { OidbBase } from '../proto/proton/oidb';
|
||||
@@ -69,7 +66,7 @@ async function dispatchSetStatus(
|
||||
customExt?: { faceId: number; text: string; faceType: number };
|
||||
},
|
||||
): Promise<void> {
|
||||
const request = protoEncode(value, SetStatusReqSchema);
|
||||
const request = protobuf_encode<SetStatusReq>(value);
|
||||
|
||||
const result = await bridge.sendRawPacket('trpc.qq_new_tech.status_svc.StatusService.SetStatus', request);
|
||||
|
||||
@@ -78,7 +75,7 @@ async function dispatchSetStatus(
|
||||
}
|
||||
|
||||
if (result.responseData && result.responseData.length > 0) {
|
||||
const resp = protoDecode(result.responseData, SetStatusRespSchema);
|
||||
const resp = protobuf_decode<SetStatusResp>(result.responseData);
|
||||
if (!resp) {
|
||||
throw new Error(result.errorMessage || 'set online status failed (network/timeout)');
|
||||
}
|
||||
@@ -193,13 +190,13 @@ export async function setGroupAvatar(
|
||||
|
||||
const hashes = computeHashes(loaded.bytes);
|
||||
const session = await fetchHighwaySession(bridge);
|
||||
const extra = protoEncode({
|
||||
const extra = protobuf_encode<GroupAvatarExtra>({
|
||||
type: 101,
|
||||
groupUin: groupId,
|
||||
field3: { field1: 1 },
|
||||
field5: 3,
|
||||
field6: 1,
|
||||
}, GroupAvatarExtraSchema);
|
||||
});
|
||||
await uploadHighwayHttp(bridge, session, 3000, loaded.bytes, hashes.md5, extra);
|
||||
}
|
||||
|
||||
@@ -290,12 +287,12 @@ export async function fetchCustomFace(bridge: Bridge, count: number = 10): Promi
|
||||
field3: 1,
|
||||
field6: 1,
|
||||
};
|
||||
const request = protoEncode(req, FaceroamOpReqSchema);
|
||||
const request = protobuf_encode<FaceroamOpReq>(req);
|
||||
const result = await bridge.sendRawPacket('Faceroam.OpReq', request);
|
||||
if (!result.success || !result.gotResponse || !result.responseData) {
|
||||
throw new Error(result.errorMessage || 'fetch custom face failed');
|
||||
}
|
||||
const resp = protoDecode(result.responseData, FaceroamOpRespSchema);
|
||||
const resp = protobuf_decode<FaceroamOpResp>(result.responseData);
|
||||
if (!resp || (resp as any).retCode !== 0) {
|
||||
throw new Error(`fetch custom face error: ${(resp as any)?.message || 'unknown'}`);
|
||||
}
|
||||
|
||||
@@ -3,9 +3,7 @@
|
||||
import type { Bridge } from './bridge';
|
||||
import type { DownloadRKeyInfo } from './bridge';
|
||||
import type { FriendInfo, QQGroupInfo, GroupMemberInfo, UserProfileInfo, GroupRequestInfo } from './qq-info';
|
||||
import { protoDecode } from '../protobuf/decode';
|
||||
import { runOidb, makeOidbEnvelope } from './bridge-oidb';
|
||||
import { AvatarInfoSchema } from './proto/oidb-action';
|
||||
import type {
|
||||
OidbSvcTrpcTcp0xFD4_1Response,
|
||||
OidbSvcTrpcTcp0xFE5_2Response,
|
||||
@@ -20,9 +18,12 @@ import type {
|
||||
OidbUserInfoRequest,
|
||||
OidbUserInfoResponse,
|
||||
OidbGroupRequestList,
|
||||
AvatarInfo,
|
||||
} from './proto/proton/oidb-actions/base';
|
||||
import type {
|
||||
NTV2RichMediaReq,
|
||||
NTV2RichMediaResp,
|
||||
} from './proto/proton/oidb-action';
|
||||
} from './proto/proton/oidb-actions/media';
|
||||
import { protobuf_decode, protobuf_encode } from '@snowluma/proton';
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@@ -261,7 +262,7 @@ export async function fetchUserProfile(bridge: Bridge, uin: number): Promise<Use
|
||||
|
||||
const avatarBytes = bytesMap.get(101);
|
||||
if (avatarBytes) {
|
||||
const av = protoDecode(avatarBytes, AvatarInfoSchema);
|
||||
const av = protobuf_decode<AvatarInfo>(avatarBytes);
|
||||
if (av?.url) info.avatar = av.url + '640';
|
||||
}
|
||||
|
||||
|
||||
@@ -386,7 +386,7 @@ export class Bridge implements BridgeInterface {
|
||||
if (!response) {
|
||||
throw new Error('failed to decode SendMessageResponse');
|
||||
}
|
||||
if (response.result !== undefined && response.result !== 0) {
|
||||
if (response.result != null && response.result !== 0) {
|
||||
throw new Error(`send group message rejected: result=${response.result} err=${response.errMsg ?? ''}`);
|
||||
}
|
||||
|
||||
@@ -455,7 +455,7 @@ export class Bridge implements BridgeInterface {
|
||||
if (!response) {
|
||||
throw new Error('failed to decode SendMessageResponse');
|
||||
}
|
||||
if (response.result !== undefined && response.result !== 0) {
|
||||
if (response.result != null && response.result !== 0) {
|
||||
throw new Error(`send private message rejected: result=${response.result} err=${response.errMsg ?? ''}`);
|
||||
}
|
||||
|
||||
@@ -569,7 +569,7 @@ export class Bridge implements BridgeInterface {
|
||||
if (!response) {
|
||||
throw new Error('failed to decode SendMessageResponse');
|
||||
}
|
||||
if (response.result !== undefined && response.result !== 0) {
|
||||
if (response.result != null && response.result !== 0) {
|
||||
throw new Error(`send c2c file message rejected: result=${response.result} err=${response.errMsg ?? ''}`);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,25 +1,21 @@
|
||||
// Element Builder — converts internal MessageElement[] into proto Elem objects
|
||||
// for encoding with protoEncode(SendMessageRequestSchema).
|
||||
// for encoding with protobuf_encode<SendMessageRequest>.
|
||||
// Port of src/bridge/src/bridge_messages.cpp build_send_elems()
|
||||
|
||||
import type { Bridge } from './bridge';
|
||||
import type { MessageElement } from './events';
|
||||
import type { ProtoDecoded } from '../protobuf/decode';
|
||||
import { protobuf_encode } from '@snowluma/proton';
|
||||
import {
|
||||
ElemSchema,
|
||||
} from './proto/element';
|
||||
import type {
|
||||
MentionExtraSend,
|
||||
MarkdownData,
|
||||
} from './proto/proton/action';
|
||||
import type { GroupFileExtra } from './proto/proton/element';
|
||||
import type { Elem, GroupFileExtra } from './proto/proton/element';
|
||||
import { uploadImageMsgInfo } from './highway/image-upload';
|
||||
import { uploadPttMsgInfo } from './highway/ptt-upload';
|
||||
import { uploadVideoMsgInfo } from './highway/video-upload';
|
||||
import { hexToBytes } from './highway/pipeline';
|
||||
|
||||
type ProtoElem = Partial<ProtoDecoded<typeof ElemSchema>>;
|
||||
type ProtoElem = Partial<Elem>;
|
||||
|
||||
export interface SendContext {
|
||||
bridge: Bridge;
|
||||
|
||||
@@ -2,17 +2,14 @@
|
||||
// One unified shape: notice decoders pick from `content`, message decoders
|
||||
// pick from `body` / `responseHead`. Decoders ignore fields they don't need.
|
||||
|
||||
import { protoDecode } from '../../protobuf/decode';
|
||||
import type { ProtoDecoded } from '../../protobuf/decode';
|
||||
import {
|
||||
PushMsgSchema, MessageBodySchema, ResponseHeadSchema, ContentHeadSchema,
|
||||
} from '../proto/message';
|
||||
import { protobuf_decode } from '@snowluma/proton';
|
||||
import type { ContentHead, MessageBody, PushMsg, ResponseHead } from '../proto/proton/message';
|
||||
import type { PacketInfo } from '../../protocol/types';
|
||||
import type { IdentityService } from '../identity-service';
|
||||
|
||||
export type PushMsgBody = ProtoDecoded<typeof MessageBodySchema>;
|
||||
export type PushMsgResponseHead = ProtoDecoded<typeof ResponseHeadSchema>;
|
||||
export type PushMsgContentHead = ProtoDecoded<typeof ContentHeadSchema>;
|
||||
export type PushMsgBody = MessageBody;
|
||||
export type PushMsgResponseHead = ResponseHead;
|
||||
export type PushMsgContentHead = ContentHead;
|
||||
|
||||
export interface MsgPushHead {
|
||||
readonly msgType: number;
|
||||
@@ -36,7 +33,7 @@ export interface MsgPushContext {
|
||||
export function buildContext(pkt: PacketInfo, identity: IdentityService): MsgPushContext | null {
|
||||
if (pkt.body.length === 0) return null;
|
||||
|
||||
const push = protoDecode(Buffer.from(pkt.body), PushMsgSchema);
|
||||
const push = protobuf_decode<PushMsg>(Buffer.from(pkt.body));
|
||||
if (!push?.message) return null;
|
||||
|
||||
const msg = push.message;
|
||||
|
||||
@@ -4,23 +4,24 @@
|
||||
// lookups, no I/O. The single small interface `decodeRichBody` hides
|
||||
// ~400 lines of per-element-type decoding behind it.
|
||||
|
||||
import { protoDecode } from '../../protobuf/decode';
|
||||
import type { ProtoDecoded } from '../../protobuf/decode';
|
||||
import { ElemSchema } from '../proto/element';
|
||||
import {
|
||||
MentionExtraSchema, QFaceExtraSchema, QSmallFaceExtraSchema,
|
||||
MsgInfoSchema, GroupFileExtraSchema, NotOnlineImageSchema,
|
||||
} from '../proto/element';
|
||||
import {
|
||||
MessageBodySchema, RichTextSchema, FileExtraSchema,
|
||||
} from '../proto/message';
|
||||
import { protobuf_decode } from '@snowluma/proton';
|
||||
import type {
|
||||
Elem,
|
||||
GroupFileExtra,
|
||||
MentionExtra,
|
||||
MsgInfo,
|
||||
NotOnlineImage,
|
||||
QFaceExtra,
|
||||
QSmallFaceExtra,
|
||||
} from '../proto/proton/element';
|
||||
import type { FileExtra, MessageBody, RichText } from '../proto/proton/message';
|
||||
import type { MessageElement } from '../events';
|
||||
import { toHexUpper } from '../../utils/hex';
|
||||
import { decompressData, makeImageUrl } from './helpers';
|
||||
|
||||
type ElemDecoded = ProtoDecoded<typeof ElemSchema>;
|
||||
type RichTextDecoded = ProtoDecoded<typeof RichTextSchema>;
|
||||
export type PushMsgBody = ProtoDecoded<typeof MessageBodySchema>;
|
||||
type ElemDecoded = Elem;
|
||||
type RichTextDecoded = RichText;
|
||||
export type PushMsgBody = MessageBody;
|
||||
|
||||
export function decodeRichBody(body: PushMsgBody | undefined, isGroup: boolean): MessageElement[] {
|
||||
const elements: MessageElement[] = [];
|
||||
@@ -50,9 +51,9 @@ function convertElements(elems: ElemDecoded[]): MessageElement[] {
|
||||
// Text (with possible @ detection)
|
||||
if (elem.text) {
|
||||
const t = elem.text;
|
||||
let mention: ProtoDecoded<typeof MentionExtraSchema> | null = null;
|
||||
let mention: MentionExtra | null = null;
|
||||
if (t.pbReserve && t.pbReserve.length > 0) {
|
||||
mention = protoDecode(t.pbReserve, MentionExtraSchema);
|
||||
mention = protobuf_decode<MentionExtra>(t.pbReserve);
|
||||
}
|
||||
const hasAttr6 = t.attr6Buf && t.attr6Buf.length > 11;
|
||||
const hasMention = mention && (mention.type === 1 || mention.type === 2);
|
||||
@@ -172,7 +173,7 @@ function convertElements(elems: ElemDecoded[]): MessageElement[] {
|
||||
const val = te.elemValue;
|
||||
const len = (val[1] << 8) | val[2];
|
||||
if (val.length >= 3 + len) {
|
||||
const extra = protoDecode(val.subarray(3, 3 + len), GroupFileExtraSchema);
|
||||
const extra = protobuf_decode<GroupFileExtra>(val.subarray(3, 3 + len));
|
||||
if (extra?.inner?.info) {
|
||||
const info = extra.inner.info;
|
||||
result.push({
|
||||
@@ -243,7 +244,7 @@ function convertElements(elems: ElemDecoded[]): MessageElement[] {
|
||||
if ((b & 0x80) === 0) break;
|
||||
}
|
||||
if (pos + length <= pb.length) {
|
||||
const img = protoDecode(pb.subarray(pos, pos + length), NotOnlineImageSchema);
|
||||
const img = protobuf_decode<NotOnlineImage>(pb.subarray(pos, pos + length));
|
||||
if (img) {
|
||||
const me: MessageElement = {
|
||||
type: 'image', fileId: img.filePath ?? '',
|
||||
@@ -260,7 +261,7 @@ function convertElements(elems: ElemDecoded[]): MessageElement[] {
|
||||
skipNext = true;
|
||||
} else if (ce.pbElem && (svcType === 48 || bizType === 10 || bizType === 20 || bizType === 11 || bizType === 21 || bizType === 12 || bizType === 22)) {
|
||||
// NTQQ new protocol image/record/video
|
||||
const info = protoDecode(ce.pbElem, MsgInfoSchema);
|
||||
const info = protobuf_decode<MsgInfo>(ce.pbElem);
|
||||
if (info?.msgInfoBody && info.msgInfoBody.length > 0) {
|
||||
const body = info.msgInfoBody[0];
|
||||
if (body.index?.info) {
|
||||
@@ -368,11 +369,11 @@ function convertElements(elems: ElemDecoded[]): MessageElement[] {
|
||||
}
|
||||
} else if (svcType === 33 && ce.pbElem) {
|
||||
// Small face
|
||||
const extra = protoDecode(ce.pbElem, QSmallFaceExtraSchema);
|
||||
const extra = protobuf_decode<QSmallFaceExtra>(ce.pbElem);
|
||||
if (extra) result.push({ type: 'face', faceId: extra.faceId ?? 0 });
|
||||
} else if (svcType === 37 && ce.pbElem) {
|
||||
// Big face
|
||||
const extra = protoDecode(ce.pbElem, QFaceExtraSchema);
|
||||
const extra = protobuf_decode<QFaceExtra>(ce.pbElem);
|
||||
if (extra?.qsid !== undefined) result.push({ type: 'face', faceId: extra.qsid });
|
||||
skipNext = true;
|
||||
}
|
||||
@@ -443,7 +444,7 @@ function extractMsgContent(msgContent: Uint8Array, elements: MessageElement[]):
|
||||
// "incomplete metadata". After consolidating FileExtra to wrap
|
||||
// `NotOnlineFile` (Lagrange.Core's `FileExtra { File: NotOnlineFile }`),
|
||||
// this reads the right tags.
|
||||
const extra = protoDecode(msgContent, FileExtraSchema);
|
||||
const extra = protobuf_decode<FileExtra>(msgContent);
|
||||
if (!extra?.file) return;
|
||||
const f = extra.file;
|
||||
if (!f.fileUuid) return;
|
||||
|
||||
@@ -1,100 +0,0 @@
|
||||
import type { ProtoSchema } from '../../protobuf/decode';
|
||||
import { ElemSchema } from './element';
|
||||
|
||||
// --- Routing ---
|
||||
|
||||
export const RoutingC2CSchema = {
|
||||
uin: { field: 1, type: 'uint32' as const },
|
||||
uid: { field: 2, type: 'string' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const RoutingGroupSchema = {
|
||||
groupCode: { field: 1, type: 'uint64' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
// `Trans0x211` is the c2c-file scene's routing header (Lagrange.Core
|
||||
// `Routing/Trans0X211.cs`). See proton/action.ts:RoutingTrans0x211
|
||||
// for the rationale — c2c file sends *must* route through this slot,
|
||||
// not `c2c`, or the server rejects them.
|
||||
export const RoutingTrans0x211Schema = {
|
||||
toUin: { field: 1, type: 'uint64' as const },
|
||||
ccCmd: { field: 2, type: 'uint32' as const },
|
||||
uid: { field: 8, type: 'string' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const RoutingHeadSchema = {
|
||||
c2c: { field: 1, type: 'message' as const, schema: RoutingC2CSchema },
|
||||
grp: { field: 2, type: 'message' as const, schema: RoutingGroupSchema },
|
||||
trans0x211: { field: 15, type: 'message' as const, schema: RoutingTrans0x211Schema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
// --- Content Head (for send) ---
|
||||
|
||||
export const SendContentHeadSchema = {
|
||||
type: { field: 1, type: 'uint32' as const },
|
||||
subType: { field: 2, type: 'uint32' as const },
|
||||
c2cCmd: { field: 3, type: 'uint32' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
// --- Message Control ---
|
||||
|
||||
export const MessageControlSchema = {
|
||||
msgFlag: { field: 1, type: 'int32' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
// --- RichText (for send — only elems) ---
|
||||
|
||||
export const SendRichTextSchema = {
|
||||
elems: { field: 2, type: 'repeated_message' as const, schema: ElemSchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
// --- MessageBody (for send) ---
|
||||
|
||||
export const SendMessageBodySchema = {
|
||||
richText: { field: 1, type: 'message' as const, schema: SendRichTextSchema },
|
||||
// C2C file payload — serialised `FileExtra { file: NotOnlineFile }`
|
||||
// bytes. See proton/action.ts:SendMessageBody for the WHY.
|
||||
msgContent: { field: 2, type: 'bytes' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
// --- SendMessageRequest ---
|
||||
|
||||
export const SendMessageRequestSchema = {
|
||||
routingHead: { field: 1, type: 'message' as const, schema: RoutingHeadSchema },
|
||||
contentHead: { field: 2, type: 'message' as const, schema: SendContentHeadSchema },
|
||||
messageBody: { field: 3, type: 'message' as const, schema: SendMessageBodySchema },
|
||||
clientSequence: { field: 4, type: 'uint32' as const },
|
||||
random: { field: 5, type: 'uint32' as const },
|
||||
syncCookie: { field: 6, type: 'bytes' as const },
|
||||
via: { field: 8, type: 'uint32' as const },
|
||||
dataStatist: { field: 9, type: 'uint32' as const },
|
||||
ctrl: { field: 12, type: 'message' as const, schema: MessageControlSchema },
|
||||
multiSendSeq: { field: 14, type: 'uint32' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
// --- SendMessageResponse ---
|
||||
|
||||
export const SendMessageResponseSchema = {
|
||||
result: { field: 1, type: 'int32' as const },
|
||||
errMsg: { field: 2, type: 'string' as const },
|
||||
timestamp1: { field: 3, type: 'uint32' as const },
|
||||
field10: { field: 10, type: 'uint32' as const },
|
||||
groupSequence: { field: 11, type: 'uint32' as const },
|
||||
timestamp2: { field: 12, type: 'uint32' as const },
|
||||
privateSequence: { field: 14, type: 'uint32' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
// --- MentionExtra (for building @mention text element) ---
|
||||
|
||||
export const MentionExtraSendSchema = {
|
||||
type: { field: 3, type: 'int32' as const },
|
||||
uin: { field: 4, type: 'uint32' as const },
|
||||
field5: { field: 5, type: 'int32' as const },
|
||||
uid: { field: 9, type: 'string' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
// --- MarkdownData ---
|
||||
|
||||
export const MarkdownDataSchema = {
|
||||
content: { field: 1, type: 'string' as const },
|
||||
} satisfies ProtoSchema;
|
||||
@@ -1,428 +0,0 @@
|
||||
// Proto schemas for QQ message elements.
|
||||
// Port of src/bridge/include/bridge/proto/element.h
|
||||
|
||||
import type { ProtoSchema } from '../../protobuf/decode';
|
||||
|
||||
// --- Nested / helper schemas ---
|
||||
|
||||
export const CustomFacePbReserveSchema = {
|
||||
subType: { field: 1, type: 'int32' as const },
|
||||
summary: { field: 9, type: 'string' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const NotOnlineImagePbReserve2Schema = {
|
||||
field1: { field: 1, type: 'int32' as const },
|
||||
field2: { field: 2, type: 'string' as const },
|
||||
field3: { field: 3, type: 'int32' as const },
|
||||
field4: { field: 4, type: 'int32' as const },
|
||||
field5: { field: 5, type: 'int32' as const },
|
||||
field7: { field: 7, type: 'string' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const NotOnlineImagePbReserveSchema = {
|
||||
subType: { field: 1, type: 'int32' as const },
|
||||
field3: { field: 3, type: 'int32' as const },
|
||||
field4: { field: 4, type: 'int32' as const },
|
||||
summary: { field: 8, type: 'string' as const },
|
||||
field10: { field: 10, type: 'int32' as const },
|
||||
field20: { field: 20, type: 'message' as const, schema: NotOnlineImagePbReserve2Schema },
|
||||
url: { field: 30, type: 'string' as const },
|
||||
md5Str: { field: 31, type: 'string' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
// --- Core element schemas ---
|
||||
|
||||
export const TextElemSchema = {
|
||||
str: { field: 1, type: 'string' as const },
|
||||
link: { field: 2, type: 'string' as const },
|
||||
attr6Buf: { field: 3, type: 'bytes' as const },
|
||||
attr7Buf: { field: 4, type: 'bytes' as const },
|
||||
buf: { field: 11, type: 'bytes' as const },
|
||||
pbReserve: { field: 12, type: 'bytes' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const FaceElemSchema = {
|
||||
index: { field: 1, type: 'int32' as const },
|
||||
oldData: { field: 2, type: 'bytes' as const },
|
||||
buf: { field: 11, type: 'bytes' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const OnlineImageSchema = {
|
||||
guid: { field: 1, type: 'bytes' as const },
|
||||
filePath: { field: 2, type: 'bytes' as const },
|
||||
oldVerSendFile: { field: 3, type: 'bytes' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const NotOnlineImageSchema = {
|
||||
filePath: { field: 1, type: 'string' as const },
|
||||
fileLen: { field: 2, type: 'uint32' as const },
|
||||
downloadPath: { field: 3, type: 'string' as const },
|
||||
oldVerSendFile: { field: 4, type: 'bytes' as const },
|
||||
imgType: { field: 5, type: 'int32' as const },
|
||||
previewsImage: { field: 6, type: 'bytes' as const },
|
||||
picMd5: { field: 7, type: 'bytes' as const },
|
||||
picHeight: { field: 8, type: 'uint32' as const },
|
||||
picWidth: { field: 9, type: 'uint32' as const },
|
||||
resId: { field: 10, type: 'string' as const },
|
||||
flag: { field: 11, type: 'bytes' as const },
|
||||
thumbUrl: { field: 12, type: 'string' as const },
|
||||
original: { field: 13, type: 'int32' as const },
|
||||
bigUrl: { field: 14, type: 'string' as const },
|
||||
origUrl: { field: 15, type: 'string' as const },
|
||||
bizType: { field: 16, type: 'int32' as const },
|
||||
result: { field: 17, type: 'int32' as const },
|
||||
index: { field: 18, type: 'int32' as const },
|
||||
opFaceBuf: { field: 19, type: 'bytes' as const },
|
||||
oldPicMd5: { field: 20, type: 'bool' as const },
|
||||
thumbWidth: { field: 21, type: 'int32' as const },
|
||||
thumbHeight: { field: 22, type: 'int32' as const },
|
||||
fileId: { field: 23, type: 'int32' as const },
|
||||
showLen: { field: 24, type: 'uint32' as const },
|
||||
downloadLen: { field: 25, type: 'uint32' as const },
|
||||
x400Url: { field: 26, type: 'string' as const },
|
||||
x400Width: { field: 27, type: 'int32' as const },
|
||||
x400Height: { field: 28, type: 'int32' as const },
|
||||
pbRes: { field: 29, type: 'message' as const, schema: NotOnlineImagePbReserveSchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const TransElemSchema = {
|
||||
elemType: { field: 1, type: 'int32' as const },
|
||||
elemValue: { field: 2, type: 'bytes' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const MarketFaceSchema = {
|
||||
faceName: { field: 1, type: 'string' as const },
|
||||
itemType: { field: 2, type: 'uint32' as const },
|
||||
faceInfo: { field: 3, type: 'uint32' as const },
|
||||
faceId: { field: 4, type: 'bytes' as const },
|
||||
tabId: { field: 5, type: 'uint32' as const },
|
||||
subType: { field: 6, type: 'uint32' as const },
|
||||
key: { field: 7, type: 'bytes' as const },
|
||||
param: { field: 8, type: 'bytes' as const },
|
||||
mediaType: { field: 9, type: 'uint32' as const },
|
||||
imageWidth: { field: 10, type: 'uint32' as const },
|
||||
imageHeight: { field: 11, type: 'uint32' as const },
|
||||
mobileParam: { field: 12, type: 'bytes' as const },
|
||||
pbReserve: { field: 13, type: 'bytes' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const CustomFaceSchema = {
|
||||
guid: { field: 1, type: 'bytes' as const },
|
||||
filePath: { field: 2, type: 'string' as const },
|
||||
shortcut: { field: 3, type: 'string' as const },
|
||||
buffer: { field: 4, type: 'bytes' as const },
|
||||
flag: { field: 5, type: 'bytes' as const },
|
||||
oldData: { field: 6, type: 'bytes' as const },
|
||||
fileId: { field: 7, type: 'uint32' as const },
|
||||
serverIp: { field: 8, type: 'int32' as const },
|
||||
serverPort: { field: 9, type: 'int32' as const },
|
||||
fileType: { field: 10, type: 'int32' as const },
|
||||
signature: { field: 11, type: 'bytes' as const },
|
||||
useful: { field: 12, type: 'int32' as const },
|
||||
md5: { field: 13, type: 'bytes' as const },
|
||||
thumbUrl: { field: 14, type: 'string' as const },
|
||||
bigUrl: { field: 15, type: 'string' as const },
|
||||
origUrl: { field: 16, type: 'string' as const },
|
||||
bizType: { field: 17, type: 'int32' as const },
|
||||
repeatIndex: { field: 18, type: 'int32' as const },
|
||||
repeatImage: { field: 19, type: 'int32' as const },
|
||||
imageType: { field: 20, type: 'int32' as const },
|
||||
index: { field: 21, type: 'int32' as const },
|
||||
width: { field: 22, type: 'int32' as const },
|
||||
height: { field: 23, type: 'int32' as const },
|
||||
source: { field: 24, type: 'int32' as const },
|
||||
size: { field: 25, type: 'uint32' as const },
|
||||
origin: { field: 26, type: 'int32' as const },
|
||||
thumbWidth: { field: 27, type: 'int32' as const },
|
||||
thumbHeight: { field: 28, type: 'int32' as const },
|
||||
showLen: { field: 29, type: 'int32' as const },
|
||||
downloadLen: { field: 30, type: 'int32' as const },
|
||||
x400Url: { field: 31, type: 'string' as const },
|
||||
x400Width: { field: 32, type: 'int32' as const },
|
||||
x400Height: { field: 33, type: 'int32' as const },
|
||||
pbRes: { field: 34, type: 'message' as const, schema: CustomFacePbReserveSchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const RichMsgSchema = {
|
||||
template1: { field: 1, type: 'bytes' as const },
|
||||
serviceId: { field: 2, type: 'int32' as const },
|
||||
msgResId: { field: 3, type: 'bytes' as const },
|
||||
rand: { field: 4, type: 'int32' as const },
|
||||
seq: { field: 5, type: 'uint32' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const GroupFileElemSchema = {
|
||||
filename: { field: 1, type: 'string' as const },
|
||||
fileSize: { field: 2, type: 'uint64' as const },
|
||||
fileId: { field: 3, type: 'string' as const },
|
||||
batchId: { field: 4, type: 'string' as const },
|
||||
fileKey: { field: 5, type: 'string' as const },
|
||||
mark: { field: 6, type: 'bytes' as const },
|
||||
sequence: { field: 7, type: 'uint64' as const },
|
||||
batchItemId: { field: 8, type: 'bytes' as const },
|
||||
feedMsgTime: { field: 9, type: 'int32' as const },
|
||||
pbReserve: { field: 10, type: 'bytes' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const ExtraInfoSchema = {
|
||||
nick: { field: 1, type: 'bytes' as const },
|
||||
groupCard: { field: 2, type: 'bytes' as const },
|
||||
level: { field: 3, type: 'int32' as const },
|
||||
flags: { field: 4, type: 'int32' as const },
|
||||
groupMask: { field: 5, type: 'int32' as const },
|
||||
msgTailId: { field: 6, type: 'int32' as const },
|
||||
senderTitle: { field: 7, type: 'bytes' as const },
|
||||
apnsTips: { field: 8, type: 'bytes' as const },
|
||||
uin: { field: 9, type: 'uint64' as const },
|
||||
msgStateFlag: { field: 10, type: 'int32' as const },
|
||||
apnsSoundType: { field: 11, type: 'int32' as const },
|
||||
newGroupFlag: { field: 12, type: 'int32' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const VideoFileSchema = {
|
||||
fileUuid: { field: 1, type: 'string' as const },
|
||||
fileMd5: { field: 2, type: 'bytes' as const },
|
||||
fileName: { field: 3, type: 'string' as const },
|
||||
fileFormat: { field: 4, type: 'int32' as const },
|
||||
fileTime: { field: 5, type: 'int32' as const },
|
||||
fileSize: { field: 6, type: 'int32' as const },
|
||||
thumbWidth: { field: 7, type: 'int32' as const },
|
||||
thumbHeight: { field: 8, type: 'int32' as const },
|
||||
thumbFileMd5: { field: 9, type: 'bytes' as const },
|
||||
source: { field: 10, type: 'bytes' as const },
|
||||
thumbFileSize:{ field: 11, type: 'int32' as const },
|
||||
busiType: { field: 12, type: 'int32' as const },
|
||||
fromChatType: { field: 13, type: 'int32' as const },
|
||||
toChatType: { field: 14, type: 'int32' as const },
|
||||
supportProgressive: { field: 15, type: 'bool' as const },
|
||||
fileWidth: { field: 16, type: 'int32' as const },
|
||||
fileHeight: { field: 17, type: 'int32' as const },
|
||||
subBusiType: { field: 18, type: 'int32' as const },
|
||||
videoAttr: { field: 19, type: 'int32' as const },
|
||||
pbReserve: { field: 24, type: 'bytes' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const SrcMsgSchema = {
|
||||
origSeqs: { field: 1, type: 'repeated_uint32' as const },
|
||||
senderUin: { field: 2, type: 'uint64' as const },
|
||||
time: { field: 3, type: 'int32' as const },
|
||||
flag: { field: 4, type: 'int32' as const },
|
||||
elemsRaw: { field: 5, type: 'repeated_bytes' as const },
|
||||
type: { field: 6, type: 'int32' as const },
|
||||
richMsg: { field: 7, type: 'bytes' as const },
|
||||
pbReserve: { field: 8, type: 'bytes' as const },
|
||||
sourceMsg: { field: 9, type: 'bytes' as const },
|
||||
toUin: { field: 10, type: 'uint64' as const },
|
||||
troopName: { field: 11, type: 'bytes' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const LightAppElemSchema = {
|
||||
data: { field: 1, type: 'bytes' as const },
|
||||
msgResid: { field: 2, type: 'bytes' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const CommonElemSchema = {
|
||||
serviceType: { field: 1, type: 'int32' as const },
|
||||
pbElem: { field: 2, type: 'bytes' as const },
|
||||
businessType: { field: 3, type: 'uint32' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const GeneralFlagsSchema = {
|
||||
bubbleDiyTextId: { field: 1, type: 'int32' as const },
|
||||
groupFlagNew: { field: 2, type: 'int32' as const },
|
||||
uin: { field: 3, type: 'uint64' as const },
|
||||
longTextFlag: { field: 6, type: 'int32' as const },
|
||||
longTextResId: { field: 7, type: 'string' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
// --- Elem (union of all element types) ---
|
||||
|
||||
export const ElemSchema = {
|
||||
text: { field: 1, type: 'message' as const, schema: TextElemSchema },
|
||||
face: { field: 2, type: 'message' as const, schema: FaceElemSchema },
|
||||
onlineImage: { field: 3, type: 'message' as const, schema: OnlineImageSchema },
|
||||
notOnlineImage: { field: 4, type: 'message' as const, schema: NotOnlineImageSchema },
|
||||
transElem: { field: 5, type: 'message' as const, schema: TransElemSchema },
|
||||
marketFace: { field: 6, type: 'message' as const, schema: MarketFaceSchema },
|
||||
customFace: { field: 8, type: 'message' as const, schema: CustomFaceSchema },
|
||||
richMsg: { field: 12, type: 'message' as const, schema: RichMsgSchema },
|
||||
groupFile: { field: 13, type: 'message' as const, schema: GroupFileElemSchema },
|
||||
extraInfo: { field: 16, type: 'message' as const, schema: ExtraInfoSchema },
|
||||
videoFile: { field: 19, type: 'message' as const, schema: VideoFileSchema },
|
||||
generalFlags: { field: 37, type: 'message' as const, schema: GeneralFlagsSchema },
|
||||
srcMsg: { field: 45, type: 'message' as const, schema: SrcMsgSchema },
|
||||
lightApp: { field: 51, type: 'message' as const, schema: LightAppElemSchema },
|
||||
commonElem: { field: 53, type: 'message' as const, schema: CommonElemSchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
// --- Extra decode types (for CommonElem.pbElem sub-messages) ---
|
||||
|
||||
export const MentionExtraSchema = {
|
||||
type: { field: 3, type: 'int32' as const },
|
||||
uin: { field: 4, type: 'uint32' as const },
|
||||
field5: { field: 5, type: 'int32' as const },
|
||||
uid: { field: 9, type: 'string' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const QFaceExtraSchema = {
|
||||
packId: { field: 1, type: 'string' as const },
|
||||
stickerId: { field: 2, type: 'string' as const },
|
||||
qsid: { field: 3, type: 'int32' as const },
|
||||
sourceType: { field: 4, type: 'int32' as const },
|
||||
stickerType: { field: 5, type: 'int32' as const },
|
||||
resultId: { field: 6, type: 'string' as const },
|
||||
text: { field: 7, type: 'string' as const },
|
||||
randomType: { field: 9, type: 'int32' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const QSmallFaceExtraSchema = {
|
||||
faceId: { field: 1, type: 'uint32' as const },
|
||||
preview: { field: 2, type: 'string' as const },
|
||||
preview2: { field: 3, type: 'string' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
// --- NTQQ MsgInfo types (CommonElem service_type 48) ---
|
||||
|
||||
export const FileTypeSchema = {
|
||||
type: { field: 1, type: 'uint32' as const },
|
||||
picFormat: { field: 2, type: 'uint32' as const },
|
||||
videoFormat: { field: 3, type: 'uint32' as const },
|
||||
voiceFormat: { field: 4, type: 'uint32' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const FileInfoSchema = {
|
||||
fileSize: { field: 1, type: 'uint32' as const },
|
||||
fileHash: { field: 2, type: 'string' as const },
|
||||
fileSha1: { field: 3, type: 'string' as const },
|
||||
fileName: { field: 4, type: 'string' as const },
|
||||
type: { field: 5, type: 'message' as const, schema: FileTypeSchema },
|
||||
width: { field: 6, type: 'uint32' as const },
|
||||
height: { field: 7, type: 'uint32' as const },
|
||||
time: { field: 8, type: 'uint32' as const },
|
||||
original: { field: 9, type: 'uint32' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const IndexNodeSchema = {
|
||||
info: { field: 1, type: 'message' as const, schema: FileInfoSchema },
|
||||
fileUuid: { field: 2, type: 'string' as const },
|
||||
storeId: { field: 3, type: 'uint32' as const },
|
||||
uploadTime: { field: 4, type: 'uint32' as const },
|
||||
ttl: { field: 5, type: 'uint32' as const },
|
||||
subType: { field: 6, type: 'uint32' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const PicUrlExtInfoSchema = {
|
||||
originalParameter: { field: 1, type: 'string' as const },
|
||||
bigParameter: { field: 2, type: 'string' as const },
|
||||
thumbParameter: { field: 3, type: 'string' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const PictureInfoSchema = {
|
||||
urlPath: { field: 1, type: 'string' as const },
|
||||
ext: { field: 2, type: 'message' as const, schema: PicUrlExtInfoSchema },
|
||||
domain: { field: 3, type: 'string' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const PicExtDataSchema = {
|
||||
subType: { field: 1, type: 'uint32' as const },
|
||||
textSummary: { field: 9, type: 'string' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const PicExtBizInfoSchema = {
|
||||
bizType: { field: 1, type: 'uint32' as const },
|
||||
textSummary: { field: 2, type: 'string' as const },
|
||||
bytesPbReserveC2c: { field: 11, type: 'bytes' as const },
|
||||
extData: { field: 12, type: 'message' as const, schema: PicExtDataSchema },
|
||||
fromScene: { field: 1001, type: 'uint32' as const },
|
||||
toScene: { field: 1002, type: 'uint32' as const },
|
||||
oldFileId: { field: 1003, type: 'uint32' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const VideoExtBizInfoSchema = {
|
||||
fromScene: { field: 1, type: 'uint32' as const },
|
||||
toScene: { field: 2, type: 'uint32' as const },
|
||||
bytesPbReserve: { field: 3, type: 'bytes' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const PttExtBizInfoSchema = {
|
||||
srcUin: { field: 1, type: 'uint64' as const },
|
||||
pttScene: { field: 2, type: 'uint32' as const },
|
||||
pttType: { field: 3, type: 'uint32' as const },
|
||||
changeVoice: { field: 4, type: 'uint32' as const },
|
||||
waveform: { field: 5, type: 'bytes' as const },
|
||||
autoConvertText: { field: 6, type: 'uint32' as const },
|
||||
bytesReserve: { field: 11, type: 'bytes' as const },
|
||||
bytesPbReserve: { field: 12, type: 'bytes' as const },
|
||||
bytesGeneralFlags: { field: 13, type: 'bytes' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const ExtBizInfoSchema = {
|
||||
pic: { field: 1, type: 'message' as const, schema: PicExtBizInfoSchema },
|
||||
video: { field: 2, type: 'message' as const, schema: VideoExtBizInfoSchema },
|
||||
ptt: { field: 3, type: 'message' as const, schema: PttExtBizInfoSchema },
|
||||
busiType: { field: 10, type: 'uint32' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const C2cSourceSchema = {
|
||||
friendUid: { field: 2, type: 'string' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const TroopSourceSchema = {
|
||||
groupUin: { field: 1, type: 'uint32' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const HashSumSchema = {
|
||||
bytesPbReserveC2c: { field: 201, type: 'message' as const, schema: C2cSourceSchema },
|
||||
troopSource: { field: 202, type: 'message' as const, schema: TroopSourceSchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const MsgInfoBodySchema = {
|
||||
index: { field: 1, type: 'message' as const, schema: IndexNodeSchema },
|
||||
picture: { field: 2, type: 'message' as const, schema: PictureInfoSchema },
|
||||
fileExist: { field: 5, type: 'bool' as const },
|
||||
hashSum: { field: 6, type: 'message' as const, schema: HashSumSchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const MsgInfoSchema = {
|
||||
msgInfoBody: { field: 1, type: 'repeated_message' as const, schema: MsgInfoBodySchema },
|
||||
extBizInfo: { field: 2, type: 'message' as const, schema: ExtBizInfoSchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
// --- GroupFileExtra (TransElem type=24) ---
|
||||
|
||||
// Field numbers cross-checked against NapCat (component.ts:146) +
|
||||
// acidify (GroupFileExtra.kt:Inner.Info). Old schema had fileSha at 5
|
||||
// / extInfoString at 6 / fileMd5 at 7 which mismatched the real wire
|
||||
// shape — the server rejected the chat post with `result=79` because
|
||||
// fileSha bytes were landing where it expected a uint32 (field 5).
|
||||
// See proton/element.ts for the WHY comment.
|
||||
export const GroupFileInfoSchema = {
|
||||
busId: { field: 1, type: 'uint32' as const },
|
||||
fileId: { field: 2, type: 'string' as const },
|
||||
fileSize: { field: 3, type: 'uint64' as const },
|
||||
fileName: { field: 4, type: 'string' as const },
|
||||
field5: { field: 5, type: 'uint32' as const },
|
||||
fileSha: { field: 6, type: 'bytes' as const },
|
||||
extInfoString: { field: 7, type: 'string' as const },
|
||||
fileMd5: { field: 8, type: 'bytes' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const GroupFileExtraInnerSchema = {
|
||||
info: { field: 2, type: 'message' as const, schema: GroupFileInfoSchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const GroupFileExtraSchema = {
|
||||
field1: { field: 1, type: 'uint32' as const },
|
||||
fileName: { field: 2, type: 'string' as const },
|
||||
display: { field: 3, type: 'string' as const },
|
||||
inner: { field: 7, type: 'message' as const, schema: GroupFileExtraInnerSchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
// --- Preserve (for message receipt info) ---
|
||||
|
||||
export const PreserveSchema = {
|
||||
messageId: { field: 3, type: 'uint64' as const },
|
||||
senderUid: { field: 6, type: 'string' as const },
|
||||
receiverUid: { field: 7, type: 'string' as const },
|
||||
clientSequence: { field: 8, type: 'uint32' as const },
|
||||
} satisfies ProtoSchema;
|
||||
@@ -1,343 +0,0 @@
|
||||
// Proto schemas for highway upload protocol.
|
||||
// Port of src/bridge/include/bridge/proto/highway.h + action.h (HttpConn)
|
||||
|
||||
import type { ProtoSchema } from '../../protobuf/decode';
|
||||
import {
|
||||
IndexNodeSchema,
|
||||
PictureInfoSchema,
|
||||
HashSumSchema,
|
||||
PicExtBizInfoSchema,
|
||||
VideoExtBizInfoSchema,
|
||||
PttExtBizInfoSchema,
|
||||
} from '../proto/element';
|
||||
|
||||
// --- DataHighwayHead ---
|
||||
|
||||
export const DataHighwayHeadSchema = {
|
||||
version: { field: 1, type: 'uint32' as const },
|
||||
uin: { field: 2, type: 'string' as const },
|
||||
command: { field: 3, type: 'string' as const },
|
||||
seq: { field: 4, type: 'uint32' as const },
|
||||
retryTimes:{ field: 5, type: 'uint32' as const },
|
||||
appId: { field: 6, type: 'uint32' as const },
|
||||
dataFlag: { field: 7, type: 'uint32' as const },
|
||||
commandId: { field: 8, type: 'uint32' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const SegHeadSchema = {
|
||||
serviceId: { field: 1, type: 'uint32' as const },
|
||||
filesize: { field: 2, type: 'uint64' as const },
|
||||
dataOffset: { field: 3, type: 'uint64' as const },
|
||||
dataLength: { field: 4, type: 'uint32' as const },
|
||||
retCode: { field: 5, type: 'uint32' as const },
|
||||
serviceTicket: { field: 6, type: 'bytes' as const },
|
||||
flag: { field: 7, type: 'uint32' as const },
|
||||
md5: { field: 8, type: 'bytes' as const },
|
||||
fileMd5: { field: 9, type: 'bytes' as const },
|
||||
cacheAddr: { field: 10, type: 'uint32' as const },
|
||||
cachePort: { field: 13, type: 'uint32' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const LoginSigHeadSchema = {
|
||||
loginSigType: { field: 1, type: 'uint32' as const },
|
||||
appId: { field: 3, type: 'uint32' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const ReqDataHighwayHeadSchema = {
|
||||
msgBaseHead: { field: 1, type: 'message' as const, schema: DataHighwayHeadSchema },
|
||||
msgSegHead: { field: 2, type: 'message' as const, schema: SegHeadSchema },
|
||||
bytesReqExtendInfo: { field: 3, type: 'bytes' as const },
|
||||
timestamp: { field: 4, type: 'uint64' as const },
|
||||
msgLoginSigHead: { field: 5, type: 'message' as const, schema: LoginSigHeadSchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const RespDataHighwayHeadSchema = {
|
||||
msgBaseHead: { field: 1, type: 'message' as const, schema: DataHighwayHeadSchema },
|
||||
msgSegHead: { field: 2, type: 'message' as const, schema: SegHeadSchema },
|
||||
errorCode: { field: 3, type: 'uint32' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
// --- Highway extend (NTV2RichMediaHighwayExt) ---
|
||||
|
||||
export const HighwayDomainSchema = {
|
||||
isEnable: { field: 1, type: 'bool' as const },
|
||||
ip: { field: 2, type: 'string' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const HighwayIPv4Schema = {
|
||||
domain: { field: 1, type: 'message' as const, schema: HighwayDomainSchema },
|
||||
port: { field: 2, type: 'uint32' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const HighwayNetworkSchema = {
|
||||
ipv4s: { field: 1, type: 'repeated_message' as const, schema: HighwayIPv4Schema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const HighwayHashSchema = {
|
||||
fileSha1: { field: 1, type: 'repeated_bytes' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const HighwayMsgInfoBodySchema = {
|
||||
index: { field: 1, type: 'message' as const, schema: IndexNodeSchema },
|
||||
picture: { field: 2, type: 'message' as const, schema: PictureInfoSchema },
|
||||
fileExist: { field: 5, type: 'bool' as const },
|
||||
hashSum: { field: 6, type: 'message' as const, schema: HashSumSchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const NTV2RichMediaHighwayExtSchema = {
|
||||
fileUuid: { field: 1, type: 'string' as const },
|
||||
uKey: { field: 2, type: 'string' as const },
|
||||
network: { field: 5, type: 'message' as const, schema: HighwayNetworkSchema },
|
||||
msgInfoBody: { field: 6, type: 'repeated_message' as const, schema: HighwayMsgInfoBodySchema },
|
||||
blockSize: { field: 10, type: 'uint32' as const },
|
||||
hash: { field: 11, type: 'message' as const, schema: HighwayHashSchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
// --- File upload extend (group/private file highway) ---
|
||||
|
||||
export const FileUploadUrlSchema = {
|
||||
unknown: { field: 1, type: 'int32' as const },
|
||||
host: { field: 2, type: 'string' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const FileUploadHostSchema = {
|
||||
url: { field: 1, type: 'message' as const, schema: FileUploadUrlSchema },
|
||||
port: { field: 2, type: 'uint32' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const FileUploadHostConfigSchema = {
|
||||
hosts: { field: 200, type: 'repeated_message' as const, schema: FileUploadHostSchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const FileUploadNameInfoSchema = {
|
||||
fileName: { field: 100, type: 'string' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const FileUploadClientInfoSchema = {
|
||||
clientType: { field: 100, type: 'int32' as const },
|
||||
appId: { field: 200, type: 'string' as const },
|
||||
terminalType: { field: 300, type: 'int32' as const },
|
||||
clientVer: { field: 400, type: 'string' as const },
|
||||
unknown: { field: 600, type: 'int32' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const FileUploadFileEntrySchema = {
|
||||
fileSize: { field: 100, type: 'uint64' as const },
|
||||
md5: { field: 200, type: 'bytes' as const },
|
||||
checkKey: { field: 300, type: 'bytes' as const },
|
||||
md5S2: { field: 400, type: 'bytes' as const },
|
||||
fileId: { field: 600, type: 'string' as const },
|
||||
uploadKey: { field: 700, type: 'bytes' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const FileUploadBusiInfoSchema = {
|
||||
busId: { field: 1, type: 'int32' as const },
|
||||
senderUin: { field: 100, type: 'uint64' as const },
|
||||
receiverUin: { field: 200, type: 'uint64' as const },
|
||||
groupCode: { field: 400, type: 'uint64' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const FileUploadEntrySchema = {
|
||||
busiBuff: { field: 100, type: 'message' as const, schema: FileUploadBusiInfoSchema },
|
||||
fileEntry: { field: 200, type: 'message' as const, schema: FileUploadFileEntrySchema },
|
||||
clientInfo: { field: 300, type: 'message' as const, schema: FileUploadClientInfoSchema },
|
||||
fileNameInfo: { field: 400, type: 'message' as const, schema: FileUploadNameInfoSchema },
|
||||
host: { field: 500, type: 'message' as const, schema: FileUploadHostConfigSchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const FileUploadExtSchema = {
|
||||
unknown1: { field: 1, type: 'int32' as const },
|
||||
unknown2: { field: 2, type: 'int32' as const },
|
||||
unknown3: { field: 3, type: 'int32' as const },
|
||||
entry: { field: 100, type: 'message' as const, schema: FileUploadEntrySchema },
|
||||
unknown200: { field: 200, type: 'int32' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
// --- Encodable MsgInfo (for embedding in message element) ---
|
||||
|
||||
export const EncodableMediaExtBizInfoSchema = {
|
||||
pic: { field: 1, type: 'message' as const, schema: PicExtBizInfoSchema },
|
||||
video: { field: 2, type: 'message' as const, schema: VideoExtBizInfoSchema },
|
||||
ptt: { field: 3, type: 'message' as const, schema: PttExtBizInfoSchema },
|
||||
busiType: { field: 10, type: 'uint32' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const EncodableMediaMsgInfoSchema = {
|
||||
msgInfoBody: { field: 1, type: 'repeated_message' as const, schema: HighwayMsgInfoBodySchema },
|
||||
extBizInfo: { field: 2, type: 'message' as const, schema: EncodableMediaExtBizInfoSchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
// --- HttpConn.0x6ff_501 (highway session) ---
|
||||
|
||||
export const HttpConnSchema = {
|
||||
field1: { field: 1, type: 'int32' as const },
|
||||
field2: { field: 2, type: 'int32' as const },
|
||||
field3: { field: 3, type: 'int32' as const },
|
||||
field4: { field: 4, type: 'int32' as const },
|
||||
field6: { field: 6, type: 'int32' as const },
|
||||
serviceTypes: { field: 7, type: 'repeated_uint32' as const },
|
||||
field9: { field: 9, type: 'int32' as const },
|
||||
field10: { field: 10, type: 'int32' as const },
|
||||
field11: { field: 11, type: 'int32' as const },
|
||||
ver: { field: 15, type: 'string' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const HttpConn0x6FF501RequestSchema = {
|
||||
httpConn: { field: 0x501, type: 'message' as const, schema: HttpConnSchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const ServerAddrSchema = {
|
||||
type: { field: 1, type: 'uint32' as const },
|
||||
ip: { field: 2, type: 'uint32' as const }, // fixed32 as uint32
|
||||
port: { field: 3, type: 'uint32' as const },
|
||||
area: { field: 4, type: 'uint32' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const ServerInfoSchema = {
|
||||
serviceType: { field: 1, type: 'uint32' as const },
|
||||
serverAddrs: { field: 2, type: 'repeated_message' as const, schema: ServerAddrSchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const HttpConnResponseSchema = {
|
||||
sigSession: { field: 1, type: 'bytes' as const },
|
||||
sessionKey: { field: 2, type: 'bytes' as const },
|
||||
serverInfos: { field: 3, type: 'repeated_message' as const, schema: ServerInfoSchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const HttpConn0x6FF501ResponseSchema = {
|
||||
httpConn: { field: 0x501, type: 'message' as const, schema: HttpConnResponseSchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
// --- NTV2 Upload Request (for OIDB 0x11C4/0x11C5) ---
|
||||
|
||||
export const NTV2FileTypeSchema = {
|
||||
type: { field: 1, type: 'uint32' as const },
|
||||
picFormat: { field: 2, type: 'uint32' as const },
|
||||
videoFormat: { field: 3, type: 'uint32' as const },
|
||||
voiceFormat: { field: 4, type: 'uint32' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const NTV2FileInfoSchema = {
|
||||
fileSize: { field: 1, type: 'uint32' as const },
|
||||
fileHash: { field: 2, type: 'string' as const },
|
||||
fileSha1: { field: 3, type: 'string' as const },
|
||||
fileName: { field: 4, type: 'string' as const },
|
||||
type: { field: 5, type: 'message' as const, schema: NTV2FileTypeSchema },
|
||||
width: { field: 6, type: 'uint32' as const },
|
||||
height: { field: 7, type: 'uint32' as const },
|
||||
time: { field: 8, type: 'uint32' as const },
|
||||
original: { field: 9, type: 'uint32' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const NTV2UploadInfoSchema = {
|
||||
fileInfo: { field: 1, type: 'message' as const, schema: NTV2FileInfoSchema },
|
||||
subFileType: { field: 2, type: 'uint32' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
// The NTV2 upload request + response carry the same ExtBizInfo shape that
|
||||
// element-side incoming-message decoding uses. Pulling those schemas in
|
||||
// directly (instead of redefining stub copies) keeps the round-trip
|
||||
// `server response → finalizeMediaMsgInfo → commonElem.pbElem` from
|
||||
// silently dropping fields the QQ NT server later validates against —
|
||||
// the video `fromScene`/`toScene` drop was already responsible for c2c
|
||||
// `result=79` rejections on `send_private_msg [{type:'video'}]`.
|
||||
export const NTV2ExtBizInfoSchema = {
|
||||
pic: { field: 1, type: 'message' as const, schema: PicExtBizInfoSchema },
|
||||
video: { field: 2, type: 'message' as const, schema: VideoExtBizInfoSchema },
|
||||
ptt: { field: 3, type: 'message' as const, schema: PttExtBizInfoSchema },
|
||||
busiType: { field: 10, type: 'uint32' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const NTV2UploadReqSchema = {
|
||||
uploadInfo: { field: 1, type: 'repeated_message' as const, schema: NTV2UploadInfoSchema },
|
||||
tryFastUploadCompleted: { field: 2, type: 'bool' as const },
|
||||
srvSendMsg: { field: 3, type: 'bool' as const },
|
||||
clientRandomId: { field: 4, type: 'uint64' as const },
|
||||
compatQmsgSceneType: { field: 5, type: 'uint32' as const },
|
||||
extBizInfo: { field: 6, type: 'message' as const, schema: NTV2ExtBizInfoSchema },
|
||||
clientSeq: { field: 7, type: 'uint32' as const },
|
||||
noNeedCompatMsg: { field: 8, type: 'bool' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const NTV2C2CUserInfoSchema = {
|
||||
accountType: { field: 1, type: 'uint32' as const },
|
||||
targetUid: { field: 2, type: 'string' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const NTV2GroupInfoSchema = {
|
||||
groupUin: { field: 1, type: 'uint32' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const NTV2UploadSceneInfoSchema = {
|
||||
requestType: { field: 101, type: 'uint32' as const },
|
||||
businessType: { field: 102, type: 'uint32' as const },
|
||||
sceneType: { field: 200, type: 'uint32' as const },
|
||||
c2c: { field: 201, type: 'message' as const, schema: NTV2C2CUserInfoSchema },
|
||||
group: { field: 202, type: 'message' as const, schema: NTV2GroupInfoSchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const NTV2CommonHeadSchema = {
|
||||
requestId: { field: 1, type: 'uint32' as const },
|
||||
command: { field: 2, type: 'uint32' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const NTV2ClientMetaSchema = {
|
||||
agentType: { field: 1, type: 'uint32' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const NTV2UploadReqHeadSchema = {
|
||||
common: { field: 1, type: 'message' as const, schema: NTV2CommonHeadSchema },
|
||||
scene: { field: 2, type: 'message' as const, schema: NTV2UploadSceneInfoSchema },
|
||||
client: { field: 3, type: 'message' as const, schema: NTV2ClientMetaSchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const NTV2UploadRichMediaReqSchema = {
|
||||
reqHead: { field: 1, type: 'message' as const, schema: NTV2UploadReqHeadSchema },
|
||||
upload: { field: 2, type: 'message' as const, schema: NTV2UploadReqSchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
// --- NTV2 Upload Response ---
|
||||
|
||||
export const NTV2IPv4Schema = {
|
||||
outIp: { field: 1, type: 'uint32' as const },
|
||||
outPort: { field: 2, type: 'uint32' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const NTV2SubFileInfoRespSchema = {
|
||||
subType: { field: 1, type: 'uint32' as const },
|
||||
uKey: { field: 2, type: 'string' as const },
|
||||
uKeyTtl: { field: 3, type: 'uint32' as const },
|
||||
ipv4s: { field: 4, type: 'repeated_message' as const, schema: NTV2IPv4Schema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const NTV2UploadRespMsgInfoSchema = {
|
||||
msgInfoBody: { field: 1, type: 'repeated_message' as const, schema: HighwayMsgInfoBodySchema },
|
||||
extBizInfo: { field: 2, type: 'message' as const, schema: NTV2ExtBizInfoSchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const NTV2UploadRespBodySchema = {
|
||||
uKey: { field: 1, type: 'string' as const },
|
||||
uKeyTtl: { field: 2, type: 'uint32' as const },
|
||||
ipv4s: { field: 3, type: 'repeated_message' as const, schema: NTV2IPv4Schema },
|
||||
msgSeq: { field: 5, type: 'uint64' as const },
|
||||
msgInfo: { field: 6, type: 'message' as const, schema: NTV2UploadRespMsgInfoSchema },
|
||||
subFileInfos: { field: 10, type: 'repeated_message' as const, schema: NTV2SubFileInfoRespSchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const NTV2UploadRespHeadSchema = {
|
||||
common: { field: 1, type: 'message' as const, schema: NTV2CommonHeadSchema },
|
||||
retCode: { field: 2, type: 'uint32' as const },
|
||||
message: { field: 3, type: 'string' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const NTV2UploadRichMediaRespSchema = {
|
||||
respHead: { field: 1, type: 'message' as const, schema: NTV2UploadRespHeadSchema },
|
||||
upload: { field: 2, type: 'message' as const, schema: NTV2UploadRespBodySchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
// (The legacy `GroupAvatarUploadExtSchema` definition that briefly
|
||||
// lived here in PR #31 was removed: it was a residual artifact of an
|
||||
// alternative `setGroupAvatar` implementation that got dropped during
|
||||
// review — the canonical Lagrange-derived `GroupAvatarExtraSchema`
|
||||
// further up this file is the one `actions/profile.setGroupAvatar`
|
||||
// actually uses.)
|
||||
@@ -1,68 +0,0 @@
|
||||
import type { ProtoSchema } from '../../protobuf/decode';
|
||||
import { PushMsgBodySchema } from './message';
|
||||
|
||||
export const LongMsgUidSchema = {
|
||||
uid: { field: 2, type: 'string' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const LongMsgSettingsSchema = {
|
||||
field1: { field: 1, type: 'uint32' as const },
|
||||
field2: { field: 2, type: 'uint32' as const },
|
||||
field3: { field: 3, type: 'uint32' as const },
|
||||
field4: { field: 4, type: 'uint32' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const SendLongMsgInfoSchema = {
|
||||
type: { field: 1, type: 'uint32' as const },
|
||||
uid: { field: 2, type: 'message' as const, schema: LongMsgUidSchema },
|
||||
groupUin: { field: 3, type: 'uint32' as const },
|
||||
payload: { field: 4, type: 'bytes' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const SendLongMsgReqSchema = {
|
||||
info: { field: 2, type: 'message' as const, schema: SendLongMsgInfoSchema },
|
||||
settings: { field: 15, type: 'message' as const, schema: LongMsgSettingsSchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const SendLongMsgRespResultSchema = {
|
||||
resId: { field: 3, type: 'string' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const SendLongMsgRespSchema = {
|
||||
result: { field: 2, type: 'message' as const, schema: SendLongMsgRespResultSchema },
|
||||
settings: { field: 15, type: 'message' as const, schema: LongMsgSettingsSchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const RecvLongMsgInfoSchema = {
|
||||
uid: { field: 1, type: 'message' as const, schema: LongMsgUidSchema },
|
||||
resId: { field: 2, type: 'string' as const },
|
||||
acquire: { field: 3, type: 'bool' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const RecvLongMsgReqSchema = {
|
||||
info: { field: 1, type: 'message' as const, schema: RecvLongMsgInfoSchema },
|
||||
settings: { field: 15, type: 'message' as const, schema: LongMsgSettingsSchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const RecvLongMsgRespResultSchema = {
|
||||
resId: { field: 3, type: 'string' as const },
|
||||
payload: { field: 4, type: 'bytes' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const RecvLongMsgRespSchema = {
|
||||
result: { field: 1, type: 'message' as const, schema: RecvLongMsgRespResultSchema },
|
||||
settings: { field: 15, type: 'message' as const, schema: LongMsgSettingsSchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const LongMsgContentSchema = {
|
||||
msgBody: { field: 1, type: 'repeated_message' as const, schema: PushMsgBodySchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const LongMsgActionSchema = {
|
||||
actionCommand: { field: 1, type: 'string' as const },
|
||||
actionData: { field: 2, type: 'message' as const, schema: LongMsgContentSchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const LongMsgResultSchema = {
|
||||
action: { field: 2, type: 'repeated_message' as const, schema: LongMsgActionSchema },
|
||||
} satisfies ProtoSchema;
|
||||
@@ -1,120 +0,0 @@
|
||||
// Proto schemas for message envelopes (PushMsg).
|
||||
// Port of src/bridge/include/bridge/proto/message.h
|
||||
|
||||
import type { ProtoSchema } from '../../protobuf/decode';
|
||||
import { ElemSchema } from './element';
|
||||
|
||||
// --- ResponseHead.Grp ---
|
||||
|
||||
export const ResponseGrpSchema = {
|
||||
groupUin: { field: 1, type: 'uint32' as const },
|
||||
memberName: { field: 2, type: 'string' as const },
|
||||
groupName: { field: 4, type: 'string' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const ResponseForwardSchema = {
|
||||
friendName: { field: 6, type: 'string' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
// --- ResponseHead ---
|
||||
|
||||
export const ResponseHeadSchema = {
|
||||
fromUin: { field: 1, type: 'uint32' as const },
|
||||
fromUid: { field: 2, type: 'string' as const },
|
||||
type: { field: 3, type: 'uint32' as const },
|
||||
sigMap: { field: 4, type: 'uint32' as const },
|
||||
toUin: { field: 5, type: 'uint32' as const },
|
||||
toUid: { field: 6, type: 'string' as const },
|
||||
forward: { field: 7, type: 'message' as const, schema: ResponseForwardSchema },
|
||||
grp: { field: 8, type: 'message' as const, schema: ResponseGrpSchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
// --- ContentHead ---
|
||||
|
||||
export const ContentHeadSchema = {
|
||||
msgType: { field: 1, type: 'uint32' as const },
|
||||
subType: { field: 2, type: 'uint32' as const },
|
||||
divSeq: { field: 3, type: 'uint32' as const },
|
||||
msgId: { field: 4, type: 'uint32' as const },
|
||||
sequence: { field: 5, type: 'uint32' as const },
|
||||
timestamp: { field: 6, type: 'uint32' as const },
|
||||
field7: { field: 7, type: 'uint64' as const },
|
||||
newId: { field: 12, type: 'uint64' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
// --- Ptt (voice) ---
|
||||
|
||||
export const PttSchema = {
|
||||
fileType: { field: 1, type: 'uint32' as const },
|
||||
fileId: { field: 2, type: 'uint64' as const },
|
||||
fileUuid: { field: 3, type: 'bytes' as const },
|
||||
fileMd5: { field: 4, type: 'bytes' as const },
|
||||
fileName: { field: 5, type: 'string' as const },
|
||||
fileSize: { field: 6, type: 'uint32' as const },
|
||||
groupFileKey: { field: 10, type: 'string' as const },
|
||||
fileKey: { field: 14, type: 'bytes' as const },
|
||||
time: { field: 19, type: 'uint32' as const },
|
||||
format: { field: 29, type: 'uint32' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
// --- NotOnlineFile (C2C file) ---
|
||||
|
||||
// Field numbers per `dev/Lagrange.Core/.../Component/NotOnlineFile.cs`.
|
||||
// fields 9 (subcmd), 50 (dangerEvel), 55 (expireTime) are required
|
||||
// on c2c file SEND (the receiver ignores them); the identification
|
||||
// fields (1/3/4/5/6/57) are read both directions.
|
||||
export const NotOnlineFileSchema = {
|
||||
fileType: { field: 1, type: 'uint32' as const },
|
||||
fileUuid: { field: 3, type: 'string' as const },
|
||||
fileMd5: { field: 4, type: 'bytes' as const },
|
||||
fileName: { field: 5, type: 'string' as const },
|
||||
fileSize: { field: 6, type: 'uint64' as const },
|
||||
subcmd: { field: 9, type: 'uint32' as const },
|
||||
dangerEvel: { field: 50, type: 'uint32' as const },
|
||||
expireTime: { field: 55, type: 'uint32' as const },
|
||||
fileHash: { field: 57, type: 'string' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
// --- RichText ---
|
||||
|
||||
export const RichTextSchema = {
|
||||
elems: { field: 2, type: 'repeated_message' as const, schema: ElemSchema },
|
||||
notOnlineFile: { field: 3, type: 'message' as const, schema: NotOnlineFileSchema },
|
||||
ptt: { field: 4, type: 'message' as const, schema: PttSchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
// --- MessageBody ---
|
||||
|
||||
export const MessageBodySchema = {
|
||||
richText: { field: 1, type: 'message' as const, schema: RichTextSchema },
|
||||
msgContent: { field: 2, type: 'bytes' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
// --- FileExtra (for C2C file in msg_content) ---
|
||||
//
|
||||
// `FileExtra { file: NotOnlineFile }` is the wrapper QQ-NT actually
|
||||
// uses at `MessageBody.msgContent` for c2c file sends. The previous
|
||||
// `FileExtraInfoSchema` had fileSize=1, fileName=2, fileMd5=3,
|
||||
// fileUuid=4, fileHash=5 — every field at the wrong tag, so received
|
||||
// c2c-file payloads silently failed to parse. Consolidated to the
|
||||
// shared `NotOnlineFileSchema` (Lagrange.Core's `FileExtra.cs` does
|
||||
// the same — `[ProtoMember(1)] public NotOnlineFile? File`).
|
||||
|
||||
export const FileExtraSchema = {
|
||||
file: { field: 1, type: 'message' as const, schema: NotOnlineFileSchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
// --- PushMsgBody ---
|
||||
|
||||
export const PushMsgBodySchema = {
|
||||
responseHead: { field: 1, type: 'message' as const, schema: ResponseHeadSchema },
|
||||
contentHead: { field: 2, type: 'message' as const, schema: ContentHeadSchema },
|
||||
body: { field: 3, type: 'message' as const, schema: MessageBodySchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
// --- PushMsg (top-level) ---
|
||||
|
||||
export const PushMsgSchema = {
|
||||
message: { field: 1, type: 'message' as const, schema: PushMsgBodySchema },
|
||||
status: { field: 3, type: 'int32' as const },
|
||||
} satisfies ProtoSchema;
|
||||
@@ -1,245 +0,0 @@
|
||||
// Proto schemas for notification types.
|
||||
// Port of src/bridge/include/bridge/proto/notify.h
|
||||
|
||||
import type { ProtoSchema } from '../../protobuf/decode';
|
||||
|
||||
export const OperatorField1Schema = {
|
||||
uid: { field: 1, type: 'string' as const },
|
||||
field2: { field: 2, type: 'uint32' as const },
|
||||
field3: { field: 3, type: 'bytes' as const },
|
||||
field4: { field: 4, type: 'uint32' as const },
|
||||
field5: { field: 5, type: 'bytes' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const OperatorInfoSchema = {
|
||||
operatorField: { field: 1, type: 'message' as const, schema: OperatorField1Schema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const GroupChangeSchema = {
|
||||
groupUin: { field: 1, type: 'uint32' as const },
|
||||
flag: { field: 2, type: 'uint32' as const },
|
||||
memberUid: { field: 3, type: 'string' as const },
|
||||
decreaseType: { field: 4, type: 'uint32' as const },
|
||||
operatorBytes: { field: 5, type: 'bytes' as const },
|
||||
increaseType: { field: 6, type: 'uint32' as const },
|
||||
field7: { field: 7, type: 'bytes' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const GroupAdminExtraSchema = {
|
||||
adminUid: { field: 1, type: 'string' as const },
|
||||
isPromote: { field: 2, type: 'bool' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const GroupAdminBodySchema = {
|
||||
extraDisable: { field: 1, type: 'message' as const, schema: GroupAdminExtraSchema },
|
||||
extraEnable: { field: 2, type: 'message' as const, schema: GroupAdminExtraSchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const GroupAdminSchema = {
|
||||
groupUin: { field: 1, type: 'uint32' as const },
|
||||
flag: { field: 2, type: 'uint32' as const },
|
||||
isPromote: { field: 3, type: 'bool' as const },
|
||||
body: { field: 4, type: 'message' as const, schema: GroupAdminBodySchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const InvitationInnerSchema = {
|
||||
groupUin: { field: 1, type: 'uint32' as const },
|
||||
field2: { field: 2, type: 'uint32' as const },
|
||||
field3: { field: 3, type: 'uint32' as const },
|
||||
field4: { field: 4, type: 'uint32' as const },
|
||||
targetUid: { field: 5, type: 'string' as const },
|
||||
invitorUid: { field: 6, type: 'string' as const },
|
||||
field7: { field: 7, type: 'uint32' as const },
|
||||
field9: { field: 9, type: 'uint32' as const },
|
||||
field10: { field: 10, type: 'bytes' as const },
|
||||
field11: { field: 11, type: 'uint32' as const },
|
||||
field12: { field: 12, type: 'string' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const InvitationInfoSchema = {
|
||||
inner: { field: 1, type: 'message' as const, schema: InvitationInnerSchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const GroupInvitationSchema = {
|
||||
cmd: { field: 1, type: 'int32' as const },
|
||||
info: { field: 2, type: 'message' as const, schema: InvitationInfoSchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const GroupInviteSchema = {
|
||||
groupUin: { field: 1, type: 'uint32' as const },
|
||||
field2: { field: 2, type: 'uint32' as const },
|
||||
field3: { field: 3, type: 'uint32' as const },
|
||||
field4: { field: 4, type: 'uint32' as const },
|
||||
invitorUid: { field: 5, type: 'string' as const },
|
||||
hashes: { field: 6, type: 'bytes' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const GroupJoinSchema = {
|
||||
groupUin: { field: 1, type: 'uint32' as const },
|
||||
field2: { field: 2, type: 'uint32' as const },
|
||||
targetUid: { field: 3, type: 'string' as const },
|
||||
field4: { field: 4, type: 'uint32' as const },
|
||||
field6: { field: 6, type: 'uint32' as const },
|
||||
field7: { field: 7, type: 'string' as const },
|
||||
field8: { field: 8, type: 'uint32' as const },
|
||||
field9: { field: 9, type: 'bytes' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const FriendRequestInfoSchema = {
|
||||
targetUid: { field: 1, type: 'string' as const },
|
||||
sourceUid: { field: 2, type: 'string' as const },
|
||||
newSource: { field: 5, type: 'string' as const },
|
||||
message: { field: 10, type: 'string' as const },
|
||||
source: { field: 11, type: 'string' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const FriendRequestSchema = {
|
||||
info: { field: 1, type: 'message' as const, schema: FriendRequestInfoSchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const FriendRecallTipInfoSchema = {
|
||||
tip: { field: 2, type: 'string' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const FriendRecallInfoSchema = {
|
||||
fromUid: { field: 1, type: 'string' as const },
|
||||
toUid: { field: 2, type: 'string' as const },
|
||||
clientSequence: { field: 3, type: 'uint32' as const },
|
||||
newId: { field: 4, type: 'uint64' as const },
|
||||
time: { field: 5, type: 'uint32' as const },
|
||||
random: { field: 6, type: 'uint32' as const },
|
||||
pkgNum: { field: 7, type: 'uint32' as const },
|
||||
pkgIndex: { field: 8, type: 'uint32' as const },
|
||||
divSeq: { field: 9, type: 'uint32' as const },
|
||||
tipInfo: { field: 13, type: 'message' as const, schema: FriendRecallTipInfoSchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const FriendRecallSchema = {
|
||||
info: { field: 1, type: 'message' as const, schema: FriendRecallInfoSchema },
|
||||
instId: { field: 2, type: 'uint32' as const },
|
||||
appId: { field: 3, type: 'uint32' as const },
|
||||
longMessageFlag: { field: 4, type: 'uint32' as const },
|
||||
reserved: { field: 5, type: 'bytes' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const GroupMuteStateSchema = {
|
||||
targetUid: { field: 1, type: 'string' as const },
|
||||
duration: { field: 2, type: 'uint32' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const GroupMuteDataSchema = {
|
||||
timestamp: { field: 1, type: 'uint32' as const },
|
||||
type: { field: 2, type: 'uint32' as const },
|
||||
state: { field: 3, type: 'message' as const, schema: GroupMuteStateSchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const GroupMuteSchema = {
|
||||
groupUin: { field: 1, type: 'uint32' as const },
|
||||
subType: { field: 2, type: 'uint32' as const },
|
||||
field3: { field: 3, type: 'uint32' as const },
|
||||
operatorUid: { field: 4, type: 'string' as const },
|
||||
data: { field: 5, type: 'message' as const, schema: GroupMuteDataSchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const RecallMessageSchema = {
|
||||
sequence: { field: 1, type: 'uint32' as const },
|
||||
time: { field: 2, type: 'uint32' as const },
|
||||
random: { field: 3, type: 'uint32' as const },
|
||||
type: { field: 4, type: 'uint32' as const },
|
||||
flag: { field: 5, type: 'uint32' as const },
|
||||
authorUid: { field: 6, type: 'string' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const GroupRecallTipInfoSchema = {
|
||||
tip: { field: 2, type: 'string' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const GroupRecallSchema = {
|
||||
operatorUid: { field: 1, type: 'string' as const },
|
||||
recallMessages: { field: 3, type: 'repeated_message' as const, schema: RecallMessageSchema },
|
||||
userDef: { field: 5, type: 'bytes' as const },
|
||||
groupType: { field: 6, type: 'int32' as const },
|
||||
opType: { field: 7, type: 'int32' as const },
|
||||
tipInfo: { field: 9, type: 'message' as const, schema: GroupRecallTipInfoSchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const TemplParamSchema = {
|
||||
name: { field: 1, type: 'string' as const },
|
||||
value: { field: 2, type: 'string' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const GeneralGrayTipInfoSchema = {
|
||||
busiType: { field: 1, type: 'uint64' as const },
|
||||
busiId: { field: 2, type: 'uint64' as const },
|
||||
ctrlFlag: { field: 3, type: 'uint32' as const },
|
||||
c2cType: { field: 4, type: 'uint32' as const },
|
||||
serviceType: { field: 5, type: 'uint32' as const },
|
||||
templId: { field: 6, type: 'uint64' as const },
|
||||
msgTemplParam: { field: 7, type: 'repeated_message' as const, schema: TemplParamSchema },
|
||||
content: { field: 8, type: 'string' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const EssenceMessageSchema = {
|
||||
groupUin: { field: 1, type: 'uint32' as const },
|
||||
msgSequence: { field: 2, type: 'uint32' as const },
|
||||
random: { field: 3, type: 'uint32' as const },
|
||||
setFlag: { field: 4, type: 'uint32' as const },
|
||||
memberUin: { field: 5, type: 'uint32' as const },
|
||||
operatorUin: { field: 6, type: 'uint32' as const },
|
||||
timestamp: { field: 7, type: 'uint32' as const },
|
||||
msgSequence2: { field: 8, type: 'uint32' as const },
|
||||
operatorNickname: { field: 9, type: 'string' as const },
|
||||
memberNickname: { field: 10, type: 'string' as const },
|
||||
setFlag2: { field: 11, type: 'uint32' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const NotifyMessageBodySchema = {
|
||||
type: { field: 1, type: 'uint32' as const },
|
||||
groupUin: { field: 4, type: 'uint32' as const },
|
||||
eventParam: { field: 5, type: 'bytes' as const },
|
||||
recall: { field: 11, type: 'message' as const, schema: GroupRecallSchema },
|
||||
field13: { field: 13, type: 'uint32' as const },
|
||||
operatorUid: { field: 21, type: 'string' as const },
|
||||
generalGrayTip: { field: 26, type: 'message' as const, schema: GeneralGrayTipInfoSchema },
|
||||
essenceMessage: { field: 33, type: 'message' as const, schema: EssenceMessageSchema },
|
||||
msgSequence: { field: 37, type: 'uint32' as const },
|
||||
field39: { field: 39, type: 'uint32' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
// ─── Event0x2DC subType=16: GroupMsgEmojiLike ──────────────────────────────
|
||||
//
|
||||
// QQ pushes a Group message emoji reaction (someone tapped an emoji on a
|
||||
// message in a group). The payload nesting matches NapCat's transformer
|
||||
// (packet/transformer/proto/message/message.ts → GroupReactNotify); the
|
||||
// outermost message is preceded by a 7-byte prefix that must be stripped
|
||||
// before decoding (see the call site).
|
||||
|
||||
export const GroupReactionDataInnerDataTargetSchema = {
|
||||
seq: { field: 1, type: 'uint64' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const GroupReactionDataContentSchema = {
|
||||
code: { field: 1, type: 'string' as const },
|
||||
count: { field: 3, type: 'uint32' as const },
|
||||
operatorUid: { field: 4, type: 'string' as const },
|
||||
type: { field: 5, type: 'uint32' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const GroupReactionDataInnerDataSchema = {
|
||||
groupReactionTarget: { field: 2, type: 'message' as const, schema: GroupReactionDataInnerDataTargetSchema },
|
||||
groupReactionDataContent: { field: 3, type: 'message' as const, schema: GroupReactionDataContentSchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const GroupReactionDataInnerSchema = {
|
||||
data: { field: 1, type: 'message' as const, schema: GroupReactionDataInnerDataSchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const GroupReactionDataSchema = {
|
||||
data: { field: 1, type: 'message' as const, schema: GroupReactionDataInnerSchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const GroupReactNotifySchema = {
|
||||
groupUin: { field: 4, type: 'uint64' as const },
|
||||
field13: { field: 13, type: 'uint32' as const },
|
||||
groupReactionData: { field: 44, type: 'message' as const, schema: GroupReactionDataSchema },
|
||||
} satisfies ProtoSchema;
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,161 +0,0 @@
|
||||
// Proto schemas for OidbSvc service types.
|
||||
// Port of src/bridge/include/bridge/proto/oidb.h
|
||||
|
||||
import type { ProtoSchema } from '../../protobuf/decode';
|
||||
|
||||
// --- OidbSvcTrpcTcpBase wrapper ---
|
||||
|
||||
export const OidbPropertySchema = {
|
||||
key: { field: 1, type: 'string' as const },
|
||||
value: { field: 2, type: 'bytes' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
// Factory for OidbSvcTrpcTcpBase<T>
|
||||
export function makeOidbBaseSchema(bodySchema: ProtoSchema): ProtoSchema {
|
||||
return {
|
||||
command: { field: 1, type: 'uint32' as const },
|
||||
subCommand: { field: 2, type: 'uint32' as const },
|
||||
errorCode: { field: 3, type: 'uint32' as const },
|
||||
body: { field: 4, type: 'message' as const, schema: bodySchema },
|
||||
errorMsg: { field: 5, type: 'string' as const },
|
||||
properties: { field: 11, type: 'repeated_message' as const, schema: OidbPropertySchema },
|
||||
reserved: { field: 12, type: 'int32' as const },
|
||||
};
|
||||
}
|
||||
|
||||
// --- Friend list (0xFD4_1) ---
|
||||
|
||||
export const OidbFriendPropertySchema = {
|
||||
code: { field: 1, type: 'uint32' as const },
|
||||
value: { field: 2, type: 'string' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const OidbFriendLayer1Schema = {
|
||||
properties: { field: 2, type: 'repeated_message' as const, schema: OidbFriendPropertySchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const OidbFriendAdditionalSchema = {
|
||||
type: { field: 1, type: 'uint32' as const },
|
||||
layer1: { field: 2, type: 'message' as const, schema: OidbFriendLayer1Schema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const OidbFriendSchema = {
|
||||
uid: { field: 1, type: 'string' as const },
|
||||
customGroup:{ field: 2, type: 'uint32' as const },
|
||||
uin: { field: 3, type: 'uint32' as const },
|
||||
additional: { field: 10001, type: 'repeated_message' as const, schema: OidbFriendAdditionalSchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const OidbSvcTrpcTcp0xFD4_1ResponseUinSchema = {
|
||||
uin: { field: 1, type: 'uint32' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const OidbSvcTrpcTcp0xFD4_1ResponseSchema = {
|
||||
next: { field: 2, type: 'message' as const, schema: OidbSvcTrpcTcp0xFD4_1ResponseUinSchema },
|
||||
displayFriendCount: { field: 3, type: 'uint32' as const },
|
||||
timestamp: { field: 6, type: 'uint32' as const },
|
||||
selfUin: { field: 7, type: 'uint32' as const },
|
||||
friends: { field: 101, type: 'repeated_message' as const, schema: OidbFriendSchema },
|
||||
groups: { field: 102, type: 'repeated_message' as const, schema: OidbFriendPropertySchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
// --- Group list (0xFE5_2) ---
|
||||
|
||||
export const OidbSvcTrpcTcp0xFE5_2MemberSchema = {
|
||||
uid: { field: 2, type: 'string' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const OidbSvcTrpcTcp0xFE5_2GroupInfoSchema = {
|
||||
groupOwner: { field: 1, type: 'message' as const, schema: OidbSvcTrpcTcp0xFE5_2MemberSchema },
|
||||
createdTime: { field: 2, type: 'uint32' as const },
|
||||
memberMax: { field: 3, type: 'uint32' as const },
|
||||
memberCount: { field: 4, type: 'uint32' as const },
|
||||
groupName: { field: 5, type: 'string' as const },
|
||||
description: { field: 18, type: 'string' as const },
|
||||
question: { field: 19, type: 'string' as const },
|
||||
announcement: { field: 30, type: 'string' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const OidbSvcTrpcTcp0xFE5_2CustomInfoSchema = {
|
||||
remark: { field: 3, type: 'string' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const OidbSvcTrpcTcp0xFE5_2GroupSchema = {
|
||||
groupUin: { field: 3, type: 'uint32' as const },
|
||||
info: { field: 4, type: 'message' as const, schema: OidbSvcTrpcTcp0xFE5_2GroupInfoSchema },
|
||||
customInfo: { field: 5, type: 'message' as const, schema: OidbSvcTrpcTcp0xFE5_2CustomInfoSchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const OidbSvcTrpcTcp0xFE5_2ResponseSchema = {
|
||||
groups: { field: 2, type: 'repeated_message' as const, schema: OidbSvcTrpcTcp0xFE5_2GroupSchema },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
// --- Group member list (0xFE7_3) ---
|
||||
|
||||
export const OidbSvcTrpcTcp0xFE7_3UinSchema = {
|
||||
uid: { field: 2, type: 'string' as const },
|
||||
uin: { field: 4, type: 'uint32' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const OidbSvcTrpcTcp0xFE7_3CardSchema = {
|
||||
memberCard: { field: 2, type: 'string' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const OidbSvcTrpcTcp0xFE7_3LevelSchema = {
|
||||
infos: { field: 1, type: 'repeated_uint32' as const },
|
||||
level: { field: 2, type: 'uint32' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const OidbSvcTrpcTcp0xFE7_3MemberSchema = {
|
||||
uin: { field: 1, type: 'message' as const, schema: OidbSvcTrpcTcp0xFE7_3UinSchema },
|
||||
memberName: { field: 10, type: 'string' as const },
|
||||
specialTitle: { field: 17, type: 'string' as const },
|
||||
memberCard: { field: 11, type: 'message' as const, schema: OidbSvcTrpcTcp0xFE7_3CardSchema },
|
||||
level: { field: 12, type: 'message' as const, schema: OidbSvcTrpcTcp0xFE7_3LevelSchema },
|
||||
joinTimestamp: { field: 100, type: 'uint32' as const },
|
||||
lastMsgTimestamp: { field: 101, type: 'uint32' as const },
|
||||
shutUpTimestamp: { field: 102, type: 'uint32' as const },
|
||||
permission: { field: 107, type: 'uint32' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const OidbSvcTrpcTcp0xFE7_3ResponseSchema = {
|
||||
groupUin: { field: 1, type: 'uint32' as const },
|
||||
members: { field: 2, type: 'repeated_message' as const, schema: OidbSvcTrpcTcp0xFE7_3MemberSchema },
|
||||
field3: { field: 3, type: 'uint32' as const },
|
||||
memberChangeSeq: { field: 5, type: 'uint32' as const },
|
||||
memberCardChangeSeq:{ field: 6, type: 'uint32' as const },
|
||||
token: { field: 15, type: 'string' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
// --- Group request (0x10C0) ---
|
||||
|
||||
export const OidbSvcTrpcTcp0x10C0ResponseUserSchema = {
|
||||
uid: { field: 1, type: 'string' as const },
|
||||
name: { field: 2, type: 'string' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const OidbSvcTrpcTcp0x10C0ResponseGroupSchema = {
|
||||
groupUin: { field: 1, type: 'uint32' as const },
|
||||
groupName: { field: 2, type: 'string' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const OidbSvcTrpcTcp0x10C0ResponseRequestSchema = {
|
||||
sequence: { field: 1, type: 'uint64' as const },
|
||||
eventType: { field: 2, type: 'uint32' as const },
|
||||
state: { field: 3, type: 'uint32' as const },
|
||||
group: { field: 4, type: 'message' as const, schema: OidbSvcTrpcTcp0x10C0ResponseGroupSchema },
|
||||
target: { field: 5, type: 'message' as const, schema: OidbSvcTrpcTcp0x10C0ResponseUserSchema },
|
||||
invitor: { field: 6, type: 'message' as const, schema: OidbSvcTrpcTcp0x10C0ResponseUserSchema },
|
||||
operatorUser: { field: 7, type: 'message' as const, schema: OidbSvcTrpcTcp0x10C0ResponseUserSchema },
|
||||
field9: { field: 9, type: 'string' as const },
|
||||
comment: { field: 10, type: 'string' as const },
|
||||
} satisfies ProtoSchema;
|
||||
|
||||
export const OidbSvcTrpcTcp0x10C0ResponseSchema = {
|
||||
requests: { field: 1, type: 'repeated_message' as const, schema: OidbSvcTrpcTcp0x10C0ResponseRequestSchema },
|
||||
field2: { field: 2, type: 'uint64' as const },
|
||||
newLatestSeq: { field: 3, type: 'uint64' as const },
|
||||
field4: { field: 4, type: 'uint32' as const },
|
||||
field5: { field: 5, type: 'uint64' as const },
|
||||
field6: { field: 6, type: 'uint32' as const },
|
||||
} satisfies ProtoSchema;
|
||||
@@ -3,119 +3,574 @@ import type { pb, pb_repeated, int_32, uint_32, uint_64, bool, bytes } from '@sn
|
||||
// Re-exported from the legacy oidb-action module while large protocol groups
|
||||
// are split into focused files.
|
||||
|
||||
export interface OidbMuteMemberBody { targetUid?: pb<1, string>; duration?: pb<2, uint_32>; }
|
||||
export interface OidbMuteMember { groupUin?: pb<1, uint_32>; type?: pb<2, uint_32>; body?: pb<3, OidbMuteMemberBody>; }
|
||||
export interface OidbMuteAllState { state?: pb<17, uint_32>; }
|
||||
export interface OidbMuteAll { groupUin?: pb<1, uint_32>; muteState?: pb<2, OidbMuteAllState>; }
|
||||
export interface Oidb0x89a_0AddOptionSettings { addType?: pb<16, uint_32>; }
|
||||
export interface Oidb0x89a_0AddOption { groupUin?: pb<1, uint_64>; settings?: pb<2, Oidb0x89a_0AddOptionSettings>; field12?: pb<12, uint_32>; }
|
||||
export interface Oidb0x89a_0Search { groupUin?: pb<1, uint_64>; settings?: pb<2, bytes>; field12?: pb<12, uint_32>; }
|
||||
export interface OidbKickMember { groupUin?: pb<1, uint_32>; targetUid?: pb<3, string>; rejectAddRequest?: pb<4, bool>; reason?: pb<5, string>; }
|
||||
export interface OidbLeaveGroup { groupUin?: pb<1, uint_32>; }
|
||||
export interface OidbFriendRequestAction { accept?: pb<1, uint_32>; targetUid?: pb<2, string>; }
|
||||
export interface OidbDeleteFriendField2Field3 { field1?: pb<1, uint_32>; field2?: pb<2, uint_32>; field3?: pb<3, uint_32>; }
|
||||
export interface OidbDeleteFriendField2 { field1?: pb<1, uint_32>; field2?: pb<2, uint_32>; field3?: pb<3, OidbDeleteFriendField2Field3>; }
|
||||
export interface OidbDeleteFriendField1 { targetUid?: pb<1, string>; field2?: pb<2, OidbDeleteFriendField2>; block?: pb<3, bool>; field4?: pb<4, bool>; }
|
||||
export interface OidbDeleteFriend { field1?: pb<1, OidbDeleteFriendField1>; }
|
||||
export interface OidbGroupRequestBody { sequence?: pb<1, uint_64>; eventType?: pb<2, uint_32>; groupUin?: pb<3, uint_32>; message?: pb<4, string>; }
|
||||
export interface OidbGroupRequestAction { accept?: pb<1, uint_32>; body?: pb<2, OidbGroupRequestBody>; }
|
||||
export interface OidbPoke { uin?: pb<1, uint_32>; groupUin?: pb<2, uint_32>; friendUin?: pb<5, uint_32>; ext?: pb<6, uint_32>; }
|
||||
export interface OidbEssence { groupUin?: pb<1, uint_32>; sequence?: pb<2, uint_32>; random?: pb<3, uint_32>; }
|
||||
export interface OidbSetAdmin { groupUin?: pb<1, uint_32>; uid?: pb<2, string>; isAdmin?: pb<3, bool>; }
|
||||
export interface OidbRenameMemberBody { targetUid?: pb<1, string>; targetName?: pb<2, string>; }
|
||||
export interface OidbRenameMember { groupUin?: pb<1, uint_32>; body?: pb<2, OidbRenameMemberBody>; }
|
||||
export interface OidbRenameGroupBody { targetName?: pb<1, string>; }
|
||||
export interface OidbRenameGroup { groupUin?: pb<1, uint_32>; body?: pb<2, OidbRenameGroupBody>; }
|
||||
export interface OidbSpecialTitleBody { targetUid?: pb<1, string>; specialTitle?: pb<5, string>; expireTime?: pb<6, int_32>; }
|
||||
export interface OidbSpecialTitle { groupUin?: pb<1, uint_32>; body?: pb<2, OidbSpecialTitleBody>; }
|
||||
export interface OidbLike { targetUin?: pb<1, uint_32>; count?: pb<2, uint_32>; }
|
||||
export interface OidbGroupRequestList { count?: pb<1, uint_32>; field2?: pb<2, uint_32>; }
|
||||
export interface OidbUserInfoKey { key?: pb<1, uint_32>; }
|
||||
export interface OidbUserInfoRequest { uin?: pb<1, uint_32>; keys?: pb_repeated<3, OidbUserInfoKey>; }
|
||||
export interface OidbTwoNumber { number1?: pb<1, uint_32>; number2?: pb<2, uint_32>; }
|
||||
export interface OidbByteProperty { code?: pb<1, uint_32>; value?: pb<2, bytes>; }
|
||||
export interface OidbUserInfoProperty { numberProperties?: pb_repeated<1, OidbTwoNumber>; bytesProperties?: pb_repeated<2, OidbByteProperty>; }
|
||||
export interface OidbUserInfoResponseBody { uid?: pb<1, string>; properties?: pb<2, OidbUserInfoProperty>; uin?: pb<3, uint_32>; }
|
||||
export interface OidbUserInfoResponse { body?: pb<1, OidbUserInfoResponseBody>; }
|
||||
export interface AvatarInfo { url?: pb<5, string>; }
|
||||
export interface OidbFriendListNumber { numbers?: pb_repeated<1, uint_32>; }
|
||||
export interface OidbFriendListBodyItem { type?: pb<1, uint_32>; number?: pb<2, OidbFriendListNumber>; }
|
||||
export interface OidbFriendListNextUin { uin?: pb<1, uint_32>; }
|
||||
export interface OidbFriendListRequest { friendCount?: pb<2, uint_32>; field4?: pb<4, uint_32>; nextUin?: pb<5, OidbFriendListNextUin>; field6?: pb<6, uint_32>; field7?: pb<7, uint_32>; body?: pb_repeated<10001, OidbFriendListBodyItem>; field10002?: pb_repeated<10002, uint_32>; field10003?: pb<10003, uint_32>; }
|
||||
export interface OidbGroupListConfig1 { groupOwner?: pb<1, bool>; field2?: pb<2, bool>; memberMax?: pb<3, bool>; memberCount?: pb<4, bool>; groupName?: pb<5, bool>; field8?: pb<8, bool>; field9?: pb<9, bool>; field10?: pb<10, bool>; field11?: pb<11, bool>; field12?: pb<12, bool>; field13?: pb<13, bool>; field14?: pb<14, bool>; field15?: pb<15, bool>; field16?: pb<16, bool>; field17?: pb<17, bool>; field18?: pb<18, bool>; question?: pb<19, bool>; field20?: pb<20, bool>; field22?: pb<22, bool>; field23?: pb<23, bool>; field24?: pb<24, bool>; field25?: pb<25, bool>; field26?: pb<26, bool>; field27?: pb<27, bool>; field28?: pb<28, bool>; field29?: pb<29, bool>; field30?: pb<30, bool>; field31?: pb<31, bool>; field32?: pb<32, bool>; field5001?: pb<5001, bool>; field5002?: pb<5002, bool>; field5003?: pb<5003, bool>; }
|
||||
export interface OidbGroupListConfig2 { field1?: pb<1, bool>; field2?: pb<2, bool>; field3?: pb<3, bool>; field4?: pb<4, bool>; field5?: pb<5, bool>; field6?: pb<6, bool>; field7?: pb<7, bool>; field8?: pb<8, bool>; }
|
||||
export interface OidbGroupListConfig3 { field5?: pb<5, bool>; field6?: pb<6, bool>; }
|
||||
export interface OidbGroupListConfig { config1?: pb<1, OidbGroupListConfig1>; config2?: pb<2, OidbGroupListConfig2>; config3?: pb<3, OidbGroupListConfig3>; }
|
||||
export interface OidbGroupListRequest { config?: pb<1, OidbGroupListConfig>; }
|
||||
export interface OidbGroupMemberListBody { memberName?: pb<10, bool>; memberCard?: pb<11, bool>; level?: pb<12, bool>; field13?: pb<13, bool>; field16?: pb<16, bool>; specialTitle?: pb<17, bool>; field18?: pb<18, bool>; field20?: pb<20, bool>; field21?: pb<21, bool>; joinTimestamp?: pb<100, bool>; lastMsgTimestamp?: pb<101, bool>; shutUpTimestamp?: pb<102, bool>; field103?: pb<103, bool>; field104?: pb<104, bool>; field105?: pb<105, bool>; field106?: pb<106, bool>; permission?: pb<107, bool>; field200?: pb<200, bool>; field201?: pb<201, bool>; }
|
||||
export interface OidbGroupMemberListRequest { groupUin?: pb<1, uint_32>; field2?: pb<2, uint_32>; field3?: pb<3, uint_32>; body?: pb<4, OidbGroupMemberListBody>; token?: pb<15, string>; }
|
||||
export interface GroupRecallInfo { sequence?: pb<1, uint_32>; random?: pb<2, uint_32>; field3?: pb<3, uint_32>; }
|
||||
export interface GroupRecallSettings { field1?: pb<1, uint_32>; }
|
||||
export interface GroupRecallRequest { type?: pb<1, uint_32>; groupUin?: pb<2, uint_32>; info?: pb<3, GroupRecallInfo>; settings?: pb<4, GroupRecallSettings>; }
|
||||
export interface C2CRecallInfo { clientSequence?: pb<1, uint_32>; random?: pb<2, uint_32>; messageId?: pb<3, uint_64>; timestamp?: pb<4, uint_32>; field5?: pb<5, uint_32>; messageSequence?: pb<6, uint_32>; }
|
||||
export interface C2CRecallSettings { field1?: pb<1, bool>; field2?: pb<2, bool>; }
|
||||
export interface C2CRecallRequest { type?: pb<1, uint_32>; targetUid?: pb<3, string>; info?: pb<4, C2CRecallInfo>; settings?: pb<5, C2CRecallSettings>; field6?: pb<6, bool>; }
|
||||
export interface OidbGroupReaction { groupUin?: pb<1, uint_32>; sequence?: pb<2, uint_32>; code?: pb<3, string>; type?: pb<4, uint_32>; }
|
||||
export interface GroupReadedReportItem { groupUin?: pb<1, uint_64>; lastReadSeq?: pb<2, uint_64>; }
|
||||
export interface C2CReadedReportItem { uid?: pb<2, string>; lastReadTime?: pb<3, uint_64>; lastReadSeq?: pb<4, uint_64>; }
|
||||
export interface SsoReadedReportReq { groupList?: pb_repeated<1, GroupReadedReportItem>; c2cList?: pb_repeated<2, C2CReadedReportItem>; }
|
||||
export interface OidbMuteMemberBody {
|
||||
targetUid?: pb<1, string>;
|
||||
duration?: pb<2, uint_32>;
|
||||
}
|
||||
export interface OidbMuteMember {
|
||||
groupUin?: pb<1, uint_32>;
|
||||
type?: pb<2, uint_32>;
|
||||
body?: pb<3, OidbMuteMemberBody>;
|
||||
}
|
||||
export interface OidbMuteAllState {
|
||||
state?: pb<17, uint_32>;
|
||||
}
|
||||
export interface OidbMuteAll {
|
||||
groupUin?: pb<1, uint_32>;
|
||||
muteState?: pb<2, OidbMuteAllState>;
|
||||
}
|
||||
export interface Oidb0x89a_0AddOptionSettings {
|
||||
addType?: pb<16, uint_32>;
|
||||
}
|
||||
export interface Oidb0x89a_0AddOption {
|
||||
groupUin?: pb<1, uint_64>;
|
||||
settings?: pb<2, Oidb0x89a_0AddOptionSettings>;
|
||||
field12?: pb<12, uint_32>;
|
||||
}
|
||||
export interface Oidb0x89a_0Search {
|
||||
groupUin?: pb<1, uint_64>;
|
||||
settings?: pb<2, bytes>;
|
||||
field12?: pb<12, uint_32>;
|
||||
}
|
||||
export interface OidbKickMember {
|
||||
groupUin?: pb<1, uint_32>;
|
||||
targetUid?: pb<3, string>;
|
||||
rejectAddRequest?: pb<4, bool>;
|
||||
reason?: pb<5, string>;
|
||||
}
|
||||
export interface OidbLeaveGroup {
|
||||
groupUin?: pb<1, uint_32>;
|
||||
}
|
||||
export interface OidbFriendRequestAction {
|
||||
accept?: pb<1, uint_32>;
|
||||
targetUid?: pb<2, string>;
|
||||
}
|
||||
export interface OidbDeleteFriendField2Field3 {
|
||||
field1?: pb<1, uint_32>;
|
||||
field2?: pb<2, uint_32>;
|
||||
field3?: pb<3, uint_32>;
|
||||
}
|
||||
export interface OidbDeleteFriendField2 {
|
||||
field1?: pb<1, uint_32>;
|
||||
field2?: pb<2, uint_32>;
|
||||
field3?: pb<3, OidbDeleteFriendField2Field3>;
|
||||
}
|
||||
export interface OidbDeleteFriendField1 {
|
||||
targetUid?: pb<1, string>;
|
||||
field2?: pb<2, OidbDeleteFriendField2>;
|
||||
block?: pb<3, bool>;
|
||||
field4?: pb<4, bool>;
|
||||
}
|
||||
export interface OidbDeleteFriend {
|
||||
field1?: pb<1, OidbDeleteFriendField1>;
|
||||
}
|
||||
export interface OidbGroupRequestBody {
|
||||
sequence?: pb<1, uint_64>;
|
||||
eventType?: pb<2, uint_32>;
|
||||
groupUin?: pb<3, uint_32>;
|
||||
message?: pb<4, string>;
|
||||
}
|
||||
export interface OidbGroupRequestAction {
|
||||
accept?: pb<1, uint_32>;
|
||||
body?: pb<2, OidbGroupRequestBody>;
|
||||
}
|
||||
export interface OidbPoke {
|
||||
uin?: pb<1, uint_32>;
|
||||
groupUin?: pb<2, uint_32>;
|
||||
friendUin?: pb<5, uint_32>;
|
||||
ext?: pb<6, uint_32>;
|
||||
}
|
||||
export interface OidbEssence {
|
||||
groupUin?: pb<1, uint_32>;
|
||||
sequence?: pb<2, uint_32>;
|
||||
random?: pb<3, uint_32>;
|
||||
}
|
||||
export interface OidbSetAdmin {
|
||||
groupUin?: pb<1, uint_32>;
|
||||
uid?: pb<2, string>;
|
||||
isAdmin?: pb<3, bool>;
|
||||
}
|
||||
export interface OidbRenameMemberBody {
|
||||
targetUid?: pb<1, string>;
|
||||
targetName?: pb<2, string>;
|
||||
}
|
||||
export interface OidbRenameMember {
|
||||
groupUin?: pb<1, uint_32>;
|
||||
body?: pb<2, OidbRenameMemberBody>;
|
||||
}
|
||||
export interface OidbRenameGroupBody {
|
||||
targetName?: pb<1, string>;
|
||||
}
|
||||
export interface OidbRenameGroup {
|
||||
groupUin?: pb<1, uint_32>;
|
||||
body?: pb<2, OidbRenameGroupBody>;
|
||||
}
|
||||
export interface OidbSpecialTitleBody {
|
||||
targetUid?: pb<1, string>;
|
||||
specialTitle?: pb<5, string>;
|
||||
expireTime?: pb<6, int_32>;
|
||||
}
|
||||
export interface OidbSpecialTitle {
|
||||
groupUin?: pb<1, uint_32>;
|
||||
body?: pb<2, OidbSpecialTitleBody>;
|
||||
}
|
||||
export interface OidbLike {
|
||||
targetUin?: pb<1, uint_32>;
|
||||
count?: pb<2, uint_32>;
|
||||
}
|
||||
export interface OidbGroupRequestList {
|
||||
count?: pb<1, uint_32>;
|
||||
field2?: pb<2, uint_32>;
|
||||
}
|
||||
export interface OidbUserInfoKey {
|
||||
key?: pb<1, uint_32>;
|
||||
}
|
||||
export interface OidbUserInfoRequest {
|
||||
uin?: pb<1, uint_32>;
|
||||
keys?: pb_repeated<3, OidbUserInfoKey>;
|
||||
}
|
||||
export interface OidbTwoNumber {
|
||||
number1?: pb<1, uint_32>;
|
||||
number2?: pb<2, uint_32>;
|
||||
}
|
||||
export interface OidbByteProperty {
|
||||
code?: pb<1, uint_32>;
|
||||
value?: pb<2, bytes>;
|
||||
}
|
||||
export interface OidbUserInfoProperty {
|
||||
numberProperties?: pb_repeated<1, OidbTwoNumber>;
|
||||
bytesProperties?: pb_repeated<2, OidbByteProperty>;
|
||||
}
|
||||
export interface OidbUserInfoResponseBody {
|
||||
uid?: pb<1, string>;
|
||||
properties?: pb<2, OidbUserInfoProperty>;
|
||||
uin?: pb<3, uint_32>;
|
||||
}
|
||||
export interface OidbUserInfoResponse {
|
||||
body?: pb<1, OidbUserInfoResponseBody>;
|
||||
}
|
||||
export interface AvatarInfo {
|
||||
url?: pb<5, string>;
|
||||
}
|
||||
export interface OidbFriendListNumber {
|
||||
numbers?: pb_repeated<1, uint_32>;
|
||||
}
|
||||
export interface OidbFriendListBodyItem {
|
||||
type?: pb<1, uint_32>;
|
||||
number?: pb<2, OidbFriendListNumber>;
|
||||
}
|
||||
export interface OidbFriendListNextUin {
|
||||
uin?: pb<1, uint_32>;
|
||||
}
|
||||
export interface OidbFriendListRequest {
|
||||
friendCount?: pb<2, uint_32>;
|
||||
field4?: pb<4, uint_32>;
|
||||
nextUin?: pb<5, OidbFriendListNextUin>;
|
||||
field6?: pb<6, uint_32>;
|
||||
field7?: pb<7, uint_32>;
|
||||
body?: pb_repeated<10001, OidbFriendListBodyItem>;
|
||||
field10002?: pb_repeated<10002, uint_32>;
|
||||
field10003?: pb<10003, uint_32>;
|
||||
}
|
||||
export interface OidbGroupListConfig1 {
|
||||
groupOwner?: pb<1, bool>;
|
||||
field2?: pb<2, bool>;
|
||||
memberMax?: pb<3, bool>;
|
||||
memberCount?: pb<4, bool>;
|
||||
groupName?: pb<5, bool>;
|
||||
field8?: pb<8, bool>;
|
||||
field9?: pb<9, bool>;
|
||||
field10?: pb<10, bool>;
|
||||
field11?: pb<11, bool>;
|
||||
field12?: pb<12, bool>;
|
||||
field13?: pb<13, bool>;
|
||||
field14?: pb<14, bool>;
|
||||
field15?: pb<15, bool>;
|
||||
field16?: pb<16, bool>;
|
||||
field17?: pb<17, bool>;
|
||||
field18?: pb<18, bool>;
|
||||
question?: pb<19, bool>;
|
||||
field20?: pb<20, bool>;
|
||||
field22?: pb<22, bool>;
|
||||
field23?: pb<23, bool>;
|
||||
field24?: pb<24, bool>;
|
||||
field25?: pb<25, bool>;
|
||||
field26?: pb<26, bool>;
|
||||
field27?: pb<27, bool>;
|
||||
field28?: pb<28, bool>;
|
||||
field29?: pb<29, bool>;
|
||||
field30?: pb<30, bool>;
|
||||
field31?: pb<31, bool>;
|
||||
field32?: pb<32, bool>;
|
||||
field5001?: pb<5001, bool>;
|
||||
field5002?: pb<5002, bool>;
|
||||
field5003?: pb<5003, bool>;
|
||||
}
|
||||
export interface OidbGroupListConfig2 {
|
||||
field1?: pb<1, bool>;
|
||||
field2?: pb<2, bool>;
|
||||
field3?: pb<3, bool>;
|
||||
field4?: pb<4, bool>;
|
||||
field5?: pb<5, bool>;
|
||||
field6?: pb<6, bool>;
|
||||
field7?: pb<7, bool>;
|
||||
field8?: pb<8, bool>;
|
||||
}
|
||||
export interface OidbGroupListConfig3 {
|
||||
field5?: pb<5, bool>;
|
||||
field6?: pb<6, bool>;
|
||||
}
|
||||
export interface OidbGroupListConfig {
|
||||
config1?: pb<1, OidbGroupListConfig1>;
|
||||
config2?: pb<2, OidbGroupListConfig2>;
|
||||
config3?: pb<3, OidbGroupListConfig3>;
|
||||
}
|
||||
export interface OidbGroupListRequest {
|
||||
config?: pb<1, OidbGroupListConfig>;
|
||||
}
|
||||
export interface OidbGroupMemberListBody {
|
||||
memberName?: pb<10, bool>;
|
||||
memberCard?: pb<11, bool>;
|
||||
level?: pb<12, bool>;
|
||||
field13?: pb<13, bool>;
|
||||
field16?: pb<16, bool>;
|
||||
specialTitle?: pb<17, bool>;
|
||||
field18?: pb<18, bool>;
|
||||
field20?: pb<20, bool>;
|
||||
field21?: pb<21, bool>;
|
||||
joinTimestamp?: pb<100, bool>;
|
||||
lastMsgTimestamp?: pb<101, bool>;
|
||||
shutUpTimestamp?: pb<102, bool>;
|
||||
field103?: pb<103, bool>;
|
||||
field104?: pb<104, bool>;
|
||||
field105?: pb<105, bool>;
|
||||
field106?: pb<106, bool>;
|
||||
permission?: pb<107, bool>;
|
||||
field200?: pb<200, bool>;
|
||||
field201?: pb<201, bool>;
|
||||
}
|
||||
export interface OidbGroupMemberListRequest {
|
||||
groupUin?: pb<1, uint_32>;
|
||||
field2?: pb<2, uint_32>;
|
||||
field3?: pb<3, uint_32>;
|
||||
body?: pb<4, OidbGroupMemberListBody>;
|
||||
token?: pb<15, string>;
|
||||
}
|
||||
export interface GroupRecallInfo {
|
||||
sequence?: pb<1, uint_32>;
|
||||
random?: pb<2, uint_32>;
|
||||
field3?: pb<3, uint_32>;
|
||||
}
|
||||
export interface GroupRecallSettings {
|
||||
field1?: pb<1, uint_32>;
|
||||
}
|
||||
export interface GroupRecallRequest {
|
||||
type?: pb<1, uint_32>;
|
||||
groupUin?: pb<2, uint_32>;
|
||||
info?: pb<3, GroupRecallInfo>;
|
||||
settings?: pb<4, GroupRecallSettings>;
|
||||
}
|
||||
export interface C2CRecallInfo {
|
||||
clientSequence?: pb<1, uint_32>;
|
||||
random?: pb<2, uint_32>;
|
||||
messageId?: pb<3, uint_64>;
|
||||
timestamp?: pb<4, uint_32>;
|
||||
field5?: pb<5, uint_32>;
|
||||
messageSequence?: pb<6, uint_32>;
|
||||
}
|
||||
export interface C2CRecallSettings {
|
||||
field1?: pb<1, bool>;
|
||||
field2?: pb<2, bool>;
|
||||
}
|
||||
export interface C2CRecallRequest {
|
||||
type?: pb<1, uint_32>;
|
||||
targetUid?: pb<3, string>;
|
||||
info?: pb<4, C2CRecallInfo>;
|
||||
settings?: pb<5, C2CRecallSettings>;
|
||||
field6?: pb<6, bool>;
|
||||
}
|
||||
export interface OidbGroupReaction {
|
||||
groupUin?: pb<1, uint_32>;
|
||||
sequence?: pb<2, uint_32>;
|
||||
code?: pb<3, string>;
|
||||
type?: pb<4, uint_32>;
|
||||
}
|
||||
export interface GroupReadedReportItem {
|
||||
groupUin?: pb<1, uint_64>;
|
||||
lastReadSeq?: pb<2, uint_64>;
|
||||
}
|
||||
export interface C2CReadedReportItem {
|
||||
uid?: pb<2, string>;
|
||||
lastReadTime?: pb<3, uint_64>;
|
||||
lastReadSeq?: pb<4, uint_64>;
|
||||
}
|
||||
export interface SsoReadedReportReq {
|
||||
groupList?: pb_repeated<1, GroupReadedReportItem>;
|
||||
c2cList?: pb_repeated<2, C2CReadedReportItem>;
|
||||
}
|
||||
export interface OidbClientKeyReq {}
|
||||
export interface OidbClientKeyResp { keyIndex?: pb<2, uint_32>; clientKey?: pb<3, string>; expireTime?: pb<4, uint_32>; }
|
||||
export interface OidbGetPskeyReq { domainList?: pb_repeated<1, string>; }
|
||||
export interface OidbPskeyItem { domain?: pb<1, string>; pskey?: pb<2, string>; expireTime?: pb<3, uint_64>; }
|
||||
export interface OidbGetPskeyResp { pskeyItems?: pb_repeated<1, OidbPskeyItem>; }
|
||||
export interface SetStatusCustomExt { faceId?: pb<1, uint_32>; text?: pb<2, string>; faceType?: pb<3, uint_32>; }
|
||||
export interface SetStatusReq { status?: pb<1, int_32>; extStatus?: pb<2, int_32>; batteryStatus?: pb<3, int_32>; customExt?: pb<4, SetStatusCustomExt>; }
|
||||
export interface SetStatusResp { errCode?: pb<1, int_32>; errMsg?: pb<2, string>; }
|
||||
export interface OidbProfileStringItem { fieldId?: pb<1, uint_32>; value?: pb<2, string>; }
|
||||
export interface OidbProfileIntItem { fieldId?: pb<1, uint_32>; value?: pb<2, uint_64>; }
|
||||
export interface OidbSetProfile { uin?: pb<1, uint_64>; stringProfiles?: pb_repeated<2, OidbProfileStringItem>; intProfiles?: pb_repeated<3, OidbProfileIntItem>; }
|
||||
export interface Oidb0x7edInteraction { totalCount?: pb<1, uint_32>; newCount?: pb<2, uint_32>; todayCount?: pb<3, uint_32>; lastTime?: pb<4, uint_64>; }
|
||||
export interface Oidb0x7edUserLikeInfo { uid?: pb<1, string>; time?: pb<2, uint_64>; favoriteInfo?: pb<3, Oidb0x7edInteraction>; voteInfo?: pb<4, Oidb0x7edInteraction>; }
|
||||
export interface Oidb0x7edReq { targetUid?: pb<1, string>; basic?: pb<2, uint_32>; vote?: pb<3, uint_32>; favorite?: pb<4, uint_32>; start?: pb<12, uint_32>; limit?: pb<103, uint_32>; }
|
||||
export interface Oidb0x7edResp { userLikeInfos?: pb_repeated<1, Oidb0x7edUserLikeInfo>; }
|
||||
export interface Oidb0x8a7Req { basic1?: pb<1, uint_32>; basic2?: pb<2, uint_32>; basic3?: pb<3, uint_32>; uin?: pb<4, uint_64>; groupId?: pb<5, uint_64>; type?: pb<12, uint_32>; }
|
||||
export interface Oidb0x8a7Resp { uinRemain?: pb<2, uint_32>; groupRemain?: pb<3, uint_32>; msg?: pb<4, string>; canAtAll?: pb<6, bool>; }
|
||||
export interface Oidb0xe17Req { jsonBody?: pb<3, string>; }
|
||||
export interface Oidb0xe17Resp { jsonBody?: pb<4, string>; }
|
||||
export interface Oidb0x112aProfileInfo { tag?: pb<1, uint_32>; value?: pb<2, string>; }
|
||||
export interface Oidb0x112aReq { uin?: pb<1, uint_64>; profile?: pb<2, Oidb0x112aProfileInfo>; }
|
||||
export interface OidbClientKeyResp {
|
||||
keyIndex?: pb<2, uint_32>;
|
||||
clientKey?: pb<3, string>;
|
||||
expireTime?: pb<4, uint_32>;
|
||||
}
|
||||
export interface OidbGetPskeyReq {
|
||||
domainList?: pb_repeated<1, string>;
|
||||
}
|
||||
export interface OidbPskeyItem {
|
||||
domain?: pb<1, string>;
|
||||
pskey?: pb<2, string>;
|
||||
expireTime?: pb<3, uint_64>;
|
||||
}
|
||||
export interface OidbGetPskeyResp {
|
||||
pskeyItems?: pb_repeated<1, OidbPskeyItem>;
|
||||
}
|
||||
export interface SetStatusCustomExt {
|
||||
faceId?: pb<1, uint_32>;
|
||||
text?: pb<2, string>;
|
||||
faceType?: pb<3, uint_32>;
|
||||
}
|
||||
export interface SetStatusReq {
|
||||
status?: pb<1, int_32>;
|
||||
extStatus?: pb<2, int_32>;
|
||||
batteryStatus?: pb<3, int_32>;
|
||||
customExt?: pb<4, SetStatusCustomExt>;
|
||||
}
|
||||
export interface SetStatusResp {
|
||||
errCode?: pb<1, int_32>;
|
||||
errMsg?: pb<2, string>;
|
||||
}
|
||||
export interface OidbProfileStringItem {
|
||||
fieldId?: pb<1, uint_32>;
|
||||
value?: pb<2, string>;
|
||||
}
|
||||
export interface OidbProfileIntItem {
|
||||
fieldId?: pb<1, uint_32>;
|
||||
value?: pb<2, uint_64>;
|
||||
}
|
||||
export interface OidbSetProfile {
|
||||
uin?: pb<1, uint_64>;
|
||||
stringProfiles?: pb_repeated<2, OidbProfileStringItem>;
|
||||
intProfiles?: pb_repeated<3, OidbProfileIntItem>;
|
||||
}
|
||||
export interface Oidb0x7edInteraction {
|
||||
totalCount?: pb<1, uint_32>;
|
||||
newCount?: pb<2, uint_32>;
|
||||
todayCount?: pb<3, uint_32>;
|
||||
lastTime?: pb<4, uint_64>;
|
||||
}
|
||||
export interface Oidb0x7edUserLikeInfo {
|
||||
uid?: pb<1, string>;
|
||||
time?: pb<2, uint_64>;
|
||||
favoriteInfo?: pb<3, Oidb0x7edInteraction>;
|
||||
voteInfo?: pb<4, Oidb0x7edInteraction>;
|
||||
}
|
||||
export interface Oidb0x7edReq {
|
||||
targetUid?: pb<1, string>;
|
||||
basic?: pb<2, uint_32>;
|
||||
vote?: pb<3, uint_32>;
|
||||
favorite?: pb<4, uint_32>;
|
||||
start?: pb<12, uint_32>;
|
||||
limit?: pb<103, uint_32>;
|
||||
}
|
||||
export interface Oidb0x7edResp {
|
||||
userLikeInfos?: pb_repeated<1, Oidb0x7edUserLikeInfo>;
|
||||
}
|
||||
export interface Oidb0x8a7Req {
|
||||
basic1?: pb<1, uint_32>;
|
||||
basic2?: pb<2, uint_32>;
|
||||
basic3?: pb<3, uint_32>;
|
||||
uin?: pb<4, uint_64>;
|
||||
groupId?: pb<5, uint_64>;
|
||||
type?: pb<12, uint_32>;
|
||||
}
|
||||
export interface Oidb0x8a7Resp {
|
||||
uinRemain?: pb<2, uint_32>;
|
||||
groupRemain?: pb<3, uint_32>;
|
||||
msg?: pb<4, string>;
|
||||
canAtAll?: pb<6, bool>;
|
||||
}
|
||||
export interface Oidb0xe17Req {
|
||||
jsonBody?: pb<3, string>;
|
||||
}
|
||||
export interface Oidb0xe17Resp {
|
||||
jsonBody?: pb<4, string>;
|
||||
}
|
||||
export interface Oidb0x112aProfileInfo {
|
||||
tag?: pb<1, uint_32>;
|
||||
value?: pb<2, string>;
|
||||
}
|
||||
export interface Oidb0x112aReq {
|
||||
uin?: pb<1, uint_64>;
|
||||
profile?: pb<2, Oidb0x112aProfileInfo>;
|
||||
}
|
||||
export interface Oidb0x112aResp {}
|
||||
export interface Oidb0xcd4ReqBody { uid?: pb<1, string>; chatType?: pb<2, uint_32>; eventType?: pb<3, uint_32>; }
|
||||
export interface Oidb0xcd4Req { reqBody?: pb<1, Oidb0xcd4ReqBody>; }
|
||||
export interface Oidb0xcd4ReqBody {
|
||||
uid?: pb<1, string>;
|
||||
chatType?: pb<2, uint_32>;
|
||||
eventType?: pb<3, uint_32>;
|
||||
}
|
||||
export interface Oidb0xcd4Req {
|
||||
reqBody?: pb<1, Oidb0xcd4ReqBody>;
|
||||
}
|
||||
export interface Oidb0xcd4Resp {}
|
||||
export interface Oidb0x990TranslateReq { srcLang?: pb<1, string>; dstLang?: pb<2, string>; words?: pb_repeated<3, string>; }
|
||||
export interface Oidb0x990Req { translateReq?: pb<2, Oidb0x990TranslateReq>; tag10?: pb<10, uint_32>; tag12?: pb<12, uint_32>; }
|
||||
export interface Oidb0x990TranslateResp { errorCode?: pb<1, uint_32>; errorMsg?: pb<2, string>; srcLang?: pb<3, string>; dstLang?: pb<4, string>; srcWords?: pb_repeated<5, string>; dstWords?: pb_repeated<6, string>; }
|
||||
export interface Oidb0x990Resp { translateResp?: pb<2, Oidb0x990TranslateResp>; }
|
||||
export interface MiniAppShareReqBody { appid?: pb<2, string>; title?: pb<3, string>; desc?: pb<4, string>; picUrl?: pb<9, string>; jumpUrl?: pb<11, string>; iconUrl?: pb<12, string>; }
|
||||
export interface MiniAppShareReq { sdkVersion?: pb<2, string>; body?: pb<4, MiniAppShareReqBody>; }
|
||||
export interface MiniAppShareRespBody { jsonStr?: pb<2, string>; }
|
||||
export interface MiniAppShareResp { status?: pb<2, uint_32>; msg?: pb<3, string>; body?: pb<4, MiniAppShareRespBody>; }
|
||||
export interface Oidb0x112eReq { botAppid?: pb<3, uint_64>; msgSeq?: pb<4, uint_64>; buttonId?: pb<5, string>; callbackData?: pb<6, string>; unknown7?: pb<7, uint_32>; groupId?: pb<8, uint_64>; unknown9?: pb<9, uint_32>; }
|
||||
export interface Oidb0x112eResp { result?: pb<3, uint_32>; promptText?: pb<4, string>; errMsg?: pb<5, string>; }
|
||||
export interface Oidb0xeb7SignInInfo { uin?: pb<1, string>; groupId?: pb<2, string>; version?: pb<3, string>; }
|
||||
export interface Oidb0xeb7Req { signInInfo?: pb<2, Oidb0xeb7SignInInfo>; }
|
||||
export interface Oidb0x990TranslateReq {
|
||||
srcLang?: pb<1, string>;
|
||||
dstLang?: pb<2, string>;
|
||||
words?: pb_repeated<3, string>;
|
||||
}
|
||||
export interface Oidb0x990Req {
|
||||
translateReq?: pb<2, Oidb0x990TranslateReq>;
|
||||
tag10?: pb<10, uint_32>;
|
||||
tag12?: pb<12, uint_32>;
|
||||
}
|
||||
export interface Oidb0x990TranslateResp {
|
||||
errorCode?: pb<1, uint_32>;
|
||||
errorMsg?: pb<2, string>;
|
||||
srcLang?: pb<3, string>;
|
||||
dstLang?: pb<4, string>;
|
||||
srcWords?: pb_repeated<5, string>;
|
||||
dstWords?: pb_repeated<6, string>;
|
||||
}
|
||||
export interface Oidb0x990Resp {
|
||||
translateResp?: pb<2, Oidb0x990TranslateResp>;
|
||||
}
|
||||
export interface MiniAppShareReqBody {
|
||||
appid?: pb<2, string>;
|
||||
title?: pb<3, string>;
|
||||
desc?: pb<4, string>;
|
||||
picUrl?: pb<9, string>;
|
||||
jumpUrl?: pb<11, string>;
|
||||
iconUrl?: pb<12, string>;
|
||||
}
|
||||
export interface MiniAppShareReq {
|
||||
sdkVersion?: pb<2, string>;
|
||||
body?: pb<4, MiniAppShareReqBody>;
|
||||
}
|
||||
export interface MiniAppShareRespBody {
|
||||
jsonStr?: pb<2, string>;
|
||||
}
|
||||
export interface MiniAppShareResp {
|
||||
status?: pb<2, uint_32>;
|
||||
msg?: pb<3, string>;
|
||||
body?: pb<4, MiniAppShareRespBody>;
|
||||
}
|
||||
export interface Oidb0x112eReq {
|
||||
botAppid?: pb<3, uint_64>;
|
||||
msgSeq?: pb<4, uint_64>;
|
||||
buttonId?: pb<5, string>;
|
||||
callbackData?: pb<6, string>;
|
||||
unknown7?: pb<7, uint_32>;
|
||||
groupId?: pb<8, uint_64>;
|
||||
unknown9?: pb<9, uint_32>;
|
||||
}
|
||||
export interface Oidb0x112eResp {
|
||||
result?: pb<3, uint_32>;
|
||||
promptText?: pb<4, string>;
|
||||
errMsg?: pb<5, string>;
|
||||
}
|
||||
export interface Oidb0xeb7SignInInfo {
|
||||
uin?: pb<1, string>;
|
||||
groupId?: pb<2, string>;
|
||||
version?: pb<3, string>;
|
||||
}
|
||||
export interface Oidb0xeb7Req {
|
||||
signInInfo?: pb<2, Oidb0xeb7SignInInfo>;
|
||||
}
|
||||
export interface Oidb0xeb7Resp {}
|
||||
export interface FaceroamOpReqInner { field1?: pb<1, uint_32>; osVersion?: pb<2, string>; qqVersion?: pb<3, string>; }
|
||||
export interface FaceroamOpReq { inner?: pb<1, FaceroamOpReqInner>; uin?: pb<2, uint_64>; field3?: pb<3, uint_32>; field6?: pb<6, uint_32>; }
|
||||
export interface FaceroamOpRespItem { faceIds?: pb_repeated<1, string>; category?: pb<3, string>; totalCount?: pb<4, uint_32>; }
|
||||
export interface FaceroamOpResp { retCode?: pb<1, uint_32>; message?: pb<2, string>; field3?: pb<3, uint_32>; item?: pb<4, FaceroamOpRespItem>; }
|
||||
export interface Oidb0x9083Req { groupId?: pb<2, uint_64>; sequence?: pb<3, uint_32>; emojiType?: pb<4, uint_32>; emojiId?: pb<5, string>; cookie?: pb<6, bytes>; field7?: pb<7, uint_32>; count?: pb<8, uint_32>; field12?: pb<12, uint_32>; }
|
||||
export interface Oidb0x9083RespUserInfo { uin?: pb<1, uint_64>; field3?: pb<3, uint_32>; }
|
||||
export interface Oidb0x9083RespInner { userInfo?: pb<1, Oidb0x9083RespUserInfo>; field4?: pb<4, uint_32>; }
|
||||
export interface Oidb0x9083Resp { inner?: pb<4, Oidb0x9083RespInner>; cookie?: pb<5, bytes>; }
|
||||
export interface Oidb0x8a0Req { groupId?: pb<1, uint_64>; targetUids?: pb_repeated<3, string>; rejectAddRequest?: pb<4, uint_32>; kickReason?: pb<5, bytes>; field12?: pb<12, uint_32>; }
|
||||
export interface FaceroamOpReqInner {
|
||||
field1?: pb<1, uint_32>;
|
||||
osVersion?: pb<2, string>;
|
||||
qqVersion?: pb<3, string>;
|
||||
}
|
||||
export interface FaceroamOpReq {
|
||||
inner?: pb<1, FaceroamOpReqInner>;
|
||||
uin?: pb<2, uint_64>;
|
||||
field3?: pb<3, uint_32>;
|
||||
field6?: pb<6, uint_32>;
|
||||
}
|
||||
export interface FaceroamOpRespItem {
|
||||
faceIds?: pb_repeated<1, string>;
|
||||
category?: pb<3, string>;
|
||||
totalCount?: pb<4, uint_32>;
|
||||
}
|
||||
export interface FaceroamOpResp {
|
||||
retCode?: pb<1, uint_32>;
|
||||
message?: pb<2, string>;
|
||||
field3?: pb<3, uint_32>;
|
||||
item?: pb<4, FaceroamOpRespItem>;
|
||||
}
|
||||
export interface Oidb0x9083Req {
|
||||
groupId?: pb<2, uint_64>;
|
||||
sequence?: pb<3, uint_32>;
|
||||
emojiType?: pb<4, uint_32>;
|
||||
emojiId?: pb<5, string>;
|
||||
cookie?: pb<6, bytes>;
|
||||
field7?: pb<7, uint_32>;
|
||||
count?: pb<8, uint_32>;
|
||||
field12?: pb<12, uint_32>;
|
||||
}
|
||||
export interface Oidb0x9083RespUserInfo {
|
||||
uin?: pb<1, uint_64>;
|
||||
field3?: pb<3, uint_32>;
|
||||
}
|
||||
export interface Oidb0x9083RespInner {
|
||||
userInfo?: pb<1, Oidb0x9083RespUserInfo>;
|
||||
field4?: pb<4, uint_32>;
|
||||
}
|
||||
export interface Oidb0x9083Resp {
|
||||
inner?: pb<4, Oidb0x9083RespInner>;
|
||||
cookie?: pb<5, bytes>;
|
||||
}
|
||||
export interface Oidb0x8a0Req {
|
||||
groupId?: pb<1, uint_64>;
|
||||
targetUids?: pb_repeated<3, string>;
|
||||
rejectAddRequest?: pb<4, uint_32>;
|
||||
kickReason?: pb<5, bytes>;
|
||||
field12?: pb<12, uint_32>;
|
||||
}
|
||||
export interface Oidb0x8a0Resp {}
|
||||
export interface Oidb0xf16Inner { groupId?: pb<1, uint_64>; remark?: pb<3, string>; }
|
||||
export interface Oidb0xf16Req { inner?: pb<1, Oidb0xf16Inner>; field12?: pb<12, uint_32>; }
|
||||
export interface Oidb0xf16Inner {
|
||||
groupId?: pb<1, uint_64>;
|
||||
remark?: pb<3, string>;
|
||||
}
|
||||
export interface Oidb0xf16Req {
|
||||
inner?: pb<1, Oidb0xf16Inner>;
|
||||
field12?: pb<12, uint_32>;
|
||||
}
|
||||
export interface Oidb0xf16Resp {}
|
||||
export interface OidbGroupTodo { groupUin?: pb<1, uint_32>; msgSeq?: pb<2, uint_64>; }
|
||||
export interface OidbStrangerStatusKey { key?: pb<1, uint_32>; }
|
||||
export interface OidbStrangerStatusReq { uin?: pb<1, uint_32>; key?: pb_repeated<3, OidbStrangerStatusKey>; }
|
||||
export interface OidbSetFriendRemark { targetUid?: pb<1, string>; remark?: pb<2, string>; }
|
||||
export interface OidbStrangerStatusRespStatus { key?: pb<1, uint_32>; value?: pb<2, uint_64>; }
|
||||
export interface OidbStrangerStatusRespData { status?: pb<2, OidbStrangerStatusRespStatus>; }
|
||||
export interface OidbStrangerStatusResp { data?: pb<1, OidbStrangerStatusRespData>; }
|
||||
export interface GroupAvatarExtraField3 { field1?: pb<1, uint_32>; }
|
||||
export interface GroupAvatarExtra { type?: pb<1, uint_32>; groupUin?: pb<2, uint_32>; field3?: pb<3, GroupAvatarExtraField3>; field5?: pb<5, uint_32>; field6?: pb<6, uint_32>; }
|
||||
export interface OidbGroupTodo {
|
||||
groupUin?: pb<1, uint_32>;
|
||||
msgSeq?: pb<2, uint_64>;
|
||||
}
|
||||
export interface OidbStrangerStatusKey {
|
||||
key?: pb<1, uint_32>;
|
||||
}
|
||||
export interface OidbStrangerStatusReq {
|
||||
uin?: pb<1, uint_32>;
|
||||
key?: pb_repeated<3, OidbStrangerStatusKey>;
|
||||
}
|
||||
export interface OidbSetFriendRemark {
|
||||
targetUid?: pb<1, string>;
|
||||
remark?: pb<2, string>;
|
||||
}
|
||||
export interface OidbStrangerStatusRespStatus {
|
||||
key?: pb<1, uint_32>;
|
||||
value?: pb<2, uint_64>;
|
||||
}
|
||||
export interface OidbStrangerStatusRespData {
|
||||
status?: pb<2, OidbStrangerStatusRespStatus>;
|
||||
}
|
||||
export interface OidbStrangerStatusResp {
|
||||
data?: pb<1, OidbStrangerStatusRespData>;
|
||||
}
|
||||
export interface GroupAvatarExtraField3 {
|
||||
field1?: pb<1, uint_32>;
|
||||
}
|
||||
export interface GroupAvatarExtra {
|
||||
type?: pb<1, uint_32>;
|
||||
groupUin?: pb<2, uint_32>;
|
||||
field3?: pb<3, GroupAvatarExtraField3>;
|
||||
field5?: pb<5, uint_32>;
|
||||
field6?: pb<6, uint_32>;
|
||||
}
|
||||
@@ -1,43 +1,216 @@
|
||||
import type { pb, pb_repeated, int_32, uint_32, uint_64, bool, bytes } from '@snowluma/proton';
|
||||
|
||||
export interface ExtMapEntry { key?: pb<1, string>; value?: pb<2, string>; }
|
||||
export interface ReqInfo { groupId?: pb<1, string>; albumId?: pb<2, string>; field3?: pb<3, int_32>; attachInfo?: pb<4, string>; field5?: pb<5, string>; }
|
||||
export interface GetMediaListRequest { field1?: pb<1, int_32>; field2?: pb<2, bytes>; field3?: pb<3, bytes>; reqInfo?: pb<4, ReqInfo>; traceId?: pb<5, string>; extMap?: pb_repeated<10, ExtMapEntry>; }
|
||||
export interface UrlInfo { url?: pb<1, string>; width?: pb<2, uint_32>; height?: pb<3, uint_32>; }
|
||||
export interface PhotoUrl { spec?: pb<1, uint_32>; url?: pb<2, UrlInfo>; }
|
||||
export interface ImageInfo { name?: pb<1, string>; sloc?: pb<2, string>; lloc?: pb<3, string>; photoUrls?: pb_repeated<4, PhotoUrl>; defaultUrl?: pb<5, UrlInfo>; isGif?: pb<6, bool>; hasRaw?: pb<7, bool>; }
|
||||
export interface MediaInfo { type?: pb<1, uint_32>; image?: pb<2, ImageInfo>; uploader?: pb<6, string>; batchId?: pb<7, uint_64>; uploadTime?: pb<8, uint_64>; }
|
||||
export interface GetMediaListAlbumInfo { albumId?: pb<1, string>; owner?: pb<2, string>; name?: pb<3, string>; }
|
||||
export interface GetMediaListRspData { albumInfo?: pb<1, GetMediaListAlbumInfo>; mediaList?: pb_repeated<3, MediaInfo>; prevAttachInfo?: pb<4, string>; nextAttachInfo?: pb<5, string>; }
|
||||
export interface GetMediaListResponse { field1?: pb<1, int_32>; field2?: pb<2, bytes>; field3?: pb<3, bytes>; data?: pb<4, GetMediaListRspData>; }
|
||||
export interface CommentContentItem { type?: pb<1, uint_32>; content?: pb<2, string>; }
|
||||
export interface CommentUser { uin?: pb<13, string>; }
|
||||
export interface CommentReqContentMeta { field1?: pb<1, uint_32>; field2?: pb<2, string>; field3?: pb<3, string>; field4?: pb<4, string>; field5?: pb<5, uint_32>; field6?: pb<6, string>; }
|
||||
export interface CommentReqContent { field2?: pb<2, CommentUser>; field3?: pb<3, CommentReqContentMeta>; clientKey?: pb<7, string>; }
|
||||
export interface CommentReqPhotoMeta { field1?: pb<1, uint_32>; field2?: pb<2, string>; lloc?: pb<3, string>; field4?: pb<4, string>; field6?: pb<6, string>; field7?: pb<7, uint_32>; field8?: pb<8, uint_32>; field9?: pb<9, uint_32>; field14?: pb<14, uint_32>; field15?: pb<15, uint_32>; field17?: pb<17, uint_32>; }
|
||||
export interface CommentReqPhotoWrap { field2?: pb<2, CommentReqPhotoMeta>; }
|
||||
export interface CommentReqPhotoInfo { field1?: pb<1, CommentReqPhotoWrap>; albumId?: pb<3, string>; field5?: pb<5, uint_32>; }
|
||||
export interface CommentReqBodyHeader { field3?: pb<3, uint_32>; field4?: pb<4, string>; }
|
||||
export interface CommentReqBodyUserWrap { field1?: pb<1, CommentUser>; }
|
||||
export interface CommentReqBody { field1?: pb<1, CommentReqBodyHeader>; field2?: pb<2, CommentReqBodyUserWrap>; field5?: pb<5, CommentReqPhotoInfo>; }
|
||||
export interface DoQunCommentRequestBody { groupId?: pb<2, string>; field3?: pb<3, uint_32>; reqBody?: pb<4, CommentReqBody>; field5?: pb<5, CommentReqContent>; }
|
||||
export interface DoQunCommentRequest { field1?: pb<1, int_32>; field2?: pb<2, bytes>; field3?: pb<3, bytes>; body?: pb<4, DoQunCommentRequestBody>; traceId?: pb<5, string>; extMap?: pb_repeated<10, ExtMapEntry>; }
|
||||
export interface CommentRespUser { uin?: pb<13, string>; }
|
||||
export interface CommentRespContent { type?: pb<1, uint_32>; content?: pb<2, string>; }
|
||||
export interface CommentRespData { id?: pb<1, string>; user?: pb<2, CommentRespUser>; content?: pb_repeated<3, CommentRespContent>; time?: pb<4, uint_64>; clientKey?: pb<7, string>; }
|
||||
export interface DoQunCommentResponseComment { data?: pb<2, CommentRespData>; }
|
||||
export interface DoQunCommentResponse { field1?: pb<1, int_32>; comment?: pb<4, DoQunCommentResponseComment>; }
|
||||
export interface DoQunLikeReqLikeInfo { id?: pb<1, string>; status?: pb<3, uint_32>; }
|
||||
export interface DoQunLikeReqCellCommon { time?: pb<3, uint_64>; feedId?: pb<4, string>; }
|
||||
export interface DoQunLikeReqCellUser { uin?: pb<13, string>; }
|
||||
export interface DoQunLikeReqCellUserInfo { user?: pb<1, DoQunLikeReqCellUser>; }
|
||||
export interface DoQunLikeReqCellQunInfo { qunId?: pb<1, string>; }
|
||||
export interface DoQunLikeReqCellMedia { albumId?: pb<3, string>; batchId?: pb<5, uint_64>; }
|
||||
export interface DoQunLikeReqFeedPublish { cellCommon?: pb<1, DoQunLikeReqCellCommon>; cellUserInfo?: pb<2, DoQunLikeReqCellUserInfo>; cellMedia?: pb<5, DoQunLikeReqCellMedia>; cellQunInfo?: pb<12, DoQunLikeReqCellQunInfo>; }
|
||||
export interface DoQunLikeReqBody { type?: pb<2, uint_32>; like?: pb<3, DoQunLikeReqLikeInfo>; publish?: pb<4, DoQunLikeReqFeedPublish>; clientKey?: pb<5, string>; }
|
||||
export interface DoQunLikeRequest { field1?: pb<1, int_32>; field2?: pb<2, string>; field3?: pb<3, string>; body?: pb<4, DoQunLikeReqBody>; extMap?: pb_repeated<10, ExtMapEntry>; }
|
||||
export interface DoQunLikeRespBody { like?: pb<2, DoQunLikeReqLikeInfo>; }
|
||||
export interface DoQunLikeResponse { field1?: pb<1, int_32>; body?: pb<4, DoQunLikeRespBody>; }
|
||||
export interface DeleteMediasReqBody { groupId?: pb<1, string>; albumId?: pb<2, string>; lloc?: pb<3, string>; }
|
||||
export interface DeleteMediasRequest { field1?: pb<1, int_32>; field2?: pb<2, string>; field3?: pb<3, string>; body?: pb<4, DeleteMediasReqBody>; traceId?: pb<5, string>; extMap?: pb_repeated<10, ExtMapEntry>; }
|
||||
export interface DeleteMediasResponse { field1?: pb<1, int_32>; field2?: pb<2, int_32>; field3?: pb<3, string>; }
|
||||
export interface ExtMapEntry {
|
||||
key?: pb<1, string>;
|
||||
value?: pb<2, string>;
|
||||
}
|
||||
export interface ReqInfo {
|
||||
groupId?: pb<1, string>;
|
||||
albumId?: pb<2, string>;
|
||||
field3?: pb<3, int_32>;
|
||||
attachInfo?: pb<4, string>;
|
||||
field5?: pb<5, string>;
|
||||
}
|
||||
export interface GetMediaListRequest {
|
||||
field1?: pb<1, int_32>;
|
||||
field2?: pb<2, bytes>;
|
||||
field3?: pb<3, bytes>;
|
||||
reqInfo?: pb<4, ReqInfo>;
|
||||
traceId?: pb<5, string>;
|
||||
extMap?: pb_repeated<10, ExtMapEntry>;
|
||||
}
|
||||
export interface UrlInfo {
|
||||
url?: pb<1, string>;
|
||||
width?: pb<2, uint_32>;
|
||||
height?: pb<3, uint_32>;
|
||||
}
|
||||
export interface PhotoUrl {
|
||||
spec?: pb<1, uint_32>;
|
||||
url?: pb<2, UrlInfo>;
|
||||
}
|
||||
export interface ImageInfo {
|
||||
name?: pb<1, string>;
|
||||
sloc?: pb<2, string>;
|
||||
lloc?: pb<3, string>;
|
||||
photoUrls?: pb_repeated<4, PhotoUrl>;
|
||||
defaultUrl?: pb<5, UrlInfo>;
|
||||
isGif?: pb<6, bool>;
|
||||
hasRaw?: pb<7, bool>;
|
||||
}
|
||||
export interface MediaInfo {
|
||||
type?: pb<1, uint_32>;
|
||||
image?: pb<2, ImageInfo>;
|
||||
uploader?: pb<6, string>;
|
||||
batchId?: pb<7, uint_64>;
|
||||
uploadTime?: pb<8, uint_64>;
|
||||
}
|
||||
export interface GetMediaListAlbumInfo {
|
||||
albumId?: pb<1, string>;
|
||||
owner?: pb<2, string>;
|
||||
name?: pb<3, string>;
|
||||
}
|
||||
export interface GetMediaListRspData {
|
||||
albumInfo?: pb<1, GetMediaListAlbumInfo>;
|
||||
mediaList?: pb_repeated<3, MediaInfo>;
|
||||
prevAttachInfo?: pb<4, string>;
|
||||
nextAttachInfo?: pb<5, string>;
|
||||
}
|
||||
export interface GetMediaListResponse {
|
||||
field1?: pb<1, int_32>;
|
||||
field2?: pb<2, bytes>;
|
||||
field3?: pb<3, bytes>;
|
||||
data?: pb<4, GetMediaListRspData>;
|
||||
}
|
||||
export interface CommentContentItem {
|
||||
type?: pb<1, uint_32>;
|
||||
content?: pb<2, string>;
|
||||
}
|
||||
export interface CommentUser {
|
||||
uin?: pb<13, string>;
|
||||
}
|
||||
export interface CommentReqContentMeta {
|
||||
field1?: pb<1, uint_32>;
|
||||
field2?: pb<2, string>;
|
||||
field3?: pb<3, string>;
|
||||
field4?: pb<4, string>;
|
||||
field5?: pb<5, uint_32>;
|
||||
field6?: pb<6, string>;
|
||||
}
|
||||
export interface CommentReqContent {
|
||||
field2?: pb<2, CommentUser>;
|
||||
field3?: pb<3, CommentReqContentMeta>;
|
||||
clientKey?: pb<7, string>;
|
||||
}
|
||||
export interface CommentReqPhotoMeta {
|
||||
field1?: pb<1, uint_32>;
|
||||
field2?: pb<2, string>;
|
||||
lloc?: pb<3, string>;
|
||||
field4?: pb<4, string>;
|
||||
field6?: pb<6, string>;
|
||||
field7?: pb<7, uint_32>;
|
||||
field8?: pb<8, uint_32>;
|
||||
field9?: pb<9, uint_32>;
|
||||
field14?: pb<14, uint_32>;
|
||||
field15?: pb<15, uint_32>;
|
||||
field17?: pb<17, uint_32>;
|
||||
}
|
||||
export interface CommentReqPhotoWrap {
|
||||
field2?: pb<2, CommentReqPhotoMeta>;
|
||||
}
|
||||
export interface CommentReqPhotoInfo {
|
||||
field1?: pb<1, CommentReqPhotoWrap>;
|
||||
albumId?: pb<3, string>;
|
||||
field5?: pb<5, uint_32>;
|
||||
}
|
||||
export interface CommentReqBodyHeader {
|
||||
field3?: pb<3, uint_32>;
|
||||
field4?: pb<4, string>;
|
||||
}
|
||||
export interface CommentReqBodyUserWrap {
|
||||
field1?: pb<1, CommentUser>;
|
||||
}
|
||||
export interface CommentReqBody {
|
||||
field1?: pb<1, CommentReqBodyHeader>;
|
||||
field2?: pb<2, CommentReqBodyUserWrap>;
|
||||
field5?: pb<5, CommentReqPhotoInfo>;
|
||||
}
|
||||
export interface DoQunCommentRequestBody {
|
||||
groupId?: pb<2, string>;
|
||||
field3?: pb<3, uint_32>;
|
||||
reqBody?: pb<4, CommentReqBody>;
|
||||
field5?: pb<5, CommentReqContent>;
|
||||
}
|
||||
export interface DoQunCommentRequest {
|
||||
field1?: pb<1, int_32>;
|
||||
field2?: pb<2, bytes>;
|
||||
field3?: pb<3, bytes>;
|
||||
body?: pb<4, DoQunCommentRequestBody>;
|
||||
traceId?: pb<5, string>;
|
||||
extMap?: pb_repeated<10, ExtMapEntry>;
|
||||
}
|
||||
export interface CommentRespUser {
|
||||
uin?: pb<13, string>;
|
||||
}
|
||||
export interface CommentRespContent {
|
||||
type?: pb<1, uint_32>;
|
||||
content?: pb<2, string>;
|
||||
}
|
||||
export interface CommentRespData {
|
||||
id?: pb<1, string>;
|
||||
user?: pb<2, CommentRespUser>;
|
||||
content?: pb_repeated<3, CommentRespContent>;
|
||||
time?: pb<4, uint_64>;
|
||||
clientKey?: pb<7, string>;
|
||||
}
|
||||
export interface DoQunCommentResponseComment {
|
||||
data?: pb<2, CommentRespData>;
|
||||
}
|
||||
export interface DoQunCommentResponse {
|
||||
field1?: pb<1, int_32>;
|
||||
comment?: pb<4, DoQunCommentResponseComment>;
|
||||
}
|
||||
export interface DoQunLikeReqLikeInfo {
|
||||
id?: pb<1, string>;
|
||||
status?: pb<3, uint_32>;
|
||||
}
|
||||
export interface DoQunLikeReqCellCommon {
|
||||
time?: pb<3, uint_64>;
|
||||
feedId?: pb<4, string>;
|
||||
}
|
||||
export interface DoQunLikeReqCellUser {
|
||||
uin?: pb<13, string>;
|
||||
}
|
||||
export interface DoQunLikeReqCellUserInfo {
|
||||
user?: pb<1, DoQunLikeReqCellUser>;
|
||||
}
|
||||
export interface DoQunLikeReqCellQunInfo {
|
||||
qunId?: pb<1, string>;
|
||||
}
|
||||
export interface DoQunLikeReqCellMedia {
|
||||
albumId?: pb<3, string>;
|
||||
batchId?: pb<5, uint_64>;
|
||||
}
|
||||
export interface DoQunLikeReqFeedPublish {
|
||||
cellCommon?: pb<1, DoQunLikeReqCellCommon>;
|
||||
cellUserInfo?: pb<2, DoQunLikeReqCellUserInfo>;
|
||||
cellMedia?: pb<5, DoQunLikeReqCellMedia>;
|
||||
cellQunInfo?: pb<12, DoQunLikeReqCellQunInfo>;
|
||||
}
|
||||
export interface DoQunLikeReqBody {
|
||||
type?: pb<2, uint_32>;
|
||||
like?: pb<3, DoQunLikeReqLikeInfo>;
|
||||
publish?: pb<4, DoQunLikeReqFeedPublish>;
|
||||
clientKey?: pb<5, string>;
|
||||
}
|
||||
export interface DoQunLikeRequest {
|
||||
field1?: pb<1, int_32>;
|
||||
field2?: pb<2, string>;
|
||||
field3?: pb<3, string>;
|
||||
body?: pb<4, DoQunLikeReqBody>;
|
||||
extMap?: pb_repeated<10, ExtMapEntry>;
|
||||
}
|
||||
export interface DoQunLikeRespBody {
|
||||
like?: pb<2, DoQunLikeReqLikeInfo>;
|
||||
}
|
||||
export interface DoQunLikeResponse {
|
||||
field1?: pb<1, int_32>;
|
||||
body?: pb<4, DoQunLikeRespBody>;
|
||||
}
|
||||
export interface DeleteMediasReqBody {
|
||||
groupId?: pb<1, string>;
|
||||
albumId?: pb<2, string>;
|
||||
lloc?: pb<3, string>;
|
||||
}
|
||||
export interface DeleteMediasRequest {
|
||||
field1?: pb<1, int_32>;
|
||||
field2?: pb<2, string>;
|
||||
field3?: pb<3, string>;
|
||||
body?: pb<4, DeleteMediasReqBody>;
|
||||
traceId?: pb<5, string>;
|
||||
extMap?: pb_repeated<10, ExtMapEntry>;
|
||||
}
|
||||
export interface DeleteMediasResponse {
|
||||
field1?: pb<1, int_32>;
|
||||
field2?: pb<2, int_32>;
|
||||
field3?: pb<3, string>;
|
||||
}
|
||||
@@ -1,31 +1,185 @@
|
||||
import type { pb, pb_repeated, int_32, uint_32, uint_64, bool, bytes } from '@snowluma/proton';
|
||||
|
||||
export interface OidbGroupFileListReq { groupUin?: pb<1, uint_32>; appId?: pb<2, uint_32>; targetDirectory?: pb<3, string>; fileCount?: pb<5, uint_32>; sortBy?: pb<9, uint_32>; startIndex?: pb<13, uint_32>; field17?: pb<17, uint_32>; field18?: pb<18, uint_32>; }
|
||||
export interface OidbGroupFileViewReq { list?: pb<2, OidbGroupFileListReq>; }
|
||||
export interface OidbGroupFileListFolderResp { folderId?: pb<1, string>; parentDirectoryId?: pb<2, string>; folderName?: pb<3, string>; createTime?: pb<4, uint_32>; modifiedTime?: pb<5, uint_32>; creatorUin?: pb<6, uint_32>; creatorName?: pb<7, string>; totalFileCount?: pb<8, uint_32>; }
|
||||
export interface OidbGroupFileListFileResp { fileId?: pb<1, string>; fileName?: pb<2, string>; fileSize?: pb<3, uint_64>; busId?: pb<4, uint_32>; uploadedTime?: pb<6, uint_32>; expireTime?: pb<7, uint_32>; modifiedTime?: pb<8, uint_32>; downloadedTimes?: pb<9, uint_32>; uploaderName?: pb<14, string>; uploaderUin?: pb<15, uint_32>; parentDirectory?: pb<16, string>; }
|
||||
export interface OidbGroupFileListItemResp { type?: pb<1, uint_32>; folderInfo?: pb<2, OidbGroupFileListFolderResp>; fileInfo?: pb<3, OidbGroupFileListFileResp>; }
|
||||
export interface OidbGroupFileListResp { retCode?: pb<1, uint_32>; retMsg?: pb<2, string>; clientWording?: pb<3, string>; isEnd?: pb<4, bool>; items?: pb_repeated<5, OidbGroupFileListItemResp>; }
|
||||
export interface OidbGroupFileViewResp { list?: pb<2, OidbGroupFileListResp>; }
|
||||
export interface OidbGroupFileUploadReq { groupUin?: pb<1, uint_32>; appId?: pb<2, uint_32>; busId?: pb<3, uint_32>; entrance?: pb<4, uint_32>; targetDirectory?: pb<5, string>; fileName?: pb<6, string>; localDirectory?: pb<7, string>; fileSize?: pb<8, uint_64>; fileSha1?: pb<9, bytes>; fileSha3?: pb<10, bytes>; fileMd5?: pb<11, bytes>; field15?: pb<15, bool>; }
|
||||
export interface OidbGroupFileDownloadReq { groupUin?: pb<1, uint_32>; appId?: pb<2, uint_32>; busId?: pb<3, uint_32>; fileId?: pb<4, string>; }
|
||||
export interface OidbGroupFileDeleteReq { groupUin?: pb<1, uint_32>; busId?: pb<3, uint_32>; fileId?: pb<5, string>; }
|
||||
export interface OidbGroupFileMoveReq { groupUin?: pb<1, uint_32>; appId?: pb<2, uint_32>; busId?: pb<3, uint_32>; fileId?: pb<4, string>; parentDirectory?: pb<5, string>; targetDirectory?: pb<6, string>; }
|
||||
export interface OidbGroupFileReq { file?: pb<1, OidbGroupFileUploadReq>; download?: pb<3, OidbGroupFileDownloadReq>; delete?: pb<4, OidbGroupFileDeleteReq>; move?: pb<6, OidbGroupFileMoveReq>; }
|
||||
export interface OidbGroupFileUploadResp { retCode?: pb<1, int_32>; retMsg?: pb<2, string>; clientWording?: pb<3, string>; uploadIp?: pb<4, string>; serverDns?: pb<5, string>; busId?: pb<6, int_32>; fileId?: pb<7, string>; checkKey?: pb<8, bytes>; fileKey?: pb<9, bytes>; boolFileExist?: pb<10, bool>; uploadPort?: pb<14, uint_32>; }
|
||||
export interface OidbGroupFileDownloadResp { retCode?: pb<1, uint_32>; retMsg?: pb<2, string>; clientWording?: pb<3, string>; downloadIp?: pb<4, string>; downloadDns?: pb<5, string>; downloadUrl?: pb<6, bytes>; saveFileName?: pb<11, string>; }
|
||||
export interface OidbGroupFileRetResp { retCode?: pb<1, uint_32>; retMsg?: pb<2, string>; clientWording?: pb<3, string>; }
|
||||
export interface OidbGroupFileResp { upload?: pb<1, OidbGroupFileUploadResp>; download?: pb<3, OidbGroupFileDownloadResp>; delete?: pb<4, OidbGroupFileRetResp>; move?: pb<6, OidbGroupFileRetResp>; }
|
||||
export interface OidbGroupSendFileInfo { busiType?: pb<1, uint_32>; fileId?: pb<2, string>; field3?: pb<3, uint_32>; field4?: pb<4, string>; field5?: pb<5, bool>; }
|
||||
export interface OidbGroupSendFileBody { groupUin?: pb<1, uint_32>; type?: pb<2, uint_32>; info?: pb<3, OidbGroupSendFileInfo>; }
|
||||
export interface OidbGroupSendFileReq { body?: pb<5, OidbGroupSendFileBody>; }
|
||||
export interface OidbGroupFileCreateFolderReq { groupUin?: pb<1, uint_32>; rootDirectory?: pb<3, string>; folderName?: pb<4, string>; }
|
||||
export interface OidbGroupFileDeleteFolderReq { groupUin?: pb<1, uint_32>; folderId?: pb<3, string>; }
|
||||
export interface OidbGroupFileRenameFolderReq { groupUin?: pb<1, uint_32>; folderId?: pb<3, string>; newFolderName?: pb<4, string>; }
|
||||
export interface OidbGroupFileFolderReq { create?: pb<1, OidbGroupFileCreateFolderReq>; delete?: pb<2, OidbGroupFileDeleteFolderReq>; rename?: pb<3, OidbGroupFileRenameFolderReq>; }
|
||||
export interface OidbGroupFileFolderRetResp { retcode?: pb<1, uint_32>; retMsg?: pb<2, string>; clientWording?: pb<3, string>; }
|
||||
export interface OidbGroupFileFolderResp { create?: pb<1, OidbGroupFileFolderRetResp>; delete?: pb<2, OidbGroupFileFolderRetResp>; rename?: pb<3, OidbGroupFileFolderRetResp>; }
|
||||
export interface OidbGroupFileCountReq { groupUin?: pb<1, uint_32>; appId?: pb<2, uint_32>; busId?: pb<3, uint_32>; }
|
||||
export interface OidbGroupFileCountResp { fileCount?: pb<1, uint_32>; maxCount?: pb<2, uint_32>; isEnd?: pb<3, bool>; }
|
||||
export interface OidbGroupFileCountViewReq { count?: pb<3, OidbGroupFileCountReq>; }
|
||||
export interface OidbGroupFileCountViewResp { count?: pb<3, OidbGroupFileCountResp>; }
|
||||
export interface OidbGroupFileListReq {
|
||||
groupUin?: pb<1, uint_32>;
|
||||
appId?: pb<2, uint_32>;
|
||||
targetDirectory?: pb<3, string>;
|
||||
fileCount?: pb<5, uint_32>;
|
||||
sortBy?: pb<9, uint_32>;
|
||||
startIndex?: pb<13, uint_32>;
|
||||
field17?: pb<17, uint_32>;
|
||||
field18?: pb<18, uint_32>;
|
||||
}
|
||||
export interface OidbGroupFileViewReq {
|
||||
list?: pb<2, OidbGroupFileListReq>;
|
||||
}
|
||||
export interface OidbGroupFileListFolderResp {
|
||||
folderId?: pb<1, string>;
|
||||
parentDirectoryId?: pb<2, string>;
|
||||
folderName?: pb<3, string>;
|
||||
createTime?: pb<4, uint_32>;
|
||||
modifiedTime?: pb<5, uint_32>;
|
||||
creatorUin?: pb<6, uint_32>;
|
||||
creatorName?: pb<7, string>;
|
||||
totalFileCount?: pb<8, uint_32>;
|
||||
}
|
||||
export interface OidbGroupFileListFileResp {
|
||||
fileId?: pb<1, string>;
|
||||
fileName?: pb<2, string>;
|
||||
fileSize?: pb<3, uint_64>;
|
||||
busId?: pb<4, uint_32>;
|
||||
uploadedTime?: pb<6, uint_32>;
|
||||
expireTime?: pb<7, uint_32>;
|
||||
modifiedTime?: pb<8, uint_32>;
|
||||
downloadedTimes?: pb<9, uint_32>;
|
||||
uploaderName?: pb<14, string>;
|
||||
uploaderUin?: pb<15, uint_32>;
|
||||
parentDirectory?: pb<16, string>;
|
||||
}
|
||||
export interface OidbGroupFileListItemResp {
|
||||
type?: pb<1, uint_32>;
|
||||
folderInfo?: pb<2, OidbGroupFileListFolderResp>;
|
||||
fileInfo?: pb<3, OidbGroupFileListFileResp>;
|
||||
}
|
||||
export interface OidbGroupFileListResp {
|
||||
retCode?: pb<1, uint_32>;
|
||||
retMsg?: pb<2, string>;
|
||||
clientWording?: pb<3, string>;
|
||||
isEnd?: pb<4, bool>;
|
||||
items?: pb_repeated<5, OidbGroupFileListItemResp>;
|
||||
}
|
||||
export interface OidbGroupFileViewResp {
|
||||
list?: pb<2, OidbGroupFileListResp>;
|
||||
}
|
||||
export interface OidbGroupFileUploadReq {
|
||||
groupUin?: pb<1, uint_32>;
|
||||
appId?: pb<2, uint_32>;
|
||||
busId?: pb<3, uint_32>;
|
||||
entrance?: pb<4, uint_32>;
|
||||
targetDirectory?: pb<5, string>;
|
||||
fileName?: pb<6, string>;
|
||||
localDirectory?: pb<7, string>;
|
||||
fileSize?: pb<8, uint_64>;
|
||||
fileSha1?: pb<9, bytes>;
|
||||
fileSha3?: pb<10, bytes>;
|
||||
fileMd5?: pb<11, bytes>;
|
||||
field15?: pb<15, bool>;
|
||||
}
|
||||
export interface OidbGroupFileDownloadReq {
|
||||
groupUin?: pb<1, uint_32>;
|
||||
appId?: pb<2, uint_32>;
|
||||
busId?: pb<3, uint_32>;
|
||||
fileId?: pb<4, string>;
|
||||
}
|
||||
export interface OidbGroupFileDeleteReq {
|
||||
groupUin?: pb<1, uint_32>;
|
||||
busId?: pb<3, uint_32>;
|
||||
fileId?: pb<5, string>;
|
||||
}
|
||||
export interface OidbGroupFileMoveReq {
|
||||
groupUin?: pb<1, uint_32>;
|
||||
appId?: pb<2, uint_32>;
|
||||
busId?: pb<3, uint_32>;
|
||||
fileId?: pb<4, string>;
|
||||
parentDirectory?: pb<5, string>;
|
||||
targetDirectory?: pb<6, string>;
|
||||
}
|
||||
export interface OidbGroupFileReq {
|
||||
file?: pb<1, OidbGroupFileUploadReq>;
|
||||
download?: pb<3, OidbGroupFileDownloadReq>;
|
||||
delete?: pb<4, OidbGroupFileDeleteReq>;
|
||||
move?: pb<6, OidbGroupFileMoveReq>;
|
||||
}
|
||||
export interface OidbGroupFileUploadResp {
|
||||
retCode?: pb<1, int_32>;
|
||||
retMsg?: pb<2, string>;
|
||||
clientWording?: pb<3, string>;
|
||||
uploadIp?: pb<4, string>;
|
||||
serverDns?: pb<5, string>;
|
||||
busId?: pb<6, int_32>;
|
||||
fileId?: pb<7, string>;
|
||||
checkKey?: pb<8, bytes>;
|
||||
fileKey?: pb<9, bytes>;
|
||||
boolFileExist?: pb<10, bool>;
|
||||
uploadPort?: pb<14, uint_32>;
|
||||
}
|
||||
export interface OidbGroupFileDownloadResp {
|
||||
retCode?: pb<1, uint_32>;
|
||||
retMsg?: pb<2, string>;
|
||||
clientWording?: pb<3, string>;
|
||||
downloadIp?: pb<4, string>;
|
||||
downloadDns?: pb<5, string>;
|
||||
downloadUrl?: pb<6, bytes>;
|
||||
saveFileName?: pb<11, string>;
|
||||
}
|
||||
export interface OidbGroupFileRetResp {
|
||||
retCode?: pb<1, uint_32>;
|
||||
retMsg?: pb<2, string>;
|
||||
clientWording?: pb<3, string>;
|
||||
}
|
||||
export interface OidbGroupFileResp {
|
||||
upload?: pb<1, OidbGroupFileUploadResp>;
|
||||
download?: pb<3, OidbGroupFileDownloadResp>;
|
||||
delete?: pb<4, OidbGroupFileRetResp>;
|
||||
move?: pb<6, OidbGroupFileRetResp>;
|
||||
}
|
||||
export interface OidbGroupSendFileInfo {
|
||||
busiType?: pb<1, uint_32>;
|
||||
fileId?: pb<2, string>;
|
||||
field3?: pb<3, uint_32>;
|
||||
field4?: pb<4, string>;
|
||||
field5?: pb<5, bool>;
|
||||
}
|
||||
export interface OidbGroupSendFileBody {
|
||||
groupUin?: pb<1, uint_32>;
|
||||
type?: pb<2, uint_32>;
|
||||
info?: pb<3, OidbGroupSendFileInfo>;
|
||||
}
|
||||
export interface OidbGroupSendFileReq {
|
||||
body?: pb<5, OidbGroupSendFileBody>;
|
||||
}
|
||||
export interface OidbGroupFileCreateFolderReq {
|
||||
groupUin?: pb<1, uint_32>;
|
||||
rootDirectory?: pb<3, string>;
|
||||
folderName?: pb<4, string>;
|
||||
}
|
||||
export interface OidbGroupFileDeleteFolderReq {
|
||||
groupUin?: pb<1, uint_32>;
|
||||
folderId?: pb<3, string>;
|
||||
}
|
||||
export interface OidbGroupFileRenameFolderReq {
|
||||
groupUin?: pb<1, uint_32>;
|
||||
folderId?: pb<3, string>;
|
||||
newFolderName?: pb<4, string>;
|
||||
}
|
||||
export interface OidbGroupFileFolderReq {
|
||||
create?: pb<1, OidbGroupFileCreateFolderReq>;
|
||||
delete?: pb<2, OidbGroupFileDeleteFolderReq>;
|
||||
rename?: pb<3, OidbGroupFileRenameFolderReq>;
|
||||
}
|
||||
export interface OidbGroupFileFolderRetResp {
|
||||
retcode?: pb<1, uint_32>;
|
||||
retMsg?: pb<2, string>;
|
||||
clientWording?: pb<3, string>;
|
||||
}
|
||||
export interface OidbGroupFileFolderResp {
|
||||
create?: pb<1, OidbGroupFileFolderRetResp>;
|
||||
delete?: pb<2, OidbGroupFileFolderRetResp>;
|
||||
rename?: pb<3, OidbGroupFileFolderRetResp>;
|
||||
}
|
||||
export interface OidbGroupFileCountReq {
|
||||
groupUin?: pb<1, uint_32>;
|
||||
appId?: pb<2, uint_32>;
|
||||
busId?: pb<3, uint_32>;
|
||||
}
|
||||
export interface OidbGroupFileCountResp {
|
||||
fileCount?: pb<1, uint_32>;
|
||||
maxCount?: pb<2, uint_32>;
|
||||
isEnd?: pb<3, bool>;
|
||||
}
|
||||
export interface OidbGroupFileCountViewReq {
|
||||
count?: pb<3, OidbGroupFileCountReq>;
|
||||
}
|
||||
export interface OidbGroupFileCountViewResp {
|
||||
count?: pb<3, OidbGroupFileCountResp>;
|
||||
}
|
||||
@@ -1,44 +1,242 @@
|
||||
import type { pb, pb_repeated, int_32, uint_32, uint_64, bool, bytes } from '@snowluma/proton';
|
||||
|
||||
export interface OidbPrivateFileDownloadReqBody { receiverUid?: pb<10, string>; fileUuid?: pb<20, string>; type?: pb<30, uint_32>; fileHash?: pb<60, string>; t2?: pb<601, uint_32>; }
|
||||
export interface OidbPrivateFileDownloadReq { subCommand?: pb<1, uint_32>; field2?: pb<2, uint_32>; body?: pb<14, OidbPrivateFileDownloadReqBody>; field101?: pb<101, uint_32>; field102?: pb<102, uint_32>; field200?: pb<200, uint_32>; field99999?: pb<99999, bytes>; }
|
||||
export interface OidbPrivateFileDownloadRespResult { server?: pb<20, string>; port?: pb<40, uint_32>; url?: pb<50, string>; }
|
||||
export interface OidbPrivateFileDownloadRespBody { state?: pb<20, string>; result?: pb<30, OidbPrivateFileDownloadRespResult>; }
|
||||
export interface OidbPrivateFileDownloadResp { body?: pb<14, OidbPrivateFileDownloadRespBody>; }
|
||||
export interface OidbPrivateFileUploadReqBody { senderUid?: pb<10, string>; receiverUid?: pb<20, string>; fileSize?: pb<30, uint_32>; fileName?: pb<40, string>; md510MCheckSum?: pb<50, bytes>; sha1CheckSum?: pb<60, bytes>; localPath?: pb<70, string>; md5CheckSum?: pb<110, bytes>; sha3CheckSum?: pb<120, bytes>; }
|
||||
export interface OidbPrivateFileUploadReq { command?: pb<1, uint_32>; seq?: pb<2, int_32>; upload?: pb<19, OidbPrivateFileUploadReqBody>; businessId?: pb<101, int_32>; clientType?: pb<102, int_32>; flagSupportMediaPlatform?: pb<200, int_32>; }
|
||||
export interface IPv4 { outIP?: pb<1, int_32>; outPort?: pb<2, int_32>; inIP?: pb<3, int_32>; inPort?: pb<4, int_32>; iPType?: pb<5, int_32>; }
|
||||
export interface OidbPrivateFileUploadRespBody { retCode?: pb<10, int_32>; retMsg?: pb<20, string>; uploadIp?: pb<60, string>; uploadDomain?: pb<70, string>; uploadPort?: pb<80, uint_32>; uuid?: pb<90, string>; uploadKey?: pb<100, bytes>; boolFileExist?: pb<110, bool>; uploadIpList?: pb_repeated<130, string>; uploadHttpsPort?: pb<140, int_32>; uploadHttpsDomain?: pb<150, string>; uploadDns?: pb<160, string>; uploadLanip?: pb<170, string>; fileAddon?: pb<200, string>; rtpMediaPlatformUploadAddress?: pb_repeated<210, IPv4>; mediaPlatformUploadKey?: pb<220, bytes>; }
|
||||
export interface OidbPrivateFileUploadResp { upload?: pb<19, OidbPrivateFileUploadRespBody>; }
|
||||
export interface NTV2CommonHead { requestId?: pb<1, uint_32>; command?: pb<2, uint_32>; }
|
||||
export interface NTV2C2CUserInfo { accountType?: pb<1, uint_32>; targetUid?: pb<2, string>; }
|
||||
export interface NTV2GroupInfo { groupUin?: pb<1, uint_32>; }
|
||||
export interface NTV2SceneInfo { requestType?: pb<101, uint_32>; businessType?: pb<102, uint_32>; sceneType?: pb<200, uint_32>; c2c?: pb<201, NTV2C2CUserInfo>; group?: pb<202, NTV2GroupInfo>; }
|
||||
export interface NTV2ClientMeta { agentType?: pb<1, uint_32>; }
|
||||
export interface NTV2ReqHead { common?: pb<1, NTV2CommonHead>; scene?: pb<2, NTV2SceneInfo>; client?: pb<3, NTV2ClientMeta>; }
|
||||
export interface NTV2DownloadRKeyReq { types?: pb_repeated<1, uint_32>; }
|
||||
export interface NTV2FileType { type?: pb<1, uint_32>; picFormat?: pb<2, uint_32>; videoFormat?: pb<3, uint_32>; voiceFormat?: pb<4, uint_32>; }
|
||||
export interface NTV2FileInfo { fileSize?: pb<1, uint_32>; fileHash?: pb<2, string>; fileSha1?: pb<3, string>; fileName?: pb<4, string>; type?: pb<5, NTV2FileType>; width?: pb<6, uint_32>; height?: pb<7, uint_32>; time?: pb<8, uint_32>; original?: pb<9, uint_32>; }
|
||||
export interface NTV2IndexNode { info?: pb<1, NTV2FileInfo>; fileUuid?: pb<2, string>; storeId?: pb<3, uint_32>; uploadTime?: pb<4, uint_32>; ttl?: pb<5, uint_32>; subType?: pb<6, uint_32>; }
|
||||
export interface NTV2VideoDownloadExt { busiType?: pb<1, uint_32>; sceneType?: pb<2, uint_32>; subBusiType?: pb<3, uint_32>; }
|
||||
export interface NTV2DownloadExt { video?: pb<2, NTV2VideoDownloadExt>; }
|
||||
export interface NTV2DownloadReq { node?: pb<1, NTV2IndexNode>; download?: pb<2, NTV2DownloadExt>; }
|
||||
export interface NTV2RichMediaReq { reqHead?: pb<1, NTV2ReqHead>; download?: pb<3, NTV2DownloadReq>; downloadRkey?: pb<4, NTV2DownloadRKeyReq>; }
|
||||
export interface NTV2RespHead { common?: pb<1, NTV2CommonHead>; retCode?: pb<2, uint_32>; message?: pb<3, string>; }
|
||||
export interface NTV2RKeyInfo { rkey?: pb<1, string>; rkeyTtlSec?: pb<2, uint_64>; storeId?: pb<3, uint_32>; rkeyCreateTime?: pb<4, uint_32>; type?: pb<5, uint_32>; }
|
||||
export interface NTV2DownloadRKeyResp { rkeys?: pb_repeated<1, NTV2RKeyInfo>; }
|
||||
export interface NTV2MediaDownloadInfo { domain?: pb<1, string>; urlPath?: pb<2, string>; httpsPort?: pb<3, uint_32>; }
|
||||
export interface NTV2MediaDownloadResp { rKeyParam?: pb<1, string>; rKeyTtlSecond?: pb<2, uint_32>; info?: pb<3, NTV2MediaDownloadInfo>; rKeyCreateTime?: pb<4, uint_32>; }
|
||||
export interface NTV2RichMediaResp { respHead?: pb<1, NTV2RespHead>; download?: pb<3, NTV2MediaDownloadResp>; downloadRkey?: pb<4, NTV2DownloadRKeyResp>; }
|
||||
export interface OidbAiVoiceListReq { groupUin?: pb<1, uint_32>; chatType?: pb<2, uint_32>; }
|
||||
export interface OidbAiVoiceListEntry { voiceId?: pb<1, string>; voiceDisplayName?: pb<2, string>; voiceExampleUrl?: pb<3, string>; }
|
||||
export interface OidbAiVoiceListCategory { category?: pb<1, string>; voices?: pb_repeated<2, OidbAiVoiceListEntry>; }
|
||||
export interface OidbAiVoiceListResp { content?: pb_repeated<1, OidbAiVoiceListCategory>; }
|
||||
export interface OidbAiVoiceSession { sessionId?: pb<1, uint_32>; }
|
||||
export interface OidbAiVoiceReq { groupUin?: pb<1, uint_32>; voiceId?: pb<2, string>; text?: pb<3, string>; chatType?: pb<4, uint_32>; session?: pb<5, OidbAiVoiceSession>; }
|
||||
export interface OidbAiVoiceFileType { type?: pb<1, uint_32>; picFormat?: pb<2, uint_32>; videoFormat?: pb<3, uint_32>; voiceFormat?: pb<4, uint_32>; }
|
||||
export interface OidbAiVoiceFileInfo { fileSize?: pb<1, uint_32>; fileHash?: pb<2, string>; fileSha1?: pb<3, string>; fileName?: pb<4, string>; type?: pb<5, OidbAiVoiceFileType>; width?: pb<6, uint_32>; height?: pb<7, uint_32>; time?: pb<8, uint_32>; original?: pb<9, uint_32>; }
|
||||
export interface OidbAiVoiceIndexNode { info?: pb<1, OidbAiVoiceFileInfo>; fileUuid?: pb<2, string>; storeId?: pb<3, uint_32>; uploadTime?: pb<4, uint_32>; ttl?: pb<5, uint_32>; subType?: pb<6, uint_32>; }
|
||||
export interface OidbAiVoiceMsgInfoBody { index?: pb<1, OidbAiVoiceIndexNode>; }
|
||||
export interface OidbAiVoiceMsgInfo { msgInfoBody?: pb_repeated<1, OidbAiVoiceMsgInfoBody>; }
|
||||
export interface OidbAiVoiceResp { statusCode?: pb<1, uint_32>; field2?: pb<2, uint_32>; field3?: pb<3, uint_32>; msgInfo?: pb<4, OidbAiVoiceMsgInfo>; }
|
||||
export interface OidbPrivateFileDownloadReqBody {
|
||||
receiverUid?: pb<10, string>;
|
||||
fileUuid?: pb<20, string>;
|
||||
type?: pb<30, uint_32>;
|
||||
fileHash?: pb<60, string>;
|
||||
t2?: pb<601, uint_32>;
|
||||
}
|
||||
export interface OidbPrivateFileDownloadReq {
|
||||
subCommand?: pb<1, uint_32>;
|
||||
field2?: pb<2, uint_32>;
|
||||
body?: pb<14, OidbPrivateFileDownloadReqBody>;
|
||||
field101?: pb<101, uint_32>;
|
||||
field102?: pb<102, uint_32>;
|
||||
field200?: pb<200, uint_32>;
|
||||
field99999?: pb<99999, bytes>;
|
||||
}
|
||||
export interface OidbPrivateFileDownloadRespResult {
|
||||
server?: pb<20, string>;
|
||||
port?: pb<40, uint_32>;
|
||||
url?: pb<50, string>;
|
||||
}
|
||||
export interface OidbPrivateFileDownloadRespBody {
|
||||
state?: pb<20, string>;
|
||||
result?: pb<30, OidbPrivateFileDownloadRespResult>;
|
||||
}
|
||||
export interface OidbPrivateFileDownloadResp {
|
||||
body?: pb<14, OidbPrivateFileDownloadRespBody>;
|
||||
}
|
||||
export interface OidbPrivateFileUploadReqBody {
|
||||
senderUid?: pb<10, string>;
|
||||
receiverUid?: pb<20, string>;
|
||||
fileSize?: pb<30, uint_32>;
|
||||
fileName?: pb<40, string>;
|
||||
md510MCheckSum?: pb<50, bytes>;
|
||||
sha1CheckSum?: pb<60, bytes>;
|
||||
localPath?: pb<70, string>;
|
||||
md5CheckSum?: pb<110, bytes>;
|
||||
sha3CheckSum?: pb<120, bytes>;
|
||||
}
|
||||
export interface OidbPrivateFileUploadReq {
|
||||
command?: pb<1, uint_32>;
|
||||
seq?: pb<2, int_32>;
|
||||
upload?: pb<19, OidbPrivateFileUploadReqBody>;
|
||||
businessId?: pb<101, int_32>;
|
||||
clientType?: pb<102, int_32>;
|
||||
flagSupportMediaPlatform?: pb<200, int_32>;
|
||||
}
|
||||
export interface IPv4 {
|
||||
outIP?: pb<1, int_32>;
|
||||
outPort?: pb<2, int_32>;
|
||||
inIP?: pb<3, int_32>;
|
||||
inPort?: pb<4, int_32>;
|
||||
iPType?: pb<5, int_32>;
|
||||
}
|
||||
export interface OidbPrivateFileUploadRespBody {
|
||||
retCode?: pb<10, int_32>;
|
||||
retMsg?: pb<20, string>;
|
||||
uploadIp?: pb<60, string>;
|
||||
uploadDomain?: pb<70, string>;
|
||||
uploadPort?: pb<80, uint_32>;
|
||||
uuid?: pb<90, string>;
|
||||
uploadKey?: pb<100, bytes>;
|
||||
boolFileExist?: pb<110, bool>;
|
||||
uploadIpList?: pb_repeated<130, string>;
|
||||
uploadHttpsPort?: pb<140, int_32>;
|
||||
uploadHttpsDomain?: pb<150, string>;
|
||||
uploadDns?: pb<160, string>;
|
||||
uploadLanip?: pb<170, string>;
|
||||
fileAddon?: pb<200, string>;
|
||||
rtpMediaPlatformUploadAddress?: pb_repeated<210, IPv4>;
|
||||
mediaPlatformUploadKey?: pb<220, bytes>;
|
||||
}
|
||||
export interface OidbPrivateFileUploadResp {
|
||||
upload?: pb<19, OidbPrivateFileUploadRespBody>;
|
||||
}
|
||||
export interface NTV2CommonHead {
|
||||
requestId?: pb<1, uint_32>;
|
||||
command?: pb<2, uint_32>;
|
||||
}
|
||||
export interface NTV2C2CUserInfo {
|
||||
accountType?: pb<1, uint_32>;
|
||||
targetUid?: pb<2, string>;
|
||||
}
|
||||
export interface NTV2GroupInfo {
|
||||
groupUin?: pb<1, uint_32>;
|
||||
}
|
||||
export interface NTV2SceneInfo {
|
||||
requestType?: pb<101, uint_32>;
|
||||
businessType?: pb<102, uint_32>;
|
||||
sceneType?: pb<200, uint_32>;
|
||||
c2c?: pb<201, NTV2C2CUserInfo>;
|
||||
group?: pb<202, NTV2GroupInfo>;
|
||||
}
|
||||
export interface NTV2ClientMeta {
|
||||
agentType?: pb<1, uint_32>;
|
||||
}
|
||||
export interface NTV2ReqHead {
|
||||
common?: pb<1, NTV2CommonHead>;
|
||||
scene?: pb<2, NTV2SceneInfo>;
|
||||
client?: pb<3, NTV2ClientMeta>;
|
||||
}
|
||||
export interface NTV2DownloadRKeyReq {
|
||||
types?: pb_repeated<1, uint_32>;
|
||||
}
|
||||
export interface NTV2FileType {
|
||||
type?: pb<1, uint_32>;
|
||||
picFormat?: pb<2, uint_32>;
|
||||
videoFormat?: pb<3, uint_32>;
|
||||
voiceFormat?: pb<4, uint_32>;
|
||||
}
|
||||
export interface NTV2FileInfo {
|
||||
fileSize?: pb<1, uint_32>;
|
||||
fileHash?: pb<2, string>;
|
||||
fileSha1?: pb<3, string>;
|
||||
fileName?: pb<4, string>;
|
||||
type?: pb<5, NTV2FileType>;
|
||||
width?: pb<6, uint_32>;
|
||||
height?: pb<7, uint_32>;
|
||||
time?: pb<8, uint_32>;
|
||||
original?: pb<9, uint_32>;
|
||||
}
|
||||
export interface NTV2IndexNode {
|
||||
info?: pb<1, NTV2FileInfo>;
|
||||
fileUuid?: pb<2, string>;
|
||||
storeId?: pb<3, uint_32>;
|
||||
uploadTime?: pb<4, uint_32>;
|
||||
ttl?: pb<5, uint_32>;
|
||||
subType?: pb<6, uint_32>;
|
||||
}
|
||||
export interface NTV2VideoDownloadExt {
|
||||
busiType?: pb<1, uint_32>;
|
||||
sceneType?: pb<2, uint_32>;
|
||||
subBusiType?: pb<3, uint_32>;
|
||||
}
|
||||
export interface NTV2DownloadExt {
|
||||
video?: pb<2, NTV2VideoDownloadExt>;
|
||||
}
|
||||
export interface NTV2DownloadReq {
|
||||
node?: pb<1, NTV2IndexNode>;
|
||||
download?: pb<2, NTV2DownloadExt>;
|
||||
}
|
||||
export interface NTV2RichMediaReq {
|
||||
reqHead?: pb<1, NTV2ReqHead>;
|
||||
download?: pb<3, NTV2DownloadReq>;
|
||||
downloadRkey?: pb<4, NTV2DownloadRKeyReq>;
|
||||
}
|
||||
export interface NTV2RespHead {
|
||||
common?: pb<1, NTV2CommonHead>;
|
||||
retCode?: pb<2, uint_32>;
|
||||
message?: pb<3, string>;
|
||||
}
|
||||
export interface NTV2RKeyInfo {
|
||||
rkey?: pb<1, string>;
|
||||
rkeyTtlSec?: pb<2, uint_64>;
|
||||
storeId?: pb<3, uint_32>;
|
||||
rkeyCreateTime?: pb<4, uint_32>;
|
||||
type?: pb<5, uint_32>;
|
||||
}
|
||||
export interface NTV2DownloadRKeyResp {
|
||||
rkeys?: pb_repeated<1, NTV2RKeyInfo>;
|
||||
}
|
||||
export interface NTV2MediaDownloadInfo {
|
||||
domain?: pb<1, string>;
|
||||
urlPath?: pb<2, string>;
|
||||
httpsPort?: pb<3, uint_32>;
|
||||
}
|
||||
export interface NTV2MediaDownloadResp {
|
||||
rKeyParam?: pb<1, string>;
|
||||
rKeyTtlSecond?: pb<2, uint_32>;
|
||||
info?: pb<3, NTV2MediaDownloadInfo>;
|
||||
rKeyCreateTime?: pb<4, uint_32>;
|
||||
}
|
||||
export interface NTV2RichMediaResp {
|
||||
respHead?: pb<1, NTV2RespHead>;
|
||||
download?: pb<3, NTV2MediaDownloadResp>;
|
||||
downloadRkey?: pb<4, NTV2DownloadRKeyResp>;
|
||||
}
|
||||
export interface OidbAiVoiceListReq {
|
||||
groupUin?: pb<1, uint_32>;
|
||||
chatType?: pb<2, uint_32>;
|
||||
}
|
||||
export interface OidbAiVoiceListEntry {
|
||||
voiceId?: pb<1, string>;
|
||||
voiceDisplayName?: pb<2, string>;
|
||||
voiceExampleUrl?: pb<3, string>;
|
||||
}
|
||||
export interface OidbAiVoiceListCategory {
|
||||
category?: pb<1, string>;
|
||||
voices?: pb_repeated<2, OidbAiVoiceListEntry>;
|
||||
}
|
||||
export interface OidbAiVoiceListResp {
|
||||
content?: pb_repeated<1, OidbAiVoiceListCategory>;
|
||||
}
|
||||
export interface OidbAiVoiceSession {
|
||||
sessionId?: pb<1, uint_32>;
|
||||
}
|
||||
export interface OidbAiVoiceReq {
|
||||
groupUin?: pb<1, uint_32>;
|
||||
voiceId?: pb<2, string>;
|
||||
text?: pb<3, string>;
|
||||
chatType?: pb<4, uint_32>;
|
||||
session?: pb<5, OidbAiVoiceSession>;
|
||||
}
|
||||
export interface OidbAiVoiceFileType {
|
||||
type?: pb<1, uint_32>;
|
||||
picFormat?: pb<2, uint_32>;
|
||||
videoFormat?: pb<3, uint_32>;
|
||||
voiceFormat?: pb<4, uint_32>;
|
||||
}
|
||||
export interface OidbAiVoiceFileInfo {
|
||||
fileSize?: pb<1, uint_32>;
|
||||
fileHash?: pb<2, string>;
|
||||
fileSha1?: pb<3, string>;
|
||||
fileName?: pb<4, string>;
|
||||
type?: pb<5, OidbAiVoiceFileType>;
|
||||
width?: pb<6, uint_32>;
|
||||
height?: pb<7, uint_32>;
|
||||
time?: pb<8, uint_32>;
|
||||
original?: pb<9, uint_32>;
|
||||
}
|
||||
export interface OidbAiVoiceIndexNode {
|
||||
info?: pb<1, OidbAiVoiceFileInfo>;
|
||||
fileUuid?: pb<2, string>;
|
||||
storeId?: pb<3, uint_32>;
|
||||
uploadTime?: pb<4, uint_32>;
|
||||
ttl?: pb<5, uint_32>;
|
||||
subType?: pb<6, uint_32>;
|
||||
}
|
||||
export interface OidbAiVoiceMsgInfoBody {
|
||||
index?: pb<1, OidbAiVoiceIndexNode>;
|
||||
}
|
||||
export interface OidbAiVoiceMsgInfo {
|
||||
msgInfoBody?: pb_repeated<1, OidbAiVoiceMsgInfoBody>;
|
||||
}
|
||||
export interface OidbAiVoiceResp {
|
||||
statusCode?: pb<1, uint_32>;
|
||||
field2?: pb<2, uint_32>;
|
||||
field3?: pb<3, uint_32>;
|
||||
msgInfo?: pb<4, OidbAiVoiceMsgInfo>;
|
||||
}
|
||||
@@ -12,7 +12,7 @@ import type {
|
||||
OidbClientKeyResp,
|
||||
OidbGetPskeyReq,
|
||||
OidbGetPskeyResp,
|
||||
} from '../proto/proton/oidb-action';
|
||||
} from '../proto/proton/oidb-actions/base';
|
||||
import { RequestUtil } from '../web/request-util';
|
||||
|
||||
export async function forceFetchClientKey(bridge: Bridge) {
|
||||
|
||||
Reference in new issue
Block a user