mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
chore(server): rename domain repositories -> interfaces (#8147)
rename domain repositories
This commit is contained in:
parent
44ed1f0919
commit
b588a87d4a
155 changed files with 385 additions and 390 deletions
47
server/src/interfaces/metadata.interface.ts
Normal file
47
server/src/interfaces/metadata.interface.ts
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
import { BinaryField, Tags } from 'exiftool-vendored';
|
||||
|
||||
export const IMetadataRepository = 'IMetadataRepository';
|
||||
|
||||
export interface GeoPoint {
|
||||
latitude: number;
|
||||
longitude: number;
|
||||
}
|
||||
|
||||
export interface ReverseGeocodeResult {
|
||||
country: string | null;
|
||||
state: string | null;
|
||||
city: string | null;
|
||||
}
|
||||
|
||||
export interface ExifDuration {
|
||||
Value: number;
|
||||
Scale?: number;
|
||||
}
|
||||
|
||||
export interface ImmichTags extends Omit<Tags, 'FocalLength' | 'Duration'> {
|
||||
ContentIdentifier?: string;
|
||||
MotionPhoto?: number;
|
||||
MotionPhotoVersion?: number;
|
||||
MotionPhotoPresentationTimestampUs?: number;
|
||||
MediaGroupUUID?: string;
|
||||
ImagePixelDepth?: string;
|
||||
FocalLength?: number;
|
||||
Duration?: number | string | ExifDuration;
|
||||
EmbeddedVideoType?: string;
|
||||
EmbeddedVideoFile?: BinaryField;
|
||||
MotionPhotoVideo?: BinaryField;
|
||||
}
|
||||
|
||||
export interface IMetadataRepository {
|
||||
init(): Promise<void>;
|
||||
teardown(): Promise<void>;
|
||||
reverseGeocode(point: GeoPoint): Promise<ReverseGeocodeResult | null>;
|
||||
readTags(path: string): Promise<ImmichTags | null>;
|
||||
writeTags(path: string, tags: Partial<Tags>): Promise<void>;
|
||||
extractBinaryTag(tagName: string, path: string): Promise<Buffer>;
|
||||
getCountries(userId: string): Promise<string[]>;
|
||||
getStates(userId: string, country?: string): Promise<string[]>;
|
||||
getCities(userId: string, country?: string, state?: string): Promise<string[]>;
|
||||
getCameraMakes(userId: string, model?: string): Promise<string[]>;
|
||||
getCameraModels(userId: string, make?: string): Promise<string[]>;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue