/** * This file was generated by kysely-codegen. * Please do not edit it manually. */ import type { ColumnType } from 'kysely'; export type ArrayType = ArrayTypeImpl extends (infer U)[] ? U[] : ArrayTypeImpl; export type ArrayTypeImpl = T extends ColumnType ? ColumnType : T[]; export type AssetsStatusEnum = 'active' | 'deleted' | 'trashed'; export type Generated = T extends ColumnType ? ColumnType : ColumnType; export type Int8 = ColumnType; export type Json = JsonValue; export type JsonArray = JsonValue[]; export type JsonObject = { [x: string]: JsonValue | undefined; }; export type JsonPrimitive = boolean | number | string | null; export type JsonValue = JsonArray | JsonObject | JsonPrimitive; export type Sourcetype = 'exif' | 'machine-learning'; export type Timestamp = ColumnType; export interface Activity { albumId: string; assetId: string | null; comment: string | null; createdAt: Generated; id: Generated; isLiked: Generated; updatedAt: Generated; userId: string; } export interface Albums { albumName: Generated; /** * Asset ID to be used as thumbnail */ albumThumbnailAssetId: string | null; createdAt: Generated; deletedAt: Timestamp | null; description: Generated; id: Generated; isActivityEnabled: Generated; order: Generated; ownerId: string; updatedAt: Generated; } export interface AlbumsAssetsAssets { albumsId: string; assetsId: string; createdAt: Generated; } export interface AlbumsSharedUsersUsers { albumsId: string; role: Generated; usersId: string; } export interface ApiKeys { createdAt: Generated; id: Generated; key: string; name: string; permissions: string[]; updatedAt: Generated; userId: string; } export interface AssetFaces { assetId: string; boundingBoxX1: Generated; boundingBoxX2: Generated; boundingBoxY1: Generated; boundingBoxY2: Generated; id: Generated; imageHeight: Generated; imageWidth: Generated; personId: string | null; sourceType: Generated; } export interface AssetFiles { assetId: string; createdAt: Generated; id: Generated; path: string; type: string; updatedAt: Generated; } export interface AssetJobStatus { assetId: string; duplicatesDetectedAt: Timestamp | null; facesRecognizedAt: Timestamp | null; metadataExtractedAt: Timestamp | null; previewAt: Timestamp | null; thumbnailAt: Timestamp | null; } export interface Assets { checksum: Buffer; createdAt: Generated; deletedAt: Timestamp | null; deviceAssetId: string; deviceId: string; duplicateId: string | null; duration: string | null; encodedVideoPath: Generated; fileCreatedAt: Timestamp; fileModifiedAt: Timestamp; id: Generated; isArchived: Generated; isExternal: Generated; isFavorite: Generated; isOffline: Generated; isVisible: Generated; libraryId: string | null; livePhotoVideoId: string | null; localDateTime: Timestamp; originalFileName: string; originalPath: string; ownerId: string; sidecarPath: string | null; stackId: string | null; status: Generated; thumbhash: Buffer | null; type: string; updatedAt: Generated; } export interface AssetStack { id: Generated; ownerId: string; primaryAssetId: string; } export interface Audit { action: string; createdAt: Generated; entityId: string; entityType: string; id: Generated; ownerId: string; } export interface Exif { assetId: string; autoStackId: string | null; bitsPerSample: number | null; city: string | null; colorspace: string | null; country: string | null; dateTimeOriginal: Timestamp | null; description: Generated; exifImageHeight: number | null; exifImageWidth: number | null; exposureTime: string | null; fileSizeInByte: Int8 | null; fNumber: number | null; focalLength: number | null; fps: number | null; iso: number | null; latitude: number | null; lensModel: string | null; livePhotoCID: string | null; longitude: number | null; make: string | null; model: string | null; modifyDate: Timestamp | null; orientation: string | null; profileDescription: string | null; projectionType: string | null; rating: number | null; state: string | null; timeZone: string | null; } export interface FaceSearch { embedding: string; faceId: string; } export interface GeodataPlaces { admin1Code: string | null; admin1Name: string | null; admin2Code: string | null; admin2Name: string | null; alternateNames: string | null; countryCode: string; id: number; latitude: number; longitude: number; modificationDate: Timestamp; name: string; } export interface Libraries { createdAt: Generated; deletedAt: Timestamp | null; exclusionPatterns: string[]; id: Generated; importPaths: string[]; name: string; ownerId: string; refreshedAt: Timestamp | null; updatedAt: Generated; } export interface Memories { createdAt: Generated; data: Json; deletedAt: Timestamp | null; id: Generated; isSaved: Generated; memoryAt: Timestamp; ownerId: string; seenAt: Timestamp | null; type: string; updatedAt: Generated; } export interface MemoriesAssetsAssets { assetsId: string; memoriesId: string; } export interface Migrations { id: Generated; name: string; timestamp: Int8; } export interface MoveHistory { entityId: string; id: Generated; newPath: string; oldPath: string; pathType: string; } export interface NaturalearthCountries { admin: string; admin_a3: string; coordinates: string; id: number; type: string; } export interface Partners { createdAt: Generated; inTimeline: Generated; sharedById: string; sharedWithId: string; updatedAt: Generated; } export interface Person { birthDate: Timestamp | null; createdAt: Generated; faceAssetId: string | null; id: Generated; isHidden: Generated; name: Generated; ownerId: string; thumbnailPath: Generated; updatedAt: Generated; } export interface Sessions { createdAt: Generated; deviceOS: Generated; deviceType: Generated; id: Generated; token: string; updatedAt: Generated; userId: string; } export interface SharedLinkAsset { assetsId: string; sharedLinksId: string; } export interface SharedLinks { albumId: string | null; allowDownload: Generated; allowUpload: Generated; createdAt: Generated; description: string | null; expiresAt: Timestamp | null; id: Generated; key: Buffer; password: string | null; showExif: Generated; type: string; userId: string; } export interface SmartSearch { assetId: string; embedding: string; } export interface SocketIoAttachments { created_at: Generated; id: Generated; payload: Buffer | null; } export interface SystemConfig { key: string; value: string | null; } export interface SystemMetadata { key: string; value: Json; } export interface TagAsset { assetsId: string; tagsId: string; } export interface Tags { color: string | null; createdAt: Generated; id: Generated; parentId: string | null; updatedAt: Generated; userId: string; value: string; } export interface TagsClosure { id_ancestor: string; id_descendant: string; } export interface UserMetadata { key: string; userId: string; value: Json; } export interface Users { createdAt: Generated; deletedAt: Timestamp | null; email: string; id: Generated; isAdmin: Generated; name: Generated; oauthId: Generated; password: Generated; profileChangedAt: Generated; profileImagePath: Generated; quotaSizeInBytes: Int8 | null; quotaUsageInBytes: Generated; shouldChangePassword: Generated; status: Generated; storageLabel: string | null; updatedAt: Generated; } export interface VectorsPgVectorIndexStat { idx_growing: ArrayType | null; idx_indexing: boolean | null; idx_options: string | null; idx_sealed: ArrayType | null; idx_size: Int8 | null; idx_status: string | null; idx_tuples: Int8 | null; idx_write: Int8 | null; indexname: string | null; indexrelid: number | null; tablename: string | null; tablerelid: number | null; } export interface VersionHistory { createdAt: Generated; id: Generated; version: string; } export interface DB { activity: Activity; albums: Albums; albums_assets_assets: AlbumsAssetsAssets; albums_shared_users_users: AlbumsSharedUsersUsers; api_keys: ApiKeys; asset_faces: AssetFaces; asset_files: AssetFiles; asset_job_status: AssetJobStatus; asset_stack: AssetStack; assets: Assets; audit: Audit; exif: Exif; face_search: FaceSearch; geodata_places: GeodataPlaces; libraries: Libraries; memories: Memories; memories_assets_assets: MemoriesAssetsAssets; migrations: Migrations; move_history: MoveHistory; naturalearth_countries: NaturalearthCountries; partners: Partners; person: Person; sessions: Sessions; shared_link__asset: SharedLinkAsset; shared_links: SharedLinks; smart_search: SmartSearch; socket_io_attachments: SocketIoAttachments; system_config: SystemConfig; system_metadata: SystemMetadata; tag_asset: TagAsset; tags: Tags; tags_closure: TagsClosure; user_metadata: UserMetadata; users: Users; 'vectors.pg_vector_index_stat': VectorsPgVectorIndexStat; version_history: VersionHistory; }