1
0
mirror of https://github.com/immich-app/immich.git synced 2025-08-10 23:22:22 +02:00

chore(web): change license wording and other things (#11309)

This commit is contained in:
Alex
2024-07-26 10:34:35 -05:00
committed by GitHub
parent bc20710c6d
commit ef7a6bb246
40 changed files with 1045 additions and 518 deletions

View File

@@ -179,6 +179,8 @@ part 'model/person_statistics_response_dto.dart';
part 'model/person_update_dto.dart';
part 'model/person_with_faces_response_dto.dart';
part 'model/places_response_dto.dart';
part 'model/purchase_response.dart';
part 'model/purchase_update.dart';
part 'model/queue_status_dto.dart';
part 'model/reaction_level.dart';
part 'model/reaction_type.dart';

View File

@@ -416,6 +416,10 @@ class ApiClient {
return PersonWithFacesResponseDto.fromJson(value);
case 'PlacesResponseDto':
return PlacesResponseDto.fromJson(value);
case 'PurchaseResponse':
return PurchaseResponse.fromJson(value);
case 'PurchaseUpdate':
return PurchaseUpdate.fromJson(value);
case 'QueueStatusDto':
return QueueStatusDto.fromJson(value);
case 'ReactionLevel':

View File

@@ -0,0 +1,106 @@
//
// 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 PurchaseResponse {
/// Returns a new [PurchaseResponse] instance.
PurchaseResponse({
required this.hideBuyButtonUntil,
required this.showSupportBadge,
});
String hideBuyButtonUntil;
bool showSupportBadge;
@override
bool operator ==(Object other) => identical(this, other) || other is PurchaseResponse &&
other.hideBuyButtonUntil == hideBuyButtonUntil &&
other.showSupportBadge == showSupportBadge;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(hideBuyButtonUntil.hashCode) +
(showSupportBadge.hashCode);
@override
String toString() => 'PurchaseResponse[hideBuyButtonUntil=$hideBuyButtonUntil, showSupportBadge=$showSupportBadge]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'hideBuyButtonUntil'] = this.hideBuyButtonUntil;
json[r'showSupportBadge'] = this.showSupportBadge;
return json;
}
/// Returns a new [PurchaseResponse] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static PurchaseResponse? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
return PurchaseResponse(
hideBuyButtonUntil: mapValueOfType<String>(json, r'hideBuyButtonUntil')!,
showSupportBadge: mapValueOfType<bool>(json, r'showSupportBadge')!,
);
}
return null;
}
static List<PurchaseResponse> listFromJson(dynamic json, {bool growable = false,}) {
final result = <PurchaseResponse>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = PurchaseResponse.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, PurchaseResponse> mapFromJson(dynamic json) {
final map = <String, PurchaseResponse>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = PurchaseResponse.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of PurchaseResponse-objects as value to a dart map
static Map<String, List<PurchaseResponse>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<PurchaseResponse>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = PurchaseResponse.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'hideBuyButtonUntil',
'showSupportBadge',
};
}

View File

@@ -0,0 +1,124 @@
//
// 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 PurchaseUpdate {
/// Returns a new [PurchaseUpdate] instance.
PurchaseUpdate({
this.hideBuyButtonUntil,
this.showSupportBadge,
});
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
String? hideBuyButtonUntil;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
bool? showSupportBadge;
@override
bool operator ==(Object other) => identical(this, other) || other is PurchaseUpdate &&
other.hideBuyButtonUntil == hideBuyButtonUntil &&
other.showSupportBadge == showSupportBadge;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(hideBuyButtonUntil == null ? 0 : hideBuyButtonUntil!.hashCode) +
(showSupportBadge == null ? 0 : showSupportBadge!.hashCode);
@override
String toString() => 'PurchaseUpdate[hideBuyButtonUntil=$hideBuyButtonUntil, showSupportBadge=$showSupportBadge]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.hideBuyButtonUntil != null) {
json[r'hideBuyButtonUntil'] = this.hideBuyButtonUntil;
} else {
// json[r'hideBuyButtonUntil'] = null;
}
if (this.showSupportBadge != null) {
json[r'showSupportBadge'] = this.showSupportBadge;
} else {
// json[r'showSupportBadge'] = null;
}
return json;
}
/// Returns a new [PurchaseUpdate] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static PurchaseUpdate? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
return PurchaseUpdate(
hideBuyButtonUntil: mapValueOfType<String>(json, r'hideBuyButtonUntil'),
showSupportBadge: mapValueOfType<bool>(json, r'showSupportBadge'),
);
}
return null;
}
static List<PurchaseUpdate> listFromJson(dynamic json, {bool growable = false,}) {
final result = <PurchaseUpdate>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = PurchaseUpdate.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, PurchaseUpdate> mapFromJson(dynamic json) {
final map = <String, PurchaseUpdate>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = PurchaseUpdate.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of PurchaseUpdate-objects as value to a dart map
static Map<String, List<PurchaseUpdate>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<PurchaseUpdate>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = PurchaseUpdate.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
};
}

View File

@@ -17,6 +17,7 @@ class UserPreferencesResponseDto {
required this.download,
required this.emailNotifications,
required this.memories,
required this.purchase,
});
AvatarResponse avatar;
@@ -27,12 +28,15 @@ class UserPreferencesResponseDto {
MemoryResponse memories;
PurchaseResponse purchase;
@override
bool operator ==(Object other) => identical(this, other) || other is UserPreferencesResponseDto &&
other.avatar == avatar &&
other.download == download &&
other.emailNotifications == emailNotifications &&
other.memories == memories;
other.memories == memories &&
other.purchase == purchase;
@override
int get hashCode =>
@@ -40,10 +44,11 @@ class UserPreferencesResponseDto {
(avatar.hashCode) +
(download.hashCode) +
(emailNotifications.hashCode) +
(memories.hashCode);
(memories.hashCode) +
(purchase.hashCode);
@override
String toString() => 'UserPreferencesResponseDto[avatar=$avatar, download=$download, emailNotifications=$emailNotifications, memories=$memories]';
String toString() => 'UserPreferencesResponseDto[avatar=$avatar, download=$download, emailNotifications=$emailNotifications, memories=$memories, purchase=$purchase]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
@@ -51,6 +56,7 @@ class UserPreferencesResponseDto {
json[r'download'] = this.download;
json[r'emailNotifications'] = this.emailNotifications;
json[r'memories'] = this.memories;
json[r'purchase'] = this.purchase;
return json;
}
@@ -66,6 +72,7 @@ class UserPreferencesResponseDto {
download: DownloadResponse.fromJson(json[r'download'])!,
emailNotifications: EmailNotificationsResponse.fromJson(json[r'emailNotifications'])!,
memories: MemoryResponse.fromJson(json[r'memories'])!,
purchase: PurchaseResponse.fromJson(json[r'purchase'])!,
);
}
return null;
@@ -117,6 +124,7 @@ class UserPreferencesResponseDto {
'download',
'emailNotifications',
'memories',
'purchase',
};
}

View File

@@ -17,6 +17,7 @@ class UserPreferencesUpdateDto {
this.download,
this.emailNotifications,
this.memories,
this.purchase,
});
///
@@ -51,12 +52,21 @@ class UserPreferencesUpdateDto {
///
MemoryUpdate? memories;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
PurchaseUpdate? purchase;
@override
bool operator ==(Object other) => identical(this, other) || other is UserPreferencesUpdateDto &&
other.avatar == avatar &&
other.download == download &&
other.emailNotifications == emailNotifications &&
other.memories == memories;
other.memories == memories &&
other.purchase == purchase;
@override
int get hashCode =>
@@ -64,10 +74,11 @@ class UserPreferencesUpdateDto {
(avatar == null ? 0 : avatar!.hashCode) +
(download == null ? 0 : download!.hashCode) +
(emailNotifications == null ? 0 : emailNotifications!.hashCode) +
(memories == null ? 0 : memories!.hashCode);
(memories == null ? 0 : memories!.hashCode) +
(purchase == null ? 0 : purchase!.hashCode);
@override
String toString() => 'UserPreferencesUpdateDto[avatar=$avatar, download=$download, emailNotifications=$emailNotifications, memories=$memories]';
String toString() => 'UserPreferencesUpdateDto[avatar=$avatar, download=$download, emailNotifications=$emailNotifications, memories=$memories, purchase=$purchase]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
@@ -91,6 +102,11 @@ class UserPreferencesUpdateDto {
} else {
// json[r'memories'] = null;
}
if (this.purchase != null) {
json[r'purchase'] = this.purchase;
} else {
// json[r'purchase'] = null;
}
return json;
}
@@ -106,6 +122,7 @@ class UserPreferencesUpdateDto {
download: DownloadUpdate.fromJson(json[r'download']),
emailNotifications: EmailNotificationsUpdate.fromJson(json[r'emailNotifications']),
memories: MemoryUpdate.fromJson(json[r'memories']),
purchase: PurchaseUpdate.fromJson(json[r'purchase']),
);
}
return null;