mirror of
https://github.com/immich-app/immich.git
synced 2025-05-24 01:12:58 -04:00
chore: replace generated enums with actual types (#17463)
This commit is contained in:
parent
b6c5a03533
commit
2c31a11e41
10
server/src/db.d.ts
vendored
10
server/src/db.d.ts
vendored
@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
import type { ColumnType } from 'kysely';
|
||||
import { AssetFileType, AssetType, MemoryType, Permission, SyncEntityType } from 'src/enum';
|
||||
import { AssetFileType, AssetStatus, AssetType, MemoryType, Permission, SourceType, SyncEntityType } from 'src/enum';
|
||||
import { UserTable } from 'src/schema/tables/user.table';
|
||||
import { OnThisDayData } from 'src/types';
|
||||
|
||||
@ -12,8 +12,6 @@ export type ArrayType<T> = ArrayTypeImpl<T> extends (infer U)[] ? U[] : ArrayTyp
|
||||
|
||||
export type ArrayTypeImpl<T> = T extends ColumnType<infer S, infer I, infer U> ? ColumnType<S[], I[], U[]> : T[];
|
||||
|
||||
export type AssetsStatusEnum = 'active' | 'deleted' | 'trashed';
|
||||
|
||||
export type Generated<T> =
|
||||
T extends ColumnType<infer S, infer I, infer U> ? ColumnType<S, I | undefined, U> : ColumnType<T, T | undefined, T>;
|
||||
|
||||
@ -31,8 +29,6 @@ export type JsonPrimitive = boolean | number | string | null;
|
||||
|
||||
export type JsonValue = JsonArray | JsonObject | JsonPrimitive;
|
||||
|
||||
export type Sourcetype = 'exif' | 'machine-learning' | 'manual';
|
||||
|
||||
export type Timestamp = ColumnType<Date, Date | string, Date | string>;
|
||||
|
||||
export interface Activity {
|
||||
@ -98,7 +94,7 @@ export interface AssetFaces {
|
||||
imageHeight: Generated<number>;
|
||||
imageWidth: Generated<number>;
|
||||
personId: string | null;
|
||||
sourceType: Generated<Sourcetype>;
|
||||
sourceType: Generated<SourceType>;
|
||||
}
|
||||
|
||||
export interface AssetFiles {
|
||||
@ -152,7 +148,7 @@ export interface Assets {
|
||||
ownerId: string;
|
||||
sidecarPath: string | null;
|
||||
stackId: string | null;
|
||||
status: Generated<AssetsStatusEnum>;
|
||||
status: Generated<AssetStatus>;
|
||||
thumbhash: Buffer | null;
|
||||
type: AssetType;
|
||||
updatedAt: Generated<Timestamp>;
|
||||
|
Loading…
x
Reference in New Issue
Block a user