2023-08-01 03:28:07 +02:00
|
|
|
import { AssetEntity, AssetType, ExifEntity } from '@app/infra/entities';
|
|
|
|
import { authStub } from './auth.stub';
|
|
|
|
import { fileStub } from './file.stub';
|
2023-09-20 13:16:33 +02:00
|
|
|
import { libraryStub } from './library.stub';
|
2023-08-01 03:28:07 +02:00
|
|
|
import { userStub } from './user.stub';
|
|
|
|
|
|
|
|
export const assetStub = {
|
|
|
|
noResizePath: Object.freeze<AssetEntity>({
|
|
|
|
id: 'asset-id',
|
|
|
|
originalFileName: 'IMG_123',
|
|
|
|
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',
|
|
|
|
resizePath: null,
|
|
|
|
checksum: Buffer.from('file hash', 'utf8'),
|
|
|
|
type: AssetType.IMAGE,
|
|
|
|
webpPath: '/uploads/user-id/webp/path.ext',
|
|
|
|
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-05 00:11:11 +02:00
|
|
|
localDateTime: new Date('2023-02-23T05:06:29.716Z'),
|
2023-08-01 03:28:07 +02:00
|
|
|
isFavorite: true,
|
|
|
|
isArchived: false,
|
|
|
|
duration: null,
|
|
|
|
isVisible: true,
|
|
|
|
livePhotoVideo: null,
|
|
|
|
livePhotoVideoId: null,
|
|
|
|
tags: [],
|
|
|
|
sharedLinks: [],
|
|
|
|
faces: [],
|
|
|
|
sidecarPath: null,
|
|
|
|
isReadOnly: false,
|
2023-10-06 09:01:14 +02:00
|
|
|
deletedAt: null,
|
2023-09-20 13:16:33 +02:00
|
|
|
isOffline: false,
|
|
|
|
isExternal: false,
|
|
|
|
libraryId: 'library-id',
|
|
|
|
library: libraryStub.uploadLibrary1,
|
2023-08-01 03:28:07 +02:00
|
|
|
}),
|
2023-10-22 04:38:07 +02:00
|
|
|
|
2023-08-01 03:28:07 +02:00
|
|
|
noWebpPath: Object.freeze<AssetEntity>({
|
|
|
|
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: 'upload/library/IMG_456.jpg',
|
|
|
|
resizePath: '/uploads/user-id/thumbs/path.ext',
|
|
|
|
checksum: Buffer.from('file hash', 'utf8'),
|
|
|
|
type: AssetType.IMAGE,
|
|
|
|
webpPath: null,
|
|
|
|
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-05 00:11:11 +02:00
|
|
|
localDateTime: new Date('2023-02-23T05:06:29.716Z'),
|
2023-08-01 03:28:07 +02:00
|
|
|
isFavorite: true,
|
|
|
|
isArchived: false,
|
|
|
|
duration: null,
|
|
|
|
isVisible: true,
|
|
|
|
livePhotoVideo: null,
|
|
|
|
livePhotoVideoId: null,
|
|
|
|
tags: [],
|
|
|
|
sharedLinks: [],
|
|
|
|
originalFileName: 'IMG_456',
|
|
|
|
faces: [],
|
|
|
|
sidecarPath: null,
|
|
|
|
isReadOnly: false,
|
2023-09-20 13:16:33 +02:00
|
|
|
isOffline: false,
|
|
|
|
isExternal: false,
|
|
|
|
libraryId: 'library-id',
|
|
|
|
library: libraryStub.uploadLibrary1,
|
2023-08-01 03:28:07 +02:00
|
|
|
exifInfo: {
|
|
|
|
fileSizeInByte: 123_000,
|
|
|
|
} as ExifEntity,
|
2023-10-06 09:01:14 +02:00
|
|
|
deletedAt: null,
|
2023-08-01 03:28:07 +02:00
|
|
|
}),
|
2023-10-22 04:38:07 +02:00
|
|
|
|
2023-08-01 03:28:07 +02:00
|
|
|
noThumbhash: Object.freeze<AssetEntity>({
|
|
|
|
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.ext',
|
|
|
|
resizePath: '/uploads/user-id/thumbs/path.ext',
|
|
|
|
checksum: Buffer.from('file hash', 'utf8'),
|
|
|
|
type: AssetType.IMAGE,
|
|
|
|
webpPath: '/uploads/user-id/webp/path.ext',
|
|
|
|
thumbhash: null,
|
|
|
|
encodedVideoPath: null,
|
|
|
|
createdAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
updatedAt: new Date('2023-02-23T05:06:29.716Z'),
|
2023-10-05 00:11:11 +02:00
|
|
|
localDateTime: new Date('2023-02-23T05:06:29.716Z'),
|
2023-08-01 03:28:07 +02:00
|
|
|
isFavorite: true,
|
|
|
|
isArchived: false,
|
|
|
|
isReadOnly: false,
|
2023-09-20 13:16:33 +02:00
|
|
|
isOffline: false,
|
|
|
|
libraryId: 'library-id',
|
|
|
|
library: libraryStub.uploadLibrary1,
|
2023-08-01 03:28:07 +02:00
|
|
|
duration: null,
|
|
|
|
isVisible: true,
|
2023-09-20 13:16:33 +02:00
|
|
|
isExternal: false,
|
2023-08-01 03:28:07 +02:00
|
|
|
livePhotoVideo: null,
|
|
|
|
livePhotoVideoId: null,
|
|
|
|
tags: [],
|
|
|
|
sharedLinks: [],
|
|
|
|
originalFileName: 'asset-id.ext',
|
|
|
|
faces: [],
|
|
|
|
sidecarPath: null,
|
2023-10-06 09:01:14 +02:00
|
|
|
deletedAt: null,
|
2023-08-01 03:28:07 +02:00
|
|
|
}),
|
2023-10-22 04:38:07 +02:00
|
|
|
|
2023-10-11 04:14:44 +02:00
|
|
|
primaryImage: Object.freeze<AssetEntity>({
|
|
|
|
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.admin,
|
|
|
|
ownerId: 'admin-id',
|
|
|
|
deviceId: 'device-id',
|
|
|
|
originalPath: '/original/path.jpg',
|
|
|
|
resizePath: '/uploads/admin-id/thumbs/path.jpg',
|
|
|
|
checksum: Buffer.from('file hash', 'utf8'),
|
|
|
|
type: AssetType.IMAGE,
|
|
|
|
webpPath: '/uploads/admin-id/webp/path.ext',
|
|
|
|
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,
|
|
|
|
isArchived: false,
|
|
|
|
isReadOnly: false,
|
|
|
|
duration: null,
|
|
|
|
isVisible: true,
|
|
|
|
isExternal: false,
|
|
|
|
livePhotoVideo: null,
|
|
|
|
livePhotoVideoId: null,
|
|
|
|
isOffline: false,
|
|
|
|
libraryId: 'library-id',
|
|
|
|
library: libraryStub.uploadLibrary1,
|
|
|
|
tags: [],
|
|
|
|
sharedLinks: [],
|
|
|
|
originalFileName: 'asset-id.jpg',
|
|
|
|
faces: [],
|
|
|
|
deletedAt: null,
|
|
|
|
sidecarPath: null,
|
|
|
|
exifInfo: {
|
|
|
|
fileSizeInByte: 5_000,
|
|
|
|
} as ExifEntity,
|
2023-10-22 04:38:07 +02:00
|
|
|
stack: [{ id: 'stack-child-asset-1' } as AssetEntity, { id: 'stack-child-asset-2' } as AssetEntity],
|
2023-10-11 04:14:44 +02:00
|
|
|
}),
|
2023-10-22 04:38:07 +02:00
|
|
|
|
2023-08-01 03:28:07 +02:00
|
|
|
image: Object.freeze<AssetEntity>({
|
|
|
|
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',
|
|
|
|
resizePath: '/uploads/user-id/thumbs/path.jpg',
|
|
|
|
checksum: Buffer.from('file hash', 'utf8'),
|
|
|
|
type: AssetType.IMAGE,
|
|
|
|
webpPath: '/uploads/user-id/webp/path.ext',
|
|
|
|
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-05 00:11:11 +02:00
|
|
|
localDateTime: new Date('2023-02-23T05:06:29.716Z'),
|
2023-08-01 03:28:07 +02:00
|
|
|
isFavorite: true,
|
|
|
|
isArchived: false,
|
|
|
|
isReadOnly: false,
|
|
|
|
duration: null,
|
|
|
|
isVisible: true,
|
2023-09-20 13:16:33 +02:00
|
|
|
isExternal: false,
|
2023-08-01 03:28:07 +02:00
|
|
|
livePhotoVideo: null,
|
|
|
|
livePhotoVideoId: null,
|
2023-09-20 13:16:33 +02:00
|
|
|
isOffline: false,
|
|
|
|
libraryId: 'library-id',
|
|
|
|
library: libraryStub.uploadLibrary1,
|
|
|
|
tags: [],
|
|
|
|
sharedLinks: [],
|
|
|
|
originalFileName: 'asset-id.jpg',
|
|
|
|
faces: [],
|
2023-10-06 09:01:14 +02:00
|
|
|
deletedAt: null,
|
2023-09-20 13:16:33 +02:00
|
|
|
sidecarPath: null,
|
|
|
|
exifInfo: {
|
|
|
|
fileSizeInByte: 5_000,
|
|
|
|
} as ExifEntity,
|
|
|
|
}),
|
2023-10-22 04:38:07 +02:00
|
|
|
|
2023-09-20 13:16:33 +02:00
|
|
|
external: Object.freeze<AssetEntity>({
|
|
|
|
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: '/data/user1/photo.jpg',
|
|
|
|
resizePath: '/uploads/user-id/thumbs/path.jpg',
|
|
|
|
checksum: Buffer.from('file hash', 'utf8'),
|
|
|
|
type: AssetType.IMAGE,
|
|
|
|
webpPath: '/uploads/user-id/webp/path.ext',
|
|
|
|
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-05 00:11:11 +02:00
|
|
|
localDateTime: new Date('2023-02-23T05:06:29.716Z'),
|
2023-09-20 13:16:33 +02:00
|
|
|
isFavorite: true,
|
|
|
|
isArchived: false,
|
|
|
|
isReadOnly: false,
|
|
|
|
isExternal: true,
|
|
|
|
duration: null,
|
|
|
|
isVisible: true,
|
|
|
|
livePhotoVideo: null,
|
|
|
|
livePhotoVideoId: null,
|
|
|
|
isOffline: false,
|
|
|
|
libraryId: 'library-id',
|
2023-10-06 09:01:14 +02:00
|
|
|
library: libraryStub.externalLibrary1,
|
2023-09-20 13:16:33 +02:00
|
|
|
tags: [],
|
|
|
|
sharedLinks: [],
|
|
|
|
originalFileName: 'asset-id.jpg',
|
|
|
|
faces: [],
|
2023-10-06 09:01:14 +02:00
|
|
|
deletedAt: null,
|
2023-09-20 13:16:33 +02:00
|
|
|
sidecarPath: null,
|
|
|
|
exifInfo: {
|
|
|
|
fileSizeInByte: 5_000,
|
|
|
|
} as ExifEntity,
|
|
|
|
}),
|
2023-10-22 04:38:07 +02:00
|
|
|
|
2023-09-20 13:16:33 +02:00
|
|
|
offline: Object.freeze<AssetEntity>({
|
|
|
|
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',
|
|
|
|
resizePath: '/uploads/user-id/thumbs/path.jpg',
|
|
|
|
checksum: Buffer.from('file hash', 'utf8'),
|
|
|
|
type: AssetType.IMAGE,
|
|
|
|
webpPath: '/uploads/user-id/webp/path.ext',
|
|
|
|
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-05 00:11:11 +02:00
|
|
|
localDateTime: new Date('2023-02-23T05:06:29.716Z'),
|
2023-09-20 13:16:33 +02:00
|
|
|
isFavorite: true,
|
|
|
|
isArchived: false,
|
|
|
|
isReadOnly: false,
|
|
|
|
isExternal: false,
|
|
|
|
duration: null,
|
|
|
|
isVisible: true,
|
|
|
|
livePhotoVideo: null,
|
|
|
|
livePhotoVideoId: null,
|
|
|
|
isOffline: true,
|
|
|
|
libraryId: 'library-id',
|
|
|
|
library: libraryStub.uploadLibrary1,
|
2023-08-01 03:28:07 +02:00
|
|
|
tags: [],
|
|
|
|
sharedLinks: [],
|
|
|
|
originalFileName: 'asset-id.jpg',
|
|
|
|
faces: [],
|
|
|
|
sidecarPath: null,
|
|
|
|
exifInfo: {
|
|
|
|
fileSizeInByte: 5_000,
|
|
|
|
} as ExifEntity,
|
2023-10-06 09:01:14 +02:00
|
|
|
deletedAt: null,
|
2023-08-01 03:28:07 +02:00
|
|
|
}),
|
2023-10-22 04:38:07 +02:00
|
|
|
|
2023-08-01 03:28:07 +02:00
|
|
|
image1: Object.freeze<AssetEntity>({
|
|
|
|
id: 'asset-id-1',
|
|
|
|
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',
|
|
|
|
resizePath: '/uploads/user-id/thumbs/path.ext',
|
|
|
|
checksum: Buffer.from('file hash', 'utf8'),
|
|
|
|
type: AssetType.IMAGE,
|
|
|
|
webpPath: '/uploads/user-id/webp/path.ext',
|
|
|
|
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 09:01:14 +02:00
|
|
|
deletedAt: null,
|
2023-10-05 00:11:11 +02:00
|
|
|
localDateTime: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
isFavorite: true,
|
|
|
|
isArchived: false,
|
|
|
|
isReadOnly: false,
|
|
|
|
duration: null,
|
|
|
|
isVisible: true,
|
|
|
|
livePhotoVideo: null,
|
|
|
|
livePhotoVideoId: null,
|
|
|
|
libraryId: 'library-id',
|
|
|
|
library: libraryStub.uploadLibrary1,
|
|
|
|
isExternal: false,
|
|
|
|
isOffline: false,
|
|
|
|
tags: [],
|
|
|
|
sharedLinks: [],
|
|
|
|
originalFileName: 'asset-id.ext',
|
|
|
|
faces: [],
|
|
|
|
sidecarPath: null,
|
|
|
|
exifInfo: {
|
|
|
|
fileSizeInByte: 5_000,
|
|
|
|
} as ExifEntity,
|
|
|
|
}),
|
2023-10-22 04:38:07 +02:00
|
|
|
|
2023-10-05 00:11:11 +02:00
|
|
|
imageFrom2015: Object.freeze<AssetEntity>({
|
|
|
|
id: 'asset-id-1',
|
|
|
|
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',
|
|
|
|
resizePath: '/uploads/user-id/thumbs/path.ext',
|
|
|
|
checksum: Buffer.from('file hash', 'utf8'),
|
|
|
|
type: AssetType.IMAGE,
|
|
|
|
webpPath: '/uploads/user-id/webp/path.ext',
|
|
|
|
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-08-01 03:28:07 +02:00
|
|
|
isFavorite: true,
|
|
|
|
isArchived: false,
|
2023-09-20 13:16:33 +02:00
|
|
|
isExternal: false,
|
2023-08-01 03:28:07 +02:00
|
|
|
isReadOnly: false,
|
2023-09-20 13:16:33 +02:00
|
|
|
isOffline: false,
|
|
|
|
libraryId: 'library-id',
|
|
|
|
library: libraryStub.uploadLibrary1,
|
2023-08-01 03:28:07 +02:00
|
|
|
duration: null,
|
|
|
|
isVisible: true,
|
|
|
|
livePhotoVideo: null,
|
|
|
|
livePhotoVideoId: null,
|
|
|
|
tags: [],
|
|
|
|
sharedLinks: [],
|
|
|
|
originalFileName: 'asset-id.ext',
|
|
|
|
faces: [],
|
|
|
|
sidecarPath: null,
|
|
|
|
exifInfo: {
|
|
|
|
fileSizeInByte: 5_000,
|
|
|
|
} as ExifEntity,
|
2023-10-06 09:01:14 +02:00
|
|
|
deletedAt: null,
|
2023-08-01 03:28:07 +02:00
|
|
|
}),
|
2023-10-22 04:38:07 +02:00
|
|
|
|
2023-08-01 03:28:07 +02:00
|
|
|
video: Object.freeze<AssetEntity>({
|
|
|
|
id: 'asset-id',
|
|
|
|
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',
|
|
|
|
resizePath: '/uploads/user-id/thumbs/path.ext',
|
|
|
|
checksum: Buffer.from('file hash', 'utf8'),
|
|
|
|
type: AssetType.VIDEO,
|
|
|
|
webpPath: null,
|
|
|
|
thumbhash: null,
|
|
|
|
encodedVideoPath: null,
|
|
|
|
createdAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
updatedAt: new Date('2023-02-23T05:06:29.716Z'),
|
2023-10-05 00:11:11 +02:00
|
|
|
localDateTime: new Date('2023-02-23T05:06:29.716Z'),
|
2023-08-01 03:28:07 +02:00
|
|
|
isFavorite: true,
|
|
|
|
isArchived: false,
|
|
|
|
isReadOnly: false,
|
2023-09-20 13:16:33 +02:00
|
|
|
isExternal: false,
|
|
|
|
isOffline: false,
|
|
|
|
libraryId: 'library-id',
|
|
|
|
library: libraryStub.uploadLibrary1,
|
2023-08-01 03:28:07 +02:00
|
|
|
duration: null,
|
|
|
|
isVisible: true,
|
|
|
|
livePhotoVideo: null,
|
|
|
|
livePhotoVideoId: null,
|
|
|
|
tags: [],
|
|
|
|
sharedLinks: [],
|
|
|
|
faces: [],
|
|
|
|
sidecarPath: null,
|
|
|
|
exifInfo: {
|
|
|
|
fileSizeInByte: 100_000,
|
|
|
|
} as ExifEntity,
|
2023-10-06 09:01:14 +02:00
|
|
|
deletedAt: null,
|
2023-08-01 03:28:07 +02:00
|
|
|
}),
|
2023-10-22 04:38:07 +02:00
|
|
|
|
2023-08-01 03:28:07 +02:00
|
|
|
livePhotoMotionAsset: Object.freeze({
|
|
|
|
id: 'live-photo-motion-asset',
|
|
|
|
originalPath: fileStub.livePhotoMotion.originalPath,
|
2023-12-10 06:34:12 +02:00
|
|
|
ownerId: authStub.user1.user.id,
|
2023-08-01 03:28:07 +02:00
|
|
|
type: AssetType.VIDEO,
|
|
|
|
isVisible: false,
|
|
|
|
fileModifiedAt: new Date('2022-06-19T23:41:36.910Z'),
|
|
|
|
fileCreatedAt: new Date('2022-06-19T23:41:36.910Z'),
|
2023-09-20 13:16:33 +02:00
|
|
|
libraryId: 'library-id',
|
|
|
|
library: libraryStub.uploadLibrary1,
|
2023-08-01 03:28:07 +02:00
|
|
|
exifInfo: {
|
|
|
|
fileSizeInByte: 100_000,
|
|
|
|
},
|
|
|
|
} as AssetEntity),
|
|
|
|
|
|
|
|
livePhotoStillAsset: Object.freeze({
|
|
|
|
id: 'live-photo-still-asset',
|
|
|
|
originalPath: fileStub.livePhotoStill.originalPath,
|
2023-12-10 06:34:12 +02:00
|
|
|
ownerId: authStub.user1.user.id,
|
2023-08-01 03:28:07 +02:00
|
|
|
type: AssetType.IMAGE,
|
|
|
|
livePhotoVideoId: 'live-photo-motion-asset',
|
|
|
|
isVisible: true,
|
|
|
|
fileModifiedAt: new Date('2022-06-19T23:41:36.910Z'),
|
|
|
|
fileCreatedAt: new Date('2022-06-19T23:41:36.910Z'),
|
2023-09-20 13:16:33 +02:00
|
|
|
libraryId: 'library-id',
|
|
|
|
library: libraryStub.uploadLibrary1,
|
2023-08-01 03:28:07 +02:00
|
|
|
exifInfo: {
|
|
|
|
fileSizeInByte: 25_000,
|
|
|
|
},
|
|
|
|
} as AssetEntity),
|
|
|
|
|
|
|
|
withLocation: Object.freeze<AssetEntity>({
|
|
|
|
id: 'asset-with-favorite-id',
|
|
|
|
deviceAssetId: 'device-asset-id',
|
2023-10-31 12:08:34 +02:00
|
|
|
fileModifiedAt: new Date('2023-02-22T05:06:29.716Z'),
|
|
|
|
fileCreatedAt: new Date('2023-02-22T05:06:29.716Z'),
|
2023-08-01 03:28:07 +02:00
|
|
|
owner: userStub.user1,
|
|
|
|
ownerId: 'user-id',
|
|
|
|
deviceId: 'device-id',
|
|
|
|
checksum: Buffer.from('file hash', 'utf8'),
|
|
|
|
originalPath: '/original/path.ext',
|
|
|
|
resizePath: '/uploads/user-id/thumbs/path.ext',
|
|
|
|
sidecarPath: null,
|
|
|
|
type: AssetType.IMAGE,
|
|
|
|
webpPath: null,
|
|
|
|
thumbhash: null,
|
|
|
|
encodedVideoPath: null,
|
2023-10-31 12:08:34 +02:00
|
|
|
createdAt: new Date('2023-02-22T05:06:29.716Z'),
|
|
|
|
updatedAt: new Date('2023-02-22T05:06:29.716Z'),
|
|
|
|
localDateTime: new Date('2023-02-22T05:06:29.716Z'),
|
2023-08-01 03:28:07 +02:00
|
|
|
isFavorite: false,
|
|
|
|
isArchived: false,
|
|
|
|
isReadOnly: false,
|
2023-09-20 13:16:33 +02:00
|
|
|
isExternal: false,
|
|
|
|
isOffline: false,
|
|
|
|
libraryId: 'library-id',
|
|
|
|
library: libraryStub.uploadLibrary1,
|
2023-08-01 03:28:07 +02:00
|
|
|
duration: null,
|
|
|
|
isVisible: true,
|
|
|
|
livePhotoVideo: null,
|
|
|
|
livePhotoVideoId: null,
|
|
|
|
tags: [],
|
|
|
|
sharedLinks: [],
|
|
|
|
originalFileName: 'asset-id.ext',
|
|
|
|
faces: [],
|
|
|
|
exifInfo: {
|
|
|
|
latitude: 100,
|
|
|
|
longitude: 100,
|
|
|
|
fileSizeInByte: 23_456,
|
|
|
|
} as ExifEntity,
|
2023-10-06 09:01:14 +02:00
|
|
|
deletedAt: null,
|
2023-08-01 03:28:07 +02:00
|
|
|
}),
|
|
|
|
sidecar: Object.freeze<AssetEntity>({
|
|
|
|
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.ext',
|
|
|
|
resizePath: '/uploads/user-id/thumbs/path.ext',
|
|
|
|
thumbhash: null,
|
|
|
|
checksum: Buffer.from('file hash', 'utf8'),
|
|
|
|
type: AssetType.IMAGE,
|
|
|
|
webpPath: null,
|
|
|
|
encodedVideoPath: null,
|
|
|
|
createdAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
|
updatedAt: new Date('2023-02-23T05:06:29.716Z'),
|
2023-10-05 00:11:11 +02:00
|
|
|
localDateTime: new Date('2023-02-23T05:06:29.716Z'),
|
2023-08-01 03:28:07 +02:00
|
|
|
isFavorite: true,
|
|
|
|
isArchived: false,
|
|
|
|
isReadOnly: false,
|
2023-09-20 13:16:33 +02:00
|
|
|
isExternal: false,
|
|
|
|
isOffline: false,
|
|
|
|
libraryId: 'library-id',
|
|
|
|
library: libraryStub.uploadLibrary1,
|
2023-08-01 03:28:07 +02:00
|
|
|
duration: null,
|
|
|
|
isVisible: true,
|
|
|
|
livePhotoVideo: null,
|
|
|
|
livePhotoVideoId: null,
|
|
|
|
tags: [],
|
|
|
|
sharedLinks: [],
|
|
|
|
originalFileName: 'asset-id.ext',
|
|
|
|
faces: [],
|
|
|
|
sidecarPath: '/original/path.ext.xmp',
|
2023-10-06 09:01:14 +02:00
|
|
|
deletedAt: null,
|
|
|
|
}),
|
2023-10-22 04:38:07 +02:00
|
|
|
|
|
|
|
readOnly: Object.freeze<AssetEntity>({
|
2023-10-06 09:01:14 +02:00
|
|
|
id: 'read-only-asset',
|
2023-10-22 04:38:07 +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.ext',
|
|
|
|
resizePath: '/uploads/user-id/thumbs/path.ext',
|
|
|
|
thumbhash: null,
|
|
|
|
checksum: Buffer.from('file hash', 'utf8'),
|
|
|
|
type: AssetType.IMAGE,
|
|
|
|
webpPath: null,
|
|
|
|
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,
|
|
|
|
isArchived: false,
|
2023-10-06 09:01:14 +02:00
|
|
|
isReadOnly: true,
|
2023-10-22 04:38:07 +02:00
|
|
|
isExternal: false,
|
|
|
|
isOffline: false,
|
2023-10-06 09:01:14 +02:00
|
|
|
libraryId: 'library-id',
|
|
|
|
library: libraryStub.uploadLibrary1,
|
2023-10-22 04:38:07 +02:00
|
|
|
duration: null,
|
|
|
|
isVisible: true,
|
|
|
|
livePhotoVideo: null,
|
|
|
|
livePhotoVideoId: null,
|
|
|
|
tags: [],
|
|
|
|
sharedLinks: [],
|
|
|
|
originalFileName: 'asset-id.ext',
|
|
|
|
faces: [],
|
|
|
|
sidecarPath: '/original/path.ext.xmp',
|
|
|
|
deletedAt: null,
|
2023-08-01 03:28:07 +02:00
|
|
|
}),
|
2023-12-28 07:34:00 +02:00
|
|
|
|
|
|
|
hasEncodedVideo: Object.freeze<AssetEntity>({
|
|
|
|
id: 'asset-id',
|
|
|
|
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',
|
|
|
|
resizePath: '/uploads/user-id/thumbs/path.ext',
|
|
|
|
checksum: Buffer.from('file hash', 'utf8'),
|
|
|
|
type: AssetType.VIDEO,
|
|
|
|
webpPath: null,
|
|
|
|
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,
|
|
|
|
isArchived: false,
|
|
|
|
isReadOnly: false,
|
|
|
|
isExternal: false,
|
|
|
|
isOffline: false,
|
|
|
|
libraryId: 'library-id',
|
|
|
|
library: libraryStub.uploadLibrary1,
|
|
|
|
duration: null,
|
|
|
|
isVisible: true,
|
|
|
|
livePhotoVideo: null,
|
|
|
|
livePhotoVideoId: null,
|
|
|
|
tags: [],
|
|
|
|
sharedLinks: [],
|
|
|
|
faces: [],
|
|
|
|
sidecarPath: null,
|
|
|
|
exifInfo: {
|
|
|
|
fileSizeInByte: 100_000,
|
|
|
|
} as ExifEntity,
|
|
|
|
deletedAt: null,
|
|
|
|
}),
|
2023-08-01 03:28:07 +02:00
|
|
|
};
|