Add comments for clarity in notification configuration types.
Signed-off-by: Henrik Edegård <henrik.edegard@fortnox.se>
This commit is contained in:
+15
@@ -33,6 +33,9 @@ export interface Config {
|
||||
*/
|
||||
defaultSettings?: {
|
||||
channels?: {
|
||||
/**
|
||||
* Channel identifier (e.g., 'Web', 'Email')
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Optional flag to enable/disable the channel by default.
|
||||
@@ -42,10 +45,22 @@ export interface Config {
|
||||
*/
|
||||
enabled?: boolean;
|
||||
origins?: {
|
||||
/**
|
||||
* Origin identifier (e.g., 'plugin:catalog', 'external:jenkins')
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Whether notifications from this origin are enabled by default
|
||||
*/
|
||||
enabled: boolean;
|
||||
topics?: {
|
||||
/**
|
||||
* Topic identifier (e.g., 'entity-refresh', 'build-failure')
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Whether notifications for this topic are enabled by default
|
||||
*/
|
||||
enabled: boolean;
|
||||
}[];
|
||||
}[];
|
||||
|
||||
@@ -136,7 +136,13 @@ export type NotificationProcessorFilters = {
|
||||
* @public
|
||||
*/
|
||||
export type TopicSetting = {
|
||||
/**
|
||||
* Topic identifier
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Whether notifications for this topic are enabled
|
||||
*/
|
||||
enabled: boolean;
|
||||
};
|
||||
|
||||
@@ -144,8 +150,17 @@ export type TopicSetting = {
|
||||
* @public
|
||||
*/
|
||||
export type OriginSetting = {
|
||||
/**
|
||||
* Origin identifier
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Whether notifications from this origin are enabled
|
||||
*/
|
||||
enabled: boolean;
|
||||
/**
|
||||
* Optional array of topic-specific settings
|
||||
*/
|
||||
topics?: TopicSetting[];
|
||||
};
|
||||
|
||||
@@ -153,6 +168,9 @@ export type OriginSetting = {
|
||||
* @public
|
||||
*/
|
||||
export type ChannelSetting = {
|
||||
/**
|
||||
* Channel identifier
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Optional flag to enable/disable the channel by default.
|
||||
@@ -160,6 +178,9 @@ export type ChannelSetting = {
|
||||
* When set to false, the channel uses an opt-in strategy.
|
||||
*/
|
||||
enabled?: boolean;
|
||||
/**
|
||||
* Array of origin settings for this channel
|
||||
*/
|
||||
origins: OriginSetting[];
|
||||
};
|
||||
|
||||
@@ -167,5 +188,8 @@ export type ChannelSetting = {
|
||||
* @public
|
||||
*/
|
||||
export type NotificationSettings = {
|
||||
/**
|
||||
* Array of channel settings
|
||||
*/
|
||||
channels: ChannelSetting[];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user