Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ const DISCORD = ({
<BooleanWithDefault
defaultValue={defaults?.params?.splitlines}
label="Split Lines"
name={`${name}.params.splitlines}`}
name={`${name}.params.splitlines`}
tooltip={{
content: 'Whether to send each line as a separate embedded item',
type: 'string',
Expand Down
17 changes: 17 additions & 0 deletions web/ui/react-app/src/utils/api/types/config-edit/notify/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,11 @@ export const notifyDiscordSchema = notifyBaseSchema.extend({
.default({ token: '', webhookid: '' }),
});
export type NotifyDiscordSchema = z.infer<typeof notifyDiscordSchema>;
export const notifyDiscordSchemaOutgoing = notifyDiscordSchema.extend({
params: notifyDiscordSchema.shape.params.unwrap().extend({
splitlines: preprocessStringFromBoolean,
}),
});

/* SMTP */
export const notifySMTPSchema = notifyBaseSchema.extend({
Expand Down Expand Up @@ -174,6 +179,8 @@ export const notifySMTPSchemaOutgoing = notifySMTPSchema.extend({
params: notifySMTPSchema.shape.params.unwrap().extend({
auth: preprocessStringFromZodEnum(SMTPAuthEnum),
encryption: preprocessStringFromZodEnum(SMTPEncryptionEnum),
requirestarttls: preprocessStringFromBoolean,
skiptlsverification: preprocessStringFromBoolean,
usehtml: preprocessStringFromBoolean,
usestarttls: preprocessStringFromBoolean,
}),
Expand Down Expand Up @@ -228,6 +235,8 @@ export type NotifyGotifySchema = z.infer<typeof notifyGotifySchema>;
export const notifyGotifySchemaOutgoing = notifyGotifySchema.extend({
params: notifyGotifySchema.shape.params.unwrap().extend({
disabletls: preprocessStringFromBoolean,
insecureskipverify: preprocessStringFromBoolean,
useheader: preprocessStringFromBoolean,
}),
});

Expand Down Expand Up @@ -309,6 +318,11 @@ export const notifyMatterMostSchema = notifyBaseSchema.extend({
}),
});
export type NotifyMatterMostSchema = z.infer<typeof notifyMatterMostSchema>;
export const notifyMatterMostSchemaOutgoing = notifyMatterMostSchema.extend({
params: notifyMatterMostSchema.shape.params.unwrap().extend({
disabletls: preprocessStringFromBoolean,
}),
});

/* Matrix */
export const notifyMatrixSchema = notifyBaseSchema.extend({
Expand Down Expand Up @@ -698,8 +712,10 @@ export type NotifiersSchema = z.infer<typeof notifiersSchema>;
export const notifySchemaMapOutgoing = {
...notifySchemaMap,
bark: notifyBarkSchemaOutgoing,
discord: notifyDiscordSchemaOutgoing,
gotify: notifyGotifySchemaOutgoing,
matrix: notifyMatrixSchemaOutgoing,
mattermost: notifyMatterMostSchemaOutgoing,
smtp: notifySMTPSchemaOutgoing,
telegram: notifyTelegramSchemaOutgoing,
} as const;
Expand Down Expand Up @@ -762,6 +778,7 @@ export const notifySchemaMapOutgoingWithDefaults = (
defaults?.params?.actions,
),
cache: preprocessStringFromBoolean,
disabletls: preprocessStringFromBoolean,
firebase: preprocessStringFromBoolean,
priority: preprocessStringFromZodEnum(NtfyPriorityZodEnum),
scheme: preprocessStringFromZodEnum(NtfySchemeZodEnum),
Expand Down
Loading