You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-08-10 23:22:22 +02:00
refactor: enum casing (#19946)
This commit is contained in:
32
server/test/fixtures/shared-link.stub.ts
vendored
32
server/test/fixtures/shared-link.stub.ts
vendored
@@ -49,7 +49,7 @@ const assetResponse: AssetResponseDto = {
|
||||
deviceAssetId: 'device_asset_id_1',
|
||||
ownerId: 'user_id_1',
|
||||
deviceId: 'device_id_1',
|
||||
type: AssetType.VIDEO,
|
||||
type: AssetType.Video,
|
||||
originalMimeType: 'image/jpeg',
|
||||
originalPath: 'fake_path/jpeg',
|
||||
originalFileName: 'asset_1.jpeg',
|
||||
@@ -70,12 +70,12 @@ const assetResponse: AssetResponseDto = {
|
||||
isTrashed: false,
|
||||
libraryId: 'library-id',
|
||||
hasMetadata: true,
|
||||
visibility: AssetVisibility.TIMELINE,
|
||||
visibility: AssetVisibility.Timeline,
|
||||
};
|
||||
|
||||
const assetResponseWithoutMetadata = {
|
||||
id: 'id_1',
|
||||
type: AssetType.VIDEO,
|
||||
type: AssetType.Video,
|
||||
originalMimeType: 'image/jpeg',
|
||||
thumbhash: null,
|
||||
localDateTime: today,
|
||||
@@ -99,7 +99,7 @@ const albumResponse: AlbumResponseDto = {
|
||||
assets: [],
|
||||
assetCount: 1,
|
||||
isActivityEnabled: true,
|
||||
order: AssetOrder.DESC,
|
||||
order: AssetOrder.Desc,
|
||||
};
|
||||
|
||||
export const sharedLinkStub = {
|
||||
@@ -107,7 +107,7 @@ export const sharedLinkStub = {
|
||||
id: '123',
|
||||
userId: authStub.admin.user.id,
|
||||
key: sharedLinkBytes,
|
||||
type: SharedLinkType.INDIVIDUAL,
|
||||
type: SharedLinkType.Individual,
|
||||
createdAt: today,
|
||||
expiresAt: tomorrow,
|
||||
allowUpload: true,
|
||||
@@ -124,7 +124,7 @@ export const sharedLinkStub = {
|
||||
userId: authStub.admin.user.id,
|
||||
user: userStub.admin,
|
||||
key: sharedLinkBytes,
|
||||
type: SharedLinkType.ALBUM,
|
||||
type: SharedLinkType.Album,
|
||||
createdAt: today,
|
||||
expiresAt: tomorrow,
|
||||
allowUpload: true,
|
||||
@@ -141,7 +141,7 @@ export const sharedLinkStub = {
|
||||
userId: authStub.admin.user.id,
|
||||
user: userStub.admin,
|
||||
key: sharedLinkBytes,
|
||||
type: SharedLinkType.ALBUM,
|
||||
type: SharedLinkType.Album,
|
||||
createdAt: today,
|
||||
expiresAt: yesterday,
|
||||
allowUpload: true,
|
||||
@@ -157,7 +157,7 @@ export const sharedLinkStub = {
|
||||
id: '123',
|
||||
userId: authStub.admin.user.id,
|
||||
key: sharedLinkBytes,
|
||||
type: SharedLinkType.ALBUM,
|
||||
type: SharedLinkType.Album,
|
||||
createdAt: today,
|
||||
expiresAt: tomorrow,
|
||||
allowUpload: false,
|
||||
@@ -182,16 +182,16 @@ export const sharedLinkStub = {
|
||||
albumUsers: [],
|
||||
sharedLinks: [],
|
||||
isActivityEnabled: true,
|
||||
order: AssetOrder.DESC,
|
||||
order: AssetOrder.Desc,
|
||||
assets: [
|
||||
{
|
||||
id: 'id_1',
|
||||
status: AssetStatus.ACTIVE,
|
||||
status: AssetStatus.Active,
|
||||
owner: undefined as unknown as UserAdmin,
|
||||
ownerId: 'user_id_1',
|
||||
deviceAssetId: 'device_asset_id_1',
|
||||
deviceId: 'device_id_1',
|
||||
type: AssetType.VIDEO,
|
||||
type: AssetType.Video,
|
||||
originalPath: 'fake_path/jpeg',
|
||||
checksum: Buffer.from('file hash', 'utf8'),
|
||||
fileModifiedAt: today,
|
||||
@@ -251,7 +251,7 @@ export const sharedLinkStub = {
|
||||
updateId: '42',
|
||||
libraryId: null,
|
||||
stackId: null,
|
||||
visibility: AssetVisibility.TIMELINE,
|
||||
visibility: AssetVisibility.Timeline,
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -260,7 +260,7 @@ export const sharedLinkStub = {
|
||||
id: '123',
|
||||
userId: authStub.admin.user.id,
|
||||
key: sharedLinkBytes,
|
||||
type: SharedLinkType.ALBUM,
|
||||
type: SharedLinkType.Album,
|
||||
createdAt: today,
|
||||
expiresAt: tomorrow,
|
||||
allowUpload: true,
|
||||
@@ -286,7 +286,7 @@ export const sharedLinkResponseStub = {
|
||||
id: '123',
|
||||
key: sharedLinkBytes.toString('base64url'),
|
||||
showMetadata: true,
|
||||
type: SharedLinkType.ALBUM,
|
||||
type: SharedLinkType.Album,
|
||||
userId: 'admin_id',
|
||||
}),
|
||||
expired: Object.freeze<SharedLinkResponseDto>({
|
||||
@@ -301,14 +301,14 @@ export const sharedLinkResponseStub = {
|
||||
id: '123',
|
||||
key: sharedLinkBytes.toString('base64url'),
|
||||
showMetadata: true,
|
||||
type: SharedLinkType.ALBUM,
|
||||
type: SharedLinkType.Album,
|
||||
userId: 'admin_id',
|
||||
}),
|
||||
readonlyNoMetadata: Object.freeze<SharedLinkResponseDto>({
|
||||
id: '123',
|
||||
userId: 'admin_id',
|
||||
key: sharedLinkBytes.toString('base64url'),
|
||||
type: SharedLinkType.ALBUM,
|
||||
type: SharedLinkType.Album,
|
||||
createdAt: today,
|
||||
expiresAt: tomorrow,
|
||||
description: null,
|
||||
|
Reference in New Issue
Block a user