redai-automation-web-sdk
Version:
TypeScript SDK for RedAI Automation Web API - Zalo Personal automation, messaging, advanced sticker search, and bulk operations. 100% compatible with automation-web backend. v1.8.0: Added SessionProxyService for managing proxy assignments to sessions with
123 lines • 2.46 kB
TypeScript
/**
* Message Types
* 100% khớp với zalo-personal-sdk/src/models/Message.ts
*/
import { ThreadType } from './enums';
/**
* Attachment Content Type
*/
export interface TAttachmentContent {
title: string;
description: string;
href: string;
thumb: string;
childnumber: number;
action: string;
params: string;
type: string;
}
/**
* Other Content Type
*/
export interface TOtherContent {
[key: string]: any;
}
/**
* Quote Type
*/
export interface TQuote {
ownerId: number;
cliMsgId: number;
globalMsgId: number;
cliMsgType: number;
ts: number;
msg: string;
attach: string;
fromD: string;
ttl: number;
}
/**
* Mention Type
*/
export interface TMention {
uid: string;
pos: number;
len: number;
type: 0 | 1;
}
/**
* Base Message Type
*/
export interface TMessage {
actionId: string;
msgId: string;
cliMsgId: string;
msgType: string;
uidFrom: string;
idTo: string;
dName: string;
ts: string;
status: number;
content: string | TAttachmentContent | TOtherContent;
notify: string;
ttl: number;
userId: string;
uin: string;
topOut: string;
topOutTimeOut: string;
topOutImprTimeOut: string;
propertyExt: {
color: number;
size: number;
type: number;
subType: number;
ext: string;
} | undefined;
paramsExt: {
countUnread: number;
containType: number;
platformType: number;
};
cmd: number;
st: number;
at: number;
realMsgId: string;
quote: TQuote | undefined;
}
/**
* Group Message Type (extends TMessage with mentions)
*/
export interface TGroupMessage extends TMessage {
mentions: TMention[] | undefined;
}
/**
* User Message Class
*/
export declare class UserMessage {
type: ThreadType.USER;
data: TMessage;
threadId: string;
/**
* true if the message is sent by the logged in account
*/
isSelf: boolean;
constructor(uid: string, data: TMessage);
}
/**
* Group Message Class
*/
export declare class GroupMessage {
type: ThreadType.GROUP;
data: TGroupMessage;
threadId: string;
/**
* true if the message is sent by the logged in account
*/
isSelf: boolean;
constructor(uid: string, data: TGroupMessage);
}
/**
* Message Union Type
*/
export type Message = UserMessage | GroupMessage;
//# sourceMappingURL=message.d.ts.map