@apidog/multibot-sdk-ts
Advanced tools
Comparing version 0.0.4-0 to 0.0.4
@@ -24,2 +24,1 @@ export interface IBotPolling { | ||
export {}; | ||
//# sourceMappingURL=abstract-bot.d.ts.map |
export * from './telegram'; | ||
export * from './vk'; | ||
//# sourceMappingURL=index.d.ts.map |
export declare const messageTypes: string[]; | ||
//# sourceMappingURL=const.d.ts.map |
@@ -5,2 +5,3 @@ import AbstractBot, { IBotPolling, Listener } from '../abstract-bot'; | ||
import { User } from './types/user'; | ||
import { Config, Request } from './types/api'; | ||
declare const enum EventType { | ||
@@ -29,9 +30,9 @@ Message = "message", | ||
export declare type EventArgumentMessage = Listener<ArgumentMessage>; | ||
export declare class TelegramBot extends AbstractBot<TelegramBot.Config, EventType, EventListener> implements IBotPolling { | ||
static readonly defaultConfig: TelegramBot.Config; | ||
constructor(config: TelegramBot.Config); | ||
export declare class TelegramBot extends AbstractBot<Config, EventType, EventListener> implements IBotPolling { | ||
static readonly defaultConfig: Config; | ||
constructor(config: Config); | ||
protected getApiEndpoint: (method: string) => string; | ||
private readonly handleMethodsForFiles; | ||
private handleParamsForFiles; | ||
request: TelegramBot.Request; | ||
request: Request; | ||
/** | ||
@@ -53,2 +54,1 @@ * | ||
export * from './utils'; | ||
//# sourceMappingURL=index.d.ts.map |
import { Location } from './media'; | ||
import { User } from './user'; | ||
import { InlineKeyboard } from './keyboard'; | ||
import { User } from './user'; | ||
declare namespace TelegramBot { | ||
interface InlineQuery { | ||
id: string; | ||
from: User; | ||
location?: Location; | ||
query: string; | ||
offset: string; | ||
} | ||
interface InlineQueryResultBase { | ||
id: string; | ||
reply_markup?: InlineKeyboard; | ||
} | ||
interface InlineQueryResultArticle extends InlineQueryResultBase { | ||
type: 'article'; | ||
title: string; | ||
input_message_content: InputMessageContent; | ||
url?: string; | ||
hide_url?: boolean; | ||
description?: string; | ||
thumb_url?: string; | ||
thumb_width?: number; | ||
thumb_height?: number; | ||
} | ||
interface InlineQueryResultPhoto extends InlineQueryResultBase { | ||
type: 'photo'; | ||
photo_url: string; | ||
thumb_url: string; | ||
photo_width?: number; | ||
photo_height?: number; | ||
title?: string; | ||
description?: string; | ||
caption?: string; | ||
input_message_content?: InputMessageContent; | ||
} | ||
interface InlineQueryResultGif extends InlineQueryResultBase { | ||
type: 'gif'; | ||
gif_url: string; | ||
gif_width?: number; | ||
gif_height?: number; | ||
gif_duration?: number; | ||
thumb_url?: string; | ||
title?: string; | ||
caption?: string; | ||
input_message_content?: InputMessageContent; | ||
} | ||
interface InlineQueryResultMpeg4Gif extends InlineQueryResultBase { | ||
type: 'mpeg4_gif'; | ||
mpeg4_url: string; | ||
mpeg4_width?: number; | ||
mpeg4_height?: number; | ||
mpeg4_duration?: number; | ||
thumb_url?: string; | ||
title?: string; | ||
caption?: string; | ||
input_message_content?: InputMessageContent; | ||
} | ||
interface InlineQueryResultVideo extends InlineQueryResultBase { | ||
type: 'video'; | ||
video_url: string; | ||
mime_type: string; | ||
thumb_url: string; | ||
title: string; | ||
caption?: string; | ||
video_width?: number; | ||
video_height?: number; | ||
video_duration?: number; | ||
description?: string; | ||
input_message_content?: InputMessageContent; | ||
} | ||
interface InlineQueryResultAudio extends InlineQueryResultBase { | ||
type: 'audio'; | ||
audio_url: string; | ||
title: string; | ||
caption?: string; | ||
performer?: string; | ||
audio_duration?: number; | ||
input_message_content?: InputMessageContent; | ||
} | ||
interface InlineQueryResultVoice extends InlineQueryResultBase { | ||
type: 'voice'; | ||
voice_url: string; | ||
title: string; | ||
caption?: string; | ||
voice_duration?: number; | ||
input_message_content?: InputMessageContent; | ||
} | ||
interface InlineQueryResultDocument extends InlineQueryResultBase { | ||
type: 'document'; | ||
title: string; | ||
caption?: string; | ||
document_url: string; | ||
mime_type: string; | ||
description?: string; | ||
input_message_content?: InputMessageContent; | ||
thumb_url?: string; | ||
thumb_width?: number; | ||
thumb_height?: number; | ||
} | ||
interface InlineQueryResultLocationBase extends InlineQueryResultBase { | ||
latitude: number; | ||
longitude: number; | ||
title: string; | ||
input_message_content?: InputMessageContent; | ||
thumb_url?: string; | ||
thumb_width?: number; | ||
thumb_height?: number; | ||
} | ||
interface InlineQueryResultLocation extends InlineQueryResultLocationBase { | ||
type: 'location'; | ||
} | ||
interface InlineQueryResultVenue extends InlineQueryResultLocationBase { | ||
type: 'venue'; | ||
address: string; | ||
foursquare_id?: string; | ||
} | ||
interface InlineQueryResultContact extends InlineQueryResultBase { | ||
type: 'contact'; | ||
phone_number: string; | ||
first_name: string; | ||
last_name?: string; | ||
input_message_content?: InputMessageContent; | ||
thumb_url?: string; | ||
thumb_width?: number; | ||
thumb_height?: number; | ||
} | ||
interface InlineQueryResultGame extends InlineQueryResultBase { | ||
type: 'game'; | ||
game_short_name: string; | ||
} | ||
interface InlineQueryResultCachedPhoto extends InlineQueryResultBase { | ||
type: 'photo'; | ||
photo_file_id: string; | ||
title?: string; | ||
description?: string; | ||
caption?: string; | ||
input_message_content?: InputMessageContent; | ||
} | ||
interface InlineQueryResultCachedGif extends InlineQueryResultBase { | ||
type: 'gif'; | ||
gif_file_id: string; | ||
title?: string; | ||
caption?: string; | ||
input_message_content?: InputMessageContent; | ||
} | ||
interface InlineQueryResultCachedMpeg4Gif extends InlineQueryResultBase { | ||
type: 'mpeg4_gif'; | ||
mpeg4_file_id: string; | ||
title?: string; | ||
caption?: string; | ||
input_message_content?: InputMessageContent; | ||
} | ||
interface InlineQueryResultCachedSticker extends InlineQueryResultBase { | ||
type: 'sticker'; | ||
sticker_file_id: string; | ||
input_message_content?: InputMessageContent; | ||
} | ||
interface InlineQueryResultCachedDocument extends InlineQueryResultBase { | ||
type: 'document'; | ||
title: string; | ||
document_file_id: string; | ||
description?: string; | ||
caption?: string; | ||
input_message_content?: InputMessageContent; | ||
} | ||
interface InlineQueryResultCachedVideo extends InlineQueryResultBase { | ||
type: 'video'; | ||
video_file_id: string; | ||
title: string; | ||
description?: string; | ||
caption?: string; | ||
input_message_content?: InputMessageContent; | ||
} | ||
interface InlineQueryResultCachedVoice extends InlineQueryResultBase { | ||
type: 'voice'; | ||
voice_file_id: string; | ||
title: string; | ||
caption?: string; | ||
input_message_content?: InputMessageContent; | ||
} | ||
interface InlineQueryResultCachedAudio extends InlineQueryResultBase { | ||
type: 'audio'; | ||
audio_file_id: string; | ||
caption?: string; | ||
input_message_content?: InputMessageContent; | ||
} | ||
type InputMessageContent = object; | ||
type InlineQueryResult = InlineQueryResultCachedAudio | InlineQueryResultCachedDocument | InlineQueryResultCachedGif | InlineQueryResultCachedMpeg4Gif | InlineQueryResultCachedPhoto | InlineQueryResultCachedSticker | InlineQueryResultCachedVideo | InlineQueryResultCachedVoice | InlineQueryResultArticle | InlineQueryResultAudio | InlineQueryResultContact | InlineQueryResultGame | InlineQueryResultDocument | InlineQueryResultGif | InlineQueryResultLocation | InlineQueryResultMpeg4Gif | InlineQueryResultPhoto | InlineQueryResultVenue | InlineQueryResultVideo | InlineQueryResultVoice; | ||
export interface InlineQuery { | ||
id: string; | ||
from: User; | ||
location?: Location; | ||
query: string; | ||
offset: string; | ||
} | ||
export = TelegramBot; | ||
//# sourceMappingURL=inline-query.d.ts.map | ||
export interface InlineQueryResultBase { | ||
id: string; | ||
reply_markup?: InlineKeyboard; | ||
} | ||
export interface InlineQueryResultArticle extends InlineQueryResultBase { | ||
type: 'article'; | ||
title: string; | ||
input_message_content: InputMessageContent; | ||
url?: string; | ||
hide_url?: boolean; | ||
description?: string; | ||
thumb_url?: string; | ||
thumb_width?: number; | ||
thumb_height?: number; | ||
} | ||
export interface InlineQueryResultPhoto extends InlineQueryResultBase { | ||
type: 'photo'; | ||
photo_url: string; | ||
thumb_url: string; | ||
photo_width?: number; | ||
photo_height?: number; | ||
title?: string; | ||
description?: string; | ||
caption?: string; | ||
input_message_content?: InputMessageContent; | ||
} | ||
export interface InlineQueryResultGif extends InlineQueryResultBase { | ||
type: 'gif'; | ||
gif_url: string; | ||
gif_width?: number; | ||
gif_height?: number; | ||
gif_duration?: number; | ||
thumb_url?: string; | ||
title?: string; | ||
caption?: string; | ||
input_message_content?: InputMessageContent; | ||
} | ||
export interface InlineQueryResultMpeg4Gif extends InlineQueryResultBase { | ||
type: 'mpeg4_gif'; | ||
mpeg4_url: string; | ||
mpeg4_width?: number; | ||
mpeg4_height?: number; | ||
mpeg4_duration?: number; | ||
thumb_url?: string; | ||
title?: string; | ||
caption?: string; | ||
input_message_content?: InputMessageContent; | ||
} | ||
export interface InlineQueryResultVideo extends InlineQueryResultBase { | ||
type: 'video'; | ||
video_url: string; | ||
mime_type: string; | ||
thumb_url: string; | ||
title: string; | ||
caption?: string; | ||
video_width?: number; | ||
video_height?: number; | ||
video_duration?: number; | ||
description?: string; | ||
input_message_content?: InputMessageContent; | ||
} | ||
export interface InlineQueryResultAudio extends InlineQueryResultBase { | ||
type: 'audio'; | ||
audio_url: string; | ||
title: string; | ||
caption?: string; | ||
performer?: string; | ||
audio_duration?: number; | ||
input_message_content?: InputMessageContent; | ||
} | ||
export interface InlineQueryResultVoice extends InlineQueryResultBase { | ||
type: 'voice'; | ||
voice_url: string; | ||
title: string; | ||
caption?: string; | ||
voice_duration?: number; | ||
input_message_content?: InputMessageContent; | ||
} | ||
export interface InlineQueryResultDocument extends InlineQueryResultBase { | ||
type: 'document'; | ||
title: string; | ||
caption?: string; | ||
document_url: string; | ||
mime_type: string; | ||
description?: string; | ||
input_message_content?: InputMessageContent; | ||
thumb_url?: string; | ||
thumb_width?: number; | ||
thumb_height?: number; | ||
} | ||
export interface InlineQueryResultLocationBase extends InlineQueryResultBase { | ||
latitude: number; | ||
longitude: number; | ||
title: string; | ||
input_message_content?: InputMessageContent; | ||
thumb_url?: string; | ||
thumb_width?: number; | ||
thumb_height?: number; | ||
} | ||
export interface InlineQueryResultLocation extends InlineQueryResultLocationBase { | ||
type: 'location'; | ||
} | ||
export interface InlineQueryResultVenue extends InlineQueryResultLocationBase { | ||
type: 'venue'; | ||
address: string; | ||
foursquare_id?: string; | ||
} | ||
export interface InlineQueryResultContact extends InlineQueryResultBase { | ||
type: 'contact'; | ||
phone_number: string; | ||
first_name: string; | ||
last_name?: string; | ||
input_message_content?: InputMessageContent; | ||
thumb_url?: string; | ||
thumb_width?: number; | ||
thumb_height?: number; | ||
} | ||
export interface InlineQueryResultGame extends InlineQueryResultBase { | ||
type: 'game'; | ||
game_short_name: string; | ||
} | ||
export interface InlineQueryResultCachedPhoto extends InlineQueryResultBase { | ||
type: 'photo'; | ||
photo_file_id: string; | ||
title?: string; | ||
description?: string; | ||
caption?: string; | ||
input_message_content?: InputMessageContent; | ||
} | ||
export interface InlineQueryResultCachedGif extends InlineQueryResultBase { | ||
type: 'gif'; | ||
gif_file_id: string; | ||
title?: string; | ||
caption?: string; | ||
input_message_content?: InputMessageContent; | ||
} | ||
export interface InlineQueryResultCachedMpeg4Gif extends InlineQueryResultBase { | ||
type: 'mpeg4_gif'; | ||
mpeg4_file_id: string; | ||
title?: string; | ||
caption?: string; | ||
input_message_content?: InputMessageContent; | ||
} | ||
export interface InlineQueryResultCachedSticker extends InlineQueryResultBase { | ||
type: 'sticker'; | ||
sticker_file_id: string; | ||
input_message_content?: InputMessageContent; | ||
} | ||
export interface InlineQueryResultCachedDocument extends InlineQueryResultBase { | ||
type: 'document'; | ||
title: string; | ||
document_file_id: string; | ||
description?: string; | ||
caption?: string; | ||
input_message_content?: InputMessageContent; | ||
} | ||
export interface InlineQueryResultCachedVideo extends InlineQueryResultBase { | ||
type: 'video'; | ||
video_file_id: string; | ||
title: string; | ||
description?: string; | ||
caption?: string; | ||
input_message_content?: InputMessageContent; | ||
} | ||
export interface InlineQueryResultCachedVoice extends InlineQueryResultBase { | ||
type: 'voice'; | ||
voice_file_id: string; | ||
title: string; | ||
caption?: string; | ||
input_message_content?: InputMessageContent; | ||
} | ||
export interface InlineQueryResultCachedAudio extends InlineQueryResultBase { | ||
type: 'audio'; | ||
audio_file_id: string; | ||
caption?: string; | ||
input_message_content?: InputMessageContent; | ||
} | ||
export declare type InputMessageContent = object; | ||
export declare type InlineQueryResult = InlineQueryResultCachedAudio | InlineQueryResultCachedDocument | InlineQueryResultCachedGif | InlineQueryResultCachedMpeg4Gif | InlineQueryResultCachedPhoto | InlineQueryResultCachedSticker | InlineQueryResultCachedVideo | InlineQueryResultCachedVoice | InlineQueryResultArticle | InlineQueryResultAudio | InlineQueryResultContact | InlineQueryResultGame | InlineQueryResultDocument | InlineQueryResultGif | InlineQueryResultLocation | InlineQueryResultMpeg4Gif | InlineQueryResultPhoto | InlineQueryResultVenue | InlineQueryResultVideo | InlineQueryResultVoice; |
export * from './text-entites'; | ||
export * from './reply'; | ||
export * from '../../utils/delay'; | ||
export * from './md-v2'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -120,2 +120,1 @@ import { InlineKeyboard, CallbackGame } from '../types/keyboard'; | ||
export {}; | ||
//# sourceMappingURL=keyboard.d.ts.map |
export {}; | ||
//# sourceMappingURL=keyboard.test.d.ts.map |
@@ -13,2 +13,1 @@ declare type MdV2fx = (text: string) => string; | ||
export {}; | ||
//# sourceMappingURL=md-v2.d.ts.map |
export {}; | ||
//# sourceMappingURL=md-v2.test.d.ts.map |
@@ -5,2 +5,1 @@ import { Message } from '../types/message'; | ||
export declare const reply: (bot: TelegramBot, message: Message, text: string, options?: SendMessageOptions) => Promise<Message>; | ||
//# sourceMappingURL=reply.d.ts.map |
@@ -5,2 +5,1 @@ import { Message, MessageEntity } from '../types/message'; | ||
})[]; | ||
//# sourceMappingURL=text-entites.d.ts.map |
export {}; | ||
//# sourceMappingURL=text-entites.test.d.ts.map |
export declare const delay: (ms: number) => Promise<unknown>; | ||
//# sourceMappingURL=delay.d.ts.map |
export {}; | ||
//# sourceMappingURL=delay.test.d.ts.map |
import AbstractBot, { IBotPolling, Listener } from '../abstract-bot'; | ||
import { Message } from './types/api'; | ||
import { Message } from './types/message'; | ||
import { Config, Request } from './types/api'; | ||
declare const enum EventType { | ||
@@ -13,8 +14,8 @@ Message = "message", | ||
} | ||
export declare class VkBot extends AbstractBot<VkBot.Config, EventType, EventListener> implements IBotPolling { | ||
static readonly defaultConfig: VkBot.Config; | ||
export declare class VkBot extends AbstractBot<Config, EventType, EventListener> implements IBotPolling { | ||
static readonly defaultConfig: Config; | ||
private server?; | ||
constructor(config: VkBot.Config); | ||
constructor(config: Config); | ||
protected getApiEndpoint: (method: string) => string; | ||
request: VkBot.Request; | ||
request: Request; | ||
/** | ||
@@ -33,2 +34,1 @@ * Polling | ||
export {}; | ||
//# sourceMappingURL=index.d.ts.map |
{ | ||
"name": "@apidog/multibot-sdk-ts", | ||
"version": "0.0.4-0", | ||
"version": "0.0.4", | ||
"description": "Telegram and VK bot SDK for TypeScript", | ||
@@ -12,5 +12,5 @@ "main": "dist/index.js", | ||
"scripts": { | ||
"dev": "webpack && node dist/main", | ||
"dev": "npm run build && node dist/main", | ||
"prepare": "npm run build", | ||
"build": "NODE_ENV=production webpack", | ||
"build": "tsc", | ||
"test": "jest", | ||
@@ -30,24 +30,11 @@ "lint": "eslint --cache --ext .ts,.tsx src" | ||
"devDependencies": { | ||
"@babel/core": "^7.9.0", | ||
"@babel/plugin-proposal-class-properties": "^7.8.3", | ||
"@babel/plugin-proposal-optional-chaining": "^7.9.0", | ||
"@babel/plugin-syntax-typescript": "^7.8.3", | ||
"@babel/plugin-transform-runtime": "^7.9.0", | ||
"@babel/preset-env": "^7.9.0", | ||
"@types/jest": "^25.1.4", | ||
"@types/node": "^13.9.2", | ||
"@types/webpack": "^4.41.8", | ||
"@typescript-eslint/eslint-plugin": "^2.25.0", | ||
"@typescript-eslint/parser": "^2.25.0", | ||
"babel-loader": "^8.1.0", | ||
"eslint": "^6.8.0", | ||
"form-data": "^3.0.0", | ||
"jest": "^25.1.0", | ||
"npm-run-all": "^4.1.5", | ||
"terser-webpack-plugin": "^2.3.5", | ||
"ts-jest": "^25.2.1", | ||
"ts-loader": "^6.2.1", | ||
"typescript": "^3.8.3", | ||
"webpack": "^4.42.0", | ||
"webpack-cli": "^3.3.11" | ||
"typescript": "^3.8.3" | ||
}, | ||
@@ -54,0 +41,0 @@ "bugs": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 6 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
9
90
2
1774
2
1
1
114771