vk-io
Version:
Modern VK API SDK for Node.js
32 lines (31 loc) • 2.07 kB
TypeScript
import { Attachment, ExternalAttachment, AudioAttachment, AudioMessageAttachment, DocumentAttachment, GiftAttachment, GraffitiAttachment, LinkAttachment, MarketAlbumAttachment, MarketAttachment, PhotoAttachment, PollAttachment, StickerAttachment, StoryAttachment, VideoAttachment, WallReplyAttachment, WallAttachment } from '../attachments';
import { AttachmentType, AttachmentTypeString } from '../../utils/constants';
export declare class Attachmentable {
attachments: (Attachment | ExternalAttachment)[];
/**
* Checks for the presence of attachments
*/
hasAttachments(type?: AttachmentType | AttachmentTypeString): boolean;
/**
* Returns the attachments
*/
getAttachments(type: AttachmentType.AUDIO | 'audio'): AudioAttachment[];
getAttachments(type: AttachmentType.AUDIO_MESSAGE | 'audio_message'): AudioMessageAttachment[];
getAttachments(type: AttachmentType.GRAFFITI | 'graffiti'): GraffitiAttachment[];
getAttachments(type: AttachmentType.DOCUMENT | 'doc'): DocumentAttachment[];
getAttachments(type: AttachmentType.MARKET_ALBUM | 'market_album'): MarketAlbumAttachment[];
getAttachments(type: AttachmentType.MARKET | 'market'): MarketAttachment[];
getAttachments(type: AttachmentType.PHOTO | 'photo'): PhotoAttachment[];
getAttachments(type: AttachmentType.STORY | 'story'): StoryAttachment[];
getAttachments(type: AttachmentType.VIDEO | 'video'): VideoAttachment[];
getAttachments(type: AttachmentType.WALL | 'wall'): WallAttachment[];
getAttachments(type: AttachmentType.POLL | 'poll'): PollAttachment[];
getAttachments(type: AttachmentType.GIFT | 'gift'): GiftAttachment[];
getAttachments(type: AttachmentType.LINK | 'link'): LinkAttachment[];
getAttachments(type: AttachmentType.STICKER | 'sticker'): StickerAttachment[];
getAttachments(type: AttachmentType.WALL_REPLY | 'wall_reply'): WallReplyAttachment[];
}
export interface IAllAttachmentable {
hasAllAttachments: Attachmentable['hasAttachments'];
getAllAttachments: Attachmentable['getAttachments'];
}