diff --git a/mobile/lib/repositories/folder_api.repository.dart b/mobile/lib/repositories/folder_api.repository.dart index dfda19e45e..d20ca8e0a9 100644 --- a/mobile/lib/repositories/folder_api.repository.dart +++ b/mobile/lib/repositories/folder_api.repository.dart @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; final folderApiRepositoryProvider = Provider((ref) => FolderApiRepository(ref.watch(apiServiceProvider).viewApi)); class FolderApiRepository extends ApiRepository { - final ViewApi _api; + final ViewsApi _api; final Logger _log = Logger("FolderApiRepository"); FolderApiRepository(this._api); diff --git a/mobile/lib/services/api.service.dart b/mobile/lib/services/api.service.dart index 698ac3a159..1a714b6f40 100644 --- a/mobile/lib/services/api.service.dart +++ b/mobile/lib/services/api.service.dart @@ -17,7 +17,7 @@ class ApiService implements Authentication { late UsersApi usersApi; late AuthenticationApi authenticationApi; - late OAuthApi oAuthApi; + late AuthenticationApi oAuthApi; late AlbumsApi albumsApi; late AssetsApi assetsApi; late SearchApi searchApi; @@ -32,7 +32,7 @@ class ApiService implements Authentication { late DownloadApi downloadApi; late TrashApi trashApi; late StacksApi stacksApi; - late ViewApi viewApi; + late ViewsApi viewApi; late MemoriesApi memoriesApi; late SessionsApi sessionsApi; @@ -56,7 +56,7 @@ class ApiService implements Authentication { } usersApi = UsersApi(_apiClient); authenticationApi = AuthenticationApi(_apiClient); - oAuthApi = OAuthApi(_apiClient); + oAuthApi = AuthenticationApi(_apiClient); albumsApi = AlbumsApi(_apiClient); assetsApi = AssetsApi(_apiClient); serverInfoApi = ServerApi(_apiClient); @@ -71,7 +71,7 @@ class ApiService implements Authentication { downloadApi = DownloadApi(_apiClient); trashApi = TrashApi(_apiClient); stacksApi = StacksApi(_apiClient); - viewApi = ViewApi(_apiClient); + viewApi = ViewsApi(_apiClient); memoriesApi = MemoriesApi(_apiClient); sessionsApi = SessionsApi(_apiClient); } diff --git a/mobile/openapi/README.md b/mobile/openapi/README.md index 33ccadba7e..ff04a91def 100644 --- a/mobile/openapi/README.md +++ b/mobile/openapi/README.md @@ -73,225 +73,228 @@ All URIs are relative to */api* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*APIKeysApi* | [**createApiKey**](doc//APIKeysApi.md#createapikey) | **POST** /api-keys | -*APIKeysApi* | [**deleteApiKey**](doc//APIKeysApi.md#deleteapikey) | **DELETE** /api-keys/{id} | -*APIKeysApi* | [**getApiKey**](doc//APIKeysApi.md#getapikey) | **GET** /api-keys/{id} | -*APIKeysApi* | [**getApiKeys**](doc//APIKeysApi.md#getapikeys) | **GET** /api-keys | -*APIKeysApi* | [**getMyApiKey**](doc//APIKeysApi.md#getmyapikey) | **GET** /api-keys/me | -*APIKeysApi* | [**updateApiKey**](doc//APIKeysApi.md#updateapikey) | **PUT** /api-keys/{id} | -*ActivitiesApi* | [**createActivity**](doc//ActivitiesApi.md#createactivity) | **POST** /activities | -*ActivitiesApi* | [**deleteActivity**](doc//ActivitiesApi.md#deleteactivity) | **DELETE** /activities/{id} | -*ActivitiesApi* | [**getActivities**](doc//ActivitiesApi.md#getactivities) | **GET** /activities | -*ActivitiesApi* | [**getActivityStatistics**](doc//ActivitiesApi.md#getactivitystatistics) | **GET** /activities/statistics | -*AlbumsApi* | [**addAssetsToAlbum**](doc//AlbumsApi.md#addassetstoalbum) | **PUT** /albums/{id}/assets | -*AlbumsApi* | [**addAssetsToAlbums**](doc//AlbumsApi.md#addassetstoalbums) | **PUT** /albums/assets | -*AlbumsApi* | [**addUsersToAlbum**](doc//AlbumsApi.md#adduserstoalbum) | **PUT** /albums/{id}/users | -*AlbumsApi* | [**createAlbum**](doc//AlbumsApi.md#createalbum) | **POST** /albums | -*AlbumsApi* | [**deleteAlbum**](doc//AlbumsApi.md#deletealbum) | **DELETE** /albums/{id} | -*AlbumsApi* | [**getAlbumInfo**](doc//AlbumsApi.md#getalbuminfo) | **GET** /albums/{id} | -*AlbumsApi* | [**getAlbumStatistics**](doc//AlbumsApi.md#getalbumstatistics) | **GET** /albums/statistics | -*AlbumsApi* | [**getAllAlbums**](doc//AlbumsApi.md#getallalbums) | **GET** /albums | -*AlbumsApi* | [**removeAssetFromAlbum**](doc//AlbumsApi.md#removeassetfromalbum) | **DELETE** /albums/{id}/assets | -*AlbumsApi* | [**removeUserFromAlbum**](doc//AlbumsApi.md#removeuserfromalbum) | **DELETE** /albums/{id}/user/{userId} | -*AlbumsApi* | [**updateAlbumInfo**](doc//AlbumsApi.md#updatealbuminfo) | **PATCH** /albums/{id} | -*AlbumsApi* | [**updateAlbumUser**](doc//AlbumsApi.md#updatealbumuser) | **PUT** /albums/{id}/user/{userId} | -*AssetsApi* | [**checkBulkUpload**](doc//AssetsApi.md#checkbulkupload) | **POST** /assets/bulk-upload-check | checkBulkUpload -*AssetsApi* | [**checkExistingAssets**](doc//AssetsApi.md#checkexistingassets) | **POST** /assets/exist | checkExistingAssets -*AssetsApi* | [**copyAsset**](doc//AssetsApi.md#copyasset) | **PUT** /assets/copy | -*AssetsApi* | [**deleteAssetMetadata**](doc//AssetsApi.md#deleteassetmetadata) | **DELETE** /assets/{id}/metadata/{key} | -*AssetsApi* | [**deleteAssets**](doc//AssetsApi.md#deleteassets) | **DELETE** /assets | -*AssetsApi* | [**downloadAsset**](doc//AssetsApi.md#downloadasset) | **GET** /assets/{id}/original | -*AssetsApi* | [**getAllUserAssetsByDeviceId**](doc//AssetsApi.md#getalluserassetsbydeviceid) | **GET** /assets/device/{deviceId} | getAllUserAssetsByDeviceId -*AssetsApi* | [**getAssetInfo**](doc//AssetsApi.md#getassetinfo) | **GET** /assets/{id} | -*AssetsApi* | [**getAssetMetadata**](doc//AssetsApi.md#getassetmetadata) | **GET** /assets/{id}/metadata | -*AssetsApi* | [**getAssetMetadataByKey**](doc//AssetsApi.md#getassetmetadatabykey) | **GET** /assets/{id}/metadata/{key} | -*AssetsApi* | [**getAssetOcr**](doc//AssetsApi.md#getassetocr) | **GET** /assets/{id}/ocr | -*AssetsApi* | [**getAssetStatistics**](doc//AssetsApi.md#getassetstatistics) | **GET** /assets/statistics | -*AssetsApi* | [**getRandom**](doc//AssetsApi.md#getrandom) | **GET** /assets/random | -*AssetsApi* | [**playAssetVideo**](doc//AssetsApi.md#playassetvideo) | **GET** /assets/{id}/video/playback | -*AssetsApi* | [**replaceAsset**](doc//AssetsApi.md#replaceasset) | **PUT** /assets/{id}/original | Replace the asset with new file, without changing its id -*AssetsApi* | [**runAssetJobs**](doc//AssetsApi.md#runassetjobs) | **POST** /assets/jobs | -*AssetsApi* | [**updateAsset**](doc//AssetsApi.md#updateasset) | **PUT** /assets/{id} | -*AssetsApi* | [**updateAssetMetadata**](doc//AssetsApi.md#updateassetmetadata) | **PUT** /assets/{id}/metadata | -*AssetsApi* | [**updateAssets**](doc//AssetsApi.md#updateassets) | **PUT** /assets | -*AssetsApi* | [**uploadAsset**](doc//AssetsApi.md#uploadasset) | **POST** /assets | -*AssetsApi* | [**viewAsset**](doc//AssetsApi.md#viewasset) | **GET** /assets/{id}/thumbnail | -*AuthAdminApi* | [**unlinkAllOAuthAccountsAdmin**](doc//AuthAdminApi.md#unlinkalloauthaccountsadmin) | **POST** /admin/auth/unlink-all | -*AuthenticationApi* | [**changePassword**](doc//AuthenticationApi.md#changepassword) | **POST** /auth/change-password | -*AuthenticationApi* | [**changePinCode**](doc//AuthenticationApi.md#changepincode) | **PUT** /auth/pin-code | -*AuthenticationApi* | [**getAuthStatus**](doc//AuthenticationApi.md#getauthstatus) | **GET** /auth/status | -*AuthenticationApi* | [**lockAuthSession**](doc//AuthenticationApi.md#lockauthsession) | **POST** /auth/session/lock | -*AuthenticationApi* | [**login**](doc//AuthenticationApi.md#login) | **POST** /auth/login | -*AuthenticationApi* | [**logout**](doc//AuthenticationApi.md#logout) | **POST** /auth/logout | -*AuthenticationApi* | [**resetPinCode**](doc//AuthenticationApi.md#resetpincode) | **DELETE** /auth/pin-code | -*AuthenticationApi* | [**setupPinCode**](doc//AuthenticationApi.md#setuppincode) | **POST** /auth/pin-code | -*AuthenticationApi* | [**signUpAdmin**](doc//AuthenticationApi.md#signupadmin) | **POST** /auth/admin-sign-up | -*AuthenticationApi* | [**unlockAuthSession**](doc//AuthenticationApi.md#unlockauthsession) | **POST** /auth/session/unlock | -*AuthenticationApi* | [**validateAccessToken**](doc//AuthenticationApi.md#validateaccesstoken) | **POST** /auth/validateToken | -*DeprecatedApi* | [**createPartnerDeprecated**](doc//DeprecatedApi.md#createpartnerdeprecated) | **POST** /partners/{id} | -*DeprecatedApi* | [**getRandom**](doc//DeprecatedApi.md#getrandom) | **GET** /assets/random | -*DeprecatedApi* | [**replaceAsset**](doc//DeprecatedApi.md#replaceasset) | **PUT** /assets/{id}/original | Replace the asset with new file, without changing its id -*DownloadApi* | [**downloadArchive**](doc//DownloadApi.md#downloadarchive) | **POST** /download/archive | -*DownloadApi* | [**getDownloadInfo**](doc//DownloadApi.md#getdownloadinfo) | **POST** /download/info | -*DuplicatesApi* | [**deleteDuplicate**](doc//DuplicatesApi.md#deleteduplicate) | **DELETE** /duplicates/{id} | -*DuplicatesApi* | [**deleteDuplicates**](doc//DuplicatesApi.md#deleteduplicates) | **DELETE** /duplicates | -*DuplicatesApi* | [**getAssetDuplicates**](doc//DuplicatesApi.md#getassetduplicates) | **GET** /duplicates | -*FacesApi* | [**createFace**](doc//FacesApi.md#createface) | **POST** /faces | -*FacesApi* | [**deleteFace**](doc//FacesApi.md#deleteface) | **DELETE** /faces/{id} | -*FacesApi* | [**getFaces**](doc//FacesApi.md#getfaces) | **GET** /faces | -*FacesApi* | [**reassignFacesById**](doc//FacesApi.md#reassignfacesbyid) | **PUT** /faces/{id} | -*JobsApi* | [**createJob**](doc//JobsApi.md#createjob) | **POST** /jobs | -*JobsApi* | [**getAllJobsStatus**](doc//JobsApi.md#getalljobsstatus) | **GET** /jobs | -*JobsApi* | [**sendJobCommand**](doc//JobsApi.md#sendjobcommand) | **PUT** /jobs/{id} | -*LibrariesApi* | [**createLibrary**](doc//LibrariesApi.md#createlibrary) | **POST** /libraries | -*LibrariesApi* | [**deleteLibrary**](doc//LibrariesApi.md#deletelibrary) | **DELETE** /libraries/{id} | -*LibrariesApi* | [**getAllLibraries**](doc//LibrariesApi.md#getalllibraries) | **GET** /libraries | -*LibrariesApi* | [**getLibrary**](doc//LibrariesApi.md#getlibrary) | **GET** /libraries/{id} | -*LibrariesApi* | [**getLibraryStatistics**](doc//LibrariesApi.md#getlibrarystatistics) | **GET** /libraries/{id}/statistics | -*LibrariesApi* | [**scanLibrary**](doc//LibrariesApi.md#scanlibrary) | **POST** /libraries/{id}/scan | -*LibrariesApi* | [**updateLibrary**](doc//LibrariesApi.md#updatelibrary) | **PUT** /libraries/{id} | -*LibrariesApi* | [**validate**](doc//LibrariesApi.md#validate) | **POST** /libraries/{id}/validate | -*MapApi* | [**getMapMarkers**](doc//MapApi.md#getmapmarkers) | **GET** /map/markers | -*MapApi* | [**reverseGeocode**](doc//MapApi.md#reversegeocode) | **GET** /map/reverse-geocode | -*MemoriesApi* | [**addMemoryAssets**](doc//MemoriesApi.md#addmemoryassets) | **PUT** /memories/{id}/assets | -*MemoriesApi* | [**createMemory**](doc//MemoriesApi.md#creatememory) | **POST** /memories | -*MemoriesApi* | [**deleteMemory**](doc//MemoriesApi.md#deletememory) | **DELETE** /memories/{id} | -*MemoriesApi* | [**getMemory**](doc//MemoriesApi.md#getmemory) | **GET** /memories/{id} | -*MemoriesApi* | [**memoriesStatistics**](doc//MemoriesApi.md#memoriesstatistics) | **GET** /memories/statistics | -*MemoriesApi* | [**removeMemoryAssets**](doc//MemoriesApi.md#removememoryassets) | **DELETE** /memories/{id}/assets | -*MemoriesApi* | [**searchMemories**](doc//MemoriesApi.md#searchmemories) | **GET** /memories | -*MemoriesApi* | [**updateMemory**](doc//MemoriesApi.md#updatememory) | **PUT** /memories/{id} | -*NotificationsApi* | [**deleteNotification**](doc//NotificationsApi.md#deletenotification) | **DELETE** /notifications/{id} | -*NotificationsApi* | [**deleteNotifications**](doc//NotificationsApi.md#deletenotifications) | **DELETE** /notifications | -*NotificationsApi* | [**getNotification**](doc//NotificationsApi.md#getnotification) | **GET** /notifications/{id} | -*NotificationsApi* | [**getNotifications**](doc//NotificationsApi.md#getnotifications) | **GET** /notifications | -*NotificationsApi* | [**updateNotification**](doc//NotificationsApi.md#updatenotification) | **PUT** /notifications/{id} | -*NotificationsApi* | [**updateNotifications**](doc//NotificationsApi.md#updatenotifications) | **PUT** /notifications | -*NotificationsAdminApi* | [**createNotification**](doc//NotificationsAdminApi.md#createnotification) | **POST** /admin/notifications | -*NotificationsAdminApi* | [**getNotificationTemplateAdmin**](doc//NotificationsAdminApi.md#getnotificationtemplateadmin) | **POST** /admin/notifications/templates/{name} | -*NotificationsAdminApi* | [**sendTestEmailAdmin**](doc//NotificationsAdminApi.md#sendtestemailadmin) | **POST** /admin/notifications/test-email | -*OAuthApi* | [**finishOAuth**](doc//OAuthApi.md#finishoauth) | **POST** /oauth/callback | -*OAuthApi* | [**linkOAuthAccount**](doc//OAuthApi.md#linkoauthaccount) | **POST** /oauth/link | -*OAuthApi* | [**redirectOAuthToMobile**](doc//OAuthApi.md#redirectoauthtomobile) | **GET** /oauth/mobile-redirect | -*OAuthApi* | [**startOAuth**](doc//OAuthApi.md#startoauth) | **POST** /oauth/authorize | -*OAuthApi* | [**unlinkOAuthAccount**](doc//OAuthApi.md#unlinkoauthaccount) | **POST** /oauth/unlink | -*PartnersApi* | [**createPartner**](doc//PartnersApi.md#createpartner) | **POST** /partners | -*PartnersApi* | [**createPartnerDeprecated**](doc//PartnersApi.md#createpartnerdeprecated) | **POST** /partners/{id} | -*PartnersApi* | [**getPartners**](doc//PartnersApi.md#getpartners) | **GET** /partners | -*PartnersApi* | [**removePartner**](doc//PartnersApi.md#removepartner) | **DELETE** /partners/{id} | -*PartnersApi* | [**updatePartner**](doc//PartnersApi.md#updatepartner) | **PUT** /partners/{id} | -*PeopleApi* | [**createPerson**](doc//PeopleApi.md#createperson) | **POST** /people | -*PeopleApi* | [**deletePeople**](doc//PeopleApi.md#deletepeople) | **DELETE** /people | -*PeopleApi* | [**deletePerson**](doc//PeopleApi.md#deleteperson) | **DELETE** /people/{id} | -*PeopleApi* | [**getAllPeople**](doc//PeopleApi.md#getallpeople) | **GET** /people | -*PeopleApi* | [**getPerson**](doc//PeopleApi.md#getperson) | **GET** /people/{id} | -*PeopleApi* | [**getPersonStatistics**](doc//PeopleApi.md#getpersonstatistics) | **GET** /people/{id}/statistics | -*PeopleApi* | [**getPersonThumbnail**](doc//PeopleApi.md#getpersonthumbnail) | **GET** /people/{id}/thumbnail | -*PeopleApi* | [**mergePerson**](doc//PeopleApi.md#mergeperson) | **POST** /people/{id}/merge | -*PeopleApi* | [**reassignFaces**](doc//PeopleApi.md#reassignfaces) | **PUT** /people/{id}/reassign | -*PeopleApi* | [**updatePeople**](doc//PeopleApi.md#updatepeople) | **PUT** /people | -*PeopleApi* | [**updatePerson**](doc//PeopleApi.md#updateperson) | **PUT** /people/{id} | -*SearchApi* | [**getAssetsByCity**](doc//SearchApi.md#getassetsbycity) | **GET** /search/cities | -*SearchApi* | [**getExploreData**](doc//SearchApi.md#getexploredata) | **GET** /search/explore | -*SearchApi* | [**getSearchSuggestions**](doc//SearchApi.md#getsearchsuggestions) | **GET** /search/suggestions | -*SearchApi* | [**searchAssetStatistics**](doc//SearchApi.md#searchassetstatistics) | **POST** /search/statistics | -*SearchApi* | [**searchAssets**](doc//SearchApi.md#searchassets) | **POST** /search/metadata | -*SearchApi* | [**searchLargeAssets**](doc//SearchApi.md#searchlargeassets) | **POST** /search/large-assets | -*SearchApi* | [**searchPerson**](doc//SearchApi.md#searchperson) | **GET** /search/person | -*SearchApi* | [**searchPlaces**](doc//SearchApi.md#searchplaces) | **GET** /search/places | -*SearchApi* | [**searchRandom**](doc//SearchApi.md#searchrandom) | **POST** /search/random | -*SearchApi* | [**searchSmart**](doc//SearchApi.md#searchsmart) | **POST** /search/smart | -*ServerApi* | [**deleteServerLicense**](doc//ServerApi.md#deleteserverlicense) | **DELETE** /server/license | -*ServerApi* | [**getAboutInfo**](doc//ServerApi.md#getaboutinfo) | **GET** /server/about | -*ServerApi* | [**getApkLinks**](doc//ServerApi.md#getapklinks) | **GET** /server/apk-links | -*ServerApi* | [**getServerConfig**](doc//ServerApi.md#getserverconfig) | **GET** /server/config | -*ServerApi* | [**getServerFeatures**](doc//ServerApi.md#getserverfeatures) | **GET** /server/features | -*ServerApi* | [**getServerLicense**](doc//ServerApi.md#getserverlicense) | **GET** /server/license | -*ServerApi* | [**getServerStatistics**](doc//ServerApi.md#getserverstatistics) | **GET** /server/statistics | -*ServerApi* | [**getServerVersion**](doc//ServerApi.md#getserverversion) | **GET** /server/version | -*ServerApi* | [**getStorage**](doc//ServerApi.md#getstorage) | **GET** /server/storage | -*ServerApi* | [**getSupportedMediaTypes**](doc//ServerApi.md#getsupportedmediatypes) | **GET** /server/media-types | -*ServerApi* | [**getTheme**](doc//ServerApi.md#gettheme) | **GET** /server/theme | -*ServerApi* | [**getVersionCheck**](doc//ServerApi.md#getversioncheck) | **GET** /server/version-check | -*ServerApi* | [**getVersionHistory**](doc//ServerApi.md#getversionhistory) | **GET** /server/version-history | -*ServerApi* | [**pingServer**](doc//ServerApi.md#pingserver) | **GET** /server/ping | -*ServerApi* | [**setServerLicense**](doc//ServerApi.md#setserverlicense) | **PUT** /server/license | -*SessionsApi* | [**createSession**](doc//SessionsApi.md#createsession) | **POST** /sessions | -*SessionsApi* | [**deleteAllSessions**](doc//SessionsApi.md#deleteallsessions) | **DELETE** /sessions | -*SessionsApi* | [**deleteSession**](doc//SessionsApi.md#deletesession) | **DELETE** /sessions/{id} | -*SessionsApi* | [**getSessions**](doc//SessionsApi.md#getsessions) | **GET** /sessions | -*SessionsApi* | [**lockSession**](doc//SessionsApi.md#locksession) | **POST** /sessions/{id}/lock | -*SessionsApi* | [**updateSession**](doc//SessionsApi.md#updatesession) | **PUT** /sessions/{id} | -*SharedLinksApi* | [**addSharedLinkAssets**](doc//SharedLinksApi.md#addsharedlinkassets) | **PUT** /shared-links/{id}/assets | -*SharedLinksApi* | [**createSharedLink**](doc//SharedLinksApi.md#createsharedlink) | **POST** /shared-links | -*SharedLinksApi* | [**getAllSharedLinks**](doc//SharedLinksApi.md#getallsharedlinks) | **GET** /shared-links | -*SharedLinksApi* | [**getMySharedLink**](doc//SharedLinksApi.md#getmysharedlink) | **GET** /shared-links/me | -*SharedLinksApi* | [**getSharedLinkById**](doc//SharedLinksApi.md#getsharedlinkbyid) | **GET** /shared-links/{id} | -*SharedLinksApi* | [**removeSharedLink**](doc//SharedLinksApi.md#removesharedlink) | **DELETE** /shared-links/{id} | -*SharedLinksApi* | [**removeSharedLinkAssets**](doc//SharedLinksApi.md#removesharedlinkassets) | **DELETE** /shared-links/{id}/assets | -*SharedLinksApi* | [**updateSharedLink**](doc//SharedLinksApi.md#updatesharedlink) | **PATCH** /shared-links/{id} | -*StacksApi* | [**createStack**](doc//StacksApi.md#createstack) | **POST** /stacks | -*StacksApi* | [**deleteStack**](doc//StacksApi.md#deletestack) | **DELETE** /stacks/{id} | -*StacksApi* | [**deleteStacks**](doc//StacksApi.md#deletestacks) | **DELETE** /stacks | -*StacksApi* | [**getStack**](doc//StacksApi.md#getstack) | **GET** /stacks/{id} | -*StacksApi* | [**removeAssetFromStack**](doc//StacksApi.md#removeassetfromstack) | **DELETE** /stacks/{id}/assets/{assetId} | -*StacksApi* | [**searchStacks**](doc//StacksApi.md#searchstacks) | **GET** /stacks | -*StacksApi* | [**updateStack**](doc//StacksApi.md#updatestack) | **PUT** /stacks/{id} | -*SyncApi* | [**deleteSyncAck**](doc//SyncApi.md#deletesyncack) | **DELETE** /sync/ack | -*SyncApi* | [**getDeltaSync**](doc//SyncApi.md#getdeltasync) | **POST** /sync/delta-sync | -*SyncApi* | [**getFullSyncForUser**](doc//SyncApi.md#getfullsyncforuser) | **POST** /sync/full-sync | -*SyncApi* | [**getSyncAck**](doc//SyncApi.md#getsyncack) | **GET** /sync/ack | -*SyncApi* | [**getSyncStream**](doc//SyncApi.md#getsyncstream) | **POST** /sync/stream | -*SyncApi* | [**sendSyncAck**](doc//SyncApi.md#sendsyncack) | **POST** /sync/ack | -*SystemConfigApi* | [**getConfig**](doc//SystemConfigApi.md#getconfig) | **GET** /system-config | -*SystemConfigApi* | [**getConfigDefaults**](doc//SystemConfigApi.md#getconfigdefaults) | **GET** /system-config/defaults | -*SystemConfigApi* | [**getStorageTemplateOptions**](doc//SystemConfigApi.md#getstoragetemplateoptions) | **GET** /system-config/storage-template-options | -*SystemConfigApi* | [**updateConfig**](doc//SystemConfigApi.md#updateconfig) | **PUT** /system-config | -*SystemMetadataApi* | [**getAdminOnboarding**](doc//SystemMetadataApi.md#getadminonboarding) | **GET** /system-metadata/admin-onboarding | -*SystemMetadataApi* | [**getReverseGeocodingState**](doc//SystemMetadataApi.md#getreversegeocodingstate) | **GET** /system-metadata/reverse-geocoding-state | -*SystemMetadataApi* | [**getVersionCheckState**](doc//SystemMetadataApi.md#getversioncheckstate) | **GET** /system-metadata/version-check-state | -*SystemMetadataApi* | [**updateAdminOnboarding**](doc//SystemMetadataApi.md#updateadminonboarding) | **POST** /system-metadata/admin-onboarding | -*TagsApi* | [**bulkTagAssets**](doc//TagsApi.md#bulktagassets) | **PUT** /tags/assets | -*TagsApi* | [**createTag**](doc//TagsApi.md#createtag) | **POST** /tags | -*TagsApi* | [**deleteTag**](doc//TagsApi.md#deletetag) | **DELETE** /tags/{id} | -*TagsApi* | [**getAllTags**](doc//TagsApi.md#getalltags) | **GET** /tags | -*TagsApi* | [**getTagById**](doc//TagsApi.md#gettagbyid) | **GET** /tags/{id} | -*TagsApi* | [**tagAssets**](doc//TagsApi.md#tagassets) | **PUT** /tags/{id}/assets | -*TagsApi* | [**untagAssets**](doc//TagsApi.md#untagassets) | **DELETE** /tags/{id}/assets | -*TagsApi* | [**updateTag**](doc//TagsApi.md#updatetag) | **PUT** /tags/{id} | -*TagsApi* | [**upsertTags**](doc//TagsApi.md#upserttags) | **PUT** /tags | -*TimelineApi* | [**getTimeBucket**](doc//TimelineApi.md#gettimebucket) | **GET** /timeline/bucket | -*TimelineApi* | [**getTimeBuckets**](doc//TimelineApi.md#gettimebuckets) | **GET** /timeline/buckets | -*TrashApi* | [**emptyTrash**](doc//TrashApi.md#emptytrash) | **POST** /trash/empty | -*TrashApi* | [**restoreAssets**](doc//TrashApi.md#restoreassets) | **POST** /trash/restore/assets | -*TrashApi* | [**restoreTrash**](doc//TrashApi.md#restoretrash) | **POST** /trash/restore | -*UsersApi* | [**createProfileImage**](doc//UsersApi.md#createprofileimage) | **POST** /users/profile-image | -*UsersApi* | [**deleteProfileImage**](doc//UsersApi.md#deleteprofileimage) | **DELETE** /users/profile-image | -*UsersApi* | [**deleteUserLicense**](doc//UsersApi.md#deleteuserlicense) | **DELETE** /users/me/license | -*UsersApi* | [**deleteUserOnboarding**](doc//UsersApi.md#deleteuseronboarding) | **DELETE** /users/me/onboarding | -*UsersApi* | [**getMyPreferences**](doc//UsersApi.md#getmypreferences) | **GET** /users/me/preferences | -*UsersApi* | [**getMyUser**](doc//UsersApi.md#getmyuser) | **GET** /users/me | -*UsersApi* | [**getProfileImage**](doc//UsersApi.md#getprofileimage) | **GET** /users/{id}/profile-image | -*UsersApi* | [**getUser**](doc//UsersApi.md#getuser) | **GET** /users/{id} | -*UsersApi* | [**getUserLicense**](doc//UsersApi.md#getuserlicense) | **GET** /users/me/license | -*UsersApi* | [**getUserOnboarding**](doc//UsersApi.md#getuseronboarding) | **GET** /users/me/onboarding | -*UsersApi* | [**searchUsers**](doc//UsersApi.md#searchusers) | **GET** /users | -*UsersApi* | [**setUserLicense**](doc//UsersApi.md#setuserlicense) | **PUT** /users/me/license | -*UsersApi* | [**setUserOnboarding**](doc//UsersApi.md#setuseronboarding) | **PUT** /users/me/onboarding | -*UsersApi* | [**updateMyPreferences**](doc//UsersApi.md#updatemypreferences) | **PUT** /users/me/preferences | -*UsersApi* | [**updateMyUser**](doc//UsersApi.md#updatemyuser) | **PUT** /users/me | -*UsersAdminApi* | [**createUserAdmin**](doc//UsersAdminApi.md#createuseradmin) | **POST** /admin/users | -*UsersAdminApi* | [**deleteUserAdmin**](doc//UsersAdminApi.md#deleteuseradmin) | **DELETE** /admin/users/{id} | -*UsersAdminApi* | [**getUserAdmin**](doc//UsersAdminApi.md#getuseradmin) | **GET** /admin/users/{id} | -*UsersAdminApi* | [**getUserPreferencesAdmin**](doc//UsersAdminApi.md#getuserpreferencesadmin) | **GET** /admin/users/{id}/preferences | -*UsersAdminApi* | [**getUserSessionsAdmin**](doc//UsersAdminApi.md#getusersessionsadmin) | **GET** /admin/users/{id}/sessions | -*UsersAdminApi* | [**getUserStatisticsAdmin**](doc//UsersAdminApi.md#getuserstatisticsadmin) | **GET** /admin/users/{id}/statistics | -*UsersAdminApi* | [**restoreUserAdmin**](doc//UsersAdminApi.md#restoreuseradmin) | **POST** /admin/users/{id}/restore | -*UsersAdminApi* | [**searchUsersAdmin**](doc//UsersAdminApi.md#searchusersadmin) | **GET** /admin/users | -*UsersAdminApi* | [**updateUserAdmin**](doc//UsersAdminApi.md#updateuseradmin) | **PUT** /admin/users/{id} | -*UsersAdminApi* | [**updateUserPreferencesAdmin**](doc//UsersAdminApi.md#updateuserpreferencesadmin) | **PUT** /admin/users/{id}/preferences | -*ViewApi* | [**getAssetsByOriginalPath**](doc//ViewApi.md#getassetsbyoriginalpath) | **GET** /view/folder | -*ViewApi* | [**getUniqueOriginalPaths**](doc//ViewApi.md#getuniqueoriginalpaths) | **GET** /view/folder/unique-paths | +*APIKeysApi* | [**createApiKey**](doc//APIKeysApi.md#createapikey) | **POST** /api-keys | Create an API key +*APIKeysApi* | [**deleteApiKey**](doc//APIKeysApi.md#deleteapikey) | **DELETE** /api-keys/{id} | Delete an API key +*APIKeysApi* | [**getApiKey**](doc//APIKeysApi.md#getapikey) | **GET** /api-keys/{id} | Retrieve an API key +*APIKeysApi* | [**getApiKeys**](doc//APIKeysApi.md#getapikeys) | **GET** /api-keys | List all API keys +*APIKeysApi* | [**getMyApiKey**](doc//APIKeysApi.md#getmyapikey) | **GET** /api-keys/me | Retrieve the current API key +*APIKeysApi* | [**updateApiKey**](doc//APIKeysApi.md#updateapikey) | **PUT** /api-keys/{id} | Update an API key +*ActivitiesApi* | [**createActivity**](doc//ActivitiesApi.md#createactivity) | **POST** /activities | Create an activity +*ActivitiesApi* | [**deleteActivity**](doc//ActivitiesApi.md#deleteactivity) | **DELETE** /activities/{id} | Delete an activity +*ActivitiesApi* | [**getActivities**](doc//ActivitiesApi.md#getactivities) | **GET** /activities | List all activities +*ActivitiesApi* | [**getActivityStatistics**](doc//ActivitiesApi.md#getactivitystatistics) | **GET** /activities/statistics | Retrieve activity statistics +*AlbumsApi* | [**addAssetsToAlbum**](doc//AlbumsApi.md#addassetstoalbum) | **PUT** /albums/{id}/assets | Add assets to an album +*AlbumsApi* | [**addAssetsToAlbums**](doc//AlbumsApi.md#addassetstoalbums) | **PUT** /albums/assets | Add assets to albums +*AlbumsApi* | [**addUsersToAlbum**](doc//AlbumsApi.md#adduserstoalbum) | **PUT** /albums/{id}/users | Share album with users +*AlbumsApi* | [**createAlbum**](doc//AlbumsApi.md#createalbum) | **POST** /albums | Create an album +*AlbumsApi* | [**deleteAlbum**](doc//AlbumsApi.md#deletealbum) | **DELETE** /albums/{id} | Delete an album +*AlbumsApi* | [**getAlbumInfo**](doc//AlbumsApi.md#getalbuminfo) | **GET** /albums/{id} | Retrieve an album +*AlbumsApi* | [**getAlbumStatistics**](doc//AlbumsApi.md#getalbumstatistics) | **GET** /albums/statistics | Retrieve album statistics +*AlbumsApi* | [**getAllAlbums**](doc//AlbumsApi.md#getallalbums) | **GET** /albums | List all albums +*AlbumsApi* | [**removeAssetFromAlbum**](doc//AlbumsApi.md#removeassetfromalbum) | **DELETE** /albums/{id}/assets | Remove assets from an album +*AlbumsApi* | [**removeUserFromAlbum**](doc//AlbumsApi.md#removeuserfromalbum) | **DELETE** /albums/{id}/user/{userId} | Remove user from album +*AlbumsApi* | [**updateAlbumInfo**](doc//AlbumsApi.md#updatealbuminfo) | **PATCH** /albums/{id} | Update an album +*AlbumsApi* | [**updateAlbumUser**](doc//AlbumsApi.md#updatealbumuser) | **PUT** /albums/{id}/user/{userId} | Update user role +*AssetsApi* | [**checkBulkUpload**](doc//AssetsApi.md#checkbulkupload) | **POST** /assets/bulk-upload-check | Check bulk upload +*AssetsApi* | [**checkExistingAssets**](doc//AssetsApi.md#checkexistingassets) | **POST** /assets/exist | Check existing assets +*AssetsApi* | [**copyAsset**](doc//AssetsApi.md#copyasset) | **PUT** /assets/copy | Copy asset +*AssetsApi* | [**deleteAssetMetadata**](doc//AssetsApi.md#deleteassetmetadata) | **DELETE** /assets/{id}/metadata/{key} | Delete asset metadata by key +*AssetsApi* | [**deleteAssets**](doc//AssetsApi.md#deleteassets) | **DELETE** /assets | Delete assets +*AssetsApi* | [**downloadAsset**](doc//AssetsApi.md#downloadasset) | **GET** /assets/{id}/original | Download original asset +*AssetsApi* | [**getAllUserAssetsByDeviceId**](doc//AssetsApi.md#getalluserassetsbydeviceid) | **GET** /assets/device/{deviceId} | Retrieve assets by device ID +*AssetsApi* | [**getAssetInfo**](doc//AssetsApi.md#getassetinfo) | **GET** /assets/{id} | Retrieve an asset +*AssetsApi* | [**getAssetMetadata**](doc//AssetsApi.md#getassetmetadata) | **GET** /assets/{id}/metadata | Get asset metadata +*AssetsApi* | [**getAssetMetadataByKey**](doc//AssetsApi.md#getassetmetadatabykey) | **GET** /assets/{id}/metadata/{key} | Retrieve asset metadata by key +*AssetsApi* | [**getAssetOcr**](doc//AssetsApi.md#getassetocr) | **GET** /assets/{id}/ocr | Retrieve asset OCR data +*AssetsApi* | [**getAssetStatistics**](doc//AssetsApi.md#getassetstatistics) | **GET** /assets/statistics | Get asset statistics +*AssetsApi* | [**getRandom**](doc//AssetsApi.md#getrandom) | **GET** /assets/random | Get random assets +*AssetsApi* | [**playAssetVideo**](doc//AssetsApi.md#playassetvideo) | **GET** /assets/{id}/video/playback | Play asset video +*AssetsApi* | [**replaceAsset**](doc//AssetsApi.md#replaceasset) | **PUT** /assets/{id}/original | Replace asset +*AssetsApi* | [**runAssetJobs**](doc//AssetsApi.md#runassetjobs) | **POST** /assets/jobs | Run an asset job +*AssetsApi* | [**updateAsset**](doc//AssetsApi.md#updateasset) | **PUT** /assets/{id} | Update an asset +*AssetsApi* | [**updateAssetMetadata**](doc//AssetsApi.md#updateassetmetadata) | **PUT** /assets/{id}/metadata | Update asset metadata +*AssetsApi* | [**updateAssets**](doc//AssetsApi.md#updateassets) | **PUT** /assets | Update assets +*AssetsApi* | [**uploadAsset**](doc//AssetsApi.md#uploadasset) | **POST** /assets | Upload asset +*AssetsApi* | [**viewAsset**](doc//AssetsApi.md#viewasset) | **GET** /assets/{id}/thumbnail | View asset thumbnail +*AuthenticationApi* | [**changePassword**](doc//AuthenticationApi.md#changepassword) | **POST** /auth/change-password | Change password +*AuthenticationApi* | [**changePinCode**](doc//AuthenticationApi.md#changepincode) | **PUT** /auth/pin-code | Change pin code +*AuthenticationApi* | [**finishOAuth**](doc//AuthenticationApi.md#finishoauth) | **POST** /oauth/callback | Finish OAuth +*AuthenticationApi* | [**getAuthStatus**](doc//AuthenticationApi.md#getauthstatus) | **GET** /auth/status | Retrieve auth status +*AuthenticationApi* | [**linkOAuthAccount**](doc//AuthenticationApi.md#linkoauthaccount) | **POST** /oauth/link | Link OAuth account +*AuthenticationApi* | [**lockAuthSession**](doc//AuthenticationApi.md#lockauthsession) | **POST** /auth/session/lock | Lock auth session +*AuthenticationApi* | [**login**](doc//AuthenticationApi.md#login) | **POST** /auth/login | Login +*AuthenticationApi* | [**logout**](doc//AuthenticationApi.md#logout) | **POST** /auth/logout | Logout +*AuthenticationApi* | [**redirectOAuthToMobile**](doc//AuthenticationApi.md#redirectoauthtomobile) | **GET** /oauth/mobile-redirect | Redirect OAuth to mobile +*AuthenticationApi* | [**resetPinCode**](doc//AuthenticationApi.md#resetpincode) | **DELETE** /auth/pin-code | Reset pin code +*AuthenticationApi* | [**setupPinCode**](doc//AuthenticationApi.md#setuppincode) | **POST** /auth/pin-code | Setup pin code +*AuthenticationApi* | [**signUpAdmin**](doc//AuthenticationApi.md#signupadmin) | **POST** /auth/admin-sign-up | Register admin +*AuthenticationApi* | [**startOAuth**](doc//AuthenticationApi.md#startoauth) | **POST** /oauth/authorize | Start OAuth +*AuthenticationApi* | [**unlinkOAuthAccount**](doc//AuthenticationApi.md#unlinkoauthaccount) | **POST** /oauth/unlink | Unlink OAuth account +*AuthenticationApi* | [**unlockAuthSession**](doc//AuthenticationApi.md#unlockauthsession) | **POST** /auth/session/unlock | Unlock auth session +*AuthenticationApi* | [**validateAccessToken**](doc//AuthenticationApi.md#validateaccesstoken) | **POST** /auth/validateToken | Validate access token +*AuthenticationAdminApi* | [**unlinkAllOAuthAccountsAdmin**](doc//AuthenticationAdminApi.md#unlinkalloauthaccountsadmin) | **POST** /admin/auth/unlink-all | Unlink all OAuth accounts +*DeprecatedApi* | [**createPartnerDeprecated**](doc//DeprecatedApi.md#createpartnerdeprecated) | **POST** /partners/{id} | Create a partner +*DeprecatedApi* | [**getAllUserAssetsByDeviceId**](doc//DeprecatedApi.md#getalluserassetsbydeviceid) | **GET** /assets/device/{deviceId} | Retrieve assets by device ID +*DeprecatedApi* | [**getDeltaSync**](doc//DeprecatedApi.md#getdeltasync) | **POST** /sync/delta-sync | Get delta sync for user +*DeprecatedApi* | [**getFullSyncForUser**](doc//DeprecatedApi.md#getfullsyncforuser) | **POST** /sync/full-sync | Get full sync for user +*DeprecatedApi* | [**getRandom**](doc//DeprecatedApi.md#getrandom) | **GET** /assets/random | Get random assets +*DeprecatedApi* | [**replaceAsset**](doc//DeprecatedApi.md#replaceasset) | **PUT** /assets/{id}/original | Replace asset +*DownloadApi* | [**downloadArchive**](doc//DownloadApi.md#downloadarchive) | **POST** /download/archive | Download asset archive +*DownloadApi* | [**getDownloadInfo**](doc//DownloadApi.md#getdownloadinfo) | **POST** /download/info | Retrieve download information +*DuplicatesApi* | [**deleteDuplicate**](doc//DuplicatesApi.md#deleteduplicate) | **DELETE** /duplicates/{id} | Delete a duplicate +*DuplicatesApi* | [**deleteDuplicates**](doc//DuplicatesApi.md#deleteduplicates) | **DELETE** /duplicates | Delete duplicates +*DuplicatesApi* | [**getAssetDuplicates**](doc//DuplicatesApi.md#getassetduplicates) | **GET** /duplicates | Retrieve duplicates +*FacesApi* | [**createFace**](doc//FacesApi.md#createface) | **POST** /faces | Create a face +*FacesApi* | [**deleteFace**](doc//FacesApi.md#deleteface) | **DELETE** /faces/{id} | Delete a face +*FacesApi* | [**getFaces**](doc//FacesApi.md#getfaces) | **GET** /faces | Retrieve faces for asset +*FacesApi* | [**reassignFacesById**](doc//FacesApi.md#reassignfacesbyid) | **PUT** /faces/{id} | Re-assign a face to another person +*JobsApi* | [**createJob**](doc//JobsApi.md#createjob) | **POST** /jobs | Create a manual job +*JobsApi* | [**getAllJobsStatus**](doc//JobsApi.md#getalljobsstatus) | **GET** /jobs | Retrieve queue counts and status +*JobsApi* | [**sendJobCommand**](doc//JobsApi.md#sendjobcommand) | **PUT** /jobs/{id} | Run jobs +*LibrariesApi* | [**createLibrary**](doc//LibrariesApi.md#createlibrary) | **POST** /libraries | Create a library +*LibrariesApi* | [**deleteLibrary**](doc//LibrariesApi.md#deletelibrary) | **DELETE** /libraries/{id} | Delete a library +*LibrariesApi* | [**getAllLibraries**](doc//LibrariesApi.md#getalllibraries) | **GET** /libraries | Retrieve libraries +*LibrariesApi* | [**getLibrary**](doc//LibrariesApi.md#getlibrary) | **GET** /libraries/{id} | Retrieve a library +*LibrariesApi* | [**getLibraryStatistics**](doc//LibrariesApi.md#getlibrarystatistics) | **GET** /libraries/{id}/statistics | Retrieve library statistics +*LibrariesApi* | [**scanLibrary**](doc//LibrariesApi.md#scanlibrary) | **POST** /libraries/{id}/scan | Scan a library +*LibrariesApi* | [**updateLibrary**](doc//LibrariesApi.md#updatelibrary) | **PUT** /libraries/{id} | Update a library +*LibrariesApi* | [**validate**](doc//LibrariesApi.md#validate) | **POST** /libraries/{id}/validate | Validate library settings +*MapApi* | [**getMapMarkers**](doc//MapApi.md#getmapmarkers) | **GET** /map/markers | Retrieve map markers +*MapApi* | [**reverseGeocode**](doc//MapApi.md#reversegeocode) | **GET** /map/reverse-geocode | Reverse geocode coordinates +*MemoriesApi* | [**addMemoryAssets**](doc//MemoriesApi.md#addmemoryassets) | **PUT** /memories/{id}/assets | Add assets to a memory +*MemoriesApi* | [**createMemory**](doc//MemoriesApi.md#creatememory) | **POST** /memories | Create a memory +*MemoriesApi* | [**deleteMemory**](doc//MemoriesApi.md#deletememory) | **DELETE** /memories/{id} | Delete a memory +*MemoriesApi* | [**getMemory**](doc//MemoriesApi.md#getmemory) | **GET** /memories/{id} | Retrieve a memory +*MemoriesApi* | [**memoriesStatistics**](doc//MemoriesApi.md#memoriesstatistics) | **GET** /memories/statistics | Retrieve memories statistics +*MemoriesApi* | [**removeMemoryAssets**](doc//MemoriesApi.md#removememoryassets) | **DELETE** /memories/{id}/assets | Remove assets from a memory +*MemoriesApi* | [**searchMemories**](doc//MemoriesApi.md#searchmemories) | **GET** /memories | Retrieve memories +*MemoriesApi* | [**updateMemory**](doc//MemoriesApi.md#updatememory) | **PUT** /memories/{id} | Update a memory +*NotificationsApi* | [**deleteNotification**](doc//NotificationsApi.md#deletenotification) | **DELETE** /notifications/{id} | Delete a notification +*NotificationsApi* | [**deleteNotifications**](doc//NotificationsApi.md#deletenotifications) | **DELETE** /notifications | Delete notifications +*NotificationsApi* | [**getNotification**](doc//NotificationsApi.md#getnotification) | **GET** /notifications/{id} | Get a notification +*NotificationsApi* | [**getNotifications**](doc//NotificationsApi.md#getnotifications) | **GET** /notifications | Retrieve notifications +*NotificationsApi* | [**updateNotification**](doc//NotificationsApi.md#updatenotification) | **PUT** /notifications/{id} | Update a notification +*NotificationsApi* | [**updateNotifications**](doc//NotificationsApi.md#updatenotifications) | **PUT** /notifications | Update notifications +*NotificationsAdminApi* | [**createNotification**](doc//NotificationsAdminApi.md#createnotification) | **POST** /admin/notifications | Create a notification +*NotificationsAdminApi* | [**getNotificationTemplateAdmin**](doc//NotificationsAdminApi.md#getnotificationtemplateadmin) | **POST** /admin/notifications/templates/{name} | Render email template +*NotificationsAdminApi* | [**sendTestEmailAdmin**](doc//NotificationsAdminApi.md#sendtestemailadmin) | **POST** /admin/notifications/test-email | Send test email +*PartnersApi* | [**createPartner**](doc//PartnersApi.md#createpartner) | **POST** /partners | Create a partner +*PartnersApi* | [**createPartnerDeprecated**](doc//PartnersApi.md#createpartnerdeprecated) | **POST** /partners/{id} | Create a partner +*PartnersApi* | [**getPartners**](doc//PartnersApi.md#getpartners) | **GET** /partners | Retrieve partners +*PartnersApi* | [**removePartner**](doc//PartnersApi.md#removepartner) | **DELETE** /partners/{id} | Remove a partner +*PartnersApi* | [**updatePartner**](doc//PartnersApi.md#updatepartner) | **PUT** /partners/{id} | Update a partner +*PeopleApi* | [**createPerson**](doc//PeopleApi.md#createperson) | **POST** /people | Create a person +*PeopleApi* | [**deletePeople**](doc//PeopleApi.md#deletepeople) | **DELETE** /people | Delete people +*PeopleApi* | [**deletePerson**](doc//PeopleApi.md#deleteperson) | **DELETE** /people/{id} | Delete person +*PeopleApi* | [**getAllPeople**](doc//PeopleApi.md#getallpeople) | **GET** /people | Get all people +*PeopleApi* | [**getPerson**](doc//PeopleApi.md#getperson) | **GET** /people/{id} | Get a person +*PeopleApi* | [**getPersonStatistics**](doc//PeopleApi.md#getpersonstatistics) | **GET** /people/{id}/statistics | Get person statistics +*PeopleApi* | [**getPersonThumbnail**](doc//PeopleApi.md#getpersonthumbnail) | **GET** /people/{id}/thumbnail | Get person thumbnail +*PeopleApi* | [**mergePerson**](doc//PeopleApi.md#mergeperson) | **POST** /people/{id}/merge | Merge people +*PeopleApi* | [**reassignFaces**](doc//PeopleApi.md#reassignfaces) | **PUT** /people/{id}/reassign | Reassign faces +*PeopleApi* | [**updatePeople**](doc//PeopleApi.md#updatepeople) | **PUT** /people | Update people +*PeopleApi* | [**updatePerson**](doc//PeopleApi.md#updateperson) | **PUT** /people/{id} | Update person +*SearchApi* | [**getAssetsByCity**](doc//SearchApi.md#getassetsbycity) | **GET** /search/cities | Retrieve assets by city +*SearchApi* | [**getExploreData**](doc//SearchApi.md#getexploredata) | **GET** /search/explore | Retrieve explore data +*SearchApi* | [**getSearchSuggestions**](doc//SearchApi.md#getsearchsuggestions) | **GET** /search/suggestions | Retrieve search suggestions +*SearchApi* | [**searchAssetStatistics**](doc//SearchApi.md#searchassetstatistics) | **POST** /search/statistics | Search asset statistics +*SearchApi* | [**searchAssets**](doc//SearchApi.md#searchassets) | **POST** /search/metadata | Search assets by metadata +*SearchApi* | [**searchLargeAssets**](doc//SearchApi.md#searchlargeassets) | **POST** /search/large-assets | Search large assets +*SearchApi* | [**searchPerson**](doc//SearchApi.md#searchperson) | **GET** /search/person | Search people +*SearchApi* | [**searchPlaces**](doc//SearchApi.md#searchplaces) | **GET** /search/places | Search places +*SearchApi* | [**searchRandom**](doc//SearchApi.md#searchrandom) | **POST** /search/random | Search random assets +*SearchApi* | [**searchSmart**](doc//SearchApi.md#searchsmart) | **POST** /search/smart | Smart asset search +*ServerApi* | [**deleteServerLicense**](doc//ServerApi.md#deleteserverlicense) | **DELETE** /server/license | Delete server product key +*ServerApi* | [**getAboutInfo**](doc//ServerApi.md#getaboutinfo) | **GET** /server/about | Get server information +*ServerApi* | [**getApkLinks**](doc//ServerApi.md#getapklinks) | **GET** /server/apk-links | Get APK links +*ServerApi* | [**getServerConfig**](doc//ServerApi.md#getserverconfig) | **GET** /server/config | Get config +*ServerApi* | [**getServerFeatures**](doc//ServerApi.md#getserverfeatures) | **GET** /server/features | Get features +*ServerApi* | [**getServerLicense**](doc//ServerApi.md#getserverlicense) | **GET** /server/license | Get product key +*ServerApi* | [**getServerStatistics**](doc//ServerApi.md#getserverstatistics) | **GET** /server/statistics | Get statistics +*ServerApi* | [**getServerVersion**](doc//ServerApi.md#getserverversion) | **GET** /server/version | Get server version +*ServerApi* | [**getStorage**](doc//ServerApi.md#getstorage) | **GET** /server/storage | Get storage +*ServerApi* | [**getSupportedMediaTypes**](doc//ServerApi.md#getsupportedmediatypes) | **GET** /server/media-types | Get supported media types +*ServerApi* | [**getTheme**](doc//ServerApi.md#gettheme) | **GET** /server/theme | Get theme +*ServerApi* | [**getVersionCheck**](doc//ServerApi.md#getversioncheck) | **GET** /server/version-check | Get version check status +*ServerApi* | [**getVersionHistory**](doc//ServerApi.md#getversionhistory) | **GET** /server/version-history | Get version history +*ServerApi* | [**pingServer**](doc//ServerApi.md#pingserver) | **GET** /server/ping | Ping +*ServerApi* | [**setServerLicense**](doc//ServerApi.md#setserverlicense) | **PUT** /server/license | Set server product key +*SessionsApi* | [**createSession**](doc//SessionsApi.md#createsession) | **POST** /sessions | Create a session +*SessionsApi* | [**deleteAllSessions**](doc//SessionsApi.md#deleteallsessions) | **DELETE** /sessions | Delete all sessions +*SessionsApi* | [**deleteSession**](doc//SessionsApi.md#deletesession) | **DELETE** /sessions/{id} | Delete a session +*SessionsApi* | [**getSessions**](doc//SessionsApi.md#getsessions) | **GET** /sessions | Retrieve sessions +*SessionsApi* | [**lockSession**](doc//SessionsApi.md#locksession) | **POST** /sessions/{id}/lock | Lock a session +*SessionsApi* | [**updateSession**](doc//SessionsApi.md#updatesession) | **PUT** /sessions/{id} | Update a session +*SharedLinksApi* | [**addSharedLinkAssets**](doc//SharedLinksApi.md#addsharedlinkassets) | **PUT** /shared-links/{id}/assets | Add assets to a shared link +*SharedLinksApi* | [**createSharedLink**](doc//SharedLinksApi.md#createsharedlink) | **POST** /shared-links | Create a shared link +*SharedLinksApi* | [**getAllSharedLinks**](doc//SharedLinksApi.md#getallsharedlinks) | **GET** /shared-links | Retrieve all shared links +*SharedLinksApi* | [**getMySharedLink**](doc//SharedLinksApi.md#getmysharedlink) | **GET** /shared-links/me | Retrieve current shared link +*SharedLinksApi* | [**getSharedLinkById**](doc//SharedLinksApi.md#getsharedlinkbyid) | **GET** /shared-links/{id} | Retrieve a shared link +*SharedLinksApi* | [**removeSharedLink**](doc//SharedLinksApi.md#removesharedlink) | **DELETE** /shared-links/{id} | Delete a shared link +*SharedLinksApi* | [**removeSharedLinkAssets**](doc//SharedLinksApi.md#removesharedlinkassets) | **DELETE** /shared-links/{id}/assets | Remove assets from a shared link +*SharedLinksApi* | [**updateSharedLink**](doc//SharedLinksApi.md#updatesharedlink) | **PATCH** /shared-links/{id} | Update a shared link +*StacksApi* | [**createStack**](doc//StacksApi.md#createstack) | **POST** /stacks | Create a stack +*StacksApi* | [**deleteStack**](doc//StacksApi.md#deletestack) | **DELETE** /stacks/{id} | Delete a stack +*StacksApi* | [**deleteStacks**](doc//StacksApi.md#deletestacks) | **DELETE** /stacks | Delete stacks +*StacksApi* | [**getStack**](doc//StacksApi.md#getstack) | **GET** /stacks/{id} | Retrieve a stack +*StacksApi* | [**removeAssetFromStack**](doc//StacksApi.md#removeassetfromstack) | **DELETE** /stacks/{id}/assets/{assetId} | Remove an asset from a stack +*StacksApi* | [**searchStacks**](doc//StacksApi.md#searchstacks) | **GET** /stacks | Retrieve stacks +*StacksApi* | [**updateStack**](doc//StacksApi.md#updatestack) | **PUT** /stacks/{id} | Update a stack +*SyncApi* | [**deleteSyncAck**](doc//SyncApi.md#deletesyncack) | **DELETE** /sync/ack | Delete acknowledgements +*SyncApi* | [**getDeltaSync**](doc//SyncApi.md#getdeltasync) | **POST** /sync/delta-sync | Get delta sync for user +*SyncApi* | [**getFullSyncForUser**](doc//SyncApi.md#getfullsyncforuser) | **POST** /sync/full-sync | Get full sync for user +*SyncApi* | [**getSyncAck**](doc//SyncApi.md#getsyncack) | **GET** /sync/ack | Retrieve acknowledgements +*SyncApi* | [**getSyncStream**](doc//SyncApi.md#getsyncstream) | **POST** /sync/stream | Stream sync changes +*SyncApi* | [**sendSyncAck**](doc//SyncApi.md#sendsyncack) | **POST** /sync/ack | Acknowledge changes +*SystemConfigApi* | [**getConfig**](doc//SystemConfigApi.md#getconfig) | **GET** /system-config | Get system configuration +*SystemConfigApi* | [**getConfigDefaults**](doc//SystemConfigApi.md#getconfigdefaults) | **GET** /system-config/defaults | Get system configuration defaults +*SystemConfigApi* | [**getStorageTemplateOptions**](doc//SystemConfigApi.md#getstoragetemplateoptions) | **GET** /system-config/storage-template-options | Get storage template options +*SystemConfigApi* | [**updateConfig**](doc//SystemConfigApi.md#updateconfig) | **PUT** /system-config | Update system configuration +*SystemMetadataApi* | [**getAdminOnboarding**](doc//SystemMetadataApi.md#getadminonboarding) | **GET** /system-metadata/admin-onboarding | Retrieve admin onboarding +*SystemMetadataApi* | [**getReverseGeocodingState**](doc//SystemMetadataApi.md#getreversegeocodingstate) | **GET** /system-metadata/reverse-geocoding-state | Retrieve reverse geocoding state +*SystemMetadataApi* | [**getVersionCheckState**](doc//SystemMetadataApi.md#getversioncheckstate) | **GET** /system-metadata/version-check-state | Retrieve version check state +*SystemMetadataApi* | [**updateAdminOnboarding**](doc//SystemMetadataApi.md#updateadminonboarding) | **POST** /system-metadata/admin-onboarding | Update admin onboarding +*TagsApi* | [**bulkTagAssets**](doc//TagsApi.md#bulktagassets) | **PUT** /tags/assets | Tag assets +*TagsApi* | [**createTag**](doc//TagsApi.md#createtag) | **POST** /tags | Create a tag +*TagsApi* | [**deleteTag**](doc//TagsApi.md#deletetag) | **DELETE** /tags/{id} | Delete a tag +*TagsApi* | [**getAllTags**](doc//TagsApi.md#getalltags) | **GET** /tags | Retrieve tags +*TagsApi* | [**getTagById**](doc//TagsApi.md#gettagbyid) | **GET** /tags/{id} | Retrieve a tag +*TagsApi* | [**tagAssets**](doc//TagsApi.md#tagassets) | **PUT** /tags/{id}/assets | Tag assets +*TagsApi* | [**untagAssets**](doc//TagsApi.md#untagassets) | **DELETE** /tags/{id}/assets | Untag assets +*TagsApi* | [**updateTag**](doc//TagsApi.md#updatetag) | **PUT** /tags/{id} | Update a tag +*TagsApi* | [**upsertTags**](doc//TagsApi.md#upserttags) | **PUT** /tags | Upsert tags +*TimelineApi* | [**getTimeBucket**](doc//TimelineApi.md#gettimebucket) | **GET** /timeline/bucket | Get time bucket +*TimelineApi* | [**getTimeBuckets**](doc//TimelineApi.md#gettimebuckets) | **GET** /timeline/buckets | Get time buckets +*TrashApi* | [**emptyTrash**](doc//TrashApi.md#emptytrash) | **POST** /trash/empty | Empty trash +*TrashApi* | [**restoreAssets**](doc//TrashApi.md#restoreassets) | **POST** /trash/restore/assets | Restore assets +*TrashApi* | [**restoreTrash**](doc//TrashApi.md#restoretrash) | **POST** /trash/restore | Restore trash +*UsersApi* | [**createProfileImage**](doc//UsersApi.md#createprofileimage) | **POST** /users/profile-image | Create user profile image +*UsersApi* | [**deleteProfileImage**](doc//UsersApi.md#deleteprofileimage) | **DELETE** /users/profile-image | Delete user profile image +*UsersApi* | [**deleteUserLicense**](doc//UsersApi.md#deleteuserlicense) | **DELETE** /users/me/license | Delete user product key +*UsersApi* | [**deleteUserOnboarding**](doc//UsersApi.md#deleteuseronboarding) | **DELETE** /users/me/onboarding | Delete user onboarding +*UsersApi* | [**getMyPreferences**](doc//UsersApi.md#getmypreferences) | **GET** /users/me/preferences | Get my preferences +*UsersApi* | [**getMyUser**](doc//UsersApi.md#getmyuser) | **GET** /users/me | Get current user +*UsersApi* | [**getProfileImage**](doc//UsersApi.md#getprofileimage) | **GET** /users/{id}/profile-image | Retrieve user profile image +*UsersApi* | [**getUser**](doc//UsersApi.md#getuser) | **GET** /users/{id} | Retrieve a user +*UsersApi* | [**getUserLicense**](doc//UsersApi.md#getuserlicense) | **GET** /users/me/license | Retrieve user product key +*UsersApi* | [**getUserOnboarding**](doc//UsersApi.md#getuseronboarding) | **GET** /users/me/onboarding | Retrieve user onboarding +*UsersApi* | [**searchUsers**](doc//UsersApi.md#searchusers) | **GET** /users | Get all users +*UsersApi* | [**setUserLicense**](doc//UsersApi.md#setuserlicense) | **PUT** /users/me/license | Set user product key +*UsersApi* | [**setUserOnboarding**](doc//UsersApi.md#setuseronboarding) | **PUT** /users/me/onboarding | Update user onboarding +*UsersApi* | [**updateMyPreferences**](doc//UsersApi.md#updatemypreferences) | **PUT** /users/me/preferences | Update my preferences +*UsersApi* | [**updateMyUser**](doc//UsersApi.md#updatemyuser) | **PUT** /users/me | Update current user +*UsersAdminApi* | [**createUserAdmin**](doc//UsersAdminApi.md#createuseradmin) | **POST** /admin/users | Create a user +*UsersAdminApi* | [**deleteUserAdmin**](doc//UsersAdminApi.md#deleteuseradmin) | **DELETE** /admin/users/{id} | Delete a user +*UsersAdminApi* | [**getUserAdmin**](doc//UsersAdminApi.md#getuseradmin) | **GET** /admin/users/{id} | Retrieve a user +*UsersAdminApi* | [**getUserPreferencesAdmin**](doc//UsersAdminApi.md#getuserpreferencesadmin) | **GET** /admin/users/{id}/preferences | Retrieve user preferences +*UsersAdminApi* | [**getUserSessionsAdmin**](doc//UsersAdminApi.md#getusersessionsadmin) | **GET** /admin/users/{id}/sessions | Retrieve user sessions +*UsersAdminApi* | [**getUserStatisticsAdmin**](doc//UsersAdminApi.md#getuserstatisticsadmin) | **GET** /admin/users/{id}/statistics | Retrieve user statistics +*UsersAdminApi* | [**restoreUserAdmin**](doc//UsersAdminApi.md#restoreuseradmin) | **POST** /admin/users/{id}/restore | Restore a deleted user +*UsersAdminApi* | [**searchUsersAdmin**](doc//UsersAdminApi.md#searchusersadmin) | **GET** /admin/users | Search users +*UsersAdminApi* | [**updateUserAdmin**](doc//UsersAdminApi.md#updateuseradmin) | **PUT** /admin/users/{id} | Update a user +*UsersAdminApi* | [**updateUserPreferencesAdmin**](doc//UsersAdminApi.md#updateuserpreferencesadmin) | **PUT** /admin/users/{id}/preferences | Update user preferences +*ViewsApi* | [**getAssetsByOriginalPath**](doc//ViewsApi.md#getassetsbyoriginalpath) | **GET** /view/folder | Retrieve assets by original path +*ViewsApi* | [**getUniqueOriginalPaths**](doc//ViewsApi.md#getuniqueoriginalpaths) | **GET** /view/folder/unique-paths | Retrieve unique paths ## Documentation For Models diff --git a/mobile/openapi/lib/api.dart b/mobile/openapi/lib/api.dart index a4b58763c1..d0ac141bae 100644 --- a/mobile/openapi/lib/api.dart +++ b/mobile/openapi/lib/api.dart @@ -34,8 +34,8 @@ part 'api/api_keys_api.dart'; part 'api/activities_api.dart'; part 'api/albums_api.dart'; part 'api/assets_api.dart'; -part 'api/auth_admin_api.dart'; part 'api/authentication_api.dart'; +part 'api/authentication_admin_api.dart'; part 'api/deprecated_api.dart'; part 'api/download_api.dart'; part 'api/duplicates_api.dart'; @@ -46,7 +46,6 @@ part 'api/map_api.dart'; part 'api/memories_api.dart'; part 'api/notifications_api.dart'; part 'api/notifications_admin_api.dart'; -part 'api/o_auth_api.dart'; part 'api/partners_api.dart'; part 'api/people_api.dart'; part 'api/search_api.dart'; @@ -62,7 +61,7 @@ part 'api/timeline_api.dart'; part 'api/trash_api.dart'; part 'api/users_api.dart'; part 'api/users_admin_api.dart'; -part 'api/view_api.dart'; +part 'api/views_api.dart'; part 'model/api_key_create_dto.dart'; part 'model/api_key_create_response_dto.dart'; diff --git a/mobile/openapi/lib/api/activities_api.dart b/mobile/openapi/lib/api/activities_api.dart index 67015499fa..b92f95be72 100644 --- a/mobile/openapi/lib/api/activities_api.dart +++ b/mobile/openapi/lib/api/activities_api.dart @@ -16,7 +16,9 @@ class ActivitiesApi { final ApiClient apiClient; - /// This endpoint requires the `activity.create` permission. + /// Create an activity + /// + /// Create a like or a comment for an album, or an asset in an album. /// /// Note: This method returns the HTTP [Response]. /// @@ -48,7 +50,9 @@ class ActivitiesApi { ); } - /// This endpoint requires the `activity.create` permission. + /// Create an activity + /// + /// Create a like or a comment for an album, or an asset in an album. /// /// Parameters: /// @@ -68,7 +72,9 @@ class ActivitiesApi { return null; } - /// This endpoint requires the `activity.delete` permission. + /// Delete an activity + /// + /// Removes a like or comment from a given album or asset in an album. /// /// Note: This method returns the HTTP [Response]. /// @@ -101,7 +107,9 @@ class ActivitiesApi { ); } - /// This endpoint requires the `activity.delete` permission. + /// Delete an activity + /// + /// Removes a like or comment from a given album or asset in an album. /// /// Parameters: /// @@ -113,7 +121,9 @@ class ActivitiesApi { } } - /// This endpoint requires the `activity.read` permission. + /// List all activities + /// + /// Returns a list of activities for the selected asset or album. The activities are returned in sorted order, with the oldest activities appearing first. /// /// Note: This method returns the HTTP [Response]. /// @@ -167,7 +177,9 @@ class ActivitiesApi { ); } - /// This endpoint requires the `activity.read` permission. + /// List all activities + /// + /// Returns a list of activities for the selected asset or album. The activities are returned in sorted order, with the oldest activities appearing first. /// /// Parameters: /// @@ -198,7 +210,9 @@ class ActivitiesApi { return null; } - /// This endpoint requires the `activity.statistics` permission. + /// Retrieve activity statistics + /// + /// Returns the number of likes and comments for a given album or asset in an album. /// /// Note: This method returns the HTTP [Response]. /// @@ -237,7 +251,9 @@ class ActivitiesApi { ); } - /// This endpoint requires the `activity.statistics` permission. + /// Retrieve activity statistics + /// + /// Returns the number of likes and comments for a given album or asset in an album. /// /// Parameters: /// diff --git a/mobile/openapi/lib/api/albums_api.dart b/mobile/openapi/lib/api/albums_api.dart index a45083669c..1042a2850f 100644 --- a/mobile/openapi/lib/api/albums_api.dart +++ b/mobile/openapi/lib/api/albums_api.dart @@ -16,7 +16,9 @@ class AlbumsApi { final ApiClient apiClient; - /// This endpoint requires the `albumAsset.create` permission. + /// Add assets to an album + /// + /// Add multiple assets to a specific album by its ID. /// /// Note: This method returns the HTTP [Response]. /// @@ -62,7 +64,9 @@ class AlbumsApi { ); } - /// This endpoint requires the `albumAsset.create` permission. + /// Add assets to an album + /// + /// Add multiple assets to a specific album by its ID. /// /// Parameters: /// @@ -91,7 +95,9 @@ class AlbumsApi { return null; } - /// This endpoint requires the `albumAsset.create` permission. + /// Add assets to albums + /// + /// Send a list of asset IDs and album IDs to add each asset to each album. /// /// Note: This method returns the HTTP [Response]. /// @@ -134,7 +140,9 @@ class AlbumsApi { ); } - /// This endpoint requires the `albumAsset.create` permission. + /// Add assets to albums + /// + /// Send a list of asset IDs and album IDs to add each asset to each album. /// /// Parameters: /// @@ -158,7 +166,9 @@ class AlbumsApi { return null; } - /// This endpoint requires the `albumUser.create` permission. + /// Share album with users + /// + /// Share an album with multiple users. Each user can be given a specific role in the album. /// /// Note: This method returns the HTTP [Response]. /// @@ -193,7 +203,9 @@ class AlbumsApi { ); } - /// This endpoint requires the `albumUser.create` permission. + /// Share album with users + /// + /// Share an album with multiple users. Each user can be given a specific role in the album. /// /// Parameters: /// @@ -215,7 +227,9 @@ class AlbumsApi { return null; } - /// This endpoint requires the `album.create` permission. + /// Create an album + /// + /// Create a new album. The album can also be created with initial users and assets. /// /// Note: This method returns the HTTP [Response]. /// @@ -247,7 +261,9 @@ class AlbumsApi { ); } - /// This endpoint requires the `album.create` permission. + /// Create an album + /// + /// Create a new album. The album can also be created with initial users and assets. /// /// Parameters: /// @@ -267,7 +283,9 @@ class AlbumsApi { return null; } - /// This endpoint requires the `album.delete` permission. + /// Delete an album + /// + /// Delete a specific album by its ID. Note the album is initially trashed and then immediately scheduled for deletion, but relies on a background job to complete the process. /// /// Note: This method returns the HTTP [Response]. /// @@ -300,7 +318,9 @@ class AlbumsApi { ); } - /// This endpoint requires the `album.delete` permission. + /// Delete an album + /// + /// Delete a specific album by its ID. Note the album is initially trashed and then immediately scheduled for deletion, but relies on a background job to complete the process. /// /// Parameters: /// @@ -312,7 +332,9 @@ class AlbumsApi { } } - /// This endpoint requires the `album.read` permission. + /// Retrieve an album + /// + /// Retrieve information about a specific album by its ID. /// /// Note: This method returns the HTTP [Response]. /// @@ -361,7 +383,9 @@ class AlbumsApi { ); } - /// This endpoint requires the `album.read` permission. + /// Retrieve an album + /// + /// Retrieve information about a specific album by its ID. /// /// Parameters: /// @@ -387,7 +411,9 @@ class AlbumsApi { return null; } - /// This endpoint requires the `album.statistics` permission. + /// Retrieve album statistics + /// + /// Returns statistics about the albums available to the authenticated user. /// /// Note: This method returns the HTTP [Response]. Future getAlbumStatisticsWithHttpInfo() async { @@ -415,7 +441,9 @@ class AlbumsApi { ); } - /// This endpoint requires the `album.statistics` permission. + /// Retrieve album statistics + /// + /// Returns statistics about the albums available to the authenticated user. Future getAlbumStatistics() async { final response = await getAlbumStatisticsWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -431,7 +459,9 @@ class AlbumsApi { return null; } - /// This endpoint requires the `album.read` permission. + /// List all albums + /// + /// Retrieve a list of albums available to the authenticated user. /// /// Note: This method returns the HTTP [Response]. /// @@ -473,7 +503,9 @@ class AlbumsApi { ); } - /// This endpoint requires the `album.read` permission. + /// List all albums + /// + /// Retrieve a list of albums available to the authenticated user. /// /// Parameters: /// @@ -499,7 +531,9 @@ class AlbumsApi { return null; } - /// This endpoint requires the `albumAsset.delete` permission. + /// Remove assets from an album + /// + /// Remove multiple assets from a specific album by its ID. /// /// Note: This method returns the HTTP [Response]. /// @@ -534,7 +568,9 @@ class AlbumsApi { ); } - /// This endpoint requires the `albumAsset.delete` permission. + /// Remove assets from an album + /// + /// Remove multiple assets from a specific album by its ID. /// /// Parameters: /// @@ -559,7 +595,9 @@ class AlbumsApi { return null; } - /// This endpoint requires the `albumUser.delete` permission. + /// Remove user from album + /// + /// Remove a user from an album. Use an ID of \"me\" to leave a shared album. /// /// Note: This method returns the HTTP [Response]. /// @@ -595,7 +633,9 @@ class AlbumsApi { ); } - /// This endpoint requires the `albumUser.delete` permission. + /// Remove user from album + /// + /// Remove a user from an album. Use an ID of \"me\" to leave a shared album. /// /// Parameters: /// @@ -609,7 +649,9 @@ class AlbumsApi { } } - /// This endpoint requires the `album.update` permission. + /// Update an album + /// + /// Update the information of a specific album by its ID. This endpoint can be used to update the album name, description, sort order, etc. However, it is not used to add or remove assets or users from the album. /// /// Note: This method returns the HTTP [Response]. /// @@ -644,7 +686,9 @@ class AlbumsApi { ); } - /// This endpoint requires the `album.update` permission. + /// Update an album + /// + /// Update the information of a specific album by its ID. This endpoint can be used to update the album name, description, sort order, etc. However, it is not used to add or remove assets or users from the album. /// /// Parameters: /// @@ -666,7 +710,9 @@ class AlbumsApi { return null; } - /// This endpoint requires the `albumUser.update` permission. + /// Update user role + /// + /// Change the role for a specific user in a specific album. /// /// Note: This method returns the HTTP [Response]. /// @@ -704,7 +750,9 @@ class AlbumsApi { ); } - /// This endpoint requires the `albumUser.update` permission. + /// Update user role + /// + /// Change the role for a specific user in a specific album. /// /// Parameters: /// diff --git a/mobile/openapi/lib/api/api_keys_api.dart b/mobile/openapi/lib/api/api_keys_api.dart index 3ac829c30c..0bd26575c6 100644 --- a/mobile/openapi/lib/api/api_keys_api.dart +++ b/mobile/openapi/lib/api/api_keys_api.dart @@ -16,7 +16,9 @@ class APIKeysApi { final ApiClient apiClient; - /// This endpoint requires the `apiKey.create` permission. + /// Create an API key + /// + /// Creates a new API key. It will be limited to the permissions specified. /// /// Note: This method returns the HTTP [Response]. /// @@ -48,7 +50,9 @@ class APIKeysApi { ); } - /// This endpoint requires the `apiKey.create` permission. + /// Create an API key + /// + /// Creates a new API key. It will be limited to the permissions specified. /// /// Parameters: /// @@ -68,7 +72,9 @@ class APIKeysApi { return null; } - /// This endpoint requires the `apiKey.delete` permission. + /// Delete an API key + /// + /// Deletes an API key identified by its ID. The current user must own this API key. /// /// Note: This method returns the HTTP [Response]. /// @@ -101,7 +107,9 @@ class APIKeysApi { ); } - /// This endpoint requires the `apiKey.delete` permission. + /// Delete an API key + /// + /// Deletes an API key identified by its ID. The current user must own this API key. /// /// Parameters: /// @@ -113,7 +121,9 @@ class APIKeysApi { } } - /// This endpoint requires the `apiKey.read` permission. + /// Retrieve an API key + /// + /// Retrieve an API key by its ID. The current user must own this API key. /// /// Note: This method returns the HTTP [Response]. /// @@ -146,7 +156,9 @@ class APIKeysApi { ); } - /// This endpoint requires the `apiKey.read` permission. + /// Retrieve an API key + /// + /// Retrieve an API key by its ID. The current user must own this API key. /// /// Parameters: /// @@ -166,7 +178,9 @@ class APIKeysApi { return null; } - /// This endpoint requires the `apiKey.read` permission. + /// List all API keys + /// + /// Retrieve all API keys of the current user. /// /// Note: This method returns the HTTP [Response]. Future getApiKeysWithHttpInfo() async { @@ -194,7 +208,9 @@ class APIKeysApi { ); } - /// This endpoint requires the `apiKey.read` permission. + /// List all API keys + /// + /// Retrieve all API keys of the current user. Future?> getApiKeys() async { final response = await getApiKeysWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -213,7 +229,11 @@ class APIKeysApi { return null; } - /// Performs an HTTP 'GET /api-keys/me' operation and returns the [Response]. + /// Retrieve the current API key + /// + /// Retrieve the API key that is used to access this endpoint. + /// + /// Note: This method returns the HTTP [Response]. Future getMyApiKeyWithHttpInfo() async { // ignore: prefer_const_declarations final apiPath = r'/api-keys/me'; @@ -239,6 +259,9 @@ class APIKeysApi { ); } + /// Retrieve the current API key + /// + /// Retrieve the API key that is used to access this endpoint. Future getMyApiKey() async { final response = await getMyApiKeyWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -254,7 +277,9 @@ class APIKeysApi { return null; } - /// This endpoint requires the `apiKey.update` permission. + /// Update an API key + /// + /// Updates the name and permissions of an API key by its ID. The current user must own this API key. /// /// Note: This method returns the HTTP [Response]. /// @@ -289,7 +314,9 @@ class APIKeysApi { ); } - /// This endpoint requires the `apiKey.update` permission. + /// Update an API key + /// + /// Updates the name and permissions of an API key by its ID. The current user must own this API key. /// /// Parameters: /// diff --git a/mobile/openapi/lib/api/assets_api.dart b/mobile/openapi/lib/api/assets_api.dart index 7bae14bb58..fdb171bedc 100644 --- a/mobile/openapi/lib/api/assets_api.dart +++ b/mobile/openapi/lib/api/assets_api.dart @@ -16,9 +16,9 @@ class AssetsApi { final ApiClient apiClient; - /// checkBulkUpload + /// Check bulk upload /// - /// Checks if assets exist by checksums. This endpoint requires the `asset.upload` permission. + /// Determine which assets have already been uploaded to the server based on their SHA1 checksums. /// /// Note: This method returns the HTTP [Response]. /// @@ -50,9 +50,9 @@ class AssetsApi { ); } - /// checkBulkUpload + /// Check bulk upload /// - /// Checks if assets exist by checksums. This endpoint requires the `asset.upload` permission. + /// Determine which assets have already been uploaded to the server based on their SHA1 checksums. /// /// Parameters: /// @@ -72,7 +72,7 @@ class AssetsApi { return null; } - /// checkExistingAssets + /// Check existing assets /// /// Checks if multiple assets exist on the server and returns all existing - used by background backup /// @@ -106,7 +106,7 @@ class AssetsApi { ); } - /// checkExistingAssets + /// Check existing assets /// /// Checks if multiple assets exist on the server and returns all existing - used by background backup /// @@ -128,7 +128,9 @@ class AssetsApi { return null; } - /// This endpoint requires the `asset.copy` permission. + /// Copy asset + /// + /// Copy asset information like albums, tags, etc. from one asset to another. /// /// Note: This method returns the HTTP [Response]. /// @@ -160,7 +162,9 @@ class AssetsApi { ); } - /// This endpoint requires the `asset.copy` permission. + /// Copy asset + /// + /// Copy asset information like albums, tags, etc. from one asset to another. /// /// Parameters: /// @@ -172,7 +176,9 @@ class AssetsApi { } } - /// This endpoint requires the `asset.update` permission. + /// Delete asset metadata by key + /// + /// Delete a specific metadata key-value pair associated with the specified asset. /// /// Note: This method returns the HTTP [Response]. /// @@ -208,7 +214,9 @@ class AssetsApi { ); } - /// This endpoint requires the `asset.update` permission. + /// Delete asset metadata by key + /// + /// Delete a specific metadata key-value pair associated with the specified asset. /// /// Parameters: /// @@ -222,7 +230,9 @@ class AssetsApi { } } - /// This endpoint requires the `asset.delete` permission. + /// Delete assets + /// + /// Deletes multiple assets at the same time. /// /// Note: This method returns the HTTP [Response]. /// @@ -254,7 +264,9 @@ class AssetsApi { ); } - /// This endpoint requires the `asset.delete` permission. + /// Delete assets + /// + /// Deletes multiple assets at the same time. /// /// Parameters: /// @@ -266,7 +278,9 @@ class AssetsApi { } } - /// This endpoint requires the `asset.download` permission. + /// Download original asset + /// + /// Downloads the original file of the specified asset. /// /// Note: This method returns the HTTP [Response]. /// @@ -310,7 +324,9 @@ class AssetsApi { ); } - /// This endpoint requires the `asset.download` permission. + /// Download original asset + /// + /// Downloads the original file of the specified asset. /// /// Parameters: /// @@ -334,9 +350,9 @@ class AssetsApi { return null; } - /// getAllUserAssetsByDeviceId + /// Retrieve assets by device ID /// - /// Get all asset of a device that are in the database, ID only. + /// This property was deprecated in v2.0.0. Get all asset of a device that are in the database, ID only. /// /// Note: This method returns the HTTP [Response]. /// @@ -369,9 +385,9 @@ class AssetsApi { ); } - /// getAllUserAssetsByDeviceId + /// Retrieve assets by device ID /// - /// Get all asset of a device that are in the database, ID only. + /// This property was deprecated in v2.0.0. Get all asset of a device that are in the database, ID only. /// /// Parameters: /// @@ -394,7 +410,9 @@ class AssetsApi { return null; } - /// This endpoint requires the `asset.read` permission. + /// Retrieve an asset + /// + /// Retrieve detailed information about a specific asset. /// /// Note: This method returns the HTTP [Response]. /// @@ -438,7 +456,9 @@ class AssetsApi { ); } - /// This endpoint requires the `asset.read` permission. + /// Retrieve an asset + /// + /// Retrieve detailed information about a specific asset. /// /// Parameters: /// @@ -462,7 +482,9 @@ class AssetsApi { return null; } - /// This endpoint requires the `asset.read` permission. + /// Get asset metadata + /// + /// Retrieve all metadata key-value pairs associated with the specified asset. /// /// Note: This method returns the HTTP [Response]. /// @@ -495,7 +517,9 @@ class AssetsApi { ); } - /// This endpoint requires the `asset.read` permission. + /// Get asset metadata + /// + /// Retrieve all metadata key-value pairs associated with the specified asset. /// /// Parameters: /// @@ -518,7 +542,9 @@ class AssetsApi { return null; } - /// This endpoint requires the `asset.read` permission. + /// Retrieve asset metadata by key + /// + /// Retrieve the value of a specific metadata key associated with the specified asset. /// /// Note: This method returns the HTTP [Response]. /// @@ -554,7 +580,9 @@ class AssetsApi { ); } - /// This endpoint requires the `asset.read` permission. + /// Retrieve asset metadata by key + /// + /// Retrieve the value of a specific metadata key associated with the specified asset. /// /// Parameters: /// @@ -576,7 +604,9 @@ class AssetsApi { return null; } - /// This endpoint requires the `asset.read` permission. + /// Retrieve asset OCR data + /// + /// Retrieve all OCR (Optical Character Recognition) data associated with the specified asset. /// /// Note: This method returns the HTTP [Response]. /// @@ -609,7 +639,9 @@ class AssetsApi { ); } - /// This endpoint requires the `asset.read` permission. + /// Retrieve asset OCR data + /// + /// Retrieve all OCR (Optical Character Recognition) data associated with the specified asset. /// /// Parameters: /// @@ -632,7 +664,9 @@ class AssetsApi { return null; } - /// This endpoint requires the `asset.statistics` permission. + /// Get asset statistics + /// + /// Retrieve various statistics about the assets owned by the authenticated user. /// /// Note: This method returns the HTTP [Response]. /// @@ -678,7 +712,9 @@ class AssetsApi { ); } - /// This endpoint requires the `asset.statistics` permission. + /// Get asset statistics + /// + /// Retrieve various statistics about the assets owned by the authenticated user. /// /// Parameters: /// @@ -702,7 +738,9 @@ class AssetsApi { return null; } - /// This property was deprecated in v1.116.0. This endpoint requires the `asset.read` permission. + /// Get random assets + /// + /// This property was deprecated in v1.116.0. Retrieve a specified number of random assets for the authenticated user. /// /// Note: This method returns the HTTP [Response]. /// @@ -738,7 +776,9 @@ class AssetsApi { ); } - /// This property was deprecated in v1.116.0. This endpoint requires the `asset.read` permission. + /// Get random assets + /// + /// This property was deprecated in v1.116.0. Retrieve a specified number of random assets for the authenticated user. /// /// Parameters: /// @@ -761,7 +801,9 @@ class AssetsApi { return null; } - /// This endpoint requires the `asset.view` permission. + /// Play asset video + /// + /// Streams the video file for the specified asset. This endpoint also supports byte range requests. /// /// Note: This method returns the HTTP [Response]. /// @@ -805,7 +847,9 @@ class AssetsApi { ); } - /// This endpoint requires the `asset.view` permission. + /// Play asset video + /// + /// Streams the video file for the specified asset. This endpoint also supports byte range requests. /// /// Parameters: /// @@ -829,9 +873,9 @@ class AssetsApi { return null; } - /// Replace the asset with new file, without changing its id + /// Replace asset /// - /// This property was deprecated in v1.142.0. Replace the asset with new file, without changing its id. This endpoint requires the `asset.replace` permission. + /// This property was deprecated in v1.142.0. Replace the asset with new file, without changing its id. /// /// Note: This method returns the HTTP [Response]. /// @@ -923,9 +967,9 @@ class AssetsApi { ); } - /// Replace the asset with new file, without changing its id + /// Replace asset /// - /// This property was deprecated in v1.142.0. Replace the asset with new file, without changing its id. This endpoint requires the `asset.replace` permission. + /// This property was deprecated in v1.142.0. Replace the asset with new file, without changing its id. /// /// Parameters: /// @@ -963,7 +1007,12 @@ class AssetsApi { return null; } - /// Performs an HTTP 'POST /assets/jobs' operation and returns the [Response]. + /// Run an asset job + /// + /// Run a specific job on a set of assets. + /// + /// Note: This method returns the HTTP [Response]. + /// /// Parameters: /// /// * [AssetJobsDto] assetJobsDto (required): @@ -992,6 +1041,10 @@ class AssetsApi { ); } + /// Run an asset job + /// + /// Run a specific job on a set of assets. + /// /// Parameters: /// /// * [AssetJobsDto] assetJobsDto (required): @@ -1002,7 +1055,9 @@ class AssetsApi { } } - /// This endpoint requires the `asset.update` permission. + /// Update an asset + /// + /// Update information of a specific asset. /// /// Note: This method returns the HTTP [Response]. /// @@ -1037,7 +1092,9 @@ class AssetsApi { ); } - /// This endpoint requires the `asset.update` permission. + /// Update an asset + /// + /// Update information of a specific asset. /// /// Parameters: /// @@ -1059,7 +1116,9 @@ class AssetsApi { return null; } - /// This endpoint requires the `asset.update` permission. + /// Update asset metadata + /// + /// Update or add metadata key-value pairs for the specified asset. /// /// Note: This method returns the HTTP [Response]. /// @@ -1094,7 +1153,9 @@ class AssetsApi { ); } - /// This endpoint requires the `asset.update` permission. + /// Update asset metadata + /// + /// Update or add metadata key-value pairs for the specified asset. /// /// Parameters: /// @@ -1119,7 +1180,9 @@ class AssetsApi { return null; } - /// This endpoint requires the `asset.update` permission. + /// Update assets + /// + /// Updates multiple assets at the same time. /// /// Note: This method returns the HTTP [Response]. /// @@ -1151,7 +1214,9 @@ class AssetsApi { ); } - /// This endpoint requires the `asset.update` permission. + /// Update assets + /// + /// Updates multiple assets at the same time. /// /// Parameters: /// @@ -1163,7 +1228,9 @@ class AssetsApi { } } - /// This endpoint requires the `asset.upload` permission. + /// Upload asset + /// + /// Uploads a new asset to the server. /// /// Note: This method returns the HTTP [Response]. /// @@ -1290,7 +1357,9 @@ class AssetsApi { ); } - /// This endpoint requires the `asset.upload` permission. + /// Upload asset + /// + /// Uploads a new asset to the server. /// /// Parameters: /// @@ -1339,7 +1408,9 @@ class AssetsApi { return null; } - /// This endpoint requires the `asset.view` permission. + /// View asset thumbnail + /// + /// Retrieve the thumbnail image for the specified asset. /// /// Note: This method returns the HTTP [Response]. /// @@ -1388,7 +1459,9 @@ class AssetsApi { ); } - /// This endpoint requires the `asset.view` permission. + /// View asset thumbnail + /// + /// Retrieve the thumbnail image for the specified asset. /// /// Parameters: /// diff --git a/mobile/openapi/lib/api/auth_admin_api.dart b/mobile/openapi/lib/api/authentication_admin_api.dart similarity index 77% rename from mobile/openapi/lib/api/auth_admin_api.dart rename to mobile/openapi/lib/api/authentication_admin_api.dart index d22b449aab..0a4b91ebc3 100644 --- a/mobile/openapi/lib/api/auth_admin_api.dart +++ b/mobile/openapi/lib/api/authentication_admin_api.dart @@ -11,12 +11,14 @@ part of openapi.api; -class AuthAdminApi { - AuthAdminApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; +class AuthenticationAdminApi { + AuthenticationAdminApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; final ApiClient apiClient; - /// This endpoint is an admin-only route, and requires the `adminAuth.unlinkAll` permission. + /// Unlink all OAuth accounts + /// + /// Unlinks all OAuth accounts associated with user accounts in the system. /// /// Note: This method returns the HTTP [Response]. Future unlinkAllOAuthAccountsAdminWithHttpInfo() async { @@ -44,7 +46,9 @@ class AuthAdminApi { ); } - /// This endpoint is an admin-only route, and requires the `adminAuth.unlinkAll` permission. + /// Unlink all OAuth accounts + /// + /// Unlinks all OAuth accounts associated with user accounts in the system. Future unlinkAllOAuthAccountsAdmin() async { final response = await unlinkAllOAuthAccountsAdminWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { diff --git a/mobile/openapi/lib/api/authentication_api.dart b/mobile/openapi/lib/api/authentication_api.dart index a74af33a43..52d46a525b 100644 --- a/mobile/openapi/lib/api/authentication_api.dart +++ b/mobile/openapi/lib/api/authentication_api.dart @@ -16,7 +16,9 @@ class AuthenticationApi { final ApiClient apiClient; - /// This endpoint requires the `auth.changePassword` permission. + /// Change password + /// + /// Change the password of the current user. /// /// Note: This method returns the HTTP [Response]. /// @@ -48,7 +50,9 @@ class AuthenticationApi { ); } - /// This endpoint requires the `auth.changePassword` permission. + /// Change password + /// + /// Change the password of the current user. /// /// Parameters: /// @@ -68,7 +72,9 @@ class AuthenticationApi { return null; } - /// This endpoint requires the `pinCode.update` permission. + /// Change pin code + /// + /// Change the pin code for the current user. /// /// Note: This method returns the HTTP [Response]. /// @@ -100,7 +106,9 @@ class AuthenticationApi { ); } - /// This endpoint requires the `pinCode.update` permission. + /// Change pin code + /// + /// Change the pin code for the current user. /// /// Parameters: /// @@ -112,7 +120,67 @@ class AuthenticationApi { } } - /// Performs an HTTP 'GET /auth/status' operation and returns the [Response]. + /// Finish OAuth + /// + /// Complete the OAuth authorization process by exchanging the authorization code for a session token. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [OAuthCallbackDto] oAuthCallbackDto (required): + Future finishOAuthWithHttpInfo(OAuthCallbackDto oAuthCallbackDto,) async { + // ignore: prefer_const_declarations + final apiPath = r'/oauth/callback'; + + // ignore: prefer_final_locals + Object? postBody = oAuthCallbackDto; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + apiPath, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Finish OAuth + /// + /// Complete the OAuth authorization process by exchanging the authorization code for a session token. + /// + /// Parameters: + /// + /// * [OAuthCallbackDto] oAuthCallbackDto (required): + Future finishOAuth(OAuthCallbackDto oAuthCallbackDto,) async { + final response = await finishOAuthWithHttpInfo(oAuthCallbackDto,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'LoginResponseDto',) as LoginResponseDto; + + } + return null; + } + + /// Retrieve auth status + /// + /// Get information about the current session, including whether the user has a password, and if the session can access locked assets. + /// + /// Note: This method returns the HTTP [Response]. Future getAuthStatusWithHttpInfo() async { // ignore: prefer_const_declarations final apiPath = r'/auth/status'; @@ -138,6 +206,9 @@ class AuthenticationApi { ); } + /// Retrieve auth status + /// + /// Get information about the current session, including whether the user has a password, and if the session can access locked assets. Future getAuthStatus() async { final response = await getAuthStatusWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -153,7 +224,67 @@ class AuthenticationApi { return null; } - /// Performs an HTTP 'POST /auth/session/lock' operation and returns the [Response]. + /// Link OAuth account + /// + /// Link an OAuth account to the authenticated user. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [OAuthCallbackDto] oAuthCallbackDto (required): + Future linkOAuthAccountWithHttpInfo(OAuthCallbackDto oAuthCallbackDto,) async { + // ignore: prefer_const_declarations + final apiPath = r'/oauth/link'; + + // ignore: prefer_final_locals + Object? postBody = oAuthCallbackDto; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + apiPath, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Link OAuth account + /// + /// Link an OAuth account to the authenticated user. + /// + /// Parameters: + /// + /// * [OAuthCallbackDto] oAuthCallbackDto (required): + Future linkOAuthAccount(OAuthCallbackDto oAuthCallbackDto,) async { + final response = await linkOAuthAccountWithHttpInfo(oAuthCallbackDto,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserAdminResponseDto',) as UserAdminResponseDto; + + } + return null; + } + + /// Lock auth session + /// + /// Remove elevated access to locked assets from the current session. + /// + /// Note: This method returns the HTTP [Response]. Future lockAuthSessionWithHttpInfo() async { // ignore: prefer_const_declarations final apiPath = r'/auth/session/lock'; @@ -179,6 +310,9 @@ class AuthenticationApi { ); } + /// Lock auth session + /// + /// Remove elevated access to locked assets from the current session. Future lockAuthSession() async { final response = await lockAuthSessionWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -186,7 +320,12 @@ class AuthenticationApi { } } - /// Performs an HTTP 'POST /auth/login' operation and returns the [Response]. + /// Login + /// + /// Login with username and password and receive a session token. + /// + /// Note: This method returns the HTTP [Response]. + /// /// Parameters: /// /// * [LoginCredentialDto] loginCredentialDto (required): @@ -215,6 +354,10 @@ class AuthenticationApi { ); } + /// Login + /// + /// Login with username and password and receive a session token. + /// /// Parameters: /// /// * [LoginCredentialDto] loginCredentialDto (required): @@ -233,7 +376,11 @@ class AuthenticationApi { return null; } - /// Performs an HTTP 'POST /auth/logout' operation and returns the [Response]. + /// Logout + /// + /// Logout the current user and invalidate the session token. + /// + /// Note: This method returns the HTTP [Response]. Future logoutWithHttpInfo() async { // ignore: prefer_const_declarations final apiPath = r'/auth/logout'; @@ -259,6 +406,9 @@ class AuthenticationApi { ); } + /// Logout + /// + /// Logout the current user and invalidate the session token. Future logout() async { final response = await logoutWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -274,7 +424,49 @@ class AuthenticationApi { return null; } - /// This endpoint requires the `pinCode.delete` permission. + /// Redirect OAuth to mobile + /// + /// Requests to this URL are automatically forwarded to the mobile app, and is used in some cases for OAuth redirecting. + /// + /// Note: This method returns the HTTP [Response]. + Future redirectOAuthToMobileWithHttpInfo() async { + // ignore: prefer_const_declarations + final apiPath = r'/oauth/mobile-redirect'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + apiPath, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Redirect OAuth to mobile + /// + /// Requests to this URL are automatically forwarded to the mobile app, and is used in some cases for OAuth redirecting. + Future redirectOAuthToMobile() async { + final response = await redirectOAuthToMobileWithHttpInfo(); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// Reset pin code + /// + /// Reset the pin code for the current user by providing the account password /// /// Note: This method returns the HTTP [Response]. /// @@ -306,7 +498,9 @@ class AuthenticationApi { ); } - /// This endpoint requires the `pinCode.delete` permission. + /// Reset pin code + /// + /// Reset the pin code for the current user by providing the account password /// /// Parameters: /// @@ -318,7 +512,9 @@ class AuthenticationApi { } } - /// This endpoint requires the `pinCode.create` permission. + /// Setup pin code + /// + /// Setup a new pin code for the current user. /// /// Note: This method returns the HTTP [Response]. /// @@ -350,7 +546,9 @@ class AuthenticationApi { ); } - /// This endpoint requires the `pinCode.create` permission. + /// Setup pin code + /// + /// Setup a new pin code for the current user. /// /// Parameters: /// @@ -362,7 +560,12 @@ class AuthenticationApi { } } - /// Performs an HTTP 'POST /auth/admin-sign-up' operation and returns the [Response]. + /// Register admin + /// + /// Create the first admin user in the system. + /// + /// Note: This method returns the HTTP [Response]. + /// /// Parameters: /// /// * [SignUpDto] signUpDto (required): @@ -391,6 +594,10 @@ class AuthenticationApi { ); } + /// Register admin + /// + /// Create the first admin user in the system. + /// /// Parameters: /// /// * [SignUpDto] signUpDto (required): @@ -409,7 +616,116 @@ class AuthenticationApi { return null; } - /// Performs an HTTP 'POST /auth/session/unlock' operation and returns the [Response]. + /// Start OAuth + /// + /// Initiate the OAuth authorization process. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [OAuthConfigDto] oAuthConfigDto (required): + Future startOAuthWithHttpInfo(OAuthConfigDto oAuthConfigDto,) async { + // ignore: prefer_const_declarations + final apiPath = r'/oauth/authorize'; + + // ignore: prefer_final_locals + Object? postBody = oAuthConfigDto; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + apiPath, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Start OAuth + /// + /// Initiate the OAuth authorization process. + /// + /// Parameters: + /// + /// * [OAuthConfigDto] oAuthConfigDto (required): + Future startOAuth(OAuthConfigDto oAuthConfigDto,) async { + final response = await startOAuthWithHttpInfo(oAuthConfigDto,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'OAuthAuthorizeResponseDto',) as OAuthAuthorizeResponseDto; + + } + return null; + } + + /// Unlink OAuth account + /// + /// Unlink the OAuth account from the authenticated user. + /// + /// Note: This method returns the HTTP [Response]. + Future unlinkOAuthAccountWithHttpInfo() async { + // ignore: prefer_const_declarations + final apiPath = r'/oauth/unlink'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + apiPath, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Unlink OAuth account + /// + /// Unlink the OAuth account from the authenticated user. + Future unlinkOAuthAccount() async { + final response = await unlinkOAuthAccountWithHttpInfo(); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserAdminResponseDto',) as UserAdminResponseDto; + + } + return null; + } + + /// Unlock auth session + /// + /// Temporarily grant the session elevated access to locked assets by providing the correct PIN code. + /// + /// Note: This method returns the HTTP [Response]. + /// /// Parameters: /// /// * [SessionUnlockDto] sessionUnlockDto (required): @@ -438,6 +754,10 @@ class AuthenticationApi { ); } + /// Unlock auth session + /// + /// Temporarily grant the session elevated access to locked assets by providing the correct PIN code. + /// /// Parameters: /// /// * [SessionUnlockDto] sessionUnlockDto (required): @@ -448,7 +768,11 @@ class AuthenticationApi { } } - /// Performs an HTTP 'POST /auth/validateToken' operation and returns the [Response]. + /// Validate access token + /// + /// Validate the current authorization method is still valid. + /// + /// Note: This method returns the HTTP [Response]. Future validateAccessTokenWithHttpInfo() async { // ignore: prefer_const_declarations final apiPath = r'/auth/validateToken'; @@ -474,6 +798,9 @@ class AuthenticationApi { ); } + /// Validate access token + /// + /// Validate the current authorization method is still valid. Future validateAccessToken() async { final response = await validateAccessTokenWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { diff --git a/mobile/openapi/lib/api/deprecated_api.dart b/mobile/openapi/lib/api/deprecated_api.dart index 9246998ca2..b47b26b148 100644 --- a/mobile/openapi/lib/api/deprecated_api.dart +++ b/mobile/openapi/lib/api/deprecated_api.dart @@ -16,7 +16,9 @@ class DeprecatedApi { final ApiClient apiClient; - /// This property was deprecated in v1.141.0. This endpoint requires the `partner.create` permission. + /// Create a partner + /// + /// This property was deprecated in v1.141.0. Create a new partner to share assets with. /// /// Note: This method returns the HTTP [Response]. /// @@ -49,7 +51,9 @@ class DeprecatedApi { ); } - /// This property was deprecated in v1.141.0. This endpoint requires the `partner.create` permission. + /// Create a partner + /// + /// This property was deprecated in v1.141.0. Create a new partner to share assets with. /// /// Parameters: /// @@ -69,7 +73,184 @@ class DeprecatedApi { return null; } - /// This property was deprecated in v1.116.0. This endpoint requires the `asset.read` permission. + /// Retrieve assets by device ID + /// + /// This property was deprecated in v2.0.0. Get all asset of a device that are in the database, ID only. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [String] deviceId (required): + Future getAllUserAssetsByDeviceIdWithHttpInfo(String deviceId,) async { + // ignore: prefer_const_declarations + final apiPath = r'/assets/device/{deviceId}' + .replaceAll('{deviceId}', deviceId); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + apiPath, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Retrieve assets by device ID + /// + /// This property was deprecated in v2.0.0. Get all asset of a device that are in the database, ID only. + /// + /// Parameters: + /// + /// * [String] deviceId (required): + Future?> getAllUserAssetsByDeviceId(String deviceId,) async { + final response = await getAllUserAssetsByDeviceIdWithHttpInfo(deviceId,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + final responseBody = await _decodeBodyBytes(response); + return (await apiClient.deserializeAsync(responseBody, 'List') as List) + .cast() + .toList(growable: false); + + } + return null; + } + + /// Get delta sync for user + /// + /// This property was deprecated in v2.0.0. Retrieve changed assets since the last sync for the authenticated user. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [AssetDeltaSyncDto] assetDeltaSyncDto (required): + Future getDeltaSyncWithHttpInfo(AssetDeltaSyncDto assetDeltaSyncDto,) async { + // ignore: prefer_const_declarations + final apiPath = r'/sync/delta-sync'; + + // ignore: prefer_final_locals + Object? postBody = assetDeltaSyncDto; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + apiPath, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Get delta sync for user + /// + /// This property was deprecated in v2.0.0. Retrieve changed assets since the last sync for the authenticated user. + /// + /// Parameters: + /// + /// * [AssetDeltaSyncDto] assetDeltaSyncDto (required): + Future getDeltaSync(AssetDeltaSyncDto assetDeltaSyncDto,) async { + final response = await getDeltaSyncWithHttpInfo(assetDeltaSyncDto,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AssetDeltaSyncResponseDto',) as AssetDeltaSyncResponseDto; + + } + return null; + } + + /// Get full sync for user + /// + /// This property was deprecated in v2.0.0. Retrieve all assets for a full synchronization for the authenticated user. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [AssetFullSyncDto] assetFullSyncDto (required): + Future getFullSyncForUserWithHttpInfo(AssetFullSyncDto assetFullSyncDto,) async { + // ignore: prefer_const_declarations + final apiPath = r'/sync/full-sync'; + + // ignore: prefer_final_locals + Object? postBody = assetFullSyncDto; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + apiPath, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Get full sync for user + /// + /// This property was deprecated in v2.0.0. Retrieve all assets for a full synchronization for the authenticated user. + /// + /// Parameters: + /// + /// * [AssetFullSyncDto] assetFullSyncDto (required): + Future?> getFullSyncForUser(AssetFullSyncDto assetFullSyncDto,) async { + final response = await getFullSyncForUserWithHttpInfo(assetFullSyncDto,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + final responseBody = await _decodeBodyBytes(response); + return (await apiClient.deserializeAsync(responseBody, 'List') as List) + .cast() + .toList(growable: false); + + } + return null; + } + + /// Get random assets + /// + /// This property was deprecated in v1.116.0. Retrieve a specified number of random assets for the authenticated user. /// /// Note: This method returns the HTTP [Response]. /// @@ -105,7 +286,9 @@ class DeprecatedApi { ); } - /// This property was deprecated in v1.116.0. This endpoint requires the `asset.read` permission. + /// Get random assets + /// + /// This property was deprecated in v1.116.0. Retrieve a specified number of random assets for the authenticated user. /// /// Parameters: /// @@ -128,9 +311,9 @@ class DeprecatedApi { return null; } - /// Replace the asset with new file, without changing its id + /// Replace asset /// - /// This property was deprecated in v1.142.0. Replace the asset with new file, without changing its id. This endpoint requires the `asset.replace` permission. + /// This property was deprecated in v1.142.0. Replace the asset with new file, without changing its id. /// /// Note: This method returns the HTTP [Response]. /// @@ -222,9 +405,9 @@ class DeprecatedApi { ); } - /// Replace the asset with new file, without changing its id + /// Replace asset /// - /// This property was deprecated in v1.142.0. Replace the asset with new file, without changing its id. This endpoint requires the `asset.replace` permission. + /// This property was deprecated in v1.142.0. Replace the asset with new file, without changing its id. /// /// Parameters: /// diff --git a/mobile/openapi/lib/api/download_api.dart b/mobile/openapi/lib/api/download_api.dart index 62c97bfc9c..5245622753 100644 --- a/mobile/openapi/lib/api/download_api.dart +++ b/mobile/openapi/lib/api/download_api.dart @@ -16,7 +16,9 @@ class DownloadApi { final ApiClient apiClient; - /// This endpoint requires the `asset.download` permission. + /// Download asset archive + /// + /// Download a ZIP archive containing the specified assets. The assets must have been previously requested via the \"getDownloadInfo\" endpoint. /// /// Note: This method returns the HTTP [Response]. /// @@ -59,7 +61,9 @@ class DownloadApi { ); } - /// This endpoint requires the `asset.download` permission. + /// Download asset archive + /// + /// Download a ZIP archive containing the specified assets. The assets must have been previously requested via the \"getDownloadInfo\" endpoint. /// /// Parameters: /// @@ -83,7 +87,9 @@ class DownloadApi { return null; } - /// This endpoint requires the `asset.download` permission. + /// Retrieve download information + /// + /// Retrieve information about how to request a download for the specified assets or album. The response includes groups of assets that can be downloaded together. /// /// Note: This method returns the HTTP [Response]. /// @@ -126,7 +132,9 @@ class DownloadApi { ); } - /// This endpoint requires the `asset.download` permission. + /// Retrieve download information + /// + /// Retrieve information about how to request a download for the specified assets or album. The response includes groups of assets that can be downloaded together. /// /// Parameters: /// diff --git a/mobile/openapi/lib/api/duplicates_api.dart b/mobile/openapi/lib/api/duplicates_api.dart index 9df6e46586..7fa7b368b5 100644 --- a/mobile/openapi/lib/api/duplicates_api.dart +++ b/mobile/openapi/lib/api/duplicates_api.dart @@ -16,7 +16,9 @@ class DuplicatesApi { final ApiClient apiClient; - /// This endpoint requires the `duplicate.delete` permission. + /// Delete a duplicate + /// + /// Delete a single duplicate asset specified by its ID. /// /// Note: This method returns the HTTP [Response]. /// @@ -49,7 +51,9 @@ class DuplicatesApi { ); } - /// This endpoint requires the `duplicate.delete` permission. + /// Delete a duplicate + /// + /// Delete a single duplicate asset specified by its ID. /// /// Parameters: /// @@ -61,7 +65,9 @@ class DuplicatesApi { } } - /// This endpoint requires the `duplicate.delete` permission. + /// Delete duplicates + /// + /// Delete multiple duplicate assets specified by their IDs. /// /// Note: This method returns the HTTP [Response]. /// @@ -93,7 +99,9 @@ class DuplicatesApi { ); } - /// This endpoint requires the `duplicate.delete` permission. + /// Delete duplicates + /// + /// Delete multiple duplicate assets specified by their IDs. /// /// Parameters: /// @@ -105,7 +113,9 @@ class DuplicatesApi { } } - /// This endpoint requires the `duplicate.read` permission. + /// Retrieve duplicates + /// + /// Retrieve a list of duplicate assets available to the authenticated user. /// /// Note: This method returns the HTTP [Response]. Future getAssetDuplicatesWithHttpInfo() async { @@ -133,7 +143,9 @@ class DuplicatesApi { ); } - /// This endpoint requires the `duplicate.read` permission. + /// Retrieve duplicates + /// + /// Retrieve a list of duplicate assets available to the authenticated user. Future?> getAssetDuplicates() async { final response = await getAssetDuplicatesWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { diff --git a/mobile/openapi/lib/api/faces_api.dart b/mobile/openapi/lib/api/faces_api.dart index 2f8e6be60d..1d2e7401e8 100644 --- a/mobile/openapi/lib/api/faces_api.dart +++ b/mobile/openapi/lib/api/faces_api.dart @@ -16,7 +16,9 @@ class FacesApi { final ApiClient apiClient; - /// This endpoint requires the `face.create` permission. + /// Create a face + /// + /// Create a new face that has not been discovered by facial recognition. The content of the bounding box is considered a face. /// /// Note: This method returns the HTTP [Response]. /// @@ -48,7 +50,9 @@ class FacesApi { ); } - /// This endpoint requires the `face.create` permission. + /// Create a face + /// + /// Create a new face that has not been discovered by facial recognition. The content of the bounding box is considered a face. /// /// Parameters: /// @@ -60,7 +64,9 @@ class FacesApi { } } - /// This endpoint requires the `face.delete` permission. + /// Delete a face + /// + /// Delete a face identified by the id. Optionally can be force deleted. /// /// Note: This method returns the HTTP [Response]. /// @@ -95,7 +101,9 @@ class FacesApi { ); } - /// This endpoint requires the `face.delete` permission. + /// Delete a face + /// + /// Delete a face identified by the id. Optionally can be force deleted. /// /// Parameters: /// @@ -109,7 +117,9 @@ class FacesApi { } } - /// This endpoint requires the `face.read` permission. + /// Retrieve faces for asset + /// + /// Retrieve all faces belonging to an asset. /// /// Note: This method returns the HTTP [Response]. /// @@ -143,7 +153,9 @@ class FacesApi { ); } - /// This endpoint requires the `face.read` permission. + /// Retrieve faces for asset + /// + /// Retrieve all faces belonging to an asset. /// /// Parameters: /// @@ -166,7 +178,9 @@ class FacesApi { return null; } - /// This endpoint requires the `face.update` permission. + /// Re-assign a face to another person + /// + /// Re-assign the face provided in the body to the person identified by the id in the path parameter. /// /// Note: This method returns the HTTP [Response]. /// @@ -201,7 +215,9 @@ class FacesApi { ); } - /// This endpoint requires the `face.update` permission. + /// Re-assign a face to another person + /// + /// Re-assign the face provided in the body to the person identified by the id in the path parameter. /// /// Parameters: /// diff --git a/mobile/openapi/lib/api/jobs_api.dart b/mobile/openapi/lib/api/jobs_api.dart index 4c935828a0..e783f93c7c 100644 --- a/mobile/openapi/lib/api/jobs_api.dart +++ b/mobile/openapi/lib/api/jobs_api.dart @@ -16,7 +16,9 @@ class JobsApi { final ApiClient apiClient; - /// This endpoint is an admin-only route, and requires the `job.create` permission. + /// Create a manual job + /// + /// Run a specific job. Most jobs are queued automatically, but this endpoint allows for manual creation of a handful of jobs, including various cleanup tasks, as well as creating a new database backup. /// /// Note: This method returns the HTTP [Response]. /// @@ -48,7 +50,9 @@ class JobsApi { ); } - /// This endpoint is an admin-only route, and requires the `job.create` permission. + /// Create a manual job + /// + /// Run a specific job. Most jobs are queued automatically, but this endpoint allows for manual creation of a handful of jobs, including various cleanup tasks, as well as creating a new database backup. /// /// Parameters: /// @@ -60,7 +64,9 @@ class JobsApi { } } - /// This endpoint is an admin-only route, and requires the `job.read` permission. + /// Retrieve queue counts and status + /// + /// Retrieve the counts of the current queue, as well as the current status. /// /// Note: This method returns the HTTP [Response]. Future getAllJobsStatusWithHttpInfo() async { @@ -88,7 +94,9 @@ class JobsApi { ); } - /// This endpoint is an admin-only route, and requires the `job.read` permission. + /// Retrieve queue counts and status + /// + /// Retrieve the counts of the current queue, as well as the current status. Future getAllJobsStatus() async { final response = await getAllJobsStatusWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -104,7 +112,9 @@ class JobsApi { return null; } - /// This endpoint is an admin-only route, and requires the `job.create` permission. + /// Run jobs + /// + /// Queue all assets for a specific job type. Defaults to only queueing assets that have not yet been processed, but the force command can be used to re-process all assets. /// /// Note: This method returns the HTTP [Response]. /// @@ -139,7 +149,9 @@ class JobsApi { ); } - /// This endpoint is an admin-only route, and requires the `job.create` permission. + /// Run jobs + /// + /// Queue all assets for a specific job type. Defaults to only queueing assets that have not yet been processed, but the force command can be used to re-process all assets. /// /// Parameters: /// diff --git a/mobile/openapi/lib/api/libraries_api.dart b/mobile/openapi/lib/api/libraries_api.dart index 9258f8e3eb..ca59f823fe 100644 --- a/mobile/openapi/lib/api/libraries_api.dart +++ b/mobile/openapi/lib/api/libraries_api.dart @@ -16,7 +16,9 @@ class LibrariesApi { final ApiClient apiClient; - /// This endpoint is an admin-only route, and requires the `library.create` permission. + /// Create a library + /// + /// Create a new external library. /// /// Note: This method returns the HTTP [Response]. /// @@ -48,7 +50,9 @@ class LibrariesApi { ); } - /// This endpoint is an admin-only route, and requires the `library.create` permission. + /// Create a library + /// + /// Create a new external library. /// /// Parameters: /// @@ -68,7 +72,9 @@ class LibrariesApi { return null; } - /// This endpoint is an admin-only route, and requires the `library.delete` permission. + /// Delete a library + /// + /// Delete an external library by its ID. /// /// Note: This method returns the HTTP [Response]. /// @@ -101,7 +107,9 @@ class LibrariesApi { ); } - /// This endpoint is an admin-only route, and requires the `library.delete` permission. + /// Delete a library + /// + /// Delete an external library by its ID. /// /// Parameters: /// @@ -113,7 +121,9 @@ class LibrariesApi { } } - /// This endpoint is an admin-only route, and requires the `library.read` permission. + /// Retrieve libraries + /// + /// Retrieve a list of external libraries. /// /// Note: This method returns the HTTP [Response]. Future getAllLibrariesWithHttpInfo() async { @@ -141,7 +151,9 @@ class LibrariesApi { ); } - /// This endpoint is an admin-only route, and requires the `library.read` permission. + /// Retrieve libraries + /// + /// Retrieve a list of external libraries. Future?> getAllLibraries() async { final response = await getAllLibrariesWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -160,7 +172,9 @@ class LibrariesApi { return null; } - /// This endpoint is an admin-only route, and requires the `library.read` permission. + /// Retrieve a library + /// + /// Retrieve an external library by its ID. /// /// Note: This method returns the HTTP [Response]. /// @@ -193,7 +207,9 @@ class LibrariesApi { ); } - /// This endpoint is an admin-only route, and requires the `library.read` permission. + /// Retrieve a library + /// + /// Retrieve an external library by its ID. /// /// Parameters: /// @@ -213,7 +229,9 @@ class LibrariesApi { return null; } - /// This endpoint is an admin-only route, and requires the `library.statistics` permission. + /// Retrieve library statistics + /// + /// Retrieve statistics for a specific external library, including number of videos, images, and storage usage. /// /// Note: This method returns the HTTP [Response]. /// @@ -246,7 +264,9 @@ class LibrariesApi { ); } - /// This endpoint is an admin-only route, and requires the `library.statistics` permission. + /// Retrieve library statistics + /// + /// Retrieve statistics for a specific external library, including number of videos, images, and storage usage. /// /// Parameters: /// @@ -266,7 +286,9 @@ class LibrariesApi { return null; } - /// This endpoint is an admin-only route, and requires the `library.update` permission. + /// Scan a library + /// + /// Queue a scan for the external library to find and import new assets. /// /// Note: This method returns the HTTP [Response]. /// @@ -299,7 +321,9 @@ class LibrariesApi { ); } - /// This endpoint is an admin-only route, and requires the `library.update` permission. + /// Scan a library + /// + /// Queue a scan for the external library to find and import new assets. /// /// Parameters: /// @@ -311,7 +335,9 @@ class LibrariesApi { } } - /// This endpoint is an admin-only route, and requires the `library.update` permission. + /// Update a library + /// + /// Update an existing external library. /// /// Note: This method returns the HTTP [Response]. /// @@ -346,7 +372,9 @@ class LibrariesApi { ); } - /// This endpoint is an admin-only route, and requires the `library.update` permission. + /// Update a library + /// + /// Update an existing external library. /// /// Parameters: /// @@ -368,7 +396,12 @@ class LibrariesApi { return null; } - /// Performs an HTTP 'POST /libraries/{id}/validate' operation and returns the [Response]. + /// Validate library settings + /// + /// Validate the settings of an external library. + /// + /// Note: This method returns the HTTP [Response]. + /// /// Parameters: /// /// * [String] id (required): @@ -400,6 +433,10 @@ class LibrariesApi { ); } + /// Validate library settings + /// + /// Validate the settings of an external library. + /// /// Parameters: /// /// * [String] id (required): diff --git a/mobile/openapi/lib/api/map_api.dart b/mobile/openapi/lib/api/map_api.dart index da4f3dffcc..6302ac304e 100644 --- a/mobile/openapi/lib/api/map_api.dart +++ b/mobile/openapi/lib/api/map_api.dart @@ -16,21 +16,26 @@ class MapApi { final ApiClient apiClient; - /// Performs an HTTP 'GET /map/markers' operation and returns the [Response]. + /// Retrieve map markers + /// + /// Retrieve a list of latitude and longitude coordinates for every asset with location data. + /// + /// Note: This method returns the HTTP [Response]. + /// /// Parameters: /// - /// * [bool] isArchived: - /// - /// * [bool] isFavorite: - /// /// * [DateTime] fileCreatedAfter: /// /// * [DateTime] fileCreatedBefore: /// + /// * [bool] isArchived: + /// + /// * [bool] isFavorite: + /// /// * [bool] withPartners: /// /// * [bool] withSharedAlbums: - Future getMapMarkersWithHttpInfo({ bool? isArchived, bool? isFavorite, DateTime? fileCreatedAfter, DateTime? fileCreatedBefore, bool? withPartners, bool? withSharedAlbums, }) async { + Future getMapMarkersWithHttpInfo({ DateTime? fileCreatedAfter, DateTime? fileCreatedBefore, bool? isArchived, bool? isFavorite, bool? withPartners, bool? withSharedAlbums, }) async { // ignore: prefer_const_declarations final apiPath = r'/map/markers'; @@ -41,18 +46,18 @@ class MapApi { final headerParams = {}; final formParams = {}; - if (isArchived != null) { - queryParams.addAll(_queryParams('', 'isArchived', isArchived)); - } - if (isFavorite != null) { - queryParams.addAll(_queryParams('', 'isFavorite', isFavorite)); - } if (fileCreatedAfter != null) { queryParams.addAll(_queryParams('', 'fileCreatedAfter', fileCreatedAfter)); } if (fileCreatedBefore != null) { queryParams.addAll(_queryParams('', 'fileCreatedBefore', fileCreatedBefore)); } + if (isArchived != null) { + queryParams.addAll(_queryParams('', 'isArchived', isArchived)); + } + if (isFavorite != null) { + queryParams.addAll(_queryParams('', 'isFavorite', isFavorite)); + } if (withPartners != null) { queryParams.addAll(_queryParams('', 'withPartners', withPartners)); } @@ -74,21 +79,25 @@ class MapApi { ); } + /// Retrieve map markers + /// + /// Retrieve a list of latitude and longitude coordinates for every asset with location data. + /// /// Parameters: /// - /// * [bool] isArchived: - /// - /// * [bool] isFavorite: - /// /// * [DateTime] fileCreatedAfter: /// /// * [DateTime] fileCreatedBefore: /// + /// * [bool] isArchived: + /// + /// * [bool] isFavorite: + /// /// * [bool] withPartners: /// /// * [bool] withSharedAlbums: - Future?> getMapMarkers({ bool? isArchived, bool? isFavorite, DateTime? fileCreatedAfter, DateTime? fileCreatedBefore, bool? withPartners, bool? withSharedAlbums, }) async { - final response = await getMapMarkersWithHttpInfo( isArchived: isArchived, isFavorite: isFavorite, fileCreatedAfter: fileCreatedAfter, fileCreatedBefore: fileCreatedBefore, withPartners: withPartners, withSharedAlbums: withSharedAlbums, ); + Future?> getMapMarkers({ DateTime? fileCreatedAfter, DateTime? fileCreatedBefore, bool? isArchived, bool? isFavorite, bool? withPartners, bool? withSharedAlbums, }) async { + final response = await getMapMarkersWithHttpInfo( fileCreatedAfter: fileCreatedAfter, fileCreatedBefore: fileCreatedBefore, isArchived: isArchived, isFavorite: isFavorite, withPartners: withPartners, withSharedAlbums: withSharedAlbums, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -105,7 +114,12 @@ class MapApi { return null; } - /// Performs an HTTP 'GET /map/reverse-geocode' operation and returns the [Response]. + /// Reverse geocode coordinates + /// + /// Retrieve location information (e.g., city, country) for given latitude and longitude coordinates. + /// + /// Note: This method returns the HTTP [Response]. + /// /// Parameters: /// /// * [double] lat (required): @@ -139,6 +153,10 @@ class MapApi { ); } + /// Reverse geocode coordinates + /// + /// Retrieve location information (e.g., city, country) for given latitude and longitude coordinates. + /// /// Parameters: /// /// * [double] lat (required): diff --git a/mobile/openapi/lib/api/memories_api.dart b/mobile/openapi/lib/api/memories_api.dart index 9916029e0b..314595e84e 100644 --- a/mobile/openapi/lib/api/memories_api.dart +++ b/mobile/openapi/lib/api/memories_api.dart @@ -16,7 +16,9 @@ class MemoriesApi { final ApiClient apiClient; - /// This endpoint requires the `memoryAsset.create` permission. + /// Add assets to a memory + /// + /// Add a list of asset IDs to a specific memory. /// /// Note: This method returns the HTTP [Response]. /// @@ -51,7 +53,9 @@ class MemoriesApi { ); } - /// This endpoint requires the `memoryAsset.create` permission. + /// Add assets to a memory + /// + /// Add a list of asset IDs to a specific memory. /// /// Parameters: /// @@ -76,7 +80,9 @@ class MemoriesApi { return null; } - /// This endpoint requires the `memory.create` permission. + /// Create a memory + /// + /// Create a new memory by providing a name, description, and a list of asset IDs to include in the memory. /// /// Note: This method returns the HTTP [Response]. /// @@ -108,7 +114,9 @@ class MemoriesApi { ); } - /// This endpoint requires the `memory.create` permission. + /// Create a memory + /// + /// Create a new memory by providing a name, description, and a list of asset IDs to include in the memory. /// /// Parameters: /// @@ -128,7 +136,9 @@ class MemoriesApi { return null; } - /// This endpoint requires the `memory.delete` permission. + /// Delete a memory + /// + /// Delete a specific memory by its ID. /// /// Note: This method returns the HTTP [Response]. /// @@ -161,7 +171,9 @@ class MemoriesApi { ); } - /// This endpoint requires the `memory.delete` permission. + /// Delete a memory + /// + /// Delete a specific memory by its ID. /// /// Parameters: /// @@ -173,7 +185,9 @@ class MemoriesApi { } } - /// This endpoint requires the `memory.read` permission. + /// Retrieve a memory + /// + /// Retrieve a specific memory by its ID. /// /// Note: This method returns the HTTP [Response]. /// @@ -206,7 +220,9 @@ class MemoriesApi { ); } - /// This endpoint requires the `memory.read` permission. + /// Retrieve a memory + /// + /// Retrieve a specific memory by its ID. /// /// Parameters: /// @@ -226,7 +242,9 @@ class MemoriesApi { return null; } - /// This endpoint requires the `memory.statistics` permission. + /// Retrieve memories statistics + /// + /// Retrieve statistics about memories, such as total count and other relevant metrics. /// /// Note: This method returns the HTTP [Response]. /// @@ -288,7 +306,9 @@ class MemoriesApi { ); } - /// This endpoint requires the `memory.statistics` permission. + /// Retrieve memories statistics + /// + /// Retrieve statistics about memories, such as total count and other relevant metrics. /// /// Parameters: /// @@ -319,7 +339,9 @@ class MemoriesApi { return null; } - /// This endpoint requires the `memoryAsset.delete` permission. + /// Remove assets from a memory + /// + /// Remove a list of asset IDs from a specific memory. /// /// Note: This method returns the HTTP [Response]. /// @@ -354,7 +376,9 @@ class MemoriesApi { ); } - /// This endpoint requires the `memoryAsset.delete` permission. + /// Remove assets from a memory + /// + /// Remove a list of asset IDs from a specific memory. /// /// Parameters: /// @@ -379,7 +403,9 @@ class MemoriesApi { return null; } - /// This endpoint requires the `memory.read` permission. + /// Retrieve memories + /// + /// Retrieve a list of memories. Memories are sorted descending by creation date by default, although they can also be sorted in ascending order, or randomly. /// /// Note: This method returns the HTTP [Response]. /// @@ -441,7 +467,9 @@ class MemoriesApi { ); } - /// This endpoint requires the `memory.read` permission. + /// Retrieve memories + /// + /// Retrieve a list of memories. Memories are sorted descending by creation date by default, although they can also be sorted in ascending order, or randomly. /// /// Parameters: /// @@ -475,7 +503,9 @@ class MemoriesApi { return null; } - /// This endpoint requires the `memory.update` permission. + /// Update a memory + /// + /// Update an existing memory by its ID. /// /// Note: This method returns the HTTP [Response]. /// @@ -510,7 +540,9 @@ class MemoriesApi { ); } - /// This endpoint requires the `memory.update` permission. + /// Update a memory + /// + /// Update an existing memory by its ID. /// /// Parameters: /// diff --git a/mobile/openapi/lib/api/notifications_admin_api.dart b/mobile/openapi/lib/api/notifications_admin_api.dart index 409683a950..7821553d30 100644 --- a/mobile/openapi/lib/api/notifications_admin_api.dart +++ b/mobile/openapi/lib/api/notifications_admin_api.dart @@ -16,7 +16,12 @@ class NotificationsAdminApi { final ApiClient apiClient; - /// Performs an HTTP 'POST /admin/notifications' operation and returns the [Response]. + /// Create a notification + /// + /// Create a new notification for a specific user. + /// + /// Note: This method returns the HTTP [Response]. + /// /// Parameters: /// /// * [NotificationCreateDto] notificationCreateDto (required): @@ -45,6 +50,10 @@ class NotificationsAdminApi { ); } + /// Create a notification + /// + /// Create a new notification for a specific user. + /// /// Parameters: /// /// * [NotificationCreateDto] notificationCreateDto (required): @@ -63,7 +72,12 @@ class NotificationsAdminApi { return null; } - /// Performs an HTTP 'POST /admin/notifications/templates/{name}' operation and returns the [Response]. + /// Render email template + /// + /// Retrieve a preview of the provided email template. + /// + /// Note: This method returns the HTTP [Response]. + /// /// Parameters: /// /// * [String] name (required): @@ -95,6 +109,10 @@ class NotificationsAdminApi { ); } + /// Render email template + /// + /// Retrieve a preview of the provided email template. + /// /// Parameters: /// /// * [String] name (required): @@ -115,7 +133,12 @@ class NotificationsAdminApi { return null; } - /// Performs an HTTP 'POST /admin/notifications/test-email' operation and returns the [Response]. + /// Send test email + /// + /// Send a test email using the provided SMTP configuration. + /// + /// Note: This method returns the HTTP [Response]. + /// /// Parameters: /// /// * [SystemConfigSmtpDto] systemConfigSmtpDto (required): @@ -144,6 +167,10 @@ class NotificationsAdminApi { ); } + /// Send test email + /// + /// Send a test email using the provided SMTP configuration. + /// /// Parameters: /// /// * [SystemConfigSmtpDto] systemConfigSmtpDto (required): diff --git a/mobile/openapi/lib/api/notifications_api.dart b/mobile/openapi/lib/api/notifications_api.dart index 1d276efaaf..2de59a0a76 100644 --- a/mobile/openapi/lib/api/notifications_api.dart +++ b/mobile/openapi/lib/api/notifications_api.dart @@ -16,7 +16,9 @@ class NotificationsApi { final ApiClient apiClient; - /// This endpoint requires the `notification.delete` permission. + /// Delete a notification + /// + /// Delete a specific notification. /// /// Note: This method returns the HTTP [Response]. /// @@ -49,7 +51,9 @@ class NotificationsApi { ); } - /// This endpoint requires the `notification.delete` permission. + /// Delete a notification + /// + /// Delete a specific notification. /// /// Parameters: /// @@ -61,7 +65,9 @@ class NotificationsApi { } } - /// This endpoint requires the `notification.delete` permission. + /// Delete notifications + /// + /// Delete a list of notifications at once. /// /// Note: This method returns the HTTP [Response]. /// @@ -93,7 +99,9 @@ class NotificationsApi { ); } - /// This endpoint requires the `notification.delete` permission. + /// Delete notifications + /// + /// Delete a list of notifications at once. /// /// Parameters: /// @@ -105,7 +113,9 @@ class NotificationsApi { } } - /// This endpoint requires the `notification.read` permission. + /// Get a notification + /// + /// Retrieve a specific notification identified by id. /// /// Note: This method returns the HTTP [Response]. /// @@ -138,7 +148,9 @@ class NotificationsApi { ); } - /// This endpoint requires the `notification.read` permission. + /// Get a notification + /// + /// Retrieve a specific notification identified by id. /// /// Parameters: /// @@ -158,7 +170,9 @@ class NotificationsApi { return null; } - /// This endpoint requires the `notification.read` permission. + /// Retrieve notifications + /// + /// Retrieve a list of notifications. /// /// Note: This method returns the HTTP [Response]. /// @@ -209,7 +223,9 @@ class NotificationsApi { ); } - /// This endpoint requires the `notification.read` permission. + /// Retrieve notifications + /// + /// Retrieve a list of notifications. /// /// Parameters: /// @@ -238,7 +254,9 @@ class NotificationsApi { return null; } - /// This endpoint requires the `notification.update` permission. + /// Update a notification + /// + /// Update a specific notification to set its read status. /// /// Note: This method returns the HTTP [Response]. /// @@ -273,7 +291,9 @@ class NotificationsApi { ); } - /// This endpoint requires the `notification.update` permission. + /// Update a notification + /// + /// Update a specific notification to set its read status. /// /// Parameters: /// @@ -295,7 +315,9 @@ class NotificationsApi { return null; } - /// This endpoint requires the `notification.update` permission. + /// Update notifications + /// + /// Update a list of notifications. Allows to bulk-set the read status of notifications. /// /// Note: This method returns the HTTP [Response]. /// @@ -327,7 +349,9 @@ class NotificationsApi { ); } - /// This endpoint requires the `notification.update` permission. + /// Update notifications + /// + /// Update a list of notifications. Allows to bulk-set the read status of notifications. /// /// Parameters: /// diff --git a/mobile/openapi/lib/api/o_auth_api.dart b/mobile/openapi/lib/api/o_auth_api.dart deleted file mode 100644 index 9f16e37c70..0000000000 --- a/mobile/openapi/lib/api/o_auth_api.dart +++ /dev/null @@ -1,233 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class OAuthApi { - OAuthApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Performs an HTTP 'POST /oauth/callback' operation and returns the [Response]. - /// Parameters: - /// - /// * [OAuthCallbackDto] oAuthCallbackDto (required): - Future finishOAuthWithHttpInfo(OAuthCallbackDto oAuthCallbackDto,) async { - // ignore: prefer_const_declarations - final apiPath = r'/oauth/callback'; - - // ignore: prefer_final_locals - Object? postBody = oAuthCallbackDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - ); - } - - /// Parameters: - /// - /// * [OAuthCallbackDto] oAuthCallbackDto (required): - Future finishOAuth(OAuthCallbackDto oAuthCallbackDto,) async { - final response = await finishOAuthWithHttpInfo(oAuthCallbackDto,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'LoginResponseDto',) as LoginResponseDto; - - } - return null; - } - - /// Performs an HTTP 'POST /oauth/link' operation and returns the [Response]. - /// Parameters: - /// - /// * [OAuthCallbackDto] oAuthCallbackDto (required): - Future linkOAuthAccountWithHttpInfo(OAuthCallbackDto oAuthCallbackDto,) async { - // ignore: prefer_const_declarations - final apiPath = r'/oauth/link'; - - // ignore: prefer_final_locals - Object? postBody = oAuthCallbackDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - ); - } - - /// Parameters: - /// - /// * [OAuthCallbackDto] oAuthCallbackDto (required): - Future linkOAuthAccount(OAuthCallbackDto oAuthCallbackDto,) async { - final response = await linkOAuthAccountWithHttpInfo(oAuthCallbackDto,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserAdminResponseDto',) as UserAdminResponseDto; - - } - return null; - } - - /// Performs an HTTP 'GET /oauth/mobile-redirect' operation and returns the [Response]. - Future redirectOAuthToMobileWithHttpInfo() async { - // ignore: prefer_const_declarations - final apiPath = r'/oauth/mobile-redirect'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - ); - } - - Future redirectOAuthToMobile() async { - final response = await redirectOAuthToMobileWithHttpInfo(); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Performs an HTTP 'POST /oauth/authorize' operation and returns the [Response]. - /// Parameters: - /// - /// * [OAuthConfigDto] oAuthConfigDto (required): - Future startOAuthWithHttpInfo(OAuthConfigDto oAuthConfigDto,) async { - // ignore: prefer_const_declarations - final apiPath = r'/oauth/authorize'; - - // ignore: prefer_final_locals - Object? postBody = oAuthConfigDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - ); - } - - /// Parameters: - /// - /// * [OAuthConfigDto] oAuthConfigDto (required): - Future startOAuth(OAuthConfigDto oAuthConfigDto,) async { - final response = await startOAuthWithHttpInfo(oAuthConfigDto,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'OAuthAuthorizeResponseDto',) as OAuthAuthorizeResponseDto; - - } - return null; - } - - /// Performs an HTTP 'POST /oauth/unlink' operation and returns the [Response]. - Future unlinkOAuthAccountWithHttpInfo() async { - // ignore: prefer_const_declarations - final apiPath = r'/oauth/unlink'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - ); - } - - Future unlinkOAuthAccount() async { - final response = await unlinkOAuthAccountWithHttpInfo(); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserAdminResponseDto',) as UserAdminResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/partners_api.dart b/mobile/openapi/lib/api/partners_api.dart index a5fdf53ab5..9cbd4bfedb 100644 --- a/mobile/openapi/lib/api/partners_api.dart +++ b/mobile/openapi/lib/api/partners_api.dart @@ -16,7 +16,9 @@ class PartnersApi { final ApiClient apiClient; - /// This endpoint requires the `partner.create` permission. + /// Create a partner + /// + /// Create a new partner to share assets with. /// /// Note: This method returns the HTTP [Response]. /// @@ -48,7 +50,9 @@ class PartnersApi { ); } - /// This endpoint requires the `partner.create` permission. + /// Create a partner + /// + /// Create a new partner to share assets with. /// /// Parameters: /// @@ -68,7 +72,9 @@ class PartnersApi { return null; } - /// This property was deprecated in v1.141.0. This endpoint requires the `partner.create` permission. + /// Create a partner + /// + /// This property was deprecated in v1.141.0. Create a new partner to share assets with. /// /// Note: This method returns the HTTP [Response]. /// @@ -101,7 +107,9 @@ class PartnersApi { ); } - /// This property was deprecated in v1.141.0. This endpoint requires the `partner.create` permission. + /// Create a partner + /// + /// This property was deprecated in v1.141.0. Create a new partner to share assets with. /// /// Parameters: /// @@ -121,7 +129,9 @@ class PartnersApi { return null; } - /// This endpoint requires the `partner.read` permission. + /// Retrieve partners + /// + /// Retrieve a list of partners with whom assets are shared. /// /// Note: This method returns the HTTP [Response]. /// @@ -155,7 +165,9 @@ class PartnersApi { ); } - /// This endpoint requires the `partner.read` permission. + /// Retrieve partners + /// + /// Retrieve a list of partners with whom assets are shared. /// /// Parameters: /// @@ -178,7 +190,9 @@ class PartnersApi { return null; } - /// This endpoint requires the `partner.delete` permission. + /// Remove a partner + /// + /// Stop sharing assets with a partner. /// /// Note: This method returns the HTTP [Response]. /// @@ -211,7 +225,9 @@ class PartnersApi { ); } - /// This endpoint requires the `partner.delete` permission. + /// Remove a partner + /// + /// Stop sharing assets with a partner. /// /// Parameters: /// @@ -223,7 +239,9 @@ class PartnersApi { } } - /// This endpoint requires the `partner.update` permission. + /// Update a partner + /// + /// Specify whether a partner's assets should appear in the user's timeline. /// /// Note: This method returns the HTTP [Response]. /// @@ -258,7 +276,9 @@ class PartnersApi { ); } - /// This endpoint requires the `partner.update` permission. + /// Update a partner + /// + /// Specify whether a partner's assets should appear in the user's timeline. /// /// Parameters: /// diff --git a/mobile/openapi/lib/api/people_api.dart b/mobile/openapi/lib/api/people_api.dart index 68c16785cc..c38e61584e 100644 --- a/mobile/openapi/lib/api/people_api.dart +++ b/mobile/openapi/lib/api/people_api.dart @@ -16,7 +16,9 @@ class PeopleApi { final ApiClient apiClient; - /// This endpoint requires the `person.create` permission. + /// Create a person + /// + /// Create a new person that can have multiple faces assigned to them. /// /// Note: This method returns the HTTP [Response]. /// @@ -48,7 +50,9 @@ class PeopleApi { ); } - /// This endpoint requires the `person.create` permission. + /// Create a person + /// + /// Create a new person that can have multiple faces assigned to them. /// /// Parameters: /// @@ -68,7 +72,9 @@ class PeopleApi { return null; } - /// This endpoint requires the `person.delete` permission. + /// Delete people + /// + /// Bulk delete a list of people at once. /// /// Note: This method returns the HTTP [Response]. /// @@ -100,7 +106,9 @@ class PeopleApi { ); } - /// This endpoint requires the `person.delete` permission. + /// Delete people + /// + /// Bulk delete a list of people at once. /// /// Parameters: /// @@ -112,7 +120,9 @@ class PeopleApi { } } - /// This endpoint requires the `person.delete` permission. + /// Delete person + /// + /// Delete an individual person. /// /// Note: This method returns the HTTP [Response]. /// @@ -145,7 +155,9 @@ class PeopleApi { ); } - /// This endpoint requires the `person.delete` permission. + /// Delete person + /// + /// Delete an individual person. /// /// Parameters: /// @@ -157,7 +169,9 @@ class PeopleApi { } } - /// This endpoint requires the `person.read` permission. + /// Get all people + /// + /// Retrieve a list of all people. /// /// Note: This method returns the HTTP [Response]. /// @@ -215,7 +229,9 @@ class PeopleApi { ); } - /// This endpoint requires the `person.read` permission. + /// Get all people + /// + /// Retrieve a list of all people. /// /// Parameters: /// @@ -245,7 +261,9 @@ class PeopleApi { return null; } - /// This endpoint requires the `person.read` permission. + /// Get a person + /// + /// Retrieve a person by id. /// /// Note: This method returns the HTTP [Response]. /// @@ -278,7 +296,9 @@ class PeopleApi { ); } - /// This endpoint requires the `person.read` permission. + /// Get a person + /// + /// Retrieve a person by id. /// /// Parameters: /// @@ -298,7 +318,9 @@ class PeopleApi { return null; } - /// This endpoint requires the `person.statistics` permission. + /// Get person statistics + /// + /// Retrieve statistics about a specific person. /// /// Note: This method returns the HTTP [Response]. /// @@ -331,7 +353,9 @@ class PeopleApi { ); } - /// This endpoint requires the `person.statistics` permission. + /// Get person statistics + /// + /// Retrieve statistics about a specific person. /// /// Parameters: /// @@ -351,7 +375,9 @@ class PeopleApi { return null; } - /// This endpoint requires the `person.read` permission. + /// Get person thumbnail + /// + /// Retrieve the thumbnail file for a person. /// /// Note: This method returns the HTTP [Response]. /// @@ -384,7 +410,9 @@ class PeopleApi { ); } - /// This endpoint requires the `person.read` permission. + /// Get person thumbnail + /// + /// Retrieve the thumbnail file for a person. /// /// Parameters: /// @@ -404,7 +432,9 @@ class PeopleApi { return null; } - /// This endpoint requires the `person.merge` permission. + /// Merge people + /// + /// Merge a list of people into the person specified in the path parameter. /// /// Note: This method returns the HTTP [Response]. /// @@ -439,7 +469,9 @@ class PeopleApi { ); } - /// This endpoint requires the `person.merge` permission. + /// Merge people + /// + /// Merge a list of people into the person specified in the path parameter. /// /// Parameters: /// @@ -464,7 +496,9 @@ class PeopleApi { return null; } - /// This endpoint requires the `person.reassign` permission. + /// Reassign faces + /// + /// Bulk reassign a list of faces to a different person. /// /// Note: This method returns the HTTP [Response]. /// @@ -499,7 +533,9 @@ class PeopleApi { ); } - /// This endpoint requires the `person.reassign` permission. + /// Reassign faces + /// + /// Bulk reassign a list of faces to a different person. /// /// Parameters: /// @@ -524,7 +560,9 @@ class PeopleApi { return null; } - /// This endpoint requires the `person.update` permission. + /// Update people + /// + /// Bulk update multiple people at once. /// /// Note: This method returns the HTTP [Response]. /// @@ -556,7 +594,9 @@ class PeopleApi { ); } - /// This endpoint requires the `person.update` permission. + /// Update people + /// + /// Bulk update multiple people at once. /// /// Parameters: /// @@ -579,7 +619,9 @@ class PeopleApi { return null; } - /// This endpoint requires the `person.update` permission. + /// Update person + /// + /// Update an individual person. /// /// Note: This method returns the HTTP [Response]. /// @@ -614,7 +656,9 @@ class PeopleApi { ); } - /// This endpoint requires the `person.update` permission. + /// Update person + /// + /// Update an individual person. /// /// Parameters: /// diff --git a/mobile/openapi/lib/api/search_api.dart b/mobile/openapi/lib/api/search_api.dart index 6c279a3503..375e9a1e87 100644 --- a/mobile/openapi/lib/api/search_api.dart +++ b/mobile/openapi/lib/api/search_api.dart @@ -16,7 +16,9 @@ class SearchApi { final ApiClient apiClient; - /// This endpoint requires the `asset.read` permission. + /// Retrieve assets by city + /// + /// Retrieve a list of assets with each asset belonging to a different city. This endpoint is used on the places pages to show a single thumbnail for each city the user has assets in. /// /// Note: This method returns the HTTP [Response]. Future getAssetsByCityWithHttpInfo() async { @@ -44,7 +46,9 @@ class SearchApi { ); } - /// This endpoint requires the `asset.read` permission. + /// Retrieve assets by city + /// + /// Retrieve a list of assets with each asset belonging to a different city. This endpoint is used on the places pages to show a single thumbnail for each city the user has assets in. Future?> getAssetsByCity() async { final response = await getAssetsByCityWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -63,7 +67,9 @@ class SearchApi { return null; } - /// This endpoint requires the `asset.read` permission. + /// Retrieve explore data + /// + /// Retrieve data for the explore section, such as popular people and places. /// /// Note: This method returns the HTTP [Response]. Future getExploreDataWithHttpInfo() async { @@ -91,7 +97,9 @@ class SearchApi { ); } - /// This endpoint requires the `asset.read` permission. + /// Retrieve explore data + /// + /// Retrieve data for the explore section, such as popular people and places. Future?> getExploreData() async { final response = await getExploreDataWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -110,7 +118,9 @@ class SearchApi { return null; } - /// This endpoint requires the `asset.read` permission. + /// Retrieve search suggestions + /// + /// Retrieve search suggestions based on partial input. This endpoint is used for typeahead search features. /// /// Note: This method returns the HTTP [Response]. /// @@ -175,7 +185,9 @@ class SearchApi { ); } - /// This endpoint requires the `asset.read` permission. + /// Retrieve search suggestions + /// + /// Retrieve search suggestions based on partial input. This endpoint is used for typeahead search features. /// /// Parameters: /// @@ -211,7 +223,9 @@ class SearchApi { return null; } - /// This endpoint requires the `asset.statistics` permission. + /// Search asset statistics + /// + /// Retrieve statistical data about assets based on search criteria, such as the total matching count. /// /// Note: This method returns the HTTP [Response]. /// @@ -243,7 +257,9 @@ class SearchApi { ); } - /// This endpoint requires the `asset.statistics` permission. + /// Search asset statistics + /// + /// Retrieve statistical data about assets based on search criteria, such as the total matching count. /// /// Parameters: /// @@ -263,7 +279,9 @@ class SearchApi { return null; } - /// This endpoint requires the `asset.read` permission. + /// Search assets by metadata + /// + /// Search for assets based on various metadata criteria. /// /// Note: This method returns the HTTP [Response]. /// @@ -295,7 +313,9 @@ class SearchApi { ); } - /// This endpoint requires the `asset.read` permission. + /// Search assets by metadata + /// + /// Search for assets based on various metadata criteria. /// /// Parameters: /// @@ -315,7 +335,9 @@ class SearchApi { return null; } - /// This endpoint requires the `asset.read` permission. + /// Search large assets + /// + /// Search for assets that are considered large based on specified criteria. /// /// Note: This method returns the HTTP [Response]. /// @@ -506,7 +528,9 @@ class SearchApi { ); } - /// This endpoint requires the `asset.read` permission. + /// Search large assets + /// + /// Search for assets that are considered large based on specified criteria. /// /// Parameters: /// @@ -591,7 +615,9 @@ class SearchApi { return null; } - /// This endpoint requires the `person.read` permission. + /// Search people + /// + /// Search for people by name. /// /// Note: This method returns the HTTP [Response]. /// @@ -630,7 +656,9 @@ class SearchApi { ); } - /// This endpoint requires the `person.read` permission. + /// Search people + /// + /// Search for people by name. /// /// Parameters: /// @@ -655,7 +683,9 @@ class SearchApi { return null; } - /// This endpoint requires the `asset.read` permission. + /// Search places + /// + /// Search for places by name. /// /// Note: This method returns the HTTP [Response]. /// @@ -689,7 +719,9 @@ class SearchApi { ); } - /// This endpoint requires the `asset.read` permission. + /// Search places + /// + /// Search for places by name. /// /// Parameters: /// @@ -712,7 +744,9 @@ class SearchApi { return null; } - /// This endpoint requires the `asset.read` permission. + /// Search random assets + /// + /// Retrieve a random selection of assets based on the provided criteria. /// /// Note: This method returns the HTTP [Response]. /// @@ -744,7 +778,9 @@ class SearchApi { ); } - /// This endpoint requires the `asset.read` permission. + /// Search random assets + /// + /// Retrieve a random selection of assets based on the provided criteria. /// /// Parameters: /// @@ -767,7 +803,9 @@ class SearchApi { return null; } - /// This endpoint requires the `asset.read` permission. + /// Smart asset search + /// + /// Perform a smart search for assets by using machine learning vectors to determine relevance. /// /// Note: This method returns the HTTP [Response]. /// @@ -799,7 +837,9 @@ class SearchApi { ); } - /// This endpoint requires the `asset.read` permission. + /// Smart asset search + /// + /// Perform a smart search for assets by using machine learning vectors to determine relevance. /// /// Parameters: /// diff --git a/mobile/openapi/lib/api/server_api.dart b/mobile/openapi/lib/api/server_api.dart index 9fa8f2016d..f5b70a9ea4 100644 --- a/mobile/openapi/lib/api/server_api.dart +++ b/mobile/openapi/lib/api/server_api.dart @@ -16,7 +16,9 @@ class ServerApi { final ApiClient apiClient; - /// This endpoint is an admin-only route, and requires the `serverLicense.delete` permission. + /// Delete server product key + /// + /// Delete the currently set server product key. /// /// Note: This method returns the HTTP [Response]. Future deleteServerLicenseWithHttpInfo() async { @@ -44,7 +46,9 @@ class ServerApi { ); } - /// This endpoint is an admin-only route, and requires the `serverLicense.delete` permission. + /// Delete server product key + /// + /// Delete the currently set server product key. Future deleteServerLicense() async { final response = await deleteServerLicenseWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -52,7 +56,9 @@ class ServerApi { } } - /// This endpoint requires the `server.about` permission. + /// Get server information + /// + /// Retrieve a list of information about the server. /// /// Note: This method returns the HTTP [Response]. Future getAboutInfoWithHttpInfo() async { @@ -80,7 +86,9 @@ class ServerApi { ); } - /// This endpoint requires the `server.about` permission. + /// Get server information + /// + /// Retrieve a list of information about the server. Future getAboutInfo() async { final response = await getAboutInfoWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -96,7 +104,9 @@ class ServerApi { return null; } - /// This endpoint requires the `server.apkLinks` permission. + /// Get APK links + /// + /// Retrieve links to the APKs for the current server version. /// /// Note: This method returns the HTTP [Response]. Future getApkLinksWithHttpInfo() async { @@ -124,7 +134,9 @@ class ServerApi { ); } - /// This endpoint requires the `server.apkLinks` permission. + /// Get APK links + /// + /// Retrieve links to the APKs for the current server version. Future getApkLinks() async { final response = await getApkLinksWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -140,7 +152,11 @@ class ServerApi { return null; } - /// Performs an HTTP 'GET /server/config' operation and returns the [Response]. + /// Get config + /// + /// Retrieve the current server configuration. + /// + /// Note: This method returns the HTTP [Response]. Future getServerConfigWithHttpInfo() async { // ignore: prefer_const_declarations final apiPath = r'/server/config'; @@ -166,6 +182,9 @@ class ServerApi { ); } + /// Get config + /// + /// Retrieve the current server configuration. Future getServerConfig() async { final response = await getServerConfigWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -181,7 +200,11 @@ class ServerApi { return null; } - /// Performs an HTTP 'GET /server/features' operation and returns the [Response]. + /// Get features + /// + /// Retrieve available features supported by this server. + /// + /// Note: This method returns the HTTP [Response]. Future getServerFeaturesWithHttpInfo() async { // ignore: prefer_const_declarations final apiPath = r'/server/features'; @@ -207,6 +230,9 @@ class ServerApi { ); } + /// Get features + /// + /// Retrieve available features supported by this server. Future getServerFeatures() async { final response = await getServerFeaturesWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -222,7 +248,9 @@ class ServerApi { return null; } - /// This endpoint is an admin-only route, and requires the `serverLicense.read` permission. + /// Get product key + /// + /// Retrieve information about whether the server currently has a product key registered. /// /// Note: This method returns the HTTP [Response]. Future getServerLicenseWithHttpInfo() async { @@ -250,7 +278,9 @@ class ServerApi { ); } - /// This endpoint is an admin-only route, and requires the `serverLicense.read` permission. + /// Get product key + /// + /// Retrieve information about whether the server currently has a product key registered. Future getServerLicense() async { final response = await getServerLicenseWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -266,7 +296,9 @@ class ServerApi { return null; } - /// This endpoint is an admin-only route, and requires the `server.statistics` permission. + /// Get statistics + /// + /// Retrieve statistics about the entire Immich instance such as asset counts. /// /// Note: This method returns the HTTP [Response]. Future getServerStatisticsWithHttpInfo() async { @@ -294,7 +326,9 @@ class ServerApi { ); } - /// This endpoint is an admin-only route, and requires the `server.statistics` permission. + /// Get statistics + /// + /// Retrieve statistics about the entire Immich instance such as asset counts. Future getServerStatistics() async { final response = await getServerStatisticsWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -310,7 +344,11 @@ class ServerApi { return null; } - /// Performs an HTTP 'GET /server/version' operation and returns the [Response]. + /// Get server version + /// + /// Retrieve the current server version in semantic versioning (semver) format. + /// + /// Note: This method returns the HTTP [Response]. Future getServerVersionWithHttpInfo() async { // ignore: prefer_const_declarations final apiPath = r'/server/version'; @@ -336,6 +374,9 @@ class ServerApi { ); } + /// Get server version + /// + /// Retrieve the current server version in semantic versioning (semver) format. Future getServerVersion() async { final response = await getServerVersionWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -351,7 +392,9 @@ class ServerApi { return null; } - /// This endpoint requires the `server.storage` permission. + /// Get storage + /// + /// Retrieve the current storage utilization information of the server. /// /// Note: This method returns the HTTP [Response]. Future getStorageWithHttpInfo() async { @@ -379,7 +422,9 @@ class ServerApi { ); } - /// This endpoint requires the `server.storage` permission. + /// Get storage + /// + /// Retrieve the current storage utilization information of the server. Future getStorage() async { final response = await getStorageWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -395,7 +440,11 @@ class ServerApi { return null; } - /// Performs an HTTP 'GET /server/media-types' operation and returns the [Response]. + /// Get supported media types + /// + /// Retrieve all media types supported by the server. + /// + /// Note: This method returns the HTTP [Response]. Future getSupportedMediaTypesWithHttpInfo() async { // ignore: prefer_const_declarations final apiPath = r'/server/media-types'; @@ -421,6 +470,9 @@ class ServerApi { ); } + /// Get supported media types + /// + /// Retrieve all media types supported by the server. Future getSupportedMediaTypes() async { final response = await getSupportedMediaTypesWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -436,7 +488,11 @@ class ServerApi { return null; } - /// Performs an HTTP 'GET /server/theme' operation and returns the [Response]. + /// Get theme + /// + /// Retrieve the custom CSS, if existent. + /// + /// Note: This method returns the HTTP [Response]. Future getThemeWithHttpInfo() async { // ignore: prefer_const_declarations final apiPath = r'/server/theme'; @@ -462,6 +518,9 @@ class ServerApi { ); } + /// Get theme + /// + /// Retrieve the custom CSS, if existent. Future getTheme() async { final response = await getThemeWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -477,7 +536,9 @@ class ServerApi { return null; } - /// This endpoint requires the `server.versionCheck` permission. + /// Get version check status + /// + /// Retrieve information about the last time the version check ran. /// /// Note: This method returns the HTTP [Response]. Future getVersionCheckWithHttpInfo() async { @@ -505,7 +566,9 @@ class ServerApi { ); } - /// This endpoint requires the `server.versionCheck` permission. + /// Get version check status + /// + /// Retrieve information about the last time the version check ran. Future getVersionCheck() async { final response = await getVersionCheckWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -521,7 +584,11 @@ class ServerApi { return null; } - /// Performs an HTTP 'GET /server/version-history' operation and returns the [Response]. + /// Get version history + /// + /// Retrieve a list of past versions the server has been on. + /// + /// Note: This method returns the HTTP [Response]. Future getVersionHistoryWithHttpInfo() async { // ignore: prefer_const_declarations final apiPath = r'/server/version-history'; @@ -547,6 +614,9 @@ class ServerApi { ); } + /// Get version history + /// + /// Retrieve a list of past versions the server has been on. Future?> getVersionHistory() async { final response = await getVersionHistoryWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -565,7 +635,11 @@ class ServerApi { return null; } - /// Performs an HTTP 'GET /server/ping' operation and returns the [Response]. + /// Ping + /// + /// Pong + /// + /// Note: This method returns the HTTP [Response]. Future pingServerWithHttpInfo() async { // ignore: prefer_const_declarations final apiPath = r'/server/ping'; @@ -591,6 +665,9 @@ class ServerApi { ); } + /// Ping + /// + /// Pong Future pingServer() async { final response = await pingServerWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -606,7 +683,9 @@ class ServerApi { return null; } - /// This endpoint is an admin-only route, and requires the `serverLicense.update` permission. + /// Set server product key + /// + /// Validate and set the server product key if successful. /// /// Note: This method returns the HTTP [Response]. /// @@ -638,7 +717,9 @@ class ServerApi { ); } - /// This endpoint is an admin-only route, and requires the `serverLicense.update` permission. + /// Set server product key + /// + /// Validate and set the server product key if successful. /// /// Parameters: /// diff --git a/mobile/openapi/lib/api/sessions_api.dart b/mobile/openapi/lib/api/sessions_api.dart index 63528d17a7..da508059bc 100644 --- a/mobile/openapi/lib/api/sessions_api.dart +++ b/mobile/openapi/lib/api/sessions_api.dart @@ -16,7 +16,9 @@ class SessionsApi { final ApiClient apiClient; - /// This endpoint requires the `session.create` permission. + /// Create a session + /// + /// Create a session as a child to the current session. This endpoint is used for casting. /// /// Note: This method returns the HTTP [Response]. /// @@ -48,7 +50,9 @@ class SessionsApi { ); } - /// This endpoint requires the `session.create` permission. + /// Create a session + /// + /// Create a session as a child to the current session. This endpoint is used for casting. /// /// Parameters: /// @@ -68,7 +72,9 @@ class SessionsApi { return null; } - /// This endpoint requires the `session.delete` permission. + /// Delete all sessions + /// + /// Delete all sessions for the user. This will not delete the current session. /// /// Note: This method returns the HTTP [Response]. Future deleteAllSessionsWithHttpInfo() async { @@ -96,7 +102,9 @@ class SessionsApi { ); } - /// This endpoint requires the `session.delete` permission. + /// Delete all sessions + /// + /// Delete all sessions for the user. This will not delete the current session. Future deleteAllSessions() async { final response = await deleteAllSessionsWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -104,7 +112,9 @@ class SessionsApi { } } - /// This endpoint requires the `session.delete` permission. + /// Delete a session + /// + /// Delete a specific session by id. /// /// Note: This method returns the HTTP [Response]. /// @@ -137,7 +147,9 @@ class SessionsApi { ); } - /// This endpoint requires the `session.delete` permission. + /// Delete a session + /// + /// Delete a specific session by id. /// /// Parameters: /// @@ -149,7 +161,9 @@ class SessionsApi { } } - /// This endpoint requires the `session.read` permission. + /// Retrieve sessions + /// + /// Retrieve a list of sessions for the user. /// /// Note: This method returns the HTTP [Response]. Future getSessionsWithHttpInfo() async { @@ -177,7 +191,9 @@ class SessionsApi { ); } - /// This endpoint requires the `session.read` permission. + /// Retrieve sessions + /// + /// Retrieve a list of sessions for the user. Future?> getSessions() async { final response = await getSessionsWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -196,7 +212,9 @@ class SessionsApi { return null; } - /// This endpoint requires the `session.lock` permission. + /// Lock a session + /// + /// Lock a specific session by id. /// /// Note: This method returns the HTTP [Response]. /// @@ -229,7 +247,9 @@ class SessionsApi { ); } - /// This endpoint requires the `session.lock` permission. + /// Lock a session + /// + /// Lock a specific session by id. /// /// Parameters: /// @@ -241,7 +261,9 @@ class SessionsApi { } } - /// This endpoint requires the `session.update` permission. + /// Update a session + /// + /// Update a specific session identified by id. /// /// Note: This method returns the HTTP [Response]. /// @@ -276,7 +298,9 @@ class SessionsApi { ); } - /// This endpoint requires the `session.update` permission. + /// Update a session + /// + /// Update a specific session identified by id. /// /// Parameters: /// diff --git a/mobile/openapi/lib/api/shared_links_api.dart b/mobile/openapi/lib/api/shared_links_api.dart index e32c566754..79106e5db6 100644 --- a/mobile/openapi/lib/api/shared_links_api.dart +++ b/mobile/openapi/lib/api/shared_links_api.dart @@ -16,7 +16,12 @@ class SharedLinksApi { final ApiClient apiClient; - /// Performs an HTTP 'PUT /shared-links/{id}/assets' operation and returns the [Response]. + /// Add assets to a shared link + /// + /// Add assets to a specific shared link by its ID. This endpoint is only relevant for shared link of type individual. + /// + /// Note: This method returns the HTTP [Response]. + /// /// Parameters: /// /// * [String] id (required): @@ -59,6 +64,10 @@ class SharedLinksApi { ); } + /// Add assets to a shared link + /// + /// Add assets to a specific shared link by its ID. This endpoint is only relevant for shared link of type individual. + /// /// Parameters: /// /// * [String] id (required): @@ -86,7 +95,9 @@ class SharedLinksApi { return null; } - /// This endpoint requires the `sharedLink.create` permission. + /// Create a shared link + /// + /// Create a new shared link. /// /// Note: This method returns the HTTP [Response]. /// @@ -118,7 +129,9 @@ class SharedLinksApi { ); } - /// This endpoint requires the `sharedLink.create` permission. + /// Create a shared link + /// + /// Create a new shared link. /// /// Parameters: /// @@ -138,7 +151,9 @@ class SharedLinksApi { return null; } - /// This endpoint requires the `sharedLink.read` permission. + /// Retrieve all shared links + /// + /// Retrieve a list of all shared links. /// /// Note: This method returns the HTTP [Response]. /// @@ -174,7 +189,9 @@ class SharedLinksApi { ); } - /// This endpoint requires the `sharedLink.read` permission. + /// Retrieve all shared links + /// + /// Retrieve a list of all shared links. /// /// Parameters: /// @@ -197,17 +214,22 @@ class SharedLinksApi { return null; } - /// Performs an HTTP 'GET /shared-links/me' operation and returns the [Response]. + /// Retrieve current shared link + /// + /// Retrieve the current shared link associated with authentication method. + /// + /// Note: This method returns the HTTP [Response]. + /// /// Parameters: /// - /// * [String] password: - /// - /// * [String] token: - /// /// * [String] key: /// + /// * [String] password: + /// /// * [String] slug: - Future getMySharedLinkWithHttpInfo({ String? password, String? token, String? key, String? slug, }) async { + /// + /// * [String] token: + Future getMySharedLinkWithHttpInfo({ String? key, String? password, String? slug, String? token, }) async { // ignore: prefer_const_declarations final apiPath = r'/shared-links/me'; @@ -218,18 +240,18 @@ class SharedLinksApi { final headerParams = {}; final formParams = {}; - if (password != null) { - queryParams.addAll(_queryParams('', 'password', password)); - } - if (token != null) { - queryParams.addAll(_queryParams('', 'token', token)); - } if (key != null) { queryParams.addAll(_queryParams('', 'key', key)); } + if (password != null) { + queryParams.addAll(_queryParams('', 'password', password)); + } if (slug != null) { queryParams.addAll(_queryParams('', 'slug', slug)); } + if (token != null) { + queryParams.addAll(_queryParams('', 'token', token)); + } const contentTypes = []; @@ -245,17 +267,21 @@ class SharedLinksApi { ); } + /// Retrieve current shared link + /// + /// Retrieve the current shared link associated with authentication method. + /// /// Parameters: /// - /// * [String] password: - /// - /// * [String] token: - /// /// * [String] key: /// + /// * [String] password: + /// /// * [String] slug: - Future getMySharedLink({ String? password, String? token, String? key, String? slug, }) async { - final response = await getMySharedLinkWithHttpInfo( password: password, token: token, key: key, slug: slug, ); + /// + /// * [String] token: + Future getMySharedLink({ String? key, String? password, String? slug, String? token, }) async { + final response = await getMySharedLinkWithHttpInfo( key: key, password: password, slug: slug, token: token, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -269,7 +295,9 @@ class SharedLinksApi { return null; } - /// This endpoint requires the `sharedLink.read` permission. + /// Retrieve a shared link + /// + /// Retrieve a specific shared link by its ID. /// /// Note: This method returns the HTTP [Response]. /// @@ -302,7 +330,9 @@ class SharedLinksApi { ); } - /// This endpoint requires the `sharedLink.read` permission. + /// Retrieve a shared link + /// + /// Retrieve a specific shared link by its ID. /// /// Parameters: /// @@ -322,7 +352,9 @@ class SharedLinksApi { return null; } - /// This endpoint requires the `sharedLink.delete` permission. + /// Delete a shared link + /// + /// Delete a specific shared link by its ID. /// /// Note: This method returns the HTTP [Response]. /// @@ -355,7 +387,9 @@ class SharedLinksApi { ); } - /// This endpoint requires the `sharedLink.delete` permission. + /// Delete a shared link + /// + /// Delete a specific shared link by its ID. /// /// Parameters: /// @@ -367,7 +401,12 @@ class SharedLinksApi { } } - /// Performs an HTTP 'DELETE /shared-links/{id}/assets' operation and returns the [Response]. + /// Remove assets from a shared link + /// + /// Remove assets from a specific shared link by its ID. This endpoint is only relevant for shared link of type individual. + /// + /// Note: This method returns the HTTP [Response]. + /// /// Parameters: /// /// * [String] id (required): @@ -410,6 +449,10 @@ class SharedLinksApi { ); } + /// Remove assets from a shared link + /// + /// Remove assets from a specific shared link by its ID. This endpoint is only relevant for shared link of type individual. + /// /// Parameters: /// /// * [String] id (required): @@ -437,7 +480,9 @@ class SharedLinksApi { return null; } - /// This endpoint requires the `sharedLink.update` permission. + /// Update a shared link + /// + /// Update an existing shared link by its ID. /// /// Note: This method returns the HTTP [Response]. /// @@ -472,7 +517,9 @@ class SharedLinksApi { ); } - /// This endpoint requires the `sharedLink.update` permission. + /// Update a shared link + /// + /// Update an existing shared link by its ID. /// /// Parameters: /// diff --git a/mobile/openapi/lib/api/stacks_api.dart b/mobile/openapi/lib/api/stacks_api.dart index 0f76f3396b..66fa1881ac 100644 --- a/mobile/openapi/lib/api/stacks_api.dart +++ b/mobile/openapi/lib/api/stacks_api.dart @@ -16,7 +16,9 @@ class StacksApi { final ApiClient apiClient; - /// This endpoint requires the `stack.create` permission. + /// Create a stack + /// + /// Create a new stack by providing a name and a list of asset IDs to include in the stack. If any of the provided asset IDs are primary assets of an existing stack, the existing stack will be merged into the newly created stack. /// /// Note: This method returns the HTTP [Response]. /// @@ -48,7 +50,9 @@ class StacksApi { ); } - /// This endpoint requires the `stack.create` permission. + /// Create a stack + /// + /// Create a new stack by providing a name and a list of asset IDs to include in the stack. If any of the provided asset IDs are primary assets of an existing stack, the existing stack will be merged into the newly created stack. /// /// Parameters: /// @@ -68,7 +72,9 @@ class StacksApi { return null; } - /// This endpoint requires the `stack.delete` permission. + /// Delete a stack + /// + /// Delete a specific stack by its ID. /// /// Note: This method returns the HTTP [Response]. /// @@ -101,7 +107,9 @@ class StacksApi { ); } - /// This endpoint requires the `stack.delete` permission. + /// Delete a stack + /// + /// Delete a specific stack by its ID. /// /// Parameters: /// @@ -113,7 +121,9 @@ class StacksApi { } } - /// This endpoint requires the `stack.delete` permission. + /// Delete stacks + /// + /// Delete multiple stacks by providing a list of stack IDs. /// /// Note: This method returns the HTTP [Response]. /// @@ -145,7 +155,9 @@ class StacksApi { ); } - /// This endpoint requires the `stack.delete` permission. + /// Delete stacks + /// + /// Delete multiple stacks by providing a list of stack IDs. /// /// Parameters: /// @@ -157,7 +169,9 @@ class StacksApi { } } - /// This endpoint requires the `stack.read` permission. + /// Retrieve a stack + /// + /// Retrieve a specific stack by its ID. /// /// Note: This method returns the HTTP [Response]. /// @@ -190,7 +204,9 @@ class StacksApi { ); } - /// This endpoint requires the `stack.read` permission. + /// Retrieve a stack + /// + /// Retrieve a specific stack by its ID. /// /// Parameters: /// @@ -210,7 +226,9 @@ class StacksApi { return null; } - /// This endpoint requires the `stack.update` permission. + /// Remove an asset from a stack + /// + /// Remove a specific asset from a stack by providing the stack ID and asset ID. /// /// Note: This method returns the HTTP [Response]. /// @@ -246,7 +264,9 @@ class StacksApi { ); } - /// This endpoint requires the `stack.update` permission. + /// Remove an asset from a stack + /// + /// Remove a specific asset from a stack by providing the stack ID and asset ID. /// /// Parameters: /// @@ -260,7 +280,9 @@ class StacksApi { } } - /// This endpoint requires the `stack.read` permission. + /// Retrieve stacks + /// + /// Retrieve a list of stacks. /// /// Note: This method returns the HTTP [Response]. /// @@ -296,7 +318,9 @@ class StacksApi { ); } - /// This endpoint requires the `stack.read` permission. + /// Retrieve stacks + /// + /// Retrieve a list of stacks. /// /// Parameters: /// @@ -319,7 +343,9 @@ class StacksApi { return null; } - /// This endpoint requires the `stack.update` permission. + /// Update a stack + /// + /// Update an existing stack by its ID. /// /// Note: This method returns the HTTP [Response]. /// @@ -354,7 +380,9 @@ class StacksApi { ); } - /// This endpoint requires the `stack.update` permission. + /// Update a stack + /// + /// Update an existing stack by its ID. /// /// Parameters: /// diff --git a/mobile/openapi/lib/api/sync_api.dart b/mobile/openapi/lib/api/sync_api.dart index 9e594d6ace..b1a3e61455 100644 --- a/mobile/openapi/lib/api/sync_api.dart +++ b/mobile/openapi/lib/api/sync_api.dart @@ -16,7 +16,9 @@ class SyncApi { final ApiClient apiClient; - /// This endpoint requires the `syncCheckpoint.delete` permission. + /// Delete acknowledgements + /// + /// Delete specific synchronization acknowledgments. /// /// Note: This method returns the HTTP [Response]. /// @@ -48,7 +50,9 @@ class SyncApi { ); } - /// This endpoint requires the `syncCheckpoint.delete` permission. + /// Delete acknowledgements + /// + /// Delete specific synchronization acknowledgments. /// /// Parameters: /// @@ -60,7 +64,12 @@ class SyncApi { } } - /// Performs an HTTP 'POST /sync/delta-sync' operation and returns the [Response]. + /// Get delta sync for user + /// + /// This property was deprecated in v2.0.0. Retrieve changed assets since the last sync for the authenticated user. + /// + /// Note: This method returns the HTTP [Response]. + /// /// Parameters: /// /// * [AssetDeltaSyncDto] assetDeltaSyncDto (required): @@ -89,6 +98,10 @@ class SyncApi { ); } + /// Get delta sync for user + /// + /// This property was deprecated in v2.0.0. Retrieve changed assets since the last sync for the authenticated user. + /// /// Parameters: /// /// * [AssetDeltaSyncDto] assetDeltaSyncDto (required): @@ -107,7 +120,12 @@ class SyncApi { return null; } - /// Performs an HTTP 'POST /sync/full-sync' operation and returns the [Response]. + /// Get full sync for user + /// + /// This property was deprecated in v2.0.0. Retrieve all assets for a full synchronization for the authenticated user. + /// + /// Note: This method returns the HTTP [Response]. + /// /// Parameters: /// /// * [AssetFullSyncDto] assetFullSyncDto (required): @@ -136,6 +154,10 @@ class SyncApi { ); } + /// Get full sync for user + /// + /// This property was deprecated in v2.0.0. Retrieve all assets for a full synchronization for the authenticated user. + /// /// Parameters: /// /// * [AssetFullSyncDto] assetFullSyncDto (required): @@ -157,7 +179,9 @@ class SyncApi { return null; } - /// This endpoint requires the `syncCheckpoint.read` permission. + /// Retrieve acknowledgements + /// + /// Retrieve the synchronization acknowledgments for the current session. /// /// Note: This method returns the HTTP [Response]. Future getSyncAckWithHttpInfo() async { @@ -185,7 +209,9 @@ class SyncApi { ); } - /// This endpoint requires the `syncCheckpoint.read` permission. + /// Retrieve acknowledgements + /// + /// Retrieve the synchronization acknowledgments for the current session. Future?> getSyncAck() async { final response = await getSyncAckWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -204,7 +230,9 @@ class SyncApi { return null; } - /// This endpoint requires the `sync.stream` permission. + /// Stream sync changes + /// + /// Retrieve a JSON lines streamed response of changes for synchronization. This endpoint is used by the mobile app to efficiently stay up to date with changes. /// /// Note: This method returns the HTTP [Response]. /// @@ -236,7 +264,9 @@ class SyncApi { ); } - /// This endpoint requires the `sync.stream` permission. + /// Stream sync changes + /// + /// Retrieve a JSON lines streamed response of changes for synchronization. This endpoint is used by the mobile app to efficiently stay up to date with changes. /// /// Parameters: /// @@ -248,7 +278,9 @@ class SyncApi { } } - /// This endpoint requires the `syncCheckpoint.update` permission. + /// Acknowledge changes + /// + /// Send a list of synchronization acknowledgements to confirm that the latest changes have been received. /// /// Note: This method returns the HTTP [Response]. /// @@ -280,7 +312,9 @@ class SyncApi { ); } - /// This endpoint requires the `syncCheckpoint.update` permission. + /// Acknowledge changes + /// + /// Send a list of synchronization acknowledgements to confirm that the latest changes have been received. /// /// Parameters: /// diff --git a/mobile/openapi/lib/api/system_config_api.dart b/mobile/openapi/lib/api/system_config_api.dart index 2ab3879b8a..b04da71273 100644 --- a/mobile/openapi/lib/api/system_config_api.dart +++ b/mobile/openapi/lib/api/system_config_api.dart @@ -16,7 +16,9 @@ class SystemConfigApi { final ApiClient apiClient; - /// This endpoint is an admin-only route, and requires the `systemConfig.read` permission. + /// Get system configuration + /// + /// Retrieve the current system configuration. /// /// Note: This method returns the HTTP [Response]. Future getConfigWithHttpInfo() async { @@ -44,7 +46,9 @@ class SystemConfigApi { ); } - /// This endpoint is an admin-only route, and requires the `systemConfig.read` permission. + /// Get system configuration + /// + /// Retrieve the current system configuration. Future getConfig() async { final response = await getConfigWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -60,7 +64,9 @@ class SystemConfigApi { return null; } - /// This endpoint is an admin-only route, and requires the `systemConfig.read` permission. + /// Get system configuration defaults + /// + /// Retrieve the default values for the system configuration. /// /// Note: This method returns the HTTP [Response]. Future getConfigDefaultsWithHttpInfo() async { @@ -88,7 +94,9 @@ class SystemConfigApi { ); } - /// This endpoint is an admin-only route, and requires the `systemConfig.read` permission. + /// Get system configuration defaults + /// + /// Retrieve the default values for the system configuration. Future getConfigDefaults() async { final response = await getConfigDefaultsWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -104,7 +112,9 @@ class SystemConfigApi { return null; } - /// This endpoint is an admin-only route, and requires the `systemConfig.read` permission. + /// Get storage template options + /// + /// Retrieve exemplary storage template options. /// /// Note: This method returns the HTTP [Response]. Future getStorageTemplateOptionsWithHttpInfo() async { @@ -132,7 +142,9 @@ class SystemConfigApi { ); } - /// This endpoint is an admin-only route, and requires the `systemConfig.read` permission. + /// Get storage template options + /// + /// Retrieve exemplary storage template options. Future getStorageTemplateOptions() async { final response = await getStorageTemplateOptionsWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -148,7 +160,9 @@ class SystemConfigApi { return null; } - /// This endpoint is an admin-only route, and requires the `systemConfig.update` permission. + /// Update system configuration + /// + /// Update the system configuration with a new system configuration. /// /// Note: This method returns the HTTP [Response]. /// @@ -180,7 +194,9 @@ class SystemConfigApi { ); } - /// This endpoint is an admin-only route, and requires the `systemConfig.update` permission. + /// Update system configuration + /// + /// Update the system configuration with a new system configuration. /// /// Parameters: /// diff --git a/mobile/openapi/lib/api/system_metadata_api.dart b/mobile/openapi/lib/api/system_metadata_api.dart index f6b9bad1d6..63fd7628ec 100644 --- a/mobile/openapi/lib/api/system_metadata_api.dart +++ b/mobile/openapi/lib/api/system_metadata_api.dart @@ -16,7 +16,9 @@ class SystemMetadataApi { final ApiClient apiClient; - /// This endpoint is an admin-only route, and requires the `systemMetadata.read` permission. + /// Retrieve admin onboarding + /// + /// Retrieve the current admin onboarding status. /// /// Note: This method returns the HTTP [Response]. Future getAdminOnboardingWithHttpInfo() async { @@ -44,7 +46,9 @@ class SystemMetadataApi { ); } - /// This endpoint is an admin-only route, and requires the `systemMetadata.read` permission. + /// Retrieve admin onboarding + /// + /// Retrieve the current admin onboarding status. Future getAdminOnboarding() async { final response = await getAdminOnboardingWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -60,7 +64,9 @@ class SystemMetadataApi { return null; } - /// This endpoint is an admin-only route, and requires the `systemMetadata.read` permission. + /// Retrieve reverse geocoding state + /// + /// Retrieve the current state of the reverse geocoding import. /// /// Note: This method returns the HTTP [Response]. Future getReverseGeocodingStateWithHttpInfo() async { @@ -88,7 +94,9 @@ class SystemMetadataApi { ); } - /// This endpoint is an admin-only route, and requires the `systemMetadata.read` permission. + /// Retrieve reverse geocoding state + /// + /// Retrieve the current state of the reverse geocoding import. Future getReverseGeocodingState() async { final response = await getReverseGeocodingStateWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -104,7 +112,9 @@ class SystemMetadataApi { return null; } - /// This endpoint is an admin-only route, and requires the `systemMetadata.read` permission. + /// Retrieve version check state + /// + /// Retrieve the current state of the version check process. /// /// Note: This method returns the HTTP [Response]. Future getVersionCheckStateWithHttpInfo() async { @@ -132,7 +142,9 @@ class SystemMetadataApi { ); } - /// This endpoint is an admin-only route, and requires the `systemMetadata.read` permission. + /// Retrieve version check state + /// + /// Retrieve the current state of the version check process. Future getVersionCheckState() async { final response = await getVersionCheckStateWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -148,7 +160,9 @@ class SystemMetadataApi { return null; } - /// This endpoint is an admin-only route, and requires the `systemMetadata.update` permission. + /// Update admin onboarding + /// + /// Update the admin onboarding status. /// /// Note: This method returns the HTTP [Response]. /// @@ -180,7 +194,9 @@ class SystemMetadataApi { ); } - /// This endpoint is an admin-only route, and requires the `systemMetadata.update` permission. + /// Update admin onboarding + /// + /// Update the admin onboarding status. /// /// Parameters: /// diff --git a/mobile/openapi/lib/api/tags_api.dart b/mobile/openapi/lib/api/tags_api.dart index a0cdb91acf..a6840f9483 100644 --- a/mobile/openapi/lib/api/tags_api.dart +++ b/mobile/openapi/lib/api/tags_api.dart @@ -16,7 +16,9 @@ class TagsApi { final ApiClient apiClient; - /// This endpoint requires the `tag.asset` permission. + /// Tag assets + /// + /// Add multiple tags to multiple assets in a single request. /// /// Note: This method returns the HTTP [Response]. /// @@ -48,7 +50,9 @@ class TagsApi { ); } - /// This endpoint requires the `tag.asset` permission. + /// Tag assets + /// + /// Add multiple tags to multiple assets in a single request. /// /// Parameters: /// @@ -68,7 +72,9 @@ class TagsApi { return null; } - /// This endpoint requires the `tag.create` permission. + /// Create a tag + /// + /// Create a new tag by providing a name and optional color. /// /// Note: This method returns the HTTP [Response]. /// @@ -100,7 +106,9 @@ class TagsApi { ); } - /// This endpoint requires the `tag.create` permission. + /// Create a tag + /// + /// Create a new tag by providing a name and optional color. /// /// Parameters: /// @@ -120,7 +128,9 @@ class TagsApi { return null; } - /// This endpoint requires the `tag.delete` permission. + /// Delete a tag + /// + /// Delete a specific tag by its ID. /// /// Note: This method returns the HTTP [Response]. /// @@ -153,7 +163,9 @@ class TagsApi { ); } - /// This endpoint requires the `tag.delete` permission. + /// Delete a tag + /// + /// Delete a specific tag by its ID. /// /// Parameters: /// @@ -165,7 +177,9 @@ class TagsApi { } } - /// This endpoint requires the `tag.read` permission. + /// Retrieve tags + /// + /// Retrieve a list of all tags. /// /// Note: This method returns the HTTP [Response]. Future getAllTagsWithHttpInfo() async { @@ -193,7 +207,9 @@ class TagsApi { ); } - /// This endpoint requires the `tag.read` permission. + /// Retrieve tags + /// + /// Retrieve a list of all tags. Future?> getAllTags() async { final response = await getAllTagsWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -212,7 +228,9 @@ class TagsApi { return null; } - /// This endpoint requires the `tag.read` permission. + /// Retrieve a tag + /// + /// Retrieve a specific tag by its ID. /// /// Note: This method returns the HTTP [Response]. /// @@ -245,7 +263,9 @@ class TagsApi { ); } - /// This endpoint requires the `tag.read` permission. + /// Retrieve a tag + /// + /// Retrieve a specific tag by its ID. /// /// Parameters: /// @@ -265,7 +285,9 @@ class TagsApi { return null; } - /// This endpoint requires the `tag.asset` permission. + /// Tag assets + /// + /// Add a tag to all the specified assets. /// /// Note: This method returns the HTTP [Response]. /// @@ -300,7 +322,9 @@ class TagsApi { ); } - /// This endpoint requires the `tag.asset` permission. + /// Tag assets + /// + /// Add a tag to all the specified assets. /// /// Parameters: /// @@ -325,7 +349,9 @@ class TagsApi { return null; } - /// This endpoint requires the `tag.asset` permission. + /// Untag assets + /// + /// Remove a tag from all the specified assets. /// /// Note: This method returns the HTTP [Response]. /// @@ -360,7 +386,9 @@ class TagsApi { ); } - /// This endpoint requires the `tag.asset` permission. + /// Untag assets + /// + /// Remove a tag from all the specified assets. /// /// Parameters: /// @@ -385,7 +413,9 @@ class TagsApi { return null; } - /// This endpoint requires the `tag.update` permission. + /// Update a tag + /// + /// Update an existing tag identified by its ID. /// /// Note: This method returns the HTTP [Response]. /// @@ -420,7 +450,9 @@ class TagsApi { ); } - /// This endpoint requires the `tag.update` permission. + /// Update a tag + /// + /// Update an existing tag identified by its ID. /// /// Parameters: /// @@ -442,7 +474,9 @@ class TagsApi { return null; } - /// This endpoint requires the `tag.create` permission. + /// Upsert tags + /// + /// Create or update multiple tags in a single request. /// /// Note: This method returns the HTTP [Response]. /// @@ -474,7 +508,9 @@ class TagsApi { ); } - /// This endpoint requires the `tag.create` permission. + /// Upsert tags + /// + /// Create or update multiple tags in a single request. /// /// Parameters: /// diff --git a/mobile/openapi/lib/api/timeline_api.dart b/mobile/openapi/lib/api/timeline_api.dart index 70ac076c9d..2afcea20ff 100644 --- a/mobile/openapi/lib/api/timeline_api.dart +++ b/mobile/openapi/lib/api/timeline_api.dart @@ -16,7 +16,9 @@ class TimelineApi { final ApiClient apiClient; - /// This endpoint requires the `asset.read` permission. + /// Get time bucket + /// + /// Retrieve a string of all asset ids in a given time bucket. /// /// Note: This method returns the HTTP [Response]. /// @@ -127,7 +129,9 @@ class TimelineApi { ); } - /// This endpoint requires the `asset.read` permission. + /// Get time bucket + /// + /// Retrieve a string of all asset ids in a given time bucket. /// /// Parameters: /// @@ -185,7 +189,9 @@ class TimelineApi { return null; } - /// This endpoint requires the `asset.read` permission. + /// Get time buckets + /// + /// Retrieve a list of all minimal time buckets. /// /// Note: This method returns the HTTP [Response]. /// @@ -292,7 +298,9 @@ class TimelineApi { ); } - /// This endpoint requires the `asset.read` permission. + /// Get time buckets + /// + /// Retrieve a list of all minimal time buckets. /// /// Parameters: /// diff --git a/mobile/openapi/lib/api/trash_api.dart b/mobile/openapi/lib/api/trash_api.dart index 480d19960a..f1dcbb8896 100644 --- a/mobile/openapi/lib/api/trash_api.dart +++ b/mobile/openapi/lib/api/trash_api.dart @@ -16,7 +16,9 @@ class TrashApi { final ApiClient apiClient; - /// This endpoint requires the `asset.delete` permission. + /// Empty trash + /// + /// Permanently delete all items in the trash. /// /// Note: This method returns the HTTP [Response]. Future emptyTrashWithHttpInfo() async { @@ -44,7 +46,9 @@ class TrashApi { ); } - /// This endpoint requires the `asset.delete` permission. + /// Empty trash + /// + /// Permanently delete all items in the trash. Future emptyTrash() async { final response = await emptyTrashWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -60,7 +64,9 @@ class TrashApi { return null; } - /// This endpoint requires the `asset.delete` permission. + /// Restore assets + /// + /// Restore specific assets from the trash. /// /// Note: This method returns the HTTP [Response]. /// @@ -92,7 +98,9 @@ class TrashApi { ); } - /// This endpoint requires the `asset.delete` permission. + /// Restore assets + /// + /// Restore specific assets from the trash. /// /// Parameters: /// @@ -112,7 +120,9 @@ class TrashApi { return null; } - /// This endpoint requires the `asset.delete` permission. + /// Restore trash + /// + /// Restore all items in the trash. /// /// Note: This method returns the HTTP [Response]. Future restoreTrashWithHttpInfo() async { @@ -140,7 +150,9 @@ class TrashApi { ); } - /// This endpoint requires the `asset.delete` permission. + /// Restore trash + /// + /// Restore all items in the trash. Future restoreTrash() async { final response = await restoreTrashWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { diff --git a/mobile/openapi/lib/api/users_admin_api.dart b/mobile/openapi/lib/api/users_admin_api.dart index 4a4301ff43..842a3ebc5b 100644 --- a/mobile/openapi/lib/api/users_admin_api.dart +++ b/mobile/openapi/lib/api/users_admin_api.dart @@ -16,7 +16,9 @@ class UsersAdminApi { final ApiClient apiClient; - /// This endpoint is an admin-only route, and requires the `adminUser.create` permission. + /// Create a user + /// + /// Create a new user. /// /// Note: This method returns the HTTP [Response]. /// @@ -48,7 +50,9 @@ class UsersAdminApi { ); } - /// This endpoint is an admin-only route, and requires the `adminUser.create` permission. + /// Create a user + /// + /// Create a new user. /// /// Parameters: /// @@ -68,7 +72,9 @@ class UsersAdminApi { return null; } - /// This endpoint is an admin-only route, and requires the `adminUser.delete` permission. + /// Delete a user + /// + /// Delete a user. /// /// Note: This method returns the HTTP [Response]. /// @@ -103,7 +109,9 @@ class UsersAdminApi { ); } - /// This endpoint is an admin-only route, and requires the `adminUser.delete` permission. + /// Delete a user + /// + /// Delete a user. /// /// Parameters: /// @@ -125,7 +133,9 @@ class UsersAdminApi { return null; } - /// This endpoint is an admin-only route, and requires the `adminUser.read` permission. + /// Retrieve a user + /// + /// Retrieve a specific user by their ID. /// /// Note: This method returns the HTTP [Response]. /// @@ -158,7 +168,9 @@ class UsersAdminApi { ); } - /// This endpoint is an admin-only route, and requires the `adminUser.read` permission. + /// Retrieve a user + /// + /// Retrieve a specific user by their ID. /// /// Parameters: /// @@ -178,7 +190,9 @@ class UsersAdminApi { return null; } - /// This endpoint is an admin-only route, and requires the `adminUser.read` permission. + /// Retrieve user preferences + /// + /// Retrieve the preferences of a specific user. /// /// Note: This method returns the HTTP [Response]. /// @@ -211,7 +225,9 @@ class UsersAdminApi { ); } - /// This endpoint is an admin-only route, and requires the `adminUser.read` permission. + /// Retrieve user preferences + /// + /// Retrieve the preferences of a specific user. /// /// Parameters: /// @@ -231,7 +247,9 @@ class UsersAdminApi { return null; } - /// This endpoint is an admin-only route, and requires the `adminSession.read` permission. + /// Retrieve user sessions + /// + /// Retrieve all sessions for a specific user. /// /// Note: This method returns the HTTP [Response]. /// @@ -264,7 +282,9 @@ class UsersAdminApi { ); } - /// This endpoint is an admin-only route, and requires the `adminSession.read` permission. + /// Retrieve user sessions + /// + /// Retrieve all sessions for a specific user. /// /// Parameters: /// @@ -287,7 +307,9 @@ class UsersAdminApi { return null; } - /// This endpoint is an admin-only route, and requires the `adminUser.read` permission. + /// Retrieve user statistics + /// + /// Retrieve asset statistics for a specific user. /// /// Note: This method returns the HTTP [Response]. /// @@ -336,7 +358,9 @@ class UsersAdminApi { ); } - /// This endpoint is an admin-only route, and requires the `adminUser.read` permission. + /// Retrieve user statistics + /// + /// Retrieve asset statistics for a specific user. /// /// Parameters: /// @@ -362,7 +386,9 @@ class UsersAdminApi { return null; } - /// This endpoint is an admin-only route, and requires the `adminUser.delete` permission. + /// Restore a deleted user + /// + /// Restore a previously deleted user. /// /// Note: This method returns the HTTP [Response]. /// @@ -395,7 +421,9 @@ class UsersAdminApi { ); } - /// This endpoint is an admin-only route, and requires the `adminUser.delete` permission. + /// Restore a deleted user + /// + /// Restore a previously deleted user. /// /// Parameters: /// @@ -415,7 +443,9 @@ class UsersAdminApi { return null; } - /// This endpoint is an admin-only route, and requires the `adminUser.read` permission. + /// Search users + /// + /// Search for users. /// /// Note: This method returns the HTTP [Response]. /// @@ -456,7 +486,9 @@ class UsersAdminApi { ); } - /// This endpoint is an admin-only route, and requires the `adminUser.read` permission. + /// Search users + /// + /// Search for users. /// /// Parameters: /// @@ -481,7 +513,9 @@ class UsersAdminApi { return null; } - /// This endpoint is an admin-only route, and requires the `adminUser.update` permission. + /// Update a user + /// + /// Update an existing user. /// /// Note: This method returns the HTTP [Response]. /// @@ -516,7 +550,9 @@ class UsersAdminApi { ); } - /// This endpoint is an admin-only route, and requires the `adminUser.update` permission. + /// Update a user + /// + /// Update an existing user. /// /// Parameters: /// @@ -538,7 +574,9 @@ class UsersAdminApi { return null; } - /// This endpoint is an admin-only route, and requires the `adminUser.update` permission. + /// Update user preferences + /// + /// Update the preferences of a specific user. /// /// Note: This method returns the HTTP [Response]. /// @@ -573,7 +611,9 @@ class UsersAdminApi { ); } - /// This endpoint is an admin-only route, and requires the `adminUser.update` permission. + /// Update user preferences + /// + /// Update the preferences of a specific user. /// /// Parameters: /// diff --git a/mobile/openapi/lib/api/users_api.dart b/mobile/openapi/lib/api/users_api.dart index c8891ba0c2..f398d9c813 100644 --- a/mobile/openapi/lib/api/users_api.dart +++ b/mobile/openapi/lib/api/users_api.dart @@ -16,7 +16,9 @@ class UsersApi { final ApiClient apiClient; - /// This endpoint requires the `userProfileImage.update` permission. + /// Create user profile image + /// + /// Upload and set a new profile image for the current user. /// /// Note: This method returns the HTTP [Response]. /// @@ -58,7 +60,9 @@ class UsersApi { ); } - /// This endpoint requires the `userProfileImage.update` permission. + /// Create user profile image + /// + /// Upload and set a new profile image for the current user. /// /// Parameters: /// @@ -78,7 +82,9 @@ class UsersApi { return null; } - /// This endpoint requires the `userProfileImage.delete` permission. + /// Delete user profile image + /// + /// Delete the profile image of the current user. /// /// Note: This method returns the HTTP [Response]. Future deleteProfileImageWithHttpInfo() async { @@ -106,7 +112,9 @@ class UsersApi { ); } - /// This endpoint requires the `userProfileImage.delete` permission. + /// Delete user profile image + /// + /// Delete the profile image of the current user. Future deleteProfileImage() async { final response = await deleteProfileImageWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -114,7 +122,9 @@ class UsersApi { } } - /// This endpoint requires the `userLicense.delete` permission. + /// Delete user product key + /// + /// Delete the registered product key for the current user. /// /// Note: This method returns the HTTP [Response]. Future deleteUserLicenseWithHttpInfo() async { @@ -142,7 +152,9 @@ class UsersApi { ); } - /// This endpoint requires the `userLicense.delete` permission. + /// Delete user product key + /// + /// Delete the registered product key for the current user. Future deleteUserLicense() async { final response = await deleteUserLicenseWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -150,7 +162,9 @@ class UsersApi { } } - /// This endpoint requires the `userOnboarding.delete` permission. + /// Delete user onboarding + /// + /// Delete the onboarding status of the current user. /// /// Note: This method returns the HTTP [Response]. Future deleteUserOnboardingWithHttpInfo() async { @@ -178,7 +192,9 @@ class UsersApi { ); } - /// This endpoint requires the `userOnboarding.delete` permission. + /// Delete user onboarding + /// + /// Delete the onboarding status of the current user. Future deleteUserOnboarding() async { final response = await deleteUserOnboardingWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -186,7 +202,9 @@ class UsersApi { } } - /// This endpoint requires the `userPreference.read` permission. + /// Get my preferences + /// + /// Retrieve the preferences for the current user. /// /// Note: This method returns the HTTP [Response]. Future getMyPreferencesWithHttpInfo() async { @@ -214,7 +232,9 @@ class UsersApi { ); } - /// This endpoint requires the `userPreference.read` permission. + /// Get my preferences + /// + /// Retrieve the preferences for the current user. Future getMyPreferences() async { final response = await getMyPreferencesWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -230,7 +250,9 @@ class UsersApi { return null; } - /// This endpoint requires the `user.read` permission. + /// Get current user + /// + /// Retrieve information about the user making the API request. /// /// Note: This method returns the HTTP [Response]. Future getMyUserWithHttpInfo() async { @@ -258,7 +280,9 @@ class UsersApi { ); } - /// This endpoint requires the `user.read` permission. + /// Get current user + /// + /// Retrieve information about the user making the API request. Future getMyUser() async { final response = await getMyUserWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -274,7 +298,9 @@ class UsersApi { return null; } - /// This endpoint requires the `userProfileImage.read` permission. + /// Retrieve user profile image + /// + /// Retrieve the profile image file for a user. /// /// Note: This method returns the HTTP [Response]. /// @@ -307,7 +333,9 @@ class UsersApi { ); } - /// This endpoint requires the `userProfileImage.read` permission. + /// Retrieve user profile image + /// + /// Retrieve the profile image file for a user. /// /// Parameters: /// @@ -327,7 +355,9 @@ class UsersApi { return null; } - /// This endpoint requires the `user.read` permission. + /// Retrieve a user + /// + /// Retrieve a specific user by their ID. /// /// Note: This method returns the HTTP [Response]. /// @@ -360,7 +390,9 @@ class UsersApi { ); } - /// This endpoint requires the `user.read` permission. + /// Retrieve a user + /// + /// Retrieve a specific user by their ID. /// /// Parameters: /// @@ -380,7 +412,9 @@ class UsersApi { return null; } - /// This endpoint requires the `userLicense.read` permission. + /// Retrieve user product key + /// + /// Retrieve information about whether the current user has a registered product key. /// /// Note: This method returns the HTTP [Response]. Future getUserLicenseWithHttpInfo() async { @@ -408,7 +442,9 @@ class UsersApi { ); } - /// This endpoint requires the `userLicense.read` permission. + /// Retrieve user product key + /// + /// Retrieve information about whether the current user has a registered product key. Future getUserLicense() async { final response = await getUserLicenseWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -424,7 +460,9 @@ class UsersApi { return null; } - /// This endpoint requires the `userOnboarding.read` permission. + /// Retrieve user onboarding + /// + /// Retrieve the onboarding status of the current user. /// /// Note: This method returns the HTTP [Response]. Future getUserOnboardingWithHttpInfo() async { @@ -452,7 +490,9 @@ class UsersApi { ); } - /// This endpoint requires the `userOnboarding.read` permission. + /// Retrieve user onboarding + /// + /// Retrieve the onboarding status of the current user. Future getUserOnboarding() async { final response = await getUserOnboardingWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -468,7 +508,9 @@ class UsersApi { return null; } - /// This endpoint requires the `user.read` permission. + /// Get all users + /// + /// Retrieve a list of all users on the server. /// /// Note: This method returns the HTTP [Response]. Future searchUsersWithHttpInfo() async { @@ -496,7 +538,9 @@ class UsersApi { ); } - /// This endpoint requires the `user.read` permission. + /// Get all users + /// + /// Retrieve a list of all users on the server. Future?> searchUsers() async { final response = await searchUsersWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -515,7 +559,9 @@ class UsersApi { return null; } - /// This endpoint requires the `userLicense.update` permission. + /// Set user product key + /// + /// Register a product key for the current user. /// /// Note: This method returns the HTTP [Response]. /// @@ -547,7 +593,9 @@ class UsersApi { ); } - /// This endpoint requires the `userLicense.update` permission. + /// Set user product key + /// + /// Register a product key for the current user. /// /// Parameters: /// @@ -567,7 +615,9 @@ class UsersApi { return null; } - /// This endpoint requires the `userOnboarding.update` permission. + /// Update user onboarding + /// + /// Update the onboarding status of the current user. /// /// Note: This method returns the HTTP [Response]. /// @@ -599,7 +649,9 @@ class UsersApi { ); } - /// This endpoint requires the `userOnboarding.update` permission. + /// Update user onboarding + /// + /// Update the onboarding status of the current user. /// /// Parameters: /// @@ -619,7 +671,9 @@ class UsersApi { return null; } - /// This endpoint requires the `userPreference.update` permission. + /// Update my preferences + /// + /// Update the preferences of the current user. /// /// Note: This method returns the HTTP [Response]. /// @@ -651,7 +705,9 @@ class UsersApi { ); } - /// This endpoint requires the `userPreference.update` permission. + /// Update my preferences + /// + /// Update the preferences of the current user. /// /// Parameters: /// @@ -671,7 +727,9 @@ class UsersApi { return null; } - /// This endpoint requires the `user.update` permission. + /// Update current user + /// + /// Update the current user making teh API request. /// /// Note: This method returns the HTTP [Response]. /// @@ -703,7 +761,9 @@ class UsersApi { ); } - /// This endpoint requires the `user.update` permission. + /// Update current user + /// + /// Update the current user making teh API request. /// /// Parameters: /// diff --git a/mobile/openapi/lib/api/view_api.dart b/mobile/openapi/lib/api/views_api.dart similarity index 83% rename from mobile/openapi/lib/api/view_api.dart rename to mobile/openapi/lib/api/views_api.dart index 1fcaec759c..a45e89d58f 100644 --- a/mobile/openapi/lib/api/view_api.dart +++ b/mobile/openapi/lib/api/views_api.dart @@ -11,12 +11,17 @@ part of openapi.api; -class ViewApi { - ViewApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; +class ViewsApi { + ViewsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; final ApiClient apiClient; - /// Performs an HTTP 'GET /view/folder' operation and returns the [Response]. + /// Retrieve assets by original path + /// + /// Retrieve assets that are children of a specific folder. + /// + /// Note: This method returns the HTTP [Response]. + /// /// Parameters: /// /// * [String] path (required): @@ -47,6 +52,10 @@ class ViewApi { ); } + /// Retrieve assets by original path + /// + /// Retrieve assets that are children of a specific folder. + /// /// Parameters: /// /// * [String] path (required): @@ -68,7 +77,11 @@ class ViewApi { return null; } - /// Performs an HTTP 'GET /view/folder/unique-paths' operation and returns the [Response]. + /// Retrieve unique paths + /// + /// Retrieve a list of unique folder paths from asset original paths. + /// + /// Note: This method returns the HTTP [Response]. Future getUniqueOriginalPathsWithHttpInfo() async { // ignore: prefer_const_declarations final apiPath = r'/view/folder/unique-paths'; @@ -94,6 +107,9 @@ class ViewApi { ); } + /// Retrieve unique paths + /// + /// Retrieve a list of unique folder paths from asset original paths. Future?> getUniqueOriginalPaths() async { final response = await getUniqueOriginalPathsWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { diff --git a/open-api/immich-openapi-specs.json b/open-api/immich-openapi-specs.json index ed3d7a0bab..c6dc9061e9 100644 --- a/open-api/immich-openapi-specs.json +++ b/open-api/immich-openapi-specs.json @@ -3,6 +3,7 @@ "paths": { "/activities": { "get": { + "description": "Returns a list of activities for the selected asset or album. The activities are returned in sorted order, with the oldest activities appearing first.", "operationId": "getActivities", "parameters": [ { @@ -75,13 +76,14 @@ "api_key": [] } ], + "summary": "List all activities", "tags": [ "Activities" ], - "x-immich-permission": "activity.read", - "description": "This endpoint requires the `activity.read` permission." + "x-immich-permission": "activity.read" }, "post": { + "description": "Create a like or a comment for an album, or an asset in an album.", "operationId": "createActivity", "parameters": [], "requestBody": { @@ -117,15 +119,16 @@ "api_key": [] } ], + "summary": "Create an activity", "tags": [ "Activities" ], - "x-immich-permission": "activity.create", - "description": "This endpoint requires the `activity.create` permission." + "x-immich-permission": "activity.create" } }, "/activities/statistics": { "get": { + "description": "Returns the number of likes and comments for a given album or asset in an album.", "operationId": "getActivityStatistics", "parameters": [ { @@ -170,15 +173,16 @@ "api_key": [] } ], + "summary": "Retrieve activity statistics", "tags": [ "Activities" ], - "x-immich-permission": "activity.statistics", - "description": "This endpoint requires the `activity.statistics` permission." + "x-immich-permission": "activity.statistics" } }, "/activities/{id}": { "delete": { + "description": "Removes a like or comment from a given album or asset in an album.", "operationId": "deleteActivity", "parameters": [ { @@ -207,15 +211,16 @@ "api_key": [] } ], + "summary": "Delete an activity", "tags": [ "Activities" ], - "x-immich-permission": "activity.delete", - "description": "This endpoint requires the `activity.delete` permission." + "x-immich-permission": "activity.delete" } }, "/admin/auth/unlink-all": { "post": { + "description": "Unlinks all OAuth accounts associated with user accounts in the system.", "operationId": "unlinkAllOAuthAccountsAdmin", "parameters": [], "responses": { @@ -234,16 +239,17 @@ "api_key": [] } ], + "summary": "Unlink all OAuth accounts", "tags": [ - "Auth (admin)" + "Authentication (admin)" ], "x-immich-admin-only": true, - "x-immich-permission": "adminAuth.unlinkAll", - "description": "This endpoint is an admin-only route, and requires the `adminAuth.unlinkAll` permission." + "x-immich-permission": "adminAuth.unlinkAll" } }, "/admin/notifications": { "post": { + "description": "Create a new notification for a specific user.", "operationId": "createNotification", "parameters": [], "requestBody": { @@ -279,14 +285,16 @@ "api_key": [] } ], + "summary": "Create a notification", "tags": [ - "Notifications (Admin)" + "Notifications (admin)" ], "x-immich-admin-only": true } }, "/admin/notifications/templates/{name}": { "post": { + "description": "Retrieve a preview of the provided email template.", "operationId": "getNotificationTemplateAdmin", "parameters": [ { @@ -331,14 +339,16 @@ "api_key": [] } ], + "summary": "Render email template", "tags": [ - "Notifications (Admin)" + "Notifications (admin)" ], "x-immich-admin-only": true } }, "/admin/notifications/test-email": { "post": { + "description": "Send a test email using the provided SMTP configuration.", "operationId": "sendTestEmailAdmin", "parameters": [], "requestBody": { @@ -374,14 +384,16 @@ "api_key": [] } ], + "summary": "Send test email", "tags": [ - "Notifications (Admin)" + "Notifications (admin)" ], "x-immich-admin-only": true } }, "/admin/users": { "get": { + "description": "Search for users.", "operationId": "searchUsersAdmin", "parameters": [ { @@ -428,14 +440,15 @@ "api_key": [] } ], + "summary": "Search users", "tags": [ "Users (admin)" ], "x-immich-admin-only": true, - "x-immich-permission": "adminUser.read", - "description": "This endpoint is an admin-only route, and requires the `adminUser.read` permission." + "x-immich-permission": "adminUser.read" }, "post": { + "description": "Create a new user.", "operationId": "createUserAdmin", "parameters": [], "requestBody": { @@ -471,16 +484,17 @@ "api_key": [] } ], + "summary": "Create a user", "tags": [ "Users (admin)" ], "x-immich-admin-only": true, - "x-immich-permission": "adminUser.create", - "description": "This endpoint is an admin-only route, and requires the `adminUser.create` permission." + "x-immich-permission": "adminUser.create" } }, "/admin/users/{id}": { "delete": { + "description": "Delete a user.", "operationId": "deleteUserAdmin", "parameters": [ { @@ -526,14 +540,15 @@ "api_key": [] } ], + "summary": "Delete a user", "tags": [ "Users (admin)" ], "x-immich-admin-only": true, - "x-immich-permission": "adminUser.delete", - "description": "This endpoint is an admin-only route, and requires the `adminUser.delete` permission." + "x-immich-permission": "adminUser.delete" }, "get": { + "description": "Retrieve a specific user by their ID.", "operationId": "getUserAdmin", "parameters": [ { @@ -569,14 +584,15 @@ "api_key": [] } ], + "summary": "Retrieve a user", "tags": [ "Users (admin)" ], "x-immich-admin-only": true, - "x-immich-permission": "adminUser.read", - "description": "This endpoint is an admin-only route, and requires the `adminUser.read` permission." + "x-immich-permission": "adminUser.read" }, "put": { + "description": "Update an existing user.", "operationId": "updateUserAdmin", "parameters": [ { @@ -622,16 +638,17 @@ "api_key": [] } ], + "summary": "Update a user", "tags": [ "Users (admin)" ], "x-immich-admin-only": true, - "x-immich-permission": "adminUser.update", - "description": "This endpoint is an admin-only route, and requires the `adminUser.update` permission." + "x-immich-permission": "adminUser.update" } }, "/admin/users/{id}/preferences": { "get": { + "description": "Retrieve the preferences of a specific user.", "operationId": "getUserPreferencesAdmin", "parameters": [ { @@ -667,14 +684,15 @@ "api_key": [] } ], + "summary": "Retrieve user preferences", "tags": [ "Users (admin)" ], "x-immich-admin-only": true, - "x-immich-permission": "adminUser.read", - "description": "This endpoint is an admin-only route, and requires the `adminUser.read` permission." + "x-immich-permission": "adminUser.read" }, "put": { + "description": "Update the preferences of a specific user.", "operationId": "updateUserPreferencesAdmin", "parameters": [ { @@ -720,16 +738,17 @@ "api_key": [] } ], + "summary": "Update user preferences", "tags": [ "Users (admin)" ], "x-immich-admin-only": true, - "x-immich-permission": "adminUser.update", - "description": "This endpoint is an admin-only route, and requires the `adminUser.update` permission." + "x-immich-permission": "adminUser.update" } }, "/admin/users/{id}/restore": { "post": { + "description": "Restore a previously deleted user.", "operationId": "restoreUserAdmin", "parameters": [ { @@ -765,16 +784,17 @@ "api_key": [] } ], + "summary": "Restore a deleted user", "tags": [ "Users (admin)" ], "x-immich-admin-only": true, - "x-immich-permission": "adminUser.delete", - "description": "This endpoint is an admin-only route, and requires the `adminUser.delete` permission." + "x-immich-permission": "adminUser.delete" } }, "/admin/users/{id}/sessions": { "get": { + "description": "Retrieve all sessions for a specific user.", "operationId": "getUserSessionsAdmin", "parameters": [ { @@ -813,16 +833,17 @@ "api_key": [] } ], + "summary": "Retrieve user sessions", "tags": [ "Users (admin)" ], "x-immich-admin-only": true, - "x-immich-permission": "adminSession.read", - "description": "This endpoint is an admin-only route, and requires the `adminSession.read` permission." + "x-immich-permission": "adminSession.read" } }, "/admin/users/{id}/statistics": { "get": { + "description": "Retrieve asset statistics for a specific user.", "operationId": "getUserStatisticsAdmin", "parameters": [ { @@ -882,16 +903,17 @@ "api_key": [] } ], + "summary": "Retrieve user statistics", "tags": [ "Users (admin)" ], "x-immich-admin-only": true, - "x-immich-permission": "adminUser.read", - "description": "This endpoint is an admin-only route, and requires the `adminUser.read` permission." + "x-immich-permission": "adminUser.read" } }, "/albums": { "get": { + "description": "Retrieve a list of albums available to the authenticated user.", "operationId": "getAllAlbums", "parameters": [ { @@ -939,13 +961,14 @@ "api_key": [] } ], + "summary": "List all albums", "tags": [ "Albums" ], - "x-immich-permission": "album.read", - "description": "This endpoint requires the `album.read` permission." + "x-immich-permission": "album.read" }, "post": { + "description": "Create a new album. The album can also be created with initial users and assets.", "operationId": "createAlbum", "parameters": [], "requestBody": { @@ -981,15 +1004,16 @@ "api_key": [] } ], + "summary": "Create an album", "tags": [ "Albums" ], - "x-immich-permission": "album.create", - "description": "This endpoint requires the `album.create` permission." + "x-immich-permission": "album.create" } }, "/albums/assets": { "put": { + "description": "Send a list of asset IDs and album IDs to add each asset to each album.", "operationId": "addAssetsToAlbums", "parameters": [ { @@ -1042,15 +1066,16 @@ "api_key": [] } ], + "summary": "Add assets to albums", "tags": [ "Albums" ], - "x-immich-permission": "albumAsset.create", - "description": "This endpoint requires the `albumAsset.create` permission." + "x-immich-permission": "albumAsset.create" } }, "/albums/statistics": { "get": { + "description": "Returns statistics about the albums available to the authenticated user.", "operationId": "getAlbumStatistics", "parameters": [], "responses": { @@ -1076,15 +1101,16 @@ "api_key": [] } ], + "summary": "Retrieve album statistics", "tags": [ "Albums" ], - "x-immich-permission": "album.statistics", - "description": "This endpoint requires the `album.statistics` permission." + "x-immich-permission": "album.statistics" } }, "/albums/{id}": { "delete": { + "description": "Delete a specific album by its ID. Note the album is initially trashed and then immediately scheduled for deletion, but relies on a background job to complete the process.", "operationId": "deleteAlbum", "parameters": [ { @@ -1113,13 +1139,14 @@ "api_key": [] } ], + "summary": "Delete an album", "tags": [ "Albums" ], - "x-immich-permission": "album.delete", - "description": "This endpoint requires the `album.delete` permission." + "x-immich-permission": "album.delete" }, "get": { + "description": "Retrieve information about a specific album by its ID.", "operationId": "getAlbumInfo", "parameters": [ { @@ -1179,13 +1206,14 @@ "api_key": [] } ], + "summary": "Retrieve an album", "tags": [ "Albums" ], - "x-immich-permission": "album.read", - "description": "This endpoint requires the `album.read` permission." + "x-immich-permission": "album.read" }, "patch": { + "description": "Update the information of a specific album by its ID. This endpoint can be used to update the album name, description, sort order, etc. However, it is not used to add or remove assets or users from the album.", "operationId": "updateAlbumInfo", "parameters": [ { @@ -1231,15 +1259,16 @@ "api_key": [] } ], + "summary": "Update an album", "tags": [ "Albums" ], - "x-immich-permission": "album.update", - "description": "This endpoint requires the `album.update` permission." + "x-immich-permission": "album.update" } }, "/albums/{id}/assets": { "delete": { + "description": "Remove multiple assets from a specific album by its ID.", "operationId": "removeAssetFromAlbum", "parameters": [ { @@ -1288,13 +1317,14 @@ "api_key": [] } ], + "summary": "Remove assets from an album", "tags": [ "Albums" ], - "x-immich-permission": "albumAsset.delete", - "description": "This endpoint requires the `albumAsset.delete` permission." + "x-immich-permission": "albumAsset.delete" }, "put": { + "description": "Add multiple assets to a specific album by its ID.", "operationId": "addAssetsToAlbum", "parameters": [ { @@ -1359,15 +1389,16 @@ "api_key": [] } ], + "summary": "Add assets to an album", "tags": [ "Albums" ], - "x-immich-permission": "albumAsset.create", - "description": "This endpoint requires the `albumAsset.create` permission." + "x-immich-permission": "albumAsset.create" } }, "/albums/{id}/user/{userId}": { "delete": { + "description": "Remove a user from an album. Use an ID of \"me\" to leave a shared album.", "operationId": "removeUserFromAlbum", "parameters": [ { @@ -1404,13 +1435,14 @@ "api_key": [] } ], + "summary": "Remove user from album", "tags": [ "Albums" ], - "x-immich-permission": "albumUser.delete", - "description": "This endpoint requires the `albumUser.delete` permission." + "x-immich-permission": "albumUser.delete" }, "put": { + "description": "Change the role for a specific user in a specific album.", "operationId": "updateAlbumUser", "parameters": [ { @@ -1457,15 +1489,16 @@ "api_key": [] } ], + "summary": "Update user role", "tags": [ "Albums" ], - "x-immich-permission": "albumUser.update", - "description": "This endpoint requires the `albumUser.update` permission." + "x-immich-permission": "albumUser.update" } }, "/albums/{id}/users": { "put": { + "description": "Share an album with multiple users. Each user can be given a specific role in the album.", "operationId": "addUsersToAlbum", "parameters": [ { @@ -1511,15 +1544,16 @@ "api_key": [] } ], + "summary": "Share album with users", "tags": [ "Albums" ], - "x-immich-permission": "albumUser.create", - "description": "This endpoint requires the `albumUser.create` permission." + "x-immich-permission": "albumUser.create" } }, "/api-keys": { "get": { + "description": "Retrieve all API keys of the current user.", "operationId": "getApiKeys", "parameters": [], "responses": { @@ -1548,13 +1582,14 @@ "api_key": [] } ], + "summary": "List all API keys", "tags": [ - "API Keys" + "API keys" ], - "x-immich-permission": "apiKey.read", - "description": "This endpoint requires the `apiKey.read` permission." + "x-immich-permission": "apiKey.read" }, "post": { + "description": "Creates a new API key. It will be limited to the permissions specified.", "operationId": "createApiKey", "parameters": [], "requestBody": { @@ -1590,15 +1625,16 @@ "api_key": [] } ], + "summary": "Create an API key", "tags": [ - "API Keys" + "API keys" ], - "x-immich-permission": "apiKey.create", - "description": "This endpoint requires the `apiKey.create` permission." + "x-immich-permission": "apiKey.create" } }, "/api-keys/me": { "get": { + "description": "Retrieve the API key that is used to access this endpoint.", "operationId": "getMyApiKey", "parameters": [], "responses": { @@ -1624,13 +1660,15 @@ "api_key": [] } ], + "summary": "Retrieve the current API key", "tags": [ - "API Keys" + "API keys" ] } }, "/api-keys/{id}": { "delete": { + "description": "Deletes an API key identified by its ID. The current user must own this API key.", "operationId": "deleteApiKey", "parameters": [ { @@ -1659,13 +1697,14 @@ "api_key": [] } ], + "summary": "Delete an API key", "tags": [ - "API Keys" + "API keys" ], - "x-immich-permission": "apiKey.delete", - "description": "This endpoint requires the `apiKey.delete` permission." + "x-immich-permission": "apiKey.delete" }, "get": { + "description": "Retrieve an API key by its ID. The current user must own this API key.", "operationId": "getApiKey", "parameters": [ { @@ -1701,13 +1740,14 @@ "api_key": [] } ], + "summary": "Retrieve an API key", "tags": [ - "API Keys" + "API keys" ], - "x-immich-permission": "apiKey.read", - "description": "This endpoint requires the `apiKey.read` permission." + "x-immich-permission": "apiKey.read" }, "put": { + "description": "Updates the name and permissions of an API key by its ID. The current user must own this API key.", "operationId": "updateApiKey", "parameters": [ { @@ -1753,15 +1793,16 @@ "api_key": [] } ], + "summary": "Update an API key", "tags": [ - "API Keys" + "API keys" ], - "x-immich-permission": "apiKey.update", - "description": "This endpoint requires the `apiKey.update` permission." + "x-immich-permission": "apiKey.update" } }, "/assets": { "delete": { + "description": "Deletes multiple assets at the same time.", "operationId": "deleteAssets", "parameters": [], "requestBody": { @@ -1790,13 +1831,14 @@ "api_key": [] } ], + "summary": "Delete assets", "tags": [ "Assets" ], - "x-immich-permission": "asset.delete", - "description": "This endpoint requires the `asset.delete` permission." + "x-immich-permission": "asset.delete" }, "post": { + "description": "Uploads a new asset to the server.", "operationId": "uploadAsset", "parameters": [ { @@ -1859,13 +1901,14 @@ "api_key": [] } ], + "summary": "Upload asset", "tags": [ "Assets" ], - "x-immich-permission": "asset.upload", - "description": "This endpoint requires the `asset.upload` permission." + "x-immich-permission": "asset.upload" }, "put": { + "description": "Updates multiple assets at the same time.", "operationId": "updateAssets", "parameters": [], "requestBody": { @@ -1894,16 +1937,16 @@ "api_key": [] } ], + "summary": "Update assets", "tags": [ "Assets" ], - "x-immich-permission": "asset.update", - "description": "This endpoint requires the `asset.update` permission." + "x-immich-permission": "asset.update" } }, "/assets/bulk-upload-check": { "post": { - "description": "Checks if assets exist by checksums. This endpoint requires the `asset.upload` permission.", + "description": "Determine which assets have already been uploaded to the server based on their SHA1 checksums.", "operationId": "checkBulkUpload", "parameters": [], "requestBody": { @@ -1939,7 +1982,7 @@ "api_key": [] } ], - "summary": "checkBulkUpload", + "summary": "Check bulk upload", "tags": [ "Assets" ], @@ -1948,6 +1991,7 @@ }, "/assets/copy": { "put": { + "description": "Copy asset information like albums, tags, etc. from one asset to another.", "operationId": "copyAsset", "parameters": [], "requestBody": { @@ -1976,16 +2020,17 @@ "api_key": [] } ], + "summary": "Copy asset", "tags": [ "Assets" ], - "x-immich-permission": "asset.copy", - "description": "This endpoint requires the `asset.copy` permission." + "x-immich-permission": "asset.copy" } }, "/assets/device/{deviceId}": { "get": { - "description": "Get all asset of a device that are in the database, ID only.", + "deprecated": true, + "description": "This property was deprecated in v2.0.0. Get all asset of a device that are in the database, ID only.", "operationId": "getAllUserAssetsByDeviceId", "parameters": [ { @@ -2023,10 +2068,14 @@ "api_key": [] } ], - "summary": "getAllUserAssetsByDeviceId", + "summary": "Retrieve assets by device ID", "tags": [ - "Assets" - ] + "Assets", + "Deprecated" + ], + "x-immich-lifecycle": { + "deprecatedAt": "v2.0.0" + } } }, "/assets/exist": { @@ -2067,7 +2116,7 @@ "api_key": [] } ], - "summary": "checkExistingAssets", + "summary": "Check existing assets", "tags": [ "Assets" ] @@ -2075,6 +2124,7 @@ }, "/assets/jobs": { "post": { + "description": "Run a specific job on a set of assets.", "operationId": "runAssetJobs", "parameters": [], "requestBody": { @@ -2103,6 +2153,7 @@ "api_key": [] } ], + "summary": "Run an asset job", "tags": [ "Assets" ] @@ -2111,7 +2162,7 @@ "/assets/random": { "get": { "deprecated": true, - "description": "This property was deprecated in v1.116.0. This endpoint requires the `asset.read` permission.", + "description": "This property was deprecated in v1.116.0. Retrieve a specified number of random assets for the authenticated user.", "operationId": "getRandom", "parameters": [ { @@ -2150,6 +2201,7 @@ "api_key": [] } ], + "summary": "Get random assets", "tags": [ "Assets", "Deprecated" @@ -2162,6 +2214,7 @@ }, "/assets/statistics": { "get": { + "description": "Retrieve various statistics about the assets owned by the authenticated user.", "operationId": "getAssetStatistics", "parameters": [ { @@ -2212,15 +2265,16 @@ "api_key": [] } ], + "summary": "Get asset statistics", "tags": [ "Assets" ], - "x-immich-permission": "asset.statistics", - "description": "This endpoint requires the `asset.statistics` permission." + "x-immich-permission": "asset.statistics" } }, "/assets/{id}": { "get": { + "description": "Retrieve detailed information about a specific asset.", "operationId": "getAssetInfo", "parameters": [ { @@ -2272,13 +2326,14 @@ "api_key": [] } ], + "summary": "Retrieve an asset", "tags": [ "Assets" ], - "x-immich-permission": "asset.read", - "description": "This endpoint requires the `asset.read` permission." + "x-immich-permission": "asset.read" }, "put": { + "description": "Update information of a specific asset.", "operationId": "updateAsset", "parameters": [ { @@ -2324,15 +2379,16 @@ "api_key": [] } ], + "summary": "Update an asset", "tags": [ "Assets" ], - "x-immich-permission": "asset.update", - "description": "This endpoint requires the `asset.update` permission." + "x-immich-permission": "asset.update" } }, "/assets/{id}/metadata": { "get": { + "description": "Retrieve all metadata key-value pairs associated with the specified asset.", "operationId": "getAssetMetadata", "parameters": [ { @@ -2371,13 +2427,14 @@ "api_key": [] } ], + "summary": "Get asset metadata", "tags": [ "Assets" ], - "x-immich-permission": "asset.read", - "description": "This endpoint requires the `asset.read` permission." + "x-immich-permission": "asset.read" }, "put": { + "description": "Update or add metadata key-value pairs for the specified asset.", "operationId": "updateAssetMetadata", "parameters": [ { @@ -2426,15 +2483,16 @@ "api_key": [] } ], + "summary": "Update asset metadata", "tags": [ "Assets" ], - "x-immich-permission": "asset.update", - "description": "This endpoint requires the `asset.update` permission." + "x-immich-permission": "asset.update" } }, "/assets/{id}/metadata/{key}": { "delete": { + "description": "Delete a specific metadata key-value pair associated with the specified asset.", "operationId": "deleteAssetMetadata", "parameters": [ { @@ -2471,13 +2529,14 @@ "api_key": [] } ], + "summary": "Delete asset metadata by key", "tags": [ "Assets" ], - "x-immich-permission": "asset.update", - "description": "This endpoint requires the `asset.update` permission." + "x-immich-permission": "asset.update" }, "get": { + "description": "Retrieve the value of a specific metadata key associated with the specified asset.", "operationId": "getAssetMetadataByKey", "parameters": [ { @@ -2521,15 +2580,16 @@ "api_key": [] } ], + "summary": "Retrieve asset metadata by key", "tags": [ "Assets" ], - "x-immich-permission": "asset.read", - "description": "This endpoint requires the `asset.read` permission." + "x-immich-permission": "asset.read" } }, "/assets/{id}/ocr": { "get": { + "description": "Retrieve all OCR (Optical Character Recognition) data associated with the specified asset.", "operationId": "getAssetOcr", "parameters": [ { @@ -2568,15 +2628,16 @@ "api_key": [] } ], + "summary": "Retrieve asset OCR data", "tags": [ "Assets" ], - "x-immich-permission": "asset.read", - "description": "This endpoint requires the `asset.read` permission." + "x-immich-permission": "asset.read" } }, "/assets/{id}/original": { "get": { + "description": "Downloads the original file of the specified asset.", "operationId": "downloadAsset", "parameters": [ { @@ -2629,15 +2690,15 @@ "api_key": [] } ], + "summary": "Download original asset", "tags": [ "Assets" ], - "x-immich-permission": "asset.download", - "description": "This endpoint requires the `asset.download` permission." + "x-immich-permission": "asset.download" }, "put": { "deprecated": true, - "description": "This property was deprecated in v1.142.0. Replace the asset with new file, without changing its id. This endpoint requires the `asset.replace` permission.", + "description": "This property was deprecated in v1.142.0. Replace the asset with new file, without changing its id.", "operationId": "replaceAsset", "parameters": [ { @@ -2699,7 +2760,7 @@ "api_key": [] } ], - "summary": "Replace the asset with new file, without changing its id", + "summary": "Replace asset", "tags": [ "Assets", "Deprecated" @@ -2713,6 +2774,7 @@ }, "/assets/{id}/thumbnail": { "get": { + "description": "Retrieve the thumbnail image for the specified asset.", "operationId": "viewAsset", "parameters": [ { @@ -2773,15 +2835,16 @@ "api_key": [] } ], + "summary": "View asset thumbnail", "tags": [ "Assets" ], - "x-immich-permission": "asset.view", - "description": "This endpoint requires the `asset.view` permission." + "x-immich-permission": "asset.view" } }, "/assets/{id}/video/playback": { "get": { + "description": "Streams the video file for the specified asset. This endpoint also supports byte range requests.", "operationId": "playAssetVideo", "parameters": [ { @@ -2834,15 +2897,16 @@ "api_key": [] } ], + "summary": "Play asset video", "tags": [ "Assets" ], - "x-immich-permission": "asset.view", - "description": "This endpoint requires the `asset.view` permission." + "x-immich-permission": "asset.view" } }, "/auth/admin-sign-up": { "post": { + "description": "Create the first admin user in the system.", "operationId": "signUpAdmin", "parameters": [], "requestBody": { @@ -2867,6 +2931,7 @@ "description": "" } }, + "summary": "Register admin", "tags": [ "Authentication" ] @@ -2874,6 +2939,7 @@ }, "/auth/change-password": { "post": { + "description": "Change the password of the current user.", "operationId": "changePassword", "parameters": [], "requestBody": { @@ -2909,15 +2975,16 @@ "api_key": [] } ], + "summary": "Change password", "tags": [ "Authentication" ], - "x-immich-permission": "auth.changePassword", - "description": "This endpoint requires the `auth.changePassword` permission." + "x-immich-permission": "auth.changePassword" } }, "/auth/login": { "post": { + "description": "Login with username and password and receive a session token.", "operationId": "login", "parameters": [], "requestBody": { @@ -2942,6 +3009,7 @@ "description": "" } }, + "summary": "Login", "tags": [ "Authentication" ] @@ -2949,6 +3017,7 @@ }, "/auth/logout": { "post": { + "description": "Logout the current user and invalidate the session token.", "operationId": "logout", "parameters": [], "responses": { @@ -2974,6 +3043,7 @@ "api_key": [] } ], + "summary": "Logout", "tags": [ "Authentication" ] @@ -2981,6 +3051,7 @@ }, "/auth/pin-code": { "delete": { + "description": "Reset the pin code for the current user by providing the account password", "operationId": "resetPinCode", "parameters": [], "requestBody": { @@ -3009,13 +3080,14 @@ "api_key": [] } ], + "summary": "Reset pin code", "tags": [ "Authentication" ], - "x-immich-permission": "pinCode.delete", - "description": "This endpoint requires the `pinCode.delete` permission." + "x-immich-permission": "pinCode.delete" }, "post": { + "description": "Setup a new pin code for the current user.", "operationId": "setupPinCode", "parameters": [], "requestBody": { @@ -3044,13 +3116,14 @@ "api_key": [] } ], + "summary": "Setup pin code", "tags": [ "Authentication" ], - "x-immich-permission": "pinCode.create", - "description": "This endpoint requires the `pinCode.create` permission." + "x-immich-permission": "pinCode.create" }, "put": { + "description": "Change the pin code for the current user.", "operationId": "changePinCode", "parameters": [], "requestBody": { @@ -3079,15 +3152,16 @@ "api_key": [] } ], + "summary": "Change pin code", "tags": [ "Authentication" ], - "x-immich-permission": "pinCode.update", - "description": "This endpoint requires the `pinCode.update` permission." + "x-immich-permission": "pinCode.update" } }, "/auth/session/lock": { "post": { + "description": "Remove elevated access to locked assets from the current session.", "operationId": "lockAuthSession", "parameters": [], "responses": { @@ -3106,6 +3180,7 @@ "api_key": [] } ], + "summary": "Lock auth session", "tags": [ "Authentication" ] @@ -3113,6 +3188,7 @@ }, "/auth/session/unlock": { "post": { + "description": "Temporarily grant the session elevated access to locked assets by providing the correct PIN code.", "operationId": "unlockAuthSession", "parameters": [], "requestBody": { @@ -3141,6 +3217,7 @@ "api_key": [] } ], + "summary": "Unlock auth session", "tags": [ "Authentication" ] @@ -3148,6 +3225,7 @@ }, "/auth/status": { "get": { + "description": "Get information about the current session, including whether the user has a password, and if the session can access locked assets.", "operationId": "getAuthStatus", "parameters": [], "responses": { @@ -3173,6 +3251,7 @@ "api_key": [] } ], + "summary": "Retrieve auth status", "tags": [ "Authentication" ] @@ -3180,6 +3259,7 @@ }, "/auth/validateToken": { "post": { + "description": "Validate the current authorization method is still valid.", "operationId": "validateAccessToken", "parameters": [], "responses": { @@ -3205,6 +3285,7 @@ "api_key": [] } ], + "summary": "Validate access token", "tags": [ "Authentication" ] @@ -3212,6 +3293,7 @@ }, "/download/archive": { "post": { + "description": "Download a ZIP archive containing the specified assets. The assets must have been previously requested via the \"getDownloadInfo\" endpoint.", "operationId": "downloadArchive", "parameters": [ { @@ -3265,15 +3347,16 @@ "api_key": [] } ], + "summary": "Download asset archive", "tags": [ "Download" ], - "x-immich-permission": "asset.download", - "description": "This endpoint requires the `asset.download` permission." + "x-immich-permission": "asset.download" } }, "/download/info": { "post": { + "description": "Retrieve information about how to request a download for the specified assets or album. The response includes groups of assets that can be downloaded together.", "operationId": "getDownloadInfo", "parameters": [ { @@ -3326,15 +3409,16 @@ "api_key": [] } ], + "summary": "Retrieve download information", "tags": [ "Download" ], - "x-immich-permission": "asset.download", - "description": "This endpoint requires the `asset.download` permission." + "x-immich-permission": "asset.download" } }, "/duplicates": { "delete": { + "description": "Delete multiple duplicate assets specified by their IDs.", "operationId": "deleteDuplicates", "parameters": [], "requestBody": { @@ -3363,13 +3447,14 @@ "api_key": [] } ], + "summary": "Delete duplicates", "tags": [ "Duplicates" ], - "x-immich-permission": "duplicate.delete", - "description": "This endpoint requires the `duplicate.delete` permission." + "x-immich-permission": "duplicate.delete" }, "get": { + "description": "Retrieve a list of duplicate assets available to the authenticated user.", "operationId": "getAssetDuplicates", "parameters": [], "responses": { @@ -3398,15 +3483,16 @@ "api_key": [] } ], + "summary": "Retrieve duplicates", "tags": [ "Duplicates" ], - "x-immich-permission": "duplicate.read", - "description": "This endpoint requires the `duplicate.read` permission." + "x-immich-permission": "duplicate.read" } }, "/duplicates/{id}": { "delete": { + "description": "Delete a single duplicate asset specified by its ID.", "operationId": "deleteDuplicate", "parameters": [ { @@ -3435,15 +3521,16 @@ "api_key": [] } ], + "summary": "Delete a duplicate", "tags": [ "Duplicates" ], - "x-immich-permission": "duplicate.delete", - "description": "This endpoint requires the `duplicate.delete` permission." + "x-immich-permission": "duplicate.delete" } }, "/faces": { "get": { + "description": "Retrieve all faces belonging to an asset.", "operationId": "getFaces", "parameters": [ { @@ -3482,13 +3569,14 @@ "api_key": [] } ], + "summary": "Retrieve faces for asset", "tags": [ "Faces" ], - "x-immich-permission": "face.read", - "description": "This endpoint requires the `face.read` permission." + "x-immich-permission": "face.read" }, "post": { + "description": "Create a new face that has not been discovered by facial recognition. The content of the bounding box is considered a face.", "operationId": "createFace", "parameters": [], "requestBody": { @@ -3517,15 +3605,16 @@ "api_key": [] } ], + "summary": "Create a face", "tags": [ "Faces" ], - "x-immich-permission": "face.create", - "description": "This endpoint requires the `face.create` permission." + "x-immich-permission": "face.create" } }, "/faces/{id}": { "delete": { + "description": "Delete a face identified by the id. Optionally can be force deleted.", "operationId": "deleteFace", "parameters": [ { @@ -3564,13 +3653,14 @@ "api_key": [] } ], + "summary": "Delete a face", "tags": [ "Faces" ], - "x-immich-permission": "face.delete", - "description": "This endpoint requires the `face.delete` permission." + "x-immich-permission": "face.delete" }, "put": { + "description": "Re-assign the face provided in the body to the person identified by the id in the path parameter.", "operationId": "reassignFacesById", "parameters": [ { @@ -3616,15 +3706,16 @@ "api_key": [] } ], + "summary": "Re-assign a face to another person", "tags": [ "Faces" ], - "x-immich-permission": "face.update", - "description": "This endpoint requires the `face.update` permission." + "x-immich-permission": "face.update" } }, "/jobs": { "get": { + "description": "Retrieve the counts of the current queue, as well as the current status.", "operationId": "getAllJobsStatus", "parameters": [], "responses": { @@ -3650,14 +3741,15 @@ "api_key": [] } ], + "summary": "Retrieve queue counts and status", "tags": [ "Jobs" ], "x-immich-admin-only": true, - "x-immich-permission": "job.read", - "description": "This endpoint is an admin-only route, and requires the `job.read` permission." + "x-immich-permission": "job.read" }, "post": { + "description": "Run a specific job. Most jobs are queued automatically, but this endpoint allows for manual creation of a handful of jobs, including various cleanup tasks, as well as creating a new database backup.", "operationId": "createJob", "parameters": [], "requestBody": { @@ -3686,16 +3778,17 @@ "api_key": [] } ], + "summary": "Create a manual job", "tags": [ "Jobs" ], "x-immich-admin-only": true, - "x-immich-permission": "job.create", - "description": "This endpoint is an admin-only route, and requires the `job.create` permission." + "x-immich-permission": "job.create" } }, "/jobs/{id}": { "put": { + "description": "Queue all assets for a specific job type. Defaults to only queueing assets that have not yet been processed, but the force command can be used to re-process all assets.", "operationId": "sendJobCommand", "parameters": [ { @@ -3740,16 +3833,17 @@ "api_key": [] } ], + "summary": "Run jobs", "tags": [ "Jobs" ], "x-immich-admin-only": true, - "x-immich-permission": "job.create", - "description": "This endpoint is an admin-only route, and requires the `job.create` permission." + "x-immich-permission": "job.create" } }, "/libraries": { "get": { + "description": "Retrieve a list of external libraries.", "operationId": "getAllLibraries", "parameters": [], "responses": { @@ -3778,14 +3872,15 @@ "api_key": [] } ], + "summary": "Retrieve libraries", "tags": [ "Libraries" ], "x-immich-admin-only": true, - "x-immich-permission": "library.read", - "description": "This endpoint is an admin-only route, and requires the `library.read` permission." + "x-immich-permission": "library.read" }, "post": { + "description": "Create a new external library.", "operationId": "createLibrary", "parameters": [], "requestBody": { @@ -3821,16 +3916,17 @@ "api_key": [] } ], + "summary": "Create a library", "tags": [ "Libraries" ], "x-immich-admin-only": true, - "x-immich-permission": "library.create", - "description": "This endpoint is an admin-only route, and requires the `library.create` permission." + "x-immich-permission": "library.create" } }, "/libraries/{id}": { "delete": { + "description": "Delete an external library by its ID.", "operationId": "deleteLibrary", "parameters": [ { @@ -3859,14 +3955,15 @@ "api_key": [] } ], + "summary": "Delete a library", "tags": [ "Libraries" ], "x-immich-admin-only": true, - "x-immich-permission": "library.delete", - "description": "This endpoint is an admin-only route, and requires the `library.delete` permission." + "x-immich-permission": "library.delete" }, "get": { + "description": "Retrieve an external library by its ID.", "operationId": "getLibrary", "parameters": [ { @@ -3902,14 +3999,15 @@ "api_key": [] } ], + "summary": "Retrieve a library", "tags": [ "Libraries" ], "x-immich-admin-only": true, - "x-immich-permission": "library.read", - "description": "This endpoint is an admin-only route, and requires the `library.read` permission." + "x-immich-permission": "library.read" }, "put": { + "description": "Update an existing external library.", "operationId": "updateLibrary", "parameters": [ { @@ -3955,16 +4053,17 @@ "api_key": [] } ], + "summary": "Update a library", "tags": [ "Libraries" ], "x-immich-admin-only": true, - "x-immich-permission": "library.update", - "description": "This endpoint is an admin-only route, and requires the `library.update` permission." + "x-immich-permission": "library.update" } }, "/libraries/{id}/scan": { "post": { + "description": "Queue a scan for the external library to find and import new assets.", "operationId": "scanLibrary", "parameters": [ { @@ -3993,16 +4092,17 @@ "api_key": [] } ], + "summary": "Scan a library", "tags": [ "Libraries" ], "x-immich-admin-only": true, - "x-immich-permission": "library.update", - "description": "This endpoint is an admin-only route, and requires the `library.update` permission." + "x-immich-permission": "library.update" } }, "/libraries/{id}/statistics": { "get": { + "description": "Retrieve statistics for a specific external library, including number of videos, images, and storage usage.", "operationId": "getLibraryStatistics", "parameters": [ { @@ -4038,16 +4138,17 @@ "api_key": [] } ], + "summary": "Retrieve library statistics", "tags": [ "Libraries" ], "x-immich-admin-only": true, - "x-immich-permission": "library.statistics", - "description": "This endpoint is an admin-only route, and requires the `library.statistics` permission." + "x-immich-permission": "library.statistics" } }, "/libraries/{id}/validate": { "post": { + "description": "Validate the settings of an external library.", "operationId": "validate", "parameters": [ { @@ -4093,6 +4194,7 @@ "api_key": [] } ], + "summary": "Validate library settings", "tags": [ "Libraries" ], @@ -4101,24 +4203,9 @@ }, "/map/markers": { "get": { + "description": "Retrieve a list of latitude and longitude coordinates for every asset with location data.", "operationId": "getMapMarkers", "parameters": [ - { - "name": "isArchived", - "required": false, - "in": "query", - "schema": { - "type": "boolean" - } - }, - { - "name": "isFavorite", - "required": false, - "in": "query", - "schema": { - "type": "boolean" - } - }, { "name": "fileCreatedAfter", "required": false, @@ -4137,6 +4224,22 @@ "type": "string" } }, + { + "name": "isArchived", + "required": false, + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "isFavorite", + "required": false, + "in": "query", + "schema": { + "type": "boolean" + } + }, { "name": "withPartners", "required": false, @@ -4180,6 +4283,7 @@ "api_key": [] } ], + "summary": "Retrieve map markers", "tags": [ "Map" ] @@ -4187,6 +4291,7 @@ }, "/map/reverse-geocode": { "get": { + "description": "Retrieve location information (e.g., city, country) for given latitude and longitude coordinates.", "operationId": "reverseGeocode", "parameters": [ { @@ -4234,6 +4339,7 @@ "api_key": [] } ], + "summary": "Reverse geocode coordinates", "tags": [ "Map" ] @@ -4241,6 +4347,7 @@ }, "/memories": { "get": { + "description": "Retrieve a list of memories. Memories are sorted descending by creation date by default, although they can also be sorted in ascending order, or randomly.", "operationId": "searchMemories", "parameters": [ { @@ -4321,13 +4428,14 @@ "api_key": [] } ], + "summary": "Retrieve memories", "tags": [ "Memories" ], - "x-immich-permission": "memory.read", - "description": "This endpoint requires the `memory.read` permission." + "x-immich-permission": "memory.read" }, "post": { + "description": "Create a new memory by providing a name, description, and a list of asset IDs to include in the memory.", "operationId": "createMemory", "parameters": [], "requestBody": { @@ -4363,15 +4471,16 @@ "api_key": [] } ], + "summary": "Create a memory", "tags": [ "Memories" ], - "x-immich-permission": "memory.create", - "description": "This endpoint requires the `memory.create` permission." + "x-immich-permission": "memory.create" } }, "/memories/statistics": { "get": { + "description": "Retrieve statistics about memories, such as total count and other relevant metrics.", "operationId": "memoriesStatistics", "parameters": [ { @@ -4449,15 +4558,16 @@ "api_key": [] } ], + "summary": "Retrieve memories statistics", "tags": [ "Memories" ], - "x-immich-permission": "memory.statistics", - "description": "This endpoint requires the `memory.statistics` permission." + "x-immich-permission": "memory.statistics" } }, "/memories/{id}": { "delete": { + "description": "Delete a specific memory by its ID.", "operationId": "deleteMemory", "parameters": [ { @@ -4486,13 +4596,14 @@ "api_key": [] } ], + "summary": "Delete a memory", "tags": [ "Memories" ], - "x-immich-permission": "memory.delete", - "description": "This endpoint requires the `memory.delete` permission." + "x-immich-permission": "memory.delete" }, "get": { + "description": "Retrieve a specific memory by its ID.", "operationId": "getMemory", "parameters": [ { @@ -4528,13 +4639,14 @@ "api_key": [] } ], + "summary": "Retrieve a memory", "tags": [ "Memories" ], - "x-immich-permission": "memory.read", - "description": "This endpoint requires the `memory.read` permission." + "x-immich-permission": "memory.read" }, "put": { + "description": "Update an existing memory by its ID.", "operationId": "updateMemory", "parameters": [ { @@ -4580,15 +4692,16 @@ "api_key": [] } ], + "summary": "Update a memory", "tags": [ "Memories" ], - "x-immich-permission": "memory.update", - "description": "This endpoint requires the `memory.update` permission." + "x-immich-permission": "memory.update" } }, "/memories/{id}/assets": { "delete": { + "description": "Remove a list of asset IDs from a specific memory.", "operationId": "removeMemoryAssets", "parameters": [ { @@ -4637,13 +4750,14 @@ "api_key": [] } ], + "summary": "Remove assets from a memory", "tags": [ "Memories" ], - "x-immich-permission": "memoryAsset.delete", - "description": "This endpoint requires the `memoryAsset.delete` permission." + "x-immich-permission": "memoryAsset.delete" }, "put": { + "description": "Add a list of asset IDs to a specific memory.", "operationId": "addMemoryAssets", "parameters": [ { @@ -4692,15 +4806,16 @@ "api_key": [] } ], + "summary": "Add assets to a memory", "tags": [ "Memories" ], - "x-immich-permission": "memoryAsset.create", - "description": "This endpoint requires the `memoryAsset.create` permission." + "x-immich-permission": "memoryAsset.create" } }, "/notifications": { "delete": { + "description": "Delete a list of notifications at once.", "operationId": "deleteNotifications", "parameters": [], "requestBody": { @@ -4729,13 +4844,14 @@ "api_key": [] } ], + "summary": "Delete notifications", "tags": [ "Notifications" ], - "x-immich-permission": "notification.delete", - "description": "This endpoint requires the `notification.delete` permission." + "x-immich-permission": "notification.delete" }, "get": { + "description": "Retrieve a list of notifications.", "operationId": "getNotifications", "parameters": [ { @@ -4798,13 +4914,14 @@ "api_key": [] } ], + "summary": "Retrieve notifications", "tags": [ "Notifications" ], - "x-immich-permission": "notification.read", - "description": "This endpoint requires the `notification.read` permission." + "x-immich-permission": "notification.read" }, "put": { + "description": "Update a list of notifications. Allows to bulk-set the read status of notifications.", "operationId": "updateNotifications", "parameters": [], "requestBody": { @@ -4833,15 +4950,16 @@ "api_key": [] } ], + "summary": "Update notifications", "tags": [ "Notifications" ], - "x-immich-permission": "notification.update", - "description": "This endpoint requires the `notification.update` permission." + "x-immich-permission": "notification.update" } }, "/notifications/{id}": { "delete": { + "description": "Delete a specific notification.", "operationId": "deleteNotification", "parameters": [ { @@ -4870,13 +4988,14 @@ "api_key": [] } ], + "summary": "Delete a notification", "tags": [ "Notifications" ], - "x-immich-permission": "notification.delete", - "description": "This endpoint requires the `notification.delete` permission." + "x-immich-permission": "notification.delete" }, "get": { + "description": "Retrieve a specific notification identified by id.", "operationId": "getNotification", "parameters": [ { @@ -4912,13 +5031,14 @@ "api_key": [] } ], + "summary": "Get a notification", "tags": [ "Notifications" ], - "x-immich-permission": "notification.read", - "description": "This endpoint requires the `notification.read` permission." + "x-immich-permission": "notification.read" }, "put": { + "description": "Update a specific notification to set its read status.", "operationId": "updateNotification", "parameters": [ { @@ -4964,15 +5084,16 @@ "api_key": [] } ], + "summary": "Update a notification", "tags": [ "Notifications" ], - "x-immich-permission": "notification.update", - "description": "This endpoint requires the `notification.update` permission." + "x-immich-permission": "notification.update" } }, "/oauth/authorize": { "post": { + "description": "Initiate the OAuth authorization process.", "operationId": "startOAuth", "parameters": [], "requestBody": { @@ -4997,13 +5118,15 @@ "description": "" } }, + "summary": "Start OAuth", "tags": [ - "OAuth" + "Authentication" ] } }, "/oauth/callback": { "post": { + "description": "Complete the OAuth authorization process by exchanging the authorization code for a session token.", "operationId": "finishOAuth", "parameters": [], "requestBody": { @@ -5028,13 +5151,15 @@ "description": "" } }, + "summary": "Finish OAuth", "tags": [ - "OAuth" + "Authentication" ] } }, "/oauth/link": { "post": { + "description": "Link an OAuth account to the authenticated user.", "operationId": "linkOAuthAccount", "parameters": [], "requestBody": { @@ -5070,13 +5195,15 @@ "api_key": [] } ], + "summary": "Link OAuth account", "tags": [ - "OAuth" + "Authentication" ] } }, "/oauth/mobile-redirect": { "get": { + "description": "Requests to this URL are automatically forwarded to the mobile app, and is used in some cases for OAuth redirecting.", "operationId": "redirectOAuthToMobile", "parameters": [], "responses": { @@ -5084,13 +5211,15 @@ "description": "" } }, + "summary": "Redirect OAuth to mobile", "tags": [ - "OAuth" + "Authentication" ] } }, "/oauth/unlink": { "post": { + "description": "Unlink the OAuth account from the authenticated user.", "operationId": "unlinkOAuthAccount", "parameters": [], "responses": { @@ -5116,13 +5245,15 @@ "api_key": [] } ], + "summary": "Unlink OAuth account", "tags": [ - "OAuth" + "Authentication" ] } }, "/partners": { "get": { + "description": "Retrieve a list of partners with whom assets are shared.", "operationId": "getPartners", "parameters": [ { @@ -5160,13 +5291,14 @@ "api_key": [] } ], + "summary": "Retrieve partners", "tags": [ "Partners" ], - "x-immich-permission": "partner.read", - "description": "This endpoint requires the `partner.read` permission." + "x-immich-permission": "partner.read" }, "post": { + "description": "Create a new partner to share assets with.", "operationId": "createPartner", "parameters": [], "requestBody": { @@ -5202,15 +5334,16 @@ "api_key": [] } ], + "summary": "Create a partner", "tags": [ "Partners" ], - "x-immich-permission": "partner.create", - "description": "This endpoint requires the `partner.create` permission." + "x-immich-permission": "partner.create" } }, "/partners/{id}": { "delete": { + "description": "Stop sharing assets with a partner.", "operationId": "removePartner", "parameters": [ { @@ -5239,15 +5372,15 @@ "api_key": [] } ], + "summary": "Remove a partner", "tags": [ "Partners" ], - "x-immich-permission": "partner.delete", - "description": "This endpoint requires the `partner.delete` permission." + "x-immich-permission": "partner.delete" }, "post": { "deprecated": true, - "description": "This property was deprecated in v1.141.0. This endpoint requires the `partner.create` permission.", + "description": "This property was deprecated in v1.141.0. Create a new partner to share assets with.", "operationId": "createPartnerDeprecated", "parameters": [ { @@ -5283,6 +5416,7 @@ "api_key": [] } ], + "summary": "Create a partner", "tags": [ "Partners", "Deprecated" @@ -5293,6 +5427,7 @@ "x-immich-permission": "partner.create" }, "put": { + "description": "Specify whether a partner's assets should appear in the user's timeline.", "operationId": "updatePartner", "parameters": [ { @@ -5338,15 +5473,16 @@ "api_key": [] } ], + "summary": "Update a partner", "tags": [ "Partners" ], - "x-immich-permission": "partner.update", - "description": "This endpoint requires the `partner.update` permission." + "x-immich-permission": "partner.update" } }, "/people": { "delete": { + "description": "Bulk delete a list of people at once.", "operationId": "deletePeople", "parameters": [], "requestBody": { @@ -5375,13 +5511,14 @@ "api_key": [] } ], + "summary": "Delete people", "tags": [ "People" ], - "x-immich-permission": "person.delete", - "description": "This endpoint requires the `person.delete` permission." + "x-immich-permission": "person.delete" }, "get": { + "description": "Retrieve a list of all people.", "operationId": "getAllPeople", "parameters": [ { @@ -5457,13 +5594,14 @@ "api_key": [] } ], + "summary": "Get all people", "tags": [ "People" ], - "x-immich-permission": "person.read", - "description": "This endpoint requires the `person.read` permission." + "x-immich-permission": "person.read" }, "post": { + "description": "Create a new person that can have multiple faces assigned to them.", "operationId": "createPerson", "parameters": [], "requestBody": { @@ -5499,13 +5637,14 @@ "api_key": [] } ], + "summary": "Create a person", "tags": [ "People" ], - "x-immich-permission": "person.create", - "description": "This endpoint requires the `person.create` permission." + "x-immich-permission": "person.create" }, "put": { + "description": "Bulk update multiple people at once.", "operationId": "updatePeople", "parameters": [], "requestBody": { @@ -5544,15 +5683,16 @@ "api_key": [] } ], + "summary": "Update people", "tags": [ "People" ], - "x-immich-permission": "person.update", - "description": "This endpoint requires the `person.update` permission." + "x-immich-permission": "person.update" } }, "/people/{id}": { "delete": { + "description": "Delete an individual person.", "operationId": "deletePerson", "parameters": [ { @@ -5581,13 +5721,14 @@ "api_key": [] } ], + "summary": "Delete person", "tags": [ "People" ], - "x-immich-permission": "person.delete", - "description": "This endpoint requires the `person.delete` permission." + "x-immich-permission": "person.delete" }, "get": { + "description": "Retrieve a person by id.", "operationId": "getPerson", "parameters": [ { @@ -5623,13 +5764,14 @@ "api_key": [] } ], + "summary": "Get a person", "tags": [ "People" ], - "x-immich-permission": "person.read", - "description": "This endpoint requires the `person.read` permission." + "x-immich-permission": "person.read" }, "put": { + "description": "Update an individual person.", "operationId": "updatePerson", "parameters": [ { @@ -5675,15 +5817,16 @@ "api_key": [] } ], + "summary": "Update person", "tags": [ "People" ], - "x-immich-permission": "person.update", - "description": "This endpoint requires the `person.update` permission." + "x-immich-permission": "person.update" } }, "/people/{id}/merge": { "post": { + "description": "Merge a list of people into the person specified in the path parameter.", "operationId": "mergePerson", "parameters": [ { @@ -5732,15 +5875,16 @@ "api_key": [] } ], + "summary": "Merge people", "tags": [ "People" ], - "x-immich-permission": "person.merge", - "description": "This endpoint requires the `person.merge` permission." + "x-immich-permission": "person.merge" } }, "/people/{id}/reassign": { "put": { + "description": "Bulk reassign a list of faces to a different person.", "operationId": "reassignFaces", "parameters": [ { @@ -5789,15 +5933,16 @@ "api_key": [] } ], + "summary": "Reassign faces", "tags": [ "People" ], - "x-immich-permission": "person.reassign", - "description": "This endpoint requires the `person.reassign` permission." + "x-immich-permission": "person.reassign" } }, "/people/{id}/statistics": { "get": { + "description": "Retrieve statistics about a specific person.", "operationId": "getPersonStatistics", "parameters": [ { @@ -5833,15 +5978,16 @@ "api_key": [] } ], + "summary": "Get person statistics", "tags": [ "People" ], - "x-immich-permission": "person.statistics", - "description": "This endpoint requires the `person.statistics` permission." + "x-immich-permission": "person.statistics" } }, "/people/{id}/thumbnail": { "get": { + "description": "Retrieve the thumbnail file for a person.", "operationId": "getPersonThumbnail", "parameters": [ { @@ -5878,15 +6024,16 @@ "api_key": [] } ], + "summary": "Get person thumbnail", "tags": [ "People" ], - "x-immich-permission": "person.read", - "description": "This endpoint requires the `person.read` permission." + "x-immich-permission": "person.read" } }, "/search/cities": { "get": { + "description": "Retrieve a list of assets with each asset belonging to a different city. This endpoint is used on the places pages to show a single thumbnail for each city the user has assets in.", "operationId": "getAssetsByCity", "parameters": [], "responses": { @@ -5915,15 +6062,16 @@ "api_key": [] } ], + "summary": "Retrieve assets by city", "tags": [ "Search" ], - "x-immich-permission": "asset.read", - "description": "This endpoint requires the `asset.read` permission." + "x-immich-permission": "asset.read" } }, "/search/explore": { "get": { + "description": "Retrieve data for the explore section, such as popular people and places.", "operationId": "getExploreData", "parameters": [], "responses": { @@ -5952,15 +6100,16 @@ "api_key": [] } ], + "summary": "Retrieve explore data", "tags": [ "Search" ], - "x-immich-permission": "asset.read", - "description": "This endpoint requires the `asset.read` permission." + "x-immich-permission": "asset.read" } }, "/search/large-assets": { "post": { + "description": "Search for assets that are considered large based on specified criteria.", "operationId": "searchLargeAssets", "parameters": [ { @@ -6279,15 +6428,16 @@ "api_key": [] } ], + "summary": "Search large assets", "tags": [ "Search" ], - "x-immich-permission": "asset.read", - "description": "This endpoint requires the `asset.read` permission." + "x-immich-permission": "asset.read" } }, "/search/metadata": { "post": { + "description": "Search for assets based on various metadata criteria.", "operationId": "searchAssets", "parameters": [], "requestBody": { @@ -6323,15 +6473,16 @@ "api_key": [] } ], + "summary": "Search assets by metadata", "tags": [ "Search" ], - "x-immich-permission": "asset.read", - "description": "This endpoint requires the `asset.read` permission." + "x-immich-permission": "asset.read" } }, "/search/person": { "get": { + "description": "Search for people by name.", "operationId": "searchPerson", "parameters": [ { @@ -6377,15 +6528,16 @@ "api_key": [] } ], + "summary": "Search people", "tags": [ "Search" ], - "x-immich-permission": "person.read", - "description": "This endpoint requires the `person.read` permission." + "x-immich-permission": "person.read" } }, "/search/places": { "get": { + "description": "Search for places by name.", "operationId": "searchPlaces", "parameters": [ { @@ -6423,15 +6575,16 @@ "api_key": [] } ], + "summary": "Search places", "tags": [ "Search" ], - "x-immich-permission": "asset.read", - "description": "This endpoint requires the `asset.read` permission." + "x-immich-permission": "asset.read" } }, "/search/random": { "post": { + "description": "Retrieve a random selection of assets based on the provided criteria.", "operationId": "searchRandom", "parameters": [], "requestBody": { @@ -6470,15 +6623,16 @@ "api_key": [] } ], + "summary": "Search random assets", "tags": [ "Search" ], - "x-immich-permission": "asset.read", - "description": "This endpoint requires the `asset.read` permission." + "x-immich-permission": "asset.read" } }, "/search/smart": { "post": { + "description": "Perform a smart search for assets by using machine learning vectors to determine relevance.", "operationId": "searchSmart", "parameters": [], "requestBody": { @@ -6514,15 +6668,16 @@ "api_key": [] } ], + "summary": "Smart asset search", "tags": [ "Search" ], - "x-immich-permission": "asset.read", - "description": "This endpoint requires the `asset.read` permission." + "x-immich-permission": "asset.read" } }, "/search/statistics": { "post": { + "description": "Retrieve statistical data about assets based on search criteria, such as the total matching count.", "operationId": "searchAssetStatistics", "parameters": [], "requestBody": { @@ -6558,15 +6713,16 @@ "api_key": [] } ], + "summary": "Search asset statistics", "tags": [ "Search" ], - "x-immich-permission": "asset.statistics", - "description": "This endpoint requires the `asset.statistics` permission." + "x-immich-permission": "asset.statistics" } }, "/search/suggestions": { "get": { + "description": "Retrieve search suggestions based on partial input. This endpoint is used for typeahead search features.", "operationId": "getSearchSuggestions", "parameters": [ { @@ -6653,15 +6809,16 @@ "api_key": [] } ], + "summary": "Retrieve search suggestions", "tags": [ "Search" ], - "x-immich-permission": "asset.read", - "description": "This endpoint requires the `asset.read` permission." + "x-immich-permission": "asset.read" } }, "/server/about": { "get": { + "description": "Retrieve a list of information about the server.", "operationId": "getAboutInfo", "parameters": [], "responses": { @@ -6687,15 +6844,16 @@ "api_key": [] } ], + "summary": "Get server information", "tags": [ "Server" ], - "x-immich-permission": "server.about", - "description": "This endpoint requires the `server.about` permission." + "x-immich-permission": "server.about" } }, "/server/apk-links": { "get": { + "description": "Retrieve links to the APKs for the current server version.", "operationId": "getApkLinks", "parameters": [], "responses": { @@ -6721,15 +6879,16 @@ "api_key": [] } ], + "summary": "Get APK links", "tags": [ "Server" ], - "x-immich-permission": "server.apkLinks", - "description": "This endpoint requires the `server.apkLinks` permission." + "x-immich-permission": "server.apkLinks" } }, "/server/config": { "get": { + "description": "Retrieve the current server configuration.", "operationId": "getServerConfig", "parameters": [], "responses": { @@ -6744,6 +6903,7 @@ "description": "" } }, + "summary": "Get config", "tags": [ "Server" ] @@ -6751,6 +6911,7 @@ }, "/server/features": { "get": { + "description": "Retrieve available features supported by this server.", "operationId": "getServerFeatures", "parameters": [], "responses": { @@ -6765,6 +6926,7 @@ "description": "" } }, + "summary": "Get features", "tags": [ "Server" ] @@ -6772,6 +6934,7 @@ }, "/server/license": { "delete": { + "description": "Delete the currently set server product key.", "operationId": "deleteServerLicense", "parameters": [], "responses": { @@ -6790,14 +6953,15 @@ "api_key": [] } ], + "summary": "Delete server product key", "tags": [ "Server" ], "x-immich-admin-only": true, - "x-immich-permission": "serverLicense.delete", - "description": "This endpoint is an admin-only route, and requires the `serverLicense.delete` permission." + "x-immich-permission": "serverLicense.delete" }, "get": { + "description": "Retrieve information about whether the server currently has a product key registered.", "operationId": "getServerLicense", "parameters": [], "responses": { @@ -6826,14 +6990,15 @@ "api_key": [] } ], + "summary": "Get product key", "tags": [ "Server" ], "x-immich-admin-only": true, - "x-immich-permission": "serverLicense.read", - "description": "This endpoint is an admin-only route, and requires the `serverLicense.read` permission." + "x-immich-permission": "serverLicense.read" }, "put": { + "description": "Validate and set the server product key if successful.", "operationId": "setServerLicense", "parameters": [], "requestBody": { @@ -6869,16 +7034,17 @@ "api_key": [] } ], + "summary": "Set server product key", "tags": [ "Server" ], "x-immich-admin-only": true, - "x-immich-permission": "serverLicense.update", - "description": "This endpoint is an admin-only route, and requires the `serverLicense.update` permission." + "x-immich-permission": "serverLicense.update" } }, "/server/media-types": { "get": { + "description": "Retrieve all media types supported by the server.", "operationId": "getSupportedMediaTypes", "parameters": [], "responses": { @@ -6893,6 +7059,7 @@ "description": "" } }, + "summary": "Get supported media types", "tags": [ "Server" ] @@ -6900,6 +7067,7 @@ }, "/server/ping": { "get": { + "description": "Pong", "operationId": "pingServer", "parameters": [], "responses": { @@ -6914,6 +7082,7 @@ "description": "" } }, + "summary": "Ping", "tags": [ "Server" ] @@ -6921,6 +7090,7 @@ }, "/server/statistics": { "get": { + "description": "Retrieve statistics about the entire Immich instance such as asset counts.", "operationId": "getServerStatistics", "parameters": [], "responses": { @@ -6946,16 +7116,17 @@ "api_key": [] } ], + "summary": "Get statistics", "tags": [ "Server" ], "x-immich-admin-only": true, - "x-immich-permission": "server.statistics", - "description": "This endpoint is an admin-only route, and requires the `server.statistics` permission." + "x-immich-permission": "server.statistics" } }, "/server/storage": { "get": { + "description": "Retrieve the current storage utilization information of the server.", "operationId": "getStorage", "parameters": [], "responses": { @@ -6981,15 +7152,16 @@ "api_key": [] } ], + "summary": "Get storage", "tags": [ "Server" ], - "x-immich-permission": "server.storage", - "description": "This endpoint requires the `server.storage` permission." + "x-immich-permission": "server.storage" } }, "/server/theme": { "get": { + "description": "Retrieve the custom CSS, if existent.", "operationId": "getTheme", "parameters": [], "responses": { @@ -7004,6 +7176,7 @@ "description": "" } }, + "summary": "Get theme", "tags": [ "Server" ] @@ -7011,6 +7184,7 @@ }, "/server/version": { "get": { + "description": "Retrieve the current server version in semantic versioning (semver) format.", "operationId": "getServerVersion", "parameters": [], "responses": { @@ -7025,6 +7199,7 @@ "description": "" } }, + "summary": "Get server version", "tags": [ "Server" ] @@ -7032,6 +7207,7 @@ }, "/server/version-check": { "get": { + "description": "Retrieve information about the last time the version check ran.", "operationId": "getVersionCheck", "parameters": [], "responses": { @@ -7057,15 +7233,16 @@ "api_key": [] } ], + "summary": "Get version check status", "tags": [ "Server" ], - "x-immich-permission": "server.versionCheck", - "description": "This endpoint requires the `server.versionCheck` permission." + "x-immich-permission": "server.versionCheck" } }, "/server/version-history": { "get": { + "description": "Retrieve a list of past versions the server has been on.", "operationId": "getVersionHistory", "parameters": [], "responses": { @@ -7083,6 +7260,7 @@ "description": "" } }, + "summary": "Get version history", "tags": [ "Server" ] @@ -7090,6 +7268,7 @@ }, "/sessions": { "delete": { + "description": "Delete all sessions for the user. This will not delete the current session.", "operationId": "deleteAllSessions", "parameters": [], "responses": { @@ -7108,13 +7287,14 @@ "api_key": [] } ], + "summary": "Delete all sessions", "tags": [ "Sessions" ], - "x-immich-permission": "session.delete", - "description": "This endpoint requires the `session.delete` permission." + "x-immich-permission": "session.delete" }, "get": { + "description": "Retrieve a list of sessions for the user.", "operationId": "getSessions", "parameters": [], "responses": { @@ -7143,13 +7323,14 @@ "api_key": [] } ], + "summary": "Retrieve sessions", "tags": [ "Sessions" ], - "x-immich-permission": "session.read", - "description": "This endpoint requires the `session.read` permission." + "x-immich-permission": "session.read" }, "post": { + "description": "Create a session as a child to the current session. This endpoint is used for casting.", "operationId": "createSession", "parameters": [], "requestBody": { @@ -7185,15 +7366,16 @@ "api_key": [] } ], + "summary": "Create a session", "tags": [ "Sessions" ], - "x-immich-permission": "session.create", - "description": "This endpoint requires the `session.create` permission." + "x-immich-permission": "session.create" } }, "/sessions/{id}": { "delete": { + "description": "Delete a specific session by id.", "operationId": "deleteSession", "parameters": [ { @@ -7222,13 +7404,14 @@ "api_key": [] } ], + "summary": "Delete a session", "tags": [ "Sessions" ], - "x-immich-permission": "session.delete", - "description": "This endpoint requires the `session.delete` permission." + "x-immich-permission": "session.delete" }, "put": { + "description": "Update a specific session identified by id.", "operationId": "updateSession", "parameters": [ { @@ -7274,15 +7457,16 @@ "api_key": [] } ], + "summary": "Update a session", "tags": [ "Sessions" ], - "x-immich-permission": "session.update", - "description": "This endpoint requires the `session.update` permission." + "x-immich-permission": "session.update" } }, "/sessions/{id}/lock": { "post": { + "description": "Lock a specific session by id.", "operationId": "lockSession", "parameters": [ { @@ -7311,15 +7495,16 @@ "api_key": [] } ], + "summary": "Lock a session", "tags": [ "Sessions" ], - "x-immich-permission": "session.lock", - "description": "This endpoint requires the `session.lock` permission." + "x-immich-permission": "session.lock" } }, "/shared-links": { "get": { + "description": "Retrieve a list of all shared links.", "operationId": "getAllSharedLinks", "parameters": [ { @@ -7358,13 +7543,14 @@ "api_key": [] } ], + "summary": "Retrieve all shared links", "tags": [ - "Shared Links" + "Shared links" ], - "x-immich-permission": "sharedLink.read", - "description": "This endpoint requires the `sharedLink.read` permission." + "x-immich-permission": "sharedLink.read" }, "post": { + "description": "Create a new shared link.", "operationId": "createSharedLink", "parameters": [], "requestBody": { @@ -7400,17 +7586,26 @@ "api_key": [] } ], + "summary": "Create a shared link", "tags": [ - "Shared Links" + "Shared links" ], - "x-immich-permission": "sharedLink.create", - "description": "This endpoint requires the `sharedLink.create` permission." + "x-immich-permission": "sharedLink.create" } }, "/shared-links/me": { "get": { + "description": "Retrieve the current shared link associated with authentication method.", "operationId": "getMySharedLink", "parameters": [ + { + "name": "key", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + }, { "name": "password", "required": false, @@ -7420,22 +7615,6 @@ "type": "string" } }, - { - "name": "token", - "required": false, - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "key", - "required": false, - "in": "query", - "schema": { - "type": "string" - } - }, { "name": "slug", "required": false, @@ -7443,6 +7622,14 @@ "schema": { "type": "string" } + }, + { + "name": "token", + "required": false, + "in": "query", + "schema": { + "type": "string" + } } ], "responses": { @@ -7468,13 +7655,15 @@ "api_key": [] } ], + "summary": "Retrieve current shared link", "tags": [ - "Shared Links" + "Shared links" ] } }, "/shared-links/{id}": { "delete": { + "description": "Delete a specific shared link by its ID.", "operationId": "removeSharedLink", "parameters": [ { @@ -7503,13 +7692,14 @@ "api_key": [] } ], + "summary": "Delete a shared link", "tags": [ - "Shared Links" + "Shared links" ], - "x-immich-permission": "sharedLink.delete", - "description": "This endpoint requires the `sharedLink.delete` permission." + "x-immich-permission": "sharedLink.delete" }, "get": { + "description": "Retrieve a specific shared link by its ID.", "operationId": "getSharedLinkById", "parameters": [ { @@ -7545,13 +7735,14 @@ "api_key": [] } ], + "summary": "Retrieve a shared link", "tags": [ - "Shared Links" + "Shared links" ], - "x-immich-permission": "sharedLink.read", - "description": "This endpoint requires the `sharedLink.read` permission." + "x-immich-permission": "sharedLink.read" }, "patch": { + "description": "Update an existing shared link by its ID.", "operationId": "updateSharedLink", "parameters": [ { @@ -7597,15 +7788,16 @@ "api_key": [] } ], + "summary": "Update a shared link", "tags": [ - "Shared Links" + "Shared links" ], - "x-immich-permission": "sharedLink.update", - "description": "This endpoint requires the `sharedLink.update` permission." + "x-immich-permission": "sharedLink.update" } }, "/shared-links/{id}/assets": { "delete": { + "description": "Remove assets from a specific shared link by its ID. This endpoint is only relevant for shared link of type individual.", "operationId": "removeSharedLinkAssets", "parameters": [ { @@ -7670,11 +7862,13 @@ "api_key": [] } ], + "summary": "Remove assets from a shared link", "tags": [ - "Shared Links" + "Shared links" ] }, "put": { + "description": "Add assets to a specific shared link by its ID. This endpoint is only relevant for shared link of type individual.", "operationId": "addSharedLinkAssets", "parameters": [ { @@ -7739,13 +7933,15 @@ "api_key": [] } ], + "summary": "Add assets to a shared link", "tags": [ - "Shared Links" + "Shared links" ] } }, "/stacks": { "delete": { + "description": "Delete multiple stacks by providing a list of stack IDs.", "operationId": "deleteStacks", "parameters": [], "requestBody": { @@ -7774,13 +7970,14 @@ "api_key": [] } ], + "summary": "Delete stacks", "tags": [ "Stacks" ], - "x-immich-permission": "stack.delete", - "description": "This endpoint requires the `stack.delete` permission." + "x-immich-permission": "stack.delete" }, "get": { + "description": "Retrieve a list of stacks.", "operationId": "searchStacks", "parameters": [ { @@ -7819,13 +8016,14 @@ "api_key": [] } ], + "summary": "Retrieve stacks", "tags": [ "Stacks" ], - "x-immich-permission": "stack.read", - "description": "This endpoint requires the `stack.read` permission." + "x-immich-permission": "stack.read" }, "post": { + "description": "Create a new stack by providing a name and a list of asset IDs to include in the stack. If any of the provided asset IDs are primary assets of an existing stack, the existing stack will be merged into the newly created stack.", "operationId": "createStack", "parameters": [], "requestBody": { @@ -7861,15 +8059,16 @@ "api_key": [] } ], + "summary": "Create a stack", "tags": [ "Stacks" ], - "x-immich-permission": "stack.create", - "description": "This endpoint requires the `stack.create` permission." + "x-immich-permission": "stack.create" } }, "/stacks/{id}": { "delete": { + "description": "Delete a specific stack by its ID.", "operationId": "deleteStack", "parameters": [ { @@ -7898,13 +8097,14 @@ "api_key": [] } ], + "summary": "Delete a stack", "tags": [ "Stacks" ], - "x-immich-permission": "stack.delete", - "description": "This endpoint requires the `stack.delete` permission." + "x-immich-permission": "stack.delete" }, "get": { + "description": "Retrieve a specific stack by its ID.", "operationId": "getStack", "parameters": [ { @@ -7940,13 +8140,14 @@ "api_key": [] } ], + "summary": "Retrieve a stack", "tags": [ "Stacks" ], - "x-immich-permission": "stack.read", - "description": "This endpoint requires the `stack.read` permission." + "x-immich-permission": "stack.read" }, "put": { + "description": "Update an existing stack by its ID.", "operationId": "updateStack", "parameters": [ { @@ -7992,15 +8193,16 @@ "api_key": [] } ], + "summary": "Update a stack", "tags": [ "Stacks" ], - "x-immich-permission": "stack.update", - "description": "This endpoint requires the `stack.update` permission." + "x-immich-permission": "stack.update" } }, "/stacks/{id}/assets/{assetId}": { "delete": { + "description": "Remove a specific asset from a stack by providing the stack ID and asset ID.", "operationId": "removeAssetFromStack", "parameters": [ { @@ -8038,15 +8240,16 @@ "api_key": [] } ], + "summary": "Remove an asset from a stack", "tags": [ "Stacks" ], - "x-immich-permission": "stack.update", - "description": "This endpoint requires the `stack.update` permission." + "x-immich-permission": "stack.update" } }, "/sync/ack": { "delete": { + "description": "Delete specific synchronization acknowledgments.", "operationId": "deleteSyncAck", "parameters": [], "requestBody": { @@ -8075,13 +8278,14 @@ "api_key": [] } ], + "summary": "Delete acknowledgements", "tags": [ "Sync" ], - "x-immich-permission": "syncCheckpoint.delete", - "description": "This endpoint requires the `syncCheckpoint.delete` permission." + "x-immich-permission": "syncCheckpoint.delete" }, "get": { + "description": "Retrieve the synchronization acknowledgments for the current session.", "operationId": "getSyncAck", "parameters": [], "responses": { @@ -8110,13 +8314,14 @@ "api_key": [] } ], + "summary": "Retrieve acknowledgements", "tags": [ "Sync" ], - "x-immich-permission": "syncCheckpoint.read", - "description": "This endpoint requires the `syncCheckpoint.read` permission." + "x-immich-permission": "syncCheckpoint.read" }, "post": { + "description": "Send a list of synchronization acknowledgements to confirm that the latest changes have been received.", "operationId": "sendSyncAck", "parameters": [], "requestBody": { @@ -8145,15 +8350,17 @@ "api_key": [] } ], + "summary": "Acknowledge changes", "tags": [ "Sync" ], - "x-immich-permission": "syncCheckpoint.update", - "description": "This endpoint requires the `syncCheckpoint.update` permission." + "x-immich-permission": "syncCheckpoint.update" } }, "/sync/delta-sync": { "post": { + "deprecated": true, + "description": "This property was deprecated in v2.0.0. Retrieve changed assets since the last sync for the authenticated user.", "operationId": "getDeltaSync", "parameters": [], "requestBody": { @@ -8189,13 +8396,20 @@ "api_key": [] } ], + "summary": "Get delta sync for user", "tags": [ - "Sync" - ] + "Sync", + "Deprecated" + ], + "x-immich-lifecycle": { + "deprecatedAt": "v2.0.0" + } } }, "/sync/full-sync": { "post": { + "deprecated": true, + "description": "This property was deprecated in v2.0.0. Retrieve all assets for a full synchronization for the authenticated user.", "operationId": "getFullSyncForUser", "parameters": [], "requestBody": { @@ -8234,13 +8448,19 @@ "api_key": [] } ], + "summary": "Get full sync for user", "tags": [ - "Sync" - ] + "Sync", + "Deprecated" + ], + "x-immich-lifecycle": { + "deprecatedAt": "v2.0.0" + } } }, "/sync/stream": { "post": { + "description": "Retrieve a JSON lines streamed response of changes for synchronization. This endpoint is used by the mobile app to efficiently stay up to date with changes.", "operationId": "getSyncStream", "parameters": [], "requestBody": { @@ -8269,15 +8489,16 @@ "api_key": [] } ], + "summary": "Stream sync changes", "tags": [ "Sync" ], - "x-immich-permission": "sync.stream", - "description": "This endpoint requires the `sync.stream` permission." + "x-immich-permission": "sync.stream" } }, "/system-config": { "get": { + "description": "Retrieve the current system configuration.", "operationId": "getConfig", "parameters": [], "responses": { @@ -8303,14 +8524,15 @@ "api_key": [] } ], + "summary": "Get system configuration", "tags": [ - "System Config" + "System config" ], "x-immich-admin-only": true, - "x-immich-permission": "systemConfig.read", - "description": "This endpoint is an admin-only route, and requires the `systemConfig.read` permission." + "x-immich-permission": "systemConfig.read" }, "put": { + "description": "Update the system configuration with a new system configuration.", "operationId": "updateConfig", "parameters": [], "requestBody": { @@ -8346,16 +8568,17 @@ "api_key": [] } ], + "summary": "Update system configuration", "tags": [ - "System Config" + "System config" ], "x-immich-admin-only": true, - "x-immich-permission": "systemConfig.update", - "description": "This endpoint is an admin-only route, and requires the `systemConfig.update` permission." + "x-immich-permission": "systemConfig.update" } }, "/system-config/defaults": { "get": { + "description": "Retrieve the default values for the system configuration.", "operationId": "getConfigDefaults", "parameters": [], "responses": { @@ -8381,16 +8604,17 @@ "api_key": [] } ], + "summary": "Get system configuration defaults", "tags": [ - "System Config" + "System config" ], "x-immich-admin-only": true, - "x-immich-permission": "systemConfig.read", - "description": "This endpoint is an admin-only route, and requires the `systemConfig.read` permission." + "x-immich-permission": "systemConfig.read" } }, "/system-config/storage-template-options": { "get": { + "description": "Retrieve exemplary storage template options.", "operationId": "getStorageTemplateOptions", "parameters": [], "responses": { @@ -8416,16 +8640,17 @@ "api_key": [] } ], + "summary": "Get storage template options", "tags": [ - "System Config" + "System config" ], "x-immich-admin-only": true, - "x-immich-permission": "systemConfig.read", - "description": "This endpoint is an admin-only route, and requires the `systemConfig.read` permission." + "x-immich-permission": "systemConfig.read" } }, "/system-metadata/admin-onboarding": { "get": { + "description": "Retrieve the current admin onboarding status.", "operationId": "getAdminOnboarding", "parameters": [], "responses": { @@ -8451,14 +8676,15 @@ "api_key": [] } ], + "summary": "Retrieve admin onboarding", "tags": [ - "System Metadata" + "System metadata" ], "x-immich-admin-only": true, - "x-immich-permission": "systemMetadata.read", - "description": "This endpoint is an admin-only route, and requires the `systemMetadata.read` permission." + "x-immich-permission": "systemMetadata.read" }, "post": { + "description": "Update the admin onboarding status.", "operationId": "updateAdminOnboarding", "parameters": [], "requestBody": { @@ -8487,16 +8713,17 @@ "api_key": [] } ], + "summary": "Update admin onboarding", "tags": [ - "System Metadata" + "System metadata" ], "x-immich-admin-only": true, - "x-immich-permission": "systemMetadata.update", - "description": "This endpoint is an admin-only route, and requires the `systemMetadata.update` permission." + "x-immich-permission": "systemMetadata.update" } }, "/system-metadata/reverse-geocoding-state": { "get": { + "description": "Retrieve the current state of the reverse geocoding import.", "operationId": "getReverseGeocodingState", "parameters": [], "responses": { @@ -8522,16 +8749,17 @@ "api_key": [] } ], + "summary": "Retrieve reverse geocoding state", "tags": [ - "System Metadata" + "System metadata" ], "x-immich-admin-only": true, - "x-immich-permission": "systemMetadata.read", - "description": "This endpoint is an admin-only route, and requires the `systemMetadata.read` permission." + "x-immich-permission": "systemMetadata.read" } }, "/system-metadata/version-check-state": { "get": { + "description": "Retrieve the current state of the version check process.", "operationId": "getVersionCheckState", "parameters": [], "responses": { @@ -8557,16 +8785,17 @@ "api_key": [] } ], + "summary": "Retrieve version check state", "tags": [ - "System Metadata" + "System metadata" ], "x-immich-admin-only": true, - "x-immich-permission": "systemMetadata.read", - "description": "This endpoint is an admin-only route, and requires the `systemMetadata.read` permission." + "x-immich-permission": "systemMetadata.read" } }, "/tags": { "get": { + "description": "Retrieve a list of all tags.", "operationId": "getAllTags", "parameters": [], "responses": { @@ -8595,13 +8824,14 @@ "api_key": [] } ], + "summary": "Retrieve tags", "tags": [ "Tags" ], - "x-immich-permission": "tag.read", - "description": "This endpoint requires the `tag.read` permission." + "x-immich-permission": "tag.read" }, "post": { + "description": "Create a new tag by providing a name and optional color.", "operationId": "createTag", "parameters": [], "requestBody": { @@ -8637,13 +8867,14 @@ "api_key": [] } ], + "summary": "Create a tag", "tags": [ "Tags" ], - "x-immich-permission": "tag.create", - "description": "This endpoint requires the `tag.create` permission." + "x-immich-permission": "tag.create" }, "put": { + "description": "Create or update multiple tags in a single request.", "operationId": "upsertTags", "parameters": [], "requestBody": { @@ -8682,15 +8913,16 @@ "api_key": [] } ], + "summary": "Upsert tags", "tags": [ "Tags" ], - "x-immich-permission": "tag.create", - "description": "This endpoint requires the `tag.create` permission." + "x-immich-permission": "tag.create" } }, "/tags/assets": { "put": { + "description": "Add multiple tags to multiple assets in a single request.", "operationId": "bulkTagAssets", "parameters": [], "requestBody": { @@ -8726,15 +8958,16 @@ "api_key": [] } ], + "summary": "Tag assets", "tags": [ "Tags" ], - "x-immich-permission": "tag.asset", - "description": "This endpoint requires the `tag.asset` permission." + "x-immich-permission": "tag.asset" } }, "/tags/{id}": { "delete": { + "description": "Delete a specific tag by its ID.", "operationId": "deleteTag", "parameters": [ { @@ -8763,13 +8996,14 @@ "api_key": [] } ], + "summary": "Delete a tag", "tags": [ "Tags" ], - "x-immich-permission": "tag.delete", - "description": "This endpoint requires the `tag.delete` permission." + "x-immich-permission": "tag.delete" }, "get": { + "description": "Retrieve a specific tag by its ID.", "operationId": "getTagById", "parameters": [ { @@ -8805,13 +9039,14 @@ "api_key": [] } ], + "summary": "Retrieve a tag", "tags": [ "Tags" ], - "x-immich-permission": "tag.read", - "description": "This endpoint requires the `tag.read` permission." + "x-immich-permission": "tag.read" }, "put": { + "description": "Update an existing tag identified by its ID.", "operationId": "updateTag", "parameters": [ { @@ -8857,15 +9092,16 @@ "api_key": [] } ], + "summary": "Update a tag", "tags": [ "Tags" ], - "x-immich-permission": "tag.update", - "description": "This endpoint requires the `tag.update` permission." + "x-immich-permission": "tag.update" } }, "/tags/{id}/assets": { "delete": { + "description": "Remove a tag from all the specified assets.", "operationId": "untagAssets", "parameters": [ { @@ -8914,13 +9150,14 @@ "api_key": [] } ], + "summary": "Untag assets", "tags": [ "Tags" ], - "x-immich-permission": "tag.asset", - "description": "This endpoint requires the `tag.asset` permission." + "x-immich-permission": "tag.asset" }, "put": { + "description": "Add a tag to all the specified assets.", "operationId": "tagAssets", "parameters": [ { @@ -8969,15 +9206,16 @@ "api_key": [] } ], + "summary": "Tag assets", "tags": [ "Tags" ], - "x-immich-permission": "tag.asset", - "description": "This endpoint requires the `tag.asset` permission." + "x-immich-permission": "tag.asset" } }, "/timeline/bucket": { "get": { + "description": "Retrieve a string of all asset ids in a given time bucket.", "operationId": "getTimeBucket", "parameters": [ { @@ -9133,15 +9371,16 @@ "api_key": [] } ], + "summary": "Get time bucket", "tags": [ "Timeline" ], - "x-immich-permission": "asset.read", - "description": "This endpoint requires the `asset.read` permission." + "x-immich-permission": "asset.read" } }, "/timeline/buckets": { "get": { + "description": "Retrieve a list of all minimal time buckets.", "operationId": "getTimeBuckets", "parameters": [ { @@ -9290,15 +9529,16 @@ "api_key": [] } ], + "summary": "Get time buckets", "tags": [ "Timeline" ], - "x-immich-permission": "asset.read", - "description": "This endpoint requires the `asset.read` permission." + "x-immich-permission": "asset.read" } }, "/trash/empty": { "post": { + "description": "Permanently delete all items in the trash.", "operationId": "emptyTrash", "parameters": [], "responses": { @@ -9324,15 +9564,16 @@ "api_key": [] } ], + "summary": "Empty trash", "tags": [ "Trash" ], - "x-immich-permission": "asset.delete", - "description": "This endpoint requires the `asset.delete` permission." + "x-immich-permission": "asset.delete" } }, "/trash/restore": { "post": { + "description": "Restore all items in the trash.", "operationId": "restoreTrash", "parameters": [], "responses": { @@ -9358,15 +9599,16 @@ "api_key": [] } ], + "summary": "Restore trash", "tags": [ "Trash" ], - "x-immich-permission": "asset.delete", - "description": "This endpoint requires the `asset.delete` permission." + "x-immich-permission": "asset.delete" } }, "/trash/restore/assets": { "post": { + "description": "Restore specific assets from the trash.", "operationId": "restoreAssets", "parameters": [], "requestBody": { @@ -9402,15 +9644,16 @@ "api_key": [] } ], + "summary": "Restore assets", "tags": [ "Trash" ], - "x-immich-permission": "asset.delete", - "description": "This endpoint requires the `asset.delete` permission." + "x-immich-permission": "asset.delete" } }, "/users": { "get": { + "description": "Retrieve a list of all users on the server.", "operationId": "searchUsers", "parameters": [], "responses": { @@ -9439,15 +9682,16 @@ "api_key": [] } ], + "summary": "Get all users", "tags": [ "Users" ], - "x-immich-permission": "user.read", - "description": "This endpoint requires the `user.read` permission." + "x-immich-permission": "user.read" } }, "/users/me": { "get": { + "description": "Retrieve information about the user making the API request.", "operationId": "getMyUser", "parameters": [], "responses": { @@ -9473,13 +9717,14 @@ "api_key": [] } ], + "summary": "Get current user", "tags": [ "Users" ], - "x-immich-permission": "user.read", - "description": "This endpoint requires the `user.read` permission." + "x-immich-permission": "user.read" }, "put": { + "description": "Update the current user making teh API request.", "operationId": "updateMyUser", "parameters": [], "requestBody": { @@ -9515,15 +9760,16 @@ "api_key": [] } ], + "summary": "Update current user", "tags": [ "Users" ], - "x-immich-permission": "user.update", - "description": "This endpoint requires the `user.update` permission." + "x-immich-permission": "user.update" } }, "/users/me/license": { "delete": { + "description": "Delete the registered product key for the current user.", "operationId": "deleteUserLicense", "parameters": [], "responses": { @@ -9542,13 +9788,14 @@ "api_key": [] } ], + "summary": "Delete user product key", "tags": [ "Users" ], - "x-immich-permission": "userLicense.delete", - "description": "This endpoint requires the `userLicense.delete` permission." + "x-immich-permission": "userLicense.delete" }, "get": { + "description": "Retrieve information about whether the current user has a registered product key.", "operationId": "getUserLicense", "parameters": [], "responses": { @@ -9574,13 +9821,14 @@ "api_key": [] } ], + "summary": "Retrieve user product key", "tags": [ "Users" ], - "x-immich-permission": "userLicense.read", - "description": "This endpoint requires the `userLicense.read` permission." + "x-immich-permission": "userLicense.read" }, "put": { + "description": "Register a product key for the current user.", "operationId": "setUserLicense", "parameters": [], "requestBody": { @@ -9616,15 +9864,16 @@ "api_key": [] } ], + "summary": "Set user product key", "tags": [ "Users" ], - "x-immich-permission": "userLicense.update", - "description": "This endpoint requires the `userLicense.update` permission." + "x-immich-permission": "userLicense.update" } }, "/users/me/onboarding": { "delete": { + "description": "Delete the onboarding status of the current user.", "operationId": "deleteUserOnboarding", "parameters": [], "responses": { @@ -9643,13 +9892,14 @@ "api_key": [] } ], + "summary": "Delete user onboarding", "tags": [ "Users" ], - "x-immich-permission": "userOnboarding.delete", - "description": "This endpoint requires the `userOnboarding.delete` permission." + "x-immich-permission": "userOnboarding.delete" }, "get": { + "description": "Retrieve the onboarding status of the current user.", "operationId": "getUserOnboarding", "parameters": [], "responses": { @@ -9675,13 +9925,14 @@ "api_key": [] } ], + "summary": "Retrieve user onboarding", "tags": [ "Users" ], - "x-immich-permission": "userOnboarding.read", - "description": "This endpoint requires the `userOnboarding.read` permission." + "x-immich-permission": "userOnboarding.read" }, "put": { + "description": "Update the onboarding status of the current user.", "operationId": "setUserOnboarding", "parameters": [], "requestBody": { @@ -9717,15 +9968,16 @@ "api_key": [] } ], + "summary": "Update user onboarding", "tags": [ "Users" ], - "x-immich-permission": "userOnboarding.update", - "description": "This endpoint requires the `userOnboarding.update` permission." + "x-immich-permission": "userOnboarding.update" } }, "/users/me/preferences": { "get": { + "description": "Retrieve the preferences for the current user.", "operationId": "getMyPreferences", "parameters": [], "responses": { @@ -9751,13 +10003,14 @@ "api_key": [] } ], + "summary": "Get my preferences", "tags": [ "Users" ], - "x-immich-permission": "userPreference.read", - "description": "This endpoint requires the `userPreference.read` permission." + "x-immich-permission": "userPreference.read" }, "put": { + "description": "Update the preferences of the current user.", "operationId": "updateMyPreferences", "parameters": [], "requestBody": { @@ -9793,15 +10046,16 @@ "api_key": [] } ], + "summary": "Update my preferences", "tags": [ "Users" ], - "x-immich-permission": "userPreference.update", - "description": "This endpoint requires the `userPreference.update` permission." + "x-immich-permission": "userPreference.update" } }, "/users/profile-image": { "delete": { + "description": "Delete the profile image of the current user.", "operationId": "deleteProfileImage", "parameters": [], "responses": { @@ -9820,13 +10074,14 @@ "api_key": [] } ], + "summary": "Delete user profile image", "tags": [ "Users" ], - "x-immich-permission": "userProfileImage.delete", - "description": "This endpoint requires the `userProfileImage.delete` permission." + "x-immich-permission": "userProfileImage.delete" }, "post": { + "description": "Upload and set a new profile image for the current user.", "operationId": "createProfileImage", "parameters": [], "requestBody": { @@ -9863,15 +10118,16 @@ "api_key": [] } ], + "summary": "Create user profile image", "tags": [ "Users" ], - "x-immich-permission": "userProfileImage.update", - "description": "This endpoint requires the `userProfileImage.update` permission." + "x-immich-permission": "userProfileImage.update" } }, "/users/{id}": { "get": { + "description": "Retrieve a specific user by their ID.", "operationId": "getUser", "parameters": [ { @@ -9907,15 +10163,16 @@ "api_key": [] } ], + "summary": "Retrieve a user", "tags": [ "Users" ], - "x-immich-permission": "user.read", - "description": "This endpoint requires the `user.read` permission." + "x-immich-permission": "user.read" } }, "/users/{id}/profile-image": { "get": { + "description": "Retrieve the profile image file for a user.", "operationId": "getProfileImage", "parameters": [ { @@ -9952,15 +10209,16 @@ "api_key": [] } ], + "summary": "Retrieve user profile image", "tags": [ "Users" ], - "x-immich-permission": "userProfileImage.read", - "description": "This endpoint requires the `userProfileImage.read` permission." + "x-immich-permission": "userProfileImage.read" } }, "/view/folder": { "get": { + "description": "Retrieve assets that are children of a specific folder.", "operationId": "getAssetsByOriginalPath", "parameters": [ { @@ -9998,13 +10256,15 @@ "api_key": [] } ], + "summary": "Retrieve assets by original path", "tags": [ - "View" + "Views" ] } }, "/view/folder/unique-paths": { "get": { + "description": "Retrieve a list of unique folder paths from asset original paths.", "operationId": "getUniqueOriginalPaths", "parameters": [], "responses": { @@ -10033,8 +10293,9 @@ "api_key": [] } ], + "summary": "Retrieve unique paths", "tags": [ - "View" + "Views" ] } } @@ -10045,7 +10306,136 @@ "version": "2.2.3", "contact": {} }, - "tags": [], + "tags": [ + { + "name": "Activities", + "description": "An activity is a like or a comment made by a user on an asset or album." + }, + { + "name": "Albums", + "description": "An album is a collection of assets that can be shared with other users or via shared links." + }, + { + "name": "API keys", + "description": "An api key can be used to programmatically access the Immich API." + }, + { + "name": "Assets", + "description": "An asset is an image or video that has been uploaded to Immich." + }, + { + "name": "Authentication", + "description": "Endpoints related to user authentication, including OAuth." + }, + { + "name": "Authentication (admin)", + "description": "Administrative endpoints related to authentication." + }, + { + "name": "Deprecated", + "description": "Deprecated endpoints that are planned for removal in the next major release." + }, + { + "name": "Download", + "description": "Endpoints for downloading assets or collections of assets." + }, + { + "name": "Duplicates", + "description": "Endpoints for managing and identifying duplicate assets." + }, + { + "name": "Faces", + "description": "A face is a detected human face within an asset, which can be associated with a person. Faces are normally detected via machine learning, but can also be created via manually." + }, + { + "name": "Jobs", + "description": "Queues and background jobs are used for processing tasks asynchronously. Queues can be paused and resumed as needed." + }, + { + "name": "Libraries", + "description": "An external library is made up of input file paths or expressions that are scanned for asset files. Discovered files are automatically imported. Assets much be unique within a library, but can be duplicated across libraries. Each user has a default upload library, and can have one or more external libraries." + }, + { + "name": "Map", + "description": "Map endpoints include supplemental functionality related to geolocation, such as reverse geocoding and retrieving map markers for assets with geolocation data." + }, + { + "name": "Memories", + "description": "A memory is a specialized collection of assets with dedicated viewing implementations in the web and mobile clients. A memory includes fields related to visibility and are automatically generated per user via a background job." + }, + { + "name": "Notifications", + "description": "A notification is a specialized message sent to users to inform them of important events. Currently, these notifications are only shown in the Immich web application." + }, + { + "name": "Notifications (admin)", + "description": "Notification administrative endpoints." + }, + { + "name": "Partners", + "description": "A partner is a link with another user that allows sharing of assets between two users." + }, + { + "name": "People", + "description": "A person is a collection of faces, which can be favorited and named. A person can also be merged into another person. People are automatically created via the face recognition job." + }, + { + "name": "Search", + "description": "Endpoints related to searching assets via text, smart search, optical character recognition (OCR), and other filters like person, album, and other metadata. Search endpoints usually support pagination and sorting." + }, + { + "name": "Server", + "description": "Information about the current server deployment, including version and build information, available features, supported media types, and more." + }, + { + "name": "Sessions", + "description": "A session represents an authenticated login session for a user. Sessions also appear in the web application as \"Authorized devices\"." + }, + { + "name": "Shared links", + "description": "A shared link is a public url that provides access to a specific album, asset, or collection of assets. A shared link can be protected with a password, include a specific slug, allow or disallow downloads, and optionally include an expiration date." + }, + { + "name": "Stacks", + "description": "A stack is a group of related assets. One asset is the \"primary\" asset, and the rest are \"child\" assets. On the main timeline, stack parents are included by default, while child assets are hidden." + }, + { + "name": "Sync", + "description": "A collection of endpoints for the new mobile synchronization implementation." + }, + { + "name": "System config", + "description": "Endpoints to view, modify, and validate the system configuration settings." + }, + { + "name": "System metadata", + "description": "Endpoints to view, modify, and validate the system metadata, which includes information about things like admin onboarding status." + }, + { + "name": "Tags", + "description": "A tag is a user-defined label that can be applied to assets for organizational purposes. Tags can also be hierarchical, allowing for parent-child relationships between tags." + }, + { + "name": "Timeline", + "description": "Specialized endpoints related to the timeline implementation used in the web application. External applications or tools should not use or rely on these endpoints, as they are subject to change without notice." + }, + { + "name": "Trash", + "description": "Endpoints for managing the trash can, which includes assets that have been discarded. Items in the trash are automatically deleted after a configured amount of time." + }, + { + "name": "Users (admin)", + "description": "Administrative endpoints for managing users, including creating, updating, deleting, and restoring users. Also includes endpoints for resetting passwords and PIN codes." + }, + { + "name": "Users", + "description": "Endpoints for viewing and updating the current users, including product key information, profile picture data, onboarding progress, and more." + }, + { + "name": "Views", + "description": "Endpoints for specialized views, such as the folder view." + } + ], "servers": [ { "url": "/api" diff --git a/open-api/typescript-sdk/src/fetch-client.ts b/open-api/typescript-sdk/src/fetch-client.ts index a0f43c620b..eed7b27088 100644 --- a/open-api/typescript-sdk/src/fetch-client.ts +++ b/open-api/typescript-sdk/src/fetch-client.ts @@ -1677,7 +1677,7 @@ export type CreateProfileImageResponseDto = { userId: string; }; /** - * This endpoint requires the `activity.read` permission. + * List all activities */ export function getActivities({ albumId, assetId, level, $type, userId }: { albumId: string; @@ -1700,7 +1700,7 @@ export function getActivities({ albumId, assetId, level, $type, userId }: { })); } /** - * This endpoint requires the `activity.create` permission. + * Create an activity */ export function createActivity({ activityCreateDto }: { activityCreateDto: ActivityCreateDto; @@ -1715,7 +1715,7 @@ export function createActivity({ activityCreateDto }: { }))); } /** - * This endpoint requires the `activity.statistics` permission. + * Retrieve activity statistics */ export function getActivityStatistics({ albumId, assetId }: { albumId: string; @@ -1732,7 +1732,7 @@ export function getActivityStatistics({ albumId, assetId }: { })); } /** - * This endpoint requires the `activity.delete` permission. + * Delete an activity */ export function deleteActivity({ id }: { id: string; @@ -1743,7 +1743,7 @@ export function deleteActivity({ id }: { })); } /** - * This endpoint is an admin-only route, and requires the `adminAuth.unlinkAll` permission. + * Unlink all OAuth accounts */ export function unlinkAllOAuthAccountsAdmin(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchText("/admin/auth/unlink-all", { @@ -1751,6 +1751,9 @@ export function unlinkAllOAuthAccountsAdmin(opts?: Oazapfts.RequestOpts) { method: "POST" })); } +/** + * Create a notification + */ export function createNotification({ notificationCreateDto }: { notificationCreateDto: NotificationCreateDto; }, opts?: Oazapfts.RequestOpts) { @@ -1763,6 +1766,9 @@ export function createNotification({ notificationCreateDto }: { body: notificationCreateDto }))); } +/** + * Render email template + */ export function getNotificationTemplateAdmin({ name, templateDto }: { name: string; templateDto: TemplateDto; @@ -1776,6 +1782,9 @@ export function getNotificationTemplateAdmin({ name, templateDto }: { body: templateDto }))); } +/** + * Send test email + */ export function sendTestEmailAdmin({ systemConfigSmtpDto }: { systemConfigSmtpDto: SystemConfigSmtpDto; }, opts?: Oazapfts.RequestOpts) { @@ -1789,7 +1798,7 @@ export function sendTestEmailAdmin({ systemConfigSmtpDto }: { }))); } /** - * This endpoint is an admin-only route, and requires the `adminUser.read` permission. + * Search users */ export function searchUsersAdmin({ id, withDeleted }: { id?: string; @@ -1806,7 +1815,7 @@ export function searchUsersAdmin({ id, withDeleted }: { })); } /** - * This endpoint is an admin-only route, and requires the `adminUser.create` permission. + * Create a user */ export function createUserAdmin({ userAdminCreateDto }: { userAdminCreateDto: UserAdminCreateDto; @@ -1821,7 +1830,7 @@ export function createUserAdmin({ userAdminCreateDto }: { }))); } /** - * This endpoint is an admin-only route, and requires the `adminUser.delete` permission. + * Delete a user */ export function deleteUserAdmin({ id, userAdminDeleteDto }: { id: string; @@ -1837,7 +1846,7 @@ export function deleteUserAdmin({ id, userAdminDeleteDto }: { }))); } /** - * This endpoint is an admin-only route, and requires the `adminUser.read` permission. + * Retrieve a user */ export function getUserAdmin({ id }: { id: string; @@ -1850,7 +1859,7 @@ export function getUserAdmin({ id }: { })); } /** - * This endpoint is an admin-only route, and requires the `adminUser.update` permission. + * Update a user */ export function updateUserAdmin({ id, userAdminUpdateDto }: { id: string; @@ -1866,7 +1875,7 @@ export function updateUserAdmin({ id, userAdminUpdateDto }: { }))); } /** - * This endpoint is an admin-only route, and requires the `adminUser.read` permission. + * Retrieve user preferences */ export function getUserPreferencesAdmin({ id }: { id: string; @@ -1879,7 +1888,7 @@ export function getUserPreferencesAdmin({ id }: { })); } /** - * This endpoint is an admin-only route, and requires the `adminUser.update` permission. + * Update user preferences */ export function updateUserPreferencesAdmin({ id, userPreferencesUpdateDto }: { id: string; @@ -1895,7 +1904,7 @@ export function updateUserPreferencesAdmin({ id, userPreferencesUpdateDto }: { }))); } /** - * This endpoint is an admin-only route, and requires the `adminUser.delete` permission. + * Restore a deleted user */ export function restoreUserAdmin({ id }: { id: string; @@ -1909,7 +1918,7 @@ export function restoreUserAdmin({ id }: { })); } /** - * This endpoint is an admin-only route, and requires the `adminSession.read` permission. + * Retrieve user sessions */ export function getUserSessionsAdmin({ id }: { id: string; @@ -1922,7 +1931,7 @@ export function getUserSessionsAdmin({ id }: { })); } /** - * This endpoint is an admin-only route, and requires the `adminUser.read` permission. + * Retrieve user statistics */ export function getUserStatisticsAdmin({ id, isFavorite, isTrashed, visibility }: { id: string; @@ -1942,7 +1951,7 @@ export function getUserStatisticsAdmin({ id, isFavorite, isTrashed, visibility } })); } /** - * This endpoint requires the `album.read` permission. + * List all albums */ export function getAllAlbums({ assetId, shared }: { assetId?: string; @@ -1959,7 +1968,7 @@ export function getAllAlbums({ assetId, shared }: { })); } /** - * This endpoint requires the `album.create` permission. + * Create an album */ export function createAlbum({ createAlbumDto }: { createAlbumDto: CreateAlbumDto; @@ -1974,7 +1983,7 @@ export function createAlbum({ createAlbumDto }: { }))); } /** - * This endpoint requires the `albumAsset.create` permission. + * Add assets to albums */ export function addAssetsToAlbums({ key, slug, albumsAddAssetsDto }: { key?: string; @@ -1994,7 +2003,7 @@ export function addAssetsToAlbums({ key, slug, albumsAddAssetsDto }: { }))); } /** - * This endpoint requires the `album.statistics` permission. + * Retrieve album statistics */ export function getAlbumStatistics(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -2005,7 +2014,7 @@ export function getAlbumStatistics(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `album.delete` permission. + * Delete an album */ export function deleteAlbum({ id }: { id: string; @@ -2016,7 +2025,7 @@ export function deleteAlbum({ id }: { })); } /** - * This endpoint requires the `album.read` permission. + * Retrieve an album */ export function getAlbumInfo({ id, key, slug, withoutAssets }: { id: string; @@ -2036,7 +2045,7 @@ export function getAlbumInfo({ id, key, slug, withoutAssets }: { })); } /** - * This endpoint requires the `album.update` permission. + * Update an album */ export function updateAlbumInfo({ id, updateAlbumDto }: { id: string; @@ -2052,7 +2061,7 @@ export function updateAlbumInfo({ id, updateAlbumDto }: { }))); } /** - * This endpoint requires the `albumAsset.delete` permission. + * Remove assets from an album */ export function removeAssetFromAlbum({ id, bulkIdsDto }: { id: string; @@ -2068,7 +2077,7 @@ export function removeAssetFromAlbum({ id, bulkIdsDto }: { }))); } /** - * This endpoint requires the `albumAsset.create` permission. + * Add assets to an album */ export function addAssetsToAlbum({ id, key, slug, bulkIdsDto }: { id: string; @@ -2089,7 +2098,7 @@ export function addAssetsToAlbum({ id, key, slug, bulkIdsDto }: { }))); } /** - * This endpoint requires the `albumUser.delete` permission. + * Remove user from album */ export function removeUserFromAlbum({ id, userId }: { id: string; @@ -2101,7 +2110,7 @@ export function removeUserFromAlbum({ id, userId }: { })); } /** - * This endpoint requires the `albumUser.update` permission. + * Update user role */ export function updateAlbumUser({ id, userId, updateAlbumUserDto }: { id: string; @@ -2115,7 +2124,7 @@ export function updateAlbumUser({ id, userId, updateAlbumUserDto }: { }))); } /** - * This endpoint requires the `albumUser.create` permission. + * Share album with users */ export function addUsersToAlbum({ id, addUsersDto }: { id: string; @@ -2131,7 +2140,7 @@ export function addUsersToAlbum({ id, addUsersDto }: { }))); } /** - * This endpoint requires the `apiKey.read` permission. + * List all API keys */ export function getApiKeys(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -2142,7 +2151,7 @@ export function getApiKeys(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `apiKey.create` permission. + * Create an API key */ export function createApiKey({ apiKeyCreateDto }: { apiKeyCreateDto: ApiKeyCreateDto; @@ -2156,6 +2165,9 @@ export function createApiKey({ apiKeyCreateDto }: { body: apiKeyCreateDto }))); } +/** + * Retrieve the current API key + */ export function getMyApiKey(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -2165,7 +2177,7 @@ export function getMyApiKey(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `apiKey.delete` permission. + * Delete an API key */ export function deleteApiKey({ id }: { id: string; @@ -2176,7 +2188,7 @@ export function deleteApiKey({ id }: { })); } /** - * This endpoint requires the `apiKey.read` permission. + * Retrieve an API key */ export function getApiKey({ id }: { id: string; @@ -2189,7 +2201,7 @@ export function getApiKey({ id }: { })); } /** - * This endpoint requires the `apiKey.update` permission. + * Update an API key */ export function updateApiKey({ id, apiKeyUpdateDto }: { id: string; @@ -2205,7 +2217,7 @@ export function updateApiKey({ id, apiKeyUpdateDto }: { }))); } /** - * This endpoint requires the `asset.delete` permission. + * Delete assets */ export function deleteAssets({ assetBulkDeleteDto }: { assetBulkDeleteDto: AssetBulkDeleteDto; @@ -2217,7 +2229,7 @@ export function deleteAssets({ assetBulkDeleteDto }: { }))); } /** - * This endpoint requires the `asset.upload` permission. + * Upload asset */ export function uploadAsset({ key, slug, xImmichChecksum, assetMediaCreateDto }: { key?: string; @@ -2241,7 +2253,7 @@ export function uploadAsset({ key, slug, xImmichChecksum, assetMediaCreateDto }: }))); } /** - * This endpoint requires the `asset.update` permission. + * Update assets */ export function updateAssets({ assetBulkUpdateDto }: { assetBulkUpdateDto: AssetBulkUpdateDto; @@ -2253,7 +2265,7 @@ export function updateAssets({ assetBulkUpdateDto }: { }))); } /** - * checkBulkUpload + * Check bulk upload */ export function checkBulkUpload({ assetBulkUploadCheckDto }: { assetBulkUploadCheckDto: AssetBulkUploadCheckDto; @@ -2268,7 +2280,7 @@ export function checkBulkUpload({ assetBulkUploadCheckDto }: { }))); } /** - * This endpoint requires the `asset.copy` permission. + * Copy asset */ export function copyAsset({ assetCopyDto }: { assetCopyDto: AssetCopyDto; @@ -2280,7 +2292,7 @@ export function copyAsset({ assetCopyDto }: { }))); } /** - * getAllUserAssetsByDeviceId + * Retrieve assets by device ID */ export function getAllUserAssetsByDeviceId({ deviceId }: { deviceId: string; @@ -2293,7 +2305,7 @@ export function getAllUserAssetsByDeviceId({ deviceId }: { })); } /** - * checkExistingAssets + * Check existing assets */ export function checkExistingAssets({ checkExistingAssetsDto }: { checkExistingAssetsDto: CheckExistingAssetsDto; @@ -2307,6 +2319,9 @@ export function checkExistingAssets({ checkExistingAssetsDto }: { body: checkExistingAssetsDto }))); } +/** + * Run an asset job + */ export function runAssetJobs({ assetJobsDto }: { assetJobsDto: AssetJobsDto; }, opts?: Oazapfts.RequestOpts) { @@ -2317,7 +2332,7 @@ export function runAssetJobs({ assetJobsDto }: { }))); } /** - * This property was deprecated in v1.116.0. This endpoint requires the `asset.read` permission. + * Get random assets */ export function getRandom({ count }: { count?: number; @@ -2332,7 +2347,7 @@ export function getRandom({ count }: { })); } /** - * This endpoint requires the `asset.statistics` permission. + * Get asset statistics */ export function getAssetStatistics({ isFavorite, isTrashed, visibility }: { isFavorite?: boolean; @@ -2351,7 +2366,7 @@ export function getAssetStatistics({ isFavorite, isTrashed, visibility }: { })); } /** - * This endpoint requires the `asset.read` permission. + * Retrieve an asset */ export function getAssetInfo({ id, key, slug }: { id: string; @@ -2369,7 +2384,7 @@ export function getAssetInfo({ id, key, slug }: { })); } /** - * This endpoint requires the `asset.update` permission. + * Update an asset */ export function updateAsset({ id, updateAssetDto }: { id: string; @@ -2385,7 +2400,7 @@ export function updateAsset({ id, updateAssetDto }: { }))); } /** - * This endpoint requires the `asset.read` permission. + * Get asset metadata */ export function getAssetMetadata({ id }: { id: string; @@ -2398,7 +2413,7 @@ export function getAssetMetadata({ id }: { })); } /** - * This endpoint requires the `asset.update` permission. + * Update asset metadata */ export function updateAssetMetadata({ id, assetMetadataUpsertDto }: { id: string; @@ -2414,7 +2429,7 @@ export function updateAssetMetadata({ id, assetMetadataUpsertDto }: { }))); } /** - * This endpoint requires the `asset.update` permission. + * Delete asset metadata by key */ export function deleteAssetMetadata({ id, key }: { id: string; @@ -2426,7 +2441,7 @@ export function deleteAssetMetadata({ id, key }: { })); } /** - * This endpoint requires the `asset.read` permission. + * Retrieve asset metadata by key */ export function getAssetMetadataByKey({ id, key }: { id: string; @@ -2440,7 +2455,7 @@ export function getAssetMetadataByKey({ id, key }: { })); } /** - * This endpoint requires the `asset.read` permission. + * Retrieve asset OCR data */ export function getAssetOcr({ id }: { id: string; @@ -2453,7 +2468,7 @@ export function getAssetOcr({ id }: { })); } /** - * This endpoint requires the `asset.download` permission. + * Download original asset */ export function downloadAsset({ id, key, slug }: { id: string; @@ -2471,7 +2486,7 @@ export function downloadAsset({ id, key, slug }: { })); } /** - * Replace the asset with new file, without changing its id + * Replace asset */ export function replaceAsset({ id, key, slug, assetMediaReplaceDto }: { id: string; @@ -2492,7 +2507,7 @@ export function replaceAsset({ id, key, slug, assetMediaReplaceDto }: { }))); } /** - * This endpoint requires the `asset.view` permission. + * View asset thumbnail */ export function viewAsset({ id, key, size, slug }: { id: string; @@ -2512,7 +2527,7 @@ export function viewAsset({ id, key, size, slug }: { })); } /** - * This endpoint requires the `asset.view` permission. + * Play asset video */ export function playAssetVideo({ id, key, slug }: { id: string; @@ -2529,6 +2544,9 @@ export function playAssetVideo({ id, key, slug }: { ...opts })); } +/** + * Register admin + */ export function signUpAdmin({ signUpDto }: { signUpDto: SignUpDto; }, opts?: Oazapfts.RequestOpts) { @@ -2542,7 +2560,7 @@ export function signUpAdmin({ signUpDto }: { }))); } /** - * This endpoint requires the `auth.changePassword` permission. + * Change password */ export function changePassword({ changePasswordDto }: { changePasswordDto: ChangePasswordDto; @@ -2556,6 +2574,9 @@ export function changePassword({ changePasswordDto }: { body: changePasswordDto }))); } +/** + * Login + */ export function login({ loginCredentialDto }: { loginCredentialDto: LoginCredentialDto; }, opts?: Oazapfts.RequestOpts) { @@ -2568,6 +2589,9 @@ export function login({ loginCredentialDto }: { body: loginCredentialDto }))); } +/** + * Logout + */ export function logout(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -2578,7 +2602,7 @@ export function logout(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `pinCode.delete` permission. + * Reset pin code */ export function resetPinCode({ pinCodeResetDto }: { pinCodeResetDto: PinCodeResetDto; @@ -2590,7 +2614,7 @@ export function resetPinCode({ pinCodeResetDto }: { }))); } /** - * This endpoint requires the `pinCode.create` permission. + * Setup pin code */ export function setupPinCode({ pinCodeSetupDto }: { pinCodeSetupDto: PinCodeSetupDto; @@ -2602,7 +2626,7 @@ export function setupPinCode({ pinCodeSetupDto }: { }))); } /** - * This endpoint requires the `pinCode.update` permission. + * Change pin code */ export function changePinCode({ pinCodeChangeDto }: { pinCodeChangeDto: PinCodeChangeDto; @@ -2613,12 +2637,18 @@ export function changePinCode({ pinCodeChangeDto }: { body: pinCodeChangeDto }))); } +/** + * Lock auth session + */ export function lockAuthSession(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchText("/auth/session/lock", { ...opts, method: "POST" })); } +/** + * Unlock auth session + */ export function unlockAuthSession({ sessionUnlockDto }: { sessionUnlockDto: SessionUnlockDto; }, opts?: Oazapfts.RequestOpts) { @@ -2628,6 +2658,9 @@ export function unlockAuthSession({ sessionUnlockDto }: { body: sessionUnlockDto }))); } +/** + * Retrieve auth status + */ export function getAuthStatus(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -2636,6 +2669,9 @@ export function getAuthStatus(opts?: Oazapfts.RequestOpts) { ...opts })); } +/** + * Validate access token + */ export function validateAccessToken(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -2646,7 +2682,7 @@ export function validateAccessToken(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `asset.download` permission. + * Download asset archive */ export function downloadArchive({ key, slug, assetIdsDto }: { key?: string; @@ -2666,7 +2702,7 @@ export function downloadArchive({ key, slug, assetIdsDto }: { }))); } /** - * This endpoint requires the `asset.download` permission. + * Retrieve download information */ export function getDownloadInfo({ key, slug, downloadInfoDto }: { key?: string; @@ -2686,7 +2722,7 @@ export function getDownloadInfo({ key, slug, downloadInfoDto }: { }))); } /** - * This endpoint requires the `duplicate.delete` permission. + * Delete duplicates */ export function deleteDuplicates({ bulkIdsDto }: { bulkIdsDto: BulkIdsDto; @@ -2698,7 +2734,7 @@ export function deleteDuplicates({ bulkIdsDto }: { }))); } /** - * This endpoint requires the `duplicate.read` permission. + * Retrieve duplicates */ export function getAssetDuplicates(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -2709,7 +2745,7 @@ export function getAssetDuplicates(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `duplicate.delete` permission. + * Delete a duplicate */ export function deleteDuplicate({ id }: { id: string; @@ -2720,7 +2756,7 @@ export function deleteDuplicate({ id }: { })); } /** - * This endpoint requires the `face.read` permission. + * Retrieve faces for asset */ export function getFaces({ id }: { id: string; @@ -2735,7 +2771,7 @@ export function getFaces({ id }: { })); } /** - * This endpoint requires the `face.create` permission. + * Create a face */ export function createFace({ assetFaceCreateDto }: { assetFaceCreateDto: AssetFaceCreateDto; @@ -2747,7 +2783,7 @@ export function createFace({ assetFaceCreateDto }: { }))); } /** - * This endpoint requires the `face.delete` permission. + * Delete a face */ export function deleteFace({ id, assetFaceDeleteDto }: { id: string; @@ -2760,7 +2796,7 @@ export function deleteFace({ id, assetFaceDeleteDto }: { }))); } /** - * This endpoint requires the `face.update` permission. + * Re-assign a face to another person */ export function reassignFacesById({ id, faceDto }: { id: string; @@ -2776,7 +2812,7 @@ export function reassignFacesById({ id, faceDto }: { }))); } /** - * This endpoint is an admin-only route, and requires the `job.read` permission. + * Retrieve queue counts and status */ export function getAllJobsStatus(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -2787,7 +2823,7 @@ export function getAllJobsStatus(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint is an admin-only route, and requires the `job.create` permission. + * Create a manual job */ export function createJob({ jobCreateDto }: { jobCreateDto: JobCreateDto; @@ -2799,7 +2835,7 @@ export function createJob({ jobCreateDto }: { }))); } /** - * This endpoint is an admin-only route, and requires the `job.create` permission. + * Run jobs */ export function sendJobCommand({ id, jobCommandDto }: { id: JobName; @@ -2815,7 +2851,7 @@ export function sendJobCommand({ id, jobCommandDto }: { }))); } /** - * This endpoint is an admin-only route, and requires the `library.read` permission. + * Retrieve libraries */ export function getAllLibraries(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -2826,7 +2862,7 @@ export function getAllLibraries(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint is an admin-only route, and requires the `library.create` permission. + * Create a library */ export function createLibrary({ createLibraryDto }: { createLibraryDto: CreateLibraryDto; @@ -2841,7 +2877,7 @@ export function createLibrary({ createLibraryDto }: { }))); } /** - * This endpoint is an admin-only route, and requires the `library.delete` permission. + * Delete a library */ export function deleteLibrary({ id }: { id: string; @@ -2852,7 +2888,7 @@ export function deleteLibrary({ id }: { })); } /** - * This endpoint is an admin-only route, and requires the `library.read` permission. + * Retrieve a library */ export function getLibrary({ id }: { id: string; @@ -2865,7 +2901,7 @@ export function getLibrary({ id }: { })); } /** - * This endpoint is an admin-only route, and requires the `library.update` permission. + * Update a library */ export function updateLibrary({ id, updateLibraryDto }: { id: string; @@ -2881,7 +2917,7 @@ export function updateLibrary({ id, updateLibraryDto }: { }))); } /** - * This endpoint is an admin-only route, and requires the `library.update` permission. + * Scan a library */ export function scanLibrary({ id }: { id: string; @@ -2892,7 +2928,7 @@ export function scanLibrary({ id }: { })); } /** - * This endpoint is an admin-only route, and requires the `library.statistics` permission. + * Retrieve library statistics */ export function getLibraryStatistics({ id }: { id: string; @@ -2904,6 +2940,9 @@ export function getLibraryStatistics({ id }: { ...opts })); } +/** + * Validate library settings + */ export function validate({ id, validateLibraryDto }: { id: string; validateLibraryDto: ValidateLibraryDto; @@ -2917,11 +2956,14 @@ export function validate({ id, validateLibraryDto }: { body: validateLibraryDto }))); } -export function getMapMarkers({ isArchived, isFavorite, fileCreatedAfter, fileCreatedBefore, withPartners, withSharedAlbums }: { - isArchived?: boolean; - isFavorite?: boolean; +/** + * Retrieve map markers + */ +export function getMapMarkers({ fileCreatedAfter, fileCreatedBefore, isArchived, isFavorite, withPartners, withSharedAlbums }: { fileCreatedAfter?: string; fileCreatedBefore?: string; + isArchived?: boolean; + isFavorite?: boolean; withPartners?: boolean; withSharedAlbums?: boolean; }, opts?: Oazapfts.RequestOpts) { @@ -2929,16 +2971,19 @@ export function getMapMarkers({ isArchived, isFavorite, fileCreatedAfter, fileCr status: 200; data: MapMarkerResponseDto[]; }>(`/map/markers${QS.query(QS.explode({ - isArchived, - isFavorite, fileCreatedAfter, fileCreatedBefore, + isArchived, + isFavorite, withPartners, withSharedAlbums }))}`, { ...opts })); } +/** + * Reverse geocode coordinates + */ export function reverseGeocode({ lat, lon }: { lat: number; lon: number; @@ -2954,7 +2999,7 @@ export function reverseGeocode({ lat, lon }: { })); } /** - * This endpoint requires the `memory.read` permission. + * Retrieve memories */ export function searchMemories({ $for, isSaved, isTrashed, order, size, $type }: { $for?: string; @@ -2979,7 +3024,7 @@ export function searchMemories({ $for, isSaved, isTrashed, order, size, $type }: })); } /** - * This endpoint requires the `memory.create` permission. + * Create a memory */ export function createMemory({ memoryCreateDto }: { memoryCreateDto: MemoryCreateDto; @@ -2994,7 +3039,7 @@ export function createMemory({ memoryCreateDto }: { }))); } /** - * This endpoint requires the `memory.statistics` permission. + * Retrieve memories statistics */ export function memoriesStatistics({ $for, isSaved, isTrashed, order, size, $type }: { $for?: string; @@ -3019,7 +3064,7 @@ export function memoriesStatistics({ $for, isSaved, isTrashed, order, size, $typ })); } /** - * This endpoint requires the `memory.delete` permission. + * Delete a memory */ export function deleteMemory({ id }: { id: string; @@ -3030,7 +3075,7 @@ export function deleteMemory({ id }: { })); } /** - * This endpoint requires the `memory.read` permission. + * Retrieve a memory */ export function getMemory({ id }: { id: string; @@ -3043,7 +3088,7 @@ export function getMemory({ id }: { })); } /** - * This endpoint requires the `memory.update` permission. + * Update a memory */ export function updateMemory({ id, memoryUpdateDto }: { id: string; @@ -3059,7 +3104,7 @@ export function updateMemory({ id, memoryUpdateDto }: { }))); } /** - * This endpoint requires the `memoryAsset.delete` permission. + * Remove assets from a memory */ export function removeMemoryAssets({ id, bulkIdsDto }: { id: string; @@ -3075,7 +3120,7 @@ export function removeMemoryAssets({ id, bulkIdsDto }: { }))); } /** - * This endpoint requires the `memoryAsset.create` permission. + * Add assets to a memory */ export function addMemoryAssets({ id, bulkIdsDto }: { id: string; @@ -3091,7 +3136,7 @@ export function addMemoryAssets({ id, bulkIdsDto }: { }))); } /** - * This endpoint requires the `notification.delete` permission. + * Delete notifications */ export function deleteNotifications({ notificationDeleteAllDto }: { notificationDeleteAllDto: NotificationDeleteAllDto; @@ -3103,7 +3148,7 @@ export function deleteNotifications({ notificationDeleteAllDto }: { }))); } /** - * This endpoint requires the `notification.read` permission. + * Retrieve notifications */ export function getNotifications({ id, level, $type, unread }: { id?: string; @@ -3124,7 +3169,7 @@ export function getNotifications({ id, level, $type, unread }: { })); } /** - * This endpoint requires the `notification.update` permission. + * Update notifications */ export function updateNotifications({ notificationUpdateAllDto }: { notificationUpdateAllDto: NotificationUpdateAllDto; @@ -3136,7 +3181,7 @@ export function updateNotifications({ notificationUpdateAllDto }: { }))); } /** - * This endpoint requires the `notification.delete` permission. + * Delete a notification */ export function deleteNotification({ id }: { id: string; @@ -3147,7 +3192,7 @@ export function deleteNotification({ id }: { })); } /** - * This endpoint requires the `notification.read` permission. + * Get a notification */ export function getNotification({ id }: { id: string; @@ -3160,7 +3205,7 @@ export function getNotification({ id }: { })); } /** - * This endpoint requires the `notification.update` permission. + * Update a notification */ export function updateNotification({ id, notificationUpdateDto }: { id: string; @@ -3175,6 +3220,9 @@ export function updateNotification({ id, notificationUpdateDto }: { body: notificationUpdateDto }))); } +/** + * Start OAuth + */ export function startOAuth({ oAuthConfigDto }: { oAuthConfigDto: OAuthConfigDto; }, opts?: Oazapfts.RequestOpts) { @@ -3187,6 +3235,9 @@ export function startOAuth({ oAuthConfigDto }: { body: oAuthConfigDto }))); } +/** + * Finish OAuth + */ export function finishOAuth({ oAuthCallbackDto }: { oAuthCallbackDto: OAuthCallbackDto; }, opts?: Oazapfts.RequestOpts) { @@ -3199,6 +3250,9 @@ export function finishOAuth({ oAuthCallbackDto }: { body: oAuthCallbackDto }))); } +/** + * Link OAuth account + */ export function linkOAuthAccount({ oAuthCallbackDto }: { oAuthCallbackDto: OAuthCallbackDto; }, opts?: Oazapfts.RequestOpts) { @@ -3211,11 +3265,17 @@ export function linkOAuthAccount({ oAuthCallbackDto }: { body: oAuthCallbackDto }))); } +/** + * Redirect OAuth to mobile + */ export function redirectOAuthToMobile(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchText("/oauth/mobile-redirect", { ...opts })); } +/** + * Unlink OAuth account + */ export function unlinkOAuthAccount(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -3226,7 +3286,7 @@ export function unlinkOAuthAccount(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `partner.read` permission. + * Retrieve partners */ export function getPartners({ direction }: { direction: PartnerDirection; @@ -3241,7 +3301,7 @@ export function getPartners({ direction }: { })); } /** - * This endpoint requires the `partner.create` permission. + * Create a partner */ export function createPartner({ partnerCreateDto }: { partnerCreateDto: PartnerCreateDto; @@ -3256,7 +3316,7 @@ export function createPartner({ partnerCreateDto }: { }))); } /** - * This endpoint requires the `partner.delete` permission. + * Remove a partner */ export function removePartner({ id }: { id: string; @@ -3267,7 +3327,7 @@ export function removePartner({ id }: { })); } /** - * This property was deprecated in v1.141.0. This endpoint requires the `partner.create` permission. + * Create a partner */ export function createPartnerDeprecated({ id }: { id: string; @@ -3281,7 +3341,7 @@ export function createPartnerDeprecated({ id }: { })); } /** - * This endpoint requires the `partner.update` permission. + * Update a partner */ export function updatePartner({ id, partnerUpdateDto }: { id: string; @@ -3297,7 +3357,7 @@ export function updatePartner({ id, partnerUpdateDto }: { }))); } /** - * This endpoint requires the `person.delete` permission. + * Delete people */ export function deletePeople({ bulkIdsDto }: { bulkIdsDto: BulkIdsDto; @@ -3309,7 +3369,7 @@ export function deletePeople({ bulkIdsDto }: { }))); } /** - * This endpoint requires the `person.read` permission. + * Get all people */ export function getAllPeople({ closestAssetId, closestPersonId, page, size, withHidden }: { closestAssetId?: string; @@ -3332,7 +3392,7 @@ export function getAllPeople({ closestAssetId, closestPersonId, page, size, with })); } /** - * This endpoint requires the `person.create` permission. + * Create a person */ export function createPerson({ personCreateDto }: { personCreateDto: PersonCreateDto; @@ -3347,7 +3407,7 @@ export function createPerson({ personCreateDto }: { }))); } /** - * This endpoint requires the `person.update` permission. + * Update people */ export function updatePeople({ peopleUpdateDto }: { peopleUpdateDto: PeopleUpdateDto; @@ -3362,7 +3422,7 @@ export function updatePeople({ peopleUpdateDto }: { }))); } /** - * This endpoint requires the `person.delete` permission. + * Delete person */ export function deletePerson({ id }: { id: string; @@ -3373,7 +3433,7 @@ export function deletePerson({ id }: { })); } /** - * This endpoint requires the `person.read` permission. + * Get a person */ export function getPerson({ id }: { id: string; @@ -3386,7 +3446,7 @@ export function getPerson({ id }: { })); } /** - * This endpoint requires the `person.update` permission. + * Update person */ export function updatePerson({ id, personUpdateDto }: { id: string; @@ -3402,7 +3462,7 @@ export function updatePerson({ id, personUpdateDto }: { }))); } /** - * This endpoint requires the `person.merge` permission. + * Merge people */ export function mergePerson({ id, mergePersonDto }: { id: string; @@ -3418,7 +3478,7 @@ export function mergePerson({ id, mergePersonDto }: { }))); } /** - * This endpoint requires the `person.reassign` permission. + * Reassign faces */ export function reassignFaces({ id, assetFaceUpdateDto }: { id: string; @@ -3434,7 +3494,7 @@ export function reassignFaces({ id, assetFaceUpdateDto }: { }))); } /** - * This endpoint requires the `person.statistics` permission. + * Get person statistics */ export function getPersonStatistics({ id }: { id: string; @@ -3447,7 +3507,7 @@ export function getPersonStatistics({ id }: { })); } /** - * This endpoint requires the `person.read` permission. + * Get person thumbnail */ export function getPersonThumbnail({ id }: { id: string; @@ -3460,7 +3520,7 @@ export function getPersonThumbnail({ id }: { })); } /** - * This endpoint requires the `asset.read` permission. + * Retrieve assets by city */ export function getAssetsByCity(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -3471,7 +3531,7 @@ export function getAssetsByCity(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `asset.read` permission. + * Retrieve explore data */ export function getExploreData(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -3482,7 +3542,7 @@ export function getExploreData(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `asset.read` permission. + * Search large assets */ export function searchLargeAssets({ albumIds, city, country, createdAfter, createdBefore, deviceId, isEncoded, isFavorite, isMotion, isNotInAlbum, isOffline, lensModel, libraryId, make, minFileSize, model, ocr, personIds, rating, size, state, tagIds, takenAfter, takenBefore, trashedAfter, trashedBefore, $type, updatedAfter, updatedBefore, visibility, withDeleted, withExif }: { albumIds?: string[]; @@ -3560,7 +3620,7 @@ export function searchLargeAssets({ albumIds, city, country, createdAfter, creat })); } /** - * This endpoint requires the `asset.read` permission. + * Search assets by metadata */ export function searchAssets({ metadataSearchDto }: { metadataSearchDto: MetadataSearchDto; @@ -3575,7 +3635,7 @@ export function searchAssets({ metadataSearchDto }: { }))); } /** - * This endpoint requires the `person.read` permission. + * Search people */ export function searchPerson({ name, withHidden }: { name: string; @@ -3592,7 +3652,7 @@ export function searchPerson({ name, withHidden }: { })); } /** - * This endpoint requires the `asset.read` permission. + * Search places */ export function searchPlaces({ name }: { name: string; @@ -3607,7 +3667,7 @@ export function searchPlaces({ name }: { })); } /** - * This endpoint requires the `asset.read` permission. + * Search random assets */ export function searchRandom({ randomSearchDto }: { randomSearchDto: RandomSearchDto; @@ -3622,7 +3682,7 @@ export function searchRandom({ randomSearchDto }: { }))); } /** - * This endpoint requires the `asset.read` permission. + * Smart asset search */ export function searchSmart({ smartSearchDto }: { smartSearchDto: SmartSearchDto; @@ -3637,7 +3697,7 @@ export function searchSmart({ smartSearchDto }: { }))); } /** - * This endpoint requires the `asset.statistics` permission. + * Search asset statistics */ export function searchAssetStatistics({ statisticsSearchDto }: { statisticsSearchDto: StatisticsSearchDto; @@ -3652,7 +3712,7 @@ export function searchAssetStatistics({ statisticsSearchDto }: { }))); } /** - * This endpoint requires the `asset.read` permission. + * Retrieve search suggestions */ export function getSearchSuggestions({ country, includeNull, lensModel, make, model, state, $type }: { country?: string; @@ -3679,7 +3739,7 @@ export function getSearchSuggestions({ country, includeNull, lensModel, make, mo })); } /** - * This endpoint requires the `server.about` permission. + * Get server information */ export function getAboutInfo(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -3690,7 +3750,7 @@ export function getAboutInfo(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `server.apkLinks` permission. + * Get APK links */ export function getApkLinks(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -3700,6 +3760,9 @@ export function getApkLinks(opts?: Oazapfts.RequestOpts) { ...opts })); } +/** + * Get config + */ export function getServerConfig(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -3708,6 +3771,9 @@ export function getServerConfig(opts?: Oazapfts.RequestOpts) { ...opts })); } +/** + * Get features + */ export function getServerFeatures(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -3717,7 +3783,7 @@ export function getServerFeatures(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint is an admin-only route, and requires the `serverLicense.delete` permission. + * Delete server product key */ export function deleteServerLicense(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchText("/server/license", { @@ -3726,7 +3792,7 @@ export function deleteServerLicense(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint is an admin-only route, and requires the `serverLicense.read` permission. + * Get product key */ export function getServerLicense(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -3739,7 +3805,7 @@ export function getServerLicense(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint is an admin-only route, and requires the `serverLicense.update` permission. + * Set server product key */ export function setServerLicense({ licenseKeyDto }: { licenseKeyDto: LicenseKeyDto; @@ -3753,6 +3819,9 @@ export function setServerLicense({ licenseKeyDto }: { body: licenseKeyDto }))); } +/** + * Get supported media types + */ export function getSupportedMediaTypes(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -3761,6 +3830,9 @@ export function getSupportedMediaTypes(opts?: Oazapfts.RequestOpts) { ...opts })); } +/** + * Ping + */ export function pingServer(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -3770,7 +3842,7 @@ export function pingServer(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint is an admin-only route, and requires the `server.statistics` permission. + * Get statistics */ export function getServerStatistics(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -3781,7 +3853,7 @@ export function getServerStatistics(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `server.storage` permission. + * Get storage */ export function getStorage(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -3791,6 +3863,9 @@ export function getStorage(opts?: Oazapfts.RequestOpts) { ...opts })); } +/** + * Get theme + */ export function getTheme(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -3799,6 +3874,9 @@ export function getTheme(opts?: Oazapfts.RequestOpts) { ...opts })); } +/** + * Get server version + */ export function getServerVersion(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -3808,7 +3886,7 @@ export function getServerVersion(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `server.versionCheck` permission. + * Get version check status */ export function getVersionCheck(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -3818,6 +3896,9 @@ export function getVersionCheck(opts?: Oazapfts.RequestOpts) { ...opts })); } +/** + * Get version history + */ export function getVersionHistory(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -3827,7 +3908,7 @@ export function getVersionHistory(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `session.delete` permission. + * Delete all sessions */ export function deleteAllSessions(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchText("/sessions", { @@ -3836,7 +3917,7 @@ export function deleteAllSessions(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `session.read` permission. + * Retrieve sessions */ export function getSessions(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -3847,7 +3928,7 @@ export function getSessions(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `session.create` permission. + * Create a session */ export function createSession({ sessionCreateDto }: { sessionCreateDto: SessionCreateDto; @@ -3862,7 +3943,7 @@ export function createSession({ sessionCreateDto }: { }))); } /** - * This endpoint requires the `session.delete` permission. + * Delete a session */ export function deleteSession({ id }: { id: string; @@ -3873,7 +3954,7 @@ export function deleteSession({ id }: { })); } /** - * This endpoint requires the `session.update` permission. + * Update a session */ export function updateSession({ id, sessionUpdateDto }: { id: string; @@ -3889,7 +3970,7 @@ export function updateSession({ id, sessionUpdateDto }: { }))); } /** - * This endpoint requires the `session.lock` permission. + * Lock a session */ export function lockSession({ id }: { id: string; @@ -3900,7 +3981,7 @@ export function lockSession({ id }: { })); } /** - * This endpoint requires the `sharedLink.read` permission. + * Retrieve all shared links */ export function getAllSharedLinks({ albumId }: { albumId?: string; @@ -3915,7 +3996,7 @@ export function getAllSharedLinks({ albumId }: { })); } /** - * This endpoint requires the `sharedLink.create` permission. + * Create a shared link */ export function createSharedLink({ sharedLinkCreateDto }: { sharedLinkCreateDto: SharedLinkCreateDto; @@ -3929,26 +4010,29 @@ export function createSharedLink({ sharedLinkCreateDto }: { body: sharedLinkCreateDto }))); } -export function getMySharedLink({ password, token, key, slug }: { - password?: string; - token?: string; +/** + * Retrieve current shared link + */ +export function getMySharedLink({ key, password, slug, token }: { key?: string; + password?: string; slug?: string; + token?: string; }, opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; data: SharedLinkResponseDto; }>(`/shared-links/me${QS.query(QS.explode({ - password, - token, key, - slug + password, + slug, + token }))}`, { ...opts })); } /** - * This endpoint requires the `sharedLink.delete` permission. + * Delete a shared link */ export function removeSharedLink({ id }: { id: string; @@ -3959,7 +4043,7 @@ export function removeSharedLink({ id }: { })); } /** - * This endpoint requires the `sharedLink.read` permission. + * Retrieve a shared link */ export function getSharedLinkById({ id }: { id: string; @@ -3972,7 +4056,7 @@ export function getSharedLinkById({ id }: { })); } /** - * This endpoint requires the `sharedLink.update` permission. + * Update a shared link */ export function updateSharedLink({ id, sharedLinkEditDto }: { id: string; @@ -3987,6 +4071,9 @@ export function updateSharedLink({ id, sharedLinkEditDto }: { body: sharedLinkEditDto }))); } +/** + * Remove assets from a shared link + */ export function removeSharedLinkAssets({ id, key, slug, assetIdsDto }: { id: string; key?: string; @@ -4005,6 +4092,9 @@ export function removeSharedLinkAssets({ id, key, slug, assetIdsDto }: { body: assetIdsDto }))); } +/** + * Add assets to a shared link + */ export function addSharedLinkAssets({ id, key, slug, assetIdsDto }: { id: string; key?: string; @@ -4024,7 +4114,7 @@ export function addSharedLinkAssets({ id, key, slug, assetIdsDto }: { }))); } /** - * This endpoint requires the `stack.delete` permission. + * Delete stacks */ export function deleteStacks({ bulkIdsDto }: { bulkIdsDto: BulkIdsDto; @@ -4036,7 +4126,7 @@ export function deleteStacks({ bulkIdsDto }: { }))); } /** - * This endpoint requires the `stack.read` permission. + * Retrieve stacks */ export function searchStacks({ primaryAssetId }: { primaryAssetId?: string; @@ -4051,7 +4141,7 @@ export function searchStacks({ primaryAssetId }: { })); } /** - * This endpoint requires the `stack.create` permission. + * Create a stack */ export function createStack({ stackCreateDto }: { stackCreateDto: StackCreateDto; @@ -4066,7 +4156,7 @@ export function createStack({ stackCreateDto }: { }))); } /** - * This endpoint requires the `stack.delete` permission. + * Delete a stack */ export function deleteStack({ id }: { id: string; @@ -4077,7 +4167,7 @@ export function deleteStack({ id }: { })); } /** - * This endpoint requires the `stack.read` permission. + * Retrieve a stack */ export function getStack({ id }: { id: string; @@ -4090,7 +4180,7 @@ export function getStack({ id }: { })); } /** - * This endpoint requires the `stack.update` permission. + * Update a stack */ export function updateStack({ id, stackUpdateDto }: { id: string; @@ -4106,7 +4196,7 @@ export function updateStack({ id, stackUpdateDto }: { }))); } /** - * This endpoint requires the `stack.update` permission. + * Remove an asset from a stack */ export function removeAssetFromStack({ assetId, id }: { assetId: string; @@ -4118,7 +4208,7 @@ export function removeAssetFromStack({ assetId, id }: { })); } /** - * This endpoint requires the `syncCheckpoint.delete` permission. + * Delete acknowledgements */ export function deleteSyncAck({ syncAckDeleteDto }: { syncAckDeleteDto: SyncAckDeleteDto; @@ -4130,7 +4220,7 @@ export function deleteSyncAck({ syncAckDeleteDto }: { }))); } /** - * This endpoint requires the `syncCheckpoint.read` permission. + * Retrieve acknowledgements */ export function getSyncAck(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -4141,7 +4231,7 @@ export function getSyncAck(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `syncCheckpoint.update` permission. + * Acknowledge changes */ export function sendSyncAck({ syncAckSetDto }: { syncAckSetDto: SyncAckSetDto; @@ -4152,6 +4242,9 @@ export function sendSyncAck({ syncAckSetDto }: { body: syncAckSetDto }))); } +/** + * Get delta sync for user + */ export function getDeltaSync({ assetDeltaSyncDto }: { assetDeltaSyncDto: AssetDeltaSyncDto; }, opts?: Oazapfts.RequestOpts) { @@ -4164,6 +4257,9 @@ export function getDeltaSync({ assetDeltaSyncDto }: { body: assetDeltaSyncDto }))); } +/** + * Get full sync for user + */ export function getFullSyncForUser({ assetFullSyncDto }: { assetFullSyncDto: AssetFullSyncDto; }, opts?: Oazapfts.RequestOpts) { @@ -4177,7 +4273,7 @@ export function getFullSyncForUser({ assetFullSyncDto }: { }))); } /** - * This endpoint requires the `sync.stream` permission. + * Stream sync changes */ export function getSyncStream({ syncStreamDto }: { syncStreamDto: SyncStreamDto; @@ -4189,7 +4285,7 @@ export function getSyncStream({ syncStreamDto }: { }))); } /** - * This endpoint is an admin-only route, and requires the `systemConfig.read` permission. + * Get system configuration */ export function getConfig(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -4200,7 +4296,7 @@ export function getConfig(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint is an admin-only route, and requires the `systemConfig.update` permission. + * Update system configuration */ export function updateConfig({ systemConfigDto }: { systemConfigDto: SystemConfigDto; @@ -4215,7 +4311,7 @@ export function updateConfig({ systemConfigDto }: { }))); } /** - * This endpoint is an admin-only route, and requires the `systemConfig.read` permission. + * Get system configuration defaults */ export function getConfigDefaults(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -4226,7 +4322,7 @@ export function getConfigDefaults(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint is an admin-only route, and requires the `systemConfig.read` permission. + * Get storage template options */ export function getStorageTemplateOptions(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -4237,7 +4333,7 @@ export function getStorageTemplateOptions(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint is an admin-only route, and requires the `systemMetadata.read` permission. + * Retrieve admin onboarding */ export function getAdminOnboarding(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -4248,7 +4344,7 @@ export function getAdminOnboarding(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint is an admin-only route, and requires the `systemMetadata.update` permission. + * Update admin onboarding */ export function updateAdminOnboarding({ adminOnboardingUpdateDto }: { adminOnboardingUpdateDto: AdminOnboardingUpdateDto; @@ -4260,7 +4356,7 @@ export function updateAdminOnboarding({ adminOnboardingUpdateDto }: { }))); } /** - * This endpoint is an admin-only route, and requires the `systemMetadata.read` permission. + * Retrieve reverse geocoding state */ export function getReverseGeocodingState(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -4271,7 +4367,7 @@ export function getReverseGeocodingState(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint is an admin-only route, and requires the `systemMetadata.read` permission. + * Retrieve version check state */ export function getVersionCheckState(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -4282,7 +4378,7 @@ export function getVersionCheckState(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `tag.read` permission. + * Retrieve tags */ export function getAllTags(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -4293,7 +4389,7 @@ export function getAllTags(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `tag.create` permission. + * Create a tag */ export function createTag({ tagCreateDto }: { tagCreateDto: TagCreateDto; @@ -4308,7 +4404,7 @@ export function createTag({ tagCreateDto }: { }))); } /** - * This endpoint requires the `tag.create` permission. + * Upsert tags */ export function upsertTags({ tagUpsertDto }: { tagUpsertDto: TagUpsertDto; @@ -4323,7 +4419,7 @@ export function upsertTags({ tagUpsertDto }: { }))); } /** - * This endpoint requires the `tag.asset` permission. + * Tag assets */ export function bulkTagAssets({ tagBulkAssetsDto }: { tagBulkAssetsDto: TagBulkAssetsDto; @@ -4338,7 +4434,7 @@ export function bulkTagAssets({ tagBulkAssetsDto }: { }))); } /** - * This endpoint requires the `tag.delete` permission. + * Delete a tag */ export function deleteTag({ id }: { id: string; @@ -4349,7 +4445,7 @@ export function deleteTag({ id }: { })); } /** - * This endpoint requires the `tag.read` permission. + * Retrieve a tag */ export function getTagById({ id }: { id: string; @@ -4362,7 +4458,7 @@ export function getTagById({ id }: { })); } /** - * This endpoint requires the `tag.update` permission. + * Update a tag */ export function updateTag({ id, tagUpdateDto }: { id: string; @@ -4378,7 +4474,7 @@ export function updateTag({ id, tagUpdateDto }: { }))); } /** - * This endpoint requires the `tag.asset` permission. + * Untag assets */ export function untagAssets({ id, bulkIdsDto }: { id: string; @@ -4394,7 +4490,7 @@ export function untagAssets({ id, bulkIdsDto }: { }))); } /** - * This endpoint requires the `tag.asset` permission. + * Tag assets */ export function tagAssets({ id, bulkIdsDto }: { id: string; @@ -4410,7 +4506,7 @@ export function tagAssets({ id, bulkIdsDto }: { }))); } /** - * This endpoint requires the `asset.read` permission. + * Get time bucket */ export function getTimeBucket({ albumId, isFavorite, isTrashed, key, order, personId, slug, tagId, timeBucket, userId, visibility, withCoordinates, withPartners, withStacked }: { albumId?: string; @@ -4451,7 +4547,7 @@ export function getTimeBucket({ albumId, isFavorite, isTrashed, key, order, pers })); } /** - * This endpoint requires the `asset.read` permission. + * Get time buckets */ export function getTimeBuckets({ albumId, isFavorite, isTrashed, key, order, personId, slug, tagId, userId, visibility, withCoordinates, withPartners, withStacked }: { albumId?: string; @@ -4490,7 +4586,7 @@ export function getTimeBuckets({ albumId, isFavorite, isTrashed, key, order, per })); } /** - * This endpoint requires the `asset.delete` permission. + * Empty trash */ export function emptyTrash(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -4502,7 +4598,7 @@ export function emptyTrash(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `asset.delete` permission. + * Restore trash */ export function restoreTrash(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -4514,7 +4610,7 @@ export function restoreTrash(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `asset.delete` permission. + * Restore assets */ export function restoreAssets({ bulkIdsDto }: { bulkIdsDto: BulkIdsDto; @@ -4529,7 +4625,7 @@ export function restoreAssets({ bulkIdsDto }: { }))); } /** - * This endpoint requires the `user.read` permission. + * Get all users */ export function searchUsers(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -4540,7 +4636,7 @@ export function searchUsers(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `user.read` permission. + * Get current user */ export function getMyUser(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -4551,7 +4647,7 @@ export function getMyUser(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `user.update` permission. + * Update current user */ export function updateMyUser({ userUpdateMeDto }: { userUpdateMeDto: UserUpdateMeDto; @@ -4566,7 +4662,7 @@ export function updateMyUser({ userUpdateMeDto }: { }))); } /** - * This endpoint requires the `userLicense.delete` permission. + * Delete user product key */ export function deleteUserLicense(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchText("/users/me/license", { @@ -4575,7 +4671,7 @@ export function deleteUserLicense(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `userLicense.read` permission. + * Retrieve user product key */ export function getUserLicense(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -4586,7 +4682,7 @@ export function getUserLicense(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `userLicense.update` permission. + * Set user product key */ export function setUserLicense({ licenseKeyDto }: { licenseKeyDto: LicenseKeyDto; @@ -4601,7 +4697,7 @@ export function setUserLicense({ licenseKeyDto }: { }))); } /** - * This endpoint requires the `userOnboarding.delete` permission. + * Delete user onboarding */ export function deleteUserOnboarding(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchText("/users/me/onboarding", { @@ -4610,7 +4706,7 @@ export function deleteUserOnboarding(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `userOnboarding.read` permission. + * Retrieve user onboarding */ export function getUserOnboarding(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -4621,7 +4717,7 @@ export function getUserOnboarding(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `userOnboarding.update` permission. + * Update user onboarding */ export function setUserOnboarding({ onboardingDto }: { onboardingDto: OnboardingDto; @@ -4636,7 +4732,7 @@ export function setUserOnboarding({ onboardingDto }: { }))); } /** - * This endpoint requires the `userPreference.read` permission. + * Get my preferences */ export function getMyPreferences(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -4647,7 +4743,7 @@ export function getMyPreferences(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `userPreference.update` permission. + * Update my preferences */ export function updateMyPreferences({ userPreferencesUpdateDto }: { userPreferencesUpdateDto: UserPreferencesUpdateDto; @@ -4662,7 +4758,7 @@ export function updateMyPreferences({ userPreferencesUpdateDto }: { }))); } /** - * This endpoint requires the `userProfileImage.delete` permission. + * Delete user profile image */ export function deleteProfileImage(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchText("/users/profile-image", { @@ -4671,7 +4767,7 @@ export function deleteProfileImage(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `userProfileImage.update` permission. + * Create user profile image */ export function createProfileImage({ createProfileImageDto }: { createProfileImageDto: CreateProfileImageDto; @@ -4686,7 +4782,7 @@ export function createProfileImage({ createProfileImageDto }: { }))); } /** - * This endpoint requires the `user.read` permission. + * Retrieve a user */ export function getUser({ id }: { id: string; @@ -4699,7 +4795,7 @@ export function getUser({ id }: { })); } /** - * This endpoint requires the `userProfileImage.read` permission. + * Retrieve user profile image */ export function getProfileImage({ id }: { id: string; @@ -4711,6 +4807,9 @@ export function getProfileImage({ id }: { ...opts })); } +/** + * Retrieve assets by original path + */ export function getAssetsByOriginalPath({ path }: { path: string; }, opts?: Oazapfts.RequestOpts) { @@ -4723,6 +4822,9 @@ export function getAssetsByOriginalPath({ path }: { ...opts })); } +/** + * Retrieve unique paths + */ export function getUniqueOriginalPaths(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; diff --git a/server/src/constants.ts b/server/src/constants.ts index 3b75ca9f7e..1a14bdbcc3 100644 --- a/server/src/constants.ts +++ b/server/src/constants.ts @@ -2,7 +2,7 @@ import { Duration } from 'luxon'; import { readFileSync } from 'node:fs'; import { dirname, join } from 'node:path'; import { SemVer } from 'semver'; -import { DatabaseExtension, ExifOrientation, VectorIndex } from 'src/enum'; +import { ApiTag, DatabaseExtension, ExifOrientation, VectorIndex } from 'src/enum'; export const POSTGRES_VERSION_RANGE = '>=14.0.0'; export const VECTORCHORD_VERSION_RANGE = '>=0.3 <0.6'; @@ -138,3 +138,56 @@ export const ORIENTATION_TO_SHARP_ROTATION: Record = { + [ApiTag.Activities]: 'An activity is a like or a comment made by a user on an asset or album.', + [ApiTag.Albums]: 'An album is a collection of assets that can be shared with other users or via shared links.', + [ApiTag.ApiKeys]: 'An api key can be used to programmatically access the Immich API.', + [ApiTag.Assets]: 'An asset is an image or video that has been uploaded to Immich.', + [ApiTag.Authentication]: 'Endpoints related to user authentication, including OAuth.', + [ApiTag.AuthenticationAdmin]: 'Administrative endpoints related to authentication.', + [ApiTag.Deprecated]: 'Deprecated endpoints that are planned for removal in the next major release.', + [ApiTag.Download]: 'Endpoints for downloading assets or collections of assets.', + [ApiTag.Duplicates]: 'Endpoints for managing and identifying duplicate assets.', + [ApiTag.Faces]: + 'A face is a detected human face within an asset, which can be associated with a person. Faces are normally detected via machine learning, but can also be created via manually.', + [ApiTag.Jobs]: + 'Queues and background jobs are used for processing tasks asynchronously. Queues can be paused and resumed as needed.', + [ApiTag.Libraries]: + 'An external library is made up of input file paths or expressions that are scanned for asset files. Discovered files are automatically imported. Assets much be unique within a library, but can be duplicated across libraries. Each user has a default upload library, and can have one or more external libraries.', + [ApiTag.Map]: + 'Map endpoints include supplemental functionality related to geolocation, such as reverse geocoding and retrieving map markers for assets with geolocation data.', + [ApiTag.Memories]: + 'A memory is a specialized collection of assets with dedicated viewing implementations in the web and mobile clients. A memory includes fields related to visibility and are automatically generated per user via a background job.', + [ApiTag.Notifications]: + 'A notification is a specialized message sent to users to inform them of important events. Currently, these notifications are only shown in the Immich web application.', + [ApiTag.NotificationsAdmin]: 'Notification administrative endpoints.', + [ApiTag.Partners]: 'A partner is a link with another user that allows sharing of assets between two users.', + [ApiTag.People]: + 'A person is a collection of faces, which can be favorited and named. A person can also be merged into another person. People are automatically created via the face recognition job.', + [ApiTag.Search]: + 'Endpoints related to searching assets via text, smart search, optical character recognition (OCR), and other filters like person, album, and other metadata. Search endpoints usually support pagination and sorting.', + [ApiTag.Server]: + 'Information about the current server deployment, including version and build information, available features, supported media types, and more.', + [ApiTag.Sessions]: + 'A session represents an authenticated login session for a user. Sessions also appear in the web application as "Authorized devices".', + [ApiTag.SharedLinks]: + 'A shared link is a public url that provides access to a specific album, asset, or collection of assets. A shared link can be protected with a password, include a specific slug, allow or disallow downloads, and optionally include an expiration date.', + [ApiTag.Stacks]: + 'A stack is a group of related assets. One asset is the "primary" asset, and the rest are "child" assets. On the main timeline, stack parents are included by default, while child assets are hidden.', + [ApiTag.Sync]: 'A collection of endpoints for the new mobile synchronization implementation.', + [ApiTag.SystemConfig]: 'Endpoints to view, modify, and validate the system configuration settings.', + [ApiTag.SystemMetadata]: + 'Endpoints to view, modify, and validate the system metadata, which includes information about things like admin onboarding status.', + [ApiTag.Tags]: + 'A tag is a user-defined label that can be applied to assets for organizational purposes. Tags can also be hierarchical, allowing for parent-child relationships between tags.', + [ApiTag.Timeline]: + 'Specialized endpoints related to the timeline implementation used in the web application. External applications or tools should not use or rely on these endpoints, as they are subject to change without notice.', + [ApiTag.Trash]: + 'Endpoints for managing the trash can, which includes assets that have been discarded. Items in the trash are automatically deleted after a configured amount of time.', + [ApiTag.UsersAdmin]: + 'Administrative endpoints for managing users, including creating, updating, deleting, and restoring users. Also includes endpoints for resetting passwords and PIN codes.', + [ApiTag.Users]: + 'Endpoints for viewing and updating the current users, including product key information, profile picture data, onboarding progress, and more.', + [ApiTag.Views]: 'Endpoints for specialized views, such as the folder view.', +}; diff --git a/server/src/controllers/activity.controller.ts b/server/src/controllers/activity.controller.ts index 75b2e2f8a3..e0c71a00e6 100644 --- a/server/src/controllers/activity.controller.ts +++ b/server/src/controllers/activity.controller.ts @@ -1,5 +1,5 @@ import { Body, Controller, Delete, Get, HttpCode, HttpStatus, Param, Post, Query, Res } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { Response } from 'express'; import { ActivityCreateDto, @@ -9,24 +9,33 @@ import { ActivityStatisticsResponseDto, } from 'src/dtos/activity.dto'; import { AuthDto } from 'src/dtos/auth.dto'; -import { Permission } from 'src/enum'; +import { ApiTag, Permission } from 'src/enum'; import { Auth, Authenticated } from 'src/middleware/auth.guard'; import { ActivityService } from 'src/services/activity.service'; import { UUIDParamDto } from 'src/validation'; -@ApiTags('Activities') +@ApiTags(ApiTag.Activities) @Controller('activities') export class ActivityController { constructor(private service: ActivityService) {} @Get() @Authenticated({ permission: Permission.ActivityRead }) + @ApiOperation({ + summary: 'List all activities', + description: + 'Returns a list of activities for the selected asset or album. The activities are returned in sorted order, with the oldest activities appearing first.', + }) getActivities(@Auth() auth: AuthDto, @Query() dto: ActivitySearchDto): Promise { return this.service.getAll(auth, dto); } @Post() @Authenticated({ permission: Permission.ActivityCreate }) + @ApiOperation({ + summary: 'Create an activity', + description: 'Create a like or a comment for an album, or an asset in an album.', + }) async createActivity( @Auth() auth: AuthDto, @Body() dto: ActivityCreateDto, @@ -41,6 +50,10 @@ export class ActivityController { @Get('statistics') @Authenticated({ permission: Permission.ActivityStatistics }) + @ApiOperation({ + summary: 'Retrieve activity statistics', + description: 'Returns the number of likes and comments for a given album or asset in an album.', + }) getActivityStatistics(@Auth() auth: AuthDto, @Query() dto: ActivityDto): Promise { return this.service.getStatistics(auth, dto); } @@ -48,6 +61,10 @@ export class ActivityController { @Delete(':id') @Authenticated({ permission: Permission.ActivityDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Delete an activity', + description: 'Removes a like or comment from a given album or asset in an album.', + }) deleteActivity(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.delete(auth, id); } diff --git a/server/src/controllers/album.controller.ts b/server/src/controllers/album.controller.ts index 47f8b5603a..671aa55004 100644 --- a/server/src/controllers/album.controller.ts +++ b/server/src/controllers/album.controller.ts @@ -1,5 +1,5 @@ import { Body, Controller, Delete, Get, HttpCode, HttpStatus, Param, Patch, Post, Put, Query } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { AddUsersDto, AlbumInfoDto, @@ -14,36 +14,52 @@ import { } from 'src/dtos/album.dto'; import { BulkIdResponseDto, BulkIdsDto } from 'src/dtos/asset-ids.response.dto'; import { AuthDto } from 'src/dtos/auth.dto'; -import { Permission } from 'src/enum'; +import { ApiTag, Permission } from 'src/enum'; import { Auth, Authenticated } from 'src/middleware/auth.guard'; import { AlbumService } from 'src/services/album.service'; import { ParseMeUUIDPipe, UUIDParamDto } from 'src/validation'; -@ApiTags('Albums') +@ApiTags(ApiTag.Albums) @Controller('albums') export class AlbumController { constructor(private service: AlbumService) {} @Get() @Authenticated({ permission: Permission.AlbumRead }) + @ApiOperation({ + summary: 'List all albums', + description: 'Retrieve a list of albums available to the authenticated user.', + }) getAllAlbums(@Auth() auth: AuthDto, @Query() query: GetAlbumsDto): Promise { return this.service.getAll(auth, query); } @Post() @Authenticated({ permission: Permission.AlbumCreate }) + @ApiOperation({ + summary: 'Create an album', + description: 'Create a new album. The album can also be created with initial users and assets.', + }) createAlbum(@Auth() auth: AuthDto, @Body() dto: CreateAlbumDto): Promise { return this.service.create(auth, dto); } @Get('statistics') @Authenticated({ permission: Permission.AlbumStatistics }) + @ApiOperation({ + summary: 'Retrieve album statistics', + description: 'Returns statistics about the albums available to the authenticated user.', + }) getAlbumStatistics(@Auth() auth: AuthDto): Promise { return this.service.getStatistics(auth); } @Authenticated({ permission: Permission.AlbumRead, sharedLink: true }) @Get(':id') + @ApiOperation({ + summary: 'Retrieve an album', + description: 'Retrieve information about a specific album by its ID.', + }) getAlbumInfo( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -54,6 +70,11 @@ export class AlbumController { @Patch(':id') @Authenticated({ permission: Permission.AlbumUpdate }) + @ApiOperation({ + summary: 'Update an album', + description: + 'Update the information of a specific album by its ID. This endpoint can be used to update the album name, description, sort order, etc. However, it is not used to add or remove assets or users from the album.', + }) updateAlbumInfo( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -65,12 +86,21 @@ export class AlbumController { @Delete(':id') @Authenticated({ permission: Permission.AlbumDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Delete an album', + description: + 'Delete a specific album by its ID. Note the album is initially trashed and then immediately scheduled for deletion, but relies on a background job to complete the process.', + }) deleteAlbum(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto) { return this.service.delete(auth, id); } @Put(':id/assets') @Authenticated({ permission: Permission.AlbumAssetCreate, sharedLink: true }) + @ApiOperation({ + summary: 'Add assets to an album', + description: 'Add multiple assets to a specific album by its ID.', + }) addAssetsToAlbum( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -81,12 +111,20 @@ export class AlbumController { @Put('assets') @Authenticated({ permission: Permission.AlbumAssetCreate, sharedLink: true }) + @ApiOperation({ + summary: 'Add assets to albums', + description: 'Send a list of asset IDs and album IDs to add each asset to each album.', + }) addAssetsToAlbums(@Auth() auth: AuthDto, @Body() dto: AlbumsAddAssetsDto): Promise { return this.service.addAssetsToAlbums(auth, dto); } @Delete(':id/assets') @Authenticated({ permission: Permission.AlbumAssetDelete }) + @ApiOperation({ + summary: 'Remove assets from an album', + description: 'Remove multiple assets from a specific album by its ID.', + }) removeAssetFromAlbum( @Auth() auth: AuthDto, @Body() dto: BulkIdsDto, @@ -97,6 +135,10 @@ export class AlbumController { @Put(':id/users') @Authenticated({ permission: Permission.AlbumUserCreate }) + @ApiOperation({ + summary: 'Share album with users', + description: 'Share an album with multiple users. Each user can be given a specific role in the album.', + }) addUsersToAlbum( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -108,6 +150,10 @@ export class AlbumController { @Put(':id/user/:userId') @Authenticated({ permission: Permission.AlbumUserUpdate }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Update user role', + description: 'Change the role for a specific user in a specific album.', + }) updateAlbumUser( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -120,6 +166,10 @@ export class AlbumController { @Delete(':id/user/:userId') @Authenticated({ permission: Permission.AlbumUserDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Remove user from album', + description: 'Remove a user from an album. Use an ID of "me" to leave a shared album.', + }) removeUserFromAlbum( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, diff --git a/server/src/controllers/api-key.controller.ts b/server/src/controllers/api-key.controller.ts index 59b6908128..8a4e01e36a 100644 --- a/server/src/controllers/api-key.controller.ts +++ b/server/src/controllers/api-key.controller.ts @@ -1,43 +1,60 @@ import { Body, Controller, Delete, Get, HttpCode, HttpStatus, Param, Post, Put } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { APIKeyCreateDto, APIKeyCreateResponseDto, APIKeyResponseDto, APIKeyUpdateDto } from 'src/dtos/api-key.dto'; import { AuthDto } from 'src/dtos/auth.dto'; -import { Permission } from 'src/enum'; +import { ApiTag, Permission } from 'src/enum'; import { Auth, Authenticated } from 'src/middleware/auth.guard'; import { ApiKeyService } from 'src/services/api-key.service'; import { UUIDParamDto } from 'src/validation'; -@ApiTags('API Keys') +@ApiTags(ApiTag.ApiKeys) @Controller('api-keys') export class ApiKeyController { constructor(private service: ApiKeyService) {} @Post() @Authenticated({ permission: Permission.ApiKeyCreate }) + @ApiOperation({ + summary: 'Create an API key', + description: 'Creates a new API key. It will be limited to the permissions specified.', + }) createApiKey(@Auth() auth: AuthDto, @Body() dto: APIKeyCreateDto): Promise { return this.service.create(auth, dto); } @Get() @Authenticated({ permission: Permission.ApiKeyRead }) + @ApiOperation({ summary: 'List all API keys', description: 'Retrieve all API keys of the current user.' }) getApiKeys(@Auth() auth: AuthDto): Promise { return this.service.getAll(auth); } @Get('me') @Authenticated({ permission: false }) + @ApiOperation({ + summary: 'Retrieve the current API key', + description: 'Retrieve the API key that is used to access this endpoint.', + }) async getMyApiKey(@Auth() auth: AuthDto): Promise { return this.service.getMine(auth); } @Get(':id') @Authenticated({ permission: Permission.ApiKeyRead }) + @ApiOperation({ + summary: 'Retrieve an API key', + description: 'Retrieve an API key by its ID. The current user must own this API key.', + }) getApiKey(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.getById(auth, id); } @Put(':id') @Authenticated({ permission: Permission.ApiKeyUpdate }) + @ApiOperation({ + summary: 'Update an API key', + description: 'Updates the name and permissions of an API key by its ID. The current user must own this API key.', + }) updateApiKey( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -49,6 +66,10 @@ export class ApiKeyController { @Delete(':id') @Authenticated({ permission: Permission.ApiKeyDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Delete an API key', + description: 'Deletes an API key identified by its ID. The current user must own this API key.', + }) deleteApiKey(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.delete(auth, id); } diff --git a/server/src/controllers/asset-media.controller.ts b/server/src/controllers/asset-media.controller.ts index 688e513b64..6f110b33ba 100644 --- a/server/src/controllers/asset-media.controller.ts +++ b/server/src/controllers/asset-media.controller.ts @@ -34,7 +34,7 @@ import { UploadFieldName, } from 'src/dtos/asset-media.dto'; import { AuthDto } from 'src/dtos/auth.dto'; -import { ImmichHeader, Permission, RouteKey } from 'src/enum'; +import { ApiTag, ImmichHeader, Permission, RouteKey } from 'src/enum'; import { AssetUploadInterceptor } from 'src/middleware/asset-upload.interceptor'; import { Auth, Authenticated, FileResponse } from 'src/middleware/auth.guard'; import { FileUploadInterceptor, getFiles } from 'src/middleware/file-upload.interceptor'; @@ -44,7 +44,7 @@ import { UploadFiles } from 'src/types'; import { ImmichFileResponse, sendFile } from 'src/utils/file'; import { FileNotEmptyValidator, UUIDParamDto } from 'src/validation'; -@ApiTags('Assets') +@ApiTags(ApiTag.Assets) @Controller(RouteKey.Asset) export class AssetMediaController { constructor( @@ -53,6 +53,7 @@ export class AssetMediaController { ) {} @Post() + @Authenticated({ permission: Permission.AssetUpload, sharedLink: true }) @UseInterceptors(AssetUploadInterceptor, FileUploadInterceptor) @ApiConsumes('multipart/form-data') @ApiHeader({ @@ -61,7 +62,10 @@ export class AssetMediaController { required: false, }) @ApiBody({ description: 'Asset Upload Information', type: AssetMediaCreateDto }) - @Authenticated({ permission: Permission.AssetUpload, sharedLink: true }) + @ApiOperation({ + summary: 'Upload asset', + description: 'Uploads a new asset to the server.', + }) async uploadAsset( @Auth() auth: AuthDto, @UploadedFiles(new ParseFilePipe({ validators: [new FileNotEmptyValidator(['assetData'])] })) files: UploadFiles, @@ -81,6 +85,10 @@ export class AssetMediaController { @Get(':id/original') @FileResponse() @Authenticated({ permission: Permission.AssetDownload, sharedLink: true }) + @ApiOperation({ + summary: 'Download original asset', + description: 'Downloads the original file of the specified asset.', + }) async downloadAsset( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -90,17 +98,14 @@ export class AssetMediaController { await sendFile(res, next, () => this.service.downloadOriginal(auth, id), this.logger); } - /** - * Replace the asset with new file, without changing its id - */ @Put(':id/original') @UseInterceptors(FileUploadInterceptor) @ApiConsumes('multipart/form-data') @EndpointLifecycle({ addedAt: 'v1.106.0', deprecatedAt: 'v1.142.0', - summary: 'replaceAsset', - description: 'Replace the asset with new file, without changing its id', + summary: 'Replace asset', + description: 'Replace the asset with new file, without changing its id.', }) @Authenticated({ permission: Permission.AssetReplace, sharedLink: true }) async replaceAsset( @@ -122,6 +127,10 @@ export class AssetMediaController { @Get(':id/thumbnail') @FileResponse() @Authenticated({ permission: Permission.AssetView, sharedLink: true }) + @ApiOperation({ + summary: 'View asset thumbnail', + description: 'Retrieve the thumbnail image for the specified asset.', + }) async viewAsset( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -159,6 +168,10 @@ export class AssetMediaController { @Get(':id/video/playback') @FileResponse() @Authenticated({ permission: Permission.AssetView, sharedLink: true }) + @ApiOperation({ + summary: 'Play asset video', + description: 'Streams the video file for the specified asset. This endpoint also supports byte range requests.', + }) async playAssetVideo( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -174,7 +187,7 @@ export class AssetMediaController { @Post('exist') @Authenticated() @ApiOperation({ - summary: 'checkExistingAssets', + summary: 'Check existing assets', description: 'Checks if multiple assets exist on the server and returns all existing - used by background backup', }) @HttpCode(HttpStatus.OK) @@ -191,8 +204,8 @@ export class AssetMediaController { @Post('bulk-upload-check') @Authenticated({ permission: Permission.AssetUpload }) @ApiOperation({ - summary: 'checkBulkUpload', - description: 'Checks if assets exist by checksums', + summary: 'Check bulk upload', + description: 'Determine which assets have already been uploaded to the server based on their SHA1 checksums.', }) @HttpCode(HttpStatus.OK) checkBulkUpload( diff --git a/server/src/controllers/asset.controller.ts b/server/src/controllers/asset.controller.ts index a6f8c7921d..6a7309b6d6 100644 --- a/server/src/controllers/asset.controller.ts +++ b/server/src/controllers/asset.controller.ts @@ -18,29 +18,31 @@ import { } from 'src/dtos/asset.dto'; import { AuthDto } from 'src/dtos/auth.dto'; import { AssetOcrResponseDto } from 'src/dtos/ocr.dto'; -import { Permission, RouteKey } from 'src/enum'; +import { ApiTag, Permission, RouteKey } from 'src/enum'; import { Auth, Authenticated } from 'src/middleware/auth.guard'; import { AssetService } from 'src/services/asset.service'; import { UUIDParamDto } from 'src/validation'; -@ApiTags('Assets') +@ApiTags(ApiTag.Assets) @Controller(RouteKey.Asset) export class AssetController { constructor(private service: AssetService) {} @Get('random') @Authenticated({ permission: Permission.AssetRead }) - @EndpointLifecycle({ deprecatedAt: 'v1.116.0' }) + @EndpointLifecycle({ + deprecatedAt: 'v1.116.0', + summary: 'Get random assets', + description: 'Retrieve a specified number of random assets for the authenticated user.', + }) getRandom(@Auth() auth: AuthDto, @Query() dto: RandomAssetsDto): Promise { return this.service.getRandom(auth, dto.count ?? 1); } - /** - * Get all asset of a device that are in the database, ID only. - */ @Get('/device/:deviceId') - @ApiOperation({ - summary: 'getAllUserAssetsByDeviceId', + @EndpointLifecycle({ + deprecatedAt: 'v2.0.0', + summary: 'Retrieve assets by device ID', description: 'Get all asset of a device that are in the database, ID only.', }) @Authenticated() @@ -50,6 +52,10 @@ export class AssetController { @Get('statistics') @Authenticated({ permission: Permission.AssetStatistics }) + @ApiOperation({ + summary: 'Get asset statistics', + description: 'Retrieve various statistics about the assets owned by the authenticated user.', + }) getAssetStatistics(@Auth() auth: AuthDto, @Query() dto: AssetStatsDto): Promise { return this.service.getStatistics(auth, dto); } @@ -57,6 +63,10 @@ export class AssetController { @Post('jobs') @Authenticated() @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Run an asset job', + description: 'Run a specific job on a set of assets.', + }) runAssetJobs(@Auth() auth: AuthDto, @Body() dto: AssetJobsDto): Promise { return this.service.run(auth, dto); } @@ -64,6 +74,10 @@ export class AssetController { @Put() @Authenticated({ permission: Permission.AssetUpdate }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Update assets', + description: 'Updates multiple assets at the same time.', + }) updateAssets(@Auth() auth: AuthDto, @Body() dto: AssetBulkUpdateDto): Promise { return this.service.updateAll(auth, dto); } @@ -71,12 +85,20 @@ export class AssetController { @Delete() @Authenticated({ permission: Permission.AssetDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Delete assets', + description: 'Deletes multiple assets at the same time.', + }) deleteAssets(@Auth() auth: AuthDto, @Body() dto: AssetBulkDeleteDto): Promise { return this.service.deleteAll(auth, dto); } @Get(':id') @Authenticated({ permission: Permission.AssetRead, sharedLink: true }) + @ApiOperation({ + summary: 'Retrieve an asset', + description: 'Retrieve detailed information about a specific asset.', + }) getAssetInfo(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.get(auth, id) as Promise; } @@ -84,12 +106,20 @@ export class AssetController { @Put('copy') @Authenticated({ permission: Permission.AssetCopy }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Copy asset', + description: 'Copy asset information like albums, tags, etc. from one asset to another.', + }) copyAsset(@Auth() auth: AuthDto, @Body() dto: AssetCopyDto): Promise { return this.service.copy(auth, dto); } @Put(':id') @Authenticated({ permission: Permission.AssetUpdate }) + @ApiOperation({ + summary: 'Update an asset', + description: 'Update information of a specific asset.', + }) updateAsset( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -100,18 +130,30 @@ export class AssetController { @Get(':id/metadata') @Authenticated({ permission: Permission.AssetRead }) + @ApiOperation({ + summary: 'Get asset metadata', + description: 'Retrieve all metadata key-value pairs associated with the specified asset.', + }) getAssetMetadata(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.getMetadata(auth, id); } @Get(':id/ocr') @Authenticated({ permission: Permission.AssetRead }) + @ApiOperation({ + summary: 'Retrieve asset OCR data', + description: 'Retrieve all OCR (Optical Character Recognition) data associated with the specified asset.', + }) getAssetOcr(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.getOcr(auth, id); } @Put(':id/metadata') @Authenticated({ permission: Permission.AssetUpdate }) + @ApiOperation({ + summary: 'Update asset metadata', + description: 'Update or add metadata key-value pairs for the specified asset.', + }) updateAssetMetadata( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -122,6 +164,10 @@ export class AssetController { @Get(':id/metadata/:key') @Authenticated({ permission: Permission.AssetRead }) + @ApiOperation({ + summary: 'Retrieve asset metadata by key', + description: 'Retrieve the value of a specific metadata key associated with the specified asset.', + }) getAssetMetadataByKey( @Auth() auth: AuthDto, @Param() { id, key }: AssetMetadataRouteParams, @@ -132,6 +178,10 @@ export class AssetController { @Delete(':id/metadata/:key') @Authenticated({ permission: Permission.AssetUpdate }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Delete asset metadata by key', + description: 'Delete a specific metadata key-value pair associated with the specified asset.', + }) deleteAssetMetadata(@Auth() auth: AuthDto, @Param() { id, key }: AssetMetadataRouteParams): Promise { return this.service.deleteMetadataByKey(auth, id, key); } diff --git a/server/src/controllers/auth-admin.controller.ts b/server/src/controllers/auth-admin.controller.ts index dba352783e..8cbdf5d6da 100644 --- a/server/src/controllers/auth-admin.controller.ts +++ b/server/src/controllers/auth-admin.controller.ts @@ -1,17 +1,21 @@ import { Controller, HttpCode, HttpStatus, Post } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { AuthDto } from 'src/dtos/auth.dto'; -import { Permission } from 'src/enum'; +import { ApiTag, Permission } from 'src/enum'; import { Auth, Authenticated } from 'src/middleware/auth.guard'; import { AuthAdminService } from 'src/services/auth-admin.service'; -@ApiTags('Auth (admin)') +@ApiTags(ApiTag.AuthenticationAdmin) @Controller('admin/auth') export class AuthAdminController { constructor(private service: AuthAdminService) {} @Post('unlink-all') @Authenticated({ permission: Permission.AdminAuthUnlinkAll, admin: true }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Unlink all OAuth accounts', + description: 'Unlinks all OAuth accounts associated with user accounts in the system.', + }) unlinkAllOAuthAccountsAdmin(@Auth() auth: AuthDto): Promise { return this.service.unlinkAll(auth); } diff --git a/server/src/controllers/auth.controller.ts b/server/src/controllers/auth.controller.ts index 636e3a3047..7f76ff1952 100644 --- a/server/src/controllers/auth.controller.ts +++ b/server/src/controllers/auth.controller.ts @@ -1,5 +1,5 @@ import { Body, Controller, Delete, Get, HttpCode, HttpStatus, Post, Put, Req, Res } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { Request, Response } from 'express'; import { AuthDto, @@ -16,17 +16,21 @@ import { ValidateAccessTokenResponseDto, } from 'src/dtos/auth.dto'; import { UserAdminResponseDto } from 'src/dtos/user.dto'; -import { AuthType, ImmichCookie, Permission } from 'src/enum'; +import { ApiTag, AuthType, ImmichCookie, Permission } from 'src/enum'; import { Auth, Authenticated, GetLoginDetails } from 'src/middleware/auth.guard'; import { AuthService, LoginDetails } from 'src/services/auth.service'; import { respondWithCookie, respondWithoutCookie } from 'src/utils/response'; -@ApiTags('Authentication') +@ApiTags(ApiTag.Authentication) @Controller('auth') export class AuthController { constructor(private service: AuthService) {} @Post('login') + @ApiOperation({ + summary: 'Login', + description: 'Login with username and password and receive a session token.', + }) async login( @Res({ passthrough: true }) res: Response, @Body() loginCredential: LoginCredentialDto, @@ -44,11 +48,19 @@ export class AuthController { } @Post('admin-sign-up') + @ApiOperation({ + summary: 'Register admin', + description: 'Create the first admin user in the system.', + }) signUpAdmin(@Body() dto: SignUpDto): Promise { return this.service.adminSignUp(dto); } @Post('validateToken') + @ApiOperation({ + summary: 'Validate access token', + description: 'Validate the current authorization method is still valid.', + }) @Authenticated({ permission: false }) @HttpCode(HttpStatus.OK) validateAccessToken(): ValidateAccessTokenResponseDto { @@ -58,6 +70,10 @@ export class AuthController { @Post('change-password') @Authenticated({ permission: Permission.AuthChangePassword }) @HttpCode(HttpStatus.OK) + @ApiOperation({ + summary: 'Change password', + description: 'Change the password of the current user.', + }) changePassword(@Auth() auth: AuthDto, @Body() dto: ChangePasswordDto): Promise { return this.service.changePassword(auth, dto); } @@ -65,6 +81,10 @@ export class AuthController { @Post('logout') @Authenticated() @HttpCode(HttpStatus.OK) + @ApiOperation({ + summary: 'Logout', + description: 'Logout the current user and invalidate the session token.', + }) async logout( @Req() request: Request, @Res({ passthrough: true }) res: Response, @@ -82,6 +102,11 @@ export class AuthController { @Get('status') @Authenticated() + @ApiOperation({ + summary: 'Retrieve auth status', + description: + 'Get information about the current session, including whether the user has a password, and if the session can access locked assets.', + }) getAuthStatus(@Auth() auth: AuthDto): Promise { return this.service.getAuthStatus(auth); } @@ -89,6 +114,10 @@ export class AuthController { @Post('pin-code') @Authenticated({ permission: Permission.PinCodeCreate }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Setup pin code', + description: 'Setup a new pin code for the current user.', + }) setupPinCode(@Auth() auth: AuthDto, @Body() dto: PinCodeSetupDto): Promise { return this.service.setupPinCode(auth, dto); } @@ -96,6 +125,10 @@ export class AuthController { @Put('pin-code') @Authenticated({ permission: Permission.PinCodeUpdate }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Change pin code', + description: 'Change the pin code for the current user.', + }) async changePinCode(@Auth() auth: AuthDto, @Body() dto: PinCodeChangeDto): Promise { return this.service.changePinCode(auth, dto); } @@ -103,6 +136,10 @@ export class AuthController { @Delete('pin-code') @Authenticated({ permission: Permission.PinCodeDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Reset pin code', + description: 'Reset the pin code for the current user by providing the account password', + }) async resetPinCode(@Auth() auth: AuthDto, @Body() dto: PinCodeResetDto): Promise { return this.service.resetPinCode(auth, dto); } @@ -110,12 +147,20 @@ export class AuthController { @Post('session/unlock') @Authenticated() @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Unlock auth session', + description: 'Temporarily grant the session elevated access to locked assets by providing the correct PIN code.', + }) async unlockAuthSession(@Auth() auth: AuthDto, @Body() dto: SessionUnlockDto): Promise { return this.service.unlockSession(auth, dto); } @Post('session/lock') @Authenticated() + @ApiOperation({ + summary: 'Lock auth session', + description: 'Remove elevated access to locked assets from the current session.', + }) @HttpCode(HttpStatus.NO_CONTENT) async lockAuthSession(@Auth() auth: AuthDto): Promise { return this.service.lockSession(auth); diff --git a/server/src/controllers/download.controller.ts b/server/src/controllers/download.controller.ts index a7c2af78ed..26288412d7 100644 --- a/server/src/controllers/download.controller.ts +++ b/server/src/controllers/download.controller.ts @@ -1,20 +1,25 @@ import { Body, Controller, HttpCode, HttpStatus, Post, StreamableFile } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { AssetIdsDto } from 'src/dtos/asset.dto'; import { AuthDto } from 'src/dtos/auth.dto'; import { DownloadInfoDto, DownloadResponseDto } from 'src/dtos/download.dto'; -import { Permission } from 'src/enum'; +import { ApiTag, Permission } from 'src/enum'; import { Auth, Authenticated, FileResponse } from 'src/middleware/auth.guard'; import { DownloadService } from 'src/services/download.service'; import { asStreamableFile } from 'src/utils/file'; -@ApiTags('Download') +@ApiTags(ApiTag.Download) @Controller('download') export class DownloadController { constructor(private service: DownloadService) {} @Post('info') @Authenticated({ permission: Permission.AssetDownload, sharedLink: true }) + @ApiOperation({ + summary: 'Retrieve download information', + description: + 'Retrieve information about how to request a download for the specified assets or album. The response includes groups of assets that can be downloaded together.', + }) getDownloadInfo(@Auth() auth: AuthDto, @Body() dto: DownloadInfoDto): Promise { return this.service.getDownloadInfo(auth, dto); } @@ -23,6 +28,11 @@ export class DownloadController { @Authenticated({ permission: Permission.AssetDownload, sharedLink: true }) @FileResponse() @HttpCode(HttpStatus.OK) + @ApiOperation({ + summary: 'Download asset archive', + description: + 'Download a ZIP archive containing the specified assets. The assets must have been previously requested via the "getDownloadInfo" endpoint.', + }) downloadArchive(@Auth() auth: AuthDto, @Body() dto: AssetIdsDto): Promise { return this.service.downloadArchive(auth, dto).then(asStreamableFile); } diff --git a/server/src/controllers/duplicate.controller.ts b/server/src/controllers/duplicate.controller.ts index 9cf5ae97a6..5fddef9dd0 100644 --- a/server/src/controllers/duplicate.controller.ts +++ b/server/src/controllers/duplicate.controller.ts @@ -1,20 +1,24 @@ import { Body, Controller, Delete, Get, HttpCode, HttpStatus, Param } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { BulkIdsDto } from 'src/dtos/asset-ids.response.dto'; import { AuthDto } from 'src/dtos/auth.dto'; import { DuplicateResponseDto } from 'src/dtos/duplicate.dto'; -import { Permission } from 'src/enum'; +import { ApiTag, Permission } from 'src/enum'; import { Auth, Authenticated } from 'src/middleware/auth.guard'; import { DuplicateService } from 'src/services/duplicate.service'; import { UUIDParamDto } from 'src/validation'; -@ApiTags('Duplicates') +@ApiTags(ApiTag.Duplicates) @Controller('duplicates') export class DuplicateController { constructor(private service: DuplicateService) {} @Get() @Authenticated({ permission: Permission.DuplicateRead }) + @ApiOperation({ + summary: 'Retrieve duplicates', + description: 'Retrieve a list of duplicate assets available to the authenticated user.', + }) getAssetDuplicates(@Auth() auth: AuthDto): Promise { return this.service.getDuplicates(auth); } @@ -22,6 +26,10 @@ export class DuplicateController { @Delete() @Authenticated({ permission: Permission.DuplicateDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Delete duplicates', + description: 'Delete multiple duplicate assets specified by their IDs.', + }) deleteDuplicates(@Auth() auth: AuthDto, @Body() dto: BulkIdsDto): Promise { return this.service.deleteAll(auth, dto); } @@ -29,6 +37,10 @@ export class DuplicateController { @Delete(':id') @Authenticated({ permission: Permission.DuplicateDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Delete a duplicate', + description: 'Delete a single duplicate asset specified by its ID.', + }) deleteDuplicate(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.delete(auth, id); } diff --git a/server/src/controllers/face.controller.ts b/server/src/controllers/face.controller.ts index 564b217c16..cc7f23929a 100644 --- a/server/src/controllers/face.controller.ts +++ b/server/src/controllers/face.controller.ts @@ -1,5 +1,5 @@ import { Body, Controller, Delete, Get, HttpCode, HttpStatus, Param, Post, Put, Query } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { AuthDto } from 'src/dtos/auth.dto'; import { AssetFaceCreateDto, @@ -8,30 +8,43 @@ import { FaceDto, PersonResponseDto, } from 'src/dtos/person.dto'; -import { Permission } from 'src/enum'; +import { ApiTag, Permission } from 'src/enum'; import { Auth, Authenticated } from 'src/middleware/auth.guard'; import { PersonService } from 'src/services/person.service'; import { UUIDParamDto } from 'src/validation'; -@ApiTags('Faces') +@ApiTags(ApiTag.Faces) @Controller('faces') export class FaceController { constructor(private service: PersonService) {} @Post() @Authenticated({ permission: Permission.FaceCreate }) + @ApiOperation({ + summary: 'Create a face', + description: + 'Create a new face that has not been discovered by facial recognition. The content of the bounding box is considered a face.', + }) createFace(@Auth() auth: AuthDto, @Body() dto: AssetFaceCreateDto) { return this.service.createFace(auth, dto); } @Get() @Authenticated({ permission: Permission.FaceRead }) + @ApiOperation({ + summary: 'Retrieve faces for asset', + description: 'Retrieve all faces belonging to an asset.', + }) getFaces(@Auth() auth: AuthDto, @Query() dto: FaceDto): Promise { return this.service.getFacesById(auth, dto); } @Put(':id') @Authenticated({ permission: Permission.FaceUpdate }) + @ApiOperation({ + summary: 'Re-assign a face to another person', + description: 'Re-assign the face provided in the body to the person identified by the id in the path parameter.', + }) reassignFacesById( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -43,6 +56,10 @@ export class FaceController { @Delete(':id') @Authenticated({ permission: Permission.FaceDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Delete a face', + description: 'Delete a face identified by the id. Optionally can be force deleted.', + }) deleteFace(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @Body() dto: AssetFaceDeleteDto): Promise { return this.service.deleteFace(auth, id, dto); } diff --git a/server/src/controllers/job.controller.ts b/server/src/controllers/job.controller.ts index 9c4e819649..b34f5ffecf 100644 --- a/server/src/controllers/job.controller.ts +++ b/server/src/controllers/job.controller.ts @@ -1,17 +1,21 @@ import { Body, Controller, Get, HttpCode, HttpStatus, Param, Post, Put } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { AllJobStatusResponseDto, JobCommandDto, JobCreateDto, JobIdParamDto, JobStatusDto } from 'src/dtos/job.dto'; -import { Permission } from 'src/enum'; +import { ApiTag, Permission } from 'src/enum'; import { Authenticated } from 'src/middleware/auth.guard'; import { JobService } from 'src/services/job.service'; -@ApiTags('Jobs') +@ApiTags(ApiTag.Jobs) @Controller('jobs') export class JobController { constructor(private service: JobService) {} @Get() @Authenticated({ permission: Permission.JobRead, admin: true }) + @ApiOperation({ + summary: 'Retrieve queue counts and status', + description: 'Retrieve the counts of the current queue, as well as the current status.', + }) getAllJobsStatus(): Promise { return this.service.getAllJobsStatus(); } @@ -19,12 +23,22 @@ export class JobController { @Post() @Authenticated({ permission: Permission.JobCreate, admin: true }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Create a manual job', + description: + 'Run a specific job. Most jobs are queued automatically, but this endpoint allows for manual creation of a handful of jobs, including various cleanup tasks, as well as creating a new database backup.', + }) createJob(@Body() dto: JobCreateDto): Promise { return this.service.create(dto); } @Put(':id') @Authenticated({ permission: Permission.JobCreate, admin: true }) + @ApiOperation({ + summary: 'Run jobs', + description: + 'Queue all assets for a specific job type. Defaults to only queueing assets that have not yet been processed, but the force command can be used to re-process all assets.', + }) sendJobCommand(@Param() { id }: JobIdParamDto, @Body() dto: JobCommandDto): Promise { return this.service.handleCommand(id, dto); } diff --git a/server/src/controllers/library.controller.ts b/server/src/controllers/library.controller.ts index b37bc40ce7..8b527eb4bb 100644 --- a/server/src/controllers/library.controller.ts +++ b/server/src/controllers/library.controller.ts @@ -1,5 +1,5 @@ import { Body, Controller, Delete, Get, HttpCode, HttpStatus, Param, Post, Put } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { CreateLibraryDto, LibraryResponseDto, @@ -8,36 +8,52 @@ import { ValidateLibraryDto, ValidateLibraryResponseDto, } from 'src/dtos/library.dto'; -import { Permission } from 'src/enum'; +import { ApiTag, Permission } from 'src/enum'; import { Authenticated } from 'src/middleware/auth.guard'; import { LibraryService } from 'src/services/library.service'; import { UUIDParamDto } from 'src/validation'; -@ApiTags('Libraries') +@ApiTags(ApiTag.Libraries) @Controller('libraries') export class LibraryController { constructor(private service: LibraryService) {} @Get() @Authenticated({ permission: Permission.LibraryRead, admin: true }) + @ApiOperation({ + summary: 'Retrieve libraries', + description: 'Retrieve a list of external libraries.', + }) getAllLibraries(): Promise { return this.service.getAll(); } @Post() @Authenticated({ permission: Permission.LibraryCreate, admin: true }) + @ApiOperation({ + summary: 'Create a library', + description: 'Create a new external library.', + }) createLibrary(@Body() dto: CreateLibraryDto): Promise { return this.service.create(dto); } @Get(':id') @Authenticated({ permission: Permission.LibraryRead, admin: true }) + @ApiOperation({ + summary: 'Retrieve a library', + description: 'Retrieve an external library by its ID.', + }) getLibrary(@Param() { id }: UUIDParamDto): Promise { return this.service.get(id); } @Put(':id') @Authenticated({ permission: Permission.LibraryUpdate, admin: true }) + @ApiOperation({ + summary: 'Update a library', + description: 'Update an existing external library.', + }) updateLibrary(@Param() { id }: UUIDParamDto, @Body() dto: UpdateLibraryDto): Promise { return this.service.update(id, dto); } @@ -45,6 +61,10 @@ export class LibraryController { @Delete(':id') @Authenticated({ permission: Permission.LibraryDelete, admin: true }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Delete a library', + description: 'Delete an external library by its ID.', + }) deleteLibrary(@Param() { id }: UUIDParamDto): Promise { return this.service.delete(id); } @@ -52,6 +72,10 @@ export class LibraryController { @Post(':id/validate') @Authenticated({ admin: true }) @HttpCode(HttpStatus.OK) + @ApiOperation({ + summary: 'Validate library settings', + description: 'Validate the settings of an external library.', + }) // TODO: change endpoint to validate current settings instead validate(@Param() { id }: UUIDParamDto, @Body() dto: ValidateLibraryDto): Promise { return this.service.validate(id, dto); @@ -59,6 +83,11 @@ export class LibraryController { @Get(':id/statistics') @Authenticated({ permission: Permission.LibraryStatistics, admin: true }) + @ApiOperation({ + summary: 'Retrieve library statistics', + description: + 'Retrieve statistics for a specific external library, including number of videos, images, and storage usage.', + }) getLibraryStatistics(@Param() { id }: UUIDParamDto): Promise { return this.service.getStatistics(id); } @@ -66,6 +95,10 @@ export class LibraryController { @Post(':id/scan') @Authenticated({ permission: Permission.LibraryUpdate, admin: true }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Scan a library', + description: 'Queue a scan for the external library to find and import new assets.', + }) scanLibrary(@Param() { id }: UUIDParamDto): Promise { return this.service.queueScan(id); } diff --git a/server/src/controllers/map.controller.ts b/server/src/controllers/map.controller.ts index 88104e6b58..41acfbd5b4 100644 --- a/server/src/controllers/map.controller.ts +++ b/server/src/controllers/map.controller.ts @@ -1,5 +1,5 @@ import { Controller, Get, HttpCode, HttpStatus, Query } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { AuthDto } from 'src/dtos/auth.dto'; import { MapMarkerDto, @@ -7,16 +7,21 @@ import { MapReverseGeocodeDto, MapReverseGeocodeResponseDto, } from 'src/dtos/map.dto'; +import { ApiTag } from 'src/enum'; import { Auth, Authenticated } from 'src/middleware/auth.guard'; import { MapService } from 'src/services/map.service'; -@ApiTags('Map') +@ApiTags(ApiTag.Map) @Controller('map') export class MapController { constructor(private service: MapService) {} @Get('markers') @Authenticated() + @ApiOperation({ + summary: 'Retrieve map markers', + description: 'Retrieve a list of latitude and longitude coordinates for every asset with location data.', + }) getMapMarkers(@Auth() auth: AuthDto, @Query() options: MapMarkerDto): Promise { return this.service.getMapMarkers(auth, options); } @@ -24,6 +29,10 @@ export class MapController { @Authenticated() @Get('reverse-geocode') @HttpCode(HttpStatus.OK) + @ApiOperation({ + summary: 'Reverse geocode coordinates', + description: 'Retrieve location information (e.g., city, country) for given latitude and longitude coordinates.', + }) reverseGeocode(@Query() dto: MapReverseGeocodeDto): Promise { return this.service.reverseGeocode(dto); } diff --git a/server/src/controllers/memory.controller.ts b/server/src/controllers/memory.controller.ts index 3b5ad2bb4e..d433ae88ed 100644 --- a/server/src/controllers/memory.controller.ts +++ b/server/src/controllers/memory.controller.ts @@ -1,5 +1,5 @@ import { Body, Controller, Delete, Get, HttpCode, HttpStatus, Param, Post, Put, Query } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { BulkIdResponseDto, BulkIdsDto } from 'src/dtos/asset-ids.response.dto'; import { AuthDto } from 'src/dtos/auth.dto'; import { @@ -9,42 +9,64 @@ import { MemoryStatisticsResponseDto, MemoryUpdateDto, } from 'src/dtos/memory.dto'; -import { Permission } from 'src/enum'; +import { ApiTag, Permission } from 'src/enum'; import { Auth, Authenticated } from 'src/middleware/auth.guard'; import { MemoryService } from 'src/services/memory.service'; import { UUIDParamDto } from 'src/validation'; -@ApiTags('Memories') +@ApiTags(ApiTag.Memories) @Controller('memories') export class MemoryController { constructor(private service: MemoryService) {} @Get() @Authenticated({ permission: Permission.MemoryRead }) + @ApiOperation({ + summary: 'Retrieve memories', + description: + 'Retrieve a list of memories. Memories are sorted descending by creation date by default, although they can also be sorted in ascending order, or randomly.', + }) searchMemories(@Auth() auth: AuthDto, @Query() dto: MemorySearchDto): Promise { return this.service.search(auth, dto); } @Post() @Authenticated({ permission: Permission.MemoryCreate }) + @ApiOperation({ + summary: 'Create a memory', + description: + 'Create a new memory by providing a name, description, and a list of asset IDs to include in the memory.', + }) createMemory(@Auth() auth: AuthDto, @Body() dto: MemoryCreateDto): Promise { return this.service.create(auth, dto); } @Get('statistics') @Authenticated({ permission: Permission.MemoryStatistics }) + @ApiOperation({ + summary: 'Retrieve memories statistics', + description: 'Retrieve statistics about memories, such as total count and other relevant metrics.', + }) memoriesStatistics(@Auth() auth: AuthDto, @Query() dto: MemorySearchDto): Promise { return this.service.statistics(auth, dto); } @Get(':id') @Authenticated({ permission: Permission.MemoryRead }) + @ApiOperation({ + summary: 'Retrieve a memory', + description: 'Retrieve a specific memory by its ID.', + }) getMemory(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.get(auth, id); } @Put(':id') @Authenticated({ permission: Permission.MemoryUpdate }) + @ApiOperation({ + summary: 'Update a memory', + description: 'Update an existing memory by its ID.', + }) updateMemory( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -56,12 +78,20 @@ export class MemoryController { @Delete(':id') @Authenticated({ permission: Permission.MemoryDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Delete a memory', + description: 'Delete a specific memory by its ID.', + }) deleteMemory(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.remove(auth, id); } @Put(':id/assets') @Authenticated({ permission: Permission.MemoryAssetCreate }) + @ApiOperation({ + summary: 'Add assets to a memory', + description: 'Add a list of asset IDs to a specific memory.', + }) addMemoryAssets( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -73,6 +103,10 @@ export class MemoryController { @Delete(':id/assets') @Authenticated({ permission: Permission.MemoryAssetDelete }) @HttpCode(HttpStatus.OK) + @ApiOperation({ + summary: 'Remove assets from a memory', + description: 'Remove a list of asset IDs from a specific memory.', + }) removeMemoryAssets( @Auth() auth: AuthDto, @Body() dto: BulkIdsDto, diff --git a/server/src/controllers/notification-admin.controller.ts b/server/src/controllers/notification-admin.controller.ts index 28ca7bfd30..fe7d9d1e49 100644 --- a/server/src/controllers/notification-admin.controller.ts +++ b/server/src/controllers/notification-admin.controller.ts @@ -1,5 +1,5 @@ import { Body, Controller, HttpCode, HttpStatus, Param, Post } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { AuthDto } from 'src/dtos/auth.dto'; import { NotificationCreateDto, @@ -9,17 +9,22 @@ import { TestEmailResponseDto, } from 'src/dtos/notification.dto'; import { SystemConfigSmtpDto } from 'src/dtos/system-config.dto'; +import { ApiTag } from 'src/enum'; import { Auth, Authenticated } from 'src/middleware/auth.guard'; import { EmailTemplate } from 'src/repositories/email.repository'; import { NotificationAdminService } from 'src/services/notification-admin.service'; -@ApiTags('Notifications (Admin)') +@ApiTags(ApiTag.NotificationsAdmin) @Controller('admin/notifications') export class NotificationAdminController { constructor(private service: NotificationAdminService) {} @Post() @Authenticated({ admin: true }) + @ApiOperation({ + summary: 'Create a notification', + description: 'Create a new notification for a specific user.', + }) createNotification(@Auth() auth: AuthDto, @Body() dto: NotificationCreateDto): Promise { return this.service.create(auth, dto); } @@ -27,6 +32,10 @@ export class NotificationAdminController { @Post('test-email') @Authenticated({ admin: true }) @HttpCode(HttpStatus.OK) + @ApiOperation({ + summary: 'Send test email', + description: 'Send a test email using the provided SMTP configuration.', + }) sendTestEmailAdmin(@Auth() auth: AuthDto, @Body() dto: SystemConfigSmtpDto): Promise { return this.service.sendTestEmail(auth.user.id, dto); } @@ -34,6 +43,10 @@ export class NotificationAdminController { @Post('templates/:name') @Authenticated({ admin: true }) @HttpCode(HttpStatus.OK) + @ApiOperation({ + summary: 'Render email template', + description: 'Retrieve a preview of the provided email template.', + }) getNotificationTemplateAdmin( @Auth() auth: AuthDto, @Param('name') name: EmailTemplate, diff --git a/server/src/controllers/notification.controller.ts b/server/src/controllers/notification.controller.ts index 8ce183c5d0..7d4840dd0b 100644 --- a/server/src/controllers/notification.controller.ts +++ b/server/src/controllers/notification.controller.ts @@ -1,5 +1,5 @@ import { Body, Controller, Delete, Get, HttpCode, HttpStatus, Param, Put, Query } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { AuthDto } from 'src/dtos/auth.dto'; import { NotificationDeleteAllDto, @@ -8,18 +8,22 @@ import { NotificationUpdateAllDto, NotificationUpdateDto, } from 'src/dtos/notification.dto'; -import { Permission } from 'src/enum'; +import { ApiTag, Permission } from 'src/enum'; import { Auth, Authenticated } from 'src/middleware/auth.guard'; import { NotificationService } from 'src/services/notification.service'; import { UUIDParamDto } from 'src/validation'; -@ApiTags('Notifications') +@ApiTags(ApiTag.Notifications) @Controller('notifications') export class NotificationController { constructor(private service: NotificationService) {} @Get() @Authenticated({ permission: Permission.NotificationRead }) + @ApiOperation({ + summary: 'Retrieve notifications', + description: 'Retrieve a list of notifications.', + }) getNotifications(@Auth() auth: AuthDto, @Query() dto: NotificationSearchDto): Promise { return this.service.search(auth, dto); } @@ -27,6 +31,10 @@ export class NotificationController { @Put() @Authenticated({ permission: Permission.NotificationUpdate }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Update notifications', + description: 'Update a list of notifications. Allows to bulk-set the read status of notifications.', + }) updateNotifications(@Auth() auth: AuthDto, @Body() dto: NotificationUpdateAllDto): Promise { return this.service.updateAll(auth, dto); } @@ -34,18 +42,30 @@ export class NotificationController { @Delete() @Authenticated({ permission: Permission.NotificationDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Delete notifications', + description: 'Delete a list of notifications at once.', + }) deleteNotifications(@Auth() auth: AuthDto, @Body() dto: NotificationDeleteAllDto): Promise { return this.service.deleteAll(auth, dto); } @Get(':id') @Authenticated({ permission: Permission.NotificationRead }) + @ApiOperation({ + summary: 'Get a notification', + description: 'Retrieve a specific notification identified by id.', + }) getNotification(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.get(auth, id); } @Put(':id') @Authenticated({ permission: Permission.NotificationUpdate }) + @ApiOperation({ + summary: 'Update a notification', + description: 'Update a specific notification to set its read status.', + }) updateNotification( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -57,6 +77,10 @@ export class NotificationController { @Delete(':id') @Authenticated({ permission: Permission.NotificationDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Delete a notification', + description: 'Delete a specific notification.', + }) deleteNotification(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.delete(auth, id); } diff --git a/server/src/controllers/oauth.controller.ts b/server/src/controllers/oauth.controller.ts index f81a184557..cd15486d56 100644 --- a/server/src/controllers/oauth.controller.ts +++ b/server/src/controllers/oauth.controller.ts @@ -1,5 +1,5 @@ import { Body, Controller, Get, HttpCode, HttpStatus, Post, Redirect, Req, Res } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { Request, Response } from 'express'; import { AuthDto, @@ -9,18 +9,23 @@ import { OAuthConfigDto, } from 'src/dtos/auth.dto'; import { UserAdminResponseDto } from 'src/dtos/user.dto'; -import { AuthType, ImmichCookie } from 'src/enum'; +import { ApiTag, AuthType, ImmichCookie } from 'src/enum'; import { Auth, Authenticated, GetLoginDetails } from 'src/middleware/auth.guard'; import { AuthService, LoginDetails } from 'src/services/auth.service'; import { respondWithCookie } from 'src/utils/response'; -@ApiTags('OAuth') +@ApiTags(ApiTag.Authentication) @Controller('oauth') export class OAuthController { constructor(private service: AuthService) {} @Get('mobile-redirect') @Redirect() + @ApiOperation({ + summary: 'Redirect OAuth to mobile', + description: + 'Requests to this URL are automatically forwarded to the mobile app, and is used in some cases for OAuth redirecting.', + }) redirectOAuthToMobile(@Req() request: Request) { return { url: this.service.getMobileRedirect(request.url), @@ -29,6 +34,10 @@ export class OAuthController { } @Post('authorize') + @ApiOperation({ + summary: 'Start OAuth', + description: 'Initiate the OAuth authorization process.', + }) async startOAuth( @Body() dto: OAuthConfigDto, @Res({ passthrough: true }) res: Response, @@ -49,6 +58,10 @@ export class OAuthController { } @Post('callback') + @ApiOperation({ + summary: 'Finish OAuth', + description: 'Complete the OAuth authorization process by exchanging the authorization code for a session token.', + }) async finishOAuth( @Req() request: Request, @Res({ passthrough: true }) res: Response, @@ -71,6 +84,10 @@ export class OAuthController { @Post('link') @Authenticated() @HttpCode(HttpStatus.OK) + @ApiOperation({ + summary: 'Link OAuth account', + description: 'Link an OAuth account to the authenticated user.', + }) linkOAuthAccount( @Req() request: Request, @Auth() auth: AuthDto, @@ -82,6 +99,10 @@ export class OAuthController { @Post('unlink') @Authenticated() @HttpCode(HttpStatus.OK) + @ApiOperation({ + summary: 'Unlink OAuth account', + description: 'Unlink the OAuth account from the authenticated user.', + }) unlinkOAuthAccount(@Auth() auth: AuthDto): Promise { return this.service.unlink(auth); } diff --git a/server/src/controllers/partner.controller.ts b/server/src/controllers/partner.controller.ts index 7cb5c1c274..63ad84002f 100644 --- a/server/src/controllers/partner.controller.ts +++ b/server/src/controllers/partner.controller.ts @@ -1,32 +1,44 @@ import { Body, Controller, Delete, Get, HttpCode, HttpStatus, Param, Post, Put, Query } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { EndpointLifecycle } from 'src/decorators'; import { AuthDto } from 'src/dtos/auth.dto'; import { PartnerCreateDto, PartnerResponseDto, PartnerSearchDto, PartnerUpdateDto } from 'src/dtos/partner.dto'; -import { Permission } from 'src/enum'; +import { ApiTag, Permission } from 'src/enum'; import { Auth, Authenticated } from 'src/middleware/auth.guard'; import { PartnerService } from 'src/services/partner.service'; import { UUIDParamDto } from 'src/validation'; -@ApiTags('Partners') +@ApiTags(ApiTag.Partners) @Controller('partners') export class PartnerController { constructor(private service: PartnerService) {} @Get() @Authenticated({ permission: Permission.PartnerRead }) + @ApiOperation({ + summary: 'Retrieve partners', + description: 'Retrieve a list of partners with whom assets are shared.', + }) getPartners(@Auth() auth: AuthDto, @Query() dto: PartnerSearchDto): Promise { return this.service.search(auth, dto); } @Post() @Authenticated({ permission: Permission.PartnerCreate }) + @ApiOperation({ + summary: 'Create a partner', + description: 'Create a new partner to share assets with.', + }) createPartner(@Auth() auth: AuthDto, @Body() dto: PartnerCreateDto): Promise { return this.service.create(auth, dto); } @Post(':id') - @EndpointLifecycle({ deprecatedAt: 'v1.141.0' }) + @EndpointLifecycle({ + deprecatedAt: 'v1.141.0', + summary: 'Create a partner', + description: 'Create a new partner to share assets with.', + }) @Authenticated({ permission: Permission.PartnerCreate }) createPartnerDeprecated(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.create(auth, { sharedWithId: id }); @@ -34,6 +46,10 @@ export class PartnerController { @Put(':id') @Authenticated({ permission: Permission.PartnerUpdate }) + @ApiOperation({ + summary: 'Update a partner', + description: "Specify whether a partner's assets should appear in the user's timeline.", + }) updatePartner( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -45,6 +61,10 @@ export class PartnerController { @Delete(':id') @Authenticated({ permission: Permission.PartnerDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Remove a partner', + description: 'Stop sharing assets with a partner.', + }) removePartner(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.remove(auth, id); } diff --git a/server/src/controllers/person.controller.ts b/server/src/controllers/person.controller.ts index 84bb864cd3..6acb958444 100644 --- a/server/src/controllers/person.controller.ts +++ b/server/src/controllers/person.controller.ts @@ -12,7 +12,7 @@ import { Query, Res, } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { NextFunction, Response } from 'express'; import { BulkIdResponseDto, BulkIdsDto } from 'src/dtos/asset-ids.response.dto'; import { AuthDto } from 'src/dtos/auth.dto'; @@ -27,14 +27,14 @@ import { PersonStatisticsResponseDto, PersonUpdateDto, } from 'src/dtos/person.dto'; -import { Permission } from 'src/enum'; +import { ApiTag, Permission } from 'src/enum'; import { Auth, Authenticated, FileResponse } from 'src/middleware/auth.guard'; import { LoggingRepository } from 'src/repositories/logging.repository'; import { PersonService } from 'src/services/person.service'; import { sendFile } from 'src/utils/file'; import { UUIDParamDto } from 'src/validation'; -@ApiTags('People') +@ApiTags(ApiTag.People) @Controller('people') export class PersonController { constructor( @@ -46,18 +46,24 @@ export class PersonController { @Get() @Authenticated({ permission: Permission.PersonRead }) + @ApiOperation({ summary: 'Get all people', description: 'Retrieve a list of all people.' }) getAllPeople(@Auth() auth: AuthDto, @Query() options: PersonSearchDto): Promise { return this.service.getAll(auth, options); } @Post() @Authenticated({ permission: Permission.PersonCreate }) + @ApiOperation({ + summary: 'Create a person', + description: 'Create a new person that can have multiple faces assigned to them.', + }) createPerson(@Auth() auth: AuthDto, @Body() dto: PersonCreateDto): Promise { return this.service.create(auth, dto); } @Put() @Authenticated({ permission: Permission.PersonUpdate }) + @ApiOperation({ summary: 'Update people', description: 'Bulk update multiple people at once.' }) updatePeople(@Auth() auth: AuthDto, @Body() dto: PeopleUpdateDto): Promise { return this.service.updateAll(auth, dto); } @@ -65,18 +71,21 @@ export class PersonController { @Delete() @Authenticated({ permission: Permission.PersonDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ summary: 'Delete people', description: 'Bulk delete a list of people at once.' }) deletePeople(@Auth() auth: AuthDto, @Body() dto: BulkIdsDto): Promise { return this.service.deleteAll(auth, dto); } @Get(':id') @Authenticated({ permission: Permission.PersonRead }) + @ApiOperation({ summary: 'Get a person', description: 'Retrieve a person by id.' }) getPerson(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.getById(auth, id); } @Put(':id') @Authenticated({ permission: Permission.PersonUpdate }) + @ApiOperation({ summary: 'Update person', description: 'Update an individual person.' }) updatePerson( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -88,12 +97,14 @@ export class PersonController { @Delete(':id') @Authenticated({ permission: Permission.PersonDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ summary: 'Delete person', description: 'Delete an individual person.' }) deletePerson(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.delete(auth, id); } @Get(':id/statistics') @Authenticated({ permission: Permission.PersonStatistics }) + @ApiOperation({ summary: 'Get person statistics', description: 'Retrieve statistics about a specific person.' }) getPersonStatistics(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.getStatistics(auth, id); } @@ -101,6 +112,7 @@ export class PersonController { @Get(':id/thumbnail') @FileResponse() @Authenticated({ permission: Permission.PersonRead }) + @ApiOperation({ summary: 'Get person thumbnail', description: 'Retrieve the thumbnail file for a person.' }) async getPersonThumbnail( @Res() res: Response, @Next() next: NextFunction, @@ -112,6 +124,7 @@ export class PersonController { @Put(':id/reassign') @Authenticated({ permission: Permission.PersonReassign }) + @ApiOperation({ summary: 'Reassign faces', description: 'Bulk reassign a list of faces to a different person.' }) reassignFaces( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -123,6 +136,10 @@ export class PersonController { @Post(':id/merge') @Authenticated({ permission: Permission.PersonMerge }) @HttpCode(HttpStatus.OK) + @ApiOperation({ + summary: 'Merge people', + description: 'Merge a list of people into the person specified in the path parameter.', + }) mergePerson( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, diff --git a/server/src/controllers/search.controller.ts b/server/src/controllers/search.controller.ts index f9aa6bce81..e04fbaa3f6 100644 --- a/server/src/controllers/search.controller.ts +++ b/server/src/controllers/search.controller.ts @@ -1,5 +1,5 @@ import { Body, Controller, Get, HttpCode, HttpStatus, Post, Query } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { AssetResponseDto } from 'src/dtos/asset-response.dto'; import { AuthDto } from 'src/dtos/auth.dto'; import { PersonResponseDto } from 'src/dtos/person.dto'; @@ -17,11 +17,11 @@ import { SmartSearchDto, StatisticsSearchDto, } from 'src/dtos/search.dto'; -import { Permission } from 'src/enum'; +import { ApiTag, Permission } from 'src/enum'; import { Auth, Authenticated } from 'src/middleware/auth.guard'; import { SearchService } from 'src/services/search.service'; -@ApiTags('Search') +@ApiTags(ApiTag.Search) @Controller('search') export class SearchController { constructor(private service: SearchService) {} @@ -29,6 +29,10 @@ export class SearchController { @Post('metadata') @Authenticated({ permission: Permission.AssetRead }) @HttpCode(HttpStatus.OK) + @ApiOperation({ + summary: 'Search assets by metadata', + description: 'Search for assets based on various metadata criteria.', + }) searchAssets(@Auth() auth: AuthDto, @Body() dto: MetadataSearchDto): Promise { return this.service.searchMetadata(auth, dto); } @@ -36,6 +40,10 @@ export class SearchController { @Post('statistics') @Authenticated({ permission: Permission.AssetStatistics }) @HttpCode(HttpStatus.OK) + @ApiOperation({ + summary: 'Search asset statistics', + description: 'Retrieve statistical data about assets based on search criteria, such as the total matching count.', + }) searchAssetStatistics(@Auth() auth: AuthDto, @Body() dto: StatisticsSearchDto): Promise { return this.service.searchStatistics(auth, dto); } @@ -43,6 +51,10 @@ export class SearchController { @Post('random') @Authenticated({ permission: Permission.AssetRead }) @HttpCode(HttpStatus.OK) + @ApiOperation({ + summary: 'Search random assets', + description: 'Retrieve a random selection of assets based on the provided criteria.', + }) searchRandom(@Auth() auth: AuthDto, @Body() dto: RandomSearchDto): Promise { return this.service.searchRandom(auth, dto); } @@ -50,6 +62,10 @@ export class SearchController { @Post('large-assets') @Authenticated({ permission: Permission.AssetRead }) @HttpCode(HttpStatus.OK) + @ApiOperation({ + summary: 'Search large assets', + description: 'Search for assets that are considered large based on specified criteria.', + }) searchLargeAssets(@Auth() auth: AuthDto, @Query() dto: LargeAssetSearchDto): Promise { return this.service.searchLargeAssets(auth, dto); } @@ -57,36 +73,62 @@ export class SearchController { @Post('smart') @Authenticated({ permission: Permission.AssetRead }) @HttpCode(HttpStatus.OK) + @ApiOperation({ + summary: 'Smart asset search', + description: 'Perform a smart search for assets by using machine learning vectors to determine relevance.', + }) searchSmart(@Auth() auth: AuthDto, @Body() dto: SmartSearchDto): Promise { return this.service.searchSmart(auth, dto); } @Get('explore') @Authenticated({ permission: Permission.AssetRead }) + @ApiOperation({ + summary: 'Retrieve explore data', + description: 'Retrieve data for the explore section, such as popular people and places.', + }) getExploreData(@Auth() auth: AuthDto): Promise { return this.service.getExploreData(auth); } @Get('person') @Authenticated({ permission: Permission.PersonRead }) + @ApiOperation({ + summary: 'Search people', + description: 'Search for people by name.', + }) searchPerson(@Auth() auth: AuthDto, @Query() dto: SearchPeopleDto): Promise { return this.service.searchPerson(auth, dto); } @Get('places') @Authenticated({ permission: Permission.AssetRead }) + @ApiOperation({ + summary: 'Search places', + description: 'Search for places by name.', + }) searchPlaces(@Query() dto: SearchPlacesDto): Promise { return this.service.searchPlaces(dto); } @Get('cities') @Authenticated({ permission: Permission.AssetRead }) + @ApiOperation({ + summary: 'Retrieve assets by city', + description: + 'Retrieve a list of assets with each asset belonging to a different city. This endpoint is used on the places pages to show a single thumbnail for each city the user has assets in.', + }) getAssetsByCity(@Auth() auth: AuthDto): Promise { return this.service.getAssetsByCity(auth); } @Get('suggestions') @Authenticated({ permission: Permission.AssetRead }) + @ApiOperation({ + summary: 'Retrieve search suggestions', + description: + 'Retrieve search suggestions based on partial input. This endpoint is used for typeahead search features.', + }) getSearchSuggestions(@Auth() auth: AuthDto, @Query() dto: SearchSuggestionRequestDto): Promise { // TODO fix open api generation to indicate that results can be nullable return this.service.getSearchSuggestions(auth, dto) as Promise; diff --git a/server/src/controllers/server.controller.ts b/server/src/controllers/server.controller.ts index f9a340eb31..c9c8539bb3 100644 --- a/server/src/controllers/server.controller.ts +++ b/server/src/controllers/server.controller.ts @@ -1,5 +1,5 @@ import { Body, Controller, Delete, Get, HttpCode, HttpStatus, Put } from '@nestjs/common'; -import { ApiNotFoundResponse, ApiTags } from '@nestjs/swagger'; +import { ApiNotFoundResponse, ApiOperation, ApiTags } from '@nestjs/swagger'; import { LicenseKeyDto, LicenseResponseDto } from 'src/dtos/license.dto'; import { ServerAboutResponseDto, @@ -15,13 +15,13 @@ import { ServerVersionResponseDto, } from 'src/dtos/server.dto'; import { VersionCheckStateResponseDto } from 'src/dtos/system-metadata.dto'; -import { Permission } from 'src/enum'; +import { ApiTag, Permission } from 'src/enum'; import { Authenticated } from 'src/middleware/auth.guard'; import { ServerService } from 'src/services/server.service'; import { SystemMetadataService } from 'src/services/system-metadata.service'; import { VersionService } from 'src/services/version.service'; -@ApiTags('Server') +@ApiTags(ApiTag.Server) @Controller('server') export class ServerController { constructor( @@ -32,59 +32,85 @@ export class ServerController { @Get('about') @Authenticated({ permission: Permission.ServerAbout }) + @ApiOperation({ summary: 'Get server information', description: 'Retrieve a list of information about the server.' }) getAboutInfo(): Promise { return this.service.getAboutInfo(); } @Get('apk-links') @Authenticated({ permission: Permission.ServerApkLinks }) + @ApiOperation({ summary: 'Get APK links', description: 'Retrieve links to the APKs for the current server version.' }) getApkLinks(): ServerApkLinksDto { return this.service.getApkLinks(); } @Get('storage') @Authenticated({ permission: Permission.ServerStorage }) + @ApiOperation({ + summary: 'Get storage', + description: 'Retrieve the current storage utilization information of the server.', + }) getStorage(): Promise { return this.service.getStorage(); } @Get('ping') + @ApiOperation({ summary: 'Ping', description: 'Pong' }) pingServer(): ServerPingResponse { return this.service.ping(); } @Get('version') + @ApiOperation({ + summary: 'Get server version', + description: 'Retrieve the current server version in semantic versioning (semver) format.', + }) getServerVersion(): ServerVersionResponseDto { return this.versionService.getVersion(); } @Get('version-history') + @ApiOperation({ + summary: 'Get version history', + description: 'Retrieve a list of past versions the server has been on.', + }) getVersionHistory(): Promise { return this.versionService.getVersionHistory(); } @Get('features') + @ApiOperation({ summary: 'Get features', description: 'Retrieve available features supported by this server.' }) getServerFeatures(): Promise { return this.service.getFeatures(); } @Get('theme') + @ApiOperation({ summary: 'Get theme', description: 'Retrieve the custom CSS, if existent.' }) getTheme(): Promise { return this.service.getTheme(); } @Get('config') + @ApiOperation({ summary: 'Get config', description: 'Retrieve the current server configuration.' }) getServerConfig(): Promise { return this.service.getSystemConfig(); } @Get('statistics') @Authenticated({ permission: Permission.ServerStatistics, admin: true }) + @ApiOperation({ + summary: 'Get statistics', + description: 'Retrieve statistics about the entire Immich instance such as asset counts.', + }) getServerStatistics(): Promise { return this.service.getStatistics(); } @Get('media-types') + @ApiOperation({ + summary: 'Get supported media types', + description: 'Retrieve all media types supported by the server.', + }) getSupportedMediaTypes(): ServerMediaTypesResponseDto { return this.service.getSupportedMediaTypes(); } @@ -92,12 +118,20 @@ export class ServerController { @Get('license') @Authenticated({ permission: Permission.ServerLicenseRead, admin: true }) @ApiNotFoundResponse() + @ApiOperation({ + summary: 'Get product key', + description: 'Retrieve information about whether the server currently has a product key registered.', + }) getServerLicense(): Promise { return this.service.getLicense(); } @Put('license') @Authenticated({ permission: Permission.ServerLicenseUpdate, admin: true }) + @ApiOperation({ + summary: 'Set server product key', + description: 'Validate and set the server product key if successful.', + }) setServerLicense(@Body() license: LicenseKeyDto): Promise { return this.service.setLicense(license); } @@ -105,12 +139,17 @@ export class ServerController { @Delete('license') @Authenticated({ permission: Permission.ServerLicenseDelete, admin: true }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ summary: 'Delete server product key', description: 'Delete the currently set server product key.' }) deleteServerLicense(): Promise { return this.service.deleteLicense(); } @Get('version-check') @Authenticated({ permission: Permission.ServerVersionCheck }) + @ApiOperation({ + summary: 'Get version check status', + description: 'Retrieve information about the last time the version check ran.', + }) getVersionCheck(): Promise { return this.systemMetadataService.getVersionCheckState(); } diff --git a/server/src/controllers/session.controller.ts b/server/src/controllers/session.controller.ts index cbe8158fee..47cd7a6f19 100644 --- a/server/src/controllers/session.controller.ts +++ b/server/src/controllers/session.controller.ts @@ -1,25 +1,33 @@ import { Body, Controller, Delete, Get, HttpCode, HttpStatus, Param, Post, Put } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { AuthDto } from 'src/dtos/auth.dto'; import { SessionCreateDto, SessionCreateResponseDto, SessionResponseDto, SessionUpdateDto } from 'src/dtos/session.dto'; -import { Permission } from 'src/enum'; +import { ApiTag, Permission } from 'src/enum'; import { Auth, Authenticated } from 'src/middleware/auth.guard'; import { SessionService } from 'src/services/session.service'; import { UUIDParamDto } from 'src/validation'; -@ApiTags('Sessions') +@ApiTags(ApiTag.Sessions) @Controller('sessions') export class SessionController { constructor(private service: SessionService) {} @Post() @Authenticated({ permission: Permission.SessionCreate }) + @ApiOperation({ + summary: 'Create a session', + description: 'Create a session as a child to the current session. This endpoint is used for casting.', + }) createSession(@Auth() auth: AuthDto, @Body() dto: SessionCreateDto): Promise { return this.service.create(auth, dto); } @Get() @Authenticated({ permission: Permission.SessionRead }) + @ApiOperation({ + summary: 'Retrieve sessions', + description: 'Retrieve a list of sessions for the user.', + }) getSessions(@Auth() auth: AuthDto): Promise { return this.service.getAll(auth); } @@ -27,12 +35,20 @@ export class SessionController { @Delete() @Authenticated({ permission: Permission.SessionDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Delete all sessions', + description: 'Delete all sessions for the user. This will not delete the current session.', + }) deleteAllSessions(@Auth() auth: AuthDto): Promise { return this.service.deleteAll(auth); } @Put(':id') @Authenticated({ permission: Permission.SessionUpdate }) + @ApiOperation({ + summary: 'Update a session', + description: 'Update a specific session identified by id.', + }) updateSession( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -44,6 +60,10 @@ export class SessionController { @Delete(':id') @Authenticated({ permission: Permission.SessionDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Delete a session', + description: 'Delete a specific session by id.', + }) deleteSession(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.delete(auth, id); } @@ -51,6 +71,10 @@ export class SessionController { @Post(':id/lock') @Authenticated({ permission: Permission.SessionLock }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Lock a session', + description: 'Lock a specific session by id.', + }) lockSession(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.lock(auth, id); } diff --git a/server/src/controllers/shared-link.controller.ts b/server/src/controllers/shared-link.controller.ts index ef0a93e012..e3e55f2941 100644 --- a/server/src/controllers/shared-link.controller.ts +++ b/server/src/controllers/shared-link.controller.ts @@ -13,7 +13,7 @@ import { Req, Res, } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { Request, Response } from 'express'; import { AssetIdsResponseDto } from 'src/dtos/asset-ids.response.dto'; import { AssetIdsDto } from 'src/dtos/asset.dto'; @@ -25,26 +25,34 @@ import { SharedLinkResponseDto, SharedLinkSearchDto, } from 'src/dtos/shared-link.dto'; -import { ImmichCookie, Permission } from 'src/enum'; +import { ApiTag, ImmichCookie, Permission } from 'src/enum'; import { Auth, Authenticated, GetLoginDetails } from 'src/middleware/auth.guard'; import { LoginDetails } from 'src/services/auth.service'; import { SharedLinkService } from 'src/services/shared-link.service'; import { respondWithCookie } from 'src/utils/response'; import { UUIDParamDto } from 'src/validation'; -@ApiTags('Shared Links') +@ApiTags(ApiTag.SharedLinks) @Controller('shared-links') export class SharedLinkController { constructor(private service: SharedLinkService) {} @Get() @Authenticated({ permission: Permission.SharedLinkRead }) + @ApiOperation({ + summary: 'Retrieve all shared links', + description: 'Retrieve a list of all shared links.', + }) getAllSharedLinks(@Auth() auth: AuthDto, @Query() dto: SharedLinkSearchDto): Promise { return this.service.getAll(auth, dto); } @Get('me') @Authenticated({ sharedLink: true }) + @ApiOperation({ + summary: 'Retrieve current shared link', + description: 'Retrieve the current shared link associated with authentication method.', + }) async getMySharedLink( @Auth() auth: AuthDto, @Query() dto: SharedLinkPasswordDto, @@ -65,18 +73,30 @@ export class SharedLinkController { @Get(':id') @Authenticated({ permission: Permission.SharedLinkRead }) + @ApiOperation({ + summary: 'Retrieve a shared link', + description: 'Retrieve a specific shared link by its ID.', + }) getSharedLinkById(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.get(auth, id); } @Post() @Authenticated({ permission: Permission.SharedLinkCreate }) + @ApiOperation({ + summary: 'Create a shared link', + description: 'Create a new shared link.', + }) createSharedLink(@Auth() auth: AuthDto, @Body() dto: SharedLinkCreateDto) { return this.service.create(auth, dto); } @Patch(':id') @Authenticated({ permission: Permission.SharedLinkUpdate }) + @ApiOperation({ + summary: 'Update a shared link', + description: 'Update an existing shared link by its ID.', + }) updateSharedLink( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -88,12 +108,21 @@ export class SharedLinkController { @Delete(':id') @Authenticated({ permission: Permission.SharedLinkDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Delete a shared link', + description: 'Delete a specific shared link by its ID.', + }) removeSharedLink(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.remove(auth, id); } @Put(':id/assets') @Authenticated({ sharedLink: true }) + @ApiOperation({ + summary: 'Add assets to a shared link', + description: + 'Add assets to a specific shared link by its ID. This endpoint is only relevant for shared link of type individual.', + }) addSharedLinkAssets( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -104,6 +133,11 @@ export class SharedLinkController { @Delete(':id/assets') @Authenticated({ sharedLink: true }) + @ApiOperation({ + summary: 'Remove assets from a shared link', + description: + 'Remove assets from a specific shared link by its ID. This endpoint is only relevant for shared link of type individual.', + }) removeSharedLinkAssets( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, diff --git a/server/src/controllers/stack.controller.ts b/server/src/controllers/stack.controller.ts index 6acd4abc24..def3900c71 100644 --- a/server/src/controllers/stack.controller.ts +++ b/server/src/controllers/stack.controller.ts @@ -1,26 +1,35 @@ import { Body, Controller, Delete, Get, HttpCode, HttpStatus, Param, Post, Put, Query } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { BulkIdsDto } from 'src/dtos/asset-ids.response.dto'; import { AuthDto } from 'src/dtos/auth.dto'; import { StackCreateDto, StackResponseDto, StackSearchDto, StackUpdateDto } from 'src/dtos/stack.dto'; -import { Permission } from 'src/enum'; +import { ApiTag, Permission } from 'src/enum'; import { Auth, Authenticated } from 'src/middleware/auth.guard'; import { StackService } from 'src/services/stack.service'; import { UUIDAssetIDParamDto, UUIDParamDto } from 'src/validation'; -@ApiTags('Stacks') +@ApiTags(ApiTag.Stacks) @Controller('stacks') export class StackController { constructor(private service: StackService) {} @Get() @Authenticated({ permission: Permission.StackRead }) + @ApiOperation({ + summary: 'Retrieve stacks', + description: 'Retrieve a list of stacks.', + }) searchStacks(@Auth() auth: AuthDto, @Query() query: StackSearchDto): Promise { return this.service.search(auth, query); } @Post() @Authenticated({ permission: Permission.StackCreate }) + @ApiOperation({ + summary: 'Create a stack', + description: + 'Create a new stack by providing a name and a list of asset IDs to include in the stack. If any of the provided asset IDs are primary assets of an existing stack, the existing stack will be merged into the newly created stack.', + }) createStack(@Auth() auth: AuthDto, @Body() dto: StackCreateDto): Promise { return this.service.create(auth, dto); } @@ -28,18 +37,30 @@ export class StackController { @Delete() @Authenticated({ permission: Permission.StackDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Delete stacks', + description: 'Delete multiple stacks by providing a list of stack IDs.', + }) deleteStacks(@Auth() auth: AuthDto, @Body() dto: BulkIdsDto): Promise { return this.service.deleteAll(auth, dto); } @Get(':id') @Authenticated({ permission: Permission.StackRead }) + @ApiOperation({ + summary: 'Retrieve a stack', + description: 'Retrieve a specific stack by its ID.', + }) getStack(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.get(auth, id); } @Put(':id') @Authenticated({ permission: Permission.StackUpdate }) + @ApiOperation({ + summary: 'Update a stack', + description: 'Update an existing stack by its ID.', + }) updateStack( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -51,6 +72,10 @@ export class StackController { @Delete(':id') @Authenticated({ permission: Permission.StackDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Delete a stack', + description: 'Delete a specific stack by its ID.', + }) deleteStack(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.delete(auth, id); } @@ -58,6 +83,10 @@ export class StackController { @Delete(':id/assets/:assetId') @Authenticated({ permission: Permission.StackUpdate }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Remove an asset from a stack', + description: 'Remove a specific asset from a stack by providing the stack ID and asset ID.', + }) removeAssetFromStack(@Auth() auth: AuthDto, @Param() dto: UUIDAssetIDParamDto): Promise { return this.service.removeAsset(auth, dto); } diff --git a/server/src/controllers/sync.controller.ts b/server/src/controllers/sync.controller.ts index 61432e43e3..1f105e6b25 100644 --- a/server/src/controllers/sync.controller.ts +++ b/server/src/controllers/sync.controller.ts @@ -1,6 +1,7 @@ import { Body, Controller, Delete, Get, Header, HttpCode, HttpStatus, Post, Res } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { Response } from 'express'; +import { EndpointLifecycle } from 'src/decorators'; import { AssetResponseDto } from 'src/dtos/asset-response.dto'; import { AuthDto } from 'src/dtos/auth.dto'; import { @@ -12,12 +13,12 @@ import { SyncAckSetDto, SyncStreamDto, } from 'src/dtos/sync.dto'; -import { Permission } from 'src/enum'; +import { ApiTag, Permission } from 'src/enum'; import { Auth, Authenticated } from 'src/middleware/auth.guard'; import { GlobalExceptionFilter } from 'src/middleware/global-exception.filter'; import { SyncService } from 'src/services/sync.service'; -@ApiTags('Sync') +@ApiTags(ApiTag.Sync) @Controller('sync') export class SyncController { constructor( @@ -28,6 +29,11 @@ export class SyncController { @Post('full-sync') @Authenticated() @HttpCode(HttpStatus.OK) + @EndpointLifecycle({ + deprecatedAt: 'v2.0.0', + summary: 'Get full sync for user', + description: 'Retrieve all assets for a full synchronization for the authenticated user.', + }) getFullSyncForUser(@Auth() auth: AuthDto, @Body() dto: AssetFullSyncDto): Promise { return this.service.getFullSync(auth, dto); } @@ -35,6 +41,11 @@ export class SyncController { @Post('delta-sync') @Authenticated() @HttpCode(HttpStatus.OK) + @EndpointLifecycle({ + deprecatedAt: 'v2.0.0', + summary: 'Get delta sync for user', + description: 'Retrieve changed assets since the last sync for the authenticated user.', + }) getDeltaSync(@Auth() auth: AuthDto, @Body() dto: AssetDeltaSyncDto): Promise { return this.service.getDeltaSync(auth, dto); } @@ -43,6 +54,11 @@ export class SyncController { @Authenticated({ permission: Permission.SyncStream }) @Header('Content-Type', 'application/jsonlines+json') @HttpCode(HttpStatus.OK) + @ApiOperation({ + summary: 'Stream sync changes', + description: + 'Retrieve a JSON lines streamed response of changes for synchronization. This endpoint is used by the mobile app to efficiently stay up to date with changes.', + }) async getSyncStream(@Auth() auth: AuthDto, @Res() res: Response, @Body() dto: SyncStreamDto) { try { await this.service.stream(auth, res, dto); @@ -54,6 +70,10 @@ export class SyncController { @Get('ack') @Authenticated({ permission: Permission.SyncCheckpointRead }) + @ApiOperation({ + summary: 'Retrieve acknowledgements', + description: 'Retrieve the synchronization acknowledgments for the current session.', + }) getSyncAck(@Auth() auth: AuthDto): Promise { return this.service.getAcks(auth); } @@ -61,6 +81,11 @@ export class SyncController { @Post('ack') @Authenticated({ permission: Permission.SyncCheckpointUpdate }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Acknowledge changes', + description: + 'Send a list of synchronization acknowledgements to confirm that the latest changes have been received.', + }) sendSyncAck(@Auth() auth: AuthDto, @Body() dto: SyncAckSetDto) { return this.service.setAcks(auth, dto); } @@ -68,6 +93,10 @@ export class SyncController { @Delete('ack') @Authenticated({ permission: Permission.SyncCheckpointDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Delete acknowledgements', + description: 'Delete specific synchronization acknowledgments.', + }) deleteSyncAck(@Auth() auth: AuthDto, @Body() dto: SyncAckDeleteDto): Promise { return this.service.deleteAcks(auth, dto); } diff --git a/server/src/controllers/system-config.controller.ts b/server/src/controllers/system-config.controller.ts index 69117f4d45..66d62135b7 100644 --- a/server/src/controllers/system-config.controller.ts +++ b/server/src/controllers/system-config.controller.ts @@ -1,12 +1,12 @@ import { Body, Controller, Get, Put } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { SystemConfigDto, SystemConfigTemplateStorageOptionDto } from 'src/dtos/system-config.dto'; -import { Permission } from 'src/enum'; +import { ApiTag, Permission } from 'src/enum'; import { Authenticated } from 'src/middleware/auth.guard'; import { StorageTemplateService } from 'src/services/storage-template.service'; import { SystemConfigService } from 'src/services/system-config.service'; -@ApiTags('System Config') +@ApiTags(ApiTag.SystemConfig) @Controller('system-config') export class SystemConfigController { constructor( @@ -16,24 +16,37 @@ export class SystemConfigController { @Get() @Authenticated({ permission: Permission.SystemConfigRead, admin: true }) + @ApiOperation({ summary: 'Get system configuration', description: 'Retrieve the current system configuration.' }) getConfig(): Promise { return this.service.getSystemConfig(); } @Get('defaults') @Authenticated({ permission: Permission.SystemConfigRead, admin: true }) + @ApiOperation({ + summary: 'Get system configuration defaults', + description: 'Retrieve the default values for the system configuration.', + }) getConfigDefaults(): SystemConfigDto { return this.service.getDefaults(); } @Put() @Authenticated({ permission: Permission.SystemConfigUpdate, admin: true }) + @ApiOperation({ + summary: 'Update system configuration', + description: 'Update the system configuration with a new system configuration.', + }) updateConfig(@Body() dto: SystemConfigDto): Promise { return this.service.updateSystemConfig(dto); } @Get('storage-template-options') @Authenticated({ permission: Permission.SystemConfigRead, admin: true }) + @ApiOperation({ + summary: 'Get storage template options', + description: 'Retrieve exemplary storage template options.', + }) getStorageTemplateOptions(): SystemConfigTemplateStorageOptionDto { return this.storageTemplateService.getStorageTemplateOptions(); } diff --git a/server/src/controllers/system-metadata.controller.ts b/server/src/controllers/system-metadata.controller.ts index d6634e9444..f97eb3877c 100644 --- a/server/src/controllers/system-metadata.controller.ts +++ b/server/src/controllers/system-metadata.controller.ts @@ -1,21 +1,25 @@ import { Body, Controller, Get, HttpCode, HttpStatus, Post } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { AdminOnboardingUpdateDto, ReverseGeocodingStateResponseDto, VersionCheckStateResponseDto, } from 'src/dtos/system-metadata.dto'; -import { Permission } from 'src/enum'; +import { ApiTag, Permission } from 'src/enum'; import { Authenticated } from 'src/middleware/auth.guard'; import { SystemMetadataService } from 'src/services/system-metadata.service'; -@ApiTags('System Metadata') +@ApiTags(ApiTag.SystemMetadata) @Controller('system-metadata') export class SystemMetadataController { constructor(private service: SystemMetadataService) {} @Get('admin-onboarding') @Authenticated({ permission: Permission.SystemMetadataRead, admin: true }) + @ApiOperation({ + summary: 'Retrieve admin onboarding', + description: 'Retrieve the current admin onboarding status.', + }) getAdminOnboarding(): Promise { return this.service.getAdminOnboarding(); } @@ -23,18 +27,30 @@ export class SystemMetadataController { @Post('admin-onboarding') @Authenticated({ permission: Permission.SystemMetadataUpdate, admin: true }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Update admin onboarding', + description: 'Update the admin onboarding status.', + }) updateAdminOnboarding(@Body() dto: AdminOnboardingUpdateDto): Promise { return this.service.updateAdminOnboarding(dto); } @Get('reverse-geocoding-state') @Authenticated({ permission: Permission.SystemMetadataRead, admin: true }) + @ApiOperation({ + summary: 'Retrieve reverse geocoding state', + description: 'Retrieve the current state of the reverse geocoding import.', + }) getReverseGeocodingState(): Promise { return this.service.getReverseGeocodingState(); } @Get('version-check-state') @Authenticated({ permission: Permission.SystemMetadataRead, admin: true }) + @ApiOperation({ + summary: 'Retrieve version check state', + description: 'Retrieve the current state of the version check process.', + }) getVersionCheckState(): Promise { return this.service.getVersionCheckState(); } diff --git a/server/src/controllers/tag.controller.ts b/server/src/controllers/tag.controller.ts index 59915ef2a4..514718f106 100644 --- a/server/src/controllers/tag.controller.ts +++ b/server/src/controllers/tag.controller.ts @@ -1,5 +1,5 @@ import { Body, Controller, Delete, Get, HttpCode, HttpStatus, Param, Post, Put } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { BulkIdResponseDto, BulkIdsDto } from 'src/dtos/asset-ids.response.dto'; import { AuthDto } from 'src/dtos/auth.dto'; import { @@ -10,48 +10,72 @@ import { TagUpdateDto, TagUpsertDto, } from 'src/dtos/tag.dto'; -import { Permission } from 'src/enum'; +import { ApiTag, Permission } from 'src/enum'; import { Auth, Authenticated } from 'src/middleware/auth.guard'; import { TagService } from 'src/services/tag.service'; import { UUIDParamDto } from 'src/validation'; -@ApiTags('Tags') +@ApiTags(ApiTag.Tags) @Controller('tags') export class TagController { constructor(private service: TagService) {} @Post() @Authenticated({ permission: Permission.TagCreate }) + @ApiOperation({ + summary: 'Create a tag', + description: 'Create a new tag by providing a name and optional color.', + }) createTag(@Auth() auth: AuthDto, @Body() dto: TagCreateDto): Promise { return this.service.create(auth, dto); } @Get() @Authenticated({ permission: Permission.TagRead }) + @ApiOperation({ + summary: 'Retrieve tags', + description: 'Retrieve a list of all tags.', + }) getAllTags(@Auth() auth: AuthDto): Promise { return this.service.getAll(auth); } @Put() @Authenticated({ permission: Permission.TagCreate }) + @ApiOperation({ + summary: 'Upsert tags', + description: 'Create or update multiple tags in a single request.', + }) upsertTags(@Auth() auth: AuthDto, @Body() dto: TagUpsertDto): Promise { return this.service.upsert(auth, dto); } @Put('assets') @Authenticated({ permission: Permission.TagAsset }) + @ApiOperation({ + summary: 'Tag assets', + description: 'Add multiple tags to multiple assets in a single request.', + }) bulkTagAssets(@Auth() auth: AuthDto, @Body() dto: TagBulkAssetsDto): Promise { return this.service.bulkTagAssets(auth, dto); } @Get(':id') @Authenticated({ permission: Permission.TagRead }) + @ApiOperation({ + summary: 'Retrieve a tag', + description: 'Retrieve a specific tag by its ID.', + }) getTagById(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.get(auth, id); } @Put(':id') @Authenticated({ permission: Permission.TagUpdate }) + @ApiOperation({ + summary: 'Update a tag', + description: 'Update an existing tag identified by its ID.', + }) updateTag(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @Body() dto: TagUpdateDto): Promise { return this.service.update(auth, id, dto); } @@ -59,12 +83,20 @@ export class TagController { @Delete(':id') @Authenticated({ permission: Permission.TagDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Delete a tag', + description: 'Delete a specific tag by its ID.', + }) deleteTag(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.remove(auth, id); } @Put(':id/assets') @Authenticated({ permission: Permission.TagAsset }) + @ApiOperation({ + summary: 'Tag assets', + description: 'Add a tag to all the specified assets.', + }) tagAssets( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -75,6 +107,10 @@ export class TagController { @Delete(':id/assets') @Authenticated({ permission: Permission.TagAsset }) + @ApiOperation({ + summary: 'Untag assets', + description: 'Remove a tag from all the specified assets.', + }) untagAssets( @Auth() auth: AuthDto, @Body() dto: BulkIdsDto, diff --git a/server/src/controllers/timeline.controller.ts b/server/src/controllers/timeline.controller.ts index 8cab840ec8..c2d3284fd4 100644 --- a/server/src/controllers/timeline.controller.ts +++ b/server/src/controllers/timeline.controller.ts @@ -1,18 +1,19 @@ import { Controller, Get, Header, Query } from '@nestjs/common'; -import { ApiOkResponse, ApiTags } from '@nestjs/swagger'; +import { ApiOkResponse, ApiOperation, ApiTags } from '@nestjs/swagger'; import { AuthDto } from 'src/dtos/auth.dto'; import { TimeBucketAssetDto, TimeBucketAssetResponseDto, TimeBucketDto } from 'src/dtos/time-bucket.dto'; -import { Permission } from 'src/enum'; +import { ApiTag, Permission } from 'src/enum'; import { Auth, Authenticated } from 'src/middleware/auth.guard'; import { TimelineService } from 'src/services/timeline.service'; -@ApiTags('Timeline') +@ApiTags(ApiTag.Timeline) @Controller('timeline') export class TimelineController { constructor(private service: TimelineService) {} @Get('buckets') @Authenticated({ permission: Permission.AssetRead, sharedLink: true }) + @ApiOperation({ summary: 'Get time buckets', description: 'Retrieve a list of all minimal time buckets.' }) getTimeBuckets(@Auth() auth: AuthDto, @Query() dto: TimeBucketDto) { return this.service.getTimeBuckets(auth, dto); } @@ -21,6 +22,10 @@ export class TimelineController { @Authenticated({ permission: Permission.AssetRead, sharedLink: true }) @ApiOkResponse({ type: TimeBucketAssetResponseDto }) @Header('Content-Type', 'application/json') + @ApiOperation({ + summary: 'Get time bucket', + description: 'Retrieve a string of all asset ids in a given time bucket.', + }) getTimeBucket(@Auth() auth: AuthDto, @Query() dto: TimeBucketAssetDto) { return this.service.getTimeBucket(auth, dto); } diff --git a/server/src/controllers/trash.controller.ts b/server/src/controllers/trash.controller.ts index eaf489f104..1b7ab6a39e 100644 --- a/server/src/controllers/trash.controller.ts +++ b/server/src/controllers/trash.controller.ts @@ -1,13 +1,13 @@ import { Body, Controller, HttpCode, HttpStatus, Post } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { BulkIdsDto } from 'src/dtos/asset-ids.response.dto'; import { AuthDto } from 'src/dtos/auth.dto'; import { TrashResponseDto } from 'src/dtos/trash.dto'; -import { Permission } from 'src/enum'; +import { ApiTag, Permission } from 'src/enum'; import { Auth, Authenticated } from 'src/middleware/auth.guard'; import { TrashService } from 'src/services/trash.service'; -@ApiTags('Trash') +@ApiTags(ApiTag.Trash) @Controller('trash') export class TrashController { constructor(private service: TrashService) {} @@ -15,6 +15,10 @@ export class TrashController { @Post('empty') @Authenticated({ permission: Permission.AssetDelete }) @HttpCode(HttpStatus.OK) + @ApiOperation({ + summary: 'Empty trash', + description: 'Permanently delete all items in the trash.', + }) emptyTrash(@Auth() auth: AuthDto): Promise { return this.service.empty(auth); } @@ -22,6 +26,10 @@ export class TrashController { @Post('restore') @Authenticated({ permission: Permission.AssetDelete }) @HttpCode(HttpStatus.OK) + @ApiOperation({ + summary: 'Restore trash', + description: 'Restore all items in the trash.', + }) restoreTrash(@Auth() auth: AuthDto): Promise { return this.service.restore(auth); } @@ -29,6 +37,10 @@ export class TrashController { @Post('restore/assets') @Authenticated({ permission: Permission.AssetDelete }) @HttpCode(HttpStatus.OK) + @ApiOperation({ + summary: 'Restore assets', + description: 'Restore specific assets from the trash.', + }) restoreAssets(@Auth() auth: AuthDto, @Body() dto: BulkIdsDto): Promise { return this.service.restoreAssets(auth, dto); } diff --git a/server/src/controllers/user-admin.controller.ts b/server/src/controllers/user-admin.controller.ts index 25a4691b75..466cbb6f10 100644 --- a/server/src/controllers/user-admin.controller.ts +++ b/server/src/controllers/user-admin.controller.ts @@ -1,5 +1,5 @@ import { Body, Controller, Delete, Get, HttpCode, HttpStatus, Param, Post, Put, Query } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { AssetStatsDto, AssetStatsResponseDto } from 'src/dtos/asset.dto'; import { AuthDto } from 'src/dtos/auth.dto'; import { SessionResponseDto } from 'src/dtos/session.dto'; @@ -11,36 +11,52 @@ import { UserAdminSearchDto, UserAdminUpdateDto, } from 'src/dtos/user.dto'; -import { Permission } from 'src/enum'; +import { ApiTag, Permission } from 'src/enum'; import { Auth, Authenticated } from 'src/middleware/auth.guard'; import { UserAdminService } from 'src/services/user-admin.service'; import { UUIDParamDto } from 'src/validation'; -@ApiTags('Users (admin)') +@ApiTags(ApiTag.UsersAdmin) @Controller('admin/users') export class UserAdminController { constructor(private service: UserAdminService) {} @Get() @Authenticated({ permission: Permission.AdminUserRead, admin: true }) + @ApiOperation({ + summary: 'Search users', + description: 'Search for users.', + }) searchUsersAdmin(@Auth() auth: AuthDto, @Query() dto: UserAdminSearchDto): Promise { return this.service.search(auth, dto); } @Post() @Authenticated({ permission: Permission.AdminUserCreate, admin: true }) + @ApiOperation({ + summary: 'Create a user', + description: 'Create a new user.', + }) createUserAdmin(@Body() createUserDto: UserAdminCreateDto): Promise { return this.service.create(createUserDto); } @Get(':id') @Authenticated({ permission: Permission.AdminUserRead, admin: true }) + @ApiOperation({ + summary: 'Retrieve a user', + description: 'Retrieve a specific user by their ID.', + }) getUserAdmin(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.get(auth, id); } @Put(':id') @Authenticated({ permission: Permission.AdminUserUpdate, admin: true }) + @ApiOperation({ + summary: 'Update a user', + description: 'Update an existing user.', + }) updateUserAdmin( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -51,6 +67,10 @@ export class UserAdminController { @Delete(':id') @Authenticated({ permission: Permission.AdminUserDelete, admin: true }) + @ApiOperation({ + summary: 'Delete a user', + description: 'Delete a user.', + }) deleteUserAdmin( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -61,12 +81,20 @@ export class UserAdminController { @Get(':id/sessions') @Authenticated({ permission: Permission.AdminSessionRead, admin: true }) + @ApiOperation({ + summary: 'Retrieve user sessions', + description: 'Retrieve all sessions for a specific user.', + }) getUserSessionsAdmin(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.getSessions(auth, id); } @Get(':id/statistics') @Authenticated({ permission: Permission.AdminUserRead, admin: true }) + @ApiOperation({ + summary: 'Retrieve user statistics', + description: 'Retrieve asset statistics for a specific user.', + }) getUserStatisticsAdmin( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -77,12 +105,20 @@ export class UserAdminController { @Get(':id/preferences') @Authenticated({ permission: Permission.AdminUserRead, admin: true }) + @ApiOperation({ + summary: 'Retrieve user preferences', + description: 'Retrieve the preferences of a specific user.', + }) getUserPreferencesAdmin(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.getPreferences(auth, id); } @Put(':id/preferences') @Authenticated({ permission: Permission.AdminUserUpdate, admin: true }) + @ApiOperation({ + summary: 'Update user preferences', + description: 'Update the preferences of a specific user.', + }) updateUserPreferencesAdmin( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -94,6 +130,10 @@ export class UserAdminController { @Post(':id/restore') @Authenticated({ permission: Permission.AdminUserDelete, admin: true }) @HttpCode(HttpStatus.OK) + @ApiOperation({ + summary: 'Restore a deleted user', + description: 'Restore a previously deleted user.', + }) restoreUserAdmin(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.restore(auth, id); } diff --git a/server/src/controllers/user.controller.ts b/server/src/controllers/user.controller.ts index d72b088c54..d76daaa0d5 100644 --- a/server/src/controllers/user.controller.ts +++ b/server/src/controllers/user.controller.ts @@ -13,7 +13,7 @@ import { UploadedFile, UseInterceptors, } from '@nestjs/common'; -import { ApiBody, ApiConsumes, ApiTags } from '@nestjs/swagger'; +import { ApiBody, ApiConsumes, ApiOperation, ApiTags } from '@nestjs/swagger'; import { NextFunction, Response } from 'express'; import { AuthDto } from 'src/dtos/auth.dto'; import { LicenseKeyDto, LicenseResponseDto } from 'src/dtos/license.dto'; @@ -21,7 +21,7 @@ import { OnboardingDto, OnboardingResponseDto } from 'src/dtos/onboarding.dto'; import { UserPreferencesResponseDto, UserPreferencesUpdateDto } from 'src/dtos/user-preferences.dto'; import { CreateProfileImageDto, CreateProfileImageResponseDto } from 'src/dtos/user-profile.dto'; import { UserAdminResponseDto, UserResponseDto, UserUpdateMeDto } from 'src/dtos/user.dto'; -import { Permission, RouteKey } from 'src/enum'; +import { ApiTag, Permission, RouteKey } from 'src/enum'; import { Auth, Authenticated, FileResponse } from 'src/middleware/auth.guard'; import { FileUploadInterceptor } from 'src/middleware/file-upload.interceptor'; import { LoggingRepository } from 'src/repositories/logging.repository'; @@ -29,7 +29,7 @@ import { UserService } from 'src/services/user.service'; import { sendFile } from 'src/utils/file'; import { UUIDParamDto } from 'src/validation'; -@ApiTags('Users') +@ApiTags(ApiTag.Users) @Controller(RouteKey.User) export class UserController { constructor( @@ -39,30 +39,38 @@ export class UserController { @Get() @Authenticated({ permission: Permission.UserRead }) + @ApiOperation({ summary: 'Get all users', description: 'Retrieve a list of all users on the server.' }) searchUsers(@Auth() auth: AuthDto): Promise { return this.service.search(auth); } @Get('me') @Authenticated({ permission: Permission.UserRead }) + @ApiOperation({ + summary: 'Get current user', + description: 'Retrieve information about the user making the API request.', + }) getMyUser(@Auth() auth: AuthDto): Promise { return this.service.getMe(auth); } @Put('me') @Authenticated({ permission: Permission.UserUpdate }) + @ApiOperation({ summary: 'Update current user', description: 'Update the current user making teh API request.' }) updateMyUser(@Auth() auth: AuthDto, @Body() dto: UserUpdateMeDto): Promise { return this.service.updateMe(auth, dto); } @Get('me/preferences') @Authenticated({ permission: Permission.UserPreferenceRead }) + @ApiOperation({ summary: 'Get my preferences', description: 'Retrieve the preferences for the current user.' }) getMyPreferences(@Auth() auth: AuthDto): Promise { return this.service.getMyPreferences(auth); } @Put('me/preferences') @Authenticated({ permission: Permission.UserPreferenceUpdate }) + @ApiOperation({ summary: 'Update my preferences', description: 'Update the preferences of the current user.' }) updateMyPreferences( @Auth() auth: AuthDto, @Body() dto: UserPreferencesUpdateDto, @@ -72,12 +80,20 @@ export class UserController { @Get('me/license') @Authenticated({ permission: Permission.UserLicenseRead }) + @ApiOperation({ + summary: 'Retrieve user product key', + description: 'Retrieve information about whether the current user has a registered product key.', + }) getUserLicense(@Auth() auth: AuthDto): Promise { return this.service.getLicense(auth); } @Put('me/license') @Authenticated({ permission: Permission.UserLicenseUpdate }) + @ApiOperation({ + summary: 'Set user product key', + description: 'Register a product key for the current user.', + }) async setUserLicense(@Auth() auth: AuthDto, @Body() license: LicenseKeyDto): Promise { return this.service.setLicense(auth, license); } @@ -85,18 +101,30 @@ export class UserController { @Delete('me/license') @Authenticated({ permission: Permission.UserLicenseDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Delete user product key', + description: 'Delete the registered product key for the current user.', + }) async deleteUserLicense(@Auth() auth: AuthDto): Promise { await this.service.deleteLicense(auth); } @Get('me/onboarding') @Authenticated({ permission: Permission.UserOnboardingRead }) + @ApiOperation({ + summary: 'Retrieve user onboarding', + description: 'Retrieve the onboarding status of the current user.', + }) getUserOnboarding(@Auth() auth: AuthDto): Promise { return this.service.getOnboarding(auth); } @Put('me/onboarding') @Authenticated({ permission: Permission.UserOnboardingUpdate }) + @ApiOperation({ + summary: 'Update user onboarding', + description: 'Update the onboarding status of the current user.', + }) async setUserOnboarding(@Auth() auth: AuthDto, @Body() Onboarding: OnboardingDto): Promise { return this.service.setOnboarding(auth, Onboarding); } @@ -104,12 +132,20 @@ export class UserController { @Delete('me/onboarding') @Authenticated({ permission: Permission.UserOnboardingDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Delete user onboarding', + description: 'Delete the onboarding status of the current user.', + }) async deleteUserOnboarding(@Auth() auth: AuthDto): Promise { await this.service.deleteOnboarding(auth); } @Get(':id') @Authenticated({ permission: Permission.UserRead }) + @ApiOperation({ + summary: 'Retrieve a user', + description: 'Retrieve a specific user by their ID.', + }) getUser(@Param() { id }: UUIDParamDto): Promise { return this.service.get(id); } @@ -119,6 +155,10 @@ export class UserController { @UseInterceptors(FileUploadInterceptor) @ApiConsumes('multipart/form-data') @ApiBody({ description: 'A new avatar for the user', type: CreateProfileImageDto }) + @ApiOperation({ + summary: 'Create user profile image', + description: 'Upload and set a new profile image for the current user.', + }) createProfileImage( @Auth() auth: AuthDto, @UploadedFile() fileInfo: Express.Multer.File, @@ -129,6 +169,10 @@ export class UserController { @Delete('profile-image') @Authenticated({ permission: Permission.UserProfileImageDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Delete user profile image', + description: 'Delete the profile image of the current user.', + }) deleteProfileImage(@Auth() auth: AuthDto): Promise { return this.service.deleteProfileImage(auth); } @@ -136,6 +180,10 @@ export class UserController { @Get(':id/profile-image') @FileResponse() @Authenticated({ permission: Permission.UserProfileImageRead }) + @ApiOperation({ + summary: 'Retrieve user profile image', + description: 'Retrieve the profile image file for a user.', + }) async getProfileImage(@Res() res: Response, @Next() next: NextFunction, @Param() { id }: UUIDParamDto) { await sendFile(res, next, () => this.service.getProfileImage(id), this.logger); } diff --git a/server/src/controllers/view.controller.ts b/server/src/controllers/view.controller.ts index b5e281e093..8d0cbb0d96 100644 --- a/server/src/controllers/view.controller.ts +++ b/server/src/controllers/view.controller.ts @@ -1,23 +1,32 @@ import { Controller, Get, Query } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { AssetResponseDto } from 'src/dtos/asset-response.dto'; import { AuthDto } from 'src/dtos/auth.dto'; +import { ApiTag } from 'src/enum'; import { Auth, Authenticated } from 'src/middleware/auth.guard'; import { ViewService } from 'src/services/view.service'; -@ApiTags('View') +@ApiTags(ApiTag.Views) @Controller('view') export class ViewController { constructor(private service: ViewService) {} @Get('folder/unique-paths') @Authenticated() + @ApiOperation({ + summary: 'Retrieve unique paths', + description: 'Retrieve a list of unique folder paths from asset original paths.', + }) getUniqueOriginalPaths(@Auth() auth: AuthDto): Promise { return this.service.getUniqueOriginalPaths(auth); } @Get('folder') @Authenticated() + @ApiOperation({ + summary: 'Retrieve assets by original path', + description: 'Retrieve assets that are children of a specific folder.', + }) getAssetsByOriginalPath(@Auth() auth: AuthDto, @Query('path') path: string): Promise { return this.service.getAssetsByOriginalPath(auth, path); } diff --git a/server/src/decorators.ts b/server/src/decorators.ts index 8a8e23d880..e9f27fa9ec 100644 --- a/server/src/decorators.ts +++ b/server/src/decorators.ts @@ -2,7 +2,7 @@ import { SetMetadata, applyDecorators } from '@nestjs/common'; import { ApiExtension, ApiOperation, ApiOperationOptions, ApiProperty, ApiTags } from '@nestjs/swagger'; import _ from 'lodash'; import { ADDED_IN_PREFIX, DEPRECATED_IN_PREFIX, LIFECYCLE_EXTENSION } from 'src/constants'; -import { ImmichWorker, JobName, MetadataKey, QueueName } from 'src/enum'; +import { ApiTag, ImmichWorker, JobName, MetadataKey, QueueName } from 'src/enum'; import { EmitEvent } from 'src/repositories/event.repository'; import { immich_uuid_v7, updated_at } from 'src/schema/functions'; import { BeforeUpdateTrigger, Column, ColumnOptions } from 'src/sql-tools'; @@ -168,7 +168,7 @@ export const EndpointLifecycle = ({ const decorators: MethodDecorator[] = [ApiExtension(LIFECYCLE_EXTENSION, { addedAt, deprecatedAt })]; if (deprecatedAt) { decorators.push( - ApiTags('Deprecated'), + ApiTags(ApiTag.Deprecated), ApiOperation({ deprecated: true, description: DEPRECATED_IN_PREFIX + deprecatedAt + (description ? `. ${description}` : ''), diff --git a/server/src/enum.ts b/server/src/enum.ts index a98fee0117..24f307f07a 100644 --- a/server/src/enum.ts +++ b/server/src/enum.ts @@ -771,3 +771,38 @@ export enum CronJob { LibraryScan = 'LibraryScan', NightlyJobs = 'NightlyJobs', } + +export enum ApiTag { + Activities = 'Activities', + Albums = 'Albums', + ApiKeys = 'API keys', + Authentication = 'Authentication', + AuthenticationAdmin = 'Authentication (admin)', + Assets = 'Assets', + Deprecated = 'Deprecated', + Download = 'Download', + Duplicates = 'Duplicates', + Faces = 'Faces', + Jobs = 'Jobs', + Libraries = 'Libraries', + Map = 'Map', + Memories = 'Memories', + Notifications = 'Notifications', + NotificationsAdmin = 'Notifications (admin)', + Partners = 'Partners', + People = 'People', + Search = 'Search', + Server = 'Server', + Sessions = 'Sessions', + SharedLinks = 'Shared links', + Stacks = 'Stacks', + Sync = 'Sync', + SystemConfig = 'System config', + SystemMetadata = 'System metadata', + Tags = 'Tags', + Timeline = 'Timeline', + Trash = 'Trash', + UsersAdmin = 'Users (admin)', + Users = 'Users', + Views = 'Views', +} diff --git a/server/src/utils/misc.ts b/server/src/utils/misc.ts index b9741c3b44..eb548eab74 100644 --- a/server/src/utils/misc.ts +++ b/server/src/utils/misc.ts @@ -17,7 +17,7 @@ import path from 'node:path'; import picomatch from 'picomatch'; import parse from 'picomatch/lib/parse'; import { SystemConfig } from 'src/config'; -import { CLIP_MODEL_INFO, serverVersion } from 'src/constants'; +import { CLIP_MODEL_INFO, endpointTags, serverVersion } from 'src/constants'; import { extraSyncModels } from 'src/dtos/sync.dto'; import { ApiCustomExtension, ImmichCookie, ImmichHeader, MetadataKey } from 'src/enum'; import { LoggingRepository } from 'src/repositories/logging.repository'; @@ -218,25 +218,16 @@ const patchOpenAPI = (document: OpenAPIObject) => { delete operation.summary; } + if (operation.description === '') { + delete operation.description; + } + if (operation.operationId) { // console.log(`${routeToErrorMessage(operation.operationId).padEnd(40)} (${operation.operationId})`); } - const adminOnly = operation[ApiCustomExtension.AdminOnly] ?? false; - const permission = operation[ApiCustomExtension.Permission]; - if (permission) { - let description = (operation.description || '').trim(); - if (description && !description.endsWith('.')) { - description += '. '; - } - - operation.description = - description + - `This endpoint ${adminOnly ? 'is an admin-only route, and ' : ''}requires the \`${permission}\` permission.`; - - if (operation.parameters) { - operation.parameters = _.orderBy(operation.parameters, 'name'); - } + if (operation.parameters) { + operation.parameters = _.orderBy(operation.parameters, 'name'); } } } @@ -245,7 +236,7 @@ const patchOpenAPI = (document: OpenAPIObject) => { }; export const useSwagger = (app: INestApplication, { write }: { write: boolean }) => { - const config = new DocumentBuilder() + const builder = new DocumentBuilder() .setTitle('Immich') .setDescription('Immich API') .setVersion(serverVersion.toString()) @@ -263,8 +254,12 @@ export const useSwagger = (app: INestApplication, { write }: { write: boolean }) }, MetadataKey.ApiKeySecurity, ) - .addServer('/api') - .build(); + .addServer('/api'); + + for (const [tag, description] of Object.entries(endpointTags)) { + builder.addTag(tag, description); + } + const config = builder.build(); const options: SwaggerDocumentOptions = { operationIdFactory: (controllerKey: string, methodKey: string) => methodKey,