UNPKG

vk-io

Version:

Modern VK API SDK for Node.js

48 lines (47 loc) 1.61 kB
import { Params } from '../../api'; import { Context, ContextFactoryOptions, ContextDefaultState } from './context'; import { kSerializeData } from '../../utils/constants'; export type DialogFlagsContextType = 'dialog_flags'; export type DialogFlagsContextSubType = 'dialog_flags_add' | 'dialog_flags_delete'; declare enum DialogFlag { IMPORTANT = 1, UNANSWERED = 2 } export interface IDialogFlagsContextPayload { peer_id: number; flags: number; } export type DialogFlagsContextOptions<S> = ContextFactoryOptions<number[], S>; export declare class DialogFlagsContext<S = ContextDefaultState> extends Context<IDialogFlagsContextPayload, S, DialogFlagsContextType, DialogFlagsContextSubType> { constructor(options: DialogFlagsContextOptions<S>); /** * Checks if dialogue is important */ get isImportant(): boolean; /** * Checks if the dialog is unanswered */ get isUnanswered(): boolean; /** * Returns the destination identifier */ get peerId(): number; /** * Returns the values of the flags */ get flags(): number; /** * Marks the conversation as answered or unchecked */ markAsAnsweredConversation(params: Params.MessagesMarkAsAnsweredConversationParams): Promise<number>; /** * Marks the conversation as important or removes the mark */ markAsImportantConversation(params: Params.MessagesMarkAsImportantConversationParams): Promise<number>; protected hasFlag(flag: DialogFlag): boolean; /** * Returns the custom data */ [kSerializeData](): object; } export {};