import { default as SuprSend } from './main'; import { Dictionary, PreferenceData, PreferenceOptions, ChannelLevelPreferenceOptions, IPreferenceConfig } from './interface'; export default class Preferences { private config; private preferenceData; private preferenceArgs?; private debouncedUpdateCategoryPreferences; private debouncedUpdateChannelPreferences; private debounceTime; constructor(config: SuprSend); private validateQueryParams; set data(value: PreferenceData); get data(): PreferenceData; getUrl(path: string, qp?: Dictionary): string; /** * Used to get user's whole preferences data. */ getPreferences(args?: IPreferenceConfig): Promise; /** * Used to get user's preference of all categories. */ getCategories(args?: { tenantId?: string; showOptOutChannels?: boolean; tags?: string | Dictionary; locale?: string; limit?: number; offset?: number; }): Promise; /** * Used to get user's preference of specific category. */ getCategory(category: string, args?: { tenantId?: string; showOptOutChannels?: boolean; locale?: string; }): Promise; /** * Used to get user's all channel level preference. */ getOverallChannelPreferences(args?: { tenantId?: string; }): Promise; private _updateCategoryPreferences; private _updateChannelPreferences; /** * Used to update user's category level preference. */ updateCategoryPreference(category: string, preference: PreferenceOptions, args?: IPreferenceConfig): Promise; /** * Used to update user's category level channel preference. */ updateChannelPreferenceInCategory(channel: string, preference: PreferenceOptions, category: string, args?: IPreferenceConfig): Promise; /** * Used to update user's channel level preference. */ updateOverallChannelPreference(channel: string, preference: ChannelLevelPreferenceOptions, args?: { tenantId?: string; }): Promise; }