|
@@ -196,7 +196,37 @@ export const assetEntityStub = {
|
|
|
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'),
|
|
|
+ mimeType: null,
|
|
|
+ isFavorite: true,
|
|
|
+ isArchived: false,
|
|
|
+ duration: null,
|
|
|
+ isVisible: true,
|
|
|
+ livePhotoVideo: null,
|
|
|
+ livePhotoVideoId: null,
|
|
|
+ tags: [],
|
|
|
+ sharedLinks: [],
|
|
|
+ faces: [],
|
|
|
+ sidecarPath: null,
|
|
|
+ }),
|
|
|
+ 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: userEntityStub.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: 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'),
|
|
@@ -209,6 +239,37 @@ export const assetEntityStub = {
|
|
|
livePhotoVideoId: null,
|
|
|
tags: [],
|
|
|
sharedLinks: [],
|
|
|
+ originalFileName: 'asset-id.ext',
|
|
|
+ faces: [],
|
|
|
+ sidecarPath: null,
|
|
|
+ }),
|
|
|
+ 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: userEntityStub.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'),
|
|
|
+ mimeType: null,
|
|
|
+ isFavorite: true,
|
|
|
+ isArchived: false,
|
|
|
+ duration: null,
|
|
|
+ isVisible: true,
|
|
|
+ livePhotoVideo: null,
|
|
|
+ livePhotoVideoId: null,
|
|
|
+ tags: [],
|
|
|
+ sharedLinks: [],
|
|
|
+ originalFileName: 'asset-id.ext',
|
|
|
faces: [],
|
|
|
sidecarPath: null,
|
|
|
}),
|
|
@@ -224,7 +285,8 @@ export const assetEntityStub = {
|
|
|
resizePath: '/uploads/user-id/thumbs/path.ext',
|
|
|
checksum: Buffer.from('file hash', 'utf8'),
|
|
|
type: AssetType.IMAGE,
|
|
|
- webpPath: null,
|
|
|
+ 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'),
|
|
@@ -255,6 +317,7 @@ export const assetEntityStub = {
|
|
|
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'),
|
|
@@ -305,6 +368,7 @@ export const assetEntityStub = {
|
|
|
sidecarPath: null,
|
|
|
type: AssetType.IMAGE,
|
|
|
webpPath: null,
|
|
|
+ thumbhash: null,
|
|
|
encodedVideoPath: null,
|
|
|
createdAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
|
updatedAt: new Date('2023-02-23T05:06:29.716Z'),
|
|
@@ -334,6 +398,7 @@ export const assetEntityStub = {
|
|
|
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,
|
|
@@ -507,6 +572,7 @@ const assetResponse: AssetResponseDto = {
|
|
|
originalPath: 'fake_path/jpeg',
|
|
|
originalFileName: 'asset_1.jpeg',
|
|
|
resized: false,
|
|
|
+ thumbhash: null,
|
|
|
fileModifiedAt: today,
|
|
|
fileCreatedAt: today,
|
|
|
updatedAt: today,
|
|
@@ -787,6 +853,7 @@ export const sharedLinkStub = {
|
|
|
clipEmbedding: [0.12, 0.13, 0.14],
|
|
|
},
|
|
|
webpPath: '',
|
|
|
+ thumbhash: null,
|
|
|
encodedVideoPath: '',
|
|
|
duration: null,
|
|
|
isVisible: true,
|