pigallery2-extension-kit 2.0.1-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 +3 -0
- package/index.js +6 -0
- package/index.js.map +1 -0
- package/index.ts +2 -0
- package/lib/extension/index.d.ts +1 -0
- package/lib/src/backend/Logger.d.ts +20 -0
- package/lib/src/backend/ProjectPath.d.ts +16 -0
- package/lib/src/backend/exceptions/LocationLookupException.d.ts +4 -0
- package/lib/src/backend/index.d.ts +1 -0
- package/lib/src/backend/middlewares/AlbumMWs.d.ts +6 -0
- package/lib/src/backend/middlewares/GalleryMWs.d.ts +11 -0
- package/lib/src/backend/middlewares/MetaFileMWs.d.ts +4 -0
- package/lib/src/backend/middlewares/NotificationMWs.d.ts +4 -0
- package/lib/src/backend/middlewares/PersonMWs.d.ts +7 -0
- package/lib/src/backend/middlewares/RenderingMWs.d.ts +12 -0
- package/lib/src/backend/middlewares/ServerTimingMWs.d.ts +16 -0
- package/lib/src/backend/middlewares/SharingMWs.d.ts +10 -0
- package/lib/src/backend/middlewares/VersionMWs.d.ts +7 -0
- package/lib/src/backend/middlewares/admin/AdminMWs.d.ts +10 -0
- package/lib/src/backend/middlewares/admin/SettingsMWs.d.ts +10 -0
- package/lib/src/backend/middlewares/thumbnail/PhotoConverterMWs.d.ts +4 -0
- package/lib/src/backend/middlewares/thumbnail/ThumbnailGeneratorMWs.d.ts +13 -0
- package/lib/src/backend/middlewares/user/AuthenticationMWs.d.ts +14 -0
- package/lib/src/backend/middlewares/user/UserMWs.d.ts +7 -0
- package/lib/src/backend/middlewares/user/UserRequestConstrainsMWs.d.ts +6 -0
- package/lib/src/backend/model/EventLoopHandler.d.ts +6 -0
- package/lib/src/backend/model/FFmpegFactory.d.ts +4 -0
- package/lib/src/backend/model/Localizations.d.ts +3 -0
- package/lib/src/backend/model/NotifocationManager.d.ts +8 -0
- package/lib/src/backend/model/ObjectManagers.d.ts +61 -0
- package/lib/src/backend/model/PasswordHelper.d.ts +4 -0
- package/lib/src/backend/model/database/AlbumManager.d.ts +18 -0
- package/lib/src/backend/model/database/CoverManager.d.ts +31 -0
- package/lib/src/backend/model/database/GalleryManager.d.ts +30 -0
- package/lib/src/backend/model/database/IObjectManager.d.ts +6 -0
- package/lib/src/backend/model/database/IndexingManager.d.ts +32 -0
- package/lib/src/backend/model/database/LocationManager.d.ts +12 -0
- package/lib/src/backend/model/database/PersonManager.d.ts +31 -0
- package/lib/src/backend/model/database/SQLConnection.d.ts +22 -0
- package/lib/src/backend/model/database/SearchManager.d.ts +41 -0
- package/lib/src/backend/model/database/SharingManager.d.ts +11 -0
- package/lib/src/backend/model/database/UserManager.d.ts +10 -0
- package/lib/src/backend/model/database/VersionManager.d.ts +7 -0
- package/lib/src/backend/model/database/enitites/DirectoryEntity.d.ts +27 -0
- package/lib/src/backend/model/database/enitites/EntityUtils.d.ts +7 -0
- package/lib/src/backend/model/database/enitites/FileEntity.d.ts +7 -0
- package/lib/src/backend/model/database/enitites/MDFileEntity.d.ts +5 -0
- package/lib/src/backend/model/database/enitites/MediaEntity.d.ts +61 -0
- package/lib/src/backend/model/database/enitites/PersonEntry.d.ts +11 -0
- package/lib/src/backend/model/database/enitites/PersonJunctionTable.d.ts +10 -0
- package/lib/src/backend/model/database/enitites/PhotoEntity.d.ts +7 -0
- package/lib/src/backend/model/database/enitites/SharingEntity.d.ts +12 -0
- package/lib/src/backend/model/database/enitites/UserEntity.d.ts +8 -0
- package/lib/src/backend/model/database/enitites/VersionEntity.d.ts +4 -0
- package/lib/src/backend/model/database/enitites/VideoEntity.d.ts +10 -0
- package/lib/src/backend/model/database/enitites/album/AlbumBaseEntity.d.ts +12 -0
- package/lib/src/backend/model/database/enitites/album/SavedSearchEntity.d.ts +6 -0
- package/lib/src/backend/model/diagnostics/ConfigDiagnostics.d.ts +23 -0
- package/lib/src/backend/model/extension/ExpressRouterWrapper.d.ts +27 -0
- package/lib/src/backend/model/extension/ExtensionApp.d.ts +8 -0
- package/lib/src/backend/model/extension/ExtensionConfigWrapper.d.ts +17 -0
- package/lib/src/backend/model/extension/ExtensionDB.d.ts +10 -0
- package/lib/src/backend/model/extension/ExtensionDecorator.d.ts +6 -0
- package/lib/src/backend/model/extension/ExtensionEvent.d.ts +17 -0
- package/lib/src/backend/model/extension/ExtensionManager.d.ts +20 -0
- package/lib/src/backend/model/extension/ExtensionMessengerHandler.d.ts +13 -0
- package/lib/src/backend/model/extension/ExtensionObject.d.ts +21 -0
- package/lib/src/backend/model/extension/IExtension.d.ts +178 -0
- package/lib/src/backend/model/fileaccess/DiskManager.d.ts +28 -0
- package/lib/src/backend/model/fileaccess/MetadataLoader.d.ts +7 -0
- package/lib/src/backend/model/fileaccess/PhotoWorker.d.ts +38 -0
- package/lib/src/backend/model/fileaccess/TaskExecuter.d.ts +13 -0
- package/lib/src/backend/model/fileaccess/TaskQue.d.ts +18 -0
- package/lib/src/backend/model/fileaccess/VideoConverterWorker.d.ts +23 -0
- package/lib/src/backend/model/fileaccess/fileprocessing/GPXProcessing.d.ts +9 -0
- package/lib/src/backend/model/fileaccess/fileprocessing/PhotoProcessing.d.ts +23 -0
- package/lib/src/backend/model/fileaccess/fileprocessing/VideoProcessing.d.ts +9 -0
- package/lib/src/backend/model/jobs/JobManager.d.ts +37 -0
- package/lib/src/backend/model/jobs/JobProgressManager.d.ts +15 -0
- package/lib/src/backend/model/jobs/JobRepository.d.ts +10 -0
- package/lib/src/backend/model/jobs/jobs/AlbumCoverFillingJob.d.ts +18 -0
- package/lib/src/backend/model/jobs/jobs/AlbumCoverResetJob.d.ts +10 -0
- package/lib/src/backend/model/jobs/jobs/AlbumResetJob.d.ts +10 -0
- package/lib/src/backend/model/jobs/jobs/FileJob.d.ts +32 -0
- package/lib/src/backend/model/jobs/jobs/GPXCompressionJob.d.ts +10 -0
- package/lib/src/backend/model/jobs/jobs/GPXCompressionResetJob.d.ts +8 -0
- package/lib/src/backend/model/jobs/jobs/GalleryResetJob.d.ts +10 -0
- package/lib/src/backend/model/jobs/jobs/IJob.d.ts +14 -0
- package/lib/src/backend/model/jobs/jobs/IJobListener.d.ts +7 -0
- package/lib/src/backend/model/jobs/jobs/IndexingJob.d.ts +14 -0
- package/lib/src/backend/model/jobs/jobs/Job.d.ts +31 -0
- package/lib/src/backend/model/jobs/jobs/JobProgress.d.ts +26 -0
- package/lib/src/backend/model/jobs/jobs/PhotoConvertingJob.d.ts +8 -0
- package/lib/src/backend/model/jobs/jobs/TempFolderCleaningJob.d.ts +16 -0
- package/lib/src/backend/model/jobs/jobs/ThumbnailGenerationJob.d.ts +18 -0
- package/lib/src/backend/model/jobs/jobs/TopPickSendJob.d.ts +21 -0
- package/lib/src/backend/model/jobs/jobs/VideoConvertingJob.d.ts +8 -0
- package/lib/src/backend/model/messenger/EmailMessenger.d.ts +18 -0
- package/lib/src/backend/model/messenger/ExtensionMessenger.d.ts +11 -0
- package/lib/src/backend/model/messenger/Messenger.d.ts +14 -0
- package/lib/src/backend/model/messenger/MessengerRepository.d.ts +12 -0
- package/lib/src/backend/model/messenger/StdoutMessenger.d.ts +8 -0
- package/lib/src/backend/routes/AlbumRouter.d.ts +7 -0
- package/lib/src/backend/routes/ErrorRouter.d.ts +6 -0
- package/lib/src/backend/routes/GalleryRouter.d.ts +19 -0
- package/lib/src/backend/routes/LoggerRouter.d.ts +17 -0
- package/lib/src/backend/routes/NotificationRouter.d.ts +5 -0
- package/lib/src/backend/routes/PersonRouter.d.ts +7 -0
- package/lib/src/backend/routes/PublicRouter.d.ts +20 -0
- package/lib/src/backend/routes/Router.d.ts +4 -0
- package/lib/src/backend/routes/SharingRouter.d.ts +11 -0
- package/lib/src/backend/routes/UserRouter.d.ts +11 -0
- package/lib/src/backend/routes/admin/AdminRouter.d.ts +8 -0
- package/lib/src/backend/routes/admin/SettingsRouter.d.ts +5 -0
- package/lib/src/backend/server.d.ts +26 -0
- package/lib/src/common/BackendTexts.d.ts +35 -0
- package/lib/src/common/CookieNames.d.ts +6 -0
- package/lib/src/common/CustomHeaders.d.ts +3 -0
- package/lib/src/common/DataStructureVersion.d.ts +4 -0
- package/lib/src/common/PG2ConfMap.d.ts +20 -0
- package/lib/src/common/QueryParams.d.ts +23 -0
- package/lib/src/common/SearchQueryParser.d.ts +47 -0
- package/lib/src/common/SupportedFormats.d.ts +18 -0
- package/lib/src/common/Utils.d.ts +48 -0
- package/lib/src/common/config/private/Config.d.ts +6 -0
- package/lib/src/common/config/private/MessagingConfig.d.ts +15 -0
- package/lib/src/common/config/private/PrivateConfig.d.ts +203 -0
- package/lib/src/common/config/private/WebConfig.d.ts +5 -0
- package/lib/src/common/config/public/ClientConfig.d.ts +275 -0
- package/lib/src/common/config/public/Config.d.ts +8 -0
- package/lib/src/common/entities/AutoCompleteItem.d.ts +11 -0
- package/lib/src/common/entities/ConentWrapper.d.ts +18 -0
- package/lib/src/common/entities/DirectoryDTO.d.ts +55 -0
- package/lib/src/common/entities/DuplicatesDTO.d.ts +4 -0
- package/lib/src/common/entities/DynamicConfig.d.ts +19 -0
- package/lib/src/common/entities/Error.d.ts +34 -0
- package/lib/src/common/entities/FileDTO.d.ts +6 -0
- package/lib/src/common/entities/GridSizes.d.ts +7 -0
- package/lib/src/common/entities/LoginCredential.d.ts +6 -0
- package/lib/src/common/entities/MDFileDTO.d.ts +8 -0
- package/lib/src/common/entities/MediaDTO.d.ts +27 -0
- package/lib/src/common/entities/MediaPickDTO.d.ts +7 -0
- package/lib/src/common/entities/Message.d.ts +6 -0
- package/lib/src/common/entities/NotificationDTO.d.ts +15 -0
- package/lib/src/common/entities/PasswordChangeRequest.d.ts +6 -0
- package/lib/src/common/entities/PersonDTO.d.ts +7 -0
- package/lib/src/common/entities/PhotoDTO.d.ts +53 -0
- package/lib/src/common/entities/SearchQueryDTO.d.ts +130 -0
- package/lib/src/common/entities/SearchResultDTO.d.ts +11 -0
- package/lib/src/common/entities/SharingDTO.d.ts +17 -0
- package/lib/src/common/entities/SortingMethods.d.ts +56 -0
- package/lib/src/common/entities/UserDTO.d.ts +21 -0
- package/lib/src/common/entities/UserModificationRequest.d.ts +4 -0
- package/lib/src/common/entities/VideoDTO.d.ts +17 -0
- package/lib/src/common/entities/album/AlbumBaseDTO.d.ts +8 -0
- package/lib/src/common/entities/album/SavedSearchDTO.d.ts +11 -0
- package/lib/src/common/entities/job/JobDTO.d.ts +26 -0
- package/lib/src/common/entities/job/JobProgressDTO.d.ts +31 -0
- package/lib/src/common/entities/job/JobScheduleDTO.d.ts +38 -0
- package/lib/src/common/entities/settings/IndexingDTO.d.ts +3 -0
- package/lib/src/common/entities/settings/StatisticDTO.d.ts +7 -0
- package/lib/src/common/event/Event.d.ts +11 -0
- package/lib/src/common/event/Event2Args.d.ts +7 -0
- package/lib/src/common/event/EventLimit.d.ts +9 -0
- package/lib/src/frontend/app/app.component.d.ts +18 -0
- package/lib/src/frontend/app/app.module.d.ts +23 -0
- package/lib/src/frontend/app/app.routing.d.ts +4 -0
- package/lib/src/frontend/app/icon.component.d.ts +7 -0
- package/lib/src/frontend/app/model/IRenderable.d.ts +17 -0
- package/lib/src/frontend/app/model/backendtext.service.d.ts +7 -0
- package/lib/src/frontend/app/model/backendtext.service.spec.d.ts +1 -0
- package/lib/src/frontend/app/model/navigation.service.d.ts +12 -0
- package/lib/src/frontend/app/model/network/autehentication.service.spec.d.ts +1 -0
- package/lib/src/frontend/app/model/network/authentication.service.d.ts +22 -0
- package/lib/src/frontend/app/model/network/helper/auth.guard.d.ts +9 -0
- package/lib/src/frontend/app/model/network/helper/csrf.interceptor.d.ts +8 -0
- package/lib/src/frontend/app/model/network/helper/error.interceptor.d.ts +8 -0
- package/lib/src/frontend/app/model/network/network.service.d.ts +26 -0
- package/lib/src/frontend/app/model/network/network.service.spec.d.ts +1 -0
- package/lib/src/frontend/app/model/network/user.service.d.ts +13 -0
- package/lib/src/frontend/app/model/network/user.service.spec.d.ts +1 -0
- package/lib/src/frontend/app/model/notification.service.d.ts +28 -0
- package/lib/src/frontend/app/model/page.helper.d.ts +12 -0
- package/lib/src/frontend/app/model/pi-title.service.d.ts +15 -0
- package/lib/src/frontend/app/model/query.service.d.ts +16 -0
- package/lib/src/frontend/app/model/seededRandom.service.d.ts +7 -0
- package/lib/src/frontend/app/model/theme.service.d.ts +16 -0
- package/lib/src/frontend/app/model/version.service.d.ts +6 -0
- package/lib/src/frontend/app/pipes/DurationPipe.d.ts +4 -0
- package/lib/src/frontend/app/pipes/FileDTOToPathPipe.d.ts +5 -0
- package/lib/src/frontend/app/pipes/FileDTOToRelativePathPipe.d.ts +5 -0
- package/lib/src/frontend/app/pipes/FileSizePipe.d.ts +4 -0
- package/lib/src/frontend/app/pipes/GPXFilesFilterPipe.d.ts +5 -0
- package/lib/src/frontend/app/pipes/MDFilesFilterPipe.d.ts +6 -0
- package/lib/src/frontend/app/pipes/ParseIntPipe.d.ts +4 -0
- package/lib/src/frontend/app/pipes/PhotoFilterPipe.d.ts +6 -0
- package/lib/src/frontend/app/pipes/SafeHTMLPipe.d.ts +7 -0
- package/lib/src/frontend/app/pipes/StringifyEnum.d.ts +4 -0
- package/lib/src/frontend/app/pipes/StringifyGridSize.d.ts +5 -0
- package/lib/src/frontend/app/pipes/StringifyRolePipe.d.ts +4 -0
- package/lib/src/frontend/app/pipes/StringifySearchQuery.d.ts +8 -0
- package/lib/src/frontend/app/pipes/StringifySearchType.d.ts +5 -0
- package/lib/src/frontend/app/pipes/StringifySortingMethod.d.ts +4 -0
- package/lib/src/frontend/app/ui/EnumTranslations.d.ts +5 -0
- package/lib/src/frontend/app/ui/admin/admin.component.d.ts +36 -0
- package/lib/src/frontend/app/ui/albums/album/album.component.d.ts +26 -0
- package/lib/src/frontend/app/ui/albums/albums.component.d.ts +26 -0
- package/lib/src/frontend/app/ui/albums/albums.service.d.ts +12 -0
- package/lib/src/frontend/app/ui/albums/saved-search-popup/saved-search-popup.component.d.ts +15 -0
- package/lib/src/frontend/app/ui/duplicates/duplicates.component.d.ts +36 -0
- package/lib/src/frontend/app/ui/duplicates/duplicates.service.d.ts +9 -0
- package/lib/src/frontend/app/ui/duplicates/photo/photo.duplicates.component.d.ts +11 -0
- package/lib/src/frontend/app/ui/faces/Person.d.ts +8 -0
- package/lib/src/frontend/app/ui/faces/face/face.component.d.ts +22 -0
- package/lib/src/frontend/app/ui/faces/faces.component.d.ts +18 -0
- package/lib/src/frontend/app/ui/faces/faces.service.d.ts +10 -0
- package/lib/src/frontend/app/ui/frame/frame.component.d.ts +54 -0
- package/lib/src/frontend/app/ui/gallery/Media.d.ts +16 -0
- package/lib/src/frontend/app/ui/gallery/MediaIcon.d.ts +18 -0
- package/lib/src/frontend/app/ui/gallery/blog/blog.gallery.component.d.ts +14 -0
- package/lib/src/frontend/app/ui/gallery/blog/blog.service.d.ts +23 -0
- package/lib/src/frontend/app/ui/gallery/cache.gallery.service.d.ts +54 -0
- package/lib/src/frontend/app/ui/gallery/content.service.d.ts +11 -0
- package/lib/src/frontend/app/ui/gallery/contentLoader.service.d.ts +35 -0
- package/lib/src/frontend/app/ui/gallery/directories/directories.component.d.ts +14 -0
- package/lib/src/frontend/app/ui/gallery/directories/directory/directory.gallery.component.d.ts +20 -0
- package/lib/src/frontend/app/ui/gallery/filter/filter.gallery.component.d.ts +32 -0
- package/lib/src/frontend/app/ui/gallery/filter/filter.service.d.ts +51 -0
- package/lib/src/frontend/app/ui/gallery/fullscreen.service.d.ts +7 -0
- package/lib/src/frontend/app/ui/gallery/gallery.component.d.ts +55 -0
- package/lib/src/frontend/app/ui/gallery/grid/GridMedia.d.ts +13 -0
- package/lib/src/frontend/app/ui/gallery/grid/GridRowBuilder.d.ts +16 -0
- package/lib/src/frontend/app/ui/gallery/grid/grid.gallery.component.d.ts +85 -0
- package/lib/src/frontend/app/ui/gallery/grid/grid.gallery.component.spec.d.ts +1 -0
- package/lib/src/frontend/app/ui/gallery/grid/photo/loading/loading.photo.grid.gallery.component.d.ts +4 -0
- package/lib/src/frontend/app/ui/gallery/grid/photo/photo.grid.gallery.component.d.ts +37 -0
- package/lib/src/frontend/app/ui/gallery/lightbox/controls/controls.lightbox.gallery.component.d.ts +102 -0
- package/lib/src/frontend/app/ui/gallery/lightbox/infopanel/info-panel.lightbox.gallery.component.d.ts +48 -0
- package/lib/src/frontend/app/ui/gallery/lightbox/lightbox.gallery.component.d.ts +88 -0
- package/lib/src/frontend/app/ui/gallery/lightbox/lightbox.service.d.ts +5 -0
- package/lib/src/frontend/app/ui/gallery/lightbox/media/media.lightbox.gallery.component.d.ts +63 -0
- package/lib/src/frontend/app/ui/gallery/map/MarkerFactory.d.ts +12 -0
- package/lib/src/frontend/app/ui/gallery/map/lightbox/lightbox.map.gallery.component.d.ts +71 -0
- package/lib/src/frontend/app/ui/gallery/map/map.gallery.component.d.ts +32 -0
- package/lib/src/frontend/app/ui/gallery/map/map.service.d.ts +20 -0
- package/lib/src/frontend/app/ui/gallery/navigator/navigator.gallery.component.d.ts +79 -0
- package/lib/src/frontend/app/ui/gallery/navigator/navigator.service.d.ts +13 -0
- package/lib/src/frontend/app/ui/gallery/navigator/sorting.service.d.ts +38 -0
- package/lib/src/frontend/app/ui/gallery/overlay.service.d.ts +9 -0
- package/lib/src/frontend/app/ui/gallery/random-query-builder/random-query-builder.gallery.component.d.ts +30 -0
- package/lib/src/frontend/app/ui/gallery/search/AutoCompleteRenderItem.d.ts +11 -0
- package/lib/src/frontend/app/ui/gallery/search/autocomplete.service.d.ts +33 -0
- package/lib/src/frontend/app/ui/gallery/search/query-builder/query-bulder.gallery.component.d.ts +22 -0
- package/lib/src/frontend/app/ui/gallery/search/query-enrty/query-entry.search.gallery.component.d.ts +40 -0
- package/lib/src/frontend/app/ui/gallery/search/search-field/search-field.gallery.component.d.ts +31 -0
- package/lib/src/frontend/app/ui/gallery/search/search-field-base/search-field-base.gallery.component.d.ts +57 -0
- package/lib/src/frontend/app/ui/gallery/search/search-query-parser.service.d.ts +9 -0
- package/lib/src/frontend/app/ui/gallery/search/search.gallery.component.d.ts +39 -0
- package/lib/src/frontend/app/ui/gallery/share/share.gallery.component.d.ts +63 -0
- package/lib/src/frontend/app/ui/gallery/share.service.d.ts +30 -0
- package/lib/src/frontend/app/ui/gallery/thumbnailLoader.service.d.ts +41 -0
- package/lib/src/frontend/app/ui/gallery/thumbnailManager.service.d.ts +46 -0
- package/lib/src/frontend/app/ui/language/language.component.d.ts +10 -0
- package/lib/src/frontend/app/ui/login/login.component.d.ts +15 -0
- package/lib/src/frontend/app/ui/settings/gallery-statistic/gallery-statistic.component.d.ts +5 -0
- package/lib/src/frontend/app/ui/settings/scheduled-jobs.service.d.ts +40 -0
- package/lib/src/frontend/app/ui/settings/settings.service.d.ts +27 -0
- package/lib/src/frontend/app/ui/settings/sharings-list/sharings-list.component.d.ts +14 -0
- package/lib/src/frontend/app/ui/settings/template/CustomSettingsEntries.d.ts +34 -0
- package/lib/src/frontend/app/ui/settings/template/ISettingsComponent.d.ts +13 -0
- package/lib/src/frontend/app/ui/settings/template/settings-entry/settings-entry.component.d.ts +118 -0
- package/lib/src/frontend/app/ui/settings/template/settings-entry/sorting-method/sorting-method.settings-entry.component.d.ts +25 -0
- package/lib/src/frontend/app/ui/settings/template/template.component.d.ts +86 -0
- package/lib/src/frontend/app/ui/settings/users/users.component.d.ts +34 -0
- package/lib/src/frontend/app/ui/settings/users/users.service.d.ts +10 -0
- package/lib/src/frontend/app/ui/settings/workflow/button/job-button.settings.component.d.ts +25 -0
- package/lib/src/frontend/app/ui/settings/workflow/progress/job-progress.settings.component.d.ts +25 -0
- package/lib/src/frontend/app/ui/settings/workflow/workflow.component.d.ts +68 -0
- package/lib/src/frontend/app/ui/sharelogin/share-login.component.d.ts +16 -0
- package/lib/src/frontend/app/ui/utils/grid-size-icon/grid-size-icon.component.d.ts +5 -0
- package/lib/src/frontend/app/ui/utils/sorting-method-icon/sorting-method-icon.component.d.ts +13 -0
- package/lib/src/frontend/app/ui/utils/timestamp-datepicker/datepicker.component.d.ts +10 -0
- package/lib/src/frontend/app/ui/utils/timestamp-timepicker/timepicker.component.d.ts +11 -0
- package/lib/src/frontend/environments/environment.d.ts +3 -0
- package/lib/src/frontend/environments/environment.prod.d.ts +3 -0
- package/lib/src/frontend/main.d.ts +1 -0
- package/lib/src/frontend/polyfills.d.ts +60 -0
- package/lib/src/frontend/test.d.ts +1 -0
- package/lib/test.d.ts +1 -0
- package/lib/test2.d.ts +1 -0
- package/package.json +8 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ParentDirectoryDTO, SubDirectoryDTO } from '../../../../common/entities/DirectoryDTO';
|
|
2
|
+
import { MediaEntity } from './MediaEntity';
|
|
3
|
+
import { FileEntity } from './FileEntity';
|
|
4
|
+
import { MediaDTO } from '../../../../common/entities/MediaDTO';
|
|
5
|
+
export declare class DirectoryEntity implements ParentDirectoryDTO<MediaDTO>, SubDirectoryDTO<MediaDTO> {
|
|
6
|
+
id: number;
|
|
7
|
+
name: string;
|
|
8
|
+
path: string;
|
|
9
|
+
/**
|
|
10
|
+
* last time the directory was modified (from outside, eg.: a new media was added)
|
|
11
|
+
*/
|
|
12
|
+
lastModified: number;
|
|
13
|
+
/**
|
|
14
|
+
* Last time the directory was fully scanned, not only for a few media to create a cover
|
|
15
|
+
*/
|
|
16
|
+
lastScanned: number;
|
|
17
|
+
isPartial?: boolean;
|
|
18
|
+
mediaCount: number;
|
|
19
|
+
oldestMedia: number;
|
|
20
|
+
youngestMedia: number;
|
|
21
|
+
parent: DirectoryEntity;
|
|
22
|
+
directories: DirectoryEntity[];
|
|
23
|
+
cover: MediaEntity;
|
|
24
|
+
validCover: boolean;
|
|
25
|
+
media: MediaEntity[];
|
|
26
|
+
metaFile: FileEntity[];
|
|
27
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ColumnOptions } from 'typeorm/decorator/options/ColumnOptions';
|
|
2
|
+
export declare class ColumnCharsetCS implements ColumnOptions {
|
|
3
|
+
get charset(): string;
|
|
4
|
+
get collation(): string;
|
|
5
|
+
}
|
|
6
|
+
export declare const columnCharsetCS: ColumnCharsetCS;
|
|
7
|
+
export declare const SQL_COLLATE = "utf8mb4_general_ci";
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { DirectoryEntity } from './DirectoryEntity';
|
|
2
|
+
import { MediaDimension, MediaDTO, MediaMetadata } from '../../../../common/entities/MediaDTO';
|
|
3
|
+
import { PersonJunctionTable } from './PersonJunctionTable';
|
|
4
|
+
import { CameraMetadata, FaceRegion, GPSMetadata, PositionMetaData } from '../../../../common/entities/PhotoDTO';
|
|
5
|
+
export declare class MediaDimensionEntity implements MediaDimension {
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
}
|
|
9
|
+
export declare class CameraMetadataEntity implements CameraMetadata {
|
|
10
|
+
ISO: number;
|
|
11
|
+
model: string;
|
|
12
|
+
make: string;
|
|
13
|
+
fStop: number;
|
|
14
|
+
exposure: number;
|
|
15
|
+
focalLength: number;
|
|
16
|
+
lens: string;
|
|
17
|
+
}
|
|
18
|
+
export declare class GPSMetadataEntity implements GPSMetadata {
|
|
19
|
+
latitude: number;
|
|
20
|
+
longitude: number;
|
|
21
|
+
}
|
|
22
|
+
export declare class PositionMetaDataEntity implements PositionMetaData {
|
|
23
|
+
GPSData: GPSMetadataEntity;
|
|
24
|
+
country: string;
|
|
25
|
+
state: string;
|
|
26
|
+
city: string;
|
|
27
|
+
}
|
|
28
|
+
export declare class MediaMetadataEntity implements MediaMetadata {
|
|
29
|
+
caption: string;
|
|
30
|
+
size: MediaDimensionEntity;
|
|
31
|
+
/**
|
|
32
|
+
* Date in local timezone
|
|
33
|
+
* Reason: If you look back your holiday photos from a different timezone,
|
|
34
|
+
* you do not want to see 2AM next to a photo that was taken during lunch
|
|
35
|
+
*/
|
|
36
|
+
creationDate: number;
|
|
37
|
+
fileSize: number;
|
|
38
|
+
keywords: string[];
|
|
39
|
+
cameraData: CameraMetadataEntity;
|
|
40
|
+
positionData: PositionMetaDataEntity;
|
|
41
|
+
rating: 0 | 1 | 2 | 3 | 4 | 5;
|
|
42
|
+
personJunction: PersonJunctionTable[];
|
|
43
|
+
faces: FaceRegion[];
|
|
44
|
+
/**
|
|
45
|
+
* Caches the list of persons. Only used for searching
|
|
46
|
+
*/
|
|
47
|
+
persons: string[];
|
|
48
|
+
/**
|
|
49
|
+
* Caches the list of persons' length. Only used for searching
|
|
50
|
+
*/
|
|
51
|
+
personsLength: number;
|
|
52
|
+
bitRate: number;
|
|
53
|
+
duration: number;
|
|
54
|
+
}
|
|
55
|
+
export declare abstract class MediaEntity implements MediaDTO {
|
|
56
|
+
id: number;
|
|
57
|
+
name: string;
|
|
58
|
+
directory: DirectoryEntity;
|
|
59
|
+
metadata: MediaMetadataEntity;
|
|
60
|
+
missingThumbnails: number;
|
|
61
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PersonJunctionTable } from './PersonJunctionTable';
|
|
2
|
+
import { PersonDTO } from '../../../../common/entities/PersonDTO';
|
|
3
|
+
export declare class PersonEntry implements PersonDTO {
|
|
4
|
+
id: number;
|
|
5
|
+
name: string;
|
|
6
|
+
count: number;
|
|
7
|
+
isFavourite: boolean;
|
|
8
|
+
faces: PersonJunctionTable[];
|
|
9
|
+
sampleRegion: PersonJunctionTable;
|
|
10
|
+
missingThumbnail?: boolean;
|
|
11
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PersonEntry } from './PersonEntry';
|
|
2
|
+
import { MediaEntity } from './MediaEntity';
|
|
3
|
+
/**
|
|
4
|
+
* This is a junction table between media and persons
|
|
5
|
+
*/
|
|
6
|
+
export declare class PersonJunctionTable {
|
|
7
|
+
id: number;
|
|
8
|
+
media: MediaEntity;
|
|
9
|
+
person: PersonEntry;
|
|
10
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PhotoDTO, PhotoMetadata } from '../../../../common/entities/PhotoDTO';
|
|
2
|
+
import { MediaEntity, MediaMetadataEntity } from './MediaEntity';
|
|
3
|
+
export declare class PhotoMetadataEntity extends MediaMetadataEntity implements PhotoMetadata {
|
|
4
|
+
}
|
|
5
|
+
export declare class PhotoEntity extends MediaEntity implements PhotoDTO {
|
|
6
|
+
metadata: PhotoMetadataEntity;
|
|
7
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SharingDTO } from '../../../../common/entities/SharingDTO';
|
|
2
|
+
import { UserDTO } from '../../../../common/entities/UserDTO';
|
|
3
|
+
export declare class SharingEntity implements SharingDTO {
|
|
4
|
+
id: number;
|
|
5
|
+
sharingKey: string;
|
|
6
|
+
path: string;
|
|
7
|
+
password: string;
|
|
8
|
+
expires: number;
|
|
9
|
+
timeStamp: number;
|
|
10
|
+
includeSubfolders: boolean;
|
|
11
|
+
creator: UserDTO;
|
|
12
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { MediaEntity, MediaMetadataEntity } from './MediaEntity';
|
|
2
|
+
import { VideoDTO, VideoMetadata } from '../../../../common/entities/VideoDTO';
|
|
3
|
+
export declare class VideoMetadataEntity extends MediaMetadataEntity implements VideoMetadata {
|
|
4
|
+
bitRate: number;
|
|
5
|
+
duration: number;
|
|
6
|
+
fps: number;
|
|
7
|
+
}
|
|
8
|
+
export declare class VideoEntity extends MediaEntity implements VideoDTO {
|
|
9
|
+
metadata: VideoMetadataEntity;
|
|
10
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MediaEntity } from '../MediaEntity';
|
|
2
|
+
import { AlbumBaseDTO } from '../../../../../common/entities/album/AlbumBaseDTO';
|
|
3
|
+
export declare class AlbumBaseEntity implements AlbumBaseDTO {
|
|
4
|
+
id: number;
|
|
5
|
+
name: string;
|
|
6
|
+
/**
|
|
7
|
+
* Locked albums are not possible to remove
|
|
8
|
+
*/
|
|
9
|
+
locked: boolean;
|
|
10
|
+
count: number;
|
|
11
|
+
cover: MediaEntity;
|
|
12
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AlbumBaseEntity } from './AlbumBaseEntity';
|
|
2
|
+
import { SavedSearchDTO } from '../../../../../common/entities/album/SavedSearchDTO';
|
|
3
|
+
import { SearchQueryDTO } from '../../../../../common/entities/SearchQueryDTO';
|
|
4
|
+
export declare class SavedSearchEntity extends AlbumBaseEntity implements SavedSearchDTO {
|
|
5
|
+
searchQuery: SearchQueryDTO;
|
|
6
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { PrivateConfigClass } from '../../../common/config/private/Config';
|
|
2
|
+
import { ClientAlbumConfig, ClientFacesConfig, ClientMapConfig, ClientMetaFileConfig, ClientRandomPhotoConfig, ClientSearchConfig, ClientSharingConfig } from '../../../common/config/public/ClientConfig';
|
|
3
|
+
import { ServerAlbumCoverConfig, ServerDataBaseConfig, ServerJobConfig, ServerThumbnailConfig, ServerVideoConfig } from '../../../common/config/private/PrivateConfig';
|
|
4
|
+
export declare class ConfigDiagnostics {
|
|
5
|
+
static testAlbumsConfig(albumConfig: ClientAlbumConfig, original: PrivateConfigClass): void;
|
|
6
|
+
static checkReadWritePermission(path: string): Promise<void>;
|
|
7
|
+
static testDatabase(databaseConfig: ServerDataBaseConfig): Promise<void>;
|
|
8
|
+
static testMetaFileConfig(metaFileConfig: ClientMetaFileConfig, config: PrivateConfigClass): Promise<void>;
|
|
9
|
+
static testVideoConfig(videoConfig: ServerVideoConfig, config: PrivateConfigClass): Promise<void>;
|
|
10
|
+
static testSharp(): Promise<void>;
|
|
11
|
+
static testTempFolder(folder: string): Promise<void>;
|
|
12
|
+
static testImageFolder(folder: string): Promise<void>;
|
|
13
|
+
static testThumbnailConfig(thumbnailConfig: ServerThumbnailConfig): Promise<void>;
|
|
14
|
+
static testTasksConfig(task: ServerJobConfig, config: PrivateConfigClass): Promise<void>;
|
|
15
|
+
static testFacesConfig(faces: ClientFacesConfig, config: PrivateConfigClass): Promise<void>;
|
|
16
|
+
static testSearchConfig(search: ClientSearchConfig, config: PrivateConfigClass): Promise<void>;
|
|
17
|
+
static testSharingConfig(sharing: ClientSharingConfig, config: PrivateConfigClass): Promise<void>;
|
|
18
|
+
static testRandomPhotoConfig(sharing: ClientRandomPhotoConfig, config: PrivateConfigClass): Promise<void>;
|
|
19
|
+
static testMapConfig(map: ClientMapConfig): Promise<void>;
|
|
20
|
+
static testAlbumCoverConfig(settings: ServerAlbumCoverConfig): Promise<void>;
|
|
21
|
+
static testConfig(config: PrivateConfigClass): Promise<void>;
|
|
22
|
+
static runDiagnostics(): Promise<void>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as express from 'express';
|
|
2
|
+
import { NextFunction, Request, Response } from 'express';
|
|
3
|
+
import { UserDTO, UserRoles } from '../../../common/entities/UserDTO';
|
|
4
|
+
import { ParamsDictionary } from 'express-serve-static-core';
|
|
5
|
+
import { IExtensionRESTApi, IExtensionRESTRoute } from './IExtension';
|
|
6
|
+
import { ILogger } from '../../Logger';
|
|
7
|
+
export declare class ExpressRouterWrapper implements IExtensionRESTApi {
|
|
8
|
+
private readonly router;
|
|
9
|
+
private readonly name;
|
|
10
|
+
private readonly extLogger;
|
|
11
|
+
constructor(router: express.Router, name: string, extLogger: ILogger);
|
|
12
|
+
get use(): ExpressRouteWrapper;
|
|
13
|
+
get get(): ExpressRouteWrapper;
|
|
14
|
+
get put(): ExpressRouteWrapper;
|
|
15
|
+
get post(): ExpressRouteWrapper;
|
|
16
|
+
get delete(): ExpressRouteWrapper;
|
|
17
|
+
}
|
|
18
|
+
export declare class ExpressRouteWrapper implements IExtensionRESTRoute {
|
|
19
|
+
private readonly router;
|
|
20
|
+
private readonly name;
|
|
21
|
+
private readonly func;
|
|
22
|
+
private readonly extLogger;
|
|
23
|
+
constructor(router: express.Router, name: string, func: 'get' | 'use' | 'put' | 'post' | 'delete', extLogger: ILogger);
|
|
24
|
+
private getAuthMWs;
|
|
25
|
+
jsonResponse(paths: string[], minRole: UserRoles, cb: (params?: ParamsDictionary, body?: any, user?: UserDTO) => Promise<unknown> | unknown): string;
|
|
26
|
+
rawMiddleware(paths: string[], minRole: UserRoles, mw: (req: Request, res: Response, next: NextFunction) => void | Promise<void>): string;
|
|
27
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="express" />
|
|
2
|
+
import { IExtensionApp } from './IExtension';
|
|
3
|
+
import { ObjectManagers } from '../ObjectManagers';
|
|
4
|
+
export declare class ExtensionApp implements IExtensionApp {
|
|
5
|
+
get config(): import("typeconfig").IConfigClass<unknown> & import("../../../common/config/private/Config").PrivateConfigClass;
|
|
6
|
+
get expressApp(): import("express").Express;
|
|
7
|
+
get objectManagers(): ObjectManagers;
|
|
8
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IConfigClass } from 'typeconfig/common';
|
|
2
|
+
import { PrivateConfigClass } from '../../../common/config/private/Config';
|
|
3
|
+
import { IExtensionConfig } from './IExtension';
|
|
4
|
+
/**
|
|
5
|
+
* Wraps to original config and makes sure all extension related config is loaded
|
|
6
|
+
*/
|
|
7
|
+
export declare class ExtensionConfigWrapper {
|
|
8
|
+
static original(): Promise<PrivateConfigClass & IConfigClass>;
|
|
9
|
+
}
|
|
10
|
+
export declare class ExtensionConfig<C> implements IExtensionConfig<C> {
|
|
11
|
+
private readonly extensionId;
|
|
12
|
+
template: new () => C;
|
|
13
|
+
constructor(extensionId: string);
|
|
14
|
+
getConfig(): C;
|
|
15
|
+
setTemplate(template: new () => C): void;
|
|
16
|
+
loadToConfig(config: PrivateConfigClass): void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IExtensionDB } from './IExtension';
|
|
2
|
+
import { Connection } from 'typeorm';
|
|
3
|
+
import { ILogger } from '../../Logger';
|
|
4
|
+
export declare class ExtensionDB implements IExtensionDB {
|
|
5
|
+
private readonly extLogger;
|
|
6
|
+
constructor(extLogger: ILogger);
|
|
7
|
+
_getAllTables(): Function[];
|
|
8
|
+
getSQLConnection(): Promise<Connection>;
|
|
9
|
+
setExtensionTables(tables: Function[]): Promise<void>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IExtensionEvent, IExtensionEvents } from './IExtension';
|
|
2
|
+
export declare class ExtensionDecoratorObject {
|
|
3
|
+
static events: IExtensionEvents;
|
|
4
|
+
static init(events: IExtensionEvents): void;
|
|
5
|
+
}
|
|
6
|
+
export declare const ExtensionDecorator: <I extends [], O>(fn: (ee: IExtensionEvents) => IExtensionEvent<I, O>) => (target: unknown, propertyName: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IExtensionAfterEventHandler, IExtensionBeforeEventHandler, IExtensionEvent } from './IExtension';
|
|
2
|
+
export declare class ExtensionEvent<I, O> implements IExtensionEvent<I, O> {
|
|
3
|
+
protected beforeHandlers: IExtensionBeforeEventHandler<I, O>[];
|
|
4
|
+
protected afterHandlers: IExtensionAfterEventHandler<O>[];
|
|
5
|
+
before(handler: IExtensionBeforeEventHandler<I, O>): void;
|
|
6
|
+
after(handler: IExtensionAfterEventHandler<O>): void;
|
|
7
|
+
offAfter(handler: IExtensionAfterEventHandler<O>): void;
|
|
8
|
+
offBefore(handler: IExtensionBeforeEventHandler<I, O>): void;
|
|
9
|
+
triggerBefore(input: {
|
|
10
|
+
inputs: I;
|
|
11
|
+
}, event: {
|
|
12
|
+
stopPropagation: boolean;
|
|
13
|
+
}): Promise<{
|
|
14
|
+
inputs: I;
|
|
15
|
+
} | O>;
|
|
16
|
+
triggerAfter(output: O): Promise<O>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { IObjectManager } from '../database/IObjectManager';
|
|
2
|
+
import { IExtensionEvents } from './IExtension';
|
|
3
|
+
import * as express from 'express';
|
|
4
|
+
import { ExtensionObject } from './ExtensionObject';
|
|
5
|
+
export declare class ExtensionManager implements IObjectManager {
|
|
6
|
+
static EXTENSION_API_PATH: string;
|
|
7
|
+
events: IExtensionEvents;
|
|
8
|
+
extObjects: {
|
|
9
|
+
[key: string]: ExtensionObject<unknown>;
|
|
10
|
+
};
|
|
11
|
+
router: express.Router;
|
|
12
|
+
constructor();
|
|
13
|
+
init(): Promise<void>;
|
|
14
|
+
private initEvents;
|
|
15
|
+
loadExtensionsList(): void;
|
|
16
|
+
private createUniqueExtensionObject;
|
|
17
|
+
private initExtensions;
|
|
18
|
+
private cleanUpExtensions;
|
|
19
|
+
cleanUp(): Promise<void>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IExtensionMessengers } from './IExtension';
|
|
2
|
+
import { DynamicConfig } from '../../../common/entities/DynamicConfig';
|
|
3
|
+
import { MediaDTOWithThPath, Messenger } from '../messenger/Messenger';
|
|
4
|
+
import { ILogger } from '../../Logger';
|
|
5
|
+
export declare class ExtensionMessengerHandler implements IExtensionMessengers {
|
|
6
|
+
private readonly extLogger;
|
|
7
|
+
messengers: Messenger[];
|
|
8
|
+
constructor(extLogger: ILogger);
|
|
9
|
+
addMessenger<C extends Record<string, unknown>>(name: string, config: DynamicConfig[], callbacks: {
|
|
10
|
+
sendMedia: (config: C, media: MediaDTOWithThPath[]) => Promise<void>;
|
|
11
|
+
}): void;
|
|
12
|
+
cleanUp(): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { IExtensionEvents, IExtensionObject } from './IExtension';
|
|
2
|
+
import { ExtensionApp } from './ExtensionApp';
|
|
3
|
+
import { ExtensionConfig } from './ExtensionConfigWrapper';
|
|
4
|
+
import { ExtensionDB } from './ExtensionDB';
|
|
5
|
+
import { ExpressRouterWrapper } from './ExpressRouterWrapper';
|
|
6
|
+
import * as express from 'express';
|
|
7
|
+
import { ExtensionMessengerHandler } from './ExtensionMessengerHandler';
|
|
8
|
+
export declare class ExtensionObject<C> implements IExtensionObject<C> {
|
|
9
|
+
readonly extensionId: string;
|
|
10
|
+
readonly extensionName: string;
|
|
11
|
+
readonly folder: string;
|
|
12
|
+
readonly _app: ExtensionApp;
|
|
13
|
+
readonly config: ExtensionConfig<C>;
|
|
14
|
+
readonly db: ExtensionDB;
|
|
15
|
+
readonly paths: import("../../ProjectPath").ProjectPathClass;
|
|
16
|
+
readonly Logger: import("../../Logger").ILogger;
|
|
17
|
+
readonly events: IExtensionEvents;
|
|
18
|
+
readonly RESTApi: ExpressRouterWrapper;
|
|
19
|
+
readonly messengers: ExtensionMessengerHandler;
|
|
20
|
+
constructor(extensionId: string, extensionName: string, folder: string, extensionRouter: express.Router, events: IExtensionEvents);
|
|
21
|
+
}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import * as express from 'express';
|
|
2
|
+
import { NextFunction, Request, Response } from 'express';
|
|
3
|
+
import { PrivateConfigClass } from '../../../common/config/private/Config';
|
|
4
|
+
import { ObjectManagers } from '../ObjectManagers';
|
|
5
|
+
import { ProjectPathClass } from '../../ProjectPath';
|
|
6
|
+
import { ILogger } from '../../Logger';
|
|
7
|
+
import { UserDTO, UserRoles } from '../../../common/entities/UserDTO';
|
|
8
|
+
import { ParamsDictionary } from 'express-serve-static-core';
|
|
9
|
+
import { Connection } from 'typeorm';
|
|
10
|
+
import { DynamicConfig } from '../../../common/entities/DynamicConfig';
|
|
11
|
+
import { MediaDTOWithThPath } from '../messenger/Messenger';
|
|
12
|
+
export declare type IExtensionBeforeEventHandler<I, O> = (input: {
|
|
13
|
+
inputs: I;
|
|
14
|
+
}, event: {
|
|
15
|
+
stopPropagation: boolean;
|
|
16
|
+
}) => Promise<{
|
|
17
|
+
inputs: I;
|
|
18
|
+
} | O>;
|
|
19
|
+
export declare type IExtensionAfterEventHandler<O> = (output: O) => Promise<O>;
|
|
20
|
+
export interface IExtensionEvent<I, O> {
|
|
21
|
+
before: (handler: IExtensionBeforeEventHandler<I, O>) => void;
|
|
22
|
+
after: (handler: IExtensionAfterEventHandler<O>) => void;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* All main event callbacks in the app
|
|
26
|
+
*/
|
|
27
|
+
export interface IExtensionEvents {
|
|
28
|
+
gallery: {
|
|
29
|
+
/**
|
|
30
|
+
* Events for Directory and Album covers
|
|
31
|
+
*/
|
|
32
|
+
CoverManager: {
|
|
33
|
+
getCoverForAlbum: IExtensionEvent<any, any>;
|
|
34
|
+
getCoverForDirectory: IExtensionEvent<any, any>;
|
|
35
|
+
/**
|
|
36
|
+
* Invalidates directory covers for a given directory and every parent
|
|
37
|
+
*/
|
|
38
|
+
invalidateDirectoryCovers: IExtensionEvent<any, any>;
|
|
39
|
+
};
|
|
40
|
+
ImageRenderer: {
|
|
41
|
+
/**
|
|
42
|
+
* Renders a thumbnail or photo
|
|
43
|
+
*/
|
|
44
|
+
render: IExtensionEvent<any, any>;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Reads exif, iptc, etc.. metadata for photos/videos
|
|
48
|
+
*/
|
|
49
|
+
MetadataLoader: {
|
|
50
|
+
loadVideoMetadata: IExtensionEvent<any, any>;
|
|
51
|
+
loadPhotoMetadata: IExtensionEvent<any, any>;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Scans the storage for a given directory and returns the list of child directories,
|
|
55
|
+
* photos, videos and metafiles
|
|
56
|
+
*/
|
|
57
|
+
DiskManager: {
|
|
58
|
+
scanDirectory: IExtensionEvent<any, any>;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
export interface IExtensionApp {
|
|
63
|
+
expressApp: express.Express;
|
|
64
|
+
objectManagers: ObjectManagers;
|
|
65
|
+
config: PrivateConfigClass;
|
|
66
|
+
}
|
|
67
|
+
export interface IExtensionRESTRoute {
|
|
68
|
+
/**
|
|
69
|
+
* Sends a pigallery2 standard JSON object with payload or error message back to the client.
|
|
70
|
+
* @param paths RESTapi path, relative to the extension base endpoint
|
|
71
|
+
* @param minRole set to null to omit auer check (ie make the endpoint public)
|
|
72
|
+
* @param cb function callback
|
|
73
|
+
* @return newly added REST api path
|
|
74
|
+
*/
|
|
75
|
+
jsonResponse(paths: string[], minRole: UserRoles, cb: (params?: ParamsDictionary, body?: any, user?: UserDTO) => Promise<unknown> | unknown): string;
|
|
76
|
+
/**
|
|
77
|
+
* Exposes a standard expressjs middleware
|
|
78
|
+
* @param paths RESTapi path, relative to the extension base endpoint
|
|
79
|
+
* @param minRole set to null to omit auer check (ie make the endpoint public)
|
|
80
|
+
* @param mw expressjs middleware
|
|
81
|
+
* @return newly added REST api path
|
|
82
|
+
*/
|
|
83
|
+
rawMiddleware(paths: string[], minRole: UserRoles, mw: (req: Request, res: Response, next: NextFunction) => void | Promise<void>): string;
|
|
84
|
+
}
|
|
85
|
+
export interface IExtensionRESTApi {
|
|
86
|
+
use: IExtensionRESTRoute;
|
|
87
|
+
get: IExtensionRESTRoute;
|
|
88
|
+
post: IExtensionRESTRoute;
|
|
89
|
+
put: IExtensionRESTRoute;
|
|
90
|
+
delete: IExtensionRESTRoute;
|
|
91
|
+
}
|
|
92
|
+
export interface IExtensionDB {
|
|
93
|
+
/**
|
|
94
|
+
* Returns with a typeorm SQL connection
|
|
95
|
+
*/
|
|
96
|
+
getSQLConnection(): Promise<Connection>;
|
|
97
|
+
/**
|
|
98
|
+
* Adds SQL tables to typeorm
|
|
99
|
+
* @param tables
|
|
100
|
+
*/
|
|
101
|
+
setExtensionTables(tables: Function[]): Promise<void>;
|
|
102
|
+
/**
|
|
103
|
+
* Exposes all tables. You can use this if you van to have a foreign key to a built in table.
|
|
104
|
+
* Use with caution. This exposes the app's internal working.
|
|
105
|
+
*/
|
|
106
|
+
_getAllTables(): Function[];
|
|
107
|
+
}
|
|
108
|
+
export interface IExtensionConfig<C> {
|
|
109
|
+
setTemplate(template: new () => C): void;
|
|
110
|
+
getConfig(): C;
|
|
111
|
+
}
|
|
112
|
+
export interface IExtensionMessengers {
|
|
113
|
+
/**
|
|
114
|
+
* Adds a new messenger that the user can select e.g.: for sending top pick photos
|
|
115
|
+
* @param name Name of the messenger (also used as id)
|
|
116
|
+
* @param config config metadata for this messenger
|
|
117
|
+
* @param callbacks messenger logic
|
|
118
|
+
*/
|
|
119
|
+
addMessenger<C extends Record<string, unknown> = Record<string, unknown>>(name: string, config: DynamicConfig[], callbacks: {
|
|
120
|
+
sendMedia: (config: C, media: MediaDTOWithThPath[]) => Promise<void>;
|
|
121
|
+
}): void;
|
|
122
|
+
}
|
|
123
|
+
export interface IExtensionObject<C = void> {
|
|
124
|
+
/**
|
|
125
|
+
* ID of the extension that is internally used. By default, the name and ID matches if there is no collision.
|
|
126
|
+
*/
|
|
127
|
+
extensionId: string;
|
|
128
|
+
/**
|
|
129
|
+
* Name of the extension
|
|
130
|
+
*/
|
|
131
|
+
extensionName: string;
|
|
132
|
+
/**
|
|
133
|
+
* Inner functionality of the app. Use this with caution.
|
|
134
|
+
* If you want to go deeper than the standard exposed APIs, you can try doing so here.
|
|
135
|
+
*/
|
|
136
|
+
_app: IExtensionApp;
|
|
137
|
+
/**
|
|
138
|
+
* Create extension related configuration
|
|
139
|
+
*/
|
|
140
|
+
config: IExtensionConfig<C>;
|
|
141
|
+
/**
|
|
142
|
+
* Create new SQL tables and access SQL connection
|
|
143
|
+
*/
|
|
144
|
+
db: IExtensionDB;
|
|
145
|
+
/**
|
|
146
|
+
* Paths to the main components of the app.
|
|
147
|
+
*/
|
|
148
|
+
paths: ProjectPathClass;
|
|
149
|
+
/**
|
|
150
|
+
* Logger of the app
|
|
151
|
+
*/
|
|
152
|
+
Logger: ILogger;
|
|
153
|
+
/**
|
|
154
|
+
* Main app events. Use this change indexing, cover or serving gallery
|
|
155
|
+
*/
|
|
156
|
+
events: IExtensionEvents;
|
|
157
|
+
/**
|
|
158
|
+
* Use this to define REST calls related to the extension
|
|
159
|
+
*/
|
|
160
|
+
RESTApi: IExtensionRESTApi;
|
|
161
|
+
/**
|
|
162
|
+
* Object to manipulate messengers.
|
|
163
|
+
* Messengers are used to send messages (like emails) from the app.
|
|
164
|
+
* One type of message is a list of selected photos.
|
|
165
|
+
*/
|
|
166
|
+
messengers: IExtensionMessengers;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Extension interface. All extension is expected to implement and export these methods
|
|
170
|
+
*/
|
|
171
|
+
export interface IServerExtension<C> {
|
|
172
|
+
/**
|
|
173
|
+
* Extension init function. Extension should at minimum expose this function.
|
|
174
|
+
* @param extension
|
|
175
|
+
*/
|
|
176
|
+
init(extension: IExtensionObject<C>): Promise<void>;
|
|
177
|
+
cleanUp?: (extension: IExtensionObject<C>) => Promise<void>;
|
|
178
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { Stats } from 'fs';
|
|
3
|
+
import { ParentDirectoryDTO } from '../../../common/entities/DirectoryDTO';
|
|
4
|
+
import { FileDTO } from '../../../common/entities/FileDTO';
|
|
5
|
+
export declare class DiskManager {
|
|
6
|
+
static calcLastModified(stat: Stats): number;
|
|
7
|
+
static normalizeDirPath(dirPath: string): string;
|
|
8
|
+
static pathFromRelativeDirName(relativeDirectoryName: string): string;
|
|
9
|
+
static pathFromParent(parent: {
|
|
10
|
+
path: string;
|
|
11
|
+
name: string;
|
|
12
|
+
}): string;
|
|
13
|
+
static dirName(dirPath: string): string;
|
|
14
|
+
static excludeDir(name: string, relativeDirectoryName: string, absoluteDirectoryName: string): Promise<boolean>;
|
|
15
|
+
static scanDirectoryNoMetadata(relativeDirectoryName: string, settings?: DirectoryScanSettings): Promise<ParentDirectoryDTO<FileDTO>>;
|
|
16
|
+
static scanDirectory(relativeDirectoryName: string, settings?: DirectoryScanSettings): Promise<ParentDirectoryDTO>;
|
|
17
|
+
private static isEnabledMetaFile;
|
|
18
|
+
private static isMarkdown;
|
|
19
|
+
}
|
|
20
|
+
export interface DirectoryScanSettings {
|
|
21
|
+
coverOnly?: boolean;
|
|
22
|
+
noMetaFile?: boolean;
|
|
23
|
+
noVideo?: boolean;
|
|
24
|
+
noPhoto?: boolean;
|
|
25
|
+
noDirectory?: boolean;
|
|
26
|
+
noMetadata?: boolean;
|
|
27
|
+
noChildDirPhotos?: boolean;
|
|
28
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { VideoMetadata } from '../../../common/entities/VideoDTO';
|
|
2
|
+
import { PhotoMetadata } from '../../../common/entities/PhotoDTO';
|
|
3
|
+
export declare class MetadataLoader {
|
|
4
|
+
static loadVideoMetadata(fullPath: string): Promise<VideoMetadata>;
|
|
5
|
+
private static readonly EMPTY_METADATA;
|
|
6
|
+
static loadPhotoMetadata(fullPath: string): Promise<PhotoMetadata>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export declare class PhotoWorker {
|
|
2
|
+
private static videoRenderer;
|
|
3
|
+
static render(input: SvgRendererInput | MediaRendererInput): Promise<void>;
|
|
4
|
+
static renderFromImage(input: SvgRendererInput | MediaRendererInput): Promise<void>;
|
|
5
|
+
static renderFromVideo(input: MediaRendererInput): Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
export declare enum ThumbnailSourceType {
|
|
8
|
+
Photo = 1,
|
|
9
|
+
Video = 2
|
|
10
|
+
}
|
|
11
|
+
interface RendererInput {
|
|
12
|
+
type: ThumbnailSourceType;
|
|
13
|
+
size: number;
|
|
14
|
+
makeSquare: boolean;
|
|
15
|
+
outPath: string;
|
|
16
|
+
quality: number;
|
|
17
|
+
useLanczos3: boolean;
|
|
18
|
+
cut?: {
|
|
19
|
+
left: number;
|
|
20
|
+
top: number;
|
|
21
|
+
width: number;
|
|
22
|
+
height: number;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export interface MediaRendererInput extends RendererInput {
|
|
26
|
+
mediaPath: string;
|
|
27
|
+
smartSubsample: boolean;
|
|
28
|
+
}
|
|
29
|
+
export interface SvgRendererInput extends RendererInput {
|
|
30
|
+
svgString: string;
|
|
31
|
+
}
|
|
32
|
+
export declare class VideoRendererFactory {
|
|
33
|
+
static build(): (input: MediaRendererInput) => Promise<void>;
|
|
34
|
+
}
|
|
35
|
+
export declare class ImageRendererFactory {
|
|
36
|
+
static render(input: MediaRendererInput | SvgRendererInput): Promise<void>;
|
|
37
|
+
}
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface ITaskExecuter<I, O> {
|
|
2
|
+
execute(input: I): Promise<O>;
|
|
3
|
+
}
|
|
4
|
+
export declare class TaskExecuter<I, O> implements ITaskExecuter<I, O> {
|
|
5
|
+
private size;
|
|
6
|
+
private worker;
|
|
7
|
+
private taskQue;
|
|
8
|
+
private taskInProgress;
|
|
9
|
+
private readonly el;
|
|
10
|
+
private run;
|
|
11
|
+
constructor(size: number, worker: (input: I) => Promise<O>);
|
|
12
|
+
execute(input: I): Promise<O>;
|
|
13
|
+
}
|