High performance self-hosted photo and video management solution.
TypeScript backup-toolfluttergoogle-photosgoogle-photos-alternativejavascriptmobile-appnestjsnodejsphoto-galleryphotosphotos-managementself-hostedsveltesveltekittypescriptvideos
fix: public config properties (#32500)
Jason Rasmussen188d64e43592
diff --git a/mobile/lib/utils/openapi_patching.dart b/mobile/lib/utils/openapi_patching.dartindex ad073e937f..c8f96fefb3 100644--- a/mobile/lib/utils/openapi_patching.dart+++ b/mobile/lib/utils/openapi_patching.dart@@ -28,6 +28,14 @@ final Map<String, Map<String, Object?>> openApiPatches = {'albums': {'defaultAssetOrder': 'desc'},'recentlyAdded': RecentlyAddedResponse(sidebarWeb: false).toJson(),},+ 'PublicConfigDto': {+ 'map': PublicConfigMapDto(+ enabled: true,+ lightStyle: 'https://tiles.immich.cloud/v1/style/light.json',+ darkStyle: 'https://tiles.immich.cloud/v1/style/dark.json',+ ).toJson(),+ 'ffmpeg': PublicConfigFFmpegDto(realtime: PublicConfigFFmpegRealtimeDto(enabled: false)).toJson(),+ },'ServerConfigDto': {'mapLightStyleUrl': 'https://tiles.immich.cloud/v1/style/light.json','mapDarkStyleUrl': 'https://tiles.immich.cloud/v1/style/dark.json',diff --git a/open-api/immich-openapi-specs.json b/open-api/immich-openapi-specs.jsonindex 47e958dab3..79b0142665 100644--- a/open-api/immich-openapi-specs.json+++ b/open-api/immich-openapi-specs.json@@ -25925,6 +25925,12 @@"PublicConfigDto": {"description": "Configuration properties that are visible to everyone","properties": {+ "ffmpeg": {+ "$ref": "#/components/schemas/PublicConfigFFmpegDto"+ },+ "map": {+ "$ref": "#/components/schemas/PublicConfigMapDto"+ },"oauth": {"$ref": "#/components/schemas/PublicConfigOAuthDto"},@@ -25933,16 +25939,61 @@},"server": {"$ref": "#/components/schemas/PublicConfigServerDto"- },- "theme": {- "$ref": "#/components/schemas/PublicConfigThemeDto"}},"required": [+ "ffmpeg",+ "map","oauth","passwordLogin",- "server",- "theme"+ "server"+ ],+ "type": "object"+ },+ "PublicConfigFFmpegDto": {+ "properties": {+ "realtime": {+ "$ref": "#/components/schemas/PublicConfigFFmpegRealtimeDto"+ }+ },+ "required": [+ "realtime"+ ],+ "type": "object"+ },+ "PublicConfigFFmpegRealtimeDto": {+ "properties": {+ "enabled": {+ "description": "Enable real-time HLS transcoding (alpha)",+ "type": "boolean"+ }+ },+ "required": [+ "enabled"+ ],+ "type": "object"+ },+ "PublicConfigMapDto": {+ "properties": {+ "darkStyle": {+ "description": "Dark map style URL",+ "format": "uri",+ "type": "string"+ },+ "enabled": {+ "description": "Enabled",+ "type": "boolean"+ },+ "lightStyle": {+ "description": "Light map style URL",+ "format": "uri",+ "type": "string"+ }+ },+ "required": [+ "darkStyle",+ "enabled",+ "lightStyle"],"type": "object"},@@ -25992,18 +26043,6 @@],"type": "object"},- "PublicConfigThemeDto": {- "properties": {- "customCss": {- "description": "Custom CSS for theming",- "type": "string"- }- },- "required": [- "customCss"- ],- "type": "object"- },"PurchaseResponse": {"properties": {"hideBuyButtonUntil": {@@ -33099,9 +33138,6 @@"server": {"$ref": "#/components/schemas/UserConfigServerDto"},- "theme": {- "$ref": "#/components/schemas/UserConfigThemeDto"- },"trash": {"$ref": "#/components/schemas/UserConfigTrashDto"},@@ -33119,7 +33155,6 @@"passwordLogin","reverseGeocoding","server",- "theme","trash","user"],@@ -33395,18 +33430,6 @@],"type": "object"},- "UserConfigThemeDto": {- "properties": {- "customCss": {- "description": "Custom CSS for theming",- "type": "string"- }- },- "required": [- "customCss"- ],- "type": "object"- },"UserConfigTrashDto": {"properties": {"days": {diff --git a/packages/sdk/src/fetch-client.ts b/packages/sdk/src/fetch-client.tsindex 1429d9e751..75d0fddb5d 100644--- a/packages/sdk/src/fetch-client.ts+++ b/packages/sdk/src/fetch-client.ts@@ -1630,10 +1630,6 @@ export type UserConfigServerDto = {/** Public users */publicUsers: boolean;};-export type UserConfigThemeDto = {- /** Custom CSS for theming */- customCss: string;-};export type UserConfigTrashDto = {/** Days */days: number;@@ -1654,7 +1650,6 @@ export type UserConfigDto = {passwordLogin: UserConfigPasswordLoginDto;reverseGeocoding: UserConfigReverseGeocodingDto;server: UserConfigServerDto;- theme: UserConfigThemeDto;trash: UserConfigTrashDto;user: UserConfigUserDto;};@@ -2180,6 +2175,21 @@ export type PluginTemplateResponseDto = {/** Ui hints, for example "smart-album" */uiHints: string[];};+export type PublicConfigFFmpegRealtimeDto = {+ /** Enable real-time HLS transcoding (alpha) */+ enabled: boolean;+};+export type PublicConfigFFmpegDto = {+ realtime: PublicConfigFFmpegRealtimeDto;+};+export type PublicConfigMapDto = {+ /** Dark map style URL */+ darkStyle: string;+ /** Enabled */+ enabled: boolean;+ /** Light map style URL */+ lightStyle: string;+};export type PublicConfigOAuthDto = {/** Auto launch */autoLaunch: boolean;@@ -2196,15 +2206,12 @@ export type PublicConfigServerDto = {/** Login page message */loginPageMessage: string;};-export type PublicConfigThemeDto = {- /** Custom CSS for theming */- customCss: string;-};export type PublicConfigDto = {+ ffmpeg: PublicConfigFFmpegDto;+ map: PublicConfigMapDto;oauth: PublicConfigOAuthDto;passwordLogin: PublicConfigPasswordLoginDto;server: PublicConfigServerDto;- theme: PublicConfigThemeDto;};export type QueueResponseDto = {/** Whether the queue is paused */diff --git a/server/src/dtos/config.dto.spec.ts b/server/src/dtos/config.dto.spec.tsindex de5355c5d0..1b5c4ccfe7 100644--- a/server/src/dtos/config.dto.spec.ts+++ b/server/src/dtos/config.dto.spec.ts@@ -10,12 +10,15 @@ import {import { getKeysDeep } from 'src/utils/misc.js';const PUBLIC_PROPERTIES = [+ 'ffmpeg.realtime.enabled',+ 'map.darkStyle',+ 'map.enabled',+ 'map.lightStyle','oauth.autoLaunch','oauth.buttonText','oauth.enabled','passwordLogin.enabled','server.loginPageMessage',- 'theme.customCss',];describe('config visibility', () => {diff --git a/server/src/dtos/config.dto.ts b/server/src/dtos/config.dto.tsindex 2fa34bca67..ae060cfdab 100644--- a/server/src/dtos/config.dto.ts+++ b/server/src/dtos/config.dto.ts@@ -115,7 +115,7 @@ const AdminConfigFFmpegSchema = ztonemap: ToneMappingSchema,realtime: z.object({- enabled: configBool.describe('Enable real-time HLS transcoding (alpha)').meta({ visibility: User }),+ enabled: configBool.describe('Enable real-time HLS transcoding (alpha)').meta({ visibility: Public }),videoCodecs: z.array(VideoCodecSchema).describe('Video codecs to use for real-time HLS transcoding')@@ -262,9 +262,9 @@ const AdminConfigSchemaWithVisibility = z.meta({ id: 'AdminConfigMachineLearningDto' }),map: z.object({- enabled: configBool.describe('Enabled').meta({ visibility: User }),- lightStyle: z.url().describe('Light map style URL').meta({ visibility: User }),- darkStyle: z.url().describe('Dark map style URL').meta({ visibility: User }),+ enabled: configBool.describe('Enabled').meta({ visibility: Public }),+ lightStyle: z.url().describe('Light map style URL').meta({ visibility: Public }),+ darkStyle: z.url().describe('Dark map style URL').meta({ visibility: Public }),}).meta({ id: 'AdminConfigMapDto' }),reverseGeocoding: z@@ -372,9 +372,7 @@ const AdminConfigSchemaWithVisibility = zdays: z.int().min(0).describe('Days').meta({ visibility: User }),}).meta({ id: 'AdminConfigTrashDto' }),- theme: z- .object({ customCss: z.string().describe('Custom CSS for theming').meta({ visibility: Public }) })- .meta({ id: 'AdminConfigThemeDto' }),+ theme: z.object({ customCss: z.string().describe('Custom CSS for theming') }).meta({ id: 'AdminConfigThemeDto' }),library: z.object({scan: z