2024-09-05 00:23:58 +02:00
|
|
|
import { SourceType } from 'src/enum';
|
2024-03-20 19:32:04 +01:00
|
|
|
import { assetStub } from 'test/fixtures/asset.stub';
|
|
|
|
import { personStub } from 'test/fixtures/person.stub';
|
2023-07-31 21:28:07 -04:00
|
|
|
|
|
|
|
export const faceStub = {
|
2025-04-11 14:44:45 -04:00
|
|
|
face1: Object.freeze({
|
2024-01-18 00:08:48 -05:00
|
|
|
id: 'assetFaceId1',
|
2023-07-31 21:28:07 -04:00
|
|
|
assetId: assetStub.image.id,
|
2025-04-11 14:44:45 -04:00
|
|
|
asset: {
|
|
|
|
...assetStub.image,
|
|
|
|
libraryId: null,
|
|
|
|
updateId: '0d1173e3-4d80-4d76-b41e-57d56de21125',
|
|
|
|
stackId: null,
|
|
|
|
},
|
2023-07-31 21:28:07 -04:00
|
|
|
personId: personStub.withName.id,
|
|
|
|
person: personStub.withName,
|
|
|
|
boundingBoxX1: 0,
|
|
|
|
boundingBoxY1: 0,
|
|
|
|
boundingBoxX2: 1,
|
|
|
|
boundingBoxY2: 1,
|
|
|
|
imageHeight: 1024,
|
|
|
|
imageWidth: 1024,
|
2025-07-15 14:50:13 -04:00
|
|
|
sourceType: SourceType.MachineLearning,
|
2025-01-21 19:12:28 +01:00
|
|
|
faceSearch: { faceId: 'assetFaceId1', embedding: '[1, 2, 3, 4]' },
|
2025-02-21 09:58:25 -06:00
|
|
|
deletedAt: new Date(),
|
2023-07-31 21:28:07 -04:00
|
|
|
}),
|
2025-04-11 14:44:45 -04:00
|
|
|
primaryFace1: Object.freeze({
|
2024-01-18 00:08:48 -05:00
|
|
|
id: 'assetFaceId2',
|
2023-07-31 21:28:07 -04:00
|
|
|
assetId: assetStub.image.id,
|
|
|
|
asset: assetStub.image,
|
|
|
|
personId: personStub.primaryPerson.id,
|
|
|
|
person: personStub.primaryPerson,
|
|
|
|
boundingBoxX1: 0,
|
|
|
|
boundingBoxY1: 0,
|
|
|
|
boundingBoxX2: 1,
|
|
|
|
boundingBoxY2: 1,
|
|
|
|
imageHeight: 1024,
|
|
|
|
imageWidth: 1024,
|
2025-07-15 14:50:13 -04:00
|
|
|
sourceType: SourceType.MachineLearning,
|
2025-01-21 19:12:28 +01:00
|
|
|
faceSearch: { faceId: 'assetFaceId2', embedding: '[1, 2, 3, 4]' },
|
2025-02-21 09:58:25 -06:00
|
|
|
deletedAt: null,
|
2023-07-31 21:28:07 -04:00
|
|
|
}),
|
2025-04-11 14:44:45 -04:00
|
|
|
mergeFace1: Object.freeze({
|
2024-01-18 00:08:48 -05:00
|
|
|
id: 'assetFaceId3',
|
2023-07-31 21:28:07 -04:00
|
|
|
assetId: assetStub.image.id,
|
|
|
|
asset: assetStub.image,
|
|
|
|
personId: personStub.mergePerson.id,
|
|
|
|
person: personStub.mergePerson,
|
|
|
|
boundingBoxX1: 0,
|
|
|
|
boundingBoxY1: 0,
|
|
|
|
boundingBoxX2: 1,
|
|
|
|
boundingBoxY2: 1,
|
|
|
|
imageHeight: 1024,
|
|
|
|
imageWidth: 1024,
|
2025-07-15 14:50:13 -04:00
|
|
|
sourceType: SourceType.MachineLearning,
|
2025-01-21 19:12:28 +01:00
|
|
|
faceSearch: { faceId: 'assetFaceId3', embedding: '[1, 2, 3, 4]' },
|
2025-02-21 09:58:25 -06:00
|
|
|
deletedAt: null,
|
2023-07-31 21:28:07 -04:00
|
|
|
}),
|
2025-04-11 14:44:45 -04:00
|
|
|
noPerson1: Object.freeze({
|
2024-01-18 00:08:48 -05:00
|
|
|
id: 'assetFaceId8',
|
|
|
|
assetId: assetStub.image.id,
|
|
|
|
asset: assetStub.image,
|
|
|
|
personId: null,
|
|
|
|
person: null,
|
|
|
|
boundingBoxX1: 0,
|
|
|
|
boundingBoxY1: 0,
|
|
|
|
boundingBoxX2: 1,
|
|
|
|
boundingBoxY2: 1,
|
|
|
|
imageHeight: 1024,
|
|
|
|
imageWidth: 1024,
|
2025-07-15 14:50:13 -04:00
|
|
|
sourceType: SourceType.MachineLearning,
|
2025-01-21 19:12:28 +01:00
|
|
|
faceSearch: { faceId: 'assetFaceId8', embedding: '[1, 2, 3, 4]' },
|
2025-02-21 09:58:25 -06:00
|
|
|
deletedAt: null,
|
2024-01-18 00:08:48 -05:00
|
|
|
}),
|
2025-04-11 14:44:45 -04:00
|
|
|
noPerson2: Object.freeze({
|
2024-01-18 00:08:48 -05:00
|
|
|
id: 'assetFaceId9',
|
|
|
|
assetId: assetStub.image.id,
|
|
|
|
asset: assetStub.image,
|
|
|
|
personId: null,
|
|
|
|
person: null,
|
|
|
|
boundingBoxX1: 0,
|
|
|
|
boundingBoxY1: 0,
|
|
|
|
boundingBoxX2: 1,
|
|
|
|
boundingBoxY2: 1,
|
|
|
|
imageHeight: 1024,
|
|
|
|
imageWidth: 1024,
|
2025-07-15 14:50:13 -04:00
|
|
|
sourceType: SourceType.MachineLearning,
|
2025-01-21 19:12:28 +01:00
|
|
|
faceSearch: { faceId: 'assetFaceId9', embedding: '[1, 2, 3, 4]' },
|
2025-02-21 09:58:25 -06:00
|
|
|
deletedAt: null,
|
2024-01-18 00:08:48 -05:00
|
|
|
}),
|
2025-04-11 14:44:45 -04:00
|
|
|
fromExif1: Object.freeze({
|
2024-10-03 21:58:28 -04:00
|
|
|
id: 'assetFaceId9',
|
|
|
|
assetId: assetStub.image.id,
|
|
|
|
asset: assetStub.image,
|
|
|
|
personId: personStub.randomPerson.id,
|
|
|
|
person: personStub.randomPerson,
|
|
|
|
boundingBoxX1: 100,
|
|
|
|
boundingBoxY1: 100,
|
|
|
|
boundingBoxX2: 200,
|
|
|
|
boundingBoxY2: 200,
|
|
|
|
imageHeight: 500,
|
|
|
|
imageWidth: 400,
|
2025-07-15 14:50:13 -04:00
|
|
|
sourceType: SourceType.Exif,
|
2025-02-21 09:58:25 -06:00
|
|
|
deletedAt: null,
|
2024-10-03 21:58:28 -04:00
|
|
|
}),
|
2025-04-11 14:44:45 -04:00
|
|
|
fromExif2: Object.freeze({
|
2024-10-03 21:58:28 -04:00
|
|
|
id: 'assetFaceId9',
|
|
|
|
assetId: assetStub.image.id,
|
|
|
|
asset: assetStub.image,
|
|
|
|
personId: personStub.randomPerson.id,
|
|
|
|
person: personStub.randomPerson,
|
|
|
|
boundingBoxX1: 0,
|
|
|
|
boundingBoxY1: 0,
|
|
|
|
boundingBoxX2: 1,
|
|
|
|
boundingBoxY2: 1,
|
|
|
|
imageHeight: 1024,
|
|
|
|
imageWidth: 1024,
|
2025-07-15 14:50:13 -04:00
|
|
|
sourceType: SourceType.Exif,
|
2025-02-21 09:58:25 -06:00
|
|
|
deletedAt: null,
|
2024-10-03 21:58:28 -04:00
|
|
|
}),
|
2025-04-11 14:44:45 -04:00
|
|
|
withBirthDate: Object.freeze({
|
2025-04-02 21:07:26 +05:30
|
|
|
id: 'assetFaceId10',
|
|
|
|
assetId: assetStub.image.id,
|
|
|
|
asset: assetStub.image,
|
|
|
|
personId: personStub.withBirthDate.id,
|
|
|
|
person: personStub.withBirthDate,
|
|
|
|
boundingBoxX1: 0,
|
|
|
|
boundingBoxY1: 0,
|
|
|
|
boundingBoxX2: 1,
|
|
|
|
boundingBoxY2: 1,
|
|
|
|
imageHeight: 1024,
|
|
|
|
imageWidth: 1024,
|
2025-07-15 14:50:13 -04:00
|
|
|
sourceType: SourceType.MachineLearning,
|
2025-04-02 21:07:26 +05:30
|
|
|
deletedAt: null,
|
|
|
|
}),
|
2023-07-31 21:28:07 -04:00
|
|
|
};
|