mirror of
				https://github.com/immich-app/immich.git
				synced 2025-11-03 19:17:11 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			61 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			61 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
import { UserAdmin } from 'src/database';
 | 
						|
import { UserAvatarColor, UserMetadataKey, UserStatus } from 'src/enum';
 | 
						|
import { authStub } from 'test/fixtures/auth.stub';
 | 
						|
 | 
						|
export const userStub = {
 | 
						|
  admin: <UserAdmin>{
 | 
						|
    ...authStub.admin.user,
 | 
						|
    status: UserStatus.ACTIVE,
 | 
						|
    profileChangedAt: new Date('2021-01-01'),
 | 
						|
    name: 'admin_name',
 | 
						|
    id: 'admin_id',
 | 
						|
    storageLabel: 'admin',
 | 
						|
    oauthId: '',
 | 
						|
    shouldChangePassword: false,
 | 
						|
    profileImagePath: '',
 | 
						|
    createdAt: new Date('2021-01-01'),
 | 
						|
    deletedAt: null,
 | 
						|
    updatedAt: new Date('2021-01-01'),
 | 
						|
    metadata: [],
 | 
						|
    quotaSizeInBytes: null,
 | 
						|
    quotaUsageInBytes: 0,
 | 
						|
  },
 | 
						|
  user1: <UserAdmin>{
 | 
						|
    ...authStub.user1.user,
 | 
						|
    status: UserStatus.ACTIVE,
 | 
						|
    profileChangedAt: new Date('2021-01-01'),
 | 
						|
    name: 'immich_name',
 | 
						|
    storageLabel: null,
 | 
						|
    oauthId: '',
 | 
						|
    shouldChangePassword: false,
 | 
						|
    profileImagePath: '',
 | 
						|
    createdAt: new Date('2021-01-01'),
 | 
						|
    deletedAt: null,
 | 
						|
    updatedAt: new Date('2021-01-01'),
 | 
						|
    metadata: [
 | 
						|
      {
 | 
						|
        key: UserMetadataKey.PREFERENCES,
 | 
						|
        value: { avatar: { color: UserAvatarColor.PRIMARY } },
 | 
						|
      },
 | 
						|
    ],
 | 
						|
    quotaSizeInBytes: null,
 | 
						|
    quotaUsageInBytes: 0,
 | 
						|
  },
 | 
						|
  user2: <UserAdmin>{
 | 
						|
    ...authStub.user2.user,
 | 
						|
    status: UserStatus.ACTIVE,
 | 
						|
    profileChangedAt: new Date('2021-01-01'),
 | 
						|
    metadata: [],
 | 
						|
    name: 'immich_name',
 | 
						|
    storageLabel: null,
 | 
						|
    oauthId: '',
 | 
						|
    shouldChangePassword: false,
 | 
						|
    profileImagePath: '',
 | 
						|
    createdAt: new Date('2021-01-01'),
 | 
						|
    deletedAt: null,
 | 
						|
    updatedAt: new Date('2021-01-01'),
 | 
						|
    quotaSizeInBytes: null,
 | 
						|
    quotaUsageInBytes: 0,
 | 
						|
  },
 | 
						|
};
 |