mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
Merge branch 'main' of https://github.com/immich-app/immich into feat/sidecar-asset-files
This commit is contained in:
@@ -144,6 +144,7 @@ const sessionFactory = (session: Partial<Session> = {}) => ({
|
||||
userId: newUuid(),
|
||||
pinExpiresAt: newDate(),
|
||||
isPendingSyncReset: false,
|
||||
appVersion: session.appVersion ?? null,
|
||||
...session,
|
||||
});
|
||||
|
||||
@@ -324,10 +325,44 @@ const assetSidecarWriteFactory = (asset: Partial<SidecarWriteAsset> = {}) => ({
|
||||
...asset,
|
||||
});
|
||||
|
||||
const assetOcrFactory = (
|
||||
ocr: {
|
||||
id?: string;
|
||||
assetId?: string;
|
||||
x1?: number;
|
||||
y1?: number;
|
||||
x2?: number;
|
||||
y2?: number;
|
||||
x3?: number;
|
||||
y3?: number;
|
||||
x4?: number;
|
||||
y4?: number;
|
||||
boxScore?: number;
|
||||
textScore?: number;
|
||||
text?: string;
|
||||
} = {},
|
||||
) => ({
|
||||
id: newUuid(),
|
||||
assetId: newUuid(),
|
||||
x1: 0.1,
|
||||
y1: 0.2,
|
||||
x2: 0.3,
|
||||
y2: 0.2,
|
||||
x3: 0.3,
|
||||
y3: 0.4,
|
||||
x4: 0.1,
|
||||
y4: 0.4,
|
||||
boxScore: 0.95,
|
||||
textScore: 0.92,
|
||||
text: 'Sample Text',
|
||||
...ocr,
|
||||
});
|
||||
|
||||
export const factory = {
|
||||
activity: activityFactory,
|
||||
apiKey: apiKeyFactory,
|
||||
asset: assetFactory,
|
||||
assetOcr: assetOcrFactory,
|
||||
auth: authFactory,
|
||||
authApiKey: authApiKeyFactory,
|
||||
authUser: authUserFactory,
|
||||
|
||||
Reference in New Issue
Block a user