mirror of
https://github.com/immich-app/immich.git
synced 2024-12-28 11:15:54 +02:00
f0b328fb6b
* pr feedback * fix: tests * update assets statistics * pr feedback * pr feedback * fix: linter * pr feedback * fix: don't limit the smart merge * pr feedback * fix: server code --------- Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
146 lines
3.7 KiB
TypeScript
146 lines
3.7 KiB
TypeScript
import { PersonEntity } from '@app/infra/entities';
|
|
import { userStub } from './user.stub';
|
|
|
|
export const personStub = {
|
|
noName: Object.freeze<PersonEntity>({
|
|
id: 'person-1',
|
|
createdAt: new Date('2021-01-01'),
|
|
updatedAt: new Date('2021-01-01'),
|
|
ownerId: userStub.admin.id,
|
|
owner: userStub.admin,
|
|
name: '',
|
|
birthDate: null,
|
|
thumbnailPath: '/path/to/thumbnail.jpg',
|
|
faces: [],
|
|
faceAssetId: null,
|
|
faceAsset: null,
|
|
isHidden: false,
|
|
}),
|
|
hidden: Object.freeze<PersonEntity>({
|
|
id: 'person-1',
|
|
createdAt: new Date('2021-01-01'),
|
|
updatedAt: new Date('2021-01-01'),
|
|
ownerId: userStub.admin.id,
|
|
owner: userStub.admin,
|
|
name: '',
|
|
birthDate: null,
|
|
thumbnailPath: '/path/to/thumbnail.jpg',
|
|
faces: [],
|
|
faceAssetId: null,
|
|
faceAsset: null,
|
|
isHidden: true,
|
|
}),
|
|
withName: Object.freeze<PersonEntity>({
|
|
id: 'person-1',
|
|
createdAt: new Date('2021-01-01'),
|
|
updatedAt: new Date('2021-01-01'),
|
|
ownerId: userStub.admin.id,
|
|
owner: userStub.admin,
|
|
name: 'Person 1',
|
|
birthDate: null,
|
|
thumbnailPath: '/path/to/thumbnail.jpg',
|
|
faces: [],
|
|
faceAssetId: 'assetFaceId',
|
|
faceAsset: null,
|
|
isHidden: false,
|
|
}),
|
|
noBirthDate: Object.freeze<PersonEntity>({
|
|
id: 'person-1',
|
|
createdAt: new Date('2021-01-01'),
|
|
updatedAt: new Date('2021-01-01'),
|
|
ownerId: userStub.admin.id,
|
|
owner: userStub.admin,
|
|
name: 'Person 1',
|
|
birthDate: null,
|
|
thumbnailPath: '/path/to/thumbnail.jpg',
|
|
faces: [],
|
|
faceAssetId: null,
|
|
faceAsset: null,
|
|
isHidden: false,
|
|
}),
|
|
withBirthDate: Object.freeze<PersonEntity>({
|
|
id: 'person-1',
|
|
createdAt: new Date('2021-01-01'),
|
|
updatedAt: new Date('2021-01-01'),
|
|
ownerId: userStub.admin.id,
|
|
owner: userStub.admin,
|
|
name: 'Person 1',
|
|
birthDate: new Date('1976-06-30'),
|
|
thumbnailPath: '/path/to/thumbnail.jpg',
|
|
faces: [],
|
|
faceAssetId: null,
|
|
faceAsset: null,
|
|
isHidden: false,
|
|
}),
|
|
noThumbnail: Object.freeze<PersonEntity>({
|
|
id: 'person-1',
|
|
createdAt: new Date('2021-01-01'),
|
|
updatedAt: new Date('2021-01-01'),
|
|
ownerId: userStub.admin.id,
|
|
owner: userStub.admin,
|
|
name: '',
|
|
birthDate: null,
|
|
thumbnailPath: '',
|
|
faces: [],
|
|
faceAssetId: null,
|
|
faceAsset: null,
|
|
isHidden: false,
|
|
}),
|
|
newThumbnail: Object.freeze<PersonEntity>({
|
|
id: 'person-1',
|
|
createdAt: new Date('2021-01-01'),
|
|
updatedAt: new Date('2021-01-01'),
|
|
ownerId: userStub.admin.id,
|
|
owner: userStub.admin,
|
|
name: '',
|
|
birthDate: null,
|
|
thumbnailPath: '/new/path/to/thumbnail.jpg',
|
|
faces: [],
|
|
faceAssetId: 'asset-id',
|
|
faceAsset: null,
|
|
isHidden: false,
|
|
}),
|
|
primaryPerson: Object.freeze<PersonEntity>({
|
|
id: 'person-1',
|
|
createdAt: new Date('2021-01-01'),
|
|
updatedAt: new Date('2021-01-01'),
|
|
ownerId: userStub.admin.id,
|
|
owner: userStub.admin,
|
|
name: 'Person 1',
|
|
birthDate: null,
|
|
thumbnailPath: '/path/to/thumbnail',
|
|
faces: [],
|
|
faceAssetId: null,
|
|
faceAsset: null,
|
|
isHidden: false,
|
|
}),
|
|
mergePerson: Object.freeze<PersonEntity>({
|
|
id: 'person-2',
|
|
createdAt: new Date('2021-01-01'),
|
|
updatedAt: new Date('2021-01-01'),
|
|
ownerId: userStub.admin.id,
|
|
owner: userStub.admin,
|
|
name: 'Person 2',
|
|
birthDate: null,
|
|
thumbnailPath: '/path/to/thumbnail',
|
|
faces: [],
|
|
faceAssetId: null,
|
|
faceAsset: null,
|
|
isHidden: false,
|
|
}),
|
|
randomPerson: Object.freeze<PersonEntity>({
|
|
id: 'person-3',
|
|
createdAt: new Date('2021-01-01'),
|
|
updatedAt: new Date('2021-01-01'),
|
|
ownerId: userStub.admin.id,
|
|
owner: userStub.admin,
|
|
name: '',
|
|
birthDate: null,
|
|
thumbnailPath: '/path/to/thumbnail',
|
|
faces: [],
|
|
faceAssetId: null,
|
|
faceAsset: null,
|
|
isHidden: false,
|
|
}),
|
|
};
|