idea-toolbox
Version:
IDEA's utility functions
66 lines (65 loc) • 1.77 kB
TypeScript
import { Resource } from './resource.model';
import { markdown } from './markdown';
/**
* An object to pass to SNS topics that manage notifications.
*/
export declare class Notification extends Resource {
/**
* The project from which we fire the notification.
*/
project: string;
/**
* A brief description of the notification.
*/
subject: string;
/**
* The content of the notification.
*/
content: markdown;
/**
* The id of the team owner of the notification. Useful for branded notifications.
*/
teamId?: string;
/**
* The id of the user receiver.
* Either userId or email must be set.
*/
userId?: string;
/**
* In case the user doesn't exist (!userId), the email address to which send an email notification.
* Either email or userId must be set.
*/
email?: string;
/**
* If set, an email notification is preferred to any other channel.
*/
forceEmail?: boolean;
/**
* The event that triggered the notification; useful to gather specific notification preferences.
*/
event?: string;
load(x: any): void;
}
/**
* The interface for the preferences of notification (based on different events) of an IDEA project.
*/
export interface NotificationPreferences {
/**
* The map of events with their notification preferences.
*/
[event: string]: EventNotificationPreference;
}
/**
* Preferences for receiving notifications after a specific event.
*/
export declare class EventNotificationPreference extends Resource {
/**
* Whether to receive an email.
*/
email: boolean;
/**
* Whether to receive a push notification.
*/
push: boolean;
load(x?: any): void;
}