1
0
mirror of https://github.com/immich-app/immich.git synced 2025-08-07 23:03:36 +02:00

refactor: enum casing (#19946)

This commit is contained in:
Jason Rasmussen
2025-07-15 14:50:13 -04:00
committed by GitHub
parent 920d7de349
commit e73abe0762
174 changed files with 2675 additions and 2459 deletions

View File

@ -88,7 +88,7 @@ const authSharedLinkFactory = (sharedLink: Partial<AuthSharedLink> = {}) => {
const authApiKeyFactory = (apiKey: Partial<AuthApiKey> = {}) => ({
id: newUuid(),
permissions: [Permission.ALL],
permissions: [Permission.All],
...apiKey,
});
@ -154,7 +154,7 @@ const userFactory = (user: Partial<User> = {}) => ({
profileChangedAt: newDate(),
metadata: [
{
key: UserMetadataKey.ONBOARDING,
key: UserMetadataKey.Onboarding,
value: 'true',
},
] as UserMetadataItem[],
@ -178,7 +178,7 @@ const userAdminFactory = (user: Partial<UserAdmin> = {}) => {
oauthId = '',
quotaSizeInBytes = null,
quotaUsageInBytes = 0,
status = UserStatus.ACTIVE,
status = UserStatus.Active,
metadata = [],
} = user;
return {
@ -208,7 +208,7 @@ const assetFactory = (asset: Partial<MapAsset> = {}) => ({
updatedAt: newDate(),
deletedAt: null,
updateId: newUuidV7(),
status: AssetStatus.ACTIVE,
status: AssetStatus.Active,
checksum: newSha1(),
deviceAssetId: '',
deviceId: '',
@ -229,8 +229,8 @@ const assetFactory = (asset: Partial<MapAsset> = {}) => ({
sidecarPath: null,
stackId: null,
thumbhash: null,
type: AssetType.IMAGE,
visibility: AssetVisibility.TIMELINE,
type: AssetType.Image,
visibility: AssetVisibility.Timeline,
...asset,
});
@ -258,7 +258,7 @@ const apiKeyFactory = (apiKey: Partial<ApiKey> = {}) => ({
updatedAt: newDate(),
updateId: newUuidV7(),
name: 'Api Key',
permissions: [Permission.ALL],
permissions: [Permission.All],
...apiKey,
});
@ -284,7 +284,7 @@ const memoryFactory = (memory: Partial<Memory> = {}) => ({
updateId: newUuidV7(),
deletedAt: null,
ownerId: newUuid(),
type: MemoryType.ON_THIS_DAY,
type: MemoryType.OnThisDay,
data: { year: 2024 } as OnThisDayData,
isSaved: false,
memoryAt: newDate(),