Skip to content

SudoSOS Back-end API / notifications / NotificationTypeRegistry

Class: NotificationTypeRegistry ​

Constructors ​

Constructor ​

ts
new NotificationTypeRegistry(): NotificationTypeRegistry;

Returns ​

NotificationTypeRegistry

Methods ​

get() ​

ts
static get<P>(code): NotificationType<P>;

Type Parameters ​

Type ParameterDefault type
P extends TemplateOptionsany

Parameters ​

ParameterType
codestring

Returns ​

NotificationType<P>


has() ​

ts
static has(code): boolean;

Parameters ​

ParameterType
codestring

Returns ​

boolean


isTypeMandatory() ​

ts
static isTypeMandatory(type): boolean;

Checks whether a given notification type is marked as mandatory.

Parameters ​

ParameterTypeDescription
typeNotificationTypesThe notification type to check.

Returns ​

boolean

True if the notification type is mandatory; otherwise, false.


list() ​

ts
static list(): Map<string, NotificationType<any>>;

Returns ​

Map<string, NotificationType<any>>


register() ​

ts
static register<P>(type): void;

Type Parameters ​

Type Parameter
P extends TemplateOptions

Parameters ​

ParameterType
typeNotificationType<P>

Returns ​

void