refactor(proto-defs): extract wire-protobuf definitions into standalone package
Move `packages/core/src/bridge/proto/proton/*.ts` (13 files, ~3.3k LOC) into a new `@snowluma/proto-defs` workspace package. The proton spike landed in the previous commit means bare-specifier imports (`@snowluma/proto-defs/oidb`, `…/message`, …) now resolve correctly through proton's vite plugin, so call-site replacement still fires. Why --- - Lets downstream consumers share the same wire definitions without copy-pasting them — multiple workspace packages can now depend on `@snowluma/proto-defs` directly. - Trims `@snowluma/core`'s surface: the bridge no longer owns the protocol schema, only its consumers. - Sets up future #5 (`message-parsing perf`) and #6 (`Api-on-ctx refactor`) — both want a thinner core. Layout ------ Per-file subpath exports (mirrors the legacy `proto/proton/<sub>` shape 1:1). The barrel `index.ts` intentionally skips `highway` and `oidb-actions/media` because the two files share six NTV2-prefixed type names — `export *` would silently drop one side. Subpath imports are unambiguous, which is also why every call site in core uses them. Changes ------- - New package `packages/proto-defs/` (package.json, tsconfig.json, src/index.ts). - 13 `.ts` files moved via `git mv` to preserve history. - 44 import sites across 26 source files + 15 tests rewritten via sed from `./[…/]proto/proton/<sub>` → `@snowluma/proto-defs/<sub>`. - `@snowluma/core` depends on `@snowluma/proto-defs` (workspace:*). Verification ------------ - proto-defs typecheck: clean - core typecheck: clean - core test suite: 587 passed (same baseline as before the refactor; one failure is the pre-existing websocket native addon, unrelated) - proton test suite: 99 passed (8 files including the new cross-package.test.ts from the spike) - Full workspace `pnpm -r typecheck`: all 8 projects clean Note: proton's `dist/index.js` MUST be rebuilt for the vite plugin to pick up the bare-specifier resolution. The previous commit's source change is only effective after `pnpm -F @snowluma/proton build`.
This commit is contained in:
1 parent
994633eafa
commit
6c7e56d5a1
59 files changed
+212
-75
No files matched your search
@@ -1,18 +1,18 @@
|
||||
import { protobuf_decode, protobuf_encode } from '@snowluma/proton';
|
||||
import type { Bridge } from '../bridge';
|
||||
import { makeOidbEnvelope, runOidb } from '../bridge-oidb';
|
||||
import { OidbBase } from '../proto/proton/oidb';
|
||||
import { OidbBase } from '@snowluma/proto-defs/oidb';
|
||||
import type {
|
||||
OidbGroupTodo,
|
||||
OidbStrangerStatusReq,
|
||||
OidbStrangerStatusResp,
|
||||
} from '../proto/proton/oidb-actions/base';
|
||||
} from '@snowluma/proto-defs/oidb-actions/base';
|
||||
import type {
|
||||
OidbAiVoiceListReq,
|
||||
OidbAiVoiceListResp,
|
||||
OidbAiVoiceReq,
|
||||
OidbAiVoiceResp,
|
||||
} from '../proto/proton/oidb-actions/media';
|
||||
} from '@snowluma/proto-defs/oidb-actions/media';
|
||||
import type { MediaIndexNode } from './shared';
|
||||
|
||||
// ─────────────── Group todo (0xF90) ───────────────
|
||||
|
||||
@@ -12,8 +12,8 @@ import type {
|
||||
RecvLongMsgResp,
|
||||
SendLongMsgReq,
|
||||
SendLongMsgResp,
|
||||
} from '../proto/proton/longmsg';
|
||||
import type { FileExtra, PushMsg, PushMsgBody } from '../proto/proton/message';
|
||||
} from '@snowluma/proto-defs/longmsg';
|
||||
import type { FileExtra, PushMsg, PushMsgBody } from '@snowluma/proto-defs/message';
|
||||
import { resolveSelfUid, toInt } from './shared';
|
||||
|
||||
// Module-scoped cache, keyed by res_id. Survives only for the lifetime
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { protobuf_encode } from '@snowluma/proton';
|
||||
import type { Bridge } from '../bridge';
|
||||
import { makeOidbEnvelope, runOidb } from '../bridge-oidb';
|
||||
import { OidbBase } from '../proto/proton/oidb';
|
||||
import { OidbBase } from '@snowluma/proto-defs/oidb';
|
||||
import type {
|
||||
OidbDeleteFriend,
|
||||
OidbFriendRequestAction,
|
||||
OidbSetFriendRemark,
|
||||
} from '../proto/proton/oidb-actions/base';
|
||||
} from '@snowluma/proto-defs/oidb-actions/base';
|
||||
|
||||
export async function setFriendAddRequest(bridge: Bridge, uidOrFlag: string, approve: boolean): Promise<void> {
|
||||
let targetUid = uidOrFlag;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { protobuf_decode, protobuf_encode } from '@snowluma/proton';
|
||||
import type { Bridge } from '../bridge';
|
||||
import { makeOidbEnvelope, runOidb } from '../bridge-oidb';
|
||||
import { OidbBase } from '../proto/proton/oidb';
|
||||
import { OidbBase } from '@snowluma/proto-defs/oidb';
|
||||
import type {
|
||||
Oidb0x89a_0AddOption,
|
||||
Oidb0x89a_0Search,
|
||||
@@ -18,7 +18,7 @@ import type {
|
||||
OidbRenameMember,
|
||||
OidbSetAdmin,
|
||||
OidbSpecialTitle,
|
||||
} from '../proto/proton/oidb-actions/base';
|
||||
} from '@snowluma/proto-defs/oidb-actions/base';
|
||||
|
||||
// ─────────────── mute / un-mute ───────────────
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import type {
|
||||
DoQunLikeResponse,
|
||||
GetMediaListRequest,
|
||||
GetMediaListResponse,
|
||||
} from '../proto/proton/oidb-actions/group-album';
|
||||
} from '@snowluma/proto-defs/oidb-actions/group-album';
|
||||
|
||||
export interface GroupAlbumMediaResult {
|
||||
mediaList: any[];
|
||||
|
||||
@@ -5,8 +5,8 @@ import type { Bridge } from '../bridge';
|
||||
import { makeOidbEnvelope, runOidb } from '../bridge-oidb';
|
||||
import { fetchHighwaySession, uploadHighwayHttp } from '../highway/highway-client';
|
||||
import { computeHashes, computeMd5, FILE_UPLOAD_MAX_BYTES, loadBinarySource } from '../highway/utils';
|
||||
import type { FileUploadExt } from '../proto/proton/highway';
|
||||
import { OidbBase } from '../proto/proton/oidb';
|
||||
import type { FileUploadExt } from '@snowluma/proto-defs/highway';
|
||||
import { OidbBase } from '@snowluma/proto-defs/oidb';
|
||||
import type {
|
||||
OidbGroupFileCountViewReq,
|
||||
OidbGroupFileCountViewResp,
|
||||
@@ -17,7 +17,7 @@ import type {
|
||||
OidbGroupFileViewReq,
|
||||
OidbGroupFileViewResp,
|
||||
OidbGroupSendFileReq,
|
||||
} from '../proto/proton/oidb-actions/group-file';
|
||||
} from '@snowluma/proto-defs/oidb-actions/group-file';
|
||||
import type {
|
||||
NTV2RichMediaReq,
|
||||
NTV2RichMediaResp,
|
||||
@@ -25,7 +25,7 @@ import type {
|
||||
OidbPrivateFileDownloadResp,
|
||||
OidbPrivateFileUploadReq,
|
||||
OidbPrivateFileUploadResp,
|
||||
} from '../proto/proton/oidb-actions/media';
|
||||
} from '@snowluma/proto-defs/oidb-actions/media';
|
||||
import { ensureRetCodeZero, resolveSelfUid, toInt, type MediaIndexNode } from './shared';
|
||||
|
||||
const log = createLogger('GroupFile');
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { protobuf_encode } from '@snowluma/proton';
|
||||
import type { Bridge } from '../bridge';
|
||||
import { makeOidbEnvelope, runOidb } from '../bridge-oidb';
|
||||
import { OidbBase } from '../proto/proton/oidb';
|
||||
import type { C2CRecallRequest, GroupRecallRequest, OidbEssence, SsoReadedReportReq } from '../proto/proton/oidb-actions/base';
|
||||
import { OidbBase } from '@snowluma/proto-defs/oidb';
|
||||
import type { C2CRecallRequest, GroupRecallRequest, OidbEssence, SsoReadedReportReq } from '@snowluma/proto-defs/oidb-actions/base';
|
||||
|
||||
export async function recallGroupMessage(bridge: Bridge, groupId: number, sequence: number): Promise<void> {
|
||||
const request = protobuf_encode<GroupRecallRequest>({
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import { protobuf_decode, protobuf_encode } from '@snowluma/proton';
|
||||
import type { Bridge } from '../bridge';
|
||||
import { makeOidbEnvelope, runOidb } from '../bridge-oidb';
|
||||
import { OidbBase } from '../proto/proton/oidb';
|
||||
import { OidbBase } from '@snowluma/proto-defs/oidb';
|
||||
import type {
|
||||
Oidb0x9083Req,
|
||||
Oidb0x9083Resp,
|
||||
OidbGroupReaction,
|
||||
OidbLike,
|
||||
OidbPoke,
|
||||
} from '../proto/proton/oidb-actions/base';
|
||||
} from '@snowluma/proto-defs/oidb-actions/base';
|
||||
|
||||
export async function sendPoke(bridge: Bridge, isGroup: boolean, peerUin: number, targetUin?: number): Promise<void> {
|
||||
const env = makeOidbEnvelope<OidbPoke>(0xED3, 1, {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { protobuf_decode, protobuf_encode } from '@snowluma/proton';
|
||||
import type { Bridge } from '../bridge';
|
||||
import { makeOidbEnvelope, runOidb } from '../bridge-oidb';
|
||||
import { OidbBase } from '../proto/proton/oidb';
|
||||
import { OidbBase } from '@snowluma/proto-defs/oidb';
|
||||
import type {
|
||||
MiniAppShareReq,
|
||||
MiniAppShareResp,
|
||||
@@ -11,7 +11,7 @@ import type {
|
||||
Oidb0x990Resp,
|
||||
Oidb0xeb7Req,
|
||||
Oidb0xeb7Resp,
|
||||
} from '../proto/proton/oidb-actions/base';
|
||||
} from '@snowluma/proto-defs/oidb-actions/base';
|
||||
|
||||
export async function translateEn2Zh(
|
||||
bridge: Bridge,
|
||||
|
||||
@@ -3,7 +3,7 @@ import type { Bridge } from '../bridge';
|
||||
import { makeOidbEnvelope, runOidb } from '../bridge-oidb';
|
||||
import { fetchHighwaySession, uploadHighwayHttp } from '../highway/highway-client';
|
||||
import { computeHashes, loadBinarySource } from '../highway/utils';
|
||||
import { OidbBase } from '../proto/proton/oidb';
|
||||
import { OidbBase } from '@snowluma/proto-defs/oidb';
|
||||
import type {
|
||||
FaceroamOpReq,
|
||||
FaceroamOpResp,
|
||||
@@ -19,7 +19,7 @@ import type {
|
||||
OidbSetProfile,
|
||||
SetStatusReq,
|
||||
SetStatusResp,
|
||||
} from '../proto/proton/oidb-actions/base';
|
||||
} from '@snowluma/proto-defs/oidb-actions/base';
|
||||
import { resolveSelfUid } from './shared';
|
||||
|
||||
// ─────────────── status / profile setters ───────────────
|
||||
|
||||
@@ -7,7 +7,7 @@ import type {
|
||||
OidbSvcTrpcTcp0xFD4_1Response,
|
||||
OidbSvcTrpcTcp0xFE5_2Response,
|
||||
OidbSvcTrpcTcp0xFE7_3Response,
|
||||
} from './proto/proton/oidb';
|
||||
} from '@snowluma/proto-defs/oidb';
|
||||
import type {
|
||||
AvatarInfo,
|
||||
OidbFriendListRequest,
|
||||
@@ -16,11 +16,11 @@ import type {
|
||||
OidbGroupRequestList,
|
||||
OidbUserInfoRequest,
|
||||
OidbUserInfoResponse,
|
||||
} from './proto/proton/oidb-actions/base';
|
||||
} from '@snowluma/proto-defs/oidb-actions/base';
|
||||
import type {
|
||||
NTV2RichMediaReq,
|
||||
NTV2RichMediaResp,
|
||||
} from './proto/proton/oidb-actions/media';
|
||||
} from '@snowluma/proto-defs/oidb-actions/media';
|
||||
import type { FriendInfo, GroupMemberInfo, GroupRequestInfo, QQGroupInfo, UserProfileInfo } from './qq-info';
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { protobuf_decode } from '@snowluma/proton';
|
||||
import type { Bridge } from './bridge';
|
||||
import type { OidbBase, OidbBaseMeta } from './proto/proton/oidb';
|
||||
import type { OidbBase, OidbBaseMeta } from '@snowluma/proto-defs/oidb';
|
||||
|
||||
/**
|
||||
* Build the OidbBase<T>-shaped TS value. Pure helper, no protobuf
|
||||
|
||||
@@ -10,8 +10,8 @@ import { IncomingPacketPipeline, type CmdParser } from './packet-pipeline';
|
||||
import type {
|
||||
SendMessageRequest,
|
||||
SendMessageResponse,
|
||||
} from './proto/proton/action';
|
||||
import type { FileExtra } from './proto/proton/message';
|
||||
} from '@snowluma/proto-defs/action';
|
||||
import type { FileExtra } from '@snowluma/proto-defs/message';
|
||||
import type { FriendInfo, GroupMemberInfo, GroupRequestInfo, QQGroupInfo, UserProfileInfo } from './qq-info';
|
||||
|
||||
// Delegated modules
|
||||
|
||||
@@ -8,8 +8,8 @@ import { uploadVideoMsgInfo } from './highway/video-upload';
|
||||
import type {
|
||||
MarkdownData,
|
||||
MentionExtraSend,
|
||||
} from './proto/proton/action';
|
||||
import type { Elem, GroupFileExtra } from './proto/proton/element';
|
||||
} from '@snowluma/proto-defs/action';
|
||||
import type { Elem, GroupFileExtra } from '@snowluma/proto-defs/element';
|
||||
|
||||
type ProtoElem = Partial<Elem>;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import type {
|
||||
NTV2RichMediaHighwayExt,
|
||||
ReqDataHighwayHead,
|
||||
RespDataHighwayHead,
|
||||
} from '../proto/proton/highway';
|
||||
} from '@snowluma/proto-defs/highway';
|
||||
import { computeMd5, packHighwayFrame, unpackHighwayFrame } from './utils';
|
||||
|
||||
const HIGHWAY_APP_ID = 1600001604;
|
||||
|
||||
@@ -7,8 +7,8 @@ import type {
|
||||
EncodableMediaMsgInfo,
|
||||
NTV2UploadRichMediaReq,
|
||||
NTV2UploadRichMediaResp,
|
||||
} from '../proto/proton/highway';
|
||||
import { OidbBase } from '../proto/proton/oidb';
|
||||
} from '@snowluma/proto-defs/highway';
|
||||
import { OidbBase } from '@snowluma/proto-defs/oidb';
|
||||
import { buildHighwayExtend, fetchHighwaySession, uploadHighwayHttp } from './highway-client';
|
||||
|
||||
const moduleLog = createLogger('Highway');
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { protobuf_decode } from '@snowluma/proton';
|
||||
import type { PacketInfo } from '../../protocol/types';
|
||||
import type { IdentityService } from '../identity-service';
|
||||
import type { ContentHead, MessageBody, PushMsg, ResponseHead } from '../proto/proton/message';
|
||||
import type { ContentHead, MessageBody, PushMsg, ResponseHead } from '@snowluma/proto-defs/message';
|
||||
|
||||
export type PushMsgBody = MessageBody;
|
||||
export type PushMsgResponseHead = ResponseHead;
|
||||
|
||||
@@ -11,7 +11,7 @@ import type {
|
||||
FriendRequest,
|
||||
GeneralGrayTipInfo,
|
||||
NewFriend,
|
||||
} from '../../proto/proton/notify';
|
||||
} from '@snowluma/proto-defs/notify';
|
||||
import type { MsgPushContext } from '../context';
|
||||
import { Event0x210SubType } from '../enums';
|
||||
import {
|
||||
|
||||
@@ -12,7 +12,7 @@ import type {
|
||||
GroupMute,
|
||||
GroupReactNotify,
|
||||
NotifyMessageBody,
|
||||
} from '../../proto/proton/notify';
|
||||
} from '@snowluma/proto-defs/notify';
|
||||
import type { MsgPushContext } from '../context';
|
||||
import { Event0x2DCSubType } from '../enums';
|
||||
import {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { protobuf_decode } from '@snowluma/proton';
|
||||
import type { GroupAdminEvent } from '../../events';
|
||||
import type { GroupAdmin } from '../../proto/proton/notify';
|
||||
import type { GroupAdmin } from '@snowluma/proto-defs/notify';
|
||||
import { resolveUidToUin } from '../helpers';
|
||||
import type { MsgPushDecoder } from '../registry';
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import type { GroupInviteEvent } from '../../events';
|
||||
import type {
|
||||
GroupInvitation, GroupInvite,
|
||||
GroupJoin,
|
||||
} from '../../proto/proton/notify';
|
||||
} from '@snowluma/proto-defs/notify';
|
||||
import { resolveUidToUin } from '../helpers';
|
||||
import type { MsgPushDecoder } from '../registry';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { protobuf_decode } from '@snowluma/proton';
|
||||
import type { GroupMemberJoin, GroupMemberLeave } from '../../events';
|
||||
import type { GroupChange, SelfJoinInGroup } from '../../proto/proton/notify';
|
||||
import type { GroupChange, SelfJoinInGroup } from '@snowluma/proto-defs/notify';
|
||||
import { decodeOperatorUid, resolveUidToUin } from '../helpers';
|
||||
import type { MsgPushDecoder } from '../registry';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { protobuf_decode } from '@snowluma/proton';
|
||||
import { inflateSync } from 'zlib';
|
||||
import type { IdentityService } from '../identity-service';
|
||||
import type { OperatorInfo } from '../proto/proton/notify';
|
||||
import type { OperatorInfo } from '@snowluma/proto-defs/notify';
|
||||
|
||||
export function makeImageUrl(origUrl: string): string {
|
||||
if (!origUrl) return '';
|
||||
|
||||
@@ -9,8 +9,8 @@ import type {
|
||||
NotOnlineImage,
|
||||
QFaceExtra,
|
||||
QSmallFaceExtra,
|
||||
} from '../proto/proton/element';
|
||||
import type { FileExtra, MessageBody, RichText } from '../proto/proton/message';
|
||||
} from '@snowluma/proto-defs/element';
|
||||
import type { FileExtra, MessageBody, RichText } from '@snowluma/proto-defs/message';
|
||||
import { decompressData, makeImageUrl } from './helpers';
|
||||
|
||||
type ElemDecoded = Elem;
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
import type { pb, pb_repeated, int_32, uint_32, uint_64, bytes } from '@snowluma/proton';
|
||||
import type { Elem } from './element';
|
||||
|
||||
// Routing
|
||||
export interface RoutingC2C {
|
||||
uin?: pb<1, uint_32>;
|
||||
uid?: pb<2, string>;
|
||||
}
|
||||
|
||||
export interface RoutingGroup {
|
||||
groupCode?: pb<1, uint_64>;
|
||||
}
|
||||
|
||||
// 服务器限制 C2C 文件消息必须使用 Trans0x211 路由头(RoutingHead 字段 15)
|
||||
// 若误用常规 RoutingC2C 会被服务器拒绝。
|
||||
// 仅在包含 FileEntity 时触发,且 CcCmd 固定为 4。
|
||||
|
||||
export interface RoutingTrans0x211 {
|
||||
toUin?: pb<1, uint_64>;
|
||||
ccCmd?: pb<2, uint_32>;
|
||||
uid?: pb<8, string>;
|
||||
}
|
||||
|
||||
export interface RoutingHead {
|
||||
c2c?: pb<1, RoutingC2C>;
|
||||
grp?: pb<2, RoutingGroup>;
|
||||
trans0x211?: pb<15, RoutingTrans0x211>;
|
||||
}
|
||||
|
||||
// Content Head for send
|
||||
export interface SendContentHead {
|
||||
type?: pb<1, uint_32>;
|
||||
subType?: pb<2, uint_32>;
|
||||
c2cCmd?: pb<3, uint_32>;
|
||||
}
|
||||
|
||||
// Message Control
|
||||
export interface MessageControl {
|
||||
msgFlag?: pb<1, int_32>;
|
||||
}
|
||||
|
||||
// RichText (for send — only elems)
|
||||
export interface SendRichText {
|
||||
elems?: pb_repeated<2, Elem>;
|
||||
}
|
||||
|
||||
// MessageBody (for send)
|
||||
export interface SendMessageBody {
|
||||
richText?: pb<1, SendRichText>;
|
||||
// C2C 离线文件元数据(NotOnlineFile)必须序列化后塞入此字段
|
||||
// 服务器不会读取 richText.notOnlineFile。
|
||||
msgContent?: pb<2, bytes>;
|
||||
}
|
||||
|
||||
// SendMessageRequest
|
||||
export interface SendMessageRequest {
|
||||
routingHead?: pb<1, RoutingHead>;
|
||||
contentHead?: pb<2, SendContentHead>;
|
||||
messageBody?: pb<3, SendMessageBody>;
|
||||
clientSequence?: pb<4, uint_32>;
|
||||
random?: pb<5, uint_32>;
|
||||
syncCookie?: pb<6, bytes>;
|
||||
via?: pb<8, uint_32>;
|
||||
dataStatist?: pb<9, uint_32>;
|
||||
ctrl?: pb<12, MessageControl>;
|
||||
multiSendSeq?: pb<14, uint_32>;
|
||||
}
|
||||
|
||||
// SendMessageResponse
|
||||
export interface SendMessageResponse {
|
||||
result?: pb<1, int_32>;
|
||||
errMsg?: pb<2, string>;
|
||||
timestamp1?: pb<3, uint_32>;
|
||||
field10?: pb<10, uint_32>;
|
||||
groupSequence?: pb<11, uint_32>;
|
||||
timestamp2?: pb<12, uint_32>;
|
||||
privateSequence?: pb<14, uint_32>;
|
||||
}
|
||||
|
||||
// MentionExtra (for building @mention text element)
|
||||
export interface MentionExtraSend {
|
||||
type?: pb<3, int_32>;
|
||||
uin?: pb<4, uint_32>;
|
||||
field5?: pb<5, int_32>;
|
||||
uid?: pb<9, string>;
|
||||
}
|
||||
|
||||
// MarkdownData
|
||||
export interface MarkdownData {
|
||||
content?: pb<1, string>;
|
||||
}
|
||||
@@ -1,418 +0,0 @@
|
||||
import type { pb, pb_repeated, int_32, uint_32, uint_64, bool, bytes } from '@snowluma/proton';
|
||||
|
||||
// Nested / helper schemas
|
||||
export interface CustomFacePbReserve {
|
||||
subType?: pb<1, int_32>;
|
||||
summary?: pb<9, string>;
|
||||
}
|
||||
|
||||
export interface NotOnlineImagePbReserve2 {
|
||||
field1?: pb<1, int_32>;
|
||||
field2?: pb<2, string>;
|
||||
field3?: pb<3, int_32>;
|
||||
field4?: pb<4, int_32>;
|
||||
field5?: pb<5, int_32>;
|
||||
field7?: pb<7, string>;
|
||||
}
|
||||
|
||||
export interface NotOnlineImagePbReserve {
|
||||
subType?: pb<1, int_32>;
|
||||
field3?: pb<3, int_32>;
|
||||
field4?: pb<4, int_32>;
|
||||
summary?: pb<8, string>;
|
||||
field10?: pb<10, int_32>;
|
||||
field20?: pb<20, NotOnlineImagePbReserve2>;
|
||||
url?: pb<30, string>;
|
||||
md5Str?: pb<31, string>;
|
||||
}
|
||||
|
||||
// Core element schemas
|
||||
export interface TextElem {
|
||||
str?: pb<1, string>;
|
||||
link?: pb<2, string>;
|
||||
attr6Buf?: pb<3, bytes>;
|
||||
attr7Buf?: pb<4, bytes>;
|
||||
buf?: pb<11, bytes>;
|
||||
pbReserve?: pb<12, bytes>;
|
||||
}
|
||||
|
||||
export interface FaceElem {
|
||||
index?: pb<1, int_32>;
|
||||
oldData?: pb<2, bytes>;
|
||||
buf?: pb<11, bytes>;
|
||||
}
|
||||
|
||||
export interface OnlineImage {
|
||||
guid?: pb<1, bytes>;
|
||||
filePath?: pb<2, bytes>;
|
||||
oldVerSendFile?: pb<3, bytes>;
|
||||
}
|
||||
|
||||
export interface NotOnlineImage {
|
||||
filePath?: pb<1, string>;
|
||||
fileLen?: pb<2, uint_32>;
|
||||
downloadPath?: pb<3, string>;
|
||||
oldVerSendFile?:pb<4, bytes>;
|
||||
imgType?: pb<5, int_32>;
|
||||
previewsImage?: pb<6, bytes>;
|
||||
picMd5?: pb<7, bytes>;
|
||||
picHeight?: pb<8, uint_32>;
|
||||
picWidth?: pb<9, uint_32>;
|
||||
resId?: pb<10, string>;
|
||||
flag?: pb<11, bytes>;
|
||||
thumbUrl?: pb<12, string>;
|
||||
original?: pb<13, int_32>;
|
||||
bigUrl?: pb<14, string>;
|
||||
origUrl?: pb<15, string>;
|
||||
bizType?: pb<16, int_32>;
|
||||
result?: pb<17, int_32>;
|
||||
index?: pb<18, int_32>;
|
||||
opFaceBuf?: pb<19, bytes>;
|
||||
oldPicMd5?: pb<20, bool>;
|
||||
thumbWidth?: pb<21, int_32>;
|
||||
thumbHeight?: pb<22, int_32>;
|
||||
fileId?: pb<23, int_32>;
|
||||
showLen?: pb<24, uint_32>;
|
||||
downloadLen?: pb<25, uint_32>;
|
||||
x400Url?: pb<26, string>;
|
||||
x400Width?: pb<27, int_32>;
|
||||
x400Height?: pb<28, int_32>;
|
||||
pbRes?: pb<29, NotOnlineImagePbReserve>;
|
||||
}
|
||||
|
||||
export interface TransElem {
|
||||
elemType?: pb<1, int_32>;
|
||||
elemValue?: pb<2, bytes>;
|
||||
}
|
||||
|
||||
export interface MarketFace {
|
||||
faceName?: pb<1, string>;
|
||||
itemType?: pb<2, uint_32>;
|
||||
faceInfo?: pb<3, uint_32>;
|
||||
faceId?: pb<4, bytes>;
|
||||
tabId?: pb<5, uint_32>;
|
||||
subType?: pb<6, uint_32>;
|
||||
key?: pb<7, bytes>;
|
||||
param?: pb<8, bytes>;
|
||||
mediaType?: pb<9, uint_32>;
|
||||
imageWidth?: pb<10, uint_32>;
|
||||
imageHeight?: pb<11, uint_32>;
|
||||
mobileParam?: pb<12, bytes>;
|
||||
pbReserve?: pb<13, bytes>;
|
||||
}
|
||||
|
||||
export interface CustomFace {
|
||||
guid?: pb<1, bytes>;
|
||||
filePath?: pb<2, string>;
|
||||
shortcut?: pb<3, string>;
|
||||
buffer?: pb<4, bytes>;
|
||||
flag?: pb<5, bytes>;
|
||||
oldData?: pb<6, bytes>;
|
||||
fileId?: pb<7, uint_32>;
|
||||
serverIp?: pb<8, int_32>;
|
||||
serverPort?: pb<9, int_32>;
|
||||
fileType?: pb<10, int_32>;
|
||||
signature?: pb<11, bytes>;
|
||||
useful?: pb<12, int_32>;
|
||||
md5?: pb<13, bytes>;
|
||||
thumbUrl?: pb<14, string>;
|
||||
bigUrl?: pb<15, string>;
|
||||
origUrl?: pb<16, string>;
|
||||
bizType?: pb<17, int_32>;
|
||||
repeatIndex?: pb<18, int_32>;
|
||||
repeatImage?: pb<19, int_32>;
|
||||
imageType?: pb<20, int_32>;
|
||||
index?: pb<21, int_32>;
|
||||
width?: pb<22, int_32>;
|
||||
height?: pb<23, int_32>;
|
||||
source?: pb<24, int_32>;
|
||||
size?: pb<25, uint_32>;
|
||||
origin?: pb<26, int_32>;
|
||||
thumbWidth?: pb<27, int_32>;
|
||||
thumbHeight?: pb<28, int_32>;
|
||||
showLen?: pb<29, int_32>;
|
||||
downloadLen?: pb<30, int_32>;
|
||||
x400Url?: pb<31, string>;
|
||||
x400Width?: pb<32, int_32>;
|
||||
x400Height?: pb<33, int_32>;
|
||||
pbRes?: pb<34, CustomFacePbReserve>;
|
||||
}
|
||||
|
||||
export interface RichMsg {
|
||||
template1?: pb<1, bytes>;
|
||||
serviceId?: pb<2, int_32>;
|
||||
msgResId?: pb<3, bytes>;
|
||||
rand?: pb<4, int_32>;
|
||||
seq?: pb<5, uint_32>;
|
||||
}
|
||||
|
||||
export interface GroupFileElem {
|
||||
filename?: pb<1, string>;
|
||||
fileSize?: pb<2, uint_64>;
|
||||
fileId?: pb<3, string>;
|
||||
batchId?: pb<4, string>;
|
||||
fileKey?: pb<5, string>;
|
||||
mark?: pb<6, bytes>;
|
||||
sequence?: pb<7, uint_64>;
|
||||
batchItemId?: pb<8, bytes>;
|
||||
feedMsgTime?: pb<9, int_32>;
|
||||
pbReserve?: pb<10, bytes>;
|
||||
}
|
||||
|
||||
export interface ExtraInfo {
|
||||
nick?: pb<1, bytes>;
|
||||
groupCard?: pb<2, bytes>;
|
||||
level?: pb<3, int_32>;
|
||||
flags?: pb<4, int_32>;
|
||||
groupMask?: pb<5, int_32>;
|
||||
msgTailId?: pb<6, int_32>;
|
||||
senderTitle?: pb<7, bytes>;
|
||||
apnsTips?: pb<8, bytes>;
|
||||
uin?: pb<9, uint_64>;
|
||||
msgStateFlag?: pb<10, int_32>;
|
||||
apnsSoundType?: pb<11, int_32>;
|
||||
newGroupFlag?: pb<12, int_32>;
|
||||
}
|
||||
|
||||
export interface VideoFile {
|
||||
fileUuid?: pb<1, string>;
|
||||
fileMd5?: pb<2, bytes>;
|
||||
fileName?: pb<3, string>;
|
||||
fileFormat?: pb<4, int_32>;
|
||||
fileTime?: pb<5, int_32>;
|
||||
fileSize?: pb<6, int_32>;
|
||||
thumbWidth?: pb<7, int_32>;
|
||||
thumbHeight?: pb<8, int_32>;
|
||||
thumbFileMd5?: pb<9, bytes>;
|
||||
source?: pb<10, bytes>;
|
||||
thumbFileSize?: pb<11, int_32>;
|
||||
busiType?: pb<12, int_32>;
|
||||
fromChatType?: pb<13, int_32>;
|
||||
toChatType?: pb<14, int_32>;
|
||||
supportProgressive?: pb<15, bool>;
|
||||
fileWidth?: pb<16, int_32>;
|
||||
fileHeight?: pb<17, int_32>;
|
||||
subBusiType?: pb<18, int_32>;
|
||||
videoAttr?: pb<19, int_32>;
|
||||
pbReserve?: pb<24, bytes>;
|
||||
}
|
||||
|
||||
export interface SrcMsg {
|
||||
origSeqs?: pb_repeated<1, uint_32>;
|
||||
senderUin?: pb<2, uint_64>;
|
||||
time?: pb<3, int_32>;
|
||||
flag?: pb<4, int_32>;
|
||||
elemsRaw?: pb_repeated<5, bytes>;
|
||||
type?: pb<6, int_32>;
|
||||
richMsg?: pb<7, bytes>;
|
||||
pbReserve?: pb<8, bytes>;
|
||||
sourceMsg?: pb<9, bytes>;
|
||||
toUin?: pb<10, uint_64>;
|
||||
troopName?: pb<11, bytes>;
|
||||
}
|
||||
|
||||
export interface LightAppElem {
|
||||
data?: pb<1, bytes>;
|
||||
msgResid?: pb<2, bytes>;
|
||||
}
|
||||
|
||||
export interface CommonElem {
|
||||
serviceType?: pb<1, int_32>;
|
||||
pbElem?: pb<2, bytes>;
|
||||
businessType?: pb<3, uint_32>;
|
||||
}
|
||||
|
||||
export interface GeneralFlags {
|
||||
bubbleDiyTextId?: pb<1, int_32>;
|
||||
groupFlagNew?: pb<2, int_32>;
|
||||
uin?: pb<3, uint_64>;
|
||||
longTextFlag?: pb<6, int_32>;
|
||||
longTextResId?: pb<7, string>;
|
||||
}
|
||||
|
||||
// Elem (union of all element types)
|
||||
|
||||
export interface Elem {
|
||||
text?: pb<1, TextElem>;
|
||||
face?: pb<2, FaceElem>;
|
||||
onlineImage?: pb<3, OnlineImage>;
|
||||
notOnlineImage?: pb<4, NotOnlineImage>;
|
||||
transElem?: pb<5, TransElem>;
|
||||
marketFace?: pb<6, MarketFace>;
|
||||
customFace?: pb<8, CustomFace>;
|
||||
richMsg?: pb<12, RichMsg>;
|
||||
groupFile?: pb<13, GroupFileElem>;
|
||||
extraInfo?: pb<16, ExtraInfo>;
|
||||
videoFile?: pb<19, VideoFile>;
|
||||
generalFlags?: pb<37, GeneralFlags>;
|
||||
srcMsg?: pb<45, SrcMsg>;
|
||||
lightApp?: pb<51, LightAppElem>;
|
||||
commonElem?: pb<53, CommonElem>;
|
||||
}
|
||||
|
||||
// Extra decode types (for CommonElem.pbElem sub-messages)
|
||||
|
||||
export interface MentionExtra {
|
||||
type?: pb<3, int_32>;
|
||||
uin?: pb<4, uint_32>;
|
||||
field5?: pb<5, int_32>;
|
||||
uid?: pb<9, string>;
|
||||
}
|
||||
|
||||
export interface QFaceExtra {
|
||||
packId?: pb<1, string>;
|
||||
stickerId?: pb<2, string>;
|
||||
qsid?: pb<3, int_32>;
|
||||
sourceType?: pb<4, int_32>;
|
||||
stickerType?: pb<5, int_32>;
|
||||
resultId?: pb<6, string>;
|
||||
text?: pb<7, string>;
|
||||
randomType?: pb<9, int_32>;
|
||||
}
|
||||
|
||||
export interface QSmallFaceExtra {
|
||||
faceId?: pb<1, uint_32>;
|
||||
preview?: pb<2, string>;
|
||||
preview2?: pb<3, string>;
|
||||
}
|
||||
|
||||
// NTQQ MsgInfo types (CommonElem service_type 48)
|
||||
|
||||
export interface FileType {
|
||||
type?: pb<1, uint_32>;
|
||||
picFormat?: pb<2, uint_32>;
|
||||
videoFormat?: pb<3, uint_32>;
|
||||
voiceFormat?: pb<4, uint_32>;
|
||||
}
|
||||
|
||||
export interface FileInfo {
|
||||
fileSize?: pb<1, uint_32>;
|
||||
fileHash?: pb<2, string>;
|
||||
fileSha1?: pb<3, string>;
|
||||
fileName?: pb<4, string>;
|
||||
type?: pb<5, FileType>;
|
||||
width?: pb<6, uint_32>;
|
||||
height?: pb<7, uint_32>;
|
||||
time?: pb<8, uint_32>;
|
||||
original?: pb<9, uint_32>;
|
||||
}
|
||||
|
||||
export interface IndexNode {
|
||||
info?: pb<1, FileInfo>;
|
||||
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 PicUrlExtInfo {
|
||||
originalParameter?: pb<1, string>;
|
||||
bigParameter?: pb<2, string>;
|
||||
thumbParameter?: pb<3, string>;
|
||||
}
|
||||
|
||||
export interface PictureInfo {
|
||||
urlPath?: pb<1, string>;
|
||||
ext?: pb<2, PicUrlExtInfo>;
|
||||
domain?: pb<3, string>;
|
||||
}
|
||||
|
||||
export interface PicExtData {
|
||||
subType?: pb<1, uint_32>;
|
||||
textSummary?: pb<9, string>;
|
||||
}
|
||||
|
||||
export interface PicExtBizInfo {
|
||||
bizType?: pb<1, uint_32>;
|
||||
textSummary?: pb<2, string>;
|
||||
bytesPbReserveC2c?: pb<11, bytes>;
|
||||
extData?: pb<12, PicExtData>;
|
||||
fromScene?: pb<1001, uint_32>;
|
||||
toScene?: pb<1002, uint_32>;
|
||||
oldFileId?: pb<1003, uint_32>;
|
||||
}
|
||||
|
||||
export interface VideoExtBizInfo {
|
||||
fromScene?: pb<1, uint_32>;
|
||||
toScene?: pb<2, uint_32>;
|
||||
bytesPbReserve?: pb<3, bytes>;
|
||||
}
|
||||
|
||||
export interface PttExtBizInfo {
|
||||
srcUin?: pb<1, uint_64>;
|
||||
pttScene?: pb<2, uint_32>;
|
||||
pttType?: pb<3, uint_32>;
|
||||
changeVoice?: pb<4, uint_32>;
|
||||
waveform?: pb<5, bytes>;
|
||||
autoConvertText?: pb<6, uint_32>;
|
||||
bytesReserve?: pb<11, bytes>;
|
||||
bytesPbReserve?: pb<12, bytes>;
|
||||
bytesGeneralFlags?: pb<13, bytes>;
|
||||
}
|
||||
|
||||
export interface ExtBizInfo {
|
||||
pic?: pb<1, PicExtBizInfo>;
|
||||
video?: pb<2, VideoExtBizInfo>;
|
||||
ptt?: pb<3, PttExtBizInfo>;
|
||||
busiType?: pb<10, uint_32>;
|
||||
}
|
||||
|
||||
export interface C2cSource {
|
||||
friendUid?: pb<2, string>;
|
||||
}
|
||||
|
||||
export interface TroopSource {
|
||||
groupUin?: pb<1, uint_32>;
|
||||
}
|
||||
|
||||
export interface HashSum {
|
||||
bytesPbReserveC2c?: pb<201, C2cSource>;
|
||||
troopSource?: pb<202, TroopSource>;
|
||||
}
|
||||
|
||||
export interface MsgInfoBody {
|
||||
index?: pb<1, IndexNode>;
|
||||
picture?: pb<2, PictureInfo>;
|
||||
fileExist?: pb<5, bool>;
|
||||
hashSum?: pb<6, HashSum>;
|
||||
}
|
||||
|
||||
export interface MsgInfo {
|
||||
msgInfoBody?: pb_repeated<1, MsgInfoBody>;
|
||||
extBizInfo?: pb<2, ExtBizInfo>;
|
||||
}
|
||||
|
||||
// 群文件附加信息 (TransElem type=24)
|
||||
// 旧版 Schema 字段 5-7 错位曾导致服务器返回 result=79 并拒收消息。
|
||||
// 字段 5 为 uint32 占位符。
|
||||
export interface GroupFileInfo {
|
||||
busId?: pb<1, uint_32>;
|
||||
fileId?: pb<2, string>;
|
||||
fileSize?: pb<3, uint_64>;
|
||||
fileName?: pb<4, string>;
|
||||
field5?: pb<5, uint_32>; // 关键:必须是 uint32 占位符,错位会导致 SHA 字节流污染此字段
|
||||
fileSha?: pb<6, bytes>;
|
||||
extInfoString?: pb<7, string>;
|
||||
fileMd5?: pb<8, bytes>;
|
||||
}
|
||||
|
||||
export interface GroupFileExtraInner {
|
||||
info?: pb<2, GroupFileInfo>;
|
||||
}
|
||||
|
||||
// 新版服务器强校验外层结构。缺少 field1 (Magic Tag)、fileName 或 display 槽位,消息将被直接拒绝。
|
||||
export interface GroupFileExtra {
|
||||
field1?: pb<1, uint_32>; // NapCat 硬编码固定为 6 (Magic Op Tag)
|
||||
fileName?: pb<2, string>; // 镜像同步内部的 info.fileName
|
||||
display?: pb<3, string>; // UI 预览槽位,可留空但必须声明
|
||||
inner?: pb<7, GroupFileExtraInner>;
|
||||
}
|
||||
|
||||
// 消息回执保留信息
|
||||
export interface Preserve {
|
||||
messageId?: pb<3, uint_64>;
|
||||
senderUid?: pb<6, string>;
|
||||
receiverUid?: pb<7, string>;
|
||||
clientSequence?: pb<8, uint_32>;
|
||||
}
|
||||
@@ -1,327 +0,0 @@
|
||||
import type { pb, pb_repeated, int_32, uint_32, uint_64, bool, bytes } from '@snowluma/proton';
|
||||
import type {
|
||||
IndexNode,
|
||||
PictureInfo,
|
||||
HashSum,
|
||||
PicExtBizInfo,
|
||||
VideoExtBizInfo,
|
||||
PttExtBizInfo,
|
||||
} from './element';
|
||||
|
||||
// DataHighwayHead
|
||||
|
||||
export interface DataHighwayHead {
|
||||
version?: pb<1, uint_32>;
|
||||
uin?: pb<2, string>;
|
||||
command?: pb<3, string>;
|
||||
seq?: pb<4, uint_32>;
|
||||
retryTimes?: pb<5, uint_32>;
|
||||
appId?: pb<6, uint_32>;
|
||||
dataFlag?: pb<7, uint_32>;
|
||||
commandId?: pb<8, uint_32>;
|
||||
}
|
||||
|
||||
export interface SegHead {
|
||||
serviceId?: pb<1, uint_32>;
|
||||
filesize?: pb<2, uint_64>;
|
||||
dataOffset?: pb<3, uint_64>;
|
||||
dataLength?: pb<4, uint_32>;
|
||||
retCode?: pb<5, uint_32>;
|
||||
serviceTicket?: pb<6, bytes>;
|
||||
flag?: pb<7, uint_32>;
|
||||
md5?: pb<8, bytes>;
|
||||
fileMd5?: pb<9, bytes>;
|
||||
cacheAddr?: pb<10, uint_32>;
|
||||
cachePort?: pb<13, uint_32>;
|
||||
}
|
||||
|
||||
export interface LoginSigHead {
|
||||
loginSigType?: pb<1, uint_32>;
|
||||
appId?: pb<3, uint_32>;
|
||||
}
|
||||
|
||||
export interface ReqDataHighwayHead {
|
||||
msgBaseHead?: pb<1, DataHighwayHead>;
|
||||
msgSegHead?: pb<2, SegHead>;
|
||||
bytesReqExtendInfo?: pb<3, bytes>;
|
||||
timestamp?: pb<4, uint_64>;
|
||||
msgLoginSigHead?: pb<5, LoginSigHead>;
|
||||
}
|
||||
|
||||
export interface RespDataHighwayHead {
|
||||
msgBaseHead?: pb<1, DataHighwayHead>;
|
||||
msgSegHead?: pb<2, SegHead>;
|
||||
errorCode?: pb<3, uint_32>;
|
||||
}
|
||||
|
||||
// Highway extend (NTV2RichMediaHighwayExt)
|
||||
|
||||
export interface HighwayDomain {
|
||||
isEnable?: pb<1, bool>;
|
||||
ip?: pb<2, string>;
|
||||
}
|
||||
|
||||
export interface HighwayIPv4 {
|
||||
domain?: pb<1, HighwayDomain>;
|
||||
port?: pb<2, uint_32>;
|
||||
}
|
||||
|
||||
export interface HighwayNetwork {
|
||||
ipv4s?: pb_repeated<1, HighwayIPv4>;
|
||||
}
|
||||
|
||||
export interface HighwayHash {
|
||||
fileSha1?: pb_repeated<1, bytes>;
|
||||
}
|
||||
|
||||
export interface HighwayMsgInfoBody {
|
||||
index?: pb<1, IndexNode>;
|
||||
picture?: pb<2, PictureInfo>;
|
||||
fileExist?: pb<5, bool>;
|
||||
hashSum?: pb<6, HashSum>;
|
||||
}
|
||||
|
||||
export interface NTV2RichMediaHighwayExt {
|
||||
fileUuid?: pb<1, string>;
|
||||
uKey?: pb<2, string>;
|
||||
network?: pb<5, HighwayNetwork>;
|
||||
msgInfoBody?: pb_repeated<6, HighwayMsgInfoBody>;
|
||||
blockSize?: pb<10, uint_32>;
|
||||
hash?: pb<11, HighwayHash>;
|
||||
}
|
||||
|
||||
// File upload extend (group/private file highway)
|
||||
|
||||
export interface FileUploadUrl {
|
||||
unknown?: pb<1, int_32>;
|
||||
host?: pb<2, string>;
|
||||
}
|
||||
|
||||
export interface FileUploadHost {
|
||||
url?: pb<1, FileUploadUrl>;
|
||||
port?: pb<2, uint_32>;
|
||||
}
|
||||
|
||||
export interface FileUploadHostConfig {
|
||||
hosts?: pb_repeated<200, FileUploadHost>;
|
||||
}
|
||||
|
||||
export interface FileUploadNameInfo {
|
||||
fileName?: pb<100, string>;
|
||||
}
|
||||
|
||||
export interface FileUploadClientInfo {
|
||||
clientType?: pb<100, int_32>;
|
||||
appId?: pb<200, string>;
|
||||
terminalType?: pb<300, int_32>;
|
||||
clientVer?: pb<400, string>;
|
||||
unknown?: pb<600, int_32>;
|
||||
}
|
||||
|
||||
export interface FileUploadFileEntry {
|
||||
fileSize?: pb<100, uint_64>;
|
||||
md5?: pb<200, bytes>;
|
||||
checkKey?: pb<300, bytes>;
|
||||
md5S2?: pb<400, bytes>;
|
||||
fileId?: pb<600, string>;
|
||||
uploadKey?: pb<700, bytes>;
|
||||
}
|
||||
|
||||
export interface FileUploadBusiInfo {
|
||||
busId?: pb<1, int_32>;
|
||||
senderUin?: pb<100, uint_64>;
|
||||
receiverUin?: pb<200, uint_64>;
|
||||
groupCode?: pb<400, uint_64>;
|
||||
}
|
||||
|
||||
export interface FileUploadEntry {
|
||||
busiBuff?: pb<100, FileUploadBusiInfo>;
|
||||
fileEntry?: pb<200, FileUploadFileEntry>;
|
||||
clientInfo?: pb<300, FileUploadClientInfo>;
|
||||
fileNameInfo?: pb<400, FileUploadNameInfo>;
|
||||
host?: pb<500, FileUploadHostConfig>;
|
||||
}
|
||||
|
||||
export interface FileUploadExt {
|
||||
unknown1?: pb<1, int_32>;
|
||||
unknown2?: pb<2, int_32>;
|
||||
unknown3?: pb<3, int_32>;
|
||||
entry?: pb<100, FileUploadEntry>;
|
||||
unknown200?: pb<200, int_32>;
|
||||
}
|
||||
|
||||
// Encodable MsgInfo (for embedding in message element)
|
||||
|
||||
export interface EncodableMediaExtBizInfo {
|
||||
pic?: pb<1, PicExtBizInfo>;
|
||||
video?: pb<2, VideoExtBizInfo>;
|
||||
ptt?: pb<3, PttExtBizInfo>;
|
||||
busiType?: pb<10, uint_32>;
|
||||
}
|
||||
|
||||
export interface EncodableMediaMsgInfo {
|
||||
msgInfoBody?: pb_repeated<1, HighwayMsgInfoBody>;
|
||||
extBizInfo?: pb<2, EncodableMediaExtBizInfo>;
|
||||
}
|
||||
|
||||
// HttpConn.0x6ff_501 (highway session)
|
||||
|
||||
export interface HttpConn {
|
||||
field1?: pb<1, int_32>;
|
||||
field2?: pb<2, int_32>;
|
||||
field3?: pb<3, int_32>;
|
||||
field4?: pb<4, int_32>;
|
||||
field6?: pb<6, int_32>;
|
||||
serviceTypes?: pb_repeated<7, uint_32>;
|
||||
field9?: pb<9, int_32>;
|
||||
field10?: pb<10, int_32>;
|
||||
field11?: pb<11, int_32>;
|
||||
ver?: pb<15, string>;
|
||||
}
|
||||
|
||||
export interface HttpConn0x6FF501Request {
|
||||
httpConn?: pb<0x501, HttpConn>;
|
||||
}
|
||||
|
||||
export interface ServerAddr {
|
||||
type?: pb<1, uint_32>;
|
||||
ip?: pb<2, uint_32>;
|
||||
port?: pb<3, uint_32>;
|
||||
area?: pb<4, uint_32>;
|
||||
}
|
||||
|
||||
export interface ServerInfo {
|
||||
serviceType?: pb<1, uint_32>;
|
||||
serverAddrs?: pb_repeated<2, ServerAddr>;
|
||||
}
|
||||
|
||||
export interface HttpConnResponse {
|
||||
sigSession?: pb<1, bytes>;
|
||||
sessionKey?: pb<2, bytes>;
|
||||
serverInfos?: pb_repeated<3, ServerInfo>;
|
||||
}
|
||||
|
||||
export interface HttpConn0x6FF501Response {
|
||||
httpConn?: pb<0x501, HttpConnResponse>;
|
||||
}
|
||||
|
||||
// NTV2 Upload Request (for OIDB 0x11C4/0x11C5)
|
||||
|
||||
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 NTV2UploadInfo {
|
||||
fileInfo?: pb<1, NTV2FileInfo>;
|
||||
subFileType?: pb<2, uint_32>;
|
||||
}
|
||||
|
||||
// NTV2 上传请求/响应扩展信息(与消息解码结构共用,参考 bridge/proto/highway.ts)
|
||||
// 必须包含 video.fromScene 和 toScene 字段,否则私聊发送视频时会被服务器返回 result=79 拒绝。
|
||||
export interface NTV2ExtBizInfo {
|
||||
pic?: pb<1, PicExtBizInfo>;
|
||||
video?: pb<2, VideoExtBizInfo>;
|
||||
ptt?: pb<3, PttExtBizInfo>;
|
||||
busiType?: pb<10, uint_32>;
|
||||
}
|
||||
|
||||
export interface NTV2UploadReq {
|
||||
uploadInfo?: pb_repeated<1, NTV2UploadInfo>;
|
||||
tryFastUploadCompleted?: pb<2, bool>;
|
||||
srvSendMsg?: pb<3, bool>;
|
||||
clientRandomId?: pb<4, uint_64>;
|
||||
compatQmsgSceneType?: pb<5, uint_32>;
|
||||
extBizInfo?: pb<6, NTV2ExtBizInfo>;
|
||||
clientSeq?: pb<7, uint_32>;
|
||||
noNeedCompatMsg?: pb<8, bool>;
|
||||
}
|
||||
|
||||
export interface NTV2C2CUserInfo {
|
||||
accountType?: pb<1, uint_32>;
|
||||
targetUid?: pb<2, string>;
|
||||
}
|
||||
|
||||
export interface NTV2GroupInfo {
|
||||
groupUin?: pb<1, uint_32>;
|
||||
}
|
||||
|
||||
export interface NTV2UploadSceneInfo {
|
||||
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 NTV2CommonHead {
|
||||
requestId?: pb<1, uint_32>;
|
||||
command?: pb<2, uint_32>;
|
||||
}
|
||||
|
||||
export interface NTV2ClientMeta {
|
||||
agentType?: pb<1, uint_32>;
|
||||
}
|
||||
|
||||
export interface NTV2UploadReqHead {
|
||||
common?: pb<1, NTV2CommonHead>;
|
||||
scene?: pb<2, NTV2UploadSceneInfo>;
|
||||
client?: pb<3, NTV2ClientMeta>;
|
||||
}
|
||||
|
||||
export interface NTV2UploadRichMediaReq {
|
||||
reqHead?: pb<1, NTV2UploadReqHead>;
|
||||
upload?: pb<2, NTV2UploadReq>;
|
||||
}
|
||||
|
||||
// NTV2 Upload Response
|
||||
export interface NTV2IPv4 {
|
||||
outIp?: pb<1, uint_32>;
|
||||
outPort?: pb<2, uint_32>;
|
||||
}
|
||||
|
||||
export interface NTV2SubFileInfoResp {
|
||||
subType?: pb<1, uint_32>;
|
||||
uKey?: pb<2, string>;
|
||||
uKeyTtl?: pb<3, uint_32>;
|
||||
ipv4s?: pb_repeated<4, NTV2IPv4>;
|
||||
}
|
||||
|
||||
export interface NTV2UploadRespMsgInfo {
|
||||
msgInfoBody?: pb_repeated<1, HighwayMsgInfoBody>;
|
||||
extBizInfo?: pb<2, NTV2ExtBizInfo>;
|
||||
}
|
||||
|
||||
export interface NTV2UploadRespBody {
|
||||
uKey?: pb<1, string>;
|
||||
uKeyTtl?: pb<2, uint_32>;
|
||||
ipv4s?: pb_repeated<3, NTV2IPv4>;
|
||||
msgSeq?: pb<5, uint_64>;
|
||||
msgInfo?: pb<6, NTV2UploadRespMsgInfo>;
|
||||
subFileInfos?: pb_repeated<10, NTV2SubFileInfoResp>;
|
||||
}
|
||||
|
||||
export interface NTV2UploadRespHead {
|
||||
common?: pb<1, NTV2CommonHead>;
|
||||
retCode?: pb<2, uint_32>;
|
||||
message?: pb<3, string>;
|
||||
}
|
||||
|
||||
export interface NTV2UploadRichMediaResp {
|
||||
respHead?: pb<1, NTV2UploadRespHead>;
|
||||
upload?: pb<2, NTV2UploadRespBody>;
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
import type { pb, pb_repeated, uint_32, bool, bytes } from '@snowluma/proton';
|
||||
import type { PushMsgBody } from './message';
|
||||
|
||||
export interface LongMsgUid {
|
||||
uid?: pb<2, string>;
|
||||
}
|
||||
|
||||
export interface LongMsgSettings {
|
||||
field1?: pb<1, uint_32>;
|
||||
field2?: pb<2, uint_32>;
|
||||
field3?: pb<3, uint_32>;
|
||||
field4?: pb<4, uint_32>;
|
||||
}
|
||||
|
||||
export interface SendLongMsgInfo {
|
||||
type?: pb<1, uint_32>;
|
||||
uid?: pb<2, LongMsgUid>;
|
||||
groupUin?: pb<3, uint_32>;
|
||||
payload?: pb<4, bytes>;
|
||||
}
|
||||
|
||||
export interface SendLongMsgReq {
|
||||
info?: pb<2, SendLongMsgInfo>;
|
||||
settings?: pb<15, LongMsgSettings>;
|
||||
}
|
||||
|
||||
export interface SendLongMsgRespResult {
|
||||
resId?: pb<3, string>;
|
||||
}
|
||||
|
||||
export interface SendLongMsgResp {
|
||||
result?: pb<2, SendLongMsgRespResult>;
|
||||
settings?: pb<15, LongMsgSettings>;
|
||||
}
|
||||
|
||||
export interface RecvLongMsgInfo {
|
||||
uid?: pb<1, LongMsgUid>;
|
||||
resId?: pb<2, string>;
|
||||
acquire?: pb<3, bool>;
|
||||
}
|
||||
|
||||
export interface RecvLongMsgReq {
|
||||
info?: pb<1, RecvLongMsgInfo>;
|
||||
settings?: pb<15, LongMsgSettings>;
|
||||
}
|
||||
|
||||
export interface RecvLongMsgRespResult {
|
||||
resId?: pb<3, string>;
|
||||
payload?: pb<4, bytes>;
|
||||
}
|
||||
|
||||
export interface RecvLongMsgResp {
|
||||
result?: pb<1, RecvLongMsgRespResult>;
|
||||
settings?: pb<15, LongMsgSettings>;
|
||||
}
|
||||
|
||||
// Schemas that reach into PushMsgBody
|
||||
export interface LongMsgContent {
|
||||
msgBody?: pb_repeated<1, PushMsgBody>;
|
||||
}
|
||||
|
||||
export interface LongMsgAction {
|
||||
actionCommand?: pb<1, string>;
|
||||
actionData?: pb<2, LongMsgContent>;
|
||||
}
|
||||
|
||||
export interface LongMsgResult {
|
||||
action?: pb_repeated<2, LongMsgAction>;
|
||||
}
|
||||
@@ -1,98 +0,0 @@
|
||||
import type { pb, pb_repeated, int_32, uint_32, uint_64, bytes } from '@snowluma/proton';
|
||||
import type { Elem } from './element';
|
||||
|
||||
// ResponseHead.Grp
|
||||
export interface ResponseGrp {
|
||||
groupUin?: pb<1, uint_32>;
|
||||
memberName?: pb<2, string>;
|
||||
groupName?: pb<4, string>;
|
||||
}
|
||||
|
||||
export interface ResponseForward {
|
||||
friendName?: pb<6, string>;
|
||||
}
|
||||
|
||||
// ResponseHead
|
||||
export interface ResponseHead {
|
||||
fromUin?: pb<1, uint_32>;
|
||||
fromUid?: pb<2, string>;
|
||||
type?: pb<3, uint_32>;
|
||||
sigMap?: pb<4, uint_32>;
|
||||
toUin?: pb<5, uint_32>;
|
||||
toUid?: pb<6, string>;
|
||||
forward?: pb<7, ResponseForward>;
|
||||
grp?: pb<8, ResponseGrp>;
|
||||
}
|
||||
|
||||
// ContentHead
|
||||
export interface ContentHead {
|
||||
msgType?: pb<1, uint_32>;
|
||||
subType?: pb<2, uint_32>;
|
||||
divSeq?: pb<3, uint_32>;
|
||||
msgId?: pb<4, uint_32>;
|
||||
sequence?: pb<5, uint_32>;
|
||||
timestamp?: pb<6, uint_32>;
|
||||
field7?: pb<7, uint_64>;
|
||||
newId?: pb<12, uint_64>;
|
||||
}
|
||||
|
||||
// Ptt (voice)
|
||||
export interface Ptt {
|
||||
fileType?: pb<1, uint_32>;
|
||||
fileId?: pb<2, uint_64>;
|
||||
fileUuid?: pb<3, bytes>;
|
||||
fileMd5?: pb<4, bytes>;
|
||||
fileName?: pb<5, string>;
|
||||
fileSize?: pb<6, uint_32>;
|
||||
groupFileKey?: pb<10, string>;
|
||||
fileKey?: pb<14, bytes>;
|
||||
time?: pb<19, uint_32>;
|
||||
format?: pb<29, uint_32>;
|
||||
}
|
||||
|
||||
// C2C 离线文件结构
|
||||
// 1. 发送端必填:字段 9/50/55(subcmd=1, dangerEvel=0, expireTime=当前时间+7天)。
|
||||
// 2. 接收端只读:核心标识槽位(Uuid/Md5/Name/Size/Hash)。
|
||||
export interface NotOnlineFile {
|
||||
fileType?: pb<1, uint_32>;
|
||||
fileUuid?: pb<3, string>;
|
||||
fileMd5?: pb<4, bytes>;
|
||||
fileName?: pb<5, string>;
|
||||
fileSize?: pb<6, uint_64>;
|
||||
subcmd?: pb<9, uint_32>; // 发送必填:固定为 1
|
||||
dangerEvel?: pb<50, uint_32>; // 发送必填:固定为 0
|
||||
expireTime?: pb<55, uint_32>; // 发送必填:过期时间戳(now + 7 days)
|
||||
fileHash?: pb<57, string>;
|
||||
}
|
||||
|
||||
// RichText
|
||||
export interface RichText {
|
||||
elems?: pb_repeated<2, Elem>;
|
||||
notOnlineFile?: pb<3, NotOnlineFile>;
|
||||
ptt?: pb<4, Ptt>;
|
||||
}
|
||||
|
||||
// MessageBody
|
||||
export interface MessageBody {
|
||||
richText?: pb<1, RichText>;
|
||||
msgContent?: pb<2, bytes>;
|
||||
}
|
||||
|
||||
// C2C 文件附加信息
|
||||
// 统一使用与线上数据对齐的 NotOnlineFile 结构,修复收发双向的解析问题。
|
||||
export interface FileExtra {
|
||||
file?: pb<1, NotOnlineFile>;
|
||||
}
|
||||
|
||||
// PushMsgBody
|
||||
export interface PushMsgBody {
|
||||
responseHead?: pb<1, ResponseHead>;
|
||||
contentHead?: pb<2, ContentHead>;
|
||||
body?: pb<3, MessageBody>;
|
||||
}
|
||||
|
||||
// PushMsg (top-level)
|
||||
export interface PushMsg {
|
||||
message?: pb<1, PushMsgBody>;
|
||||
status?: pb<3, int_32>;
|
||||
}
|
||||
@@ -1,264 +0,0 @@
|
||||
import type { pb, pb_repeated, int_32, uint_32, uint_64, bool, bytes } from '@snowluma/proton';
|
||||
|
||||
export interface OperatorField1 {
|
||||
uid?: pb<1, string>;
|
||||
field2?: pb<2, uint_32>;
|
||||
field3?: pb<3, bytes>;
|
||||
field4?: pb<4, uint_32>;
|
||||
field5?: pb<5, bytes>;
|
||||
}
|
||||
|
||||
export interface OperatorInfo {
|
||||
operatorField?: pb<1, OperatorField1>;
|
||||
}
|
||||
|
||||
export interface GroupChange {
|
||||
groupUin?: pb<1, uint_32>;
|
||||
flag?: pb<2, uint_32>;
|
||||
memberUid?: pb<3, string>;
|
||||
decreaseType?: pb<4, uint_32>;
|
||||
operatorBytes?: pb<5, bytes>;
|
||||
increaseType?: pb<6, uint_32>;
|
||||
field7?: pb<7, bytes>;
|
||||
}
|
||||
|
||||
export interface GroupAdminExtra {
|
||||
adminUid?: pb<1, string>;
|
||||
isPromote?: pb<2, bool>;
|
||||
}
|
||||
|
||||
export interface GroupAdminBody {
|
||||
extraDisable?: pb<1, GroupAdminExtra>;
|
||||
extraEnable?: pb<2, GroupAdminExtra>;
|
||||
}
|
||||
|
||||
export interface GroupAdmin {
|
||||
groupUin?: pb<1, uint_32>;
|
||||
flag?: pb<2, uint_32>;
|
||||
isPromote?: pb<3, bool>;
|
||||
body?: pb<4, GroupAdminBody>;
|
||||
}
|
||||
|
||||
export interface InvitationInner {
|
||||
groupUin?: pb<1, uint_32>;
|
||||
field2?: pb<2, uint_32>;
|
||||
field3?: pb<3, uint_32>;
|
||||
field4?: pb<4, uint_32>;
|
||||
targetUid?: pb<5, string>;
|
||||
invitorUid?: pb<6, string>;
|
||||
field7?: pb<7, uint_32>;
|
||||
field9?: pb<9, uint_32>;
|
||||
field10?: pb<10, bytes>;
|
||||
field11?: pb<11, uint_32>;
|
||||
field12?: pb<12, string>;
|
||||
}
|
||||
|
||||
export interface InvitationInfo {
|
||||
inner?: pb<1, InvitationInner>;
|
||||
}
|
||||
|
||||
export interface GroupInvitation {
|
||||
cmd?: pb<1, int_32>;
|
||||
info?: pb<2, InvitationInfo>;
|
||||
}
|
||||
|
||||
export interface GroupInvite {
|
||||
groupUin?: pb<1, uint_32>;
|
||||
field2?: pb<2, uint_32>;
|
||||
field3?: pb<3, uint_32>;
|
||||
field4?: pb<4, uint_32>;
|
||||
invitorUid?: pb<5, string>;
|
||||
hashes?: pb<6, bytes>;
|
||||
}
|
||||
|
||||
export interface GroupJoin {
|
||||
groupUin?: pb<1, uint_32>;
|
||||
field2?: pb<2, uint_32>;
|
||||
targetUid?: pb<3, string>;
|
||||
field4?: pb<4, uint_32>;
|
||||
field6?: pb<6, uint_32>;
|
||||
field7?: pb<7, string>;
|
||||
field8?: pb<8, uint_32>;
|
||||
field9?: pb<9, bytes>;
|
||||
}
|
||||
|
||||
export interface FriendRequestInfo {
|
||||
targetUid?: pb<1, string>;
|
||||
sourceUid?: pb<2, string>;
|
||||
newSource?: pb<5, string>;
|
||||
message?: pb<10, string>;
|
||||
source?: pb<11, string>;
|
||||
}
|
||||
|
||||
export interface FriendRequest {
|
||||
info?: pb<1, FriendRequestInfo>;
|
||||
}
|
||||
|
||||
export interface FriendRecallTipInfo {
|
||||
tip?: pb<2, string>;
|
||||
}
|
||||
|
||||
export interface FriendRecallInfo {
|
||||
fromUid?: pb<1, string>;
|
||||
toUid?: pb<2, string>;
|
||||
clientSequence?: pb<3, uint_32>;
|
||||
newId?: pb<4, uint_64>;
|
||||
time?: pb<5, uint_32>;
|
||||
random?: pb<6, uint_32>;
|
||||
pkgNum?: pb<7, uint_32>;
|
||||
pkgIndex?: pb<8, uint_32>;
|
||||
divSeq?: pb<9, uint_32>;
|
||||
tipInfo?: pb<13, FriendRecallTipInfo>;
|
||||
}
|
||||
|
||||
export interface FriendRecall {
|
||||
info?: pb<1, FriendRecallInfo>;
|
||||
instId?: pb<2, uint_32>;
|
||||
appId?: pb<3, uint_32>;
|
||||
longMessageFlag?: pb<4, uint_32>;
|
||||
reserved?: pb<5, bytes>;
|
||||
}
|
||||
|
||||
// 新好友通知 (0x210 子类型 179 / 226)
|
||||
// 触发场景:双向同意好友申请(179:对方同意 Bot;226:Bot 同意对方)。
|
||||
export interface NewFriendInfo {
|
||||
uid?: pb<1, string>;
|
||||
field2?: pb<2, uint_32>;
|
||||
time?: pb<3, uint_32>; // Unix 时间戳 (Wire 层为 fixed32)
|
||||
message?: pb<4, string>;
|
||||
nickName?: pb<5, string>;
|
||||
field6?: pb<6, uint_32>;
|
||||
field7?: pb<7, uint_32>;
|
||||
toUid?: pb<9, string>;
|
||||
}
|
||||
|
||||
export interface NewFriend {
|
||||
field1?: pb<1, uint_32>;
|
||||
info?: pb<2, NewFriendInfo>;
|
||||
}
|
||||
|
||||
// Bot 自身进群通知 (PkgType 85)
|
||||
// 触发场景:Bot 成功加入群聊(管理员通过申请 或 接受邀请进群)。
|
||||
export interface SelfJoinInGroup {
|
||||
groupUin?: pb<1, uint_64>;
|
||||
field2?: pb<2, uint_32>;
|
||||
operatorUid?: pb<3, string>; // 操作人 UID (如批准申请的管理员)
|
||||
field4?: pb<4, uint_32>;
|
||||
field6?: pb<6, uint_32>;
|
||||
field7?: pb<7, string>;
|
||||
}
|
||||
|
||||
export interface GroupMuteState {
|
||||
targetUid?: pb<1, string>;
|
||||
duration?: pb<2, uint_32>;
|
||||
}
|
||||
|
||||
export interface GroupMuteData {
|
||||
timestamp?: pb<1, uint_32>;
|
||||
type?: pb<2, uint_32>;
|
||||
state?: pb<3, GroupMuteState>;
|
||||
}
|
||||
|
||||
export interface GroupMute {
|
||||
groupUin?: pb<1, uint_32>;
|
||||
subType?: pb<2, uint_32>;
|
||||
field3?: pb<3, uint_32>;
|
||||
operatorUid?: pb<4, string>;
|
||||
data?: pb<5, GroupMuteData>;
|
||||
}
|
||||
|
||||
export interface RecallMessage {
|
||||
sequence?: pb<1, uint_32>;
|
||||
time?: pb<2, uint_32>;
|
||||
random?: pb<3, uint_32>;
|
||||
type?: pb<4, uint_32>;
|
||||
flag?: pb<5, uint_32>;
|
||||
authorUid?: pb<6, string>;
|
||||
}
|
||||
|
||||
export interface GroupRecallTipInfo {
|
||||
tip?: pb<2, string>;
|
||||
}
|
||||
|
||||
export interface GroupRecall {
|
||||
operatorUid?: pb<1, string>;
|
||||
recallMessages?: pb_repeated<3, RecallMessage>;
|
||||
userDef?: pb<5, bytes>;
|
||||
groupType?: pb<6, int_32>;
|
||||
opType?: pb<7, int_32>;
|
||||
tipInfo?: pb<9, GroupRecallTipInfo>;
|
||||
}
|
||||
|
||||
export interface TemplParam {
|
||||
name?: pb<1, string>;
|
||||
value?: pb<2, string>;
|
||||
}
|
||||
|
||||
export interface GeneralGrayTipInfo {
|
||||
busiType?: pb<1, uint_64>;
|
||||
busiId?: pb<2, uint_64>;
|
||||
ctrlFlag?: pb<3, uint_32>;
|
||||
c2cType?: pb<4, uint_32>;
|
||||
serviceType?: pb<5, uint_32>;
|
||||
templId?: pb<6, uint_64>;
|
||||
msgTemplParam?: pb_repeated<7, TemplParam>;
|
||||
content?: pb<8, string>;
|
||||
}
|
||||
|
||||
export interface EssenceMessage {
|
||||
groupUin?: pb<1, uint_32>;
|
||||
msgSequence?: pb<2, uint_32>;
|
||||
random?: pb<3, uint_32>;
|
||||
setFlag?: pb<4, uint_32>;
|
||||
memberUin?: pb<5, uint_32>;
|
||||
operatorUin?: pb<6, uint_32>;
|
||||
timestamp?: pb<7, uint_32>;
|
||||
msgSequence2?: pb<8, uint_32>;
|
||||
operatorNickname?: pb<9, string>;
|
||||
memberNickname?: pb<10, string>;
|
||||
setFlag2?: pb<11, uint_32>;
|
||||
}
|
||||
|
||||
export interface NotifyMessageBody {
|
||||
type?: pb<1, uint_32>;
|
||||
groupUin?: pb<4, uint_32>;
|
||||
eventParam?: pb<5, bytes>;
|
||||
recall?: pb<11, GroupRecall>;
|
||||
field13?: pb<13, uint_32>;
|
||||
operatorUid?: pb<21, string>;
|
||||
generalGrayTip?: pb<26, GeneralGrayTipInfo>;
|
||||
essenceMessage?: pb<33, EssenceMessage>;
|
||||
msgSequence?: pb<37, uint_32>;
|
||||
field39?: pb<39, uint_32>;
|
||||
}
|
||||
|
||||
// Event0x2DC subType=16: GroupMsgEmojiLike
|
||||
export interface GroupReactionDataInnerDataTarget {
|
||||
seq?: pb<1, uint_64>;
|
||||
}
|
||||
|
||||
export interface GroupReactionDataContent {
|
||||
code?: pb<1, string>;
|
||||
count?: pb<3, uint_32>;
|
||||
operatorUid?: pb<4, string>;
|
||||
type?: pb<5, uint_32>;
|
||||
}
|
||||
|
||||
export interface GroupReactionDataInnerData {
|
||||
groupReactionTarget?: pb<2, GroupReactionDataInnerDataTarget>;
|
||||
groupReactionDataContent?: pb<3, GroupReactionDataContent>;
|
||||
}
|
||||
|
||||
export interface GroupReactionDataInner {
|
||||
data?: pb<1, GroupReactionDataInnerData>;
|
||||
}
|
||||
|
||||
export interface GroupReactionData {
|
||||
data?: pb<1, GroupReactionDataInner>;
|
||||
}
|
||||
|
||||
export interface GroupReactNotify {
|
||||
groupUin?: pb<4, uint_64>;
|
||||
field13?: pb<13, uint_32>;
|
||||
groupReactionData?: pb<44, GroupReactionData>;
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
export type * from './oidb-actions';
|
||||
@@ -1,576 +0,0 @@
|
||||
import type { pb, pb_repeated, int_32, uint_32, uint_64, bool, bytes } from '@snowluma/proton';
|
||||
|
||||
// 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 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 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 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 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 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 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>;
|
||||
}
|
||||
@@ -1,216 +0,0 @@
|
||||
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>;
|
||||
}
|
||||
@@ -1,185 +0,0 @@
|
||||
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>;
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
export type * from './base';
|
||||
export type * from './group-file';
|
||||
export type * from './media';
|
||||
export type * from './group-album';
|
||||
@@ -1,242 +0,0 @@
|
||||
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>;
|
||||
}
|
||||
@@ -1,157 +0,0 @@
|
||||
import type { pb, pb_repeated, int_32, uint_32, uint_64, bytes } from '@snowluma/proton';
|
||||
|
||||
export interface OidbProperty {
|
||||
key?: pb<1, string>;
|
||||
value?: pb<2, bytes>;
|
||||
}
|
||||
|
||||
export interface OidbBase<TBody> {
|
||||
command?: pb<1, uint_32>;
|
||||
subCommand?: pb<2, uint_32>;
|
||||
errorCode?: pb<3, uint_32>;
|
||||
body?: pb<4, TBody>;
|
||||
errorMsg?: pb<5, string>;
|
||||
properties?: pb_repeated<11, OidbProperty>;
|
||||
reserved?: pb<12, int_32>;
|
||||
}
|
||||
|
||||
export interface OidbBaseMeta {
|
||||
command?: pb<1, uint_32>;
|
||||
subCommand?: pb<2, uint_32>;
|
||||
errorCode?: pb<3, uint_32>;
|
||||
errorMsg?: pb<5, string>;
|
||||
reserved?: pb<12, int_32>;
|
||||
}
|
||||
|
||||
// Oidb.0xFD4_1 Friend list
|
||||
export interface OidbFriendProperty {
|
||||
code?: pb<1, uint_32>;
|
||||
value?: pb<2, string>;
|
||||
}
|
||||
|
||||
export interface OidbFriendLayer1 {
|
||||
properties?: pb_repeated<2, OidbFriendProperty>;
|
||||
}
|
||||
|
||||
export interface OidbFriendAdditional {
|
||||
type?: pb<1, uint_32>;
|
||||
layer1?: pb<2, OidbFriendLayer1>;
|
||||
}
|
||||
|
||||
export interface OidbFriend {
|
||||
uid?: pb<1, string>;
|
||||
customGroup?: pb<2, uint_32>;
|
||||
uin?: pb<3, uint_32>;
|
||||
additional?: pb_repeated<10001, OidbFriendAdditional>;
|
||||
}
|
||||
|
||||
export interface OidbSvcTrpcTcp0xFD4_1ResponseUin {
|
||||
uin?: pb<1, uint_32>;
|
||||
}
|
||||
|
||||
export interface OidbSvcTrpcTcp0xFD4_1Response {
|
||||
next?: pb<2, OidbSvcTrpcTcp0xFD4_1ResponseUin>;
|
||||
displayFriendCount?: pb<3, uint_32>;
|
||||
timestamp?: pb<6, uint_32>;
|
||||
selfUin?: pb<7, uint_32>;
|
||||
friends?: pb_repeated<101, OidbFriend>;
|
||||
groups?: pb_repeated<102, OidbFriendProperty>;
|
||||
}
|
||||
|
||||
// Oidb.0xFE5_2 Group list
|
||||
export interface OidbSvcTrpcTcp0xFE5_2Member {
|
||||
uid?: pb<2, string>;
|
||||
}
|
||||
|
||||
export interface OidbSvcTrpcTcp0xFE5_2GroupInfo {
|
||||
groupOwner?: pb<1, OidbSvcTrpcTcp0xFE5_2Member>;
|
||||
createdTime?: pb<2, uint_32>;
|
||||
memberMax?: pb<3, uint_32>;
|
||||
memberCount?: pb<4, uint_32>;
|
||||
groupName?: pb<5, string>;
|
||||
description?: pb<18, string>;
|
||||
question?: pb<19, string>;
|
||||
announcement?: pb<30, string>;
|
||||
}
|
||||
|
||||
export interface OidbSvcTrpcTcp0xFE5_2CustomInfo {
|
||||
remark?: pb<3, string>;
|
||||
}
|
||||
|
||||
export interface OidbSvcTrpcTcp0xFE5_2Group {
|
||||
groupUin?: pb<3, uint_32>;
|
||||
info?: pb<4, OidbSvcTrpcTcp0xFE5_2GroupInfo>;
|
||||
customInfo?: pb<5, OidbSvcTrpcTcp0xFE5_2CustomInfo>;
|
||||
}
|
||||
|
||||
export interface OidbSvcTrpcTcp0xFE5_2Response {
|
||||
groups?: pb_repeated<2, OidbSvcTrpcTcp0xFE5_2Group>;
|
||||
}
|
||||
|
||||
// Oidb.0xFE7_3 Group member list
|
||||
export interface OidbSvcTrpcTcp0xFE7_3Uin {
|
||||
uid?: pb<2, string>;
|
||||
uin?: pb<4, uint_32>;
|
||||
}
|
||||
|
||||
export interface OidbSvcTrpcTcp0xFE7_3Card {
|
||||
memberCard?: pb<2, string>;
|
||||
}
|
||||
|
||||
export interface OidbSvcTrpcTcp0xFE7_3Level {
|
||||
infos?: pb_repeated<1, uint_32>;
|
||||
level?: pb<2, uint_32>;
|
||||
}
|
||||
|
||||
export interface OidbSvcTrpcTcp0xFE7_3Member {
|
||||
uin?: pb<1, OidbSvcTrpcTcp0xFE7_3Uin>;
|
||||
memberName?: pb<10, string>;
|
||||
specialTitle?: pb<17, string>;
|
||||
memberCard?: pb<11, OidbSvcTrpcTcp0xFE7_3Card>;
|
||||
level?: pb<12, OidbSvcTrpcTcp0xFE7_3Level>;
|
||||
joinTimestamp?: pb<100, uint_32>;
|
||||
lastMsgTimestamp?: pb<101, uint_32>;
|
||||
shutUpTimestamp?: pb<102, uint_32>;
|
||||
permission?: pb<107, uint_32>;
|
||||
}
|
||||
|
||||
export interface OidbSvcTrpcTcp0xFE7_3Response {
|
||||
groupUin?: pb<1, uint_32>;
|
||||
members?: pb_repeated<2, OidbSvcTrpcTcp0xFE7_3Member>;
|
||||
field3?: pb<3, uint_32>;
|
||||
memberChangeSeq?: pb<5, uint_32>;
|
||||
memberCardChangeSeq?: pb<6, uint_32>;
|
||||
token?: pb<15, string>;
|
||||
}
|
||||
|
||||
// OIDB.0x10C0 Group Request
|
||||
export interface OidbSvcTrpcTcp0x10C0ResponseUser {
|
||||
uid?: pb<1, string>;
|
||||
name?: pb<2, string>;
|
||||
}
|
||||
|
||||
export interface OidbSvcTrpcTcp0x10C0ResponseGroup {
|
||||
groupUin?: pb<1, uint_32>;
|
||||
groupName?: pb<2, string>;
|
||||
}
|
||||
|
||||
export interface OidbSvcTrpcTcp0x10C0ResponseRequest {
|
||||
sequence?: pb<1, uint_64>;
|
||||
eventType?: pb<2, uint_32>;
|
||||
state?: pb<3, uint_32>;
|
||||
group?: pb<4, OidbSvcTrpcTcp0x10C0ResponseGroup>;
|
||||
target?: pb<5, OidbSvcTrpcTcp0x10C0ResponseUser>;
|
||||
invitor?: pb<6, OidbSvcTrpcTcp0x10C0ResponseUser>;
|
||||
operatorUser?: pb<7, OidbSvcTrpcTcp0x10C0ResponseUser>;
|
||||
field9?: pb<9, string>;
|
||||
comment?: pb<10, string>;
|
||||
}
|
||||
|
||||
export interface OidbSvcTrpcTcp0x10C0Response {
|
||||
requests?: pb_repeated<1, OidbSvcTrpcTcp0x10C0ResponseRequest>;
|
||||
field2?: pb<2, uint_64>;
|
||||
newLatestSeq?: pb<3, uint_64>;
|
||||
field4?: pb<4, uint_32>;
|
||||
field5?: pb<5, uint_64>;
|
||||
field6?: pb<6, uint_32>;
|
||||
}
|
||||
@@ -1,13 +1,13 @@
|
||||
import { protobuf_decode, protobuf_encode } from '@snowluma/proton';
|
||||
import type { Bridge } from '../bridge';
|
||||
import { makeOidbEnvelope, runOidb } from '../bridge-oidb';
|
||||
import { OidbBase } from '../proto/proton/oidb';
|
||||
import { OidbBase } from '@snowluma/proto-defs/oidb';
|
||||
import type {
|
||||
OidbClientKeyReq,
|
||||
OidbClientKeyResp,
|
||||
OidbGetPskeyReq,
|
||||
OidbGetPskeyResp,
|
||||
} from '../proto/proton/oidb-actions/base';
|
||||
} from '@snowluma/proto-defs/oidb-actions/base';
|
||||
import { RequestUtil } from '../web/request-util';
|
||||
|
||||
export async function forceFetchClientKey(bridge: Bridge) {
|
||||
|
||||
@@ -138,7 +138,7 @@ export async function sendPrivateMessage(
|
||||
|
||||
// C2C `{type:'file'}` segments can't ride on the elems[] pipeline —
|
||||
// c2c files live on `RichText.notOnlineFile`, parallel to elems
|
||||
// (see `proto/proton/message.ts:notOnlineFile`). The element-builder
|
||||
// (see `@snowluma/proto-defs/message:notOnlineFile`). The element-builder
|
||||
// explicitly drops them with a warn ("file send via elems[] is
|
||||
// group-only"), so a private message that bundled a file alongside
|
||||
// anything else used to either ship as "[空消息]" (only-file case,
|
||||
|
||||
Reference in new issue
Block a user