@anjir/app-novinhub
Version:
نوین هاب - پلتفرم کامل مدیریت شبکههای اجتماعی، دایرکت هوشمند، و خودکارسازی پیامرسانی
241 lines (240 loc) • 5.49 kB
TypeScript
export interface Account {
id: number;
identifier: string;
name: string;
login_required: number;
relogin_reason?: string;
date: string;
type: string;
comment_subscribe: number;
profile_url?: string;
picture_url?: string;
info?: string;
direct_subscribe: number;
social_user_id: number;
}
export interface AccountGroup {
id: number;
name: string;
date: string;
account_ids: number[];
}
export interface PostGroup {
id: number;
caption: string;
type: string;
account_ids: number[];
media_ids?: number[];
is_scheduled: number;
schedule_date?: number;
is_draft: number;
location?: string;
hashtag?: string[];
date: string;
}
export interface AccountPost {
id: number;
type: string;
post_id: string;
image?: string;
content: string;
date: string;
like_count: number;
comment_count: number;
social_user_id: number;
user_id: number;
account_id: number;
permalink?: string;
social: string;
}
export interface Comment {
id: number;
comment_id: number;
text: string;
date: string;
can_delete: number;
can_reply: number;
can_like: number;
status: number;
like: number;
post_id: string;
parent_id?: string;
social_user_id: number;
account_id: number;
user_id: number;
social: string;
from?: number;
parentName?: number;
}
export interface File {
id: number;
title: string;
filesize: number;
date: string;
url: string;
star: 0 | 1;
thumbnailUrl?: string;
fileType: string;
ext: string;
}
export interface Caption {
id: number;
name: string;
caption: string;
date: string;
}
export interface BooleanResponse {
success: boolean;
}
export interface RedirectResponse {
redirect_url: string;
message?: string;
}
export declare const SOCIAL_NETWORKS: {
readonly TELEGRAM: "Telegram";
readonly BALE: "Bale";
readonly EITAA: "Eitaa";
readonly GAP: "Gap";
readonly SOROUSH: "Soroush";
readonly INSTAGRAM: "InstagramOfficial";
readonly LINKEDIN: "Linkedin";
readonly PINTEREST: "Pinterest";
readonly TWITTER: "Twitter";
readonly TIKTOK: "TikTok";
readonly YOUTUBE: "Youtube";
readonly APARAT: "Aparat";
};
export declare const POST_TYPES: {
readonly TEXT: "text";
readonly IMAGE: "image";
readonly ALBUM: "album";
readonly VIDEO: "video";
readonly DOCUMENT: "document";
readonly STORY: "story";
readonly POLL: "poll";
};
export declare function getSocialNetworkDisplayName(type: string): string;
export interface AutomationMessage {
id: number;
title: string;
type: string;
text: string;
file_id?: number;
quick_replies?: QuickReply[];
buttons?: Button[];
created_at: string;
product_ids?: number[];
}
export interface QuickReply {
title: string;
payload: string;
}
export interface Button {
type: string;
title: string;
url?: string;
payload?: string;
}
export interface AutomationMenu {
title: string;
type: string;
payload: string;
}
export interface AutomationQuestion {
id: number;
title: string;
subtitle?: string;
file_id?: number;
url?: string;
buttons?: Button[];
created_at: string;
}
export interface Conversation {
id: number;
social_user_id: number;
account_id: number;
last_message?: Message;
unread_count: number;
status: string;
tags?: ConversationTag[];
created_at: string;
updated_at: string;
}
export interface Message {
id: number;
message_id: number;
type: string;
attachment?: string;
text: string;
date: string;
can_delete: number;
can_reaction: number;
social_user_id: number;
reactions?: MessageReaction[];
account_id: number;
conversation_id: number;
}
export interface MessageReaction {
type: string;
count: number;
}
export interface ConversationTag {
id: number;
name: string;
color: string;
}
export interface SocialUser {
id: number;
user_id: string;
username: string;
name: string;
image?: string;
social: string;
}
export interface SocialUserMeta {
name: string;
social_user_id: number;
account_id: number;
}
export interface InstagramUserInfo {
name: string;
username: string;
profile_pic: string;
is_user_follow_business: boolean;
}
export interface Product {
id: number;
title: string;
subtitle?: string;
file_id?: string;
url?: string;
buttons?: Button[];
created_at: string;
}
export interface SearchPeople {
id: number;
username: string;
name: string;
profile_pic?: string;
social: string;
}
export declare const AUTOMATION_MESSAGE_TYPES: {
readonly TEXT: "text";
readonly BUTTON: "button";
readonly MEDIA: "media";
readonly PRODUCTS: "products";
};
export declare const AUTOMATION_MENU_TYPES: {
readonly MESSAGE: "message";
readonly LINK: "link";
readonly FORM: "form";
};
export declare const WEBHOOK_EVENT_TYPES: {
readonly MESSAGE_CREATED: "message_created";
readonly COMMENT_CREATED: "comment_created";
readonly AUTOFORM_COMPLETED: "autoform_completed";
readonly LEED_CREATED: "leed_created";
readonly REVALIDATE: "revalidate";
readonly ALL: "all";
};
export declare function buildApiUrl(endpoint: string, params?: Record<string, any>): string;