2023-11-14 03:10:35 +00:00
|
|
|
import { UserAvatarColor, UserEntity } from '@app/infra/entities';
|
2023-08-01 01:28:07 +00:00
|
|
|
import { authStub } from './auth.stub';
|
|
|
|
|
2023-11-15 01:31:06 +00:00
|
|
|
export const userDto = {
|
|
|
|
user1: {
|
|
|
|
email: 'user1@immich.app',
|
|
|
|
password: 'Password123',
|
|
|
|
name: 'User 1',
|
|
|
|
},
|
|
|
|
user2: {
|
|
|
|
email: 'user2@immich.app',
|
|
|
|
password: 'Password123',
|
|
|
|
name: 'User 2',
|
|
|
|
},
|
|
|
|
user3: {
|
|
|
|
email: 'user3@immich.app',
|
|
|
|
password: 'Password123',
|
|
|
|
name: 'User 3',
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2023-08-01 01:28:07 +00:00
|
|
|
export const userStub = {
|
|
|
|
admin: Object.freeze<UserEntity>({
|
|
|
|
...authStub.admin,
|
|
|
|
password: 'admin_password',
|
2023-11-12 01:03:32 +00:00
|
|
|
name: 'admin_name',
|
2023-08-01 01:28:07 +00:00
|
|
|
storageLabel: 'admin',
|
|
|
|
externalPath: null,
|
|
|
|
oauthId: '',
|
|
|
|
shouldChangePassword: false,
|
|
|
|
profileImagePath: '',
|
|
|
|
createdAt: new Date('2021-01-01'),
|
|
|
|
deletedAt: null,
|
|
|
|
updatedAt: new Date('2021-01-01'),
|
|
|
|
tags: [],
|
|
|
|
assets: [],
|
2023-08-10 02:01:16 +00:00
|
|
|
memoriesEnabled: true,
|
2023-11-14 03:10:35 +00:00
|
|
|
avatarColor: UserAvatarColor.PRIMARY,
|
2023-08-01 01:28:07 +00:00
|
|
|
}),
|
|
|
|
user1: Object.freeze<UserEntity>({
|
|
|
|
...authStub.user1,
|
|
|
|
password: 'immich_password',
|
2023-11-12 01:03:32 +00:00
|
|
|
name: 'immich_name',
|
2023-08-01 01:28:07 +00:00
|
|
|
storageLabel: null,
|
|
|
|
externalPath: null,
|
|
|
|
oauthId: '',
|
|
|
|
shouldChangePassword: false,
|
|
|
|
profileImagePath: '',
|
|
|
|
createdAt: new Date('2021-01-01'),
|
|
|
|
deletedAt: null,
|
|
|
|
updatedAt: new Date('2021-01-01'),
|
|
|
|
tags: [],
|
|
|
|
assets: [],
|
2023-08-10 02:01:16 +00:00
|
|
|
memoriesEnabled: true,
|
2023-11-14 03:10:35 +00:00
|
|
|
avatarColor: UserAvatarColor.PRIMARY,
|
2023-08-01 01:28:07 +00:00
|
|
|
}),
|
|
|
|
user2: Object.freeze<UserEntity>({
|
|
|
|
...authStub.user2,
|
|
|
|
password: 'immich_password',
|
2023-11-12 01:03:32 +00:00
|
|
|
name: 'immich_name',
|
2023-08-01 01:28:07 +00:00
|
|
|
storageLabel: null,
|
|
|
|
externalPath: null,
|
|
|
|
oauthId: '',
|
|
|
|
shouldChangePassword: false,
|
|
|
|
profileImagePath: '',
|
|
|
|
createdAt: new Date('2021-01-01'),
|
|
|
|
deletedAt: null,
|
|
|
|
updatedAt: new Date('2021-01-01'),
|
|
|
|
tags: [],
|
|
|
|
assets: [],
|
2023-08-10 02:01:16 +00:00
|
|
|
memoriesEnabled: true,
|
2023-11-14 03:10:35 +00:00
|
|
|
avatarColor: UserAvatarColor.PRIMARY,
|
2023-08-01 01:28:07 +00:00
|
|
|
}),
|
|
|
|
storageLabel: Object.freeze<UserEntity>({
|
|
|
|
...authStub.user1,
|
|
|
|
password: 'immich_password',
|
2023-11-12 01:03:32 +00:00
|
|
|
name: 'immich_name',
|
2023-08-01 01:28:07 +00:00
|
|
|
storageLabel: 'label-1',
|
|
|
|
externalPath: null,
|
|
|
|
oauthId: '',
|
|
|
|
shouldChangePassword: false,
|
|
|
|
profileImagePath: '',
|
|
|
|
createdAt: new Date('2021-01-01'),
|
|
|
|
deletedAt: null,
|
|
|
|
updatedAt: new Date('2021-01-01'),
|
|
|
|
tags: [],
|
|
|
|
assets: [],
|
2023-08-10 02:01:16 +00:00
|
|
|
memoriesEnabled: true,
|
2023-11-14 03:10:35 +00:00
|
|
|
avatarColor: UserAvatarColor.PRIMARY,
|
2023-08-01 01:28:07 +00:00
|
|
|
}),
|
2023-09-20 11:16:33 +00:00
|
|
|
externalPath1: Object.freeze<UserEntity>({
|
|
|
|
...authStub.user1,
|
|
|
|
password: 'immich_password',
|
2023-11-12 01:03:32 +00:00
|
|
|
name: 'immich_name',
|
2023-09-20 11:16:33 +00:00
|
|
|
storageLabel: 'label-1',
|
|
|
|
externalPath: '/data/user1',
|
|
|
|
oauthId: '',
|
|
|
|
shouldChangePassword: false,
|
|
|
|
profileImagePath: '',
|
|
|
|
createdAt: new Date('2021-01-01'),
|
|
|
|
deletedAt: null,
|
|
|
|
updatedAt: new Date('2021-01-01'),
|
|
|
|
tags: [],
|
|
|
|
assets: [],
|
|
|
|
memoriesEnabled: true,
|
2023-11-14 03:10:35 +00:00
|
|
|
avatarColor: UserAvatarColor.PRIMARY,
|
2023-09-20 11:16:33 +00:00
|
|
|
}),
|
|
|
|
externalPath2: Object.freeze<UserEntity>({
|
|
|
|
...authStub.user1,
|
|
|
|
password: 'immich_password',
|
2023-11-12 01:03:32 +00:00
|
|
|
name: 'immich_name',
|
2023-09-20 11:16:33 +00:00
|
|
|
storageLabel: 'label-1',
|
|
|
|
externalPath: '/data/user2',
|
|
|
|
oauthId: '',
|
|
|
|
shouldChangePassword: false,
|
|
|
|
profileImagePath: '',
|
|
|
|
createdAt: new Date('2021-01-01'),
|
|
|
|
deletedAt: null,
|
|
|
|
updatedAt: new Date('2021-01-01'),
|
|
|
|
tags: [],
|
|
|
|
assets: [],
|
|
|
|
memoriesEnabled: true,
|
2023-11-14 03:10:35 +00:00
|
|
|
avatarColor: UserAvatarColor.PRIMARY,
|
2023-09-20 11:16:33 +00:00
|
|
|
}),
|
2023-10-30 23:38:34 +00:00
|
|
|
profilePath: Object.freeze<UserEntity>({
|
|
|
|
...authStub.user1,
|
|
|
|
password: 'immich_password',
|
2023-11-12 01:03:32 +00:00
|
|
|
name: 'immich_name',
|
2023-10-30 23:38:34 +00:00
|
|
|
storageLabel: 'label-1',
|
|
|
|
externalPath: null,
|
|
|
|
oauthId: '',
|
|
|
|
shouldChangePassword: false,
|
|
|
|
profileImagePath: '/path/to/profile.jpg',
|
|
|
|
createdAt: new Date('2021-01-01'),
|
|
|
|
deletedAt: null,
|
|
|
|
updatedAt: new Date('2021-01-01'),
|
|
|
|
tags: [],
|
|
|
|
assets: [],
|
|
|
|
memoriesEnabled: true,
|
2023-11-14 03:10:35 +00:00
|
|
|
avatarColor: UserAvatarColor.PRIMARY,
|
2023-10-30 23:38:34 +00:00
|
|
|
}),
|
2023-08-01 01:28:07 +00:00
|
|
|
};
|