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 Parameter | Default type |
|---|---|
P extends TemplateOptions | any |
Parameters ​
| Parameter | Type |
|---|---|
code | string |
Returns ​
has() ​
ts
static has(code): boolean;Parameters ​
| Parameter | Type |
|---|---|
code | string |
Returns ​
boolean
isTypeMandatory() ​
ts
static isTypeMandatory(type): boolean;Checks whether a given notification type is marked as mandatory.
Parameters ​
| Parameter | Type | Description |
|---|---|---|
type | NotificationTypes | The 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 ​
| Parameter | Type |
|---|---|
type | NotificationType<P> |
Returns ​
void