feat: album map markers endpoint (#27830)

This commit is contained in:
Jason Rasmussen
2026-04-15 15:58:34 -04:00
committed by GitHub
parent 792cb9148b
commit ac06514db5
9 changed files with 269 additions and 61 deletions
+71
View File
@@ -2227,6 +2227,77 @@
"x-immich-state": "Stable"
}
},
"/albums/{id}/map-markers": {
"get": {
"description": "Retrieve map marker information for a specific album by its ID.",
"operationId": "getAlbumMapMarkers",
"parameters": [
{
"name": "id",
"required": true,
"in": "path",
"schema": {
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$",
"type": "string"
}
},
{
"name": "key",
"required": false,
"in": "query",
"schema": {
"type": "string"
}
},
{
"name": "slug",
"required": false,
"in": "query",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"items": {
"$ref": "#/components/schemas/MapMarkerResponseDto"
},
"type": "array"
}
}
},
"description": ""
}
},
"security": [
{
"bearer": []
},
{
"cookie": []
},
{
"api_key": []
}
],
"summary": "Retrieve album map markers",
"tags": [
"Albums"
],
"x-immich-history": [
{
"version": "v3",
"state": "Added"
}
],
"x-immich-permission": "album.read"
}
},
"/albums/{id}/user/{userId}": {
"delete": {
"description": "Remove a user from an album. Use an ID of \"me\" to leave a shared album.",
+32 -14
View File
@@ -710,6 +710,20 @@ export type BulkIdResponseDto = {
/** Whether operation succeeded */
success: boolean;
};
export type MapMarkerResponseDto = {
/** City name */
city: string | null;
/** Country name */
country: string | null;
/** Asset ID */
id: string;
/** Latitude */
lat: number;
/** Longitude */
lon: number;
/** State/Province name */
state: string | null;
};
export type UpdateAlbumUserDto = {
role: AlbumUserRole;
};
@@ -1305,20 +1319,6 @@ export type ValidateLibraryResponseDto = {
/** Validation results for import paths */
importPaths?: ValidateLibraryImportPathResponseDto[];
};
export type MapMarkerResponseDto = {
/** City name */
city: string | null;
/** Country name */
country: string | null;
/** Asset ID */
id: string;
/** Latitude */
lat: number;
/** Longitude */
lon: number;
/** State/Province name */
state: string | null;
};
export type MapReverseGeocodeResponseDto = {
/** City name */
city: string | null;
@@ -3733,6 +3733,24 @@ export function addAssetsToAlbum({ id, bulkIdsDto }: {
body: bulkIdsDto
})));
}
/**
* Retrieve album map markers
*/
export function getAlbumMapMarkers({ id, key, slug }: {
id: string;
key?: string;
slug?: string;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: MapMarkerResponseDto[];
}>(`/albums/${encodeURIComponent(id)}/map-markers${QS.query(QS.explode({
key,
slug
}))}`, {
...opts
}));
}
/**
* Remove user from album
*/