2025-04-18 23:10:34 +02:00
|
|
|
import { AssetFace, AssetFile, Exif } from 'src/database';
|
|
|
|
import { MapAsset } from 'src/dtos/asset-response.dto';
|
2025-05-06 12:12:48 -05:00
|
|
|
import { AssetFileType, AssetStatus, AssetType, AssetVisibility } from 'src/enum';
|
2025-03-07 14:30:01 -05:00
|
|
|
import { StorageAsset } from 'src/types';
|
2024-03-20 19:32:04 +01:00
|
|
|
import { authStub } from 'test/fixtures/auth.stub';
|
|
|
|
import { fileStub } from 'test/fixtures/file.stub';
|
|
|
|
import { userStub } from 'test/fixtures/user.stub';
|
2023-07-31 21:28:07 -04:00
|
|
|
|
2025-04-11 14:44:45 -04:00
|
|
|
export const previewFile: AssetFile = {
|
2024-08-19 20:03:33 -04:00
|
|
|
id: 'file-1',
|
2025-07-15 14:50:13 -04:00
|
|
|
type: AssetFileType.Preview,
|
2024-08-19 20:03:33 -04:00
|
|
|
path: '/uploads/user-id/thumbs/path.jpg',
|
|
|
|
};
|
|
|
|
|
2025-04-10 13:26:27 -04:00
|
|
|
const thumbnailFile: AssetFile = {
|
2024-08-19 20:03:33 -04:00
|
|
|
id: 'file-2',
|
2025-07-15 14:50:13 -04:00
|
|
|
type: AssetFileType.Thumbnail,
|
2024-08-19 20:03:33 -04:00
|
|
|
path: '/uploads/user-id/webp/path.ext',
|
|
|
|
};
|
|
|
|
|
2025-04-10 13:26:27 -04:00
|
|
|
const fullsizeFile: AssetFile = {
|
2025-04-01 18:11:46 -04:00
|
|
|
id: 'file-3',
|
2025-07-15 14:50:13 -04:00
|
|
|
type: AssetFileType.FullSize,
|
2025-04-01 18:11:46 -04:00
|
|
|
path: '/uploads/user-id/fullsize/path.webp',
|
|
|
|
};
|
|
|
|
|
2025-04-10 13:26:27 -04:00
|
|
|
const files: AssetFile[] = [fullsizeFile, previewFile, thumbnailFile];
|
2024-08-19 20:03:33 -04:00
|
|
|
|
2025-04-18 23:10:34 +02:00
|
|
|
export const stackStub = (stackId: string, assets: (MapAsset & { exifInfo: Exif })[]) => {
|
2024-01-27 18:52:14 +00:00
|
|
|
return {
|
|
|
|
id: stackId,
|
2024-08-30 14:38:53 -04:00
|
|
|
assets,
|
2024-07-05 16:16:53 -04:00
|
|
|
ownerId: assets[0].ownerId,
|
2024-01-27 18:52:14 +00:00
|
|
|
primaryAsset: assets[0],
|
|
|
|
primaryAssetId: assets[0].id,
|
2025-04-18 23:10:34 +02:00
|
|
|
createdAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
updatedAt: new Date('2023-02-23T05:06:29.716Z'),
|
2025-06-30 13:19:16 -04:00
|
|
|
updateId: 'uuid-v7',
|
2024-01-27 18:52:14 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-07-31 21:28:07 -04:00
|
|
|
export const assetStub = {
|
2025-03-07 14:30:01 -05:00
|
|
|
storageAsset: (asset: Partial<StorageAsset> = {}) => ({
|
|
|
|
id: 'asset-id',
|
|
|
|
ownerId: 'user-id',
|
|
|
|
livePhotoVideoId: null,
|
2025-07-15 14:50:13 -04:00
|
|
|
type: AssetType.Image,
|
2025-03-07 14:30:01 -05:00
|
|
|
isExternal: false,
|
|
|
|
checksum: Buffer.from('file hash'),
|
|
|
|
timeZone: null,
|
|
|
|
fileCreatedAt: new Date('2022-06-19T23:41:36.910Z'),
|
|
|
|
originalPath: '/original/path.jpg',
|
|
|
|
originalFileName: 'IMG_123.jpg',
|
|
|
|
sidecarPath: null,
|
|
|
|
fileSizeInByte: 12_345,
|
|
|
|
...asset,
|
|
|
|
}),
|
2025-04-16 22:52:54 +02:00
|
|
|
noResizePath: Object.freeze({
|
2023-07-31 21:28:07 -04:00
|
|
|
id: 'asset-id',
|
2025-07-15 14:50:13 -04:00
|
|
|
status: AssetStatus.Active,
|
2024-03-06 20:34:55 -06:00
|
|
|
originalFileName: 'IMG_123.jpg',
|
2023-07-31 21:28:07 -04:00
|
|
|
deviceAssetId: 'device-asset-id',
|
|
|
|
fileModifiedAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
fileCreatedAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
owner: userStub.user1,
|
|
|
|
ownerId: 'user-id',
|
|
|
|
deviceId: 'device-id',
|
|
|
|
originalPath: 'upload/library/IMG_123.jpg',
|
2024-08-19 20:03:33 -04:00
|
|
|
files: [thumbnailFile],
|
2023-07-31 21:28:07 -04:00
|
|
|
checksum: Buffer.from('file hash', 'utf8'),
|
2025-07-15 14:50:13 -04:00
|
|
|
type: AssetType.Image,
|
2023-07-31 21:28:07 -04:00
|
|
|
thumbhash: Buffer.from('blablabla', 'base64'),
|
|
|
|
encodedVideoPath: null,
|
|
|
|
createdAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
updatedAt: new Date('2023-02-23T05:06:29.716Z'),
|
2023-10-04 18:11:11 -04:00
|
|
|
localDateTime: new Date('2023-02-23T05:06:29.716Z'),
|
2023-07-31 21:28:07 -04:00
|
|
|
isFavorite: true,
|
|
|
|
duration: null,
|
|
|
|
livePhotoVideo: null,
|
|
|
|
livePhotoVideoId: null,
|
|
|
|
sharedLinks: [],
|
|
|
|
faces: [],
|
2025-04-16 22:52:54 +02:00
|
|
|
exifInfo: {} as Exif,
|
2023-07-31 21:28:07 -04:00
|
|
|
sidecarPath: null,
|
2023-10-06 07:01:14 +00:00
|
|
|
deletedAt: null,
|
2023-09-20 13:16:33 +02:00
|
|
|
isExternal: false,
|
2024-05-16 13:08:37 -04:00
|
|
|
duplicateId: null,
|
2024-09-25 19:26:19 +02:00
|
|
|
isOffline: false,
|
2025-04-18 23:10:34 +02:00
|
|
|
libraryId: null,
|
|
|
|
stackId: null,
|
|
|
|
updateId: '42',
|
2025-07-15 14:50:13 -04:00
|
|
|
visibility: AssetVisibility.Timeline,
|
2023-07-31 21:28:07 -04:00
|
|
|
}),
|
2023-10-22 02:38:07 +00:00
|
|
|
|
2025-04-18 23:10:34 +02:00
|
|
|
noWebpPath: Object.freeze({
|
2023-07-31 21:28:07 -04:00
|
|
|
id: 'asset-id',
|
2025-07-15 14:50:13 -04:00
|
|
|
status: AssetStatus.Active,
|
2023-07-31 21:28:07 -04:00
|
|
|
deviceAssetId: 'device-asset-id',
|
|
|
|
fileModifiedAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
fileCreatedAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
owner: userStub.user1,
|
|
|
|
ownerId: 'user-id',
|
|
|
|
deviceId: 'device-id',
|
|
|
|
originalPath: 'upload/library/IMG_456.jpg',
|
2024-08-19 20:03:33 -04:00
|
|
|
files: [previewFile],
|
2023-07-31 21:28:07 -04:00
|
|
|
checksum: Buffer.from('file hash', 'utf8'),
|
2025-07-15 14:50:13 -04:00
|
|
|
type: AssetType.Image,
|
2023-07-31 21:28:07 -04:00
|
|
|
thumbhash: Buffer.from('blablabla', 'base64'),
|
|
|
|
encodedVideoPath: null,
|
|
|
|
createdAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
updatedAt: new Date('2023-02-23T05:06:29.716Z'),
|
2023-10-04 18:11:11 -04:00
|
|
|
localDateTime: new Date('2023-02-23T05:06:29.716Z'),
|
2023-07-31 21:28:07 -04:00
|
|
|
isFavorite: true,
|
|
|
|
duration: null,
|
|
|
|
livePhotoVideo: null,
|
|
|
|
livePhotoVideoId: null,
|
|
|
|
sharedLinks: [],
|
2024-03-06 20:34:55 -06:00
|
|
|
originalFileName: 'IMG_456.jpg',
|
2023-07-31 21:28:07 -04:00
|
|
|
faces: [],
|
|
|
|
sidecarPath: null,
|
2023-09-20 13:16:33 +02:00
|
|
|
isExternal: false,
|
2023-07-31 21:28:07 -04:00
|
|
|
exifInfo: {
|
|
|
|
fileSizeInByte: 123_000,
|
2025-04-10 18:36:29 +02:00
|
|
|
} as Exif,
|
2023-10-06 07:01:14 +00:00
|
|
|
deletedAt: null,
|
2024-05-16 13:08:37 -04:00
|
|
|
duplicateId: null,
|
2024-09-25 19:26:19 +02:00
|
|
|
isOffline: false,
|
2025-04-18 23:10:34 +02:00
|
|
|
libraryId: null,
|
|
|
|
stackId: null,
|
|
|
|
updateId: '42',
|
2025-07-15 14:50:13 -04:00
|
|
|
visibility: AssetVisibility.Timeline,
|
2023-07-31 21:28:07 -04:00
|
|
|
}),
|
2023-10-22 02:38:07 +00:00
|
|
|
|
2025-04-18 23:10:34 +02:00
|
|
|
noThumbhash: Object.freeze({
|
2023-07-31 21:28:07 -04:00
|
|
|
id: 'asset-id',
|
2025-07-15 14:50:13 -04:00
|
|
|
status: AssetStatus.Active,
|
2023-07-31 21:28:07 -04:00
|
|
|
deviceAssetId: 'device-asset-id',
|
|
|
|
fileModifiedAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
fileCreatedAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
owner: userStub.user1,
|
|
|
|
ownerId: 'user-id',
|
|
|
|
deviceId: 'device-id',
|
|
|
|
originalPath: '/original/path.ext',
|
2024-08-19 20:03:33 -04:00
|
|
|
files,
|
2023-07-31 21:28:07 -04:00
|
|
|
checksum: Buffer.from('file hash', 'utf8'),
|
2025-07-15 14:50:13 -04:00
|
|
|
type: AssetType.Image,
|
2023-07-31 21:28:07 -04:00
|
|
|
thumbhash: null,
|
|
|
|
encodedVideoPath: null,
|
|
|
|
createdAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
updatedAt: new Date('2023-02-23T05:06:29.716Z'),
|
2023-10-04 18:11:11 -04:00
|
|
|
localDateTime: new Date('2023-02-23T05:06:29.716Z'),
|
2023-07-31 21:28:07 -04:00
|
|
|
isFavorite: true,
|
|
|
|
duration: null,
|
2023-09-20 13:16:33 +02:00
|
|
|
isExternal: false,
|
2023-07-31 21:28:07 -04:00
|
|
|
livePhotoVideo: null,
|
|
|
|
livePhotoVideoId: null,
|
|
|
|
sharedLinks: [],
|
|
|
|
originalFileName: 'asset-id.ext',
|
|
|
|
faces: [],
|
|
|
|
sidecarPath: null,
|
2023-10-06 07:01:14 +00:00
|
|
|
deletedAt: null,
|
2024-05-16 13:08:37 -04:00
|
|
|
duplicateId: null,
|
2024-09-25 19:26:19 +02:00
|
|
|
isOffline: false,
|
2025-04-18 23:10:34 +02:00
|
|
|
libraryId: null,
|
|
|
|
stackId: null,
|
|
|
|
updateId: '42',
|
2025-07-15 14:50:13 -04:00
|
|
|
visibility: AssetVisibility.Timeline,
|
2023-07-31 21:28:07 -04:00
|
|
|
}),
|
2023-10-22 02:38:07 +00:00
|
|
|
|
2025-04-16 20:08:49 +02:00
|
|
|
primaryImage: Object.freeze({
|
2024-01-27 18:52:14 +00:00
|
|
|
id: 'primary-asset-id',
|
2025-07-15 14:50:13 -04:00
|
|
|
status: AssetStatus.Active,
|
2023-10-11 04:14:44 +02:00
|
|
|
deviceAssetId: 'device-asset-id',
|
|
|
|
fileModifiedAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
fileCreatedAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
owner: userStub.admin,
|
|
|
|
ownerId: 'admin-id',
|
|
|
|
deviceId: 'device-id',
|
|
|
|
originalPath: '/original/path.jpg',
|
|
|
|
checksum: Buffer.from('file hash', 'utf8'),
|
2024-08-19 20:03:33 -04:00
|
|
|
files,
|
2025-07-15 14:50:13 -04:00
|
|
|
type: AssetType.Image,
|
2023-10-11 04:14:44 +02:00
|
|
|
thumbhash: Buffer.from('blablabla', 'base64'),
|
|
|
|
encodedVideoPath: null,
|
|
|
|
createdAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
updatedAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
localDateTime: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
isFavorite: true,
|
|
|
|
duration: null,
|
|
|
|
isExternal: false,
|
|
|
|
livePhotoVideo: null,
|
|
|
|
livePhotoVideoId: null,
|
|
|
|
sharedLinks: [],
|
|
|
|
originalFileName: 'asset-id.jpg',
|
|
|
|
faces: [],
|
|
|
|
deletedAt: null,
|
|
|
|
sidecarPath: null,
|
|
|
|
exifInfo: {
|
2024-02-02 04:18:00 +01:00
|
|
|
fileSizeInByte: 5000,
|
2024-05-08 09:09:34 -04:00
|
|
|
exifImageHeight: 1000,
|
|
|
|
exifImageWidth: 1000,
|
2025-04-10 18:36:29 +02:00
|
|
|
} as Exif,
|
2025-02-27 19:16:13 +03:00
|
|
|
stackId: 'stack-1',
|
2024-07-05 09:08:36 -04:00
|
|
|
stack: stackStub('stack-1', [
|
2025-04-18 23:10:34 +02:00
|
|
|
{ id: 'primary-asset-id' } as MapAsset & { exifInfo: Exif },
|
|
|
|
{ id: 'stack-child-asset-1' } as MapAsset & { exifInfo: Exif },
|
|
|
|
{ id: 'stack-child-asset-2' } as MapAsset & { exifInfo: Exif },
|
2024-01-27 18:52:14 +00:00
|
|
|
]),
|
2024-05-16 13:08:37 -04:00
|
|
|
duplicateId: null,
|
2024-09-25 19:26:19 +02:00
|
|
|
isOffline: false,
|
2025-04-18 23:10:34 +02:00
|
|
|
updateId: '42',
|
2025-04-16 20:08:49 +02:00
|
|
|
libraryId: null,
|
2025-07-15 14:50:13 -04:00
|
|
|
visibility: AssetVisibility.Timeline,
|
2023-10-11 04:14:44 +02:00
|
|
|
}),
|
2023-10-22 02:38:07 +00:00
|
|
|
|
2025-04-16 20:08:49 +02:00
|
|
|
image: Object.freeze({
|
2023-07-31 21:28:07 -04:00
|
|
|
id: 'asset-id',
|
2025-07-15 14:50:13 -04:00
|
|
|
status: AssetStatus.Active,
|
2023-07-31 21:28:07 -04:00
|
|
|
deviceAssetId: 'device-asset-id',
|
|
|
|
fileModifiedAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
fileCreatedAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
owner: userStub.user1,
|
|
|
|
ownerId: 'user-id',
|
|
|
|
deviceId: 'device-id',
|
|
|
|
originalPath: '/original/path.jpg',
|
2024-08-19 20:03:33 -04:00
|
|
|
files,
|
2023-07-31 21:28:07 -04:00
|
|
|
checksum: Buffer.from('file hash', 'utf8'),
|
2025-07-15 14:50:13 -04:00
|
|
|
type: AssetType.Image,
|
2023-07-31 21:28:07 -04:00
|
|
|
thumbhash: Buffer.from('blablabla', 'base64'),
|
|
|
|
encodedVideoPath: null,
|
|
|
|
createdAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
updatedAt: new Date('2023-02-23T05:06:29.716Z'),
|
2025-01-28 21:33:38 +01:00
|
|
|
localDateTime: new Date('2025-01-01T01:02:03.456Z'),
|
2023-07-31 21:28:07 -04:00
|
|
|
isFavorite: true,
|
|
|
|
duration: null,
|
2023-09-20 13:16:33 +02:00
|
|
|
isExternal: false,
|
2023-07-31 21:28:07 -04:00
|
|
|
livePhotoVideo: null,
|
|
|
|
livePhotoVideoId: null,
|
2025-04-18 23:10:34 +02:00
|
|
|
updateId: 'foo',
|
|
|
|
libraryId: null,
|
|
|
|
stackId: null,
|
2023-09-20 13:16:33 +02:00
|
|
|
sharedLinks: [],
|
|
|
|
originalFileName: 'asset-id.jpg',
|
|
|
|
faces: [],
|
2023-10-06 07:01:14 +00:00
|
|
|
deletedAt: null,
|
2023-09-20 13:16:33 +02:00
|
|
|
sidecarPath: null,
|
|
|
|
exifInfo: {
|
2024-02-02 04:18:00 +01:00
|
|
|
fileSizeInByte: 5000,
|
2024-05-08 09:09:34 -04:00
|
|
|
exifImageHeight: 3840,
|
|
|
|
exifImageWidth: 2160,
|
2025-04-10 18:36:29 +02:00
|
|
|
} as Exif,
|
2024-05-16 13:08:37 -04:00
|
|
|
duplicateId: null,
|
2024-09-25 19:26:19 +02:00
|
|
|
isOffline: false,
|
2025-04-18 23:10:34 +02:00
|
|
|
stack: null,
|
2025-05-19 17:40:48 -04:00
|
|
|
orientation: '',
|
|
|
|
projectionType: null,
|
|
|
|
height: 3840,
|
|
|
|
width: 2160,
|
2025-07-15 14:50:13 -04:00
|
|
|
visibility: AssetVisibility.Timeline,
|
2023-09-20 13:16:33 +02:00
|
|
|
}),
|
2023-10-22 02:38:07 +00:00
|
|
|
|
2025-04-18 23:10:34 +02:00
|
|
|
trashed: Object.freeze({
|
2024-06-16 17:37:51 +02:00
|
|
|
id: 'asset-id',
|
|
|
|
deviceAssetId: 'device-asset-id',
|
|
|
|
fileModifiedAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
fileCreatedAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
owner: userStub.user1,
|
|
|
|
ownerId: 'user-id',
|
|
|
|
deviceId: 'device-id',
|
|
|
|
originalPath: '/original/path.jpg',
|
|
|
|
checksum: Buffer.from('file hash', 'utf8'),
|
2025-07-15 14:50:13 -04:00
|
|
|
type: AssetType.Image,
|
2024-08-19 20:03:33 -04:00
|
|
|
files,
|
2024-06-16 17:37:51 +02:00
|
|
|
thumbhash: Buffer.from('blablabla', 'base64'),
|
|
|
|
encodedVideoPath: null,
|
|
|
|
createdAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
updatedAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
deletedAt: new Date('2023-02-24T05:06:29.716Z'),
|
|
|
|
localDateTime: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
isFavorite: false,
|
|
|
|
duration: null,
|
|
|
|
isExternal: false,
|
|
|
|
livePhotoVideo: null,
|
|
|
|
livePhotoVideoId: null,
|
|
|
|
sharedLinks: [],
|
|
|
|
originalFileName: 'asset-id.jpg',
|
|
|
|
faces: [],
|
|
|
|
sidecarPath: null,
|
|
|
|
exifInfo: {
|
|
|
|
fileSizeInByte: 5000,
|
|
|
|
exifImageHeight: 3840,
|
|
|
|
exifImageWidth: 2160,
|
2025-04-10 18:36:29 +02:00
|
|
|
} as Exif,
|
2024-06-16 17:37:51 +02:00
|
|
|
duplicateId: null,
|
2024-09-25 19:26:19 +02:00
|
|
|
isOffline: false,
|
2025-07-15 14:50:13 -04:00
|
|
|
status: AssetStatus.Trashed,
|
2025-04-18 23:10:34 +02:00
|
|
|
libraryId: null,
|
|
|
|
stackId: null,
|
|
|
|
updateId: '42',
|
2025-07-15 14:50:13 -04:00
|
|
|
visibility: AssetVisibility.Timeline,
|
2024-06-16 17:37:51 +02:00
|
|
|
}),
|
|
|
|
|
2025-04-18 23:10:34 +02:00
|
|
|
trashedOffline: Object.freeze({
|
2024-06-16 22:16:02 +02:00
|
|
|
id: 'asset-id',
|
2025-07-15 14:50:13 -04:00
|
|
|
status: AssetStatus.Active,
|
2024-06-16 22:16:02 +02:00
|
|
|
deviceAssetId: 'device-asset-id',
|
|
|
|
fileModifiedAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
fileCreatedAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
owner: userStub.user1,
|
|
|
|
ownerId: 'user-id',
|
|
|
|
deviceId: 'device-id',
|
|
|
|
originalPath: '/original/path.jpg',
|
|
|
|
checksum: Buffer.from('file hash', 'utf8'),
|
2025-07-15 14:50:13 -04:00
|
|
|
type: AssetType.Image,
|
2024-08-19 20:03:33 -04:00
|
|
|
files,
|
2024-06-16 22:16:02 +02:00
|
|
|
thumbhash: Buffer.from('blablabla', 'base64'),
|
|
|
|
encodedVideoPath: null,
|
|
|
|
createdAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
updatedAt: new Date('2023-02-23T05:06:29.716Z'),
|
2024-09-25 19:26:19 +02:00
|
|
|
deletedAt: new Date('2023-02-24T05:06:29.716Z'),
|
2024-06-16 22:16:02 +02:00
|
|
|
localDateTime: new Date('2023-02-23T05:06:29.716Z'),
|
2024-09-25 19:26:19 +02:00
|
|
|
isFavorite: false,
|
2024-06-16 22:16:02 +02:00
|
|
|
duration: null,
|
2025-03-06 16:00:18 +01:00
|
|
|
libraryId: 'library-id',
|
2024-06-16 22:16:02 +02:00
|
|
|
isExternal: false,
|
|
|
|
livePhotoVideo: null,
|
|
|
|
livePhotoVideoId: null,
|
|
|
|
sharedLinks: [],
|
|
|
|
originalFileName: 'asset-id.jpg',
|
|
|
|
faces: [],
|
|
|
|
sidecarPath: null,
|
|
|
|
exifInfo: {
|
|
|
|
fileSizeInByte: 5000,
|
|
|
|
exifImageHeight: 3840,
|
|
|
|
exifImageWidth: 2160,
|
2025-04-10 18:36:29 +02:00
|
|
|
} as Exif,
|
2024-06-16 22:16:02 +02:00
|
|
|
duplicateId: null,
|
2024-09-25 19:26:19 +02:00
|
|
|
isOffline: true,
|
2025-04-18 23:10:34 +02:00
|
|
|
stackId: null,
|
|
|
|
updateId: '42',
|
2025-07-15 14:50:13 -04:00
|
|
|
visibility: AssetVisibility.Timeline,
|
2024-06-16 22:16:02 +02:00
|
|
|
}),
|
2025-04-18 23:10:34 +02:00
|
|
|
archived: Object.freeze({
|
2023-09-20 13:16:33 +02:00
|
|
|
id: 'asset-id',
|
2025-07-15 14:50:13 -04:00
|
|
|
status: AssetStatus.Active,
|
2023-09-20 13:16:33 +02:00
|
|
|
deviceAssetId: 'device-asset-id',
|
|
|
|
fileModifiedAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
fileCreatedAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
owner: userStub.user1,
|
|
|
|
ownerId: 'user-id',
|
|
|
|
deviceId: 'device-id',
|
|
|
|
originalPath: '/original/path.jpg',
|
|
|
|
checksum: Buffer.from('file hash', 'utf8'),
|
2025-07-15 14:50:13 -04:00
|
|
|
type: AssetType.Image,
|
2024-08-19 20:03:33 -04:00
|
|
|
files,
|
2023-09-20 13:16:33 +02:00
|
|
|
thumbhash: Buffer.from('blablabla', 'base64'),
|
|
|
|
encodedVideoPath: null,
|
|
|
|
createdAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
updatedAt: new Date('2023-02-23T05:06:29.716Z'),
|
2023-10-04 18:11:11 -04:00
|
|
|
localDateTime: new Date('2023-02-23T05:06:29.716Z'),
|
2023-09-20 13:16:33 +02:00
|
|
|
isFavorite: true,
|
|
|
|
duration: null,
|
2024-09-25 19:26:19 +02:00
|
|
|
isExternal: false,
|
2023-09-20 13:16:33 +02:00
|
|
|
livePhotoVideo: null,
|
|
|
|
livePhotoVideoId: null,
|
2024-04-14 16:55:44 -07:00
|
|
|
sharedLinks: [],
|
|
|
|
originalFileName: 'asset-id.jpg',
|
|
|
|
faces: [],
|
2024-09-25 19:26:19 +02:00
|
|
|
deletedAt: null,
|
2024-04-14 16:55:44 -07:00
|
|
|
sidecarPath: null,
|
|
|
|
exifInfo: {
|
|
|
|
fileSizeInByte: 5000,
|
2024-09-25 19:26:19 +02:00
|
|
|
exifImageHeight: 3840,
|
|
|
|
exifImageWidth: 2160,
|
2025-04-10 18:36:29 +02:00
|
|
|
} as Exif,
|
2024-05-16 13:08:37 -04:00
|
|
|
duplicateId: null,
|
2024-09-25 19:26:19 +02:00
|
|
|
isOffline: false,
|
2025-04-18 23:10:34 +02:00
|
|
|
libraryId: null,
|
|
|
|
stackId: null,
|
|
|
|
updateId: '42',
|
2025-07-15 14:50:13 -04:00
|
|
|
visibility: AssetVisibility.Timeline,
|
2024-04-14 16:55:44 -07:00
|
|
|
}),
|
|
|
|
|
2025-04-18 23:10:34 +02:00
|
|
|
external: Object.freeze({
|
2024-04-14 16:55:44 -07:00
|
|
|
id: 'asset-id',
|
2025-07-15 14:50:13 -04:00
|
|
|
status: AssetStatus.Active,
|
2024-04-14 16:55:44 -07:00
|
|
|
deviceAssetId: 'device-asset-id',
|
|
|
|
fileModifiedAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
fileCreatedAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
owner: userStub.user1,
|
|
|
|
ownerId: 'user-id',
|
|
|
|
deviceId: 'device-id',
|
|
|
|
originalPath: '/data/user1/photo.jpg',
|
|
|
|
checksum: Buffer.from('path hash', 'utf8'),
|
2025-07-15 14:50:13 -04:00
|
|
|
type: AssetType.Image,
|
2024-08-19 20:03:33 -04:00
|
|
|
files,
|
2024-04-14 16:55:44 -07:00
|
|
|
thumbhash: Buffer.from('blablabla', 'base64'),
|
|
|
|
encodedVideoPath: null,
|
|
|
|
createdAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
updatedAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
localDateTime: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
isFavorite: true,
|
|
|
|
isExternal: true,
|
|
|
|
duration: null,
|
|
|
|
livePhotoVideo: null,
|
|
|
|
livePhotoVideoId: null,
|
|
|
|
libraryId: 'library-id',
|
2023-07-31 21:28:07 -04:00
|
|
|
sharedLinks: [],
|
|
|
|
originalFileName: 'asset-id.jpg',
|
|
|
|
faces: [],
|
2024-09-25 19:26:19 +02:00
|
|
|
deletedAt: null,
|
2023-07-31 21:28:07 -04:00
|
|
|
sidecarPath: null,
|
|
|
|
exifInfo: {
|
2024-02-02 04:18:00 +01:00
|
|
|
fileSizeInByte: 5000,
|
2025-04-10 18:36:29 +02:00
|
|
|
} as Exif,
|
2024-05-16 13:08:37 -04:00
|
|
|
duplicateId: null,
|
2024-09-25 19:26:19 +02:00
|
|
|
isOffline: false,
|
2025-04-18 23:10:34 +02:00
|
|
|
updateId: '42',
|
|
|
|
stackId: null,
|
|
|
|
stack: null,
|
2025-07-15 14:50:13 -04:00
|
|
|
visibility: AssetVisibility.Timeline,
|
2023-07-31 21:28:07 -04:00
|
|
|
}),
|
2023-10-22 02:38:07 +00:00
|
|
|
|
2025-04-18 23:10:34 +02:00
|
|
|
image1: Object.freeze({
|
2023-07-31 21:28:07 -04:00
|
|
|
id: 'asset-id-1',
|
2025-07-15 14:50:13 -04:00
|
|
|
status: AssetStatus.Active,
|
2023-07-31 21:28:07 -04:00
|
|
|
deviceAssetId: 'device-asset-id',
|
|
|
|
fileModifiedAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
fileCreatedAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
owner: userStub.user1,
|
|
|
|
ownerId: 'user-id',
|
|
|
|
deviceId: 'device-id',
|
|
|
|
originalPath: '/original/path.ext',
|
|
|
|
checksum: Buffer.from('file hash', 'utf8'),
|
2025-07-15 14:50:13 -04:00
|
|
|
type: AssetType.Image,
|
2024-08-19 20:03:33 -04:00
|
|
|
files,
|
2023-07-31 21:28:07 -04:00
|
|
|
thumbhash: Buffer.from('blablabla', 'base64'),
|
|
|
|
encodedVideoPath: null,
|
|
|
|
createdAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
updatedAt: new Date('2023-02-23T05:06:29.716Z'),
|
2023-10-06 07:01:14 +00:00
|
|
|
deletedAt: null,
|
2023-10-04 18:11:11 -04:00
|
|
|
localDateTime: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
isFavorite: true,
|
|
|
|
duration: null,
|
|
|
|
livePhotoVideo: null,
|
|
|
|
livePhotoVideoId: null,
|
|
|
|
isExternal: false,
|
|
|
|
sharedLinks: [],
|
|
|
|
originalFileName: 'asset-id.ext',
|
|
|
|
faces: [],
|
|
|
|
sidecarPath: null,
|
|
|
|
exifInfo: {
|
2024-02-02 04:18:00 +01:00
|
|
|
fileSizeInByte: 5000,
|
2025-04-10 18:36:29 +02:00
|
|
|
} as Exif,
|
2024-05-16 13:08:37 -04:00
|
|
|
duplicateId: null,
|
2024-09-25 19:26:19 +02:00
|
|
|
isOffline: false,
|
2025-04-18 23:10:34 +02:00
|
|
|
updateId: '42',
|
|
|
|
stackId: null,
|
|
|
|
libraryId: null,
|
|
|
|
stack: null,
|
2025-07-15 14:50:13 -04:00
|
|
|
visibility: AssetVisibility.Timeline,
|
2023-10-04 18:11:11 -04:00
|
|
|
}),
|
2023-10-22 02:38:07 +00:00
|
|
|
|
2025-04-18 23:10:34 +02:00
|
|
|
imageFrom2015: Object.freeze({
|
2023-10-04 18:11:11 -04:00
|
|
|
id: 'asset-id-1',
|
2025-07-15 14:50:13 -04:00
|
|
|
status: AssetStatus.Active,
|
2023-10-04 18:11:11 -04:00
|
|
|
deviceAssetId: 'device-asset-id',
|
|
|
|
fileModifiedAt: new Date('2015-02-23T05:06:29.716Z'),
|
|
|
|
fileCreatedAt: new Date('2015-02-23T05:06:29.716Z'),
|
|
|
|
owner: userStub.user1,
|
|
|
|
ownerId: 'user-id',
|
|
|
|
deviceId: 'device-id',
|
|
|
|
originalPath: '/original/path.ext',
|
2024-08-19 20:03:33 -04:00
|
|
|
files,
|
2023-10-04 18:11:11 -04:00
|
|
|
checksum: Buffer.from('file hash', 'utf8'),
|
2025-07-15 14:50:13 -04:00
|
|
|
type: AssetType.Image,
|
2023-10-04 18:11:11 -04:00
|
|
|
thumbhash: Buffer.from('blablabla', 'base64'),
|
|
|
|
encodedVideoPath: null,
|
|
|
|
createdAt: new Date('2015-02-23T05:06:29.716Z'),
|
|
|
|
updatedAt: new Date('2015-02-23T05:06:29.716Z'),
|
|
|
|
localDateTime: new Date('2015-02-23T05:06:29.716Z'),
|
2023-07-31 21:28:07 -04:00
|
|
|
isFavorite: true,
|
2023-09-20 13:16:33 +02:00
|
|
|
isExternal: false,
|
2023-07-31 21:28:07 -04:00
|
|
|
duration: null,
|
|
|
|
livePhotoVideo: null,
|
|
|
|
livePhotoVideoId: null,
|
|
|
|
sharedLinks: [],
|
|
|
|
originalFileName: 'asset-id.ext',
|
|
|
|
faces: [],
|
|
|
|
sidecarPath: null,
|
|
|
|
exifInfo: {
|
2024-02-02 04:18:00 +01:00
|
|
|
fileSizeInByte: 5000,
|
2025-04-10 18:36:29 +02:00
|
|
|
} as Exif,
|
2023-10-06 07:01:14 +00:00
|
|
|
deletedAt: null,
|
2024-05-16 13:08:37 -04:00
|
|
|
duplicateId: null,
|
2024-09-25 19:26:19 +02:00
|
|
|
isOffline: false,
|
2025-07-15 14:50:13 -04:00
|
|
|
visibility: AssetVisibility.Timeline,
|
2023-07-31 21:28:07 -04:00
|
|
|
}),
|
2023-10-22 02:38:07 +00:00
|
|
|
|
2025-04-16 20:08:49 +02:00
|
|
|
video: Object.freeze({
|
2023-07-31 21:28:07 -04:00
|
|
|
id: 'asset-id',
|
2025-07-15 14:50:13 -04:00
|
|
|
status: AssetStatus.Active,
|
2023-07-31 21:28:07 -04:00
|
|
|
originalFileName: 'asset-id.ext',
|
|
|
|
deviceAssetId: 'device-asset-id',
|
|
|
|
fileModifiedAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
fileCreatedAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
owner: userStub.user1,
|
|
|
|
ownerId: 'user-id',
|
|
|
|
deviceId: 'device-id',
|
|
|
|
originalPath: '/original/path.ext',
|
|
|
|
checksum: Buffer.from('file hash', 'utf8'),
|
2025-07-15 14:50:13 -04:00
|
|
|
type: AssetType.Video,
|
2024-08-19 20:03:33 -04:00
|
|
|
files: [previewFile],
|
2023-07-31 21:28:07 -04:00
|
|
|
thumbhash: null,
|
|
|
|
encodedVideoPath: null,
|
|
|
|
createdAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
updatedAt: new Date('2023-02-23T05:06:29.716Z'),
|
2023-10-04 18:11:11 -04:00
|
|
|
localDateTime: new Date('2023-02-23T05:06:29.716Z'),
|
2023-07-31 21:28:07 -04:00
|
|
|
isFavorite: true,
|
2023-09-20 13:16:33 +02:00
|
|
|
isExternal: false,
|
2023-07-31 21:28:07 -04:00
|
|
|
duration: null,
|
|
|
|
livePhotoVideo: null,
|
|
|
|
livePhotoVideoId: null,
|
|
|
|
sharedLinks: [],
|
|
|
|
faces: [],
|
|
|
|
sidecarPath: null,
|
|
|
|
exifInfo: {
|
|
|
|
fileSizeInByte: 100_000,
|
2024-06-12 22:16:26 -04:00
|
|
|
exifImageHeight: 2160,
|
|
|
|
exifImageWidth: 3840,
|
2025-04-10 18:36:29 +02:00
|
|
|
} as Exif,
|
2023-10-06 07:01:14 +00:00
|
|
|
deletedAt: null,
|
2024-05-16 13:08:37 -04:00
|
|
|
duplicateId: null,
|
2024-09-25 19:26:19 +02:00
|
|
|
isOffline: false,
|
2025-04-18 23:10:34 +02:00
|
|
|
updateId: '42',
|
2025-04-16 20:08:49 +02:00
|
|
|
libraryId: null,
|
2025-04-18 23:10:34 +02:00
|
|
|
stackId: null,
|
2025-07-15 14:50:13 -04:00
|
|
|
visibility: AssetVisibility.Timeline,
|
2023-07-31 21:28:07 -04:00
|
|
|
}),
|
2023-10-22 02:38:07 +00:00
|
|
|
|
2023-07-31 21:28:07 -04:00
|
|
|
livePhotoMotionAsset: Object.freeze({
|
2025-07-15 14:50:13 -04:00
|
|
|
status: AssetStatus.Active,
|
2024-01-22 10:04:45 -08:00
|
|
|
id: fileStub.livePhotoMotion.uuid,
|
2023-07-31 21:28:07 -04:00
|
|
|
originalPath: fileStub.livePhotoMotion.originalPath,
|
2023-12-09 23:34:12 -05:00
|
|
|
ownerId: authStub.user1.user.id,
|
2025-07-15 14:50:13 -04:00
|
|
|
type: AssetType.Video,
|
2023-07-31 21:28:07 -04:00
|
|
|
fileModifiedAt: new Date('2022-06-19T23:41:36.910Z'),
|
|
|
|
fileCreatedAt: new Date('2022-06-19T23:41:36.910Z'),
|
|
|
|
exifInfo: {
|
|
|
|
fileSizeInByte: 100_000,
|
2024-04-25 06:19:49 +02:00
|
|
|
timeZone: `America/New_York`,
|
2023-07-31 21:28:07 -04:00
|
|
|
},
|
2025-04-16 20:08:49 +02:00
|
|
|
libraryId: null,
|
2025-07-15 14:50:13 -04:00
|
|
|
visibility: AssetVisibility.Hidden,
|
2025-04-18 23:10:34 +02:00
|
|
|
} as MapAsset & { faces: AssetFace[]; files: AssetFile[]; exifInfo: Exif }),
|
2023-07-31 21:28:07 -04:00
|
|
|
|
|
|
|
livePhotoStillAsset: Object.freeze({
|
|
|
|
id: 'live-photo-still-asset',
|
2025-07-15 14:50:13 -04:00
|
|
|
status: AssetStatus.Active,
|
2023-07-31 21:28:07 -04:00
|
|
|
originalPath: fileStub.livePhotoStill.originalPath,
|
2023-12-09 23:34:12 -05:00
|
|
|
ownerId: authStub.user1.user.id,
|
2025-07-15 14:50:13 -04:00
|
|
|
type: AssetType.Image,
|
2023-07-31 21:28:07 -04:00
|
|
|
livePhotoVideoId: 'live-photo-motion-asset',
|
|
|
|
fileModifiedAt: new Date('2022-06-19T23:41:36.910Z'),
|
|
|
|
fileCreatedAt: new Date('2022-06-19T23:41:36.910Z'),
|
|
|
|
exifInfo: {
|
|
|
|
fileSizeInByte: 25_000,
|
2024-04-25 06:19:49 +02:00
|
|
|
timeZone: `America/New_York`,
|
2023-07-31 21:28:07 -04:00
|
|
|
},
|
2025-04-01 18:11:46 -04:00
|
|
|
files,
|
2025-04-18 23:10:34 +02:00
|
|
|
faces: [] as AssetFace[],
|
2025-07-15 14:50:13 -04:00
|
|
|
visibility: AssetVisibility.Timeline,
|
2025-04-18 23:10:34 +02:00
|
|
|
} as MapAsset & { faces: AssetFace[] }),
|
2023-07-31 21:28:07 -04:00
|
|
|
|
2024-05-24 22:38:18 +02:00
|
|
|
livePhotoWithOriginalFileName: Object.freeze({
|
|
|
|
id: 'live-photo-still-asset',
|
2025-07-15 14:50:13 -04:00
|
|
|
status: AssetStatus.Active,
|
2024-05-24 22:38:18 +02:00
|
|
|
originalPath: fileStub.livePhotoStill.originalPath,
|
|
|
|
originalFileName: fileStub.livePhotoStill.originalName,
|
|
|
|
ownerId: authStub.user1.user.id,
|
2025-07-15 14:50:13 -04:00
|
|
|
type: AssetType.Image,
|
2024-06-05 08:55:04 +02:00
|
|
|
livePhotoVideoId: 'live-photo-motion-asset',
|
2024-05-24 22:38:18 +02:00
|
|
|
fileModifiedAt: new Date('2022-06-19T23:41:36.910Z'),
|
|
|
|
fileCreatedAt: new Date('2022-06-19T23:41:36.910Z'),
|
|
|
|
exifInfo: {
|
|
|
|
fileSizeInByte: 25_000,
|
|
|
|
timeZone: `America/New_York`,
|
|
|
|
},
|
2025-04-16 20:08:49 +02:00
|
|
|
libraryId: null,
|
2025-04-18 23:10:34 +02:00
|
|
|
faces: [] as AssetFace[],
|
2025-07-15 14:50:13 -04:00
|
|
|
visibility: AssetVisibility.Timeline,
|
2025-04-18 23:10:34 +02:00
|
|
|
} as MapAsset & { faces: AssetFace[] }),
|
2024-05-24 22:38:18 +02:00
|
|
|
|
2025-04-16 20:08:49 +02:00
|
|
|
withLocation: Object.freeze({
|
2023-07-31 21:28:07 -04:00
|
|
|
id: 'asset-with-favorite-id',
|
2025-07-15 14:50:13 -04:00
|
|
|
status: AssetStatus.Active,
|
2023-07-31 21:28:07 -04:00
|
|
|
deviceAssetId: 'device-asset-id',
|
2023-10-31 06:08:34 -04:00
|
|
|
fileModifiedAt: new Date('2023-02-22T05:06:29.716Z'),
|
|
|
|
fileCreatedAt: new Date('2023-02-22T05:06:29.716Z'),
|
2023-07-31 21:28:07 -04:00
|
|
|
owner: userStub.user1,
|
|
|
|
ownerId: 'user-id',
|
|
|
|
deviceId: 'device-id',
|
|
|
|
checksum: Buffer.from('file hash', 'utf8'),
|
|
|
|
originalPath: '/original/path.ext',
|
|
|
|
sidecarPath: null,
|
2025-07-15 14:50:13 -04:00
|
|
|
type: AssetType.Image,
|
2024-08-19 20:03:33 -04:00
|
|
|
files: [previewFile],
|
2023-07-31 21:28:07 -04:00
|
|
|
thumbhash: null,
|
|
|
|
encodedVideoPath: null,
|
2023-10-31 06:08:34 -04:00
|
|
|
createdAt: new Date('2023-02-22T05:06:29.716Z'),
|
|
|
|
updatedAt: new Date('2023-02-22T05:06:29.716Z'),
|
2025-01-28 21:33:38 +01:00
|
|
|
localDateTime: new Date('2020-12-31T23:59:00.000Z'),
|
2023-07-31 21:28:07 -04:00
|
|
|
isFavorite: false,
|
2023-09-20 13:16:33 +02:00
|
|
|
isExternal: false,
|
2023-07-31 21:28:07 -04:00
|
|
|
duration: null,
|
|
|
|
livePhotoVideo: null,
|
|
|
|
livePhotoVideoId: null,
|
2025-04-18 23:10:34 +02:00
|
|
|
updateId: 'foo',
|
|
|
|
libraryId: null,
|
|
|
|
stackId: null,
|
2023-07-31 21:28:07 -04:00
|
|
|
sharedLinks: [],
|
|
|
|
originalFileName: 'asset-id.ext',
|
|
|
|
faces: [],
|
|
|
|
exifInfo: {
|
|
|
|
latitude: 100,
|
|
|
|
longitude: 100,
|
|
|
|
fileSizeInByte: 23_456,
|
2024-03-03 16:42:17 -05:00
|
|
|
city: 'test-city',
|
|
|
|
state: 'test-state',
|
|
|
|
country: 'test-country',
|
2025-04-10 18:36:29 +02:00
|
|
|
} as Exif,
|
2023-10-06 07:01:14 +00:00
|
|
|
deletedAt: null,
|
2024-05-16 13:08:37 -04:00
|
|
|
duplicateId: null,
|
2024-09-25 19:26:19 +02:00
|
|
|
isOffline: false,
|
2025-04-18 23:10:34 +02:00
|
|
|
tags: [],
|
2025-07-15 14:50:13 -04:00
|
|
|
visibility: AssetVisibility.Timeline,
|
2023-07-31 21:28:07 -04:00
|
|
|
}),
|
2024-10-11 00:44:38 -04:00
|
|
|
|
2025-04-16 20:08:49 +02:00
|
|
|
sidecar: Object.freeze({
|
2023-07-31 21:28:07 -04:00
|
|
|
id: 'asset-id',
|
2025-07-15 14:50:13 -04:00
|
|
|
status: AssetStatus.Active,
|
2023-07-31 21:28:07 -04:00
|
|
|
deviceAssetId: 'device-asset-id',
|
|
|
|
fileModifiedAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
fileCreatedAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
owner: userStub.user1,
|
|
|
|
ownerId: 'user-id',
|
|
|
|
deviceId: 'device-id',
|
|
|
|
originalPath: '/original/path.ext',
|
|
|
|
thumbhash: null,
|
|
|
|
checksum: Buffer.from('file hash', 'utf8'),
|
2025-07-15 14:50:13 -04:00
|
|
|
type: AssetType.Image,
|
2024-08-19 20:03:33 -04:00
|
|
|
files: [previewFile],
|
2023-07-31 21:28:07 -04:00
|
|
|
encodedVideoPath: null,
|
|
|
|
createdAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
updatedAt: new Date('2023-02-23T05:06:29.716Z'),
|
2023-10-04 18:11:11 -04:00
|
|
|
localDateTime: new Date('2023-02-23T05:06:29.716Z'),
|
2023-07-31 21:28:07 -04:00
|
|
|
isFavorite: true,
|
2023-09-20 13:16:33 +02:00
|
|
|
isExternal: false,
|
2023-07-31 21:28:07 -04:00
|
|
|
duration: null,
|
|
|
|
livePhotoVideo: null,
|
|
|
|
livePhotoVideoId: null,
|
|
|
|
sharedLinks: [],
|
|
|
|
originalFileName: 'asset-id.ext',
|
|
|
|
faces: [],
|
|
|
|
sidecarPath: '/original/path.ext.xmp',
|
2023-10-06 07:01:14 +00:00
|
|
|
deletedAt: null,
|
2024-05-16 13:08:37 -04:00
|
|
|
duplicateId: null,
|
2024-09-25 19:26:19 +02:00
|
|
|
isOffline: false,
|
2025-04-18 23:10:34 +02:00
|
|
|
updateId: 'foo',
|
2025-04-16 20:08:49 +02:00
|
|
|
libraryId: null,
|
2025-04-18 23:10:34 +02:00
|
|
|
stackId: null,
|
2025-07-15 14:50:13 -04:00
|
|
|
visibility: AssetVisibility.Timeline,
|
2023-10-06 07:01:14 +00:00
|
|
|
}),
|
2024-10-11 00:44:38 -04:00
|
|
|
|
2025-04-18 23:10:34 +02:00
|
|
|
sidecarWithoutExt: Object.freeze({
|
2024-03-13 10:14:26 -07:00
|
|
|
id: 'asset-id',
|
2025-07-15 14:50:13 -04:00
|
|
|
status: AssetStatus.Active,
|
2024-03-13 10:14:26 -07:00
|
|
|
deviceAssetId: 'device-asset-id',
|
|
|
|
fileModifiedAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
fileCreatedAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
owner: userStub.user1,
|
|
|
|
ownerId: 'user-id',
|
|
|
|
deviceId: 'device-id',
|
|
|
|
originalPath: '/original/path.ext',
|
|
|
|
thumbhash: null,
|
|
|
|
checksum: Buffer.from('file hash', 'utf8'),
|
2025-07-15 14:50:13 -04:00
|
|
|
type: AssetType.Image,
|
2024-08-19 20:03:33 -04:00
|
|
|
files: [previewFile],
|
2024-03-13 10:14:26 -07:00
|
|
|
encodedVideoPath: null,
|
|
|
|
createdAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
updatedAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
localDateTime: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
isFavorite: true,
|
|
|
|
isExternal: false,
|
|
|
|
duration: null,
|
|
|
|
livePhotoVideo: null,
|
|
|
|
livePhotoVideoId: null,
|
|
|
|
sharedLinks: [],
|
|
|
|
originalFileName: 'asset-id.ext',
|
|
|
|
faces: [],
|
|
|
|
sidecarPath: '/original/path.xmp',
|
|
|
|
deletedAt: null,
|
2024-05-16 13:08:37 -04:00
|
|
|
duplicateId: null,
|
2023-10-22 02:38:07 +00:00
|
|
|
isOffline: false,
|
2025-07-15 14:50:13 -04:00
|
|
|
visibility: AssetVisibility.Timeline,
|
2023-07-31 21:28:07 -04:00
|
|
|
}),
|
2023-12-28 00:34:00 -05:00
|
|
|
|
2025-04-18 23:10:34 +02:00
|
|
|
hasEncodedVideo: Object.freeze({
|
2023-12-28 00:34:00 -05:00
|
|
|
id: 'asset-id',
|
2025-07-15 14:50:13 -04:00
|
|
|
status: AssetStatus.Active,
|
2023-12-28 00:34:00 -05:00
|
|
|
originalFileName: 'asset-id.ext',
|
|
|
|
deviceAssetId: 'device-asset-id',
|
|
|
|
fileModifiedAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
fileCreatedAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
owner: userStub.user1,
|
|
|
|
ownerId: 'user-id',
|
|
|
|
deviceId: 'device-id',
|
|
|
|
originalPath: '/original/path.ext',
|
|
|
|
checksum: Buffer.from('file hash', 'utf8'),
|
2025-07-15 14:50:13 -04:00
|
|
|
type: AssetType.Video,
|
2024-08-19 20:03:33 -04:00
|
|
|
files: [previewFile],
|
2023-12-28 00:34:00 -05:00
|
|
|
thumbhash: null,
|
|
|
|
encodedVideoPath: '/encoded/video/path.mp4',
|
|
|
|
createdAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
updatedAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
localDateTime: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
isFavorite: true,
|
|
|
|
isExternal: false,
|
|
|
|
duration: null,
|
|
|
|
livePhotoVideo: null,
|
|
|
|
livePhotoVideoId: null,
|
|
|
|
sharedLinks: [],
|
|
|
|
faces: [],
|
|
|
|
sidecarPath: null,
|
|
|
|
exifInfo: {
|
|
|
|
fileSizeInByte: 100_000,
|
2025-04-10 18:36:29 +02:00
|
|
|
} as Exif,
|
2023-12-28 00:34:00 -05:00
|
|
|
deletedAt: null,
|
2024-05-16 13:08:37 -04:00
|
|
|
duplicateId: null,
|
2024-09-25 19:26:19 +02:00
|
|
|
isOffline: false,
|
2025-04-18 23:10:34 +02:00
|
|
|
updateId: '42',
|
|
|
|
libraryId: null,
|
|
|
|
stackId: null,
|
|
|
|
stack: null,
|
2025-07-15 14:50:13 -04:00
|
|
|
visibility: AssetVisibility.Timeline,
|
2023-12-28 00:34:00 -05:00
|
|
|
}),
|
2024-10-11 00:44:38 -04:00
|
|
|
|
2025-04-18 23:10:34 +02:00
|
|
|
hasFileExtension: Object.freeze({
|
2024-03-29 03:51:07 +01:00
|
|
|
id: 'asset-id',
|
2025-07-15 14:50:13 -04:00
|
|
|
status: AssetStatus.Active,
|
2024-03-29 03:51:07 +01:00
|
|
|
deviceAssetId: 'device-asset-id',
|
|
|
|
fileModifiedAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
fileCreatedAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
owner: userStub.user1,
|
|
|
|
ownerId: 'user-id',
|
|
|
|
deviceId: 'device-id',
|
|
|
|
originalPath: '/data/user1/photo.jpg',
|
|
|
|
checksum: Buffer.from('file hash', 'utf8'),
|
2025-07-15 14:50:13 -04:00
|
|
|
type: AssetType.Image,
|
2024-08-19 20:03:33 -04:00
|
|
|
files,
|
2024-03-29 03:51:07 +01:00
|
|
|
thumbhash: Buffer.from('blablabla', 'base64'),
|
|
|
|
encodedVideoPath: null,
|
|
|
|
createdAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
updatedAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
localDateTime: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
isFavorite: true,
|
|
|
|
isExternal: true,
|
|
|
|
duration: null,
|
|
|
|
livePhotoVideo: null,
|
|
|
|
livePhotoVideoId: null,
|
|
|
|
libraryId: 'library-id',
|
|
|
|
sharedLinks: [],
|
|
|
|
originalFileName: 'photo.jpg',
|
|
|
|
faces: [],
|
|
|
|
deletedAt: null,
|
|
|
|
sidecarPath: null,
|
|
|
|
exifInfo: {
|
|
|
|
fileSizeInByte: 5000,
|
2025-04-10 18:36:29 +02:00
|
|
|
} as Exif,
|
2024-05-16 13:08:37 -04:00
|
|
|
duplicateId: null,
|
2024-09-25 19:26:19 +02:00
|
|
|
isOffline: false,
|
2025-07-15 14:50:13 -04:00
|
|
|
visibility: AssetVisibility.Timeline,
|
2024-03-29 03:51:07 +01:00
|
|
|
}),
|
2024-10-11 00:44:38 -04:00
|
|
|
|
2025-04-16 20:08:49 +02:00
|
|
|
imageDng: Object.freeze({
|
2024-04-19 11:50:13 -04:00
|
|
|
id: 'asset-id',
|
2025-07-15 14:50:13 -04:00
|
|
|
status: AssetStatus.Active,
|
2024-04-19 11:50:13 -04:00
|
|
|
deviceAssetId: 'device-asset-id',
|
|
|
|
fileModifiedAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
fileCreatedAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
owner: userStub.user1,
|
|
|
|
ownerId: 'user-id',
|
|
|
|
deviceId: 'device-id',
|
|
|
|
originalPath: '/original/path.dng',
|
|
|
|
checksum: Buffer.from('file hash', 'utf8'),
|
2025-07-15 14:50:13 -04:00
|
|
|
type: AssetType.Image,
|
2024-08-19 20:03:33 -04:00
|
|
|
files,
|
2024-04-19 11:50:13 -04:00
|
|
|
thumbhash: Buffer.from('blablabla', 'base64'),
|
|
|
|
encodedVideoPath: null,
|
|
|
|
createdAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
updatedAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
localDateTime: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
isFavorite: true,
|
|
|
|
duration: null,
|
|
|
|
isExternal: false,
|
|
|
|
livePhotoVideo: null,
|
|
|
|
livePhotoVideoId: null,
|
|
|
|
sharedLinks: [],
|
2025-04-01 01:24:28 +08:00
|
|
|
originalFileName: 'asset-id.dng',
|
|
|
|
faces: [],
|
|
|
|
deletedAt: null,
|
|
|
|
sidecarPath: null,
|
|
|
|
exifInfo: {
|
|
|
|
fileSizeInByte: 5000,
|
|
|
|
profileDescription: 'Adobe RGB',
|
|
|
|
bitsPerSample: 14,
|
2025-04-10 18:36:29 +02:00
|
|
|
} as Exif,
|
2025-04-01 01:24:28 +08:00
|
|
|
duplicateId: null,
|
|
|
|
isOffline: false,
|
2025-04-18 23:10:34 +02:00
|
|
|
updateId: '42',
|
|
|
|
libraryId: null,
|
|
|
|
stackId: null,
|
2025-07-15 14:50:13 -04:00
|
|
|
visibility: AssetVisibility.Timeline,
|
2025-04-01 01:24:28 +08:00
|
|
|
}),
|
|
|
|
|
2025-04-16 20:08:49 +02:00
|
|
|
imageHif: Object.freeze({
|
2025-04-01 01:24:28 +08:00
|
|
|
id: 'asset-id',
|
2025-07-15 14:50:13 -04:00
|
|
|
status: AssetStatus.Active,
|
2025-04-01 01:24:28 +08:00
|
|
|
deviceAssetId: 'device-asset-id',
|
|
|
|
fileModifiedAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
fileCreatedAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
owner: userStub.user1,
|
|
|
|
ownerId: 'user-id',
|
|
|
|
deviceId: 'device-id',
|
|
|
|
originalPath: '/original/path.hif',
|
|
|
|
checksum: Buffer.from('file hash', 'utf8'),
|
2025-07-15 14:50:13 -04:00
|
|
|
type: AssetType.Image,
|
2025-04-01 01:24:28 +08:00
|
|
|
files,
|
|
|
|
thumbhash: Buffer.from('blablabla', 'base64'),
|
|
|
|
encodedVideoPath: null,
|
|
|
|
createdAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
updatedAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
localDateTime: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
isFavorite: true,
|
|
|
|
duration: null,
|
|
|
|
isExternal: false,
|
|
|
|
livePhotoVideo: null,
|
|
|
|
livePhotoVideoId: null,
|
|
|
|
sharedLinks: [],
|
|
|
|
originalFileName: 'asset-id.hif',
|
2024-04-19 11:50:13 -04:00
|
|
|
faces: [],
|
|
|
|
deletedAt: null,
|
|
|
|
sidecarPath: null,
|
|
|
|
exifInfo: {
|
|
|
|
fileSizeInByte: 5000,
|
|
|
|
profileDescription: 'Adobe RGB',
|
|
|
|
bitsPerSample: 14,
|
2025-04-10 18:36:29 +02:00
|
|
|
} as Exif,
|
2024-05-16 13:08:37 -04:00
|
|
|
duplicateId: null,
|
2024-09-25 19:26:19 +02:00
|
|
|
isOffline: false,
|
2025-04-18 23:10:34 +02:00
|
|
|
updateId: '42',
|
|
|
|
libraryId: null,
|
|
|
|
stackId: null,
|
2025-07-15 14:50:13 -04:00
|
|
|
visibility: AssetVisibility.Timeline,
|
2024-05-16 13:08:37 -04:00
|
|
|
}),
|
2023-07-31 21:28:07 -04:00
|
|
|
};
|