Sending Notifications
enum NotificationService {
email = "email",
push = "push"
}
interface NotificationContentMail {
service: NotificationService.email;
text?: string;
html?: string;
subject?: string;
template?: string;
from?: {
name: string;
email: string;
};
}
interface NotificationContentPush {
service: NotificationService.push;
title: string;
text: string;
data?: object;
sound?: "default" | string;
}
enum NotificationUserType {
company = "company",
influencer = "influencer"
}
interface NotificationRequest {
userType: NotificationUserType;
userID: number;
content: Array<NotificationContentMail | NotificationContentPush>;
variables?: object;
}
interface NotificationResponse {
success: boolean;
message: string;
}Last updated