pigallery2-extension-kit 3.5.2 → 3.7.0-edge
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -5
- package/index.d.ts +1 -0
- package/index.js +2 -3
- package/lib/backend/Logger.d.ts +7 -7
- package/lib/backend/ProjectPath.d.ts +12 -0
- package/lib/backend/exceptions/DirectoryNotFound.d.ts +2 -0
- package/lib/backend/exceptions/FolderNotWritable.d.ts +2 -0
- package/lib/backend/index.d.ts +1 -1
- package/lib/backend/middlewares/GalleryMWs.d.ts +4 -0
- package/lib/backend/middlewares/PersonMWs.d.ts +1 -1
- package/lib/backend/middlewares/RenderingMWs.d.ts +24 -0
- package/lib/backend/middlewares/RequestParams.d.ts +13 -0
- package/lib/backend/middlewares/RequestSession.d.ts +9 -0
- package/lib/backend/middlewares/ServerTimingMWs.d.ts +6 -6
- package/lib/backend/middlewares/SharingMWs.d.ts +2 -1
- package/lib/backend/middlewares/VersionMWs.d.ts +1 -1
- package/lib/backend/middlewares/thumbnail/ThumbnailGeneratorMWs.d.ts +1 -1
- package/lib/backend/middlewares/user/AuthenticationMWs.d.ts +37 -0
- package/lib/backend/middlewares/user/OIDCAuthService.d.ts +36 -5
- package/lib/backend/middlewares/user/OIDCMWs.d.ts +10 -0
- package/lib/backend/middlewares/user/UserMWs.d.ts +1 -0
- package/lib/backend/middlewares/user/UserRequestConstrainsMWs.d.ts +0 -1
- package/lib/backend/model/DirectoryAccess.d.ts +78 -0
- package/lib/backend/model/EventLoopHandler.d.ts +1 -1
- package/lib/backend/model/FFmpeg.d.ts +47 -0
- package/lib/backend/model/FFmpegFactory.d.ts +11 -2
- package/lib/backend/model/ObjectManagers.d.ts +1 -1
- package/lib/backend/model/PasswordHelper.d.ts +1 -1
- package/lib/backend/model/SessionContext.d.ts +16 -6
- package/lib/backend/model/UploadManager.d.ts +6 -3
- package/lib/backend/model/database/CoverManager.d.ts +8 -2
- package/lib/backend/model/database/GalleryManager.d.ts +15 -9
- package/lib/backend/model/database/IndexingManager.d.ts +7 -7
- package/lib/backend/model/database/LocationManager.d.ts +2 -3
- package/lib/backend/model/database/PersonManager.d.ts +5 -3
- package/lib/backend/model/database/ProjectedCacheManager.d.ts +9 -8
- package/lib/backend/model/database/ProjectionAwareManager.d.ts +4 -4
- package/lib/backend/model/database/SQLConnection.d.ts +4 -2
- package/lib/backend/model/database/SearchManager.d.ts +23 -8
- package/lib/backend/model/database/SessionManager.d.ts +41 -4
- package/lib/backend/model/database/SharingManager.d.ts +11 -6
- package/lib/backend/model/database/UserManager.d.ts +8 -1
- package/lib/backend/model/database/enitites/DirectoryEntity.d.ts +1 -1
- package/lib/backend/model/database/enitites/EntityUtils.d.ts +22 -1
- package/lib/backend/model/database/enitites/MediaEntity.d.ts +5 -2
- package/lib/backend/model/database/enitites/ProjectedDirectoryCacheEntity.d.ts +2 -2
- package/lib/backend/model/database/enitites/SharingEntity.d.ts +11 -5
- package/lib/backend/model/database/enitites/UserEntity.d.ts +8 -5
- package/lib/backend/model/database/enitites/VideoEntity.d.ts +2 -2
- package/lib/backend/model/database/enitites/album/ProjectedAlbumCacheEntity.d.ts +2 -2
- package/lib/backend/model/database/enitites/person/ProjectedPersonCacheEntity.d.ts +1 -1
- package/lib/backend/model/diagnostics/ConfigDiagnostics.d.ts +31 -12
- package/lib/backend/model/extension/ExpressRouterWrapper.d.ts +10 -4
- package/lib/backend/model/extension/ExtensionApp.d.ts +2 -3
- package/lib/backend/model/extension/ExtensionDB.d.ts +2 -2
- package/lib/backend/model/extension/ExtensionEvent.d.ts +12 -1
- package/lib/backend/model/extension/ExtensionManager.d.ts +22 -4
- package/lib/backend/model/extension/ExtensionObject.d.ts +6 -3
- package/lib/backend/model/extension/IExtension.d.ts +35 -18
- package/lib/backend/model/fileaccess/DiskManager.d.ts +3 -1
- package/lib/backend/model/fileaccess/MetadataLoader.d.ts +17 -0
- package/lib/backend/model/fileaccess/TaskQue.d.ts +4 -4
- package/lib/backend/model/fileaccess/VideoConverterWorker.d.ts +6 -2
- package/lib/backend/model/fileaccess/fileprocessing/PhotoProcessing.d.ts +3 -2
- package/lib/backend/model/jobs/JobManager.d.ts +2 -4
- package/lib/backend/model/jobs/JobProgressManager.d.ts +5 -3
- package/lib/backend/model/jobs/JobRepository.d.ts +1 -3
- package/lib/backend/model/jobs/jobs/AlbumCoverFillingJob.d.ts +1 -1
- package/lib/backend/model/jobs/jobs/IJobListener.d.ts +2 -2
- package/lib/backend/model/jobs/jobs/Job.d.ts +4 -1
- package/lib/backend/model/messenger/EmailMessenger.d.ts +1 -1
- package/lib/backend/model/messenger/Messenger.d.ts +1 -2
- package/lib/backend/model/messenger/MessengerRepository.d.ts +1 -3
- package/lib/backend/routes/ErrorRouter.d.ts +1 -0
- package/lib/backend/routes/GalleryRouter.d.ts +8 -0
- package/lib/backend/routes/PublicRouter.d.ts +3 -6
- package/lib/backend/routes/SharingRouter.d.ts +1 -1
- package/lib/backend/routes/UserRouter.d.ts +1 -0
- package/lib/backend/server.d.ts +3 -3
- package/lib/common/DataStructureVersion.d.ts +1 -1
- package/lib/common/SearchQueryParser.d.ts +2 -2
- package/lib/common/SearchQueryUtils.d.ts +71 -4
- package/lib/common/SupportedFormats.d.ts +11 -1
- package/lib/common/SupportedFormats.js +13 -19
- package/lib/common/TextFold.d.ts +6 -0
- package/lib/common/UploadUtils.d.ts +4 -0
- package/lib/common/Utils.d.ts +23 -24
- package/lib/common/Utils.js +37 -97
- package/lib/common/config/Enums.d.ts +91 -0
- package/lib/common/config/Enums.js +109 -0
- package/lib/common/config/private/Config.d.ts +1 -1
- package/lib/common/config/private/PrivateConfig.d.ts +18 -39
- package/lib/common/config/private/WebConfig.d.ts +1 -2
- package/lib/common/config/private/subconfigs/ServerExtensionsConfig.d.ts +2 -3
- package/lib/common/config/public/ClientConfig.d.ts +51 -68
- package/lib/common/config/public/ClientConfig.js +774 -557
- package/lib/common/entities/AutoCompleteItem.d.ts +3 -3
- package/lib/common/entities/ContentWrapper.d.ts +21 -8
- package/lib/common/entities/ContentWrapper.js +286 -318
- package/lib/common/entities/DirectoryDTO.d.ts +7 -6
- package/lib/common/entities/DirectoryDTO.js +10 -5
- package/lib/common/entities/Error.d.ts +12 -7
- package/lib/common/entities/Error.js +15 -3
- package/lib/common/entities/MediaDTO.d.ts +13 -0
- package/lib/common/entities/MediaDTO.js +10 -7
- package/lib/common/entities/Message.d.ts +3 -3
- package/lib/common/entities/NotificationDTO.d.ts +2 -2
- package/lib/common/entities/SearchQueryDTO.d.ts +9 -1
- package/lib/common/entities/SearchQueryDTO.js +1 -0
- package/lib/common/entities/SharingDTO.d.ts +39 -5
- package/lib/common/entities/SortingMethods.d.ts +26 -2
- package/lib/common/entities/SortingMethods.js +14 -1
- package/lib/common/entities/UserDTO.d.ts +5 -2
- package/lib/common/entities/UserSettingsDTO.d.ts +3 -1
- package/lib/common/entities/VideoDTO.d.ts +2 -5
- package/lib/common/entities/album/AlbumBaseDTO.d.ts +2 -2
- package/lib/common/entities/extension/ExtensionListItem.d.ts +1 -1
- package/lib/common/entities/extension/IClientUIConfig.d.ts +19 -12
- package/lib/common/entities/job/JobDTO.d.ts +1 -1
- package/lib/common/entities/job/JobProgressDTO.d.ts +1 -1
- package/lib/common/entities/job/JobScheduleDTO.d.ts +5 -5
- package/lib/common/entities/job/JobScheduleDTO.js +9 -5
- package/lib/common/event/EventLimit.d.ts +1 -1
- package/package.json +21 -8
- package/REPOSITORY.md +0 -13
- package/events.drawio +0 -1
- package/events.png +0 -0
- package/index.js.map +0 -1
- package/index.ts +0 -2
- package/lib/backend/ProjectPath.js +0 -36
- package/lib/backend/model/NotifocationManager.js +0 -44
- package/lib/backend/model/PasswordHelper.js +0 -20
- package/lib/backend/model/database/enitites/PersonEntry.d.ts +0 -11
- package/lib/backend/model/database/enitites/PersonJunctionTable.d.ts +0 -10
- package/lib/backend/model/extension/ExtensionConfigTemplateLoader.js +0 -139
- package/lib/backend/model/extension/ExtensionConfigWrapper.js +0 -59
- package/lib/common/config/private/Config.js +0 -20
- package/lib/common/config/private/PrivateConfig.js +0 -1568
- package/lib/common/config/private/PrivateConfigClass.js +0 -96
- package/lib/common/config/private/WebConfig.js +0 -19
- package/lib/common/config/private/subconfigs/MessagingConfig.js +0 -134
- package/lib/common/config/private/subconfigs/ServerExtensionsConfig.js +0 -111
- package/lib/common/config/public/Config.js +0 -24
- package/lib/common/entities/ConentWrapper.d.ts +0 -18
- package/lib/common/entities/ConentWrapper.js +0 -490
- package/lib/frontend/app/app.component.d.ts +0 -18
- package/lib/frontend/app/app.module.d.ts +0 -23
- package/lib/frontend/app/app.routing.d.ts +0 -4
- package/lib/frontend/app/icon.component.d.ts +0 -7
- package/lib/frontend/app/model/IRenderable.d.ts +0 -17
- package/lib/frontend/app/model/backendtext.service.d.ts +0 -7
- package/lib/frontend/app/model/backendtext.service.spec.d.ts +0 -1
- package/lib/frontend/app/model/extension.service.d.ts +0 -5
- package/lib/frontend/app/model/navigation.service.d.ts +0 -12
- package/lib/frontend/app/model/network/autehentication.service.spec.d.ts +0 -1
- package/lib/frontend/app/model/network/authentication.service.d.ts +0 -22
- package/lib/frontend/app/model/network/helper/auth.guard.d.ts +0 -9
- package/lib/frontend/app/model/network/helper/csrf.interceptor.d.ts +0 -8
- package/lib/frontend/app/model/network/helper/error.interceptor.d.ts +0 -8
- package/lib/frontend/app/model/network/network.service.d.ts +0 -29
- package/lib/frontend/app/model/network/network.service.spec.d.ts +0 -1
- package/lib/frontend/app/model/network/user.service.d.ts +0 -13
- package/lib/frontend/app/model/network/user.service.spec.d.ts +0 -1
- package/lib/frontend/app/model/notification.service.d.ts +0 -28
- package/lib/frontend/app/model/page.helper.d.ts +0 -15
- package/lib/frontend/app/model/pi-title.service.d.ts +0 -15
- package/lib/frontend/app/model/query.service.d.ts +0 -19
- package/lib/frontend/app/model/seededRandom.service.d.ts +0 -7
- package/lib/frontend/app/model/theme.service.d.ts +0 -16
- package/lib/frontend/app/model/version.service.d.ts +0 -10
- package/lib/frontend/app/pipes/DurationPipe.d.ts +0 -4
- package/lib/frontend/app/pipes/FileDTOToPathPipe.d.ts +0 -5
- package/lib/frontend/app/pipes/FileDTOToRelativePathPipe.d.ts +0 -5
- package/lib/frontend/app/pipes/FileSizePipe.d.ts +0 -4
- package/lib/frontend/app/pipes/GPXFilesFilterPipe.d.ts +0 -5
- package/lib/frontend/app/pipes/MDFilesFilterPipe.d.ts +0 -6
- package/lib/frontend/app/pipes/ParseIntPipe.d.ts +0 -4
- package/lib/frontend/app/pipes/PhotoFilterPipe.d.ts +0 -6
- package/lib/frontend/app/pipes/SafeHTMLPipe.d.ts +0 -7
- package/lib/frontend/app/pipes/StringifyEnum.d.ts +0 -4
- package/lib/frontend/app/pipes/StringifyGridSize.d.ts +0 -5
- package/lib/frontend/app/pipes/StringifyRolePipe.d.ts +0 -4
- package/lib/frontend/app/pipes/StringifySearchQuery.d.ts +0 -8
- package/lib/frontend/app/pipes/StringifySearchType.d.ts +0 -5
- package/lib/frontend/app/pipes/StringifySortingMethod.d.ts +0 -4
- package/lib/frontend/app/ui/EnumTranslations.d.ts +0 -5
- package/lib/frontend/app/ui/admin/admin.component.d.ts +0 -36
- package/lib/frontend/app/ui/albums/album/album.component.d.ts +0 -26
- package/lib/frontend/app/ui/albums/albums.component.d.ts +0 -31
- package/lib/frontend/app/ui/albums/albums.service.d.ts +0 -12
- package/lib/frontend/app/ui/albums/saved-search-popup/saved-search-popup.component.d.ts +0 -15
- package/lib/frontend/app/ui/duplicates/duplicates.component.d.ts +0 -36
- package/lib/frontend/app/ui/duplicates/duplicates.service.d.ts +0 -9
- package/lib/frontend/app/ui/duplicates/photo/photo.duplicates.component.d.ts +0 -11
- package/lib/frontend/app/ui/faces/Person.d.ts +0 -9
- package/lib/frontend/app/ui/faces/face/face.component.d.ts +0 -22
- package/lib/frontend/app/ui/faces/faces.component.d.ts +0 -18
- package/lib/frontend/app/ui/faces/faces.service.d.ts +0 -14
- package/lib/frontend/app/ui/faces/navigator/navigator.faces.component.d.ts +0 -15
- package/lib/frontend/app/ui/frame/frame.component.d.ts +0 -60
- package/lib/frontend/app/ui/gallery/Media.d.ts +0 -15
- package/lib/frontend/app/ui/gallery/MediaIcon.d.ts +0 -29
- package/lib/frontend/app/ui/gallery/blog/blog.gallery.component.d.ts +0 -16
- package/lib/frontend/app/ui/gallery/blog/blog.service.d.ts +0 -85
- package/lib/frontend/app/ui/gallery/blog/blog.service.spec.d.ts +0 -1
- package/lib/frontend/app/ui/gallery/cache.gallery.service.d.ts +0 -51
- package/lib/frontend/app/ui/gallery/content.service.d.ts +0 -11
- package/lib/frontend/app/ui/gallery/contentLoader.service.d.ts +0 -37
- package/lib/frontend/app/ui/gallery/directories/directories.component.d.ts +0 -14
- package/lib/frontend/app/ui/gallery/directories/directory/directory.gallery.component.d.ts +0 -20
- package/lib/frontend/app/ui/gallery/filter/filter.gallery.component.d.ts +0 -32
- package/lib/frontend/app/ui/gallery/filter/filter.service.d.ts +0 -51
- package/lib/frontend/app/ui/gallery/filter/filter.service.spec.d.ts +0 -1
- package/lib/frontend/app/ui/gallery/fullscreen.service.d.ts +0 -7
- package/lib/frontend/app/ui/gallery/gallery.component.d.ts +0 -64
- package/lib/frontend/app/ui/gallery/gallery.component.spec.d.ts +0 -1
- package/lib/frontend/app/ui/gallery/gallery.service.d.ts +0 -13
- package/lib/frontend/app/ui/gallery/grid/GridMedia.d.ts +0 -13
- package/lib/frontend/app/ui/gallery/grid/GridRowBuilder.d.ts +0 -16
- package/lib/frontend/app/ui/gallery/grid/grid.gallery.component.d.ts +0 -88
- package/lib/frontend/app/ui/gallery/grid/grid.gallery.component.spec.d.ts +0 -1
- package/lib/frontend/app/ui/gallery/grid/photo/loading/loading.photo.grid.gallery.component.d.ts +0 -4
- package/lib/frontend/app/ui/gallery/grid/photo/media-button-modal/media-button-modal.component.d.ts +0 -20
- package/lib/frontend/app/ui/gallery/grid/photo/media-button-modal/media-button-modal.service.d.ts +0 -27
- package/lib/frontend/app/ui/gallery/grid/photo/photo.grid.gallery.component.d.ts +0 -53
- package/lib/frontend/app/ui/gallery/lightbox/controls/controls.lightbox.gallery.component.d.ts +0 -103
- package/lib/frontend/app/ui/gallery/lightbox/infopanel/info-panel.lightbox.gallery.component.d.ts +0 -51
- package/lib/frontend/app/ui/gallery/lightbox/lightbox.gallery.component.d.ts +0 -95
- package/lib/frontend/app/ui/gallery/lightbox/lightbox.gallery.component.spec.d.ts +0 -1
- package/lib/frontend/app/ui/gallery/lightbox/lightbox.service.d.ts +0 -45
- package/lib/frontend/app/ui/gallery/lightbox/media/media.lightbox.gallery.component.d.ts +0 -71
- package/lib/frontend/app/ui/gallery/map/MarkerFactory.d.ts +0 -12
- package/lib/frontend/app/ui/gallery/map/lightbox/lightbox.map.gallery.component.d.ts +0 -80
- package/lib/frontend/app/ui/gallery/map/map.gallery.component.d.ts +0 -36
- package/lib/frontend/app/ui/gallery/map/map.service.d.ts +0 -30
- package/lib/frontend/app/ui/gallery/navigator/navigator.gallery.component.d.ts +0 -81
- package/lib/frontend/app/ui/gallery/navigator/navigator.service.d.ts +0 -14
- package/lib/frontend/app/ui/gallery/navigator/sorting.service.d.ts +0 -38
- package/lib/frontend/app/ui/gallery/overlay.service.d.ts +0 -9
- package/lib/frontend/app/ui/gallery/photo-frame-builder/photo-frame-builder.gallery.component.d.ts +0 -40
- package/lib/frontend/app/ui/gallery/random-query-builder/random-query-builder.gallery.component.d.ts +0 -30
- package/lib/frontend/app/ui/gallery/search/AutoCompleteRenderItem.d.ts +0 -11
- package/lib/frontend/app/ui/gallery/search/autocomplete.service.d.ts +0 -33
- package/lib/frontend/app/ui/gallery/search/query-builder/query-bulder.gallery.component.d.ts +0 -22
- package/lib/frontend/app/ui/gallery/search/query-enrty/query-entry.search.gallery.component.d.ts +0 -43
- package/lib/frontend/app/ui/gallery/search/search-field/search-field.gallery.component.d.ts +0 -31
- package/lib/frontend/app/ui/gallery/search/search-field-base/search-field-base.gallery.component.d.ts +0 -57
- package/lib/frontend/app/ui/gallery/search/search-query-parser.service.d.ts +0 -7
- package/lib/frontend/app/ui/gallery/search/search.gallery.component.d.ts +0 -39
- package/lib/frontend/app/ui/gallery/share/share.gallery.component.d.ts +0 -67
- package/lib/frontend/app/ui/gallery/share.service.d.ts +0 -35
- package/lib/frontend/app/ui/gallery/thumbnailLoader.service.d.ts +0 -41
- package/lib/frontend/app/ui/gallery/thumbnailManager.service.d.ts +0 -46
- package/lib/frontend/app/ui/gallery/uploader/uploader.gallery.component.d.ts +0 -15
- package/lib/frontend/app/ui/gallery/uploader/uploader.service.d.ts +0 -36
- package/lib/frontend/app/ui/gallery/wakelock.service.d.ts +0 -19
- package/lib/frontend/app/ui/language/language.component.d.ts +0 -10
- package/lib/frontend/app/ui/login/login.component.d.ts +0 -18
- package/lib/frontend/app/ui/settings/extension-installer/extension-installer.component.d.ts +0 -18
- package/lib/frontend/app/ui/settings/extension-installer/extension-installer.service.d.ts +0 -10
- package/lib/frontend/app/ui/settings/gallery-statistic/gallery-statistic.component.d.ts +0 -5
- package/lib/frontend/app/ui/settings/scheduled-jobs.service.d.ts +0 -41
- package/lib/frontend/app/ui/settings/settings.service.d.ts +0 -27
- package/lib/frontend/app/ui/settings/sharings-list/sharings-list.component.d.ts +0 -14
- package/lib/frontend/app/ui/settings/template/CustomSettingsEntries.d.ts +0 -57
- package/lib/frontend/app/ui/settings/template/ISettingsComponent.d.ts +0 -13
- package/lib/frontend/app/ui/settings/template/settings-entry/settings-entry.component.d.ts +0 -118
- package/lib/frontend/app/ui/settings/template/settings-entry/sorting-method/sorting-method.settings-entry.component.d.ts +0 -28
- package/lib/frontend/app/ui/settings/template/template.component.d.ts +0 -97
- package/lib/frontend/app/ui/settings/users/users.component.d.ts +0 -47
- package/lib/frontend/app/ui/settings/users/users.service.d.ts +0 -12
- package/lib/frontend/app/ui/settings/workflow/button/job-button.settings.component.d.ts +0 -32
- package/lib/frontend/app/ui/settings/workflow/progress/job-progress.settings.component.d.ts +0 -25
- package/lib/frontend/app/ui/settings/workflow/workflow.component.d.ts +0 -68
- package/lib/frontend/app/ui/sharelogin/share-login.component.d.ts +0 -16
- package/lib/frontend/app/ui/utils/grid-size-icon/grid-size-icon.component.d.ts +0 -5
- package/lib/frontend/app/ui/utils/sorting-method-icon/sorting-method-icon.component.d.ts +0 -13
- package/lib/frontend/app/ui/utils/timestamp-datepicker/datepicker.component.d.ts +0 -10
- package/lib/frontend/app/ui/utils/timestamp-timepicker/timepicker.component.d.ts +0 -11
- package/lib/frontend/environments/environment.d.ts +0 -3
- package/lib/frontend/environments/environment.prod.d.ts +0 -3
- package/lib/frontend/main.d.ts +0 -21
- package/lib/frontend/polyfills.d.ts +0 -60
- package/lib/frontend/test.d.ts +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ParentDirectoryDTO } from '../../../common/entities/DirectoryDTO';
|
|
2
|
-
import {
|
|
2
|
+
import { DataSource } from 'typeorm';
|
|
3
3
|
import { MediaDTO } from '../../../common/entities/MediaDTO';
|
|
4
4
|
export declare class IndexingManager {
|
|
5
|
-
SavingReady: Promise<void
|
|
5
|
+
SavingReady: Promise<void> | null;
|
|
6
6
|
private SavingReadyPR;
|
|
7
7
|
private savingQueue;
|
|
8
8
|
private isSaving;
|
|
@@ -21,11 +21,11 @@ export declare class IndexingManager {
|
|
|
21
21
|
*/
|
|
22
22
|
protected queueForSave(scannedDirectory: ParentDirectoryDTO): Promise<void>;
|
|
23
23
|
protected runSavingLoop(): Promise<void>;
|
|
24
|
-
protected saveParentDir(connection:
|
|
25
|
-
protected saveChildDirs(connection:
|
|
26
|
-
protected saveMetaFiles(connection:
|
|
27
|
-
protected saveMedia(connection:
|
|
28
|
-
protected savePersonsToMedia(connection:
|
|
24
|
+
protected saveParentDir(connection: DataSource, scannedDirectory: ParentDirectoryDTO): Promise<number>;
|
|
25
|
+
protected saveChildDirs(connection: DataSource, currentDirId: number, scannedDirectory: ParentDirectoryDTO): Promise<void>;
|
|
26
|
+
protected saveMetaFiles(connection: DataSource, currentDirID: number, scannedDirectory: ParentDirectoryDTO): Promise<void>;
|
|
27
|
+
protected saveMedia(connection: DataSource, parentDirId: number, media: MediaDTO[]): Promise<void>;
|
|
28
|
+
protected savePersonsToMedia(connection: DataSource, parentDirId: number, scannedFaces: {
|
|
29
29
|
name: string;
|
|
30
30
|
mediaId: number;
|
|
31
31
|
}[]): Promise<void>;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { GPSMetadata } from '../../../common/entities/PhotoDTO';
|
|
2
|
-
import
|
|
2
|
+
import NodeGeocoder from 'node-geocoder';
|
|
3
3
|
import { LRU } from '../../../common/Utils';
|
|
4
4
|
import { IObjectManager } from './IObjectManager';
|
|
5
|
-
import { ParentDirectoryDTO } from '../../../common/entities/DirectoryDTO';
|
|
6
5
|
export declare class LocationManager implements IObjectManager {
|
|
7
|
-
readonly onNewDataVersion
|
|
6
|
+
readonly onNewDataVersion?: IObjectManager['onNewDataVersion'];
|
|
8
7
|
readonly geocoder: NodeGeocoder.Geocoder;
|
|
9
8
|
cache: LRU<GPSMetadata>;
|
|
10
9
|
constructor();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PersonEntry } from './enitites/person/PersonEntry';
|
|
2
2
|
import { PersonDTO } from '../../../common/entities/PersonDTO';
|
|
3
|
-
import {
|
|
3
|
+
import { DirectoryPathDTO } from '../../../common/entities/DirectoryDTO';
|
|
4
4
|
import { SessionContext } from '../SessionContext';
|
|
5
5
|
import { ProjectionAwareManager } from './ProjectionAwareManager';
|
|
6
6
|
export declare class PersonManager extends ProjectionAwareManager<PersonEntry> {
|
|
@@ -9,12 +9,14 @@ export declare class PersonManager extends ProjectionAwareManager<PersonEntry> {
|
|
|
9
9
|
* Used for statistic
|
|
10
10
|
*/
|
|
11
11
|
countFaces(): Promise<number>;
|
|
12
|
-
get(session: SessionContext, name: string): Promise<PersonEntry>;
|
|
12
|
+
get(session: SessionContext, name: string): Promise<PersonEntry | undefined>;
|
|
13
13
|
saveAll(persons: {
|
|
14
14
|
name: string;
|
|
15
15
|
mediaId: number;
|
|
16
16
|
}[]): Promise<void>;
|
|
17
|
-
protected invalidateDBCache(changedDir?:
|
|
17
|
+
protected invalidateDBCache(changedDir?: DirectoryPathDTO & {
|
|
18
|
+
id?: number;
|
|
19
|
+
}): Promise<void>;
|
|
18
20
|
protected loadEntities(session: SessionContext): Promise<PersonEntry[]>;
|
|
19
21
|
private invalidateAllDBCache;
|
|
20
22
|
private updateCacheForAll;
|
|
@@ -1,31 +1,32 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DataSource } from 'typeorm';
|
|
2
2
|
import { ProjectedDirectoryCacheEntity } from './enitites/ProjectedDirectoryCacheEntity';
|
|
3
3
|
import { ProjectedAlbumCacheEntity } from './enitites/album/ProjectedAlbumCacheEntity';
|
|
4
4
|
import { IObjectManager } from './IObjectManager';
|
|
5
|
-
import {
|
|
5
|
+
import { DirectoryPathDTO } from '../../../common/entities/DirectoryDTO';
|
|
6
6
|
import { SessionContext } from '../SessionContext';
|
|
7
|
+
import { SearchQueryDTO } from '../../../common/entities/SearchQueryDTO';
|
|
7
8
|
export declare class ProjectedCacheManager implements IObjectManager {
|
|
8
9
|
init(): Promise<void>;
|
|
9
|
-
onNewDataVersion(changedDir?:
|
|
10
|
+
onNewDataVersion(changedDir?: DirectoryPathDTO): Promise<void>;
|
|
10
11
|
/**
|
|
11
12
|
* Includes all possible projection keys, including the default one and sharing keys too.
|
|
12
13
|
*/
|
|
13
14
|
getAllProjections(): Promise<string[]>;
|
|
14
15
|
cleanupNonExistingProjections(): Promise<void>;
|
|
15
|
-
getCacheForDirectory(connection:
|
|
16
|
+
getCacheForDirectory(connection: DataSource, session: SessionContext, dir: {
|
|
16
17
|
id: number;
|
|
17
18
|
name: string;
|
|
18
19
|
path: string;
|
|
19
20
|
}): Promise<ProjectedDirectoryCacheEntity>;
|
|
20
|
-
setAndGetCacheForDirectory(connection:
|
|
21
|
+
setAndGetCacheForDirectory(connection: DataSource, session: SessionContext, dir: {
|
|
21
22
|
id: number;
|
|
22
23
|
name: string;
|
|
23
24
|
path: string;
|
|
24
25
|
}): Promise<ProjectedDirectoryCacheEntity>;
|
|
25
|
-
setAndGetCacheForAlbum(connection:
|
|
26
|
+
setAndGetCacheForAlbum(connection: DataSource, session: SessionContext, album: {
|
|
26
27
|
name: string;
|
|
27
28
|
id: number;
|
|
28
|
-
searchQuery:
|
|
29
|
+
searchQuery: SearchQueryDTO;
|
|
29
30
|
}): Promise<ProjectedAlbumCacheEntity>;
|
|
30
|
-
protected invalidateDirectoryCache(dir:
|
|
31
|
+
protected invalidateDirectoryCache(dir: DirectoryPathDTO): Promise<void>;
|
|
31
32
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IObjectManager } from './IObjectManager';
|
|
2
2
|
import { SessionContext } from '../SessionContext';
|
|
3
|
-
import {
|
|
3
|
+
import { DirectoryPathDTO } from '../../../common/entities/DirectoryDTO';
|
|
4
4
|
/**
|
|
5
5
|
* Base class for managers that handle projection-aware caching.
|
|
6
6
|
* Provides common functionality for managers that need to cache data
|
|
@@ -13,12 +13,12 @@ export declare abstract class ProjectionAwareManager<T> implements IObjectManage
|
|
|
13
13
|
* the actual loading logic in loadEntities().
|
|
14
14
|
*/
|
|
15
15
|
getAll(session: SessionContext): Promise<T[]>;
|
|
16
|
-
invalidateCache(changedDir?:
|
|
16
|
+
invalidateCache(changedDir?: DirectoryPathDTO): Promise<void>;
|
|
17
17
|
/**
|
|
18
18
|
* Default implementation of onNewDataVersion that invalidates cache.
|
|
19
19
|
* Subclasses can override for more specific behavior.
|
|
20
20
|
*/
|
|
21
|
-
onNewDataVersion(changedDir?:
|
|
21
|
+
onNewDataVersion(changedDir?: DirectoryPathDTO): Promise<void>;
|
|
22
22
|
/**
|
|
23
23
|
* Reset the entire memory cache
|
|
24
24
|
*/
|
|
@@ -32,7 +32,7 @@ export declare abstract class ProjectionAwareManager<T> implements IObjectManage
|
|
|
32
32
|
* Abstract method that subclasses must implement to invalidate
|
|
33
33
|
* projection-aware cache entries in the database
|
|
34
34
|
*/
|
|
35
|
-
protected abstract invalidateDBCache(changedDir?:
|
|
35
|
+
protected abstract invalidateDBCache(changedDir?: DirectoryPathDTO): Promise<void>;
|
|
36
36
|
/**
|
|
37
37
|
* Get cached entities for the given session projection
|
|
38
38
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import 'reflect-metadata';
|
|
2
|
-
import {
|
|
2
|
+
import { DataSource } from 'typeorm';
|
|
3
3
|
import { ServerDataBaseConfig } from '../../../common/config/private/PrivateConfig';
|
|
4
4
|
export declare class SQLConnection {
|
|
5
5
|
private static entries;
|
|
@@ -7,7 +7,7 @@ export declare class SQLConnection {
|
|
|
7
7
|
private static FIXED_SQL_TABLE;
|
|
8
8
|
static getEntries(): Function[];
|
|
9
9
|
static addEntries(tables: Function[]): Promise<void>;
|
|
10
|
-
static getConnection(): Promise<
|
|
10
|
+
static getConnection(): Promise<DataSource>;
|
|
11
11
|
static tryConnection(config: ServerDataBaseConfig): Promise<boolean>;
|
|
12
12
|
static init(): Promise<void>;
|
|
13
13
|
static close(): Promise<void>;
|
|
@@ -18,5 +18,7 @@ export declare class SQLConnection {
|
|
|
18
18
|
static getSQLiteDB(config: ServerDataBaseConfig): string;
|
|
19
19
|
private static createConnection;
|
|
20
20
|
private static schemeSync;
|
|
21
|
+
private static getMySQLConfig;
|
|
22
|
+
private static getSQLiteConfig;
|
|
21
23
|
private static getDriver;
|
|
22
24
|
}
|
|
@@ -1,22 +1,32 @@
|
|
|
1
1
|
import { AutoCompleteItem } from '../../../common/entities/AutoCompleteItem';
|
|
2
2
|
import { SearchResultDTO } from '../../../common/entities/SearchResultDTO';
|
|
3
3
|
import { PhotoEntity } from './enitites/PhotoEntity';
|
|
4
|
-
import { Brackets, SelectQueryBuilder } from 'typeorm';
|
|
4
|
+
import { Brackets, ObjectLiteral, SelectQueryBuilder } from 'typeorm';
|
|
5
5
|
import { SearchQueryDTO, SearchQueryTypes } from '../../../common/entities/SearchQueryDTO';
|
|
6
6
|
import { SortingMethod } from '../../../common/entities/SortingMethods';
|
|
7
7
|
import { SessionContext } from '../SessionContext';
|
|
8
8
|
export declare class SearchManager {
|
|
9
9
|
private DIRECTORY_SELECT;
|
|
10
10
|
private queryIdBase;
|
|
11
|
-
static
|
|
11
|
+
private static likeValue;
|
|
12
|
+
/**
|
|
13
|
+
* A text condition that ignores the accents and the case as far as the DB can, see sqlFoldsText().
|
|
14
|
+
* @param escape '\' escapes the wildcards of the value (MySQL does it by default, SQLite only with ESCAPE)
|
|
15
|
+
* @param wrap an SQL expression around the compared text (not around the IS NOT NULL check)
|
|
16
|
+
*/
|
|
17
|
+
private static like;
|
|
18
|
+
private static containsText;
|
|
19
|
+
static setSorting<T extends ObjectLiteral>(query: SelectQueryBuilder<T>, sortings: SortingMethod[]): SelectQueryBuilder<T>;
|
|
12
20
|
private static autoCompleteItemsUnique;
|
|
13
21
|
autocomplete(session: SessionContext, value: string, type: SearchQueryTypes): Promise<AutoCompleteItem[]>;
|
|
14
22
|
search(session: SessionContext, queryIN: SearchQueryDTO): Promise<SearchResultDTO>;
|
|
15
23
|
getNMedia(session: SessionContext, query: SearchQueryDTO, sortings: SortingMethod[], take: number, photoOnly?: boolean): Promise<PhotoEntity[]>;
|
|
16
24
|
getCount(session: SessionContext, query: SearchQueryDTO): Promise<number>;
|
|
17
|
-
prepareAndBuildWhereQuery(queryIN: SearchQueryDTO, directoryOnly?:
|
|
18
|
-
|
|
19
|
-
|
|
25
|
+
prepareAndBuildWhereQuery(queryIN: SearchQueryDTO, directoryOnly?: false, aliases?: Record<string, string>): Promise<Brackets>;
|
|
26
|
+
/**
|
|
27
|
+
* directoryOnly: null if the query has no directory related part
|
|
28
|
+
*/
|
|
29
|
+
prepareAndBuildWhereQuery(queryIN: SearchQueryDTO, directoryOnly: boolean, aliases?: Record<string, string>): Promise<Brackets | null>;
|
|
20
30
|
prepareQuery(queryIN: SearchQueryDTO): Promise<SearchQueryDTO>;
|
|
21
31
|
/**
|
|
22
32
|
* Builds the SQL Where query from search query
|
|
@@ -25,11 +35,16 @@ export declare class SearchManager {
|
|
|
25
35
|
* @param aliases for SQL alias mapping
|
|
26
36
|
* @private
|
|
27
37
|
*/
|
|
28
|
-
buildWhereQuery(query: SearchQueryDTO, directoryOnly?: boolean, aliases?:
|
|
29
|
-
[key: string]: string;
|
|
30
|
-
}): Brackets;
|
|
38
|
+
buildWhereQuery(query: SearchQueryDTO, directoryOnly?: boolean, aliases?: Record<string, string>): Brackets;
|
|
31
39
|
hasDirectoryQuery(query: SearchQueryDTO): boolean;
|
|
32
40
|
protected flattenSameOfQueries(query: SearchQueryDTO): SearchQueryDTO;
|
|
41
|
+
/**
|
|
42
|
+
* A directory glob with a trailing '/*' means the directory itself and everything below it.
|
|
43
|
+
* The SQL glob only matches below the directory, so the directory itself is added as an exact match.
|
|
44
|
+
* See SearchQueryUtils.matchDirectorySearch for the same logic without DB.
|
|
45
|
+
*/
|
|
46
|
+
protected expandDirectoryGlobs(query: SearchQueryDTO): SearchQueryDTO;
|
|
47
|
+
protected convertMatchTypeToGlob(query: SearchQueryDTO): SearchQueryDTO;
|
|
33
48
|
/**
|
|
34
49
|
* Assigning IDs to search queries. It is a help / simplification to typeorm,
|
|
35
50
|
* so less parameters are needed to pass down to SQL.
|
|
@@ -1,11 +1,48 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SessionUser, SessionContext } from '../SessionContext';
|
|
2
2
|
import { SearchQueryDTO } from '../../../common/entities/SearchQueryDTO';
|
|
3
3
|
import { SharingEntity } from './enitites/SharingEntity';
|
|
4
4
|
export declare class SessionManager {
|
|
5
5
|
static readonly NO_PROJECTION_KEY: string;
|
|
6
|
-
private
|
|
7
|
-
|
|
6
|
+
private stamps;
|
|
7
|
+
private stampGeneration;
|
|
8
|
+
private static andQueries;
|
|
9
|
+
/**
|
|
10
|
+
* Creates the user that is used during a sharing session.
|
|
11
|
+
* It inherits the restrictions of the sharing creator.
|
|
12
|
+
*/
|
|
13
|
+
createSharingUser(sharing: SharingEntity): SessionUser;
|
|
14
|
+
/**
|
|
15
|
+
* Signature of the DB row a session is based on: the user, or the sharing (with its creator).
|
|
16
|
+
* Sessions are stored in the cookie, a session is only valid while its stamp is unchanged,
|
|
17
|
+
* so deleting or changing the user or sharing ends it. Null if the row does not exist or the sharing expired.
|
|
18
|
+
*/
|
|
19
|
+
getSessionStamp(user: SessionUser): Promise<string | null>;
|
|
20
|
+
/**
|
|
21
|
+
* Needs to be called after every user or sharing change.
|
|
22
|
+
*/
|
|
23
|
+
invalidateSessionCache(): void;
|
|
24
|
+
private loadSessionRow;
|
|
25
|
+
/**
|
|
26
|
+
* Returns with the final projection query (media and directory allow/block lists) of a sharing.
|
|
27
|
+
*/
|
|
28
|
+
buildAllowListForSharing(sharing: SharingEntity): SearchQueryDTO | null;
|
|
8
29
|
createProjectionKey(q: SearchQueryDTO): string;
|
|
9
|
-
buildContext(user:
|
|
30
|
+
buildContext(user: SessionUser): Promise<SessionContext>;
|
|
10
31
|
getAvailableUserSessions(): Promise<SessionContext[]>;
|
|
32
|
+
private buildDirectoryFilter;
|
|
33
|
+
/**
|
|
34
|
+
* Returns the media and the directory allow/block lists combined.
|
|
35
|
+
* Media that is in a not available directory is also not available.
|
|
36
|
+
*/
|
|
37
|
+
private getQueryForUser;
|
|
38
|
+
private getMediaQueryForUser;
|
|
39
|
+
/**
|
|
40
|
+
* Returns the user's own lists if they are overridden, otherwise the global ones from the config.
|
|
41
|
+
*/
|
|
42
|
+
private getDirectoryListsForUser;
|
|
43
|
+
/**
|
|
44
|
+
* A directory is available if it matches every allow list and none of the block list entries.
|
|
45
|
+
* The directory query of a sharing works as an extra allow list (on top of the creator's lists).
|
|
46
|
+
*/
|
|
47
|
+
private getDirectoryAccessForUser;
|
|
11
48
|
}
|
|
@@ -1,13 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UpdateSharingDTO } from '../../../common/entities/SharingDTO';
|
|
2
2
|
import { SharingEntity } from './enitites/SharingEntity';
|
|
3
3
|
import { UserDTO } from '../../../common/entities/UserDTO';
|
|
4
4
|
import { SearchQueryDTO } from '../../../common/entities/SearchQueryDTO';
|
|
5
5
|
export declare class SharingManager {
|
|
6
|
+
/**
|
|
7
|
+
* A sharing needs at least a media (searchQuery) or a directory (directoryQuery) restriction,
|
|
8
|
+
* otherwise it would show everything the creator can see.
|
|
9
|
+
*/
|
|
10
|
+
private static validateQueries;
|
|
6
11
|
private static removeExpiredLink;
|
|
7
12
|
deleteSharing(sharingKey: string): Promise<void>;
|
|
8
|
-
listAll(): Promise<
|
|
9
|
-
listAllForQuery(query: SearchQueryDTO, user?: UserDTO): Promise<
|
|
10
|
-
findOne(sharingKey: string): Promise<SharingEntity>;
|
|
11
|
-
createSharing(sharing:
|
|
12
|
-
updateSharing(inSharing:
|
|
13
|
+
listAll(): Promise<SharingEntity[]>;
|
|
14
|
+
listAllForQuery(query: SearchQueryDTO, user?: UserDTO): Promise<SharingEntity[]>;
|
|
15
|
+
findOne(sharingKey: string): Promise<SharingEntity | null>;
|
|
16
|
+
createSharing(sharing: Omit<UpdateSharingDTO, 'id'>): Promise<SharingEntity>;
|
|
17
|
+
updateSharing(inSharing: UpdateSharingDTO, forceUpdate: boolean): Promise<SharingEntity>;
|
|
13
18
|
}
|
|
@@ -3,11 +3,18 @@ import { UserEntity } from './enitites/UserEntity';
|
|
|
3
3
|
import { FindOptionsWhere } from 'typeorm';
|
|
4
4
|
import { UserSettingsDTO } from '../../../common/entities/UserSettingsDTO';
|
|
5
5
|
export declare class UserManager {
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* A missing value would otherwise match any user (e.g.: the admin).
|
|
8
|
+
* Use IsNull() if NULL is really meant.
|
|
9
|
+
*/
|
|
10
|
+
private static validateFilter;
|
|
11
|
+
private static validateId;
|
|
12
|
+
findOne(filter: FindOptionsWhere<UserEntity>): Promise<UserEntity | null>;
|
|
7
13
|
find(filter: FindOptionsWhere<UserDTO>): Promise<UserEntity[]>;
|
|
8
14
|
createUser(user: UserDTO): Promise<UserEntity>;
|
|
9
15
|
deleteUser(id: number): Promise<UserEntity>;
|
|
10
16
|
changeRole(id: number, newRole: UserRoles): Promise<UserEntity>;
|
|
17
|
+
setOidcSubject(id: number, oidcSubject: string | null): Promise<UserEntity>;
|
|
11
18
|
updateSettings(id: number, settings: UserSettingsDTO): Promise<UserEntity>;
|
|
12
19
|
getUnAuthenticatedUser(): UserDTO;
|
|
13
20
|
}
|
|
@@ -14,7 +14,7 @@ export declare class DirectoryEntity implements ParentDirectoryDTO<MediaDTO>, Su
|
|
|
14
14
|
/**
|
|
15
15
|
* Last time the directory was fully scanned, not only for a few media to create a cover
|
|
16
16
|
*/
|
|
17
|
-
lastScanned
|
|
17
|
+
lastScanned?: number | null;
|
|
18
18
|
isPartial?: boolean;
|
|
19
19
|
parent: DirectoryEntity;
|
|
20
20
|
directories: DirectoryEntity[];
|
|
@@ -1,7 +1,28 @@
|
|
|
1
1
|
import { ColumnOptions } from 'typeorm/decorator/options/ColumnOptions';
|
|
2
2
|
export declare class ColumnCharsetCS implements ColumnOptions {
|
|
3
3
|
get charset(): string;
|
|
4
|
-
get collation(): string;
|
|
4
|
+
get collation(): string | undefined;
|
|
5
5
|
}
|
|
6
6
|
export declare const columnCharsetCS: ColumnCharsetCS;
|
|
7
|
+
/**
|
|
8
|
+
* Same as columnCharsetCS, but with extra column options.
|
|
9
|
+
* charset and collation stay lazy getters, so they are resolved when the DB connection
|
|
10
|
+
* is built and not when the entity file is imported (Config.Database.type might change in between).
|
|
11
|
+
*/
|
|
12
|
+
export declare const columnCharsetCSWith: (options: ColumnOptions) => ColumnOptions;
|
|
7
13
|
export declare const SQL_COLLATE = "utf8mb4_general_ci";
|
|
14
|
+
/**
|
|
15
|
+
* SQLite's LIKE ignores SQL_COLLATE and the case of non-English letters. With Database.sqlite.accentInsensitiveSearch
|
|
16
|
+
* both sides are folded instead: lowercase and without accents (#1309). It makes text search several times slower.
|
|
17
|
+
*/
|
|
18
|
+
export declare const sqlFoldsText: () => boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Whether the text search of the DB (SearchManager) ignores the accents: MySQL's SQL_COLLATE does, SQLite only with sqlFoldsText().
|
|
21
|
+
* Checks of the same texts without DB need to follow it (e.g. DirectoryAccess).
|
|
22
|
+
*/
|
|
23
|
+
export declare const sqlIgnoresAccents: () => boolean;
|
|
24
|
+
/**
|
|
25
|
+
* The text in lowercase and without accents: SQLite searches compare fold(column) LIKE fold(value),
|
|
26
|
+
* as SQLite's LIKE ignores SQL_COLLATE (#1309). Registered as the SQL function fold() on SQLite.
|
|
27
|
+
*/
|
|
28
|
+
export declare const foldText: (text: string | null) => string | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DirectoryEntity } from './DirectoryEntity';
|
|
2
|
-
import { MediaDimension, MediaDTO, MediaMetadata } from '../../../../common/entities/MediaDTO';
|
|
2
|
+
import { LiveVideoInfo, MediaDimension, MediaDTO, MediaMetadata } from '../../../../common/entities/MediaDTO';
|
|
3
3
|
import { PersonJunctionTable } from './person/PersonJunctionTable';
|
|
4
4
|
import { CameraMetadata, FaceRegion, GPSMetadata, PositionMetaData } from '../../../../common/entities/PhotoDTO';
|
|
5
5
|
export declare class MediaDimensionEntity implements MediaDimension {
|
|
@@ -51,8 +51,9 @@ export declare class MediaMetadataEntity implements MediaMetadata {
|
|
|
51
51
|
* Caches the list of persons' length. Only used for searching
|
|
52
52
|
*/
|
|
53
53
|
personsLength: number;
|
|
54
|
-
bitRate: number;
|
|
54
|
+
bitRate: number | null;
|
|
55
55
|
duration: number;
|
|
56
|
+
contentIdentifier: string;
|
|
56
57
|
}
|
|
57
58
|
export declare abstract class MediaEntity implements MediaDTO {
|
|
58
59
|
id: number;
|
|
@@ -60,4 +61,6 @@ export declare abstract class MediaEntity implements MediaDTO {
|
|
|
60
61
|
directory: DirectoryEntity;
|
|
61
62
|
metadata: MediaMetadataEntity;
|
|
62
63
|
missingThumbnails: number;
|
|
64
|
+
liveVideoPath: string;
|
|
65
|
+
liveVideoInfo: LiveVideoInfo;
|
|
63
66
|
}
|
|
@@ -7,8 +7,8 @@ export declare class ProjectedDirectoryCacheEntity implements DirectoryCacheDTO
|
|
|
7
7
|
directory: DirectoryEntity;
|
|
8
8
|
mediaCount: number;
|
|
9
9
|
recursiveMediaCount?: number;
|
|
10
|
-
oldestMedia: number;
|
|
11
|
-
youngestMedia: number;
|
|
10
|
+
oldestMedia: number | null;
|
|
11
|
+
youngestMedia: number | null;
|
|
12
12
|
cover: MediaEntity;
|
|
13
13
|
valid: boolean;
|
|
14
14
|
}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseSharingDTO } from '../../../../common/entities/SharingDTO';
|
|
2
2
|
import { UserEntity } from './UserEntity';
|
|
3
|
-
import { SearchQueryDTO } from '../../../../common/entities/SearchQueryDTO';
|
|
4
|
-
export declare class SharingEntity implements
|
|
3
|
+
import { DirectorySearch, SearchQueryDTO } from '../../../../common/entities/SearchQueryDTO';
|
|
4
|
+
export declare class SharingEntity implements BaseSharingDTO {
|
|
5
5
|
id: number;
|
|
6
6
|
sharingKey: string;
|
|
7
|
-
searchQuery: SearchQueryDTO;
|
|
8
|
-
|
|
7
|
+
searchQuery: SearchQueryDTO | null;
|
|
8
|
+
directoryQuery: DirectorySearch | null;
|
|
9
|
+
/**
|
|
10
|
+
* Only of the defaults should be set at most. If none is set the defaultSearchView will be searchQuery
|
|
11
|
+
*/
|
|
12
|
+
defaultDirectoryView: string | null;
|
|
13
|
+
defaultSearchView: SearchQueryDTO | null;
|
|
14
|
+
password: string | null;
|
|
9
15
|
expires: number;
|
|
10
16
|
timeStamp: number;
|
|
11
17
|
creator: UserEntity;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { UserDTO, UserRoles } from '../../../../common/entities/UserDTO';
|
|
2
|
-
import { SearchQueryDTO } from '../../../../common/entities/SearchQueryDTO';
|
|
3
|
-
import {
|
|
4
|
-
export declare class UserEntity implements UserDTO,
|
|
2
|
+
import { DirectorySearch, SearchQueryDTO } from '../../../../common/entities/SearchQueryDTO';
|
|
3
|
+
import { SessionUser } from '../../SessionContext';
|
|
4
|
+
export declare class UserEntity implements UserDTO, SessionUser {
|
|
5
5
|
id: number;
|
|
6
6
|
name: string;
|
|
7
7
|
password: string;
|
|
8
8
|
role: UserRoles;
|
|
9
|
+
oidcSubject?: string | null;
|
|
9
10
|
overrideAllowBlockList?: boolean;
|
|
10
|
-
allowQuery?: SearchQueryDTO;
|
|
11
|
-
blockQuery?: SearchQueryDTO;
|
|
11
|
+
allowQuery?: SearchQueryDTO | null;
|
|
12
|
+
blockQuery?: SearchQueryDTO | null;
|
|
13
|
+
allowDirectoryList?: DirectorySearch[] | null;
|
|
14
|
+
blockDirectoryList?: DirectorySearch[] | null;
|
|
12
15
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { MediaEntity, MediaMetadataEntity } from './MediaEntity';
|
|
2
2
|
import { VideoDTO, VideoMetadata } from '../../../../common/entities/VideoDTO';
|
|
3
3
|
export declare class VideoMetadataEntity extends MediaMetadataEntity implements VideoMetadata {
|
|
4
|
-
bitRate: number;
|
|
4
|
+
bitRate: number | null;
|
|
5
5
|
duration: number;
|
|
6
|
-
fps: number;
|
|
6
|
+
fps: number | null;
|
|
7
7
|
}
|
|
8
8
|
export declare class VideoEntity extends MediaEntity implements VideoDTO {
|
|
9
9
|
metadata: VideoMetadataEntity;
|
|
@@ -6,8 +6,8 @@ export declare class ProjectedAlbumCacheEntity implements AlbumCacheDTO {
|
|
|
6
6
|
projectionKey: string;
|
|
7
7
|
album: AlbumBaseEntity;
|
|
8
8
|
itemCount: number;
|
|
9
|
-
oldestMedia: number;
|
|
10
|
-
youngestMedia: number;
|
|
9
|
+
oldestMedia: number | null;
|
|
10
|
+
youngestMedia: number | null;
|
|
11
11
|
cover: MediaEntity;
|
|
12
12
|
valid: boolean;
|
|
13
13
|
}
|
|
@@ -1,25 +1,44 @@
|
|
|
1
1
|
import { PrivateConfigClass } from '../../../common/config/private/PrivateConfigClass';
|
|
2
|
-
import { ClientAlbumConfig, ClientFacesConfig, ClientMapConfig, ClientMetaFileConfig, ClientPhotoConfig, ClientRandomPhotoConfig, ClientSearchConfig, ClientSharingConfig } from '../../../common/config/public/ClientConfig';
|
|
2
|
+
import { ClientAlbumConfig, ClientFacesConfig, ClientMapConfig, ClientMetaFileConfig, ClientPhotoConfig, ClientRandomPhotoConfig, ClientSearchConfig, ClientSharingConfig, NavBarConfig, NavigationLinkConfig } from '../../../common/config/public/ClientConfig';
|
|
3
3
|
import { ServerAlbumCoverConfig, ServerDataBaseConfig, ServerJobConfig, ServerPhotoConfig, ServerVideoConfig } from '../../../common/config/private/PrivateConfig';
|
|
4
4
|
export declare class ConfigDiagnostics {
|
|
5
5
|
private static adjustConfigWarn;
|
|
6
6
|
static testAlbumsConfig(albumConfig: ClientAlbumConfig, original: PrivateConfigClass): void;
|
|
7
7
|
static checkReadWritePermission(path: string): Promise<void>;
|
|
8
8
|
static testDatabase(databaseConfig: ServerDataBaseConfig): Promise<void>;
|
|
9
|
-
static testJobsConfig(jobsConfig: ServerJobConfig):
|
|
10
|
-
static testMetaFileConfig(metaFileConfig: ClientMetaFileConfig, config: PrivateConfigClass):
|
|
9
|
+
static testJobsConfig(jobsConfig: ServerJobConfig): void;
|
|
10
|
+
static testMetaFileConfig(metaFileConfig: ClientMetaFileConfig, config: PrivateConfigClass): void;
|
|
11
11
|
static testVideoConfig(videoConfig: ServerVideoConfig, config: PrivateConfigClass): Promise<void>;
|
|
12
|
-
static testSharp():
|
|
12
|
+
static testSharp(): void;
|
|
13
|
+
/**
|
|
14
|
+
* sharp 0.35+ has an `exports` map without './package.json', so `require('sharp/package.json')` would throw.
|
|
15
|
+
*/
|
|
16
|
+
private static getSharpPackageJson;
|
|
17
|
+
/**
|
|
18
|
+
* The Docker images compile sharp against the distro's libvips (SHARP_FORCE_GLOBAL_LIBVIPS),
|
|
19
|
+
* which skips sharp's own version check. A too-new sharp would then break at runtime.
|
|
20
|
+
* @param required sharp's `config.libvips`, e.g. '>=8.16.1'
|
|
21
|
+
* @param loaded the libvips sharp runs with (`sharp.versions.vips`)
|
|
22
|
+
*/
|
|
23
|
+
static testLibvipsVersion(required: string, loaded: string): void;
|
|
13
24
|
static testTempFolder(folder: string): Promise<void>;
|
|
14
25
|
static testImageFolder(folder: string): Promise<void>;
|
|
15
|
-
static testPhotoConfig(photoConfig: ServerPhotoConfig):
|
|
16
|
-
static testTasksConfig(task: ServerJobConfig, config: PrivateConfigClass):
|
|
17
|
-
static testFacesConfig(faces: ClientFacesConfig, config: PrivateConfigClass):
|
|
18
|
-
static testSearchConfig(search: ClientSearchConfig, config: PrivateConfigClass):
|
|
19
|
-
static testSharingConfig(sharing: ClientSharingConfig, config: PrivateConfigClass):
|
|
20
|
-
static testRandomPhotoConfig(sharing: ClientRandomPhotoConfig, config: PrivateConfigClass):
|
|
21
|
-
static testMapConfig(map: ClientMapConfig):
|
|
22
|
-
static
|
|
26
|
+
static testPhotoConfig(photoConfig: ServerPhotoConfig): void;
|
|
27
|
+
static testTasksConfig(task: ServerJobConfig, config: PrivateConfigClass): void;
|
|
28
|
+
static testFacesConfig(faces: ClientFacesConfig, config: PrivateConfigClass): void;
|
|
29
|
+
static testSearchConfig(search: ClientSearchConfig, config: PrivateConfigClass): void;
|
|
30
|
+
static testSharingConfig(sharing: ClientSharingConfig, config: PrivateConfigClass): void;
|
|
31
|
+
static testRandomPhotoConfig(sharing: ClientRandomPhotoConfig, config: PrivateConfigClass): void;
|
|
32
|
+
static testMapConfig(map: ClientMapConfig): void;
|
|
33
|
+
static testUsersConfig(config: PrivateConfigClass): void;
|
|
34
|
+
static testNavigationLink(link: NavigationLinkConfig, what?: string): void;
|
|
35
|
+
static testNavBarConfig(navBar: NavBarConfig): void;
|
|
36
|
+
/**
|
|
37
|
+
* Drops the links that the client could not navigate to.
|
|
38
|
+
* Falls back to the default links if nothing is left.
|
|
39
|
+
*/
|
|
40
|
+
static removeInvalidNavigationLinks(navBar: NavBarConfig): void;
|
|
41
|
+
static testAlbumCoverConfig(settings: ServerAlbumCoverConfig): void;
|
|
23
42
|
/**
|
|
24
43
|
* Removes unsupported image formats.
|
|
25
44
|
* It is possible that some OS support one or the other image formats (like macOS does with HEIC),
|
|
@@ -2,7 +2,7 @@ import * as express from 'express';
|
|
|
2
2
|
import { NextFunction, Request, Response } from 'express';
|
|
3
3
|
import { UserDTO, UserRoles } from '../../../common/entities/UserDTO';
|
|
4
4
|
import { ParamsDictionary } from 'express-serve-static-core';
|
|
5
|
-
import { IExtensionRESTApi, IExtensionRESTRoute, IMediaRequestBody } from './IExtension';
|
|
5
|
+
import { ExtensionRoutePaths, IExtensionRESTApi, IExtensionRESTRoute, IMediaRequestBody } from './IExtension';
|
|
6
6
|
import { ILogger } from '../../Logger';
|
|
7
7
|
import { MediaEntity } from '../database/enitites/MediaEntity';
|
|
8
8
|
import { Repository } from 'typeorm';
|
|
@@ -23,8 +23,14 @@ export declare class ExpressRouteWrapper implements IExtensionRESTRoute {
|
|
|
23
23
|
private readonly func;
|
|
24
24
|
private readonly extLogger;
|
|
25
25
|
constructor(router: express.Router, name: string, func: 'get' | 'use' | 'put' | 'post' | 'delete', extLogger: ILogger);
|
|
26
|
-
mediaJsonResponse
|
|
27
|
-
jsonResponse
|
|
28
|
-
rawMiddleware
|
|
26
|
+
mediaJsonResponse<const P extends readonly string[]>(paths: ExtensionRoutePaths<P>, minRole: UserRoles, invalidateDirectory: boolean, cb: (params: ParamsDictionary, body: IMediaRequestBody, user: UserDTO, media: MediaEntity, repository: Repository<MediaEntity>) => unknown): string;
|
|
27
|
+
jsonResponse<const P extends readonly string[]>(paths: ExtensionRoutePaths<P>, minRole: UserRoles, cb: (params?: ParamsDictionary, body?: unknown, user?: UserDTO) => unknown): string;
|
|
28
|
+
rawMiddleware<const P extends readonly string[]>(paths: ExtensionRoutePaths<P>, minRole: UserRoles, mw: (req: Request, res: Response, next: NextFunction) => void | Promise<void>): string;
|
|
29
|
+
/**
|
|
30
|
+
* Registers the route on the extension's router.
|
|
31
|
+
* A route that can't be registered (usually an old extension with an Express 4 path) is logged and skipped:
|
|
32
|
+
* the app keeps running, and nothing of the route is reachable (Express 5 throws before adding it to the router).
|
|
33
|
+
*/
|
|
34
|
+
private register;
|
|
29
35
|
private getAuthMWs;
|
|
30
36
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { IExtensionApp } from './IExtension';
|
|
2
2
|
import { ObjectManagers } from '../ObjectManagers';
|
|
3
|
+
import { PrivateConfigClass } from '../../../common/config/private/PrivateConfigClass';
|
|
3
4
|
export declare class ExtensionApp implements IExtensionApp {
|
|
4
|
-
get config():
|
|
5
|
-
[key: string]: any;
|
|
6
|
-
}>;
|
|
5
|
+
get config(): PrivateConfigClass;
|
|
7
6
|
get expressApp(): import("express").Express;
|
|
8
7
|
get objectManagers(): ObjectManagers;
|
|
9
8
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { IExtensionDB } from './IExtension';
|
|
2
|
-
import {
|
|
2
|
+
import { DataSource } from 'typeorm';
|
|
3
3
|
import { ILogger } from '../../Logger';
|
|
4
4
|
export declare class ExtensionDB implements IExtensionDB {
|
|
5
5
|
private readonly extLogger;
|
|
6
6
|
constructor(extLogger: ILogger);
|
|
7
7
|
_getAllTables(): Function[];
|
|
8
|
-
getSQLConnection(): Promise<
|
|
8
|
+
getSQLConnection(): Promise<DataSource>;
|
|
9
9
|
setExtensionTables(tables: Function[]): Promise<void>;
|
|
10
10
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IExtensionAfterEventHandler, IExtensionBeforeEventHandler, IExtensionEvent } from './IExtension';
|
|
1
|
+
import { IExtensionAfterEventHandler, IExtensionBeforeEventHandler, IExtensionEvent, IExtensionEvents } from './IExtension';
|
|
2
2
|
export declare class ExtensionEvent<I extends unknown[], O> implements IExtensionEvent<I, O> {
|
|
3
3
|
protected beforeHandlers: IExtensionBeforeEventHandler<I, O>[];
|
|
4
4
|
protected afterHandlers: IExtensionAfterEventHandler<I, O>[];
|
|
@@ -11,3 +11,14 @@ export declare class ExtensionEvent<I extends unknown[], O> implements IExtensio
|
|
|
11
11
|
}): Promise<I | O>;
|
|
12
12
|
triggerAfter(input: I, output: O): Promise<O>;
|
|
13
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* The events as one extension sees them: it forwards to the shared events and remembers the handlers,
|
|
16
|
+
* so they can all be removed when the extension is cleaned up (e.g. on reload).
|
|
17
|
+
*/
|
|
18
|
+
export declare class ExtensionEventsTracker {
|
|
19
|
+
readonly events: IExtensionEvents;
|
|
20
|
+
private readonly removers;
|
|
21
|
+
constructor(events: IExtensionEvents);
|
|
22
|
+
removeHandlers(): void;
|
|
23
|
+
private wrap;
|
|
24
|
+
}
|