1
0
mirror of https://github.com/immich-app/immich.git synced 2025-07-17 15:47:54 +02:00

feat: persistent memories (#15953)

feat: memories

refactor

chore: use heart as favorite icon

fix: linting
This commit is contained in:
Jason Rasmussen
2025-02-21 13:31:37 -05:00
committed by GitHub
parent 502f6e020d
commit d350022dec
29 changed files with 585 additions and 70 deletions

View File

@ -262,7 +262,16 @@ class MemoriesApi {
}
/// Performs an HTTP 'GET /memories' operation and returns the [Response].
Future<Response> searchMemoriesWithHttpInfo() async {
/// Parameters:
///
/// * [DateTime] for_:
///
/// * [bool] isSaved:
///
/// * [bool] isTrashed:
///
/// * [MemoryType] type:
Future<Response> searchMemoriesWithHttpInfo({ DateTime? for_, bool? isSaved, bool? isTrashed, MemoryType? type, }) async {
// ignore: prefer_const_declarations
final path = r'/memories';
@ -273,6 +282,19 @@ class MemoriesApi {
final headerParams = <String, String>{};
final formParams = <String, String>{};
if (for_ != null) {
queryParams.addAll(_queryParams('', 'for', for_));
}
if (isSaved != null) {
queryParams.addAll(_queryParams('', 'isSaved', isSaved));
}
if (isTrashed != null) {
queryParams.addAll(_queryParams('', 'isTrashed', isTrashed));
}
if (type != null) {
queryParams.addAll(_queryParams('', 'type', type));
}
const contentTypes = <String>[];
@ -287,8 +309,17 @@ class MemoriesApi {
);
}
Future<List<MemoryResponseDto>?> searchMemories() async {
final response = await searchMemoriesWithHttpInfo();
/// Parameters:
///
/// * [DateTime] for_:
///
/// * [bool] isSaved:
///
/// * [bool] isTrashed:
///
/// * [MemoryType] type:
Future<List<MemoryResponseDto>?> searchMemories({ DateTime? for_, bool? isSaved, bool? isTrashed, MemoryType? type, }) async {
final response = await searchMemoriesWithHttpInfo( for_: for_, isSaved: isSaved, isTrashed: isTrashed, type: type, );
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}