diff --git a/mobile/openapi/README.md b/mobile/openapi/README.md index b8bcbcebc..22264857e 100644 Binary files a/mobile/openapi/README.md and b/mobile/openapi/README.md differ diff --git a/mobile/openapi/lib/api.dart b/mobile/openapi/lib/api.dart index ca33a5dea..846db953d 100644 Binary files a/mobile/openapi/lib/api.dart and b/mobile/openapi/lib/api.dart differ diff --git a/mobile/openapi/lib/api/server_api.dart b/mobile/openapi/lib/api/server_api.dart index a0fd54f3d..4220e6747 100644 Binary files a/mobile/openapi/lib/api/server_api.dart and b/mobile/openapi/lib/api/server_api.dart differ diff --git a/mobile/openapi/lib/api_client.dart b/mobile/openapi/lib/api_client.dart index 105965532..2657cece1 100644 Binary files a/mobile/openapi/lib/api_client.dart and b/mobile/openapi/lib/api_client.dart differ diff --git a/mobile/openapi/lib/model/server_apk_links_dto.dart b/mobile/openapi/lib/model/server_apk_links_dto.dart new file mode 100644 index 000000000..086a2f172 Binary files /dev/null and b/mobile/openapi/lib/model/server_apk_links_dto.dart differ diff --git a/open-api/immich-openapi-specs.json b/open-api/immich-openapi-specs.json index 6aca3c349..dee027f83 100644 --- a/open-api/immich-openapi-specs.json +++ b/open-api/immich-openapi-specs.json @@ -5275,6 +5275,38 @@ ] } }, + "/server/android-links": { + "get": { + "operationId": "getAndroidLinks", + "parameters": [], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServerApkLinksDto" + } + } + }, + "description": "" + } + }, + "security": [ + { + "bearer": [] + }, + { + "cookie": [] + }, + { + "api_key": [] + } + ], + "tags": [ + "Server" + ] + } + }, "/server/config": { "get": { "operationId": "getServerConfig", @@ -11959,6 +11991,29 @@ ], "type": "object" }, + "ServerApkLinksDto": { + "properties": { + "arm64v8a": { + "type": "string" + }, + "armeabiv7a": { + "type": "string" + }, + "universal": { + "type": "string" + }, + "x86_64": { + "type": "string" + } + }, + "required": [ + "arm64v8a", + "armeabiv7a", + "universal", + "x86_64" + ], + "type": "object" + }, "ServerConfigDto": { "properties": { "externalDomain": { diff --git a/open-api/typescript-sdk/src/fetch-client.ts b/open-api/typescript-sdk/src/fetch-client.ts index 050fabca9..0c0ffd979 100644 --- a/open-api/typescript-sdk/src/fetch-client.ts +++ b/open-api/typescript-sdk/src/fetch-client.ts @@ -1004,6 +1004,12 @@ export type ServerAboutResponseDto = { version: string; versionUrl: string; }; +export type ServerApkLinksDto = { + arm64v8a: string; + armeabiv7a: string; + universal: string; + x86_64: string; +}; export type ServerConfigDto = { externalDomain: string; isInitialized: boolean; @@ -2868,6 +2874,14 @@ export function getAboutInfo(opts?: Oazapfts.RequestOpts) { ...opts })); } +export function getAndroidLinks(opts?: Oazapfts.RequestOpts) { + return oazapfts.ok(oazapfts.fetchJson<{ + status: 200; + data: ServerApkLinksDto; + }>("/server/android-links", { + ...opts + })); +} export function getServerConfig(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; diff --git a/server/src/controllers/server.controller.ts b/server/src/controllers/server.controller.ts index 267fc42ef..5bc78574c 100644 --- a/server/src/controllers/server.controller.ts +++ b/server/src/controllers/server.controller.ts @@ -3,6 +3,7 @@ import { ApiNotFoundResponse, ApiTags } from '@nestjs/swagger'; import { LicenseKeyDto, LicenseResponseDto } from 'src/dtos/license.dto'; import { ServerAboutResponseDto, + ServerApkLinksDto, ServerConfigDto, ServerFeaturesDto, ServerMediaTypesResponseDto, @@ -34,6 +35,12 @@ export class ServerController { return this.service.getAboutInfo(); } + @Get('android-links') + @Authenticated() + getAndroidLinks(): ServerApkLinksDto { + return this.service.getAndroidLinks(); + } + @Get('storage') @Authenticated() getStorage(): Promise { diff --git a/server/src/dtos/server.dto.ts b/server/src/dtos/server.dto.ts index e1f94dbaa..47442ad4f 100644 --- a/server/src/dtos/server.dto.ts +++ b/server/src/dtos/server.dto.ts @@ -37,6 +37,13 @@ export class ServerAboutResponseDto { thirdPartySupportUrl?: string; } +export class ServerApkLinksDto { + arm64v8a!: string; + armeabiv7a!: string; + universal!: string; + x86_64!: string; +} + export class ServerStorageResponseDto { diskSize!: string; diskUse!: string; diff --git a/server/src/services/server.service.ts b/server/src/services/server.service.ts index 9112c40a1..f07b8ee92 100644 --- a/server/src/services/server.service.ts +++ b/server/src/services/server.service.ts @@ -5,6 +5,7 @@ import { OnEvent } from 'src/decorators'; import { LicenseKeyDto, LicenseResponseDto } from 'src/dtos/license.dto'; import { ServerAboutResponseDto, + ServerApkLinksDto, ServerConfigDto, ServerFeaturesDto, ServerMediaTypesResponseDto, @@ -48,6 +49,16 @@ export class ServerService extends BaseService { }; } + getAndroidLinks(): ServerApkLinksDto { + const baseURL = `https://github.com/immich-app/immich/releases/download/v${serverVersion.toString()}`; + return { + arm64v8a: `${baseURL}/app-arm64-v8a-release.apk`, + armeabiv7a: `${baseURL}/app-armeabi-v7a-release.apk`, + universal: `${baseURL}/app-release.apk`, + x86_64: `${baseURL}/app-x86_64-release.apk`, + }; + } + async getStorage(): Promise { const libraryBase = StorageCore.getBaseFolder(StorageFolder.LIBRARY); const diskInfo = await this.storageRepository.checkDiskUsage(libraryBase);