2024-05-21 00:09:10 +02:00
|
|
|
import { LibraryEntity } from 'src/entities/library.entity';
|
2024-03-20 20:32:04 +02:00
|
|
|
import { userStub } from 'test/fixtures/user.stub';
|
2023-09-20 13:16:33 +02:00
|
|
|
|
|
|
|
export const libraryStub = {
|
|
|
|
externalLibrary1: Object.freeze<LibraryEntity>({
|
|
|
|
id: 'library-id',
|
|
|
|
name: 'test_library',
|
|
|
|
assets: [],
|
2024-02-29 20:35:37 +02:00
|
|
|
owner: userStub.admin,
|
|
|
|
ownerId: 'admin_id',
|
2023-09-20 13:16:33 +02:00
|
|
|
importPaths: [],
|
|
|
|
createdAt: new Date('2023-01-01'),
|
|
|
|
updatedAt: new Date('2023-01-01'),
|
|
|
|
refreshedAt: null,
|
|
|
|
exclusionPatterns: [],
|
|
|
|
}),
|
2024-01-31 10:15:54 +02:00
|
|
|
externalLibrary2: Object.freeze<LibraryEntity>({
|
|
|
|
id: 'library-id2',
|
|
|
|
name: 'test_library2',
|
|
|
|
assets: [],
|
2024-02-29 20:35:37 +02:00
|
|
|
owner: userStub.admin,
|
|
|
|
ownerId: 'admin_id',
|
2024-01-31 10:15:54 +02:00
|
|
|
importPaths: [],
|
|
|
|
createdAt: new Date('2021-01-01'),
|
|
|
|
updatedAt: new Date('2022-01-01'),
|
|
|
|
refreshedAt: null,
|
|
|
|
exclusionPatterns: [],
|
|
|
|
}),
|
|
|
|
externalLibraryWithImportPaths1: Object.freeze<LibraryEntity>({
|
|
|
|
id: 'library-id-with-paths1',
|
|
|
|
name: 'library-with-import-paths1',
|
|
|
|
assets: [],
|
2024-02-29 20:35:37 +02:00
|
|
|
owner: userStub.admin,
|
|
|
|
ownerId: 'admin_id',
|
2024-01-31 10:15:54 +02:00
|
|
|
importPaths: ['/foo', '/bar'],
|
|
|
|
createdAt: new Date('2023-01-01'),
|
|
|
|
updatedAt: new Date('2023-01-01'),
|
|
|
|
refreshedAt: null,
|
|
|
|
exclusionPatterns: [],
|
|
|
|
}),
|
|
|
|
externalLibraryWithImportPaths2: Object.freeze<LibraryEntity>({
|
|
|
|
id: 'library-id-with-paths2',
|
|
|
|
name: 'library-with-import-paths2',
|
|
|
|
assets: [],
|
2024-02-29 20:35:37 +02:00
|
|
|
owner: userStub.admin,
|
|
|
|
ownerId: 'admin_id',
|
2024-01-31 10:15:54 +02:00
|
|
|
importPaths: ['/xyz', '/asdf'],
|
|
|
|
createdAt: new Date('2023-01-01'),
|
|
|
|
updatedAt: new Date('2023-01-01'),
|
|
|
|
refreshedAt: null,
|
|
|
|
exclusionPatterns: [],
|
|
|
|
}),
|
|
|
|
patternPath: Object.freeze<LibraryEntity>({
|
|
|
|
id: 'library-id1337',
|
|
|
|
name: 'importpath-exclusion-library1',
|
|
|
|
assets: [],
|
2024-02-29 20:35:37 +02:00
|
|
|
owner: userStub.admin,
|
2024-01-31 10:15:54 +02:00
|
|
|
ownerId: 'user-id',
|
|
|
|
importPaths: ['/xyz', '/asdf'],
|
|
|
|
createdAt: new Date('2023-01-01'),
|
|
|
|
updatedAt: new Date('2023-01-01'),
|
|
|
|
refreshedAt: null,
|
|
|
|
exclusionPatterns: ['**/dir1/**'],
|
|
|
|
}),
|
2024-03-16 00:01:58 +02:00
|
|
|
hasImmichPaths: Object.freeze<LibraryEntity>({
|
|
|
|
id: 'library-id1337',
|
|
|
|
name: 'importpath-exclusion-library1',
|
|
|
|
assets: [],
|
|
|
|
owner: userStub.admin,
|
|
|
|
ownerId: 'user-id',
|
2024-10-21 16:12:12 +02:00
|
|
|
importPaths: ['upload/thumbs', 'xyz', 'upload/library'],
|
2024-03-16 00:01:58 +02:00
|
|
|
createdAt: new Date('2023-01-01'),
|
|
|
|
updatedAt: new Date('2023-01-01'),
|
|
|
|
refreshedAt: null,
|
|
|
|
exclusionPatterns: ['**/dir1/**'],
|
|
|
|
}),
|
2023-09-20 13:16:33 +02:00
|
|
|
};
|