///
declare const _default: {
koniBot: ({ strapi }: {
strapi: import("@strapi/types/dist/core").Strapi;
}) => {
defaultBotName: string;
_initBotMap: boolean;
_botMap: Record;
readonly botMap: Record;
getBotHandler(name?: string): import("../bot/koni-bot").KoniBot;
getBot(name?: string): import("telegraf").Telegraf>;
launch(): Promise;
stop(): Promise;
};
botBasicAction: ({ strapi }: {
strapi: import("@strapi/types/dist/core").Strapi;
}) => {
telegramUser: import("@strapi/types/dist/core").Service;
botTemplate: {
cache: Record;
renewCache(): Promise;
getMessage(key: string, defaultConfig: import("./content-type/bot-message-template").TemplateConfig): import("./content-type/bot-message-template").TemplateConfig;
getHelpMessage(): import("./content-type/bot-message-template").TemplateConfig;
getAutoAnswerMessage(): import("./content-type/bot-message-template").TemplateConfig;
getWelcomeMessage(): import("./content-type/bot-message-template").TemplateConfig;
};
telegramGroup: import("@strapi/types/dist/core").Service;
telegramUserActivity: import("@strapi/types/dist/core").Service;
replyMessage(ctx: import("telegraf").Context>, config: import("./content-type/bot-message-template").TemplateConfig, replacements?: Record): Promise;
handleStart(ctx: import("telegraf").Context>): Promise;
handleHelp(ctx: import("telegraf").Context>): Promise;
handleMessage(ctx: import("telegraf").Context>): Promise;
};
koniBotAction: ({ strapi }: {
strapi: import("@strapi/types/dist/core").Strapi;
}) => {
koniBot: {
defaultBotName: string;
_initBotMap: boolean;
_botMap: Record;
readonly botMap: Record;
getBotHandler(name?: string): import("../bot/koni-bot").KoniBot;
getBot(name?: string): import("telegraf").Telegraf>;
launch(): Promise;
stop(): Promise;
};
botTemplate: {
cache: Record;
renewCache(): Promise;
getMessage(key: string, defaultConfig: import("./content-type/bot-message-template").TemplateConfig): import("./content-type/bot-message-template").TemplateConfig;
getHelpMessage(): import("./content-type/bot-message-template").TemplateConfig;
getAutoAnswerMessage(): import("./content-type/bot-message-template").TemplateConfig;
getWelcomeMessage(): import("./content-type/bot-message-template").TemplateConfig;
};
telegramUser: ({ strapi, }: {
strapi: import("@strapi/types/dist/core").Strapi;
}) => {
wallet: import("@strapi/types/dist/core").Service;
telegramBot: {
koniBot: any;
botCache: any;
getBotByUsername: any;
autoCreateBot: any;
_sendMessage: any;
sendMessage: any;
} & import("@strapi/types/dist/core/core-api/service").Base;
isEnableCreateWallet: boolean;
upsertUser: (userInfo: import("@telegraf/types").User, botInfo: import("@telegraf/types").User) => Promise;
getUserByTelegramId: (telegramId: string | number) => Promise;
findUserByTelegramId: (telegramId: string | number) => Promise;
} & import("@strapi/types/dist/core/core-api/service").Base;
registerBotActions(): Promise;
};
telegramAction: ({ strapi }: {
strapi: import("@strapi/types/dist/core").Strapi;
}) => {
telegramBot: import("@strapi/types/dist/core").Service;
getButtons(apiID: string): Promise;
sendNotification(data: any, actionType: import("../types").DeploymentType): void;
trigger(buttonID: string, id: string): Promise<{
executed: boolean;
type?: undefined;
status?: undefined;
message?: undefined;
} | {
type: string;
status: boolean;
message: any;
executed?: undefined;
}>;
};
synchronizeAction: ({ strapi }: {
strapi: import("@strapi/types/dist/core").Strapi;
}) => {
telegramUser: import("@strapi/types/dist/core").Service;
telegramGroup: import("@strapi/types/dist/core").Service;
telegramUserActivity: import("@strapi/types/dist/core").Service;
koniBot: import("../bot/koni-bot").KoniBot;
registerCrawlerBotActions(): Promise;
launchCrawlerBot(): Promise;
stopCrawlerBot(): Promise;
handleUserSendMessage(ctx: import("telegraf").Context>): Promise;
handleMessage(ctx: import("telegraf").Context>): Promise;
getTelegramClientUser(): Promise;
getTelegramClientBot(): Promise;
getUserInfoInGroup(clientBot: import("telegram").TelegramClient, groupUrl: string): Promise>;
getMessageWithGroup(clientUser: import("telegram").TelegramClient, clientBot: import("telegram").TelegramClient, groupUrl: string): Promise<(import("@telegraf/types").User & {
msgCount: number;
joinDate: number;
})[]>;
synchronizeUserAction(): Promise;
synchronizeMessageAction(): Promise<{}>;
};
'telegram-user': ({ strapi, }: {
strapi: import("@strapi/types/dist/core").Strapi;
}) => {
wallet: import("@strapi/types/dist/core").Service;
telegramBot: {
koniBot: any;
botCache: any;
getBotByUsername: any;
autoCreateBot: any;
_sendMessage: any;
sendMessage: any;
} & import("@strapi/types/dist/core/core-api/service").Base;
isEnableCreateWallet: boolean;
upsertUser: (userInfo: import("@telegraf/types").User, botInfo: import("@telegraf/types").User) => Promise;
getUserByTelegramId: (telegramId: string | number) => Promise;
findUserByTelegramId: (telegramId: string | number) => Promise;
} & import("@strapi/types/dist/core/core-api/service").Base;
'telegram-group': ({ strapi, }: {
strapi: import("@strapi/types/dist/core").Strapi;
}) => {
wallet: import("@strapi/types/dist/core").Service;
upsertGroup: (chat: import("@telegraf/types").Chat.SupergroupChat | import("@telegraf/types").Chat.ChannelChat, botInfo: any) => Promise;
getGroupByTelegramId: (telegramId: string | number) => Promise;
updateSynchronizationStatus: (documentId: string, status: import("./content-type/telegram-group").SynchronizationStatus) => Promise;
} & import("@strapi/types/dist/core/core-api/service").Base;
'telegram-bot': ({ strapi, }: {
strapi: import("@strapi/types/dist/core").Strapi;
}) => {
koniBot: {
defaultBotName: string;
_initBotMap: boolean;
_botMap: Record;
readonly botMap: Record;
getBotHandler(name?: string): import("../bot/koni-bot").KoniBot;
getBot(name?: string): import("telegraf").Telegraf>;
launch(): Promise;
stop(): Promise;
};
botCache: {};
getBotByUsername: (username: string) => Promise;
autoCreateBot: () => Promise;
_sendMessage: ({ telegramUsers, botData, data, actionType }: {
telegramUsers: any;
botData: any;
data: any;
actionType: any;
}) => Promise;
sendMessage: (botID: string, data: any, users?: any[], actionType?: import("../types").DeploymentType) => Promise;
} & import("@strapi/types/dist/core/core-api/service").Base;
'telegram-link': ({ strapi, }: {
strapi: import("@strapi/types/dist/core").Strapi;
}) => {
botService: {
defaultBotName: string;
_initBotMap: boolean;
_botMap: Record;
readonly botMap: Record;
getBotHandler(name?: string): import("../bot/koni-bot").KoniBot;
getBot(name?: string): import("telegraf").Telegraf>;
launch(): Promise;
stop(): Promise;
};
telegramUserService: import("@strapi/types/dist/core").Service;
secretMap: Record;
getSecret: (botName?: string) => Buffer;
link: ({ initData, bot, linkInfo }: import("./content-type/telegram-link").TelegramLinkParams, withSecretKey?: any) => Promise<{
success: boolean;
data: any;
}>;
getLink: ({ service, bot, telegram_id, id, uid, email, address }: import("./content-type/telegram-link").QueryLinkParams) => Promise<{
success: boolean;
error: string;
data?: undefined;
} | {
success: boolean;
data: any;
error?: undefined;
}>;
validateInitData: (initData: string, botName?: string) => import("./content-type/telegram-link").ValidateInitDataResult;
} & import("@strapi/types/dist/core/core-api/service").Base;
'bot-message-template': ({ strapi }: {
strapi: import("@strapi/types/dist/core").Strapi;
}) => {
cache: Record;
renewCache(): Promise;
getMessage(key: string, defaultConfig: import("./content-type/bot-message-template").TemplateConfig): import("./content-type/bot-message-template").TemplateConfig;
getHelpMessage(): import("./content-type/bot-message-template").TemplateConfig;
getAutoAnswerMessage(): import("./content-type/bot-message-template").TemplateConfig;
getWelcomeMessage(): import("./content-type/bot-message-template").TemplateConfig;
};
'telegram-notification': ({ strapi, }: {
strapi: import("@strapi/types/dist/core").Strapi;
}) => {
koniBot: import("@strapi/types/dist/core").Service;
getDataContent: (id: string) => Promise<{
status: boolean;
data: any;
message: string;
}>;
} & import("@strapi/types/dist/core/core-api/service").Base;
'telegram-user-activity': ({ strapi, }: {
strapi: import("@strapi/types/dist/core").Strapi;
}) => {
telegramGroup: import("@strapi/types/dist/core").Service;
telegramUser: import("@strapi/types/dist/core").Service;
getActivity: (groupId: number, telegramId: number) => Promise<{
telegramId: number;
groupId: number;
messageCount: any;
timeSinceJoin: any;
}>;
getActivitiesByGroup: (groupId: number) => Promise;
upsertActivity: (params: import("./content-type/telegram-user-activity").TelegramUserActivityParams) => Promise;
updateMessageCount: (groupId: number, userId: number) => Promise;
updateUserLeftGroup: (groupId: number, telegramIds: number[]) => Promise;
updateActivity: (documentId: string, params: Partial) => Promise;
} & import("@strapi/types/dist/core/core-api/service").Base;
};
export default _default;