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.1: Updated GroupInfo interface to match backend controller with complete gro
134 lines • 3.26 kB
TypeScript
/**
* Friend Event Types
* 100% khớp với zalo-personal-sdk/src/models/FriendEvent.ts
*/
import { FriendEventType } from './enums';
/**
* Base Friend Event Type
*/
export type TFriendEventBase = string;
/**
* Friend Event Reject/Undo Type
*/
export interface TFriendEventRejectUndo {
toUid: string;
fromUid: string;
}
/**
* Friend Event Request Type
*/
export interface TFriendEventRequest {
toUid: string;
fromUid: string;
src: number;
message: string;
}
/**
* Friend Event Seen Request Type
*/
export type TFriendEventSeenRequest = string[];
/**
* Friend Event Pin Create Topic Params Type
*/
export interface TFriendEventPinCreateTopicParams {
senderUid: string;
senderName: string;
client_msg_id: string;
global_msg_id: string;
msg_type: number;
title: string;
}
/**
* Friend Event Pin Topic Type
*/
export interface TFriendEventPinTopic {
topicId: string;
topicType: number;
}
/**
* Friend Event Pin Create Topic Type
*/
export interface TFriendEventPinCreateTopic {
type: number;
color: number;
emoji: string;
startTime: number;
duration: number;
params: TFriendEventPinCreateTopicParams;
id: string;
creatorId: string;
createTime: number;
editorId: string;
editTime: number;
repeat: number;
action: number;
}
/**
* Friend Event Pin Create Type
*/
export interface TFriendEventPinCreate {
oldTopic?: TFriendEventPinTopic;
topic: TFriendEventPinCreateTopic;
actorId: string;
oldVersion: number;
version: number;
conversationId: string;
}
/**
* Friend Event Pin/Unpin Type
*/
export interface TFriendEventPinUnpin {
topic: TFriendEventPinTopic;
actorId: string;
oldVersion: number;
version: number;
conversationId: string;
}
/**
* Friend Event Union Type
*/
export type TFriendEvent = TFriendEventBase | TFriendEventRequest | TFriendEventRejectUndo | TFriendEventSeenRequest | TFriendEventPinUnpin | TFriendEventPinCreate;
/**
* Friend Event Discriminated Union
*/
export type FriendEvent = {
type: FriendEventType.ADD | FriendEventType.REMOVE | FriendEventType.BLOCK | FriendEventType.UNBLOCK | FriendEventType.BLOCK_CALL | FriendEventType.UNBLOCK_CALL;
data: TFriendEventBase;
threadId: string;
isSelf: boolean;
} | {
type: FriendEventType.REJECT_REQUEST | FriendEventType.UNDO_REQUEST;
data: TFriendEventRejectUndo;
threadId: string;
isSelf: boolean;
} | {
type: FriendEventType.REQUEST;
data: TFriendEventRequest;
threadId: string;
isSelf: boolean;
} | {
type: FriendEventType.SEEN_FRIEND_REQUEST;
data: TFriendEventSeenRequest;
threadId: string;
isSelf: boolean;
} | {
type: FriendEventType.PIN_CREATE;
data: TFriendEventPinCreate;
threadId: string;
isSelf: boolean;
} | {
type: FriendEventType.PIN_UNPIN;
data: TFriendEventPinUnpin;
threadId: string;
isSelf: boolean;
} | {
type: FriendEventType.UNKNOWN;
data: string;
threadId: string;
isSelf: boolean;
};
/**
* Initialize Friend Event Function
*/
export declare function initializeFriendEvent(uid: string, data: TFriendEvent, type: FriendEventType): FriendEvent;
//# sourceMappingURL=friend-event.d.ts.map