UNPKG

vk-io

Version:

Modern VK API SDK for Node.js

38 lines (37 loc) 1.5 kB
import { Context, ContextFactoryOptions, ContextDefaultState } from './context'; import { kSerializeData } from '../../utils/constants'; export type DialogNotificationSettingsContextType = 'dialog_notification_settings'; export type DialogNotificationSettingsContextSubType = 'dialog_notification_settings_subscribe' | 'dialog_notification_settings_unsubscribe'; export interface IDialogNotificationSettingsContextPayload { peer_id: number; sound: 0 | 1; disabled_until: number; } export type DialogNotificationSettingsContextOptions<S> = ContextFactoryOptions<[number, IDialogNotificationSettingsContextPayload], S>; export declare class DialogNotificationSettingsContext<S = ContextDefaultState> extends Context<IDialogNotificationSettingsContextPayload, S, DialogNotificationSettingsContextType, DialogNotificationSettingsContextSubType> { constructor(options: DialogNotificationSettingsContextOptions<S>); /** * Returns the peer identifier */ get peerId(): number; /** * Returns time until that notifications are disabled in seconds */ get disabledUntil(): number; /** * Checks that the notifications have sound */ get hasSound(): boolean; /** * Checks that the user has subscribed to dialog */ get isSubscribed(): boolean; /** * Checks that the user has unsubscribed to dialog */ get isUnsubscribed(): boolean; /** * Returns the custom data */ [kSerializeData](): object; }