import { AssetEntity, AssetType } from '@app/infra/entities'; import { Paginated, PaginationOptions } from '../domain.util'; export interface AssetSearchOptions { isVisible?: boolean; type?: AssetType; } export interface LivePhotoSearchOptions { ownerId: string; livePhotoCID: string; otherAssetId: string; type: AssetType; } export interface MapMarkerSearchOptions { isFavorite?: boolean; } export interface MapMarker { id: string; lat: number; lon: number; } export enum WithoutProperty { THUMBNAIL = 'thumbnail', ENCODED_VIDEO = 'encoded-video', EXIF = 'exif', CLIP_ENCODING = 'clip-embedding', OBJECT_TAGS = 'object-tags', FACES = 'faces', SIDECAR = 'sidecar', } export enum WithProperty { SIDECAR = 'sidecar', } export const IAssetRepository = 'IAssetRepository'; export interface IAssetRepository { getByIds(ids: string[]): Promise; getWithout(pagination: PaginationOptions, property: WithoutProperty): Paginated; getWith(pagination: PaginationOptions, property: WithProperty): Paginated; getFirstAssetForAlbumId(albumId: string): Promise; deleteAll(ownerId: string): Promise; getAll(pagination: PaginationOptions, options?: AssetSearchOptions): Paginated; save(asset: Partial): Promise; findLivePhotoMatch(options: LivePhotoSearchOptions): Promise; getMapMarkers(ownerId: string, options?: MapMarkerSearchOptions): Promise; }