UNPKG

vk-io

Version:

Modern VK API SDK for Node.js

35 lines (34 loc) 1.01 kB
import { Context, ContextFactoryOptions, ContextDefaultState } from './context'; import { kSerializeData } from '../../utils/constants'; export type VoteContextType = 'vote'; export type VoteContextSubType = 'poll_vote_new'; export interface IVoteContextPayload { poll_id: number; user_id: number; owner_id: number; option_id: number; } export type VoteContextOptions<S> = ContextFactoryOptions<IVoteContextPayload, S>; export declare class VoteContext<S = ContextDefaultState> extends Context<IVoteContextPayload, S, VoteContextType, VoteContextSubType> { constructor(options: VoteContextOptions<S>); /** * Returns the identifier poll */ get id(): number; /** * Returns the identifier user */ get userId(): number; /** * Returns the identifier owner */ get ownerId(): number; /** * Returns the identifier option */ get optionId(): number; /** * Returns the custom data */ [kSerializeData](): object; }