2023-08-01 03:28:07 +02:00
|
|
|
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: '',
|
2023-08-18 22:10:29 +02:00
|
|
|
birthDate: null,
|
2023-08-01 03:28:07 +02:00
|
|
|
thumbnailPath: '/path/to/thumbnail.jpg',
|
|
|
|
faces: [],
|
2023-09-08 08:49:43 +02:00
|
|
|
faceAssetId: null,
|
|
|
|
faceAsset: null,
|
2023-08-01 03:28:07 +02:00
|
|
|
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: '',
|
2023-08-18 22:10:29 +02:00
|
|
|
birthDate: null,
|
2023-08-01 03:28:07 +02:00
|
|
|
thumbnailPath: '/path/to/thumbnail.jpg',
|
|
|
|
faces: [],
|
2023-09-08 08:49:43 +02:00
|
|
|
faceAssetId: null,
|
|
|
|
faceAsset: null,
|
2023-08-01 03:28:07 +02:00
|
|
|
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',
|
2023-08-18 22:10:29 +02:00
|
|
|
birthDate: null,
|
|
|
|
thumbnailPath: '/path/to/thumbnail.jpg',
|
|
|
|
faces: [],
|
2023-12-05 16:43:15 +01:00
|
|
|
faceAssetId: 'assetFaceId',
|
2023-09-08 08:49:43 +02:00
|
|
|
faceAsset: null,
|
2023-08-18 22:10:29 +02:00
|
|
|
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: [],
|
2023-09-08 08:49:43 +02:00
|
|
|
faceAssetId: null,
|
|
|
|
faceAsset: null,
|
2023-08-18 22:10:29 +02:00
|
|
|
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'),
|
2023-08-01 03:28:07 +02:00
|
|
|
thumbnailPath: '/path/to/thumbnail.jpg',
|
|
|
|
faces: [],
|
2023-09-08 08:49:43 +02:00
|
|
|
faceAssetId: null,
|
|
|
|
faceAsset: null,
|
2023-08-01 03:28:07 +02:00
|
|
|
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: '',
|
2023-08-18 22:10:29 +02:00
|
|
|
birthDate: null,
|
2023-08-01 03:28:07 +02:00
|
|
|
thumbnailPath: '',
|
|
|
|
faces: [],
|
2023-09-08 08:49:43 +02:00
|
|
|
faceAssetId: null,
|
|
|
|
faceAsset: null,
|
2023-08-01 03:28:07 +02:00
|
|
|
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: '',
|
2023-08-18 22:10:29 +02:00
|
|
|
birthDate: null,
|
2023-08-01 03:28:07 +02:00
|
|
|
thumbnailPath: '/new/path/to/thumbnail.jpg',
|
|
|
|
faces: [],
|
2023-12-05 16:43:15 +01:00
|
|
|
faceAssetId: 'asset-id',
|
|
|
|
faceAsset: null,
|
2023-08-01 03:28:07 +02:00
|
|
|
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',
|
2023-08-18 22:10:29 +02:00
|
|
|
birthDate: null,
|
2023-08-01 03:28:07 +02:00
|
|
|
thumbnailPath: '/path/to/thumbnail',
|
|
|
|
faces: [],
|
2023-09-08 08:49:43 +02:00
|
|
|
faceAssetId: null,
|
|
|
|
faceAsset: null,
|
2023-08-01 03:28:07 +02:00
|
|
|
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',
|
2023-08-18 22:10:29 +02:00
|
|
|
birthDate: null,
|
2023-08-01 03:28:07 +02:00
|
|
|
thumbnailPath: '/path/to/thumbnail',
|
|
|
|
faces: [],
|
2023-09-08 08:49:43 +02:00
|
|
|
faceAssetId: null,
|
|
|
|
faceAsset: null,
|
2023-08-01 03:28:07 +02:00
|
|
|
isHidden: false,
|
|
|
|
}),
|
|
|
|
};
|