2023-11-13 22:10:35 -05:00
|
|
|
import { UserAvatarColor, UserEntity } from '@app/infra/entities';
|
2023-07-31 20:28:07 -05:00
|
|
|
import { authStub } from './auth.stub';
|
|
|
|
|
2023-11-14 20:31:06 -05: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',
|
|
|
|
},
|
2024-01-12 19:43:36 -05:00
|
|
|
userWithQuota: {
|
|
|
|
email: 'quota-user@immich.app',
|
|
|
|
password: 'Password123',
|
|
|
|
name: 'User with quota',
|
|
|
|
quotaSizeInBytes: 42,
|
|
|
|
},
|
2023-11-14 20:31:06 -05:00
|
|
|
};
|
|
|
|
|
2023-07-31 20:28:07 -05:00
|
|
|
export const userStub = {
|
|
|
|
admin: Object.freeze<UserEntity>({
|
2023-12-09 23:34:12 -05:00
|
|
|
...authStub.admin.user,
|
2023-07-31 20:28:07 -05:00
|
|
|
password: 'admin_password',
|
2023-11-11 20:03:32 -05:00
|
|
|
name: 'admin_name',
|
2023-07-31 20:28:07 -05:00
|
|
|
storageLabel: 'admin',
|
|
|
|
oauthId: '',
|
|
|
|
shouldChangePassword: false,
|
|
|
|
profileImagePath: '',
|
|
|
|
createdAt: new Date('2021-01-01'),
|
|
|
|
deletedAt: null,
|
|
|
|
updatedAt: new Date('2021-01-01'),
|
|
|
|
tags: [],
|
|
|
|
assets: [],
|
2023-08-09 21:01:16 -05:00
|
|
|
memoriesEnabled: true,
|
2023-11-13 22:10:35 -05:00
|
|
|
avatarColor: UserAvatarColor.PRIMARY,
|
2024-01-12 19:43:36 -05:00
|
|
|
quotaSizeInBytes: null,
|
|
|
|
quotaUsageInBytes: 0,
|
2023-07-31 20:28:07 -05:00
|
|
|
}),
|
|
|
|
user1: Object.freeze<UserEntity>({
|
2023-12-09 23:34:12 -05:00
|
|
|
...authStub.user1.user,
|
2023-07-31 20:28:07 -05:00
|
|
|
password: 'immich_password',
|
2023-11-11 20:03:32 -05:00
|
|
|
name: 'immich_name',
|
2023-07-31 20:28:07 -05:00
|
|
|
storageLabel: null,
|
|
|
|
oauthId: '',
|
|
|
|
shouldChangePassword: false,
|
|
|
|
profileImagePath: '',
|
|
|
|
createdAt: new Date('2021-01-01'),
|
|
|
|
deletedAt: null,
|
|
|
|
updatedAt: new Date('2021-01-01'),
|
|
|
|
tags: [],
|
|
|
|
assets: [],
|
2023-08-09 21:01:16 -05:00
|
|
|
memoriesEnabled: true,
|
2023-11-13 22:10:35 -05:00
|
|
|
avatarColor: UserAvatarColor.PRIMARY,
|
2024-01-12 19:43:36 -05:00
|
|
|
quotaSizeInBytes: null,
|
|
|
|
quotaUsageInBytes: 0,
|
2023-07-31 20:28:07 -05:00
|
|
|
}),
|
|
|
|
user2: Object.freeze<UserEntity>({
|
2023-12-09 23:34:12 -05:00
|
|
|
...authStub.user2.user,
|
2023-07-31 20:28:07 -05:00
|
|
|
password: 'immich_password',
|
2023-11-11 20:03:32 -05:00
|
|
|
name: 'immich_name',
|
2023-07-31 20:28:07 -05:00
|
|
|
storageLabel: null,
|
|
|
|
oauthId: '',
|
|
|
|
shouldChangePassword: false,
|
|
|
|
profileImagePath: '',
|
|
|
|
createdAt: new Date('2021-01-01'),
|
|
|
|
deletedAt: null,
|
|
|
|
updatedAt: new Date('2021-01-01'),
|
|
|
|
tags: [],
|
|
|
|
assets: [],
|
2023-08-09 21:01:16 -05:00
|
|
|
memoriesEnabled: true,
|
2023-11-13 22:10:35 -05:00
|
|
|
avatarColor: UserAvatarColor.PRIMARY,
|
2024-01-12 19:43:36 -05:00
|
|
|
quotaSizeInBytes: null,
|
|
|
|
quotaUsageInBytes: 0,
|
2023-07-31 20:28:07 -05:00
|
|
|
}),
|
|
|
|
storageLabel: Object.freeze<UserEntity>({
|
2023-12-09 23:34:12 -05:00
|
|
|
...authStub.user1.user,
|
2023-07-31 20:28:07 -05:00
|
|
|
password: 'immich_password',
|
2023-11-11 20:03:32 -05:00
|
|
|
name: 'immich_name',
|
2023-07-31 20:28:07 -05:00
|
|
|
storageLabel: 'label-1',
|
2023-09-20 06:16:33 -05:00
|
|
|
oauthId: '',
|
|
|
|
shouldChangePassword: false,
|
|
|
|
profileImagePath: '',
|
|
|
|
createdAt: new Date('2021-01-01'),
|
|
|
|
deletedAt: null,
|
|
|
|
updatedAt: new Date('2021-01-01'),
|
|
|
|
tags: [],
|
|
|
|
assets: [],
|
|
|
|
memoriesEnabled: true,
|
2023-11-13 22:10:35 -05:00
|
|
|
avatarColor: UserAvatarColor.PRIMARY,
|
2024-01-12 19:43:36 -05:00
|
|
|
quotaSizeInBytes: null,
|
|
|
|
quotaUsageInBytes: 0,
|
2023-09-20 06:16:33 -05:00
|
|
|
}),
|
2024-02-20 10:53:12 -05:00
|
|
|
externalPathRoot: Object.freeze<UserEntity>({
|
|
|
|
...authStub.user1.user,
|
|
|
|
password: 'immich_password',
|
|
|
|
name: 'immich_name',
|
|
|
|
storageLabel: 'label-1',
|
|
|
|
oauthId: '',
|
|
|
|
shouldChangePassword: false,
|
|
|
|
profileImagePath: '',
|
|
|
|
createdAt: new Date('2021-01-01'),
|
|
|
|
deletedAt: null,
|
|
|
|
updatedAt: new Date('2021-01-01'),
|
|
|
|
tags: [],
|
|
|
|
assets: [],
|
|
|
|
memoriesEnabled: true,
|
|
|
|
avatarColor: UserAvatarColor.PRIMARY,
|
|
|
|
quotaSizeInBytes: null,
|
|
|
|
quotaUsageInBytes: 0,
|
|
|
|
}),
|
2023-10-30 18:38:34 -05:00
|
|
|
profilePath: Object.freeze<UserEntity>({
|
2023-12-09 23:34:12 -05:00
|
|
|
...authStub.user1.user,
|
2023-10-30 18:38:34 -05:00
|
|
|
password: 'immich_password',
|
2023-11-11 20:03:32 -05:00
|
|
|
name: 'immich_name',
|
2023-10-30 18:38:34 -05: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'),
|
|
|
|
tags: [],
|
|
|
|
assets: [],
|
|
|
|
memoriesEnabled: true,
|
2023-11-13 22:10:35 -05:00
|
|
|
avatarColor: UserAvatarColor.PRIMARY,
|
2024-01-12 19:43:36 -05:00
|
|
|
quotaSizeInBytes: null,
|
|
|
|
quotaUsageInBytes: 0,
|
2023-10-30 18:38:34 -05:00
|
|
|
}),
|
2023-07-31 20:28:07 -05:00
|
|
|
};
|