mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
feat: Notification Email Templates (#13940)
This commit is contained in:
parent
4bf1b84cc2
commit
292182fa7f
32 changed files with 1136 additions and 105 deletions
10
mobile/openapi/lib/model/system_config_dto.dart
generated
10
mobile/openapi/lib/model/system_config_dto.dart
generated
|
|
@ -29,6 +29,7 @@ class SystemConfigDto {
|
|||
required this.reverseGeocoding,
|
||||
required this.server,
|
||||
required this.storageTemplate,
|
||||
required this.templates,
|
||||
required this.theme,
|
||||
required this.trash,
|
||||
required this.user,
|
||||
|
|
@ -66,6 +67,8 @@ class SystemConfigDto {
|
|||
|
||||
SystemConfigStorageTemplateDto storageTemplate;
|
||||
|
||||
SystemConfigTemplatesDto templates;
|
||||
|
||||
SystemConfigThemeDto theme;
|
||||
|
||||
SystemConfigTrashDto trash;
|
||||
|
|
@ -90,6 +93,7 @@ class SystemConfigDto {
|
|||
other.reverseGeocoding == reverseGeocoding &&
|
||||
other.server == server &&
|
||||
other.storageTemplate == storageTemplate &&
|
||||
other.templates == templates &&
|
||||
other.theme == theme &&
|
||||
other.trash == trash &&
|
||||
other.user == user;
|
||||
|
|
@ -113,12 +117,13 @@ class SystemConfigDto {
|
|||
(reverseGeocoding.hashCode) +
|
||||
(server.hashCode) +
|
||||
(storageTemplate.hashCode) +
|
||||
(templates.hashCode) +
|
||||
(theme.hashCode) +
|
||||
(trash.hashCode) +
|
||||
(user.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'SystemConfigDto[backup=$backup, ffmpeg=$ffmpeg, image=$image, job=$job, library_=$library_, logging=$logging, machineLearning=$machineLearning, map=$map, metadata=$metadata, newVersionCheck=$newVersionCheck, notifications=$notifications, oauth=$oauth, passwordLogin=$passwordLogin, reverseGeocoding=$reverseGeocoding, server=$server, storageTemplate=$storageTemplate, theme=$theme, trash=$trash, user=$user]';
|
||||
String toString() => 'SystemConfigDto[backup=$backup, ffmpeg=$ffmpeg, image=$image, job=$job, library_=$library_, logging=$logging, machineLearning=$machineLearning, map=$map, metadata=$metadata, newVersionCheck=$newVersionCheck, notifications=$notifications, oauth=$oauth, passwordLogin=$passwordLogin, reverseGeocoding=$reverseGeocoding, server=$server, storageTemplate=$storageTemplate, templates=$templates, theme=$theme, trash=$trash, user=$user]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
|
|
@ -138,6 +143,7 @@ class SystemConfigDto {
|
|||
json[r'reverseGeocoding'] = this.reverseGeocoding;
|
||||
json[r'server'] = this.server;
|
||||
json[r'storageTemplate'] = this.storageTemplate;
|
||||
json[r'templates'] = this.templates;
|
||||
json[r'theme'] = this.theme;
|
||||
json[r'trash'] = this.trash;
|
||||
json[r'user'] = this.user;
|
||||
|
|
@ -169,6 +175,7 @@ class SystemConfigDto {
|
|||
reverseGeocoding: SystemConfigReverseGeocodingDto.fromJson(json[r'reverseGeocoding'])!,
|
||||
server: SystemConfigServerDto.fromJson(json[r'server'])!,
|
||||
storageTemplate: SystemConfigStorageTemplateDto.fromJson(json[r'storageTemplate'])!,
|
||||
templates: SystemConfigTemplatesDto.fromJson(json[r'templates'])!,
|
||||
theme: SystemConfigThemeDto.fromJson(json[r'theme'])!,
|
||||
trash: SystemConfigTrashDto.fromJson(json[r'trash'])!,
|
||||
user: SystemConfigUserDto.fromJson(json[r'user'])!,
|
||||
|
|
@ -235,6 +242,7 @@ class SystemConfigDto {
|
|||
'reverseGeocoding',
|
||||
'server',
|
||||
'storageTemplate',
|
||||
'templates',
|
||||
'theme',
|
||||
'trash',
|
||||
'user',
|
||||
|
|
|
|||
115
mobile/openapi/lib/model/system_config_template_emails_dto.dart
generated
Normal file
115
mobile/openapi/lib/model/system_config_template_emails_dto.dart
generated
Normal file
|
|
@ -0,0 +1,115 @@
|
|||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
class SystemConfigTemplateEmailsDto {
|
||||
/// Returns a new [SystemConfigTemplateEmailsDto] instance.
|
||||
SystemConfigTemplateEmailsDto({
|
||||
required this.albumInviteTemplate,
|
||||
required this.albumUpdateTemplate,
|
||||
required this.welcomeTemplate,
|
||||
});
|
||||
|
||||
String albumInviteTemplate;
|
||||
|
||||
String albumUpdateTemplate;
|
||||
|
||||
String welcomeTemplate;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is SystemConfigTemplateEmailsDto &&
|
||||
other.albumInviteTemplate == albumInviteTemplate &&
|
||||
other.albumUpdateTemplate == albumUpdateTemplate &&
|
||||
other.welcomeTemplate == welcomeTemplate;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(albumInviteTemplate.hashCode) +
|
||||
(albumUpdateTemplate.hashCode) +
|
||||
(welcomeTemplate.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'SystemConfigTemplateEmailsDto[albumInviteTemplate=$albumInviteTemplate, albumUpdateTemplate=$albumUpdateTemplate, welcomeTemplate=$welcomeTemplate]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'albumInviteTemplate'] = this.albumInviteTemplate;
|
||||
json[r'albumUpdateTemplate'] = this.albumUpdateTemplate;
|
||||
json[r'welcomeTemplate'] = this.welcomeTemplate;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [SystemConfigTemplateEmailsDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static SystemConfigTemplateEmailsDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "SystemConfigTemplateEmailsDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return SystemConfigTemplateEmailsDto(
|
||||
albumInviteTemplate: mapValueOfType<String>(json, r'albumInviteTemplate')!,
|
||||
albumUpdateTemplate: mapValueOfType<String>(json, r'albumUpdateTemplate')!,
|
||||
welcomeTemplate: mapValueOfType<String>(json, r'welcomeTemplate')!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<SystemConfigTemplateEmailsDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <SystemConfigTemplateEmailsDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = SystemConfigTemplateEmailsDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, SystemConfigTemplateEmailsDto> mapFromJson(dynamic json) {
|
||||
final map = <String, SystemConfigTemplateEmailsDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = SystemConfigTemplateEmailsDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of SystemConfigTemplateEmailsDto-objects as value to a dart map
|
||||
static Map<String, List<SystemConfigTemplateEmailsDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<SystemConfigTemplateEmailsDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = SystemConfigTemplateEmailsDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'albumInviteTemplate',
|
||||
'albumUpdateTemplate',
|
||||
'welcomeTemplate',
|
||||
};
|
||||
}
|
||||
|
||||
99
mobile/openapi/lib/model/system_config_templates_dto.dart
generated
Normal file
99
mobile/openapi/lib/model/system_config_templates_dto.dart
generated
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
class SystemConfigTemplatesDto {
|
||||
/// Returns a new [SystemConfigTemplatesDto] instance.
|
||||
SystemConfigTemplatesDto({
|
||||
required this.email,
|
||||
});
|
||||
|
||||
SystemConfigTemplateEmailsDto email;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is SystemConfigTemplatesDto &&
|
||||
other.email == email;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(email.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'SystemConfigTemplatesDto[email=$email]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'email'] = this.email;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [SystemConfigTemplatesDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static SystemConfigTemplatesDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "SystemConfigTemplatesDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return SystemConfigTemplatesDto(
|
||||
email: SystemConfigTemplateEmailsDto.fromJson(json[r'email'])!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<SystemConfigTemplatesDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <SystemConfigTemplatesDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = SystemConfigTemplatesDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, SystemConfigTemplatesDto> mapFromJson(dynamic json) {
|
||||
final map = <String, SystemConfigTemplatesDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = SystemConfigTemplatesDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of SystemConfigTemplatesDto-objects as value to a dart map
|
||||
static Map<String, List<SystemConfigTemplatesDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<SystemConfigTemplatesDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = SystemConfigTemplatesDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'email',
|
||||
};
|
||||
}
|
||||
|
||||
99
mobile/openapi/lib/model/template_dto.dart
generated
Normal file
99
mobile/openapi/lib/model/template_dto.dart
generated
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
class TemplateDto {
|
||||
/// Returns a new [TemplateDto] instance.
|
||||
TemplateDto({
|
||||
required this.template,
|
||||
});
|
||||
|
||||
String template;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is TemplateDto &&
|
||||
other.template == template;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(template.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'TemplateDto[template=$template]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'template'] = this.template;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [TemplateDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static TemplateDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "TemplateDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return TemplateDto(
|
||||
template: mapValueOfType<String>(json, r'template')!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<TemplateDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <TemplateDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = TemplateDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, TemplateDto> mapFromJson(dynamic json) {
|
||||
final map = <String, TemplateDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = TemplateDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of TemplateDto-objects as value to a dart map
|
||||
static Map<String, List<TemplateDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<TemplateDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = TemplateDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'template',
|
||||
};
|
||||
}
|
||||
|
||||
107
mobile/openapi/lib/model/template_response_dto.dart
generated
Normal file
107
mobile/openapi/lib/model/template_response_dto.dart
generated
Normal file
|
|
@ -0,0 +1,107 @@
|
|||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.18
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
class TemplateResponseDto {
|
||||
/// Returns a new [TemplateResponseDto] instance.
|
||||
TemplateResponseDto({
|
||||
required this.html,
|
||||
required this.name,
|
||||
});
|
||||
|
||||
String html;
|
||||
|
||||
String name;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is TemplateResponseDto &&
|
||||
other.html == html &&
|
||||
other.name == name;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(html.hashCode) +
|
||||
(name.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'TemplateResponseDto[html=$html, name=$name]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'html'] = this.html;
|
||||
json[r'name'] = this.name;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [TemplateResponseDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static TemplateResponseDto? fromJson(dynamic value) {
|
||||
upgradeDto(value, "TemplateResponseDto");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return TemplateResponseDto(
|
||||
html: mapValueOfType<String>(json, r'html')!,
|
||||
name: mapValueOfType<String>(json, r'name')!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<TemplateResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <TemplateResponseDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = TemplateResponseDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, TemplateResponseDto> mapFromJson(dynamic json) {
|
||||
final map = <String, TemplateResponseDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = TemplateResponseDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of TemplateResponseDto-objects as value to a dart map
|
||||
static Map<String, List<TemplateResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<TemplateResponseDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = TemplateResponseDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'html',
|
||||
'name',
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue