refactor: memory stub (#16704)

This commit is contained in:
Jason Rasmussen 2025-03-07 16:03:34 -05:00 committed by GitHub
parent b0bf4e4fff
commit ce74f765b1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 218 additions and 116 deletions

View file

@ -1,5 +1,5 @@
import { sql } from 'kysely';
import { Permission } from 'src/enum';
import { AssetStatus, AssetType, Permission } from 'src/enum';
export type AuthUser = {
id: string;
@ -23,6 +23,38 @@ export type User = {
profileChangedAt: Date;
};
export type Asset = {
createdAt: Date;
updatedAt: Date;
deletedAt: Date | null;
id: string;
updateId: string;
status: AssetStatus;
checksum: Buffer<ArrayBufferLike>;
deviceAssetId: string;
deviceId: string;
duplicateId: string | null;
duration: string | null;
encodedVideoPath: string | null;
fileCreatedAt: Date | null;
fileModifiedAt: Date | null;
isArchived: boolean;
isExternal: boolean;
isFavorite: boolean;
isOffline: boolean;
isVisible: boolean;
libraryId: string | null;
livePhotoVideoId: string | null;
localDateTime: Date | null;
originalFileName: string;
originalPath: string;
ownerId: string;
sidecarPath: string | null;
stackId: string | null;
thumbhash: Buffer<ArrayBufferLike> | null;
type: AssetType;
};
export type AuthSharedLink = {
id: string;
expiresAt: Date | null;