2025-04-10 15:53:21 +01:00
|
|
|
import { UserAdmin } from 'src/database';
|
2025-02-12 15:23:08 -05:00
|
|
|
import { UserAvatarColor, UserMetadataKey, UserStatus } from 'src/enum';
|
2024-03-20 19:32:04 +01:00
|
|
|
import { authStub } from 'test/fixtures/auth.stub';
|
2023-07-31 21:28:07 -04:00
|
|
|
|
|
|
|
|
export const userStub = {
|
2025-04-10 15:53:21 +01:00
|
|
|
admin: <UserAdmin>{
|
2023-12-09 23:34:12 -05:00
|
|
|
...authStub.admin.user,
|
2025-02-12 15:23:08 -05:00
|
|
|
status: UserStatus.ACTIVE,
|
|
|
|
|
profileChangedAt: new Date('2021-01-01'),
|
2023-11-11 20:03:32 -05:00
|
|
|
name: 'admin_name',
|
2024-10-18 13:51:34 -06:00
|
|
|
id: 'admin_id',
|
2023-07-31 21:28:07 -04:00
|
|
|
storageLabel: 'admin',
|
|
|
|
|
oauthId: '',
|
|
|
|
|
shouldChangePassword: false,
|
|
|
|
|
profileImagePath: '',
|
|
|
|
|
createdAt: new Date('2021-01-01'),
|
|
|
|
|
deletedAt: null,
|
|
|
|
|
updatedAt: new Date('2021-01-01'),
|
2024-05-22 08:13:36 -04:00
|
|
|
metadata: [],
|
2024-01-12 18:43:36 -06:00
|
|
|
quotaSizeInBytes: null,
|
|
|
|
|
quotaUsageInBytes: 0,
|
2025-04-10 15:53:21 +01:00
|
|
|
},
|
|
|
|
|
user1: <UserAdmin>{
|
2023-12-09 23:34:12 -05:00
|
|
|
...authStub.user1.user,
|
2025-02-12 15:23:08 -05:00
|
|
|
status: UserStatus.ACTIVE,
|
|
|
|
|
profileChangedAt: new Date('2021-01-01'),
|
2023-11-11 20:03:32 -05:00
|
|
|
name: 'immich_name',
|
2023-07-31 21:28:07 -04:00
|
|
|
storageLabel: null,
|
|
|
|
|
oauthId: '',
|
|
|
|
|
shouldChangePassword: false,
|
|
|
|
|
profileImagePath: '',
|
|
|
|
|
createdAt: new Date('2021-01-01'),
|
|
|
|
|
deletedAt: null,
|
|
|
|
|
updatedAt: new Date('2021-01-01'),
|
2024-05-22 08:13:36 -04:00
|
|
|
metadata: [
|
|
|
|
|
{
|
|
|
|
|
key: UserMetadataKey.PREFERENCES,
|
|
|
|
|
value: { avatar: { color: UserAvatarColor.PRIMARY } },
|
|
|
|
|
},
|
|
|
|
|
],
|
2024-01-12 18:43:36 -06:00
|
|
|
quotaSizeInBytes: null,
|
|
|
|
|
quotaUsageInBytes: 0,
|
2025-04-10 15:53:21 +01:00
|
|
|
},
|
|
|
|
|
user2: <UserAdmin>{
|
2023-12-09 23:34:12 -05:00
|
|
|
...authStub.user2.user,
|
2025-02-12 15:23:08 -05:00
|
|
|
status: UserStatus.ACTIVE,
|
|
|
|
|
profileChangedAt: new Date('2021-01-01'),
|
|
|
|
|
metadata: [],
|
2023-11-11 20:03:32 -05:00
|
|
|
name: 'immich_name',
|
2023-07-31 21:28:07 -04:00
|
|
|
storageLabel: null,
|
|
|
|
|
oauthId: '',
|
|
|
|
|
shouldChangePassword: false,
|
|
|
|
|
profileImagePath: '',
|
|
|
|
|
createdAt: new Date('2021-01-01'),
|
|
|
|
|
deletedAt: null,
|
|
|
|
|
updatedAt: new Date('2021-01-01'),
|
2024-01-12 18:43:36 -06:00
|
|
|
quotaSizeInBytes: null,
|
|
|
|
|
quotaUsageInBytes: 0,
|
2025-04-10 15:53:21 +01:00
|
|
|
},
|
|
|
|
|
storageLabel: <UserAdmin>{
|
2023-12-09 23:34:12 -05:00
|
|
|
...authStub.user1.user,
|
2025-02-12 15:23:08 -05:00
|
|
|
status: UserStatus.ACTIVE,
|
|
|
|
|
profileChangedAt: new Date('2021-01-01'),
|
|
|
|
|
metadata: [],
|
2023-11-11 20:03:32 -05:00
|
|
|
name: 'immich_name',
|
2023-07-31 21:28:07 -04:00
|
|
|
storageLabel: 'label-1',
|
2023-09-20 13:16:33 +02:00
|
|
|
oauthId: '',
|
|
|
|
|
shouldChangePassword: false,
|
|
|
|
|
profileImagePath: '',
|
|
|
|
|
createdAt: new Date('2021-01-01'),
|
|
|
|
|
deletedAt: null,
|
|
|
|
|
updatedAt: new Date('2021-01-01'),
|
2024-01-12 18:43:36 -06:00
|
|
|
quotaSizeInBytes: null,
|
|
|
|
|
quotaUsageInBytes: 0,
|
2025-04-10 15:53:21 +01:00
|
|
|
},
|
|
|
|
|
profilePath: <UserAdmin>{
|
2023-12-09 23:34:12 -05:00
|
|
|
...authStub.user1.user,
|
2025-02-12 15:23:08 -05:00
|
|
|
status: UserStatus.ACTIVE,
|
|
|
|
|
profileChangedAt: new Date('2021-01-01'),
|
|
|
|
|
metadata: [],
|
2023-11-11 20:03:32 -05:00
|
|
|
name: 'immich_name',
|
2023-10-30 19:38:34 -04:00
|
|
|
storageLabel: 'label-1',
|
|
|
|
|
oauthId: '',
|
|
|
|
|
shouldChangePassword: false,
|
|
|
|
|
profileImagePath: '/path/to/profile.jpg',
|
|
|
|
|
createdAt: new Date('2021-01-01'),
|
|
|
|
|
deletedAt: null,
|
|
|
|
|
updatedAt: new Date('2021-01-01'),
|
2024-01-12 18:43:36 -06:00
|
|
|
quotaSizeInBytes: null,
|
|
|
|
|
quotaUsageInBytes: 0,
|
2025-04-10 15:53:21 +01:00
|
|
|
},
|
2023-07-31 21:28:07 -04:00
|
|
|
};
|