update lại thư mục cấu trúc mới của server nodejs và python
This commit is contained in:
+9
@@ -0,0 +1,9 @@
|
||||
export type AttachmentSource = string | {
|
||||
data: Buffer;
|
||||
filename: `${string}.${string}`;
|
||||
metadata: {
|
||||
totalSize: number;
|
||||
width?: number;
|
||||
height?: number;
|
||||
};
|
||||
};
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
export type AutoReplyItem = {
|
||||
id: number;
|
||||
weight: number;
|
||||
enable: boolean;
|
||||
modifiedTime: number;
|
||||
startTime: number;
|
||||
endTime: number;
|
||||
content: string;
|
||||
scope: AutoReplyScope;
|
||||
uids: string[] | null;
|
||||
ownerId: number;
|
||||
recurrence: string[];
|
||||
createdTime: number;
|
||||
};
|
||||
export declare enum AutoReplyScope {
|
||||
Everyone = 0,
|
||||
Stranger = 1,
|
||||
SpecificFriends = 2,
|
||||
FriendsExcept = 3
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
export var AutoReplyScope;
|
||||
(function (AutoReplyScope) {
|
||||
AutoReplyScope[AutoReplyScope["Everyone"] = 0] = "Everyone";
|
||||
AutoReplyScope[AutoReplyScope["Stranger"] = 1] = "Stranger";
|
||||
AutoReplyScope[AutoReplyScope["SpecificFriends"] = 2] = "SpecificFriends";
|
||||
AutoReplyScope[AutoReplyScope["FriendsExcept"] = 3] = "FriendsExcept";
|
||||
})(AutoReplyScope || (AutoReplyScope = {}));
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
export declare enum BoardType {
|
||||
Note = 1,
|
||||
PinnedMessage = 2,
|
||||
Poll = 3
|
||||
}
|
||||
export type PollDetail = {
|
||||
creator: string;
|
||||
question: string;
|
||||
options: PollOptions[];
|
||||
joined: boolean;
|
||||
closed: boolean;
|
||||
poll_id: number;
|
||||
allow_multi_choices: boolean;
|
||||
allow_add_new_option: boolean;
|
||||
is_anonymous: boolean;
|
||||
poll_type: number;
|
||||
created_time: number;
|
||||
updated_time: number;
|
||||
expired_time: number;
|
||||
is_hide_vote_preview: boolean;
|
||||
num_vote: number;
|
||||
};
|
||||
export type PollOptions = {
|
||||
content: string;
|
||||
votes: number;
|
||||
voted: boolean;
|
||||
voters: string[];
|
||||
option_id: number;
|
||||
};
|
||||
export type NoteDetail = {
|
||||
id: string;
|
||||
type: number;
|
||||
color: number;
|
||||
emoji: string;
|
||||
startTime: number;
|
||||
duration: number;
|
||||
params: {
|
||||
title: string;
|
||||
extra?: string;
|
||||
};
|
||||
creatorId: string;
|
||||
editorId: string;
|
||||
createTime: number;
|
||||
editTime: number;
|
||||
repeat: number;
|
||||
};
|
||||
export type PinnedMessageDetail = {
|
||||
id: string;
|
||||
type: number;
|
||||
color: number;
|
||||
emoji: string;
|
||||
startTime: number;
|
||||
duration: number;
|
||||
params: Record<string, unknown>;
|
||||
creatorId: string;
|
||||
editorId: string;
|
||||
createTime: number;
|
||||
editTime: number;
|
||||
repeat: number;
|
||||
};
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
export var BoardType;
|
||||
(function (BoardType) {
|
||||
BoardType[BoardType["Note"] = 1] = "Note";
|
||||
BoardType[BoardType["PinnedMessage"] = 2] = "PinnedMessage";
|
||||
BoardType[BoardType["Poll"] = 3] = "Poll";
|
||||
})(BoardType || (BoardType = {}));
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
export type CatalogItem = {
|
||||
id: string;
|
||||
name: string;
|
||||
version: number;
|
||||
ownerId: string;
|
||||
isDefault: boolean;
|
||||
/**
|
||||
* Relative path used to build the catalog URL.
|
||||
*
|
||||
* Example: `https://catalog.zalo.me/${path}`
|
||||
*/
|
||||
path: string;
|
||||
catalogPhoto: string | null;
|
||||
totalProduct: number;
|
||||
created_time: number;
|
||||
};
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
import { ThreadType } from "./Enum.js";
|
||||
export type TDeliveredMessage = {
|
||||
msgId: string;
|
||||
seen: number;
|
||||
deliveredUids: string[];
|
||||
seenUids: string[];
|
||||
realMsgId: string;
|
||||
mSTs: number;
|
||||
};
|
||||
export type TGroupDeliveredMessage = TDeliveredMessage & {
|
||||
groupId: string;
|
||||
};
|
||||
export declare class UserDeliveredMessage {
|
||||
type: ThreadType.User;
|
||||
data: TDeliveredMessage;
|
||||
threadId: string;
|
||||
isSelf: false;
|
||||
constructor(data: TDeliveredMessage);
|
||||
}
|
||||
export declare class GroupDeliveredMessage {
|
||||
type: ThreadType.Group;
|
||||
data: TGroupDeliveredMessage;
|
||||
threadId: string;
|
||||
isSelf: boolean;
|
||||
constructor(uid: string, data: TGroupDeliveredMessage);
|
||||
}
|
||||
export type DeliveredMessage = UserDeliveredMessage | GroupDeliveredMessage;
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
import { ThreadType } from "./Enum.js";
|
||||
export class UserDeliveredMessage {
|
||||
constructor(data) {
|
||||
this.type = ThreadType.User;
|
||||
this.data = data;
|
||||
this.threadId = data.deliveredUids[0];
|
||||
this.isSelf = false;
|
||||
}
|
||||
}
|
||||
export class GroupDeliveredMessage {
|
||||
constructor(uid, data) {
|
||||
this.type = ThreadType.Group;
|
||||
this.data = data;
|
||||
this.threadId = data.groupId;
|
||||
this.isSelf = data.deliveredUids.includes(uid);
|
||||
}
|
||||
}
|
||||
+251
@@ -0,0 +1,251 @@
|
||||
export declare enum ThreadType {
|
||||
User = 0,
|
||||
Group = 1
|
||||
}
|
||||
export declare enum DestType {
|
||||
Group = 1,
|
||||
User = 3,
|
||||
Page = 5
|
||||
}
|
||||
export declare enum Gender {
|
||||
Male = 0,
|
||||
Female = 1
|
||||
}
|
||||
export declare enum AvatarSize {
|
||||
Small = 120,
|
||||
Large = 240
|
||||
}
|
||||
/**
|
||||
* @note Bank codes list after Mitm on Mobile and Bank's supported by Zalo
|
||||
* @documents https://developers.zalo.me/docs/zalo-notification-service/phu-luc/danh-sach-bin-code - docs missing bin code and short_name bank
|
||||
*/
|
||||
export declare enum BinBankCard {
|
||||
/**
|
||||
* NH TMCP An Bình
|
||||
*/
|
||||
ABBank = 970425,
|
||||
/**
|
||||
* NH TMCP Á Châu
|
||||
*/
|
||||
ACB = 970416,
|
||||
/**
|
||||
* NH Nông nghiệp và Phát triển Nông thôn Việt Nam
|
||||
*/
|
||||
Agribank = 970405,
|
||||
/**
|
||||
* NH TMCP Đầu tư và Phát triển Việt Nam
|
||||
*/
|
||||
BIDV = 970418,
|
||||
/**
|
||||
* NH TMCP Bản Việt
|
||||
*/
|
||||
BVBank = 970454,
|
||||
/**
|
||||
* NH TMCP Bắc Á
|
||||
*/
|
||||
BacA_Bank = 970409,
|
||||
/**
|
||||
* NH TMCP Bảo Việt
|
||||
*/
|
||||
BaoViet_Bank = 970438,
|
||||
/**
|
||||
* NH số CAKE by VPBank - TMCP Việt Nam Thịnh Vượng
|
||||
*/
|
||||
CAKE = 546034,
|
||||
/**
|
||||
* NH Thương mại TNHH MTV Xây dựng Việt Nam
|
||||
*/
|
||||
CB_Bank = 970444,
|
||||
/**
|
||||
* NH TNHH MTV CIMB Việt Nam
|
||||
*/
|
||||
CIMB_Bank = 422589,
|
||||
/**
|
||||
* NH Hợp tác xã Việt Nam
|
||||
*/
|
||||
Coop_Bank = 970446,
|
||||
/**
|
||||
* NH TNHH MTV Phát triển Singapore - CN TP. Hồ Chí Minh
|
||||
*/
|
||||
DBS_Bank = 796500,
|
||||
/**
|
||||
* NH TMCP Đông Á
|
||||
*/
|
||||
DongA_Bank = 970406,
|
||||
/**
|
||||
* NH TMCP Xuất Nhập khẩu Việt Nam
|
||||
*/
|
||||
Eximbank = 970431,
|
||||
/**
|
||||
* NH TMCP Dầu khí Toàn cầu
|
||||
*/
|
||||
GPBank = 970408,
|
||||
/**
|
||||
* NH TMCP Phát triển TP. Hồ Chí Minh
|
||||
*/
|
||||
HDBank = 970437,
|
||||
/**
|
||||
* NH TNHH MTV HSBC (Việt Nam)
|
||||
*/
|
||||
HSBC = 458761,
|
||||
/**
|
||||
* NH TNHH MTV Hong Leong Việt Nam
|
||||
*/
|
||||
HongLeong_Bank = 970442,
|
||||
/**
|
||||
* NH Công nghiệp Hàn Quốc - CN TP. Hồ Chí Minh
|
||||
*/
|
||||
IBK_HCM = 970456,
|
||||
/**
|
||||
* NH Công nghiệp Hàn Quốc - CN Hà Nội
|
||||
*/
|
||||
IBK_HN = 970455,
|
||||
/**
|
||||
* NH TNHH Indovina
|
||||
*/
|
||||
Indovina_Bank = 970434,
|
||||
/**
|
||||
* NH Đại chúng TNHH Kasikornbank - CN TP. Hồ Chí Minh
|
||||
*/
|
||||
KBank = 668888,
|
||||
/**
|
||||
* NH TMCP Kiên Long
|
||||
*/
|
||||
KienlongBank = 970452,
|
||||
/**
|
||||
* NH Kookmin - CN TP. Hồ Chí Minh
|
||||
*/
|
||||
Kookmin_Bank_HCM = 970463,
|
||||
/**
|
||||
* NH Kookmin - CN Hà Nội
|
||||
*/
|
||||
Kookmin_Bank_HN = 970462,
|
||||
/**
|
||||
* NH TMCP Lộc Phát Việt Nam
|
||||
*/
|
||||
LPBank = 970449,
|
||||
/**
|
||||
* NH TMCP Quân đội
|
||||
*/
|
||||
MB_Bank = 970422,
|
||||
/**
|
||||
* NH TMCP Hàng Hải
|
||||
*/
|
||||
MSB = 970426,
|
||||
/**
|
||||
* NH TMCP Quốc Dân
|
||||
*/
|
||||
NCB = 970419,
|
||||
/**
|
||||
* NH TMCP Nam Á
|
||||
*/
|
||||
Nam_A_Bank = 970428,
|
||||
/**
|
||||
* NH Nonghyup - CN Hà Nội
|
||||
*/
|
||||
NongHyup_Bank = 801011,
|
||||
/**
|
||||
* NH TMCP Phương Đông
|
||||
*/
|
||||
OCB = 970448,
|
||||
/**
|
||||
* NH Thương mại TNHH MTV Đại Dương
|
||||
*/
|
||||
Ocean_Bank = 970414,
|
||||
/**
|
||||
* NH TMCP Thịnh vượng và Phát triển
|
||||
*/
|
||||
PGBank = 970430,
|
||||
/**
|
||||
* NH TMCP Đại Chúng Việt Nam
|
||||
*/
|
||||
PVcomBank = 970412,
|
||||
/**
|
||||
* NH TNHH MTV Public Việt Nam
|
||||
*/
|
||||
Public_Bank_Vietnam = 970439,
|
||||
/**
|
||||
* NH TMCP Sài Gòn
|
||||
*/
|
||||
SCB = 970429,
|
||||
/**
|
||||
* NH TMCP Sài Gòn - Hà Nội
|
||||
*/
|
||||
SHB = 970443,
|
||||
/**
|
||||
* NH TMCP Sài Gòn Thương Tín
|
||||
*/
|
||||
Sacombank = 970403,
|
||||
/**
|
||||
* NH TMCP Sài Gòn Công Thương
|
||||
*/
|
||||
Saigon_Bank = 970400,
|
||||
/**
|
||||
* NH TMCP Đông Nam Á
|
||||
*/
|
||||
SeABank = 970440,
|
||||
/**
|
||||
* NH TNHH MTV Shinhan Việt Nam
|
||||
*/
|
||||
Shinhan_Bank = 970424,
|
||||
/**
|
||||
* NH TNHH MTV Standard Chartered Bank Việt Nam
|
||||
*/
|
||||
Standard_Chartered_Vietnam = 970410,
|
||||
/**
|
||||
* NH số TNEX
|
||||
*/
|
||||
TNEX = 9704261,
|
||||
/**
|
||||
* NH TMCP Tiên Phong
|
||||
*/
|
||||
TPBank = 970423,
|
||||
/**
|
||||
* NH TMCP Kỹ thương Việt Nam
|
||||
*/
|
||||
Techcombank = 970407,
|
||||
/**
|
||||
* NH số Timo by Bản Việt Bank
|
||||
*/
|
||||
Timo = 963388,
|
||||
/**
|
||||
* NH số UBank by VPBank
|
||||
*/
|
||||
UBank = 546035,
|
||||
/**
|
||||
* NH United Overseas Bank Việt Nam
|
||||
*/
|
||||
United_Overseas_Bank_Vietnam = 970458,
|
||||
/**
|
||||
* NH TMCP Quốc tế Việt Nam
|
||||
*/
|
||||
VIB = 970441,
|
||||
/**
|
||||
* NH TMCP Việt Nam Thịnh Vượng
|
||||
*/
|
||||
VPBank = 970432,
|
||||
/**
|
||||
* NH Liên doanh Việt - Nga
|
||||
*/
|
||||
VRB = 970421,
|
||||
/**
|
||||
* NH TMCP Việt Á
|
||||
*/
|
||||
VietABank = 970427,
|
||||
/**
|
||||
* NH TMCP Việt Nam Thương Tín
|
||||
*/
|
||||
VietBank = 970433,
|
||||
/**
|
||||
* NH TMCP Ngoại Thương Việt Nam
|
||||
*/
|
||||
Vietcombank = 970436,
|
||||
/**
|
||||
* NH TMCP Công thương Việt Nam
|
||||
*/
|
||||
VietinBank = 970415,
|
||||
/**
|
||||
* NH TNHH MTV Woori Việt Nam
|
||||
*/
|
||||
Woori_Bank = 970457
|
||||
}
|
||||
+256
@@ -0,0 +1,256 @@
|
||||
export var ThreadType;
|
||||
(function (ThreadType) {
|
||||
ThreadType[ThreadType["User"] = 0] = "User";
|
||||
ThreadType[ThreadType["Group"] = 1] = "Group";
|
||||
})(ThreadType || (ThreadType = {}));
|
||||
export var DestType;
|
||||
(function (DestType) {
|
||||
DestType[DestType["Group"] = 1] = "Group";
|
||||
DestType[DestType["User"] = 3] = "User";
|
||||
DestType[DestType["Page"] = 5] = "Page";
|
||||
})(DestType || (DestType = {}));
|
||||
export var Gender;
|
||||
(function (Gender) {
|
||||
Gender[Gender["Male"] = 0] = "Male";
|
||||
Gender[Gender["Female"] = 1] = "Female";
|
||||
})(Gender || (Gender = {}));
|
||||
export var AvatarSize;
|
||||
(function (AvatarSize) {
|
||||
AvatarSize[AvatarSize["Small"] = 120] = "Small";
|
||||
AvatarSize[AvatarSize["Large"] = 240] = "Large";
|
||||
})(AvatarSize || (AvatarSize = {}));
|
||||
/**
|
||||
* @note Bank codes list after Mitm on Mobile and Bank's supported by Zalo
|
||||
* @documents https://developers.zalo.me/docs/zalo-notification-service/phu-luc/danh-sach-bin-code - docs missing bin code and short_name bank
|
||||
*/
|
||||
export var BinBankCard;
|
||||
(function (BinBankCard) {
|
||||
/**
|
||||
* NH TMCP An Bình
|
||||
*/
|
||||
BinBankCard[BinBankCard["ABBank"] = 970425] = "ABBank";
|
||||
/**
|
||||
* NH TMCP Á Châu
|
||||
*/
|
||||
BinBankCard[BinBankCard["ACB"] = 970416] = "ACB";
|
||||
/**
|
||||
* NH Nông nghiệp và Phát triển Nông thôn Việt Nam
|
||||
*/
|
||||
BinBankCard[BinBankCard["Agribank"] = 970405] = "Agribank";
|
||||
/**
|
||||
* NH TMCP Đầu tư và Phát triển Việt Nam
|
||||
*/
|
||||
BinBankCard[BinBankCard["BIDV"] = 970418] = "BIDV";
|
||||
/**
|
||||
* NH TMCP Bản Việt
|
||||
*/
|
||||
BinBankCard[BinBankCard["BVBank"] = 970454] = "BVBank";
|
||||
/**
|
||||
* NH TMCP Bắc Á
|
||||
*/
|
||||
BinBankCard[BinBankCard["BacA_Bank"] = 970409] = "BacA_Bank";
|
||||
/**
|
||||
* NH TMCP Bảo Việt
|
||||
*/
|
||||
BinBankCard[BinBankCard["BaoViet_Bank"] = 970438] = "BaoViet_Bank";
|
||||
/**
|
||||
* NH số CAKE by VPBank - TMCP Việt Nam Thịnh Vượng
|
||||
*/
|
||||
BinBankCard[BinBankCard["CAKE"] = 546034] = "CAKE";
|
||||
/**
|
||||
* NH Thương mại TNHH MTV Xây dựng Việt Nam
|
||||
*/
|
||||
BinBankCard[BinBankCard["CB_Bank"] = 970444] = "CB_Bank";
|
||||
/**
|
||||
* NH TNHH MTV CIMB Việt Nam
|
||||
*/
|
||||
BinBankCard[BinBankCard["CIMB_Bank"] = 422589] = "CIMB_Bank";
|
||||
/**
|
||||
* NH Hợp tác xã Việt Nam
|
||||
*/
|
||||
BinBankCard[BinBankCard["Coop_Bank"] = 970446] = "Coop_Bank";
|
||||
/**
|
||||
* NH TNHH MTV Phát triển Singapore - CN TP. Hồ Chí Minh
|
||||
*/
|
||||
BinBankCard[BinBankCard["DBS_Bank"] = 796500] = "DBS_Bank";
|
||||
/**
|
||||
* NH TMCP Đông Á
|
||||
*/
|
||||
BinBankCard[BinBankCard["DongA_Bank"] = 970406] = "DongA_Bank";
|
||||
/**
|
||||
* NH TMCP Xuất Nhập khẩu Việt Nam
|
||||
*/
|
||||
BinBankCard[BinBankCard["Eximbank"] = 970431] = "Eximbank";
|
||||
/**
|
||||
* NH TMCP Dầu khí Toàn cầu
|
||||
*/
|
||||
BinBankCard[BinBankCard["GPBank"] = 970408] = "GPBank";
|
||||
/**
|
||||
* NH TMCP Phát triển TP. Hồ Chí Minh
|
||||
*/
|
||||
BinBankCard[BinBankCard["HDBank"] = 970437] = "HDBank";
|
||||
/**
|
||||
* NH TNHH MTV HSBC (Việt Nam)
|
||||
*/
|
||||
BinBankCard[BinBankCard["HSBC"] = 458761] = "HSBC";
|
||||
/**
|
||||
* NH TNHH MTV Hong Leong Việt Nam
|
||||
*/
|
||||
BinBankCard[BinBankCard["HongLeong_Bank"] = 970442] = "HongLeong_Bank";
|
||||
/**
|
||||
* NH Công nghiệp Hàn Quốc - CN TP. Hồ Chí Minh
|
||||
*/
|
||||
BinBankCard[BinBankCard["IBK_HCM"] = 970456] = "IBK_HCM";
|
||||
/**
|
||||
* NH Công nghiệp Hàn Quốc - CN Hà Nội
|
||||
*/
|
||||
BinBankCard[BinBankCard["IBK_HN"] = 970455] = "IBK_HN";
|
||||
/**
|
||||
* NH TNHH Indovina
|
||||
*/
|
||||
BinBankCard[BinBankCard["Indovina_Bank"] = 970434] = "Indovina_Bank";
|
||||
/**
|
||||
* NH Đại chúng TNHH Kasikornbank - CN TP. Hồ Chí Minh
|
||||
*/
|
||||
BinBankCard[BinBankCard["KBank"] = 668888] = "KBank";
|
||||
/**
|
||||
* NH TMCP Kiên Long
|
||||
*/
|
||||
BinBankCard[BinBankCard["KienlongBank"] = 970452] = "KienlongBank";
|
||||
/**
|
||||
* NH Kookmin - CN TP. Hồ Chí Minh
|
||||
*/
|
||||
BinBankCard[BinBankCard["Kookmin_Bank_HCM"] = 970463] = "Kookmin_Bank_HCM";
|
||||
/**
|
||||
* NH Kookmin - CN Hà Nội
|
||||
*/
|
||||
BinBankCard[BinBankCard["Kookmin_Bank_HN"] = 970462] = "Kookmin_Bank_HN";
|
||||
/**
|
||||
* NH TMCP Lộc Phát Việt Nam
|
||||
*/
|
||||
BinBankCard[BinBankCard["LPBank"] = 970449] = "LPBank";
|
||||
/**
|
||||
* NH TMCP Quân đội
|
||||
*/
|
||||
BinBankCard[BinBankCard["MB_Bank"] = 970422] = "MB_Bank";
|
||||
/**
|
||||
* NH TMCP Hàng Hải
|
||||
*/
|
||||
BinBankCard[BinBankCard["MSB"] = 970426] = "MSB";
|
||||
/**
|
||||
* NH TMCP Quốc Dân
|
||||
*/
|
||||
BinBankCard[BinBankCard["NCB"] = 970419] = "NCB";
|
||||
/**
|
||||
* NH TMCP Nam Á
|
||||
*/
|
||||
BinBankCard[BinBankCard["Nam_A_Bank"] = 970428] = "Nam_A_Bank";
|
||||
/**
|
||||
* NH Nonghyup - CN Hà Nội
|
||||
*/
|
||||
BinBankCard[BinBankCard["NongHyup_Bank"] = 801011] = "NongHyup_Bank";
|
||||
/**
|
||||
* NH TMCP Phương Đông
|
||||
*/
|
||||
BinBankCard[BinBankCard["OCB"] = 970448] = "OCB";
|
||||
/**
|
||||
* NH Thương mại TNHH MTV Đại Dương
|
||||
*/
|
||||
BinBankCard[BinBankCard["Ocean_Bank"] = 970414] = "Ocean_Bank";
|
||||
/**
|
||||
* NH TMCP Thịnh vượng và Phát triển
|
||||
*/
|
||||
BinBankCard[BinBankCard["PGBank"] = 970430] = "PGBank";
|
||||
/**
|
||||
* NH TMCP Đại Chúng Việt Nam
|
||||
*/
|
||||
BinBankCard[BinBankCard["PVcomBank"] = 970412] = "PVcomBank";
|
||||
/**
|
||||
* NH TNHH MTV Public Việt Nam
|
||||
*/
|
||||
BinBankCard[BinBankCard["Public_Bank_Vietnam"] = 970439] = "Public_Bank_Vietnam";
|
||||
/**
|
||||
* NH TMCP Sài Gòn
|
||||
*/
|
||||
BinBankCard[BinBankCard["SCB"] = 970429] = "SCB";
|
||||
/**
|
||||
* NH TMCP Sài Gòn - Hà Nội
|
||||
*/
|
||||
BinBankCard[BinBankCard["SHB"] = 970443] = "SHB";
|
||||
/**
|
||||
* NH TMCP Sài Gòn Thương Tín
|
||||
*/
|
||||
BinBankCard[BinBankCard["Sacombank"] = 970403] = "Sacombank";
|
||||
/**
|
||||
* NH TMCP Sài Gòn Công Thương
|
||||
*/
|
||||
BinBankCard[BinBankCard["Saigon_Bank"] = 970400] = "Saigon_Bank";
|
||||
/**
|
||||
* NH TMCP Đông Nam Á
|
||||
*/
|
||||
BinBankCard[BinBankCard["SeABank"] = 970440] = "SeABank";
|
||||
/**
|
||||
* NH TNHH MTV Shinhan Việt Nam
|
||||
*/
|
||||
BinBankCard[BinBankCard["Shinhan_Bank"] = 970424] = "Shinhan_Bank";
|
||||
/**
|
||||
* NH TNHH MTV Standard Chartered Bank Việt Nam
|
||||
*/
|
||||
BinBankCard[BinBankCard["Standard_Chartered_Vietnam"] = 970410] = "Standard_Chartered_Vietnam";
|
||||
/**
|
||||
* NH số TNEX
|
||||
*/
|
||||
BinBankCard[BinBankCard["TNEX"] = 9704261] = "TNEX";
|
||||
/**
|
||||
* NH TMCP Tiên Phong
|
||||
*/
|
||||
BinBankCard[BinBankCard["TPBank"] = 970423] = "TPBank";
|
||||
/**
|
||||
* NH TMCP Kỹ thương Việt Nam
|
||||
*/
|
||||
BinBankCard[BinBankCard["Techcombank"] = 970407] = "Techcombank";
|
||||
/**
|
||||
* NH số Timo by Bản Việt Bank
|
||||
*/
|
||||
BinBankCard[BinBankCard["Timo"] = 963388] = "Timo";
|
||||
/**
|
||||
* NH số UBank by VPBank
|
||||
*/
|
||||
BinBankCard[BinBankCard["UBank"] = 546035] = "UBank";
|
||||
/**
|
||||
* NH United Overseas Bank Việt Nam
|
||||
*/
|
||||
BinBankCard[BinBankCard["United_Overseas_Bank_Vietnam"] = 970458] = "United_Overseas_Bank_Vietnam";
|
||||
/**
|
||||
* NH TMCP Quốc tế Việt Nam
|
||||
*/
|
||||
BinBankCard[BinBankCard["VIB"] = 970441] = "VIB";
|
||||
/**
|
||||
* NH TMCP Việt Nam Thịnh Vượng
|
||||
*/
|
||||
BinBankCard[BinBankCard["VPBank"] = 970432] = "VPBank";
|
||||
/**
|
||||
* NH Liên doanh Việt - Nga
|
||||
*/
|
||||
BinBankCard[BinBankCard["VRB"] = 970421] = "VRB";
|
||||
/**
|
||||
* NH TMCP Việt Á
|
||||
*/
|
||||
BinBankCard[BinBankCard["VietABank"] = 970427] = "VietABank";
|
||||
/**
|
||||
* NH TMCP Việt Nam Thương Tín
|
||||
*/
|
||||
BinBankCard[BinBankCard["VietBank"] = 970433] = "VietBank";
|
||||
/**
|
||||
* NH TMCP Ngoại Thương Việt Nam
|
||||
*/
|
||||
BinBankCard[BinBankCard["Vietcombank"] = 970436] = "Vietcombank";
|
||||
/**
|
||||
* NH TMCP Công thương Việt Nam
|
||||
*/
|
||||
BinBankCard[BinBankCard["VietinBank"] = 970415] = "VietinBank";
|
||||
/**
|
||||
* NH TNHH MTV Woori Việt Nam
|
||||
*/
|
||||
BinBankCard[BinBankCard["Woori_Bank"] = 970457] = "Woori_Bank";
|
||||
})(BinBankCard || (BinBankCard = {}));
|
||||
+107
@@ -0,0 +1,107 @@
|
||||
export declare enum FriendEventType {
|
||||
ADD = 0,
|
||||
REMOVE = 1,
|
||||
REQUEST = 2,
|
||||
UNDO_REQUEST = 3,
|
||||
REJECT_REQUEST = 4,
|
||||
SEEN_FRIEND_REQUEST = 5,
|
||||
BLOCK = 6,
|
||||
UNBLOCK = 7,
|
||||
BLOCK_CALL = 8,
|
||||
UNBLOCK_CALL = 9,
|
||||
PIN_UNPIN = 10,
|
||||
PIN_CREATE = 11,
|
||||
UNKNOWN = 12
|
||||
}
|
||||
export type TFriendEventBase = string;
|
||||
export type TFriendEventRejectUndo = {
|
||||
toUid: string;
|
||||
fromUid: string;
|
||||
};
|
||||
export type TFriendEventRequest = {
|
||||
toUid: string;
|
||||
fromUid: string;
|
||||
src: number;
|
||||
message: string;
|
||||
};
|
||||
export type TFriendEventSeenRequest = string[];
|
||||
export type TFriendEventPinCreateTopicParams = {
|
||||
senderUid: string;
|
||||
senderName: string;
|
||||
client_msg_id: string;
|
||||
global_msg_id: string;
|
||||
msg_type: number;
|
||||
title: string;
|
||||
};
|
||||
export type TFriendEventPinTopic = {
|
||||
topicId: string;
|
||||
topicType: number;
|
||||
};
|
||||
export type 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;
|
||||
};
|
||||
export type TFriendEventPinCreate = {
|
||||
oldTopic?: TFriendEventPinTopic;
|
||||
topic: TFriendEventPinCreateTopic;
|
||||
actorId: string;
|
||||
oldVersion: number;
|
||||
version: number;
|
||||
conversationId: string;
|
||||
};
|
||||
export type TFriendEventPinUnpin = {
|
||||
topic: TFriendEventPinTopic;
|
||||
actorId: string;
|
||||
oldVersion: number;
|
||||
version: number;
|
||||
conversationId: string;
|
||||
};
|
||||
export type TFriendEvent = TFriendEventBase | TFriendEventRequest | TFriendEventRejectUndo | TFriendEventSeenRequest | TFriendEventPinUnpin | TFriendEventPinCreate;
|
||||
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;
|
||||
};
|
||||
export declare function initializeFriendEvent(uid: string, data: TFriendEvent, type: FriendEventType): FriendEvent;
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
export var FriendEventType;
|
||||
(function (FriendEventType) {
|
||||
FriendEventType[FriendEventType["ADD"] = 0] = "ADD";
|
||||
FriendEventType[FriendEventType["REMOVE"] = 1] = "REMOVE";
|
||||
FriendEventType[FriendEventType["REQUEST"] = 2] = "REQUEST";
|
||||
FriendEventType[FriendEventType["UNDO_REQUEST"] = 3] = "UNDO_REQUEST";
|
||||
FriendEventType[FriendEventType["REJECT_REQUEST"] = 4] = "REJECT_REQUEST";
|
||||
FriendEventType[FriendEventType["SEEN_FRIEND_REQUEST"] = 5] = "SEEN_FRIEND_REQUEST";
|
||||
FriendEventType[FriendEventType["BLOCK"] = 6] = "BLOCK";
|
||||
FriendEventType[FriendEventType["UNBLOCK"] = 7] = "UNBLOCK";
|
||||
FriendEventType[FriendEventType["BLOCK_CALL"] = 8] = "BLOCK_CALL";
|
||||
FriendEventType[FriendEventType["UNBLOCK_CALL"] = 9] = "UNBLOCK_CALL";
|
||||
FriendEventType[FriendEventType["PIN_UNPIN"] = 10] = "PIN_UNPIN";
|
||||
FriendEventType[FriendEventType["PIN_CREATE"] = 11] = "PIN_CREATE";
|
||||
FriendEventType[FriendEventType["UNKNOWN"] = 12] = "UNKNOWN";
|
||||
})(FriendEventType || (FriendEventType = {}));
|
||||
export function initializeFriendEvent(uid, data, type) {
|
||||
if (type == FriendEventType.ADD ||
|
||||
type == FriendEventType.REMOVE ||
|
||||
type == FriendEventType.BLOCK ||
|
||||
type == FriendEventType.UNBLOCK ||
|
||||
type == FriendEventType.BLOCK_CALL ||
|
||||
type == FriendEventType.UNBLOCK_CALL) {
|
||||
return {
|
||||
type,
|
||||
data: data,
|
||||
threadId: data,
|
||||
isSelf: ![FriendEventType.ADD, FriendEventType.REMOVE].includes(type),
|
||||
};
|
||||
}
|
||||
else if (type == FriendEventType.REJECT_REQUEST || type == FriendEventType.UNDO_REQUEST) {
|
||||
const threadId = data.toUid;
|
||||
return {
|
||||
type,
|
||||
data: data,
|
||||
threadId,
|
||||
isSelf: data.fromUid == uid,
|
||||
};
|
||||
}
|
||||
else if (type == FriendEventType.REQUEST) {
|
||||
const threadId = data.toUid;
|
||||
return {
|
||||
type,
|
||||
data: data,
|
||||
threadId,
|
||||
isSelf: data.fromUid == uid,
|
||||
};
|
||||
}
|
||||
else if (type == FriendEventType.SEEN_FRIEND_REQUEST) {
|
||||
return {
|
||||
type,
|
||||
data: data,
|
||||
threadId: uid,
|
||||
isSelf: true,
|
||||
};
|
||||
}
|
||||
else if (type == FriendEventType.PIN_CREATE) {
|
||||
const threadId = data.conversationId;
|
||||
return {
|
||||
type,
|
||||
data: data,
|
||||
threadId,
|
||||
isSelf: data.actorId == uid,
|
||||
};
|
||||
}
|
||||
else if (type == FriendEventType.PIN_UNPIN) {
|
||||
const threadId = data.conversationId;
|
||||
return {
|
||||
type,
|
||||
data: data,
|
||||
threadId,
|
||||
isSelf: data.actorId == uid,
|
||||
};
|
||||
}
|
||||
else {
|
||||
return {
|
||||
type: FriendEventType.UNKNOWN,
|
||||
data: JSON.stringify(data),
|
||||
threadId: "",
|
||||
isSelf: false,
|
||||
};
|
||||
}
|
||||
}
|
||||
+125
@@ -0,0 +1,125 @@
|
||||
export type GroupSetting = {
|
||||
blockName: number;
|
||||
signAdminMsg: number;
|
||||
addMemberOnly: number;
|
||||
setTopicOnly: number;
|
||||
enableMsgHistory: number;
|
||||
joinAppr: number;
|
||||
lockCreatePost: number;
|
||||
lockCreatePoll: number;
|
||||
lockSendMsg: number;
|
||||
lockViewMember: number;
|
||||
bannFeature: number;
|
||||
dirtyMedia: number;
|
||||
banDuration: number;
|
||||
};
|
||||
export declare enum GroupTopicType {
|
||||
Note = 0,
|
||||
Message = 2,
|
||||
Poll = 3
|
||||
}
|
||||
export type GroupTopicNoteParams = {
|
||||
client_msg_id: string;
|
||||
global_msg_id: string;
|
||||
title: string;
|
||||
};
|
||||
export type GroupTopicTextMessageParams = {
|
||||
senderUid: string;
|
||||
senderName: string;
|
||||
client_msg_id: string;
|
||||
global_msg_id: string;
|
||||
msg_type: 1;
|
||||
title: string;
|
||||
};
|
||||
export type GroupTopicVoiceMessageParams = GroupTopicImageMessageParams & {
|
||||
msg_type: 31;
|
||||
};
|
||||
export type GroupTopicImageMessageParams = GroupTopicTextMessageParams & {
|
||||
msg_type: 32;
|
||||
thumb: string;
|
||||
};
|
||||
export type GroupTopicVideoMessageParams = GroupTopicTextMessageParams & {
|
||||
msg_type: 44;
|
||||
thumb: string;
|
||||
};
|
||||
export type GroupTopicFileMessageParams = GroupTopicTextMessageParams & {
|
||||
msg_type: 46;
|
||||
extra: {
|
||||
fileSize: string;
|
||||
checksum: string;
|
||||
checksumSha: unknown;
|
||||
fileExt: string;
|
||||
fdata: string;
|
||||
fType: number;
|
||||
};
|
||||
};
|
||||
export type GroupTopicGifMessageParams = GroupTopicTextMessageParams & {
|
||||
msg_type: 49;
|
||||
thumb: string;
|
||||
};
|
||||
export type GroupTopicMessageParams = GroupTopicTextMessageParams | GroupTopicVoiceMessageParams | GroupTopicImageMessageParams | GroupTopicVideoMessageParams | GroupTopicFileMessageParams | GroupTopicGifMessageParams;
|
||||
export type GroupTopicPollParams = {
|
||||
pollId: number;
|
||||
title: string;
|
||||
};
|
||||
export type GroupTopicOtherParams = {
|
||||
[key: string]: unknown;
|
||||
};
|
||||
export type GroupTopic = {
|
||||
type: GroupTopicType;
|
||||
color: number;
|
||||
emoji: string;
|
||||
startTime: number;
|
||||
duration: number;
|
||||
params: GroupTopicNoteParams | GroupTopicMessageParams | GroupTopicPollParams | GroupTopicOtherParams;
|
||||
id: string;
|
||||
creatorId: string;
|
||||
createTime: number;
|
||||
editorId: string;
|
||||
editTime: number;
|
||||
repeat: number;
|
||||
action: number;
|
||||
};
|
||||
export declare enum GroupType {
|
||||
Group = 1,
|
||||
Community = 2
|
||||
}
|
||||
export type GroupCurrentMem = {
|
||||
id: string;
|
||||
dName: string;
|
||||
zaloName: string;
|
||||
avatar: string;
|
||||
avatar_25: string;
|
||||
accountStatus: number;
|
||||
type: number;
|
||||
};
|
||||
export type GroupInfo = {
|
||||
groupId: string;
|
||||
name: string;
|
||||
desc: string;
|
||||
type: GroupType;
|
||||
creatorId: string;
|
||||
version: string;
|
||||
avt: string;
|
||||
fullAvt: string;
|
||||
memberIds: string[];
|
||||
adminIds: string[];
|
||||
currentMems: GroupCurrentMem[];
|
||||
updateMems: unknown[];
|
||||
admins: unknown[];
|
||||
hasMoreMember: number;
|
||||
subType: number;
|
||||
totalMember: number;
|
||||
maxMember: number;
|
||||
setting: GroupSetting;
|
||||
createdTime: number;
|
||||
visibility: number;
|
||||
globalId: string;
|
||||
/**
|
||||
* 1: True, 0: False
|
||||
*/
|
||||
e2ee: number;
|
||||
extraInfo: {
|
||||
enable_media_store: number;
|
||||
};
|
||||
};
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
export var GroupTopicType;
|
||||
(function (GroupTopicType) {
|
||||
GroupTopicType[GroupTopicType["Note"] = 0] = "Note";
|
||||
GroupTopicType[GroupTopicType["Message"] = 2] = "Message";
|
||||
GroupTopicType[GroupTopicType["Poll"] = 3] = "Poll";
|
||||
})(GroupTopicType || (GroupTopicType = {}));
|
||||
export var GroupType;
|
||||
(function (GroupType) {
|
||||
GroupType[GroupType["Group"] = 1] = "Group";
|
||||
GroupType[GroupType["Community"] = 2] = "Community";
|
||||
})(GroupType || (GroupType = {}));
|
||||
+178
@@ -0,0 +1,178 @@
|
||||
import type { GroupSetting, GroupTopic } from "./Group.js";
|
||||
import type { ReminderGroup } from "./Reminder.js";
|
||||
export declare enum GroupEventType {
|
||||
JOIN_REQUEST = "join_request",
|
||||
JOIN = "join",
|
||||
LEAVE = "leave",
|
||||
REMOVE_MEMBER = "remove_member",
|
||||
BLOCK_MEMBER = "block_member",
|
||||
UPDATE_SETTING = "update_setting",
|
||||
UPDATE = "update",
|
||||
NEW_LINK = "new_link",
|
||||
ADD_ADMIN = "add_admin",
|
||||
REMOVE_ADMIN = "remove_admin",
|
||||
NEW_PIN_TOPIC = "new_pin_topic",
|
||||
UPDATE_PIN_TOPIC = "update_pin_topic",
|
||||
REORDER_PIN_TOPIC = "reorder_pin_topic",
|
||||
UPDATE_BOARD = "update_board",
|
||||
REMOVE_BOARD = "remove_board",
|
||||
UPDATE_TOPIC = "update_topic",
|
||||
UNPIN_TOPIC = "unpin_topic",
|
||||
REMOVE_TOPIC = "remove_topic",
|
||||
ACCEPT_REMIND = "accept_remind",
|
||||
REJECT_REMIND = "reject_remind",
|
||||
REMIND_TOPIC = "remind_topic",
|
||||
UPDATE_AVATAR = "update_avatar",
|
||||
UNKNOWN = "unknown"
|
||||
}
|
||||
export type GroupEventUpdateMember = {
|
||||
id: string;
|
||||
dName: string;
|
||||
avatar: string;
|
||||
type: number;
|
||||
avatar_25: string;
|
||||
};
|
||||
export type GroupEventGroupInfo = {
|
||||
group_link?: string;
|
||||
link_expired_time?: number;
|
||||
[key: string]: unknown;
|
||||
};
|
||||
export type GroupEventExtraData = {
|
||||
featureId?: number;
|
||||
field?: string;
|
||||
[key: string]: unknown;
|
||||
};
|
||||
export type TGroupEventBase = {
|
||||
subType: number;
|
||||
groupId: string;
|
||||
creatorId: string;
|
||||
groupName: string;
|
||||
sourceId: string;
|
||||
updateMembers: GroupEventUpdateMember[];
|
||||
groupSetting: GroupSetting | null;
|
||||
groupTopic: GroupTopic | null;
|
||||
info: GroupEventGroupInfo | null;
|
||||
extraData: GroupEventExtraData | null;
|
||||
time: string;
|
||||
avt: string | null;
|
||||
fullAvt: string | null;
|
||||
isAdd: number;
|
||||
hideGroupInfo: number;
|
||||
version: string;
|
||||
groupType: number;
|
||||
clientId?: number;
|
||||
errorMap?: Record<string, unknown>;
|
||||
e2ee?: number;
|
||||
};
|
||||
export type TGroupEventJoinRequest = {
|
||||
uids: string[];
|
||||
totalPending: number;
|
||||
groupId: string;
|
||||
time: string;
|
||||
};
|
||||
export type TGroupEventPinTopic = {
|
||||
oldBoardVersion: number;
|
||||
boardVersion: number;
|
||||
topic: GroupTopic;
|
||||
actorId: string;
|
||||
groupId: string;
|
||||
};
|
||||
export type TGroupEventReorderPinTopic = {
|
||||
oldBoardVersion: number;
|
||||
actorId: string;
|
||||
topics: {
|
||||
topicId: string;
|
||||
topicType: number;
|
||||
}[];
|
||||
groupId: string;
|
||||
boardVersion: number;
|
||||
topic: null;
|
||||
};
|
||||
export type TGroupEventBoard = {
|
||||
sourceId: string;
|
||||
groupName: string;
|
||||
groupTopic: (GroupTopic | ReminderGroup) & {
|
||||
params: string;
|
||||
};
|
||||
groupId: string;
|
||||
creatorId: string;
|
||||
subType?: number;
|
||||
updateMembers?: GroupEventUpdateMember[];
|
||||
groupSetting?: GroupSetting;
|
||||
info?: GroupEventGroupInfo;
|
||||
extraData?: GroupEventExtraData;
|
||||
time?: string;
|
||||
avt?: null;
|
||||
fullAvt?: null;
|
||||
isAdd?: number;
|
||||
hideGroupInfo?: number;
|
||||
version?: string;
|
||||
groupType?: number;
|
||||
};
|
||||
export type TGroupEventRemindRespond = {
|
||||
topicId: string;
|
||||
updateMembers: string[];
|
||||
groupId: string;
|
||||
time: string;
|
||||
};
|
||||
export type TGroupEventRemindTopic = {
|
||||
msg: string;
|
||||
editorId: string;
|
||||
color: string;
|
||||
emoji: string;
|
||||
creatorId: string;
|
||||
editTime: number;
|
||||
type: number;
|
||||
duration: number;
|
||||
group_id: string;
|
||||
createTime: number;
|
||||
repeat: number;
|
||||
startTime: number;
|
||||
time: number;
|
||||
remindType: number;
|
||||
};
|
||||
export type TGroupEvent = TGroupEventBase | TGroupEventJoinRequest | TGroupEventPinTopic | TGroupEventReorderPinTopic | TGroupEventBoard | TGroupEventRemindRespond | TGroupEventRemindTopic;
|
||||
export type GroupEvent = {
|
||||
type: GroupEventType.JOIN_REQUEST;
|
||||
data: TGroupEventJoinRequest;
|
||||
act: string;
|
||||
threadId: string;
|
||||
isSelf: boolean;
|
||||
} | {
|
||||
type: GroupEventType.NEW_PIN_TOPIC | GroupEventType.UNPIN_TOPIC | GroupEventType.UPDATE_PIN_TOPIC;
|
||||
data: TGroupEventPinTopic;
|
||||
act: string;
|
||||
threadId: string;
|
||||
isSelf: boolean;
|
||||
} | {
|
||||
type: GroupEventType.REORDER_PIN_TOPIC;
|
||||
data: TGroupEventReorderPinTopic;
|
||||
act: string;
|
||||
threadId: string;
|
||||
isSelf: boolean;
|
||||
} | {
|
||||
type: GroupEventType.UPDATE_BOARD | GroupEventType.REMOVE_BOARD;
|
||||
data: TGroupEventBoard;
|
||||
act: string;
|
||||
threadId: string;
|
||||
isSelf: boolean;
|
||||
} | {
|
||||
type: GroupEventType.ACCEPT_REMIND | GroupEventType.REJECT_REMIND;
|
||||
data: TGroupEventRemindRespond;
|
||||
act: string;
|
||||
threadId: string;
|
||||
isSelf: boolean;
|
||||
} | {
|
||||
type: GroupEventType.REMIND_TOPIC;
|
||||
data: TGroupEventRemindTopic;
|
||||
act: string;
|
||||
threadId: string;
|
||||
isSelf: boolean;
|
||||
} | {
|
||||
type: Exclude<GroupEventType, GroupEventType.JOIN_REQUEST | GroupEventType.NEW_PIN_TOPIC | GroupEventType.UNPIN_TOPIC | GroupEventType.UPDATE_PIN_TOPIC | GroupEventType.REORDER_PIN_TOPIC | GroupEventType.UPDATE_BOARD | GroupEventType.REMOVE_BOARD | GroupEventType.ACCEPT_REMIND | GroupEventType.REJECT_REMIND | GroupEventType.REMIND_TOPIC>;
|
||||
data: TGroupEventBase;
|
||||
act: string;
|
||||
threadId: string;
|
||||
isSelf: boolean;
|
||||
};
|
||||
export declare function initializeGroupEvent(uid: string, data: TGroupEvent, type: GroupEventType, act: string): GroupEvent;
|
||||
+90
@@ -0,0 +1,90 @@
|
||||
export var GroupEventType;
|
||||
(function (GroupEventType) {
|
||||
GroupEventType["JOIN_REQUEST"] = "join_request";
|
||||
GroupEventType["JOIN"] = "join";
|
||||
GroupEventType["LEAVE"] = "leave";
|
||||
GroupEventType["REMOVE_MEMBER"] = "remove_member";
|
||||
GroupEventType["BLOCK_MEMBER"] = "block_member";
|
||||
GroupEventType["UPDATE_SETTING"] = "update_setting";
|
||||
GroupEventType["UPDATE"] = "update";
|
||||
GroupEventType["NEW_LINK"] = "new_link";
|
||||
GroupEventType["ADD_ADMIN"] = "add_admin";
|
||||
GroupEventType["REMOVE_ADMIN"] = "remove_admin";
|
||||
GroupEventType["NEW_PIN_TOPIC"] = "new_pin_topic";
|
||||
GroupEventType["UPDATE_PIN_TOPIC"] = "update_pin_topic";
|
||||
GroupEventType["REORDER_PIN_TOPIC"] = "reorder_pin_topic";
|
||||
GroupEventType["UPDATE_BOARD"] = "update_board";
|
||||
GroupEventType["REMOVE_BOARD"] = "remove_board";
|
||||
GroupEventType["UPDATE_TOPIC"] = "update_topic";
|
||||
GroupEventType["UNPIN_TOPIC"] = "unpin_topic";
|
||||
GroupEventType["REMOVE_TOPIC"] = "remove_topic";
|
||||
GroupEventType["ACCEPT_REMIND"] = "accept_remind";
|
||||
GroupEventType["REJECT_REMIND"] = "reject_remind";
|
||||
GroupEventType["REMIND_TOPIC"] = "remind_topic";
|
||||
GroupEventType["UPDATE_AVATAR"] = "update_avatar";
|
||||
GroupEventType["UNKNOWN"] = "unknown";
|
||||
})(GroupEventType || (GroupEventType = {}));
|
||||
export function initializeGroupEvent(uid, data, type, act) {
|
||||
var _a;
|
||||
const threadId = "group_id" in data ? data.group_id : data.groupId;
|
||||
if (type == GroupEventType.JOIN_REQUEST) {
|
||||
return { type, act, data: data, threadId, isSelf: false };
|
||||
}
|
||||
else if (type == GroupEventType.NEW_PIN_TOPIC ||
|
||||
type == GroupEventType.UNPIN_TOPIC ||
|
||||
type == GroupEventType.UPDATE_PIN_TOPIC) {
|
||||
return {
|
||||
type,
|
||||
act,
|
||||
data: data,
|
||||
threadId,
|
||||
isSelf: data.actorId == uid,
|
||||
};
|
||||
}
|
||||
else if (type == GroupEventType.REORDER_PIN_TOPIC) {
|
||||
return {
|
||||
type,
|
||||
act,
|
||||
data: data,
|
||||
threadId,
|
||||
isSelf: data.actorId == uid,
|
||||
};
|
||||
}
|
||||
else if (type == GroupEventType.UPDATE_BOARD || type == GroupEventType.REMOVE_BOARD) {
|
||||
return {
|
||||
type,
|
||||
act,
|
||||
data: data,
|
||||
threadId,
|
||||
isSelf: data.sourceId == uid,
|
||||
};
|
||||
}
|
||||
else if (type == GroupEventType.ACCEPT_REMIND || type == GroupEventType.REJECT_REMIND) {
|
||||
return {
|
||||
type,
|
||||
act,
|
||||
data: data,
|
||||
threadId,
|
||||
isSelf: data.updateMembers.some((memberId) => memberId == uid),
|
||||
};
|
||||
}
|
||||
else if (type == GroupEventType.REMIND_TOPIC) {
|
||||
return {
|
||||
type,
|
||||
act,
|
||||
data: data,
|
||||
threadId,
|
||||
isSelf: data.creatorId == uid,
|
||||
};
|
||||
}
|
||||
else {
|
||||
const baseData = data;
|
||||
return {
|
||||
type,
|
||||
act,
|
||||
data: baseData,
|
||||
threadId,
|
||||
isSelf: ((_a = baseData.updateMembers) === null || _a === void 0 ? void 0 : _a.some((member) => member.id == uid)) || baseData.sourceId == uid,
|
||||
};
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
export type LabelData = {
|
||||
id: number;
|
||||
text: string;
|
||||
textKey: string;
|
||||
conversations: string[];
|
||||
color: string;
|
||||
offset: number;
|
||||
emoji: string;
|
||||
createTime: number;
|
||||
};
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+91
@@ -0,0 +1,91 @@
|
||||
import { ThreadType } from "./Enum.js";
|
||||
export type TAttachmentContent = {
|
||||
title: string;
|
||||
description: string;
|
||||
href: string;
|
||||
thumb: string;
|
||||
childnumber: number;
|
||||
action: string;
|
||||
params: string;
|
||||
type: string;
|
||||
};
|
||||
export type TOtherContent = {
|
||||
[key: string]: unknown;
|
||||
};
|
||||
export type 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;
|
||||
};
|
||||
export type TGroupMessage = TMessage & {
|
||||
mentions: TMention[] | undefined;
|
||||
};
|
||||
export type TQuote = {
|
||||
ownerId: string;
|
||||
cliMsgId: number;
|
||||
globalMsgId: number;
|
||||
cliMsgType: number;
|
||||
ts: number;
|
||||
msg: string;
|
||||
attach: string;
|
||||
fromD: string;
|
||||
ttl: number;
|
||||
};
|
||||
export type TMention = {
|
||||
uid: string;
|
||||
pos: number;
|
||||
len: number;
|
||||
type: 0 | 1;
|
||||
};
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
export type Message = UserMessage | GroupMessage;
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
import { ThreadType } from "./Enum.js";
|
||||
export class UserMessage {
|
||||
constructor(uid, data) {
|
||||
this.type = ThreadType.User;
|
||||
this.data = data;
|
||||
this.threadId = data.uidFrom == "0" ? data.idTo : data.uidFrom;
|
||||
this.isSelf = data.uidFrom == "0";
|
||||
if (data.idTo == "0")
|
||||
data.idTo = uid;
|
||||
if (data.uidFrom == "0")
|
||||
data.uidFrom = uid;
|
||||
if (data.quote) {
|
||||
data.quote.ownerId = String(data.quote.ownerId);
|
||||
}
|
||||
}
|
||||
}
|
||||
export class GroupMessage {
|
||||
constructor(uid, data) {
|
||||
this.type = ThreadType.Group;
|
||||
this.data = data;
|
||||
this.threadId = data.idTo;
|
||||
this.isSelf = data.uidFrom == "0";
|
||||
if (data.uidFrom == "0")
|
||||
data.uidFrom = uid;
|
||||
if (data.quote) {
|
||||
data.quote.ownerId = String(data.quote.ownerId);
|
||||
}
|
||||
}
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
export type ProductCatalogItem = {
|
||||
price: string;
|
||||
description: string;
|
||||
/**
|
||||
* Relative path used to build the product URL.
|
||||
*
|
||||
* Example: https://catalog.zalo.me/${path}
|
||||
*/
|
||||
path: string;
|
||||
product_id: string;
|
||||
product_name: string;
|
||||
currency_unit: string;
|
||||
product_photos: string[];
|
||||
create_time: number;
|
||||
catalog_id: string;
|
||||
owner_id: string;
|
||||
};
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
export type QuickMessage = {
|
||||
id: number;
|
||||
keyword: string;
|
||||
type: number;
|
||||
createdTime: number;
|
||||
lastModified: number;
|
||||
message: {
|
||||
title: string;
|
||||
params: string | null;
|
||||
};
|
||||
media: {
|
||||
items: {
|
||||
type: number;
|
||||
photoId: number;
|
||||
title: string;
|
||||
width: number;
|
||||
height: number;
|
||||
previewThumb: string;
|
||||
rawUrl: string;
|
||||
thumbUrl: string;
|
||||
normalUrl: string;
|
||||
hdUrl: string;
|
||||
}[];
|
||||
} | null;
|
||||
};
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
export declare enum Reactions {
|
||||
HEART = "/-heart",
|
||||
LIKE = "/-strong",
|
||||
HAHA = ":>",
|
||||
WOW = ":o",
|
||||
CRY = ":-((",
|
||||
ANGRY = ":-h",
|
||||
KISS = ":-*",
|
||||
TEARS_OF_JOY = ":')",
|
||||
SHIT = "/-shit",
|
||||
ROSE = "/-rose",
|
||||
BROKEN_HEART = "/-break",
|
||||
DISLIKE = "/-weak",
|
||||
LOVE = ";xx",
|
||||
CONFUSED = ";-/",
|
||||
WINK = ";-)",
|
||||
FADE = "/-fade",
|
||||
SUN = "/-li",
|
||||
BIRTHDAY = "/-bd",
|
||||
BOMB = "/-bome",
|
||||
OK = "/-ok",
|
||||
PEACE = "/-v",
|
||||
THANKS = "/-thanks",
|
||||
PUNCH = "/-punch",
|
||||
SHARE = "/-share",
|
||||
PRAY = "_()_",
|
||||
NO = "/-no",
|
||||
BAD = "/-bad",
|
||||
LOVE_YOU = "/-loveu",
|
||||
SAD = "--b",
|
||||
VERY_SAD = ":((",
|
||||
COOL = "x-)",
|
||||
NERD = "8-)",
|
||||
BIG_SMILE = ";-d",
|
||||
SUNGLASSES = "b-)",
|
||||
NEUTRAL = ":--|",
|
||||
SAD_FACE = "p-(",
|
||||
BYE = ":-bye",
|
||||
SLEEPY = "|-)",
|
||||
WIPE = ":wipe",
|
||||
DIG = ":-dig",
|
||||
ANGUISH = "&-(",
|
||||
HANDCLAP = ":handclap",
|
||||
ANGRY_FACE = ">-|",
|
||||
F_CHAIR = ":-f",
|
||||
L_CHAIR = ":-l",
|
||||
R_CHAIR = ":-r",
|
||||
SILENT = ";-x",
|
||||
SURPRISE = ":-o",
|
||||
EMBARRASSED = ";-s",
|
||||
AFRAID = ";-a",
|
||||
SAD2 = ":-<",
|
||||
BIG_LAUGH = ":))",
|
||||
RICH = "$-)",
|
||||
BEER = "/-beer",
|
||||
NONE = ""
|
||||
}
|
||||
export type TReaction = {
|
||||
actionId: string;
|
||||
msgId: string;
|
||||
cliMsgId: string;
|
||||
msgType: string;
|
||||
uidFrom: string;
|
||||
idTo: string;
|
||||
dName?: string;
|
||||
content: {
|
||||
rMsg: {
|
||||
gMsgID: string;
|
||||
cMsgID: string;
|
||||
msgType: number;
|
||||
}[];
|
||||
rIcon: Reactions;
|
||||
rType: number;
|
||||
source: number;
|
||||
};
|
||||
ts: string;
|
||||
ttl: number;
|
||||
};
|
||||
export declare class Reaction {
|
||||
data: TReaction;
|
||||
threadId: string;
|
||||
isSelf: boolean;
|
||||
isGroup: boolean;
|
||||
constructor(uid: string, data: TReaction, isGroup: boolean);
|
||||
}
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
export var Reactions;
|
||||
(function (Reactions) {
|
||||
Reactions["HEART"] = "/-heart";
|
||||
Reactions["LIKE"] = "/-strong";
|
||||
Reactions["HAHA"] = ":>";
|
||||
Reactions["WOW"] = ":o";
|
||||
Reactions["CRY"] = ":-((";
|
||||
Reactions["ANGRY"] = ":-h";
|
||||
Reactions["KISS"] = ":-*";
|
||||
Reactions["TEARS_OF_JOY"] = ":')";
|
||||
Reactions["SHIT"] = "/-shit";
|
||||
Reactions["ROSE"] = "/-rose";
|
||||
Reactions["BROKEN_HEART"] = "/-break";
|
||||
Reactions["DISLIKE"] = "/-weak";
|
||||
Reactions["LOVE"] = ";xx";
|
||||
Reactions["CONFUSED"] = ";-/";
|
||||
Reactions["WINK"] = ";-)";
|
||||
Reactions["FADE"] = "/-fade";
|
||||
Reactions["SUN"] = "/-li";
|
||||
Reactions["BIRTHDAY"] = "/-bd";
|
||||
Reactions["BOMB"] = "/-bome";
|
||||
Reactions["OK"] = "/-ok";
|
||||
Reactions["PEACE"] = "/-v";
|
||||
Reactions["THANKS"] = "/-thanks";
|
||||
Reactions["PUNCH"] = "/-punch";
|
||||
Reactions["SHARE"] = "/-share";
|
||||
Reactions["PRAY"] = "_()_";
|
||||
Reactions["NO"] = "/-no";
|
||||
Reactions["BAD"] = "/-bad";
|
||||
Reactions["LOVE_YOU"] = "/-loveu";
|
||||
Reactions["SAD"] = "--b";
|
||||
Reactions["VERY_SAD"] = ":((";
|
||||
Reactions["COOL"] = "x-)";
|
||||
Reactions["NERD"] = "8-)";
|
||||
Reactions["BIG_SMILE"] = ";-d";
|
||||
Reactions["SUNGLASSES"] = "b-)";
|
||||
Reactions["NEUTRAL"] = ":--|";
|
||||
Reactions["SAD_FACE"] = "p-(";
|
||||
Reactions["BYE"] = ":-bye";
|
||||
Reactions["SLEEPY"] = "|-)";
|
||||
Reactions["WIPE"] = ":wipe";
|
||||
Reactions["DIG"] = ":-dig";
|
||||
Reactions["ANGUISH"] = "&-(";
|
||||
Reactions["HANDCLAP"] = ":handclap";
|
||||
Reactions["ANGRY_FACE"] = ">-|";
|
||||
Reactions["F_CHAIR"] = ":-f";
|
||||
Reactions["L_CHAIR"] = ":-l";
|
||||
Reactions["R_CHAIR"] = ":-r";
|
||||
Reactions["SILENT"] = ";-x";
|
||||
Reactions["SURPRISE"] = ":-o";
|
||||
Reactions["EMBARRASSED"] = ";-s";
|
||||
Reactions["AFRAID"] = ";-a";
|
||||
Reactions["SAD2"] = ":-<";
|
||||
Reactions["BIG_LAUGH"] = ":))";
|
||||
Reactions["RICH"] = "$-)";
|
||||
Reactions["BEER"] = "/-beer";
|
||||
Reactions["NONE"] = "";
|
||||
})(Reactions || (Reactions = {}));
|
||||
export class Reaction {
|
||||
constructor(uid, data, isGroup) {
|
||||
this.data = data;
|
||||
this.threadId = isGroup || data.uidFrom == "0" ? data.idTo : data.uidFrom;
|
||||
this.isSelf = data.uidFrom == "0";
|
||||
this.isGroup = isGroup;
|
||||
if (data.idTo == "0")
|
||||
data.idTo = uid;
|
||||
if (data.uidFrom == "0")
|
||||
data.uidFrom = uid;
|
||||
}
|
||||
}
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
export declare enum ReminderRepeatMode {
|
||||
None = 0,
|
||||
Daily = 1,
|
||||
Weekly = 2,
|
||||
Monthly = 3
|
||||
}
|
||||
export type ReminderUser = {
|
||||
creatorUid: string;
|
||||
toUid: string;
|
||||
emoji: string;
|
||||
color: number;
|
||||
reminderId: string;
|
||||
createTime: number;
|
||||
repeat: ReminderRepeatMode;
|
||||
startTime: number;
|
||||
editTime: number;
|
||||
endTime: number;
|
||||
params: {
|
||||
title: string;
|
||||
setTitle: boolean;
|
||||
};
|
||||
type: number;
|
||||
};
|
||||
export type ReminderGroup = {
|
||||
editorId: string;
|
||||
emoji: string;
|
||||
color: number;
|
||||
groupId: string;
|
||||
creatorId: string;
|
||||
editTime: number;
|
||||
eventType: number;
|
||||
responseMem: {
|
||||
rejectMember: number;
|
||||
myResp: number;
|
||||
acceptMember: number;
|
||||
};
|
||||
params: {
|
||||
title: string;
|
||||
setTitle?: boolean;
|
||||
};
|
||||
type: number;
|
||||
duration: number;
|
||||
repeatInfo: {
|
||||
list_ts: unknown[];
|
||||
} | null;
|
||||
repeatData: unknown[];
|
||||
createTime: number;
|
||||
repeat: ReminderRepeatMode;
|
||||
startTime: number;
|
||||
id: string;
|
||||
};
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
export var ReminderRepeatMode;
|
||||
(function (ReminderRepeatMode) {
|
||||
ReminderRepeatMode[ReminderRepeatMode["None"] = 0] = "None";
|
||||
ReminderRepeatMode[ReminderRepeatMode["Daily"] = 1] = "Daily";
|
||||
ReminderRepeatMode[ReminderRepeatMode["Weekly"] = 2] = "Weekly";
|
||||
ReminderRepeatMode[ReminderRepeatMode["Monthly"] = 3] = "Monthly";
|
||||
})(ReminderRepeatMode || (ReminderRepeatMode = {}));
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
import { ThreadType } from "./Enum.js";
|
||||
export type TUserSeenMessage = {
|
||||
idTo: string;
|
||||
msgId: string;
|
||||
realMsgId: string;
|
||||
};
|
||||
export type TGroupSeenMessage = {
|
||||
msgId: string;
|
||||
groupId: string;
|
||||
seenUids: string[];
|
||||
};
|
||||
export declare class UserSeenMessage {
|
||||
type: ThreadType.User;
|
||||
data: TUserSeenMessage;
|
||||
threadId: string;
|
||||
isSelf: false;
|
||||
constructor(data: TUserSeenMessage);
|
||||
}
|
||||
export declare class GroupSeenMessage {
|
||||
type: ThreadType.Group;
|
||||
data: TGroupSeenMessage;
|
||||
threadId: string;
|
||||
isSelf: boolean;
|
||||
constructor(uid: string, data: TGroupSeenMessage);
|
||||
}
|
||||
export type SeenMessage = UserSeenMessage | GroupSeenMessage;
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
import { ThreadType } from "./Enum.js";
|
||||
export class UserSeenMessage {
|
||||
constructor(data) {
|
||||
this.type = ThreadType.User;
|
||||
this.data = data;
|
||||
this.threadId = data.idTo;
|
||||
this.isSelf = false;
|
||||
}
|
||||
}
|
||||
export class GroupSeenMessage {
|
||||
constructor(uid, data) {
|
||||
this.type = ThreadType.Group;
|
||||
this.data = data;
|
||||
this.threadId = data.groupId;
|
||||
this.isSelf = data.seenUids.includes(uid);
|
||||
}
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
export type StickerDetail = {
|
||||
id: number;
|
||||
cateId: number;
|
||||
type: number;
|
||||
text: string;
|
||||
uri: string;
|
||||
fkey: number;
|
||||
status: number;
|
||||
stickerUrl: string;
|
||||
stickerSpriteUrl: string;
|
||||
stickerWebpUrl: string | null;
|
||||
totalFrames: number;
|
||||
duration: number;
|
||||
effectId: number;
|
||||
checksum: string;
|
||||
ext: number;
|
||||
source: number;
|
||||
fss: unknown;
|
||||
fssInfo: unknown;
|
||||
version: number;
|
||||
extInfo: unknown;
|
||||
};
|
||||
export type StickerBasic = {
|
||||
type: number;
|
||||
cate_id: number;
|
||||
sticker_id: number;
|
||||
};
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
import { ThreadType } from "./Enum.js";
|
||||
export type TTyping = {
|
||||
uid: string;
|
||||
ts: string;
|
||||
isPC: 0 | 1;
|
||||
};
|
||||
export type TGroupTyping = TTyping & {
|
||||
gid: string;
|
||||
};
|
||||
export declare class UserTyping {
|
||||
type: ThreadType.User;
|
||||
data: TTyping;
|
||||
threadId: string;
|
||||
isSelf: false;
|
||||
constructor(data: TTyping);
|
||||
}
|
||||
export declare class GroupTyping {
|
||||
type: ThreadType.Group;
|
||||
data: TGroupTyping;
|
||||
threadId: string;
|
||||
isSelf: false;
|
||||
constructor(data: TGroupTyping);
|
||||
}
|
||||
export type Typing = UserTyping | GroupTyping;
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
import { ThreadType } from "./Enum.js";
|
||||
export class UserTyping {
|
||||
constructor(data) {
|
||||
this.type = ThreadType.User;
|
||||
this.data = data;
|
||||
this.threadId = data.uid;
|
||||
this.isSelf = false;
|
||||
}
|
||||
}
|
||||
export class GroupTyping {
|
||||
constructor(data) {
|
||||
this.type = ThreadType.Group;
|
||||
this.data = data;
|
||||
this.threadId = data.gid;
|
||||
this.isSelf = false;
|
||||
}
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
export type TUndoContent = {
|
||||
globalMsgId: number;
|
||||
cliMsgId: number;
|
||||
deleteMsg: number;
|
||||
srcId: number;
|
||||
destId: number;
|
||||
};
|
||||
export type TUndo = {
|
||||
actionId: string;
|
||||
msgId: string;
|
||||
cliMsgId: string;
|
||||
msgType: string;
|
||||
uidFrom: string;
|
||||
idTo: string;
|
||||
dName: string;
|
||||
ts: string;
|
||||
status: number;
|
||||
content: TUndoContent;
|
||||
notify: string;
|
||||
ttl: number;
|
||||
userId: string;
|
||||
uin: string;
|
||||
cmd: number;
|
||||
st: number;
|
||||
at: number;
|
||||
realMsgId: string;
|
||||
};
|
||||
export declare class Undo {
|
||||
data: TUndo;
|
||||
threadId: string;
|
||||
isSelf: boolean;
|
||||
isGroup: boolean;
|
||||
constructor(uid: string, data: TUndo, isGroup: boolean);
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
export class Undo {
|
||||
constructor(uid, data, isGroup) {
|
||||
this.data = data;
|
||||
this.threadId = isGroup || data.uidFrom == "0" ? data.idTo : data.uidFrom;
|
||||
this.isSelf = data.uidFrom == "0";
|
||||
this.isGroup = isGroup;
|
||||
if (data.idTo == "0")
|
||||
data.idTo = uid;
|
||||
if (data.uidFrom == "0")
|
||||
data.uidFrom = uid;
|
||||
}
|
||||
}
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
import type { Gender } from "./Enum.js";
|
||||
import type { ZBusinessPackage } from "./ZBusiness.js";
|
||||
export type User = {
|
||||
userId: string;
|
||||
username: string;
|
||||
displayName: string;
|
||||
zaloName: string;
|
||||
avatar: string;
|
||||
bgavatar: string;
|
||||
cover: string;
|
||||
gender: Gender;
|
||||
dob: number;
|
||||
sdob: string;
|
||||
status: string;
|
||||
phoneNumber: string;
|
||||
isFr: number;
|
||||
isBlocked: number;
|
||||
lastActionTime: number;
|
||||
lastUpdateTime: number;
|
||||
isActive: number;
|
||||
key: number;
|
||||
type: number;
|
||||
isActivePC: number;
|
||||
isActiveWeb: number;
|
||||
isValid: number;
|
||||
userKey: string;
|
||||
accountStatus: number;
|
||||
oaInfo: unknown;
|
||||
user_mode: number;
|
||||
globalId: string;
|
||||
bizPkg: ZBusinessPackage;
|
||||
createdTs: number;
|
||||
oa_status: unknown;
|
||||
};
|
||||
export type UserBasic = {
|
||||
avatar: string;
|
||||
cover: string;
|
||||
status: string;
|
||||
gender: Gender;
|
||||
dob: number;
|
||||
sdob: string;
|
||||
globalId: string;
|
||||
bizPkg: ZBusinessPackage;
|
||||
uid: string;
|
||||
zalo_name: string;
|
||||
display_name: string;
|
||||
};
|
||||
export type UserSetting = {
|
||||
add_friend_via_contact: number;
|
||||
display_on_recommend_friend: number;
|
||||
add_friend_via_group: number;
|
||||
add_friend_via_qr: number;
|
||||
quick_message_status: number;
|
||||
show_online_status: boolean;
|
||||
accept_stranger_call: number;
|
||||
archived_chat_status: number;
|
||||
receive_message: number;
|
||||
add_friend_via_phone: number;
|
||||
display_seen_status: number;
|
||||
view_birthday: number;
|
||||
setting_2FA_status: number;
|
||||
};
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
export type ZBusinessPackage = {
|
||||
label?: Record<string, string> | null;
|
||||
pkgId: number;
|
||||
};
|
||||
export declare enum BusinessCategory {
|
||||
Other = 0,
|
||||
RealEstate = 1,
|
||||
TechnologyAndDevices = 2,
|
||||
TravelAndHospitality = 3,
|
||||
EducationAndTraining = 4,
|
||||
ShoppingAndRetail = 5,
|
||||
CosmeticsAndBeauty = 6,
|
||||
RestaurantAndCafe = 7,
|
||||
AutoAndMotorbike = 8,
|
||||
FashionAndApparel = 9,
|
||||
FoodAndBeverage = 10,
|
||||
MediaAndEntertainment = 11,
|
||||
InternalCommunications = 12,
|
||||
Transportation = 13,
|
||||
Telecommunications = 14
|
||||
}
|
||||
export declare const BusinessCategoryName: Record<BusinessCategory, string>;
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
export var BusinessCategory;
|
||||
(function (BusinessCategory) {
|
||||
BusinessCategory[BusinessCategory["Other"] = 0] = "Other";
|
||||
BusinessCategory[BusinessCategory["RealEstate"] = 1] = "RealEstate";
|
||||
BusinessCategory[BusinessCategory["TechnologyAndDevices"] = 2] = "TechnologyAndDevices";
|
||||
BusinessCategory[BusinessCategory["TravelAndHospitality"] = 3] = "TravelAndHospitality";
|
||||
BusinessCategory[BusinessCategory["EducationAndTraining"] = 4] = "EducationAndTraining";
|
||||
BusinessCategory[BusinessCategory["ShoppingAndRetail"] = 5] = "ShoppingAndRetail";
|
||||
BusinessCategory[BusinessCategory["CosmeticsAndBeauty"] = 6] = "CosmeticsAndBeauty";
|
||||
BusinessCategory[BusinessCategory["RestaurantAndCafe"] = 7] = "RestaurantAndCafe";
|
||||
BusinessCategory[BusinessCategory["AutoAndMotorbike"] = 8] = "AutoAndMotorbike";
|
||||
BusinessCategory[BusinessCategory["FashionAndApparel"] = 9] = "FashionAndApparel";
|
||||
BusinessCategory[BusinessCategory["FoodAndBeverage"] = 10] = "FoodAndBeverage";
|
||||
BusinessCategory[BusinessCategory["MediaAndEntertainment"] = 11] = "MediaAndEntertainment";
|
||||
BusinessCategory[BusinessCategory["InternalCommunications"] = 12] = "InternalCommunications";
|
||||
BusinessCategory[BusinessCategory["Transportation"] = 13] = "Transportation";
|
||||
BusinessCategory[BusinessCategory["Telecommunications"] = 14] = "Telecommunications";
|
||||
})(BusinessCategory || (BusinessCategory = {}));
|
||||
export const BusinessCategoryName = {
|
||||
[BusinessCategory.Other]: "Dịch vụ khác (Không hiển thị)",
|
||||
[BusinessCategory.RealEstate]: "Bất động sản",
|
||||
[BusinessCategory.TechnologyAndDevices]: "Công nghệ & Thiết bị",
|
||||
[BusinessCategory.TravelAndHospitality]: "Du lịch & Lưu trú",
|
||||
[BusinessCategory.EducationAndTraining]: "Giáo dục & Đào tạo",
|
||||
[BusinessCategory.ShoppingAndRetail]: "Mua sắm & Bán lẻ",
|
||||
[BusinessCategory.CosmeticsAndBeauty]: "Mỹ phẩm & Làm đẹp",
|
||||
[BusinessCategory.RestaurantAndCafe]: "Nhà hàng & Quán",
|
||||
[BusinessCategory.AutoAndMotorbike]: "Ô tô & Xe máy",
|
||||
[BusinessCategory.FashionAndApparel]: "Thời trang & May mặc",
|
||||
[BusinessCategory.FoodAndBeverage]: "Thực phẩm & Đồ uống",
|
||||
[BusinessCategory.MediaAndEntertainment]: "Truyền thông & Giải trí",
|
||||
[BusinessCategory.InternalCommunications]: "Truyền thông nội bộ",
|
||||
[BusinessCategory.Transportation]: "Vận tải",
|
||||
[BusinessCategory.Telecommunications]: "Viễn thông",
|
||||
};
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
export * from "./Attachment.js";
|
||||
export * from "./AutoReply.js";
|
||||
export * from "./Board.js";
|
||||
export * from "./Catalog.js";
|
||||
export * from "./DeliveredMessage.js";
|
||||
export * from "./Enum.js";
|
||||
export * from "./FriendEvent.js";
|
||||
export * from "./Group.js";
|
||||
export * from "./GroupEvent.js";
|
||||
export * from "./Message.js";
|
||||
export * from "./ProductCatalog.js";
|
||||
export * from "./QuickMessage.js";
|
||||
export * from "./Reaction.js";
|
||||
export * from "./Reminder.js";
|
||||
export * from "./SeenMessage.js";
|
||||
export * from "./Typing.js";
|
||||
export * from "./Undo.js";
|
||||
export * from "./User.js";
|
||||
export * from "./ZBusiness.js";
|
||||
export * from "./Label.js";
|
||||
export * from "./Sticker.js";
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
export * from "./Attachment.js";
|
||||
export * from "./AutoReply.js";
|
||||
export * from "./Board.js";
|
||||
export * from "./Catalog.js";
|
||||
export * from "./DeliveredMessage.js";
|
||||
export * from "./Enum.js";
|
||||
export * from "./FriendEvent.js";
|
||||
export * from "./Group.js";
|
||||
export * from "./GroupEvent.js";
|
||||
export * from "./Message.js";
|
||||
export * from "./ProductCatalog.js";
|
||||
export * from "./QuickMessage.js";
|
||||
export * from "./Reaction.js";
|
||||
export * from "./Reminder.js";
|
||||
export * from "./SeenMessage.js";
|
||||
export * from "./Typing.js";
|
||||
export * from "./Undo.js";
|
||||
export * from "./User.js";
|
||||
export * from "./ZBusiness.js";
|
||||
export * from "./Label.js";
|
||||
export * from "./Sticker.js";
|
||||
Reference in New Issue
Block a user