mirror of
				https://github.com/immich-app/immich.git
				synced 2025-10-31 20:07:41 +09:00 
			
		
		
		
	feat(server): add memories statistics resource (#19035)
This commit is contained in:
		| @@ -742,6 +742,9 @@ export type MemoryCreateDto = { | ||||
|     seenAt?: string; | ||||
|     "type": MemoryType; | ||||
| }; | ||||
| export type MemoryStatisticsResponseDto = { | ||||
|     total: number; | ||||
| }; | ||||
| export type MemoryUpdateDto = { | ||||
|     isSaved?: boolean; | ||||
|     memoryAt?: string; | ||||
| @@ -2509,6 +2512,24 @@ export function createMemory({ memoryCreateDto }: { | ||||
|         body: memoryCreateDto | ||||
|     }))); | ||||
| } | ||||
| export function memoriesStatistics({ $for, isSaved, isTrashed, $type }: { | ||||
|     $for?: string; | ||||
|     isSaved?: boolean; | ||||
|     isTrashed?: boolean; | ||||
|     $type?: MemoryType; | ||||
| }, opts?: Oazapfts.RequestOpts) { | ||||
|     return oazapfts.ok(oazapfts.fetchJson<{ | ||||
|         status: 200; | ||||
|         data: MemoryStatisticsResponseDto; | ||||
|     }>(`/memories/statistics${QS.query(QS.explode({ | ||||
|         "for": $for, | ||||
|         isSaved, | ||||
|         isTrashed, | ||||
|         "type": $type | ||||
|     }))}`, { | ||||
|         ...opts | ||||
|     })); | ||||
| } | ||||
| export function deleteMemory({ id }: { | ||||
|     id: string; | ||||
| }, opts?: Oazapfts.RequestOpts) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user