UNPKG

vk-io

Version:

Modern VK API SDK for Node.js

36 lines (35 loc) 1.23 kB
import { Context, ContextFactoryOptions, ContextDefaultState } from './context'; import { Attachmentable } from '../shared/attachmentable'; import { kSerializeData } from '../../utils/constants'; export type NewAttachmentsContextType = 'new_attachment'; export type NewAttachmentsContextSubType = 'photo_new' | 'video_new' | 'audio_new'; export interface INewAttachmentsContextPayload { id: number; } export type NewAttachmentsContextOptions<S> = ContextFactoryOptions<INewAttachmentsContextPayload, S>; declare class NewAttachmentsContext<S = ContextDefaultState> extends Context<INewAttachmentsContextPayload, S, NewAttachmentsContextType, NewAttachmentsContextSubType> { constructor(options: NewAttachmentsContextOptions<S>); /** * Checks is attachment photo */ get isPhoto(): boolean; /** * Checks is attachment video */ get isVideo(): boolean; /** * Checks is attachment audio */ get isAudio(): boolean; /** * Removes the attachment */ deleteAttachment(): Promise<number>; /** * Returns the custom data */ [kSerializeData](): object; } interface NewAttachmentsContext extends Attachmentable { } export { NewAttachmentsContext };