You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-07-01 05:35:03 +02:00
feat: Notification Email Templates (#13940)
This commit is contained in:
@ -634,6 +634,13 @@ export type MemoryUpdateDto = {
|
||||
memoryAt?: string;
|
||||
seenAt?: string;
|
||||
};
|
||||
export type TemplateDto = {
|
||||
template: string;
|
||||
};
|
||||
export type TemplateResponseDto = {
|
||||
html: string;
|
||||
name: string;
|
||||
};
|
||||
export type SystemConfigSmtpTransportDto = {
|
||||
host: string;
|
||||
ignoreCert: boolean;
|
||||
@ -1232,6 +1239,14 @@ export type SystemConfigStorageTemplateDto = {
|
||||
hashVerificationEnabled: boolean;
|
||||
template: string;
|
||||
};
|
||||
export type SystemConfigTemplateEmailsDto = {
|
||||
albumInviteTemplate: string;
|
||||
albumUpdateTemplate: string;
|
||||
welcomeTemplate: string;
|
||||
};
|
||||
export type SystemConfigTemplatesDto = {
|
||||
email: SystemConfigTemplateEmailsDto;
|
||||
};
|
||||
export type SystemConfigThemeDto = {
|
||||
customCss: string;
|
||||
};
|
||||
@ -1259,6 +1274,7 @@ export type SystemConfigDto = {
|
||||
reverseGeocoding: SystemConfigReverseGeocodingDto;
|
||||
server: SystemConfigServerDto;
|
||||
storageTemplate: SystemConfigStorageTemplateDto;
|
||||
templates: SystemConfigTemplatesDto;
|
||||
theme: SystemConfigThemeDto;
|
||||
trash: SystemConfigTrashDto;
|
||||
user: SystemConfigUserDto;
|
||||
@ -2227,6 +2243,19 @@ export function addMemoryAssets({ id, bulkIdsDto }: {
|
||||
body: bulkIdsDto
|
||||
})));
|
||||
}
|
||||
export function getNotificationTemplate({ name, templateDto }: {
|
||||
name: string;
|
||||
templateDto: TemplateDto;
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 200;
|
||||
data: TemplateResponseDto;
|
||||
}>(`/notifications/templates/${encodeURIComponent(name)}`, oazapfts.json({
|
||||
...opts,
|
||||
method: "POST",
|
||||
body: templateDto
|
||||
})));
|
||||
}
|
||||
export function sendTestEmail({ systemConfigSmtpDto }: {
|
||||
systemConfigSmtpDto: SystemConfigSmtpDto;
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
|
Reference in New Issue
Block a user