pigallery2-extension-kit 3.7.0-edge → 3.8.0

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.
@@ -7,4 +7,9 @@ export declare class AdminMWs {
7
7
  static getAvailableMessengers(req: Request, res: Response, next: NextFunction): void;
8
8
  static getAvailableJobs(req: Request, res: Response, next: NextFunction): void;
9
9
  static getJobProgresses(req: Request, res: Response, next: NextFunction): void;
10
+ static loadReleaseNotes(req: Request, res: Response, next: NextFunction): Promise<void>;
11
+ /**
12
+ * Saves the running version (not one the client sends) as the one whose release notes the admin confirmed.
13
+ */
14
+ static setReleaseNotesSeen(req: Request, res: Response, next: NextFunction): Promise<void>;
10
15
  }
@@ -7,4 +7,10 @@ export declare class SettingsMWs {
7
7
  * @param next
8
8
  */
9
9
  static updateSettings(req: Request, res: Response, next: NextFunction): Promise<void>;
10
+ /**
11
+ * Nobody can grant a role above their own (e.g. an Admin can't set anything to Developer).
12
+ * Throws if the new settings have more role values above the role of the user than the current config.
13
+ */
14
+ private static checkGrantedRoles;
15
+ private static countRolesAbove;
10
16
  }
@@ -6,4 +6,5 @@ export declare class UserMWs {
6
6
  static updateSettings(req: Request, res: Response, next: NextFunction): Promise<void>;
7
7
  static unlinkOidc(req: Request, res: Response, next: NextFunction): Promise<void>;
8
8
  static listUsers(req: Request, res: Response, next: NextFunction): Promise<void>;
9
+ private static isAboveOwnRole;
9
10
  }
@@ -2,4 +2,8 @@ import { NextFunction, Request, Response } from 'express';
2
2
  export declare class UserRequestConstrainsMWs {
3
3
  static forceSelfRequest(req: Request, res: Response, next: NextFunction): void;
4
4
  static notSelfRequest(req: Request, res: Response, next: NextFunction): void;
5
+ /**
6
+ * Nobody can change or delete a user with a role above their own (e.g. an Admin can't touch a Developer).
7
+ */
8
+ static notAboveOwnRole(req: Request, res: Response, next: NextFunction): Promise<void>;
5
9
  }
@@ -0,0 +1,19 @@
1
+ import { BuildInfoDTO } from '../../common/entities/ReleaseNotesDTO';
2
+ export declare class BuildInfo {
3
+ static readonly ReleaseNotesFile = "RELEASE_NOTES.md";
4
+ private static gitCommit;
5
+ /**
6
+ * Only for admins (see BuildInfoDTO).
7
+ */
8
+ static get(): BuildInfoDTO;
9
+ /**
10
+ * The release package has the commit in its package.json (see gulpfile.ts);
11
+ * a git checkout (development, installs from source) asks git, once.
12
+ */
13
+ private static getGitCommit;
14
+ /**
15
+ * The release notes of the running version, null if there are none.
16
+ * Read on every call: only admins ask for it, about once per page load.
17
+ */
18
+ static loadReleaseNotes(): Promise<string | null>;
19
+ }
@@ -3,6 +3,10 @@ import { SearchQueryDTO } from '../../../common/entities/SearchQueryDTO';
3
3
  import { SessionContext } from '../SessionContext';
4
4
  import { ProjectionAwareManager } from './ProjectionAwareManager';
5
5
  export declare class AlbumManager extends ProjectionAwareManager<AlbumBaseEntity> {
6
+ /**
7
+ * Throws if the album can't be saved: its name is empty or its search query is not valid.
8
+ */
9
+ private static validateSavedSearch;
6
10
  addIfNotExistSavedSearch(name: string, searchQuery: SearchQueryDTO, lockedAlbum: boolean): Promise<void>;
7
11
  addSavedSearch(name: string, searchQuery: SearchQueryDTO, lockedAlbum?: boolean): Promise<void>;
8
12
  deleteAlbum(id: number): Promise<void>;
@@ -15,6 +15,10 @@ export declare class UserManager {
15
15
  deleteUser(id: number): Promise<UserEntity>;
16
16
  changeRole(id: number, newRole: UserRoles): Promise<UserEntity>;
17
17
  setOidcSubject(id: number, oidcSubject: string | null): Promise<UserEntity>;
18
+ /**
19
+ * Not part of the session stamp (see SessionManager.loadSessionRow), so the session cache stays valid.
20
+ */
21
+ setReleaseNotesSeenVersion(id: number, version: string | null): Promise<void>;
18
22
  updateSettings(id: number, settings: UserSettingsDTO): Promise<UserEntity>;
19
23
  getUnAuthenticatedUser(): UserDTO;
20
24
  }
@@ -11,6 +11,7 @@ export declare class SharingEntity implements BaseSharingDTO {
11
11
  */
12
12
  defaultDirectoryView: string | null;
13
13
  defaultSearchView: SearchQueryDTO | null;
14
+ preventDownload: boolean;
14
15
  password: string | null;
15
16
  expires: number;
16
17
  timeStamp: number;
@@ -7,6 +7,7 @@ export declare class UserEntity implements UserDTO, SessionUser {
7
7
  password: string;
8
8
  role: UserRoles;
9
9
  oidcSubject?: string | null;
10
+ releaseNotesSeenVersion?: string | null;
10
11
  overrideAllowBlockList?: boolean;
11
12
  allowQuery?: SearchQueryDTO | null;
12
13
  blockQuery?: SearchQueryDTO | null;
@@ -20,4 +20,8 @@ export declare class PhotoProcessing {
20
20
  static generateThumbnail(mediaPath: string, size: number, sourceType: ThumbnailSourceType, makeSquare: boolean): Promise<string>;
21
21
  static isPhoto(fullPath: string): boolean;
22
22
  static renderSVG(svgIcon: SVGIconConfig, outPath: string, color?: string): Promise<string>;
23
+ /**
24
+ * Renders the svg to a size x size png. The file name gets the hash of the svg, so a changed svg is a new file.
25
+ */
26
+ static renderSVGString(svgString: string, size: number, outPath: string): Promise<string>;
23
27
  }
@@ -1,6 +1,7 @@
1
1
  import { Express } from 'express';
2
2
  export declare class AdminRouter {
3
3
  static route(app: Express): void;
4
+ private static addReleaseNotes;
4
5
  private static addGetStatistic;
5
6
  private static addGetDuplicates;
6
7
  private static addMessengers;
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * This version indicates that the sql/entities/*Entity.ts files got changed and the db needs to be recreated
3
3
  */
4
- export declare const DataStructureVersion = 47;
4
+ export declare const DataStructureVersion = 49;
@@ -58,6 +58,7 @@ export declare class ClientSearchConfig {
58
58
  export declare class ClientAlbumConfig {
59
59
  enabled: boolean;
60
60
  readAccessMinRole: UserRoles;
61
+ writeAccessMinRole: UserRoles;
61
62
  }
62
63
  export declare class ClientSharingConfig {
63
64
  enabled: boolean;
@@ -186,7 +187,6 @@ export declare class ThemesConfig {
186
187
  }
187
188
  export declare class ClientGalleryConfig {
188
189
  enableCache: boolean;
189
- enableOnScrollRendering: boolean;
190
190
  enableDirectorySortingByDate: boolean;
191
191
  ignoreTimestampOffset: boolean;
192
192
  enableOnScrollThumbnailPrioritising: boolean;
@@ -256,6 +256,7 @@ export declare class ClientServiceConfig {
256
256
  customHTMLHead: string;
257
257
  svgIcon: SVGIconConfig;
258
258
  reloadClientOnServerUpdate: boolean;
259
+ hideSponsorLinks: boolean;
259
260
  /**
260
261
  * Normalized urlBase: '' or a path with a leading and no trailing '/' (e.g.: '/myGallery').
261
262
  */
@@ -251,10 +251,14 @@ __decorate([
251
251
  exports.ClientSearchConfig = ClientSearchConfig = __decorate([
252
252
  (0, common_1.SubConfigClass)({ tags: { client: true }, softReadonly: true })
253
253
  ], ClientSearchConfig);
254
+ // albums are shared by all users, so only logged-in users can list or edit them
255
+ // (typeconfig already rejects values that are not a role)
256
+ const isAlbumRole = (v) => v >= UserDTO_1.UserRoles.User;
254
257
  let ClientAlbumConfig = class ClientAlbumConfig {
255
258
  constructor() {
256
259
  this.enabled = true;
257
260
  this.readAccessMinRole = UserDTO_1.UserRoles.User;
261
+ this.writeAccessMinRole = UserDTO_1.UserRoles.Admin;
258
262
  }
259
263
  };
260
264
  exports.ClientAlbumConfig = ClientAlbumConfig;
@@ -272,12 +276,40 @@ __decorate([
272
276
  (0, common_1.ConfigProperty)({
273
277
  type: UserDTO_1.UserRoles, tags: {
274
278
  name: $localize `Albums listing right`,
275
- priority: Enums_1.ConfigPriority.underTheHood
279
+ priority: Enums_1.ConfigPriority.underTheHood,
280
+ uiOptions: [UserDTO_1.UserRoles.User, UserDTO_1.UserRoles.Admin, UserDTO_1.UserRoles.Developer],
281
+ // the album routes read it when they are registered
282
+ uiResetNeeded: { server: true }
283
+ },
284
+ constraint: {
285
+ assert: isAlbumRole,
286
+ assertReason: 'Album.readAccessMinRole should be at least User.',
287
+ fallBackValue: UserDTO_1.UserRoles.User
276
288
  },
277
289
  description: $localize `Required minimum right to show the albums tab.`
278
290
  }),
279
291
  __metadata("design:type", Number)
280
292
  ], ClientAlbumConfig.prototype, "readAccessMinRole", void 0);
293
+ __decorate([
294
+ (0, common_1.ConfigProperty)({
295
+ type: UserDTO_1.UserRoles,
296
+ tags: {
297
+ name: $localize `Album editing right`,
298
+ priority: Enums_1.ConfigPriority.underTheHood,
299
+ githubIssue: 557,
300
+ uiOptions: [UserDTO_1.UserRoles.User, UserDTO_1.UserRoles.Admin, UserDTO_1.UserRoles.Developer],
301
+ // the album routes read it when they are registered
302
+ uiResetNeeded: { server: true }
303
+ },
304
+ constraint: {
305
+ assert: isAlbumRole,
306
+ assertReason: 'Album.writeAccessMinRole should be at least User.',
307
+ fallBackValue: UserDTO_1.UserRoles.Admin
308
+ },
309
+ description: $localize `Required minimum right to create and delete albums. Albums are visible to every user who can list them.`
310
+ }),
311
+ __metadata("design:type", Number)
312
+ ], ClientAlbumConfig.prototype, "writeAccessMinRole", void 0);
281
313
  exports.ClientAlbumConfig = ClientAlbumConfig = __decorate([
282
314
  (0, common_1.SubConfigClass)({ tags: { client: true }, softReadonly: true })
283
315
  ], ClientAlbumConfig);
@@ -1167,7 +1199,7 @@ let ClientLightboxConfig = class ClientLightboxConfig {
1167
1199
  this.captionAlwaysOn = false;
1168
1200
  this.facesAlwaysOn = false;
1169
1201
  this.loopVideos = false;
1170
- this.loopSlideshow = false;
1202
+ this.loopSlideshow = true;
1171
1203
  this.loadFullImageOnZoom = true;
1172
1204
  this.loadFullImageIfPreviewTooSmall = true;
1173
1205
  this.Titles = new ClientLightboxTitleConfig();
@@ -1372,7 +1404,6 @@ exports.ThemesConfig = ThemesConfig = __decorate([
1372
1404
  let ClientGalleryConfig = class ClientGalleryConfig {
1373
1405
  constructor() {
1374
1406
  this.enableCache = true;
1375
- this.enableOnScrollRendering = true;
1376
1407
  this.enableDirectorySortingByDate = false;
1377
1408
  this.ignoreTimestampOffset = true;
1378
1409
  this.enableOnScrollThumbnailPrioritising = true;
@@ -1397,17 +1428,6 @@ __decorate([
1397
1428
  }),
1398
1429
  __metadata("design:type", Boolean)
1399
1430
  ], ClientGalleryConfig.prototype, "enableCache", void 0);
1400
- __decorate([
1401
- (0, common_1.ConfigProperty)({
1402
- type: 'boolean',
1403
- tags: {
1404
- name: $localize `Scroll based thumbnail generation`,
1405
- priority: Enums_1.ConfigPriority.advanced,
1406
- },
1407
- description: $localize `Those thumbnails get higher priority that are visible on the screen.`
1408
- }),
1409
- __metadata("design:type", Boolean)
1410
- ], ClientGalleryConfig.prototype, "enableOnScrollRendering", void 0);
1411
1431
  __decorate([
1412
1432
  (0, common_1.ConfigProperty)({
1413
1433
  type: 'boolean',
@@ -1884,7 +1904,9 @@ __decorate([
1884
1904
  (0, common_1.ConfigProperty)({
1885
1905
  type: UserDTO_1.UserRoles, tags: {
1886
1906
  name: $localize `Face starring right`,
1887
- priority: Enums_1.ConfigPriority.underTheHood
1907
+ priority: Enums_1.ConfigPriority.underTheHood,
1908
+ // the person routes read it when they are registered
1909
+ uiResetNeeded: { server: true }
1888
1910
  },
1889
1911
  description: $localize `Required minimum right to star (favourite) a face.`
1890
1912
  }),
@@ -1894,7 +1916,9 @@ __decorate([
1894
1916
  (0, common_1.ConfigProperty)({
1895
1917
  type: UserDTO_1.UserRoles, tags: {
1896
1918
  name: $localize `Face listing right`,
1897
- priority: Enums_1.ConfigPriority.underTheHood
1919
+ priority: Enums_1.ConfigPriority.underTheHood,
1920
+ // the person routes read it when they are registered
1921
+ uiResetNeeded: { server: true }
1898
1922
  },
1899
1923
  description: $localize `Required minimum right to show the faces tab.`
1900
1924
  }),
@@ -1912,6 +1936,7 @@ let ClientServiceConfig = class ClientServiceConfig {
1912
1936
  this.customHTMLHead = '';
1913
1937
  this.svgIcon = new SVGIconConfig(`0 0 512 512`, '<path d="m185.92 0.042372c-3.1045 0.19567-6.2676 1.0899-9.1546 3.163-16.085-8.0588-25.565 1.6894-23.504 14.76-5.3047 4.0078-10.768 7.8463-6.3153 20.688-4.8283 4.5113-5.2702 11.17-1.2227 20.894-4.5731 7.1343-3.0927 13.944 1.4676 20.445-5.0506 10.26 3.7514 20.507 6.2389 23.943-0.99909 6.6761-0.49742 13.458 11.016 21.392-1.2207 10.005 5.7492 14.415 12.419 19.045 12.567 8.1824 17.213 7.2406 27.088 10.328l-0.13366-1.1862c-15.833 3e-3 -31.017 6.2997-42.211 17.506l-24.715 24.736c-11.194 11.206-26.378 17.503-42.211 17.506h-34.984c-32.972 3.6e-4 -59.702 26.751-59.701 59.749v179.24c3.6312e-4 32.997 26.729 59.746 59.701 59.747h358.21c32.972-3.6e-4 59.7-26.75 59.701-59.747v-179.24c-0.0162-23.02-13.245-43.983-34.008-53.889 3.0728-1.7781 5.0617-4.3071 6.7327-7.0379 4.1124-1.032 17.438-3.2179 20.159-14.327 7.7661-2.0112 13.273-6.2767 14.255-14.719 9.3465-4.8456 13.285-10.23 12.484-16.792 11.694-7.0704 9.9759-13.526 8.4511-19.912 9.9742-8.687 8.874-22.288-8.6236-26.461-3.1292-12.25-18.501-15.32-20.733-16.133-1.3931-4.0275-3.7026-7.9496-14.353-10.399-4.4451-8.3291-12.211-9.9464-20.904-9.9225-6.4476-10.379-14.548-6.8393-22.216-7.2124-9.6958-7.4917-13.951-3.6525-20.032-3.5572-11.02-6.8739-16.687-2.7782-24.497 0.86675l-6.6602-2.5355c-21.868 3.9146-38.57 22.031-45.765 31.84 0.78895-12.143-0.36806-36.764-14.606-53.831l-6.7327-2.3414c-3.6422-7.8167-5.3526-14.6-18.209-16.423-4.7287-3.9225-5.388-9.6636-17.627-10.162-3.9701-2.9861-7.0841-7.4205-11.972-9.091-2.5588-0.82206-5.6927-0.97346-9.6817 0.32356-6.6078-5.7069-13.63-9.3648-22.385-5.8437-9.7319-4.9749-14.082-3.5883-17.674-1.2668-1.3952-0.50821-7.2885-3.6439-14.018-4.1239-1.0094-0.071996-2.0376-0.084841-3.0724-0.019609zm1.017 13.578c10.104 0.93027 18.591 7.2129 24.705 11.86 3.989-1.297 1.8817-5.4748-0.67601-9.9264 7.4731 3.9321 13.922 8.2611 19.542 13.058 4.4921-1.7738-6e-3 -6.9333-1.6283-10.934 11.32 6.6532 15.299 11.732 19.277 16.811 4.96-2.1534 2.5609-6.4373 1.1326-10.368 7.9224 6.6257 11.087 12.731 14.482 18.808 2.4625-1.6331 5.6853-2.3301 4.5577-8.9008 5.1605 6.0597 8.5191 12.233 10.344 18.398 4.8979-1.076 4.6167-5.1376 5.7471-8.2459 4.8158 7.9142 7.0028 15.201 10.195 22.743 1.3502-0.38818 3.143-2.596 5.5002-6.3575 10.495 21.313 19.172 68.475-19.542 71.864-19.845-33.079-47.35-62.019-80.099-88.028 39.018 41.712 59.701 71.578 68.828 93.932-5.6123 8.2892-13.186 12.888-21.423 15.182h-31.496c-9.0855-1.8937-17.047-4.8048-21.968-6.9301 3.5034-0.26396 6.761-1.0578 8.553-3.265-2.8932-4.1339-16.942-6.6095-24.423-15.054 3.8384 0.62815 5.771 0.45179 8.3395-1.4727-7.7461-5.9015-16.277-11.759-20.149-18.339 3.0088 1.096 5.5764 2.7998 10.448 1.4943-6.3427-7.0404-13.489-13.382-17.696-22.065 4.1118 1.3877 8.4445 3.0751 10.271 1.9806-5.5926-6.9871-9.844-14.035-12.948-21.216 5.3821 2.7304 8.0206 3.0315 9.7326 2.5551-3.457-7.4192-8.6517-14.592-9.4172-22.461 3.6436 2.9772 7.3478 4.8776 10.904 3.8631-0.36036-4.7513-7.3377-10.044-8.4022-21.322 4.3234 2.0148 8.7693 4.2946 10.093 3.6768 0.9645-8.9987-0.93024-14.97-2.5963-20.967 9.547 3.3675 23.877 8.6978 23.48 7.6733zm202.89 68.954c-1.1657 3.2054-4.0535 6.0044-0.89552 10.015 5.3574-3.5486 11.898-6.1175 19.744-7.4399-5.0841 4.3081-3.1624 6.8795-2.228 9.7499 6.5043-2.4708 12.815-5.0123 23.175-5.0887-3.6187 2.0919-8.2066 3.8292-5.7902 8.6694 6.3098-1.3316 12.62-2.6636 25.565-0.47848-3.8128 2.0212-10.67 3.0443-8.2709 7.3281 7.289-0.095 15.142 0.67658 23.357 2.5689-4.9157 1.7295-9.1161 3.6077-6.8934 7.1673 7.6683 0.37321 18.204 1.0216 26.541 6.8085l-7.9768 3.8043c-0.96209 0.52956 13.473 5.5674 22.914 9.2263-5.2605 3.5839-10.415 6.8757-15.456 14.39 0.61731 1.3249 5.4871 2.4391 10.093 3.6768-8.059 7.9545-16.768 7.4235-20.131 10.928 2.0376 3.1622 6.0354 3.9567 10.836 4.0553-5.7375 5.5002-14.227 7.6885-21.64 11.148 1.0057 1.4663 3.2192 2.9338 9.0958 4.3043-6.9901 3.5039-14.773 6.1675-23.545 7.9223 0.73194 1.9166 5.0978 3.5087 9.1389 5.0907-8.7991 3.945-18.346 4.207-27.726 5.5201 2.9287 4.0367 5.9538 4.4791 8.9626 5.575-7.1926 2.5501-17.455 1.4514-27.215 1.0864 0.46776 2.1663 1.3155 3.4454 2.7961 4.6612h-13.75c-5.1274-1.4192-9.4503-2.9189-11.788-2.2747-0.0214 0.78201 0.12538 1.5366 0.37044 2.2747h-6.1841c-2.2143-0.16717-4.4175-0.45785-6.5995-0.87068-17.23-8.2945-37.615-23.515-35.198-47.897 21.35-11.254 56.342-20.728 113.06-27.679-41.792-1.1427-81.452 3.3317-117.9 15.905-27.674-27.57 9.2662-58.115 30.995-67.691-0.70716 4.3624-0.65582 7.2407 0.12836 8.4067 7.2901-3.7246 13.646-7.8991 22.418-10.864zm-186.04 100.82h69.97c7.9167 2e-3 15.508 3.1505 21.105 8.7538l24.717 24.736c16.798 16.816 39.584 26.262 63.343 26.259h34.984c16.486 1.9e-4 29.85 13.375 29.85 29.873v179.24c-1.9e-4 16.499-13.365 29.873-29.85 29.873h-358.21c-16.486-1.8e-4 -29.85-13.375-29.85-29.873v-179.24c1.88e-4 -16.499 13.365-29.873 29.85-29.873h34.984c23.739-0.0128 46.501-9.4579 63.285-26.259l24.775-24.736c5.582-5.5884 13.149-8.736 21.045-8.7538zm35.016 59.749c-57.625 0.10848-104.28 46.889-104.28 104.56 0 57.669 46.656 104.45 104.28 104.56 57.625-0.10848 104.28-46.889 104.28-104.56 0-57.669-46.656-104.45-104.28-104.56zm-164.18 29.873c-8.2429 9e-5 -14.925 6.6874-14.925 14.937 0.03875 8.2218 6.7096 14.866 14.925 14.866s14.886-6.6446 14.925-14.866c-9.1e-5 -8.2493-6.6823-14.937-14.925-14.937zm164.18 0c41.206 0.0135 74.603 33.447 74.603 74.684 0 41.238-33.397 74.671-74.603 74.684-41.206-0.0135-74.603-33.447-74.603-74.684 0-41.238 33.397-74.671 74.603-74.684z"/>');
1914
1938
  this.reloadClientOnServerUpdate = true;
1939
+ this.hideSponsorLinks = false;
1915
1940
  }
1916
1941
  /**
1917
1942
  * Normalized urlBase: '' or a path with a leading and no trailing '/' (e.g.: '/myGallery').
@@ -2037,6 +2062,17 @@ __decorate([
2037
2062
  }),
2038
2063
  __metadata("design:type", Boolean)
2039
2064
  ], ClientServiceConfig.prototype, "reloadClientOnServerUpdate", void 0);
2065
+ __decorate([
2066
+ (0, common_1.ConfigProperty)({
2067
+ type: 'boolean',
2068
+ tags: {
2069
+ name: $localize `Hide sponsor links`,
2070
+ priority: Enums_1.ConfigPriority.underTheHood,
2071
+ },
2072
+ description: $localize `Hides the links that ask for supporting the development of PiGallery2 (on the about page and in the release notes).`,
2073
+ }),
2074
+ __metadata("design:type", Boolean)
2075
+ ], ClientServiceConfig.prototype, "hideSponsorLinks", void 0);
2040
2076
  exports.ClientServiceConfig = ClientServiceConfig = __decorate([
2041
2077
  (0, common_1.SubConfigClass)({ tags: { client: true }, softReadonly: true })
2042
2078
  ], ClientServiceConfig);
@@ -2171,6 +2207,8 @@ __decorate([
2171
2207
  type: UserDTO_1.UserRoles,
2172
2208
  tags: {
2173
2209
  name: $localize `Minimum user role`,
2210
+ // the upload route reads it when it is registered
2211
+ uiResetNeeded: { server: true }
2174
2212
  },
2175
2213
  description: $localize `Minimum user role to enable file upload.`
2176
2214
  }),
@@ -0,0 +1,17 @@
1
+ /**
2
+ * The running build. Only admins get it: the version tells which known bugs a server has.
3
+ */
4
+ export interface BuildInfoDTO {
5
+ appVersion: string | null;
6
+ buildTime: string | null;
7
+ buildCommitHash: string | null;
8
+ upTime: string | null;
9
+ isDocker: boolean;
10
+ nodeVersion: string;
11
+ platform: string;
12
+ }
13
+ export interface ReleaseNotesDTO {
14
+ build: BuildInfoDTO;
15
+ notes: string | null;
16
+ seenVersion: string | null;
17
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -16,6 +16,7 @@ export interface BaseSharingDTO extends SharingDTOKey {
16
16
  sharingKey: string;
17
17
  expires: number;
18
18
  timeStamp: number;
19
+ preventDownload?: boolean;
19
20
  creator?: UserDTO;
20
21
  }
21
22
  export interface ResponseSharingDTO extends BaseSharingDTO, PublicSharingDTO {
@@ -27,6 +28,7 @@ export interface ResponseSharingDTO extends BaseSharingDTO, PublicSharingDTO {
27
28
  sharingKey: string;
28
29
  expires: number;
29
30
  timeStamp: number;
31
+ preventDownload?: boolean;
30
32
  creator?: UserDTO;
31
33
  passwordProtected: boolean;
32
34
  }
@@ -40,6 +42,7 @@ export interface UpdateSharingDTO extends BaseSharingDTO {
40
42
  password?: string | null;
41
43
  expires: number;
42
44
  timeStamp: number;
45
+ preventDownload?: boolean;
43
46
  creator?: UserDTO;
44
47
  }
45
48
  export interface CreateSharingDTO {
@@ -50,5 +53,6 @@ export interface CreateSharingDTO {
50
53
  defaultDirectoryView?: string;
51
54
  searchQuery: SearchQueryDTO;
52
55
  directoryQuery?: DirectorySearch;
56
+ preventDownload?: boolean;
53
57
  }
54
58
  export {};
@@ -13,6 +13,7 @@ export interface UserDTO {
13
13
  role: UserRoles;
14
14
  oidcSubject?: string | null;
15
15
  usedSharingKey?: string;
16
+ preventDownload?: boolean;
16
17
  projectionKey?: string;
17
18
  overrideAllowBlockList?: boolean;
18
19
  allowQuery?: SearchQueryDTO | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pigallery2-extension-kit",
3
- "version": "3.7.0-edge",
3
+ "version": "3.8.0",
4
4
  "description": "Interfaces for developing extensions for pigallery2",
5
5
  "author": "Patrik J. Braun",
6
6
  "homepage": "https://github.com/bpatrik/pigallery2",