vk-io
Version:
Modern VK API SDK for Node.js
44 lines (43 loc) • 1.48 kB
TypeScript
import { Context, ContextFactoryOptions, ContextDefaultState } from './context';
import { kSerializeData } from '../../utils/constants';
export type DonutSubscriptionPriceContextType = 'donut_subscription_price';
export type DonutSubscriptionPriceContextSubType = 'donut_subscription_price_changed';
export interface IDonutSubscriptionPriceContextPayload {
user_id: number;
amount_old: number;
amount_new: number;
amount_diff: number;
amount_diff_without_fee: number;
}
export type DonutSubscriptionPriceContextOptions<S> = ContextFactoryOptions<IDonutSubscriptionPriceContextPayload, S>;
export declare class DonutSubscriptionPriceContext<S = ContextDefaultState> extends Context<IDonutSubscriptionPriceContextPayload, S, DonutSubscriptionPriceContextType, DonutSubscriptionPriceContextSubType> {
constructor(options: DonutSubscriptionPriceContextOptions<S>);
/**
* Checks if subscription changed
*/
get isChanged(): boolean;
/**
* Returns the id of the user who interacts with the vk donut
*/
get userId(): number;
/**
* Returns the old amount
*/
get oldAmount(): number;
/**
* Returns the new amount
*/
get newAmount(): number;
/**
* Returns the diff amount
*/
get diffAmount(): number;
/**
* Returns the diff amount without fee
*/
get diffAmountWithoutFee(): number;
/**
* Returns the custom data
*/
[kSerializeData](): object;
}