refactor: orientation

This commit is contained in:
Jason Rasmussen
2024-09-19 11:26:54 -04:00
parent 0b02fda4e0
commit 8af7a9c1b9
13 changed files with 230 additions and 46 deletions

View File

@@ -195,7 +195,7 @@ export type ExifResponseDto = {
make?: string | null;
model?: string | null;
modifyDate?: string | null;
orientation?: string | null;
orientation?: Orientation | null;
projectionType?: string | null;
rating?: number | null;
state?: string | null;
@@ -3266,6 +3266,16 @@ export enum AlbumUserRole {
Editor = "editor",
Viewer = "viewer"
}
export enum Orientation {
$1 = 1,
$2 = 2,
$8 = 8,
$7 = 7,
$3 = 3,
$4 = 4,
$6 = 6,
$5 = 5
}
export enum SourceType {
MachineLearning = "machine-learning",
Exif = "exif"

View File

@@ -1,4 +1,5 @@
import { defaults } from './fetch-client.js';
export { Orientation as LameGeneratedOrientation } from './fetch-client.js';
export * from './fetch-client.js';
export * from './fetch-errors.js';
@@ -8,6 +9,17 @@ export interface InitOptions {
apiKey: string;
}
export enum Orientation {
Rotate0 = 1,
Rotate0Mirrored = 2,
Rotate90 = 8,
Rotate90Mirrored = 7,
Rotate180 = 3,
Rotate180Mirrored = 4,
Rotate270 = 6,
Rotate270Mirrored = 5,
}
export const init = ({ baseUrl, apiKey }: InitOptions) => {
setBaseUrl(baseUrl);
setApiKey(apiKey);