mirror of
https://github.com/immich-app/immich.git
synced 2025-07-09 03:04:16 -04:00
feat(server): better api error messages (for unhandled exceptions) (#4817)
* feat(server): better error messages * chore: open api * chore: remove debug log * fix: syntax error * fix: e2e test
This commit is contained in:
parent
d4ef6f52bb
commit
2e424fe249
1146
cli/src/api/open-api/api.ts
generated
1146
cli/src/api/open-api/api.ts
generated
File diff suppressed because it is too large
Load Diff
@ -17,7 +17,7 @@ class OAuthService {
|
|||||||
// Resolve API server endpoint from user provided serverUrl
|
// Resolve API server endpoint from user provided serverUrl
|
||||||
await _apiService.resolveAndSetEndpoint(serverUrl);
|
await _apiService.resolveAndSetEndpoint(serverUrl);
|
||||||
|
|
||||||
return await _apiService.oAuthApi.generateConfig(
|
return await _apiService.oAuthApi.generateOAuthConfig(
|
||||||
OAuthConfigDto(redirectUri: '$callbackUrlScheme:/'),
|
OAuthConfigDto(redirectUri: '$callbackUrlScheme:/'),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -29,7 +29,7 @@ class OAuthService {
|
|||||||
callbackUrlScheme: callbackUrlScheme,
|
callbackUrlScheme: callbackUrlScheme,
|
||||||
);
|
);
|
||||||
|
|
||||||
return await _apiService.oAuthApi.callback(
|
return await _apiService.oAuthApi.finishOAuth(
|
||||||
OAuthCallbackDto(
|
OAuthCallbackDto(
|
||||||
url: result,
|
url: result,
|
||||||
),
|
),
|
||||||
|
@ -65,7 +65,7 @@ class LoginForm extends HookConsumerWidget {
|
|||||||
isLoadingServer.value = true;
|
isLoadingServer.value = true;
|
||||||
final endpoint = await apiService.resolveAndSetEndpoint(serverUrl);
|
final endpoint = await apiService.resolveAndSetEndpoint(serverUrl);
|
||||||
|
|
||||||
final loginConfig = await apiService.oAuthApi.generateConfig(
|
final loginConfig = await apiService.oAuthApi.generateOAuthConfig(
|
||||||
OAuthConfigDto(redirectUri: serverUrl),
|
OAuthConfigDto(redirectUri: serverUrl),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
40
mobile/openapi/README.md
generated
40
mobile/openapi/README.md
generated
@ -58,10 +58,10 @@ final api_instance = APIKeyApi();
|
|||||||
final aPIKeyCreateDto = APIKeyCreateDto(); // APIKeyCreateDto |
|
final aPIKeyCreateDto = APIKeyCreateDto(); // APIKeyCreateDto |
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final result = api_instance.createKey(aPIKeyCreateDto);
|
final result = api_instance.createApiKey(aPIKeyCreateDto);
|
||||||
print(result);
|
print(result);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('Exception when calling APIKeyApi->createKey: $e\n');
|
print('Exception when calling APIKeyApi->createApiKey: $e\n');
|
||||||
}
|
}
|
||||||
|
|
||||||
```
|
```
|
||||||
@ -72,11 +72,11 @@ All URIs are relative to */api*
|
|||||||
|
|
||||||
Class | Method | HTTP request | Description
|
Class | Method | HTTP request | Description
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
*APIKeyApi* | [**createKey**](doc//APIKeyApi.md#createkey) | **POST** /api-key |
|
*APIKeyApi* | [**createApiKey**](doc//APIKeyApi.md#createapikey) | **POST** /api-key |
|
||||||
*APIKeyApi* | [**deleteKey**](doc//APIKeyApi.md#deletekey) | **DELETE** /api-key/{id} |
|
*APIKeyApi* | [**deleteApiKey**](doc//APIKeyApi.md#deleteapikey) | **DELETE** /api-key/{id} |
|
||||||
*APIKeyApi* | [**getKey**](doc//APIKeyApi.md#getkey) | **GET** /api-key/{id} |
|
*APIKeyApi* | [**getApiKey**](doc//APIKeyApi.md#getapikey) | **GET** /api-key/{id} |
|
||||||
*APIKeyApi* | [**getKeys**](doc//APIKeyApi.md#getkeys) | **GET** /api-key |
|
*APIKeyApi* | [**getApiKeys**](doc//APIKeyApi.md#getapikeys) | **GET** /api-key |
|
||||||
*APIKeyApi* | [**updateKey**](doc//APIKeyApi.md#updatekey) | **PUT** /api-key/{id} |
|
*APIKeyApi* | [**updateApiKey**](doc//APIKeyApi.md#updateapikey) | **PUT** /api-key/{id} |
|
||||||
*ActivityApi* | [**createActivity**](doc//ActivityApi.md#createactivity) | **POST** /activity |
|
*ActivityApi* | [**createActivity**](doc//ActivityApi.md#createactivity) | **POST** /activity |
|
||||||
*ActivityApi* | [**deleteActivity**](doc//ActivityApi.md#deleteactivity) | **DELETE** /activity/{id} |
|
*ActivityApi* | [**deleteActivity**](doc//ActivityApi.md#deleteactivity) | **DELETE** /activity/{id} |
|
||||||
*ActivityApi* | [**getActivities**](doc//ActivityApi.md#getactivities) | **GET** /activity |
|
*ActivityApi* | [**getActivities**](doc//ActivityApi.md#getactivities) | **GET** /activity |
|
||||||
@ -91,7 +91,7 @@ Class | Method | HTTP request | Description
|
|||||||
*AlbumApi* | [**removeAssetFromAlbum**](doc//AlbumApi.md#removeassetfromalbum) | **DELETE** /album/{id}/assets |
|
*AlbumApi* | [**removeAssetFromAlbum**](doc//AlbumApi.md#removeassetfromalbum) | **DELETE** /album/{id}/assets |
|
||||||
*AlbumApi* | [**removeUserFromAlbum**](doc//AlbumApi.md#removeuserfromalbum) | **DELETE** /album/{id}/user/{userId} |
|
*AlbumApi* | [**removeUserFromAlbum**](doc//AlbumApi.md#removeuserfromalbum) | **DELETE** /album/{id}/user/{userId} |
|
||||||
*AlbumApi* | [**updateAlbumInfo**](doc//AlbumApi.md#updatealbuminfo) | **PATCH** /album/{id} |
|
*AlbumApi* | [**updateAlbumInfo**](doc//AlbumApi.md#updatealbuminfo) | **PATCH** /album/{id} |
|
||||||
*AssetApi* | [**bulkUploadCheck**](doc//AssetApi.md#bulkuploadcheck) | **POST** /asset/bulk-upload-check |
|
*AssetApi* | [**checkBulkUpload**](doc//AssetApi.md#checkbulkupload) | **POST** /asset/bulk-upload-check |
|
||||||
*AssetApi* | [**checkExistingAssets**](doc//AssetApi.md#checkexistingassets) | **POST** /asset/exist |
|
*AssetApi* | [**checkExistingAssets**](doc//AssetApi.md#checkexistingassets) | **POST** /asset/exist |
|
||||||
*AssetApi* | [**deleteAssets**](doc//AssetApi.md#deleteassets) | **DELETE** /asset |
|
*AssetApi* | [**deleteAssets**](doc//AssetApi.md#deleteassets) | **DELETE** /asset |
|
||||||
*AssetApi* | [**downloadArchive**](doc//AssetApi.md#downloadarchive) | **POST** /asset/download/archive |
|
*AssetApi* | [**downloadArchive**](doc//AssetApi.md#downloadarchive) | **POST** /asset/download/archive |
|
||||||
@ -100,15 +100,15 @@ Class | Method | HTTP request | Description
|
|||||||
*AssetApi* | [**getAllAssets**](doc//AssetApi.md#getallassets) | **GET** /asset |
|
*AssetApi* | [**getAllAssets**](doc//AssetApi.md#getallassets) | **GET** /asset |
|
||||||
*AssetApi* | [**getAssetById**](doc//AssetApi.md#getassetbyid) | **GET** /asset/assetById/{id} |
|
*AssetApi* | [**getAssetById**](doc//AssetApi.md#getassetbyid) | **GET** /asset/assetById/{id} |
|
||||||
*AssetApi* | [**getAssetSearchTerms**](doc//AssetApi.md#getassetsearchterms) | **GET** /asset/search-terms |
|
*AssetApi* | [**getAssetSearchTerms**](doc//AssetApi.md#getassetsearchterms) | **GET** /asset/search-terms |
|
||||||
*AssetApi* | [**getAssetStats**](doc//AssetApi.md#getassetstats) | **GET** /asset/statistics |
|
*AssetApi* | [**getAssetStatistics**](doc//AssetApi.md#getassetstatistics) | **GET** /asset/statistics |
|
||||||
*AssetApi* | [**getAssetThumbnail**](doc//AssetApi.md#getassetthumbnail) | **GET** /asset/thumbnail/{id} |
|
*AssetApi* | [**getAssetThumbnail**](doc//AssetApi.md#getassetthumbnail) | **GET** /asset/thumbnail/{id} |
|
||||||
*AssetApi* | [**getByTimeBucket**](doc//AssetApi.md#getbytimebucket) | **GET** /asset/time-bucket |
|
|
||||||
*AssetApi* | [**getCuratedLocations**](doc//AssetApi.md#getcuratedlocations) | **GET** /asset/curated-locations |
|
*AssetApi* | [**getCuratedLocations**](doc//AssetApi.md#getcuratedlocations) | **GET** /asset/curated-locations |
|
||||||
*AssetApi* | [**getCuratedObjects**](doc//AssetApi.md#getcuratedobjects) | **GET** /asset/curated-objects |
|
*AssetApi* | [**getCuratedObjects**](doc//AssetApi.md#getcuratedobjects) | **GET** /asset/curated-objects |
|
||||||
*AssetApi* | [**getDownloadInfo**](doc//AssetApi.md#getdownloadinfo) | **POST** /asset/download/info |
|
*AssetApi* | [**getDownloadInfo**](doc//AssetApi.md#getdownloadinfo) | **POST** /asset/download/info |
|
||||||
*AssetApi* | [**getMapMarkers**](doc//AssetApi.md#getmapmarkers) | **GET** /asset/map-marker |
|
*AssetApi* | [**getMapMarkers**](doc//AssetApi.md#getmapmarkers) | **GET** /asset/map-marker |
|
||||||
*AssetApi* | [**getMemoryLane**](doc//AssetApi.md#getmemorylane) | **GET** /asset/memory-lane |
|
*AssetApi* | [**getMemoryLane**](doc//AssetApi.md#getmemorylane) | **GET** /asset/memory-lane |
|
||||||
*AssetApi* | [**getRandom**](doc//AssetApi.md#getrandom) | **GET** /asset/random |
|
*AssetApi* | [**getRandom**](doc//AssetApi.md#getrandom) | **GET** /asset/random |
|
||||||
|
*AssetApi* | [**getTimeBucket**](doc//AssetApi.md#gettimebucket) | **GET** /asset/time-bucket |
|
||||||
*AssetApi* | [**getTimeBuckets**](doc//AssetApi.md#gettimebuckets) | **GET** /asset/time-buckets |
|
*AssetApi* | [**getTimeBuckets**](doc//AssetApi.md#gettimebuckets) | **GET** /asset/time-buckets |
|
||||||
*AssetApi* | [**getUserAssetsByDeviceId**](doc//AssetApi.md#getuserassetsbydeviceid) | **GET** /asset/{deviceId} |
|
*AssetApi* | [**getUserAssetsByDeviceId**](doc//AssetApi.md#getuserassetsbydeviceid) | **GET** /asset/{deviceId} |
|
||||||
*AssetApi* | [**importFile**](doc//AssetApi.md#importfile) | **POST** /asset/import |
|
*AssetApi* | [**importFile**](doc//AssetApi.md#importfile) | **POST** /asset/import |
|
||||||
@ -125,30 +125,30 @@ Class | Method | HTTP request | Description
|
|||||||
*AuditApi* | [**getAuditDeletes**](doc//AuditApi.md#getauditdeletes) | **GET** /audit/deletes |
|
*AuditApi* | [**getAuditDeletes**](doc//AuditApi.md#getauditdeletes) | **GET** /audit/deletes |
|
||||||
*AuditApi* | [**getAuditFiles**](doc//AuditApi.md#getauditfiles) | **GET** /audit/file-report |
|
*AuditApi* | [**getAuditFiles**](doc//AuditApi.md#getauditfiles) | **GET** /audit/file-report |
|
||||||
*AuditApi* | [**getFileChecksums**](doc//AuditApi.md#getfilechecksums) | **POST** /audit/file-report/checksum |
|
*AuditApi* | [**getFileChecksums**](doc//AuditApi.md#getfilechecksums) | **POST** /audit/file-report/checksum |
|
||||||
*AuthenticationApi* | [**adminSignUp**](doc//AuthenticationApi.md#adminsignup) | **POST** /auth/admin-sign-up |
|
|
||||||
*AuthenticationApi* | [**changePassword**](doc//AuthenticationApi.md#changepassword) | **POST** /auth/change-password |
|
*AuthenticationApi* | [**changePassword**](doc//AuthenticationApi.md#changepassword) | **POST** /auth/change-password |
|
||||||
*AuthenticationApi* | [**getAuthDevices**](doc//AuthenticationApi.md#getauthdevices) | **GET** /auth/devices |
|
*AuthenticationApi* | [**getAuthDevices**](doc//AuthenticationApi.md#getauthdevices) | **GET** /auth/devices |
|
||||||
*AuthenticationApi* | [**login**](doc//AuthenticationApi.md#login) | **POST** /auth/login |
|
*AuthenticationApi* | [**login**](doc//AuthenticationApi.md#login) | **POST** /auth/login |
|
||||||
*AuthenticationApi* | [**logout**](doc//AuthenticationApi.md#logout) | **POST** /auth/logout |
|
*AuthenticationApi* | [**logout**](doc//AuthenticationApi.md#logout) | **POST** /auth/logout |
|
||||||
*AuthenticationApi* | [**logoutAuthDevice**](doc//AuthenticationApi.md#logoutauthdevice) | **DELETE** /auth/devices/{id} |
|
*AuthenticationApi* | [**logoutAuthDevice**](doc//AuthenticationApi.md#logoutauthdevice) | **DELETE** /auth/devices/{id} |
|
||||||
*AuthenticationApi* | [**logoutAuthDevices**](doc//AuthenticationApi.md#logoutauthdevices) | **DELETE** /auth/devices |
|
*AuthenticationApi* | [**logoutAuthDevices**](doc//AuthenticationApi.md#logoutauthdevices) | **DELETE** /auth/devices |
|
||||||
|
*AuthenticationApi* | [**signUpAdmin**](doc//AuthenticationApi.md#signupadmin) | **POST** /auth/admin-sign-up |
|
||||||
*AuthenticationApi* | [**validateAccessToken**](doc//AuthenticationApi.md#validateaccesstoken) | **POST** /auth/validateToken |
|
*AuthenticationApi* | [**validateAccessToken**](doc//AuthenticationApi.md#validateaccesstoken) | **POST** /auth/validateToken |
|
||||||
*JobApi* | [**getAllJobsStatus**](doc//JobApi.md#getalljobsstatus) | **GET** /jobs |
|
*JobApi* | [**getAllJobsStatus**](doc//JobApi.md#getalljobsstatus) | **GET** /jobs |
|
||||||
*JobApi* | [**sendJobCommand**](doc//JobApi.md#sendjobcommand) | **PUT** /jobs/{id} |
|
*JobApi* | [**sendJobCommand**](doc//JobApi.md#sendjobcommand) | **PUT** /jobs/{id} |
|
||||||
*LibraryApi* | [**createLibrary**](doc//LibraryApi.md#createlibrary) | **POST** /library |
|
*LibraryApi* | [**createLibrary**](doc//LibraryApi.md#createlibrary) | **POST** /library |
|
||||||
*LibraryApi* | [**deleteLibrary**](doc//LibraryApi.md#deletelibrary) | **DELETE** /library/{id} |
|
*LibraryApi* | [**deleteLibrary**](doc//LibraryApi.md#deletelibrary) | **DELETE** /library/{id} |
|
||||||
*LibraryApi* | [**getAllForUser**](doc//LibraryApi.md#getallforuser) | **GET** /library |
|
*LibraryApi* | [**getLibraries**](doc//LibraryApi.md#getlibraries) | **GET** /library |
|
||||||
*LibraryApi* | [**getLibraryInfo**](doc//LibraryApi.md#getlibraryinfo) | **GET** /library/{id} |
|
*LibraryApi* | [**getLibraryInfo**](doc//LibraryApi.md#getlibraryinfo) | **GET** /library/{id} |
|
||||||
*LibraryApi* | [**getLibraryStatistics**](doc//LibraryApi.md#getlibrarystatistics) | **GET** /library/{id}/statistics |
|
*LibraryApi* | [**getLibraryStatistics**](doc//LibraryApi.md#getlibrarystatistics) | **GET** /library/{id}/statistics |
|
||||||
*LibraryApi* | [**removeOfflineFiles**](doc//LibraryApi.md#removeofflinefiles) | **POST** /library/{id}/removeOffline |
|
*LibraryApi* | [**removeOfflineFiles**](doc//LibraryApi.md#removeofflinefiles) | **POST** /library/{id}/removeOffline |
|
||||||
*LibraryApi* | [**scanLibrary**](doc//LibraryApi.md#scanlibrary) | **POST** /library/{id}/scan |
|
*LibraryApi* | [**scanLibrary**](doc//LibraryApi.md#scanlibrary) | **POST** /library/{id}/scan |
|
||||||
*LibraryApi* | [**updateLibrary**](doc//LibraryApi.md#updatelibrary) | **PUT** /library/{id} |
|
*LibraryApi* | [**updateLibrary**](doc//LibraryApi.md#updatelibrary) | **PUT** /library/{id} |
|
||||||
*OAuthApi* | [**authorizeOAuth**](doc//OAuthApi.md#authorizeoauth) | **POST** /oauth/authorize |
|
*OAuthApi* | [**finishOAuth**](doc//OAuthApi.md#finishoauth) | **POST** /oauth/callback |
|
||||||
*OAuthApi* | [**callback**](doc//OAuthApi.md#callback) | **POST** /oauth/callback |
|
*OAuthApi* | [**generateOAuthConfig**](doc//OAuthApi.md#generateoauthconfig) | **POST** /oauth/config |
|
||||||
*OAuthApi* | [**generateConfig**](doc//OAuthApi.md#generateconfig) | **POST** /oauth/config |
|
*OAuthApi* | [**linkOAuthAccount**](doc//OAuthApi.md#linkoauthaccount) | **POST** /oauth/link |
|
||||||
*OAuthApi* | [**link**](doc//OAuthApi.md#link) | **POST** /oauth/link |
|
*OAuthApi* | [**redirectOAuthToMobile**](doc//OAuthApi.md#redirectoauthtomobile) | **GET** /oauth/mobile-redirect |
|
||||||
*OAuthApi* | [**mobileRedirect**](doc//OAuthApi.md#mobileredirect) | **GET** /oauth/mobile-redirect |
|
*OAuthApi* | [**startOAuth**](doc//OAuthApi.md#startoauth) | **POST** /oauth/authorize |
|
||||||
*OAuthApi* | [**unlink**](doc//OAuthApi.md#unlink) | **POST** /oauth/unlink |
|
*OAuthApi* | [**unlinkOAuthAccount**](doc//OAuthApi.md#unlinkoauthaccount) | **POST** /oauth/unlink |
|
||||||
*PartnerApi* | [**createPartner**](doc//PartnerApi.md#createpartner) | **POST** /partner/{id} |
|
*PartnerApi* | [**createPartner**](doc//PartnerApi.md#createpartner) | **POST** /partner/{id} |
|
||||||
*PartnerApi* | [**getPartners**](doc//PartnerApi.md#getpartners) | **GET** /partner |
|
*PartnerApi* | [**getPartners**](doc//PartnerApi.md#getpartners) | **GET** /partner |
|
||||||
*PartnerApi* | [**removePartner**](doc//PartnerApi.md#removepartner) | **DELETE** /partner/{id} |
|
*PartnerApi* | [**removePartner**](doc//PartnerApi.md#removepartner) | **DELETE** /partner/{id} |
|
||||||
@ -166,8 +166,8 @@ Class | Method | HTTP request | Description
|
|||||||
*ServerInfoApi* | [**getServerConfig**](doc//ServerInfoApi.md#getserverconfig) | **GET** /server-info/config |
|
*ServerInfoApi* | [**getServerConfig**](doc//ServerInfoApi.md#getserverconfig) | **GET** /server-info/config |
|
||||||
*ServerInfoApi* | [**getServerFeatures**](doc//ServerInfoApi.md#getserverfeatures) | **GET** /server-info/features |
|
*ServerInfoApi* | [**getServerFeatures**](doc//ServerInfoApi.md#getserverfeatures) | **GET** /server-info/features |
|
||||||
*ServerInfoApi* | [**getServerInfo**](doc//ServerInfoApi.md#getserverinfo) | **GET** /server-info |
|
*ServerInfoApi* | [**getServerInfo**](doc//ServerInfoApi.md#getserverinfo) | **GET** /server-info |
|
||||||
|
*ServerInfoApi* | [**getServerStatistics**](doc//ServerInfoApi.md#getserverstatistics) | **GET** /server-info/statistics |
|
||||||
*ServerInfoApi* | [**getServerVersion**](doc//ServerInfoApi.md#getserverversion) | **GET** /server-info/version |
|
*ServerInfoApi* | [**getServerVersion**](doc//ServerInfoApi.md#getserverversion) | **GET** /server-info/version |
|
||||||
*ServerInfoApi* | [**getStats**](doc//ServerInfoApi.md#getstats) | **GET** /server-info/stats |
|
|
||||||
*ServerInfoApi* | [**getSupportedMediaTypes**](doc//ServerInfoApi.md#getsupportedmediatypes) | **GET** /server-info/media-types |
|
*ServerInfoApi* | [**getSupportedMediaTypes**](doc//ServerInfoApi.md#getsupportedmediatypes) | **GET** /server-info/media-types |
|
||||||
*ServerInfoApi* | [**getTheme**](doc//ServerInfoApi.md#gettheme) | **GET** /server-info/theme |
|
*ServerInfoApi* | [**getTheme**](doc//ServerInfoApi.md#gettheme) | **GET** /server-info/theme |
|
||||||
*ServerInfoApi* | [**pingServer**](doc//ServerInfoApi.md#pingserver) | **GET** /server-info/ping |
|
*ServerInfoApi* | [**pingServer**](doc//ServerInfoApi.md#pingserver) | **GET** /server-info/ping |
|
||||||
@ -180,7 +180,7 @@ Class | Method | HTTP request | Description
|
|||||||
*SharedLinkApi* | [**removeSharedLinkAssets**](doc//SharedLinkApi.md#removesharedlinkassets) | **DELETE** /shared-link/{id}/assets |
|
*SharedLinkApi* | [**removeSharedLinkAssets**](doc//SharedLinkApi.md#removesharedlinkassets) | **DELETE** /shared-link/{id}/assets |
|
||||||
*SharedLinkApi* | [**updateSharedLink**](doc//SharedLinkApi.md#updatesharedlink) | **PATCH** /shared-link/{id} |
|
*SharedLinkApi* | [**updateSharedLink**](doc//SharedLinkApi.md#updatesharedlink) | **PATCH** /shared-link/{id} |
|
||||||
*SystemConfigApi* | [**getConfig**](doc//SystemConfigApi.md#getconfig) | **GET** /system-config |
|
*SystemConfigApi* | [**getConfig**](doc//SystemConfigApi.md#getconfig) | **GET** /system-config |
|
||||||
*SystemConfigApi* | [**getDefaults**](doc//SystemConfigApi.md#getdefaults) | **GET** /system-config/defaults |
|
*SystemConfigApi* | [**getConfigDefaults**](doc//SystemConfigApi.md#getconfigdefaults) | **GET** /system-config/defaults |
|
||||||
*SystemConfigApi* | [**getStorageTemplateOptions**](doc//SystemConfigApi.md#getstoragetemplateoptions) | **GET** /system-config/storage-template-options |
|
*SystemConfigApi* | [**getStorageTemplateOptions**](doc//SystemConfigApi.md#getstoragetemplateoptions) | **GET** /system-config/storage-template-options |
|
||||||
*SystemConfigApi* | [**updateConfig**](doc//SystemConfigApi.md#updateconfig) | **PUT** /system-config |
|
*SystemConfigApi* | [**updateConfig**](doc//SystemConfigApi.md#updateconfig) | **PUT** /system-config |
|
||||||
*TagApi* | [**createTag**](doc//TagApi.md#createtag) | **POST** /tag |
|
*TagApi* | [**createTag**](doc//TagApi.md#createtag) | **POST** /tag |
|
||||||
|
50
mobile/openapi/doc/APIKeyApi.md
generated
50
mobile/openapi/doc/APIKeyApi.md
generated
@ -9,15 +9,15 @@ All URIs are relative to */api*
|
|||||||
|
|
||||||
Method | HTTP request | Description
|
Method | HTTP request | Description
|
||||||
------------- | ------------- | -------------
|
------------- | ------------- | -------------
|
||||||
[**createKey**](APIKeyApi.md#createkey) | **POST** /api-key |
|
[**createApiKey**](APIKeyApi.md#createapikey) | **POST** /api-key |
|
||||||
[**deleteKey**](APIKeyApi.md#deletekey) | **DELETE** /api-key/{id} |
|
[**deleteApiKey**](APIKeyApi.md#deleteapikey) | **DELETE** /api-key/{id} |
|
||||||
[**getKey**](APIKeyApi.md#getkey) | **GET** /api-key/{id} |
|
[**getApiKey**](APIKeyApi.md#getapikey) | **GET** /api-key/{id} |
|
||||||
[**getKeys**](APIKeyApi.md#getkeys) | **GET** /api-key |
|
[**getApiKeys**](APIKeyApi.md#getapikeys) | **GET** /api-key |
|
||||||
[**updateKey**](APIKeyApi.md#updatekey) | **PUT** /api-key/{id} |
|
[**updateApiKey**](APIKeyApi.md#updateapikey) | **PUT** /api-key/{id} |
|
||||||
|
|
||||||
|
|
||||||
# **createKey**
|
# **createApiKey**
|
||||||
> APIKeyCreateResponseDto createKey(aPIKeyCreateDto)
|
> APIKeyCreateResponseDto createApiKey(aPIKeyCreateDto)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -43,10 +43,10 @@ final api_instance = APIKeyApi();
|
|||||||
final aPIKeyCreateDto = APIKeyCreateDto(); // APIKeyCreateDto |
|
final aPIKeyCreateDto = APIKeyCreateDto(); // APIKeyCreateDto |
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final result = api_instance.createKey(aPIKeyCreateDto);
|
final result = api_instance.createApiKey(aPIKeyCreateDto);
|
||||||
print(result);
|
print(result);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('Exception when calling APIKeyApi->createKey: $e\n');
|
print('Exception when calling APIKeyApi->createApiKey: $e\n');
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -71,8 +71,8 @@ Name | Type | Description | Notes
|
|||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
# **deleteKey**
|
# **deleteApiKey**
|
||||||
> deleteKey(id)
|
> deleteApiKey(id)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -98,9 +98,9 @@ final api_instance = APIKeyApi();
|
|||||||
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
||||||
|
|
||||||
try {
|
try {
|
||||||
api_instance.deleteKey(id);
|
api_instance.deleteApiKey(id);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('Exception when calling APIKeyApi->deleteKey: $e\n');
|
print('Exception when calling APIKeyApi->deleteApiKey: $e\n');
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -125,8 +125,8 @@ void (empty response body)
|
|||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
# **getKey**
|
# **getApiKey**
|
||||||
> APIKeyResponseDto getKey(id)
|
> APIKeyResponseDto getApiKey(id)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -152,10 +152,10 @@ final api_instance = APIKeyApi();
|
|||||||
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final result = api_instance.getKey(id);
|
final result = api_instance.getApiKey(id);
|
||||||
print(result);
|
print(result);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('Exception when calling APIKeyApi->getKey: $e\n');
|
print('Exception when calling APIKeyApi->getApiKey: $e\n');
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -180,8 +180,8 @@ Name | Type | Description | Notes
|
|||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
# **getKeys**
|
# **getApiKeys**
|
||||||
> List<APIKeyResponseDto> getKeys()
|
> List<APIKeyResponseDto> getApiKeys()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -206,10 +206,10 @@ import 'package:openapi/api.dart';
|
|||||||
final api_instance = APIKeyApi();
|
final api_instance = APIKeyApi();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final result = api_instance.getKeys();
|
final result = api_instance.getApiKeys();
|
||||||
print(result);
|
print(result);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('Exception when calling APIKeyApi->getKeys: $e\n');
|
print('Exception when calling APIKeyApi->getApiKeys: $e\n');
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -231,8 +231,8 @@ This endpoint does not need any parameter.
|
|||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
# **updateKey**
|
# **updateApiKey**
|
||||||
> APIKeyResponseDto updateKey(id, aPIKeyUpdateDto)
|
> APIKeyResponseDto updateApiKey(id, aPIKeyUpdateDto)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -259,10 +259,10 @@ final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
|||||||
final aPIKeyUpdateDto = APIKeyUpdateDto(); // APIKeyUpdateDto |
|
final aPIKeyUpdateDto = APIKeyUpdateDto(); // APIKeyUpdateDto |
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final result = api_instance.updateKey(id, aPIKeyUpdateDto);
|
final result = api_instance.updateApiKey(id, aPIKeyUpdateDto);
|
||||||
print(result);
|
print(result);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('Exception when calling APIKeyApi->updateKey: $e\n');
|
print('Exception when calling APIKeyApi->updateApiKey: $e\n');
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
168
mobile/openapi/doc/AssetApi.md
generated
168
mobile/openapi/doc/AssetApi.md
generated
@ -9,7 +9,7 @@ All URIs are relative to */api*
|
|||||||
|
|
||||||
Method | HTTP request | Description
|
Method | HTTP request | Description
|
||||||
------------- | ------------- | -------------
|
------------- | ------------- | -------------
|
||||||
[**bulkUploadCheck**](AssetApi.md#bulkuploadcheck) | **POST** /asset/bulk-upload-check |
|
[**checkBulkUpload**](AssetApi.md#checkbulkupload) | **POST** /asset/bulk-upload-check |
|
||||||
[**checkExistingAssets**](AssetApi.md#checkexistingassets) | **POST** /asset/exist |
|
[**checkExistingAssets**](AssetApi.md#checkexistingassets) | **POST** /asset/exist |
|
||||||
[**deleteAssets**](AssetApi.md#deleteassets) | **DELETE** /asset |
|
[**deleteAssets**](AssetApi.md#deleteassets) | **DELETE** /asset |
|
||||||
[**downloadArchive**](AssetApi.md#downloadarchive) | **POST** /asset/download/archive |
|
[**downloadArchive**](AssetApi.md#downloadarchive) | **POST** /asset/download/archive |
|
||||||
@ -18,15 +18,15 @@ Method | HTTP request | Description
|
|||||||
[**getAllAssets**](AssetApi.md#getallassets) | **GET** /asset |
|
[**getAllAssets**](AssetApi.md#getallassets) | **GET** /asset |
|
||||||
[**getAssetById**](AssetApi.md#getassetbyid) | **GET** /asset/assetById/{id} |
|
[**getAssetById**](AssetApi.md#getassetbyid) | **GET** /asset/assetById/{id} |
|
||||||
[**getAssetSearchTerms**](AssetApi.md#getassetsearchterms) | **GET** /asset/search-terms |
|
[**getAssetSearchTerms**](AssetApi.md#getassetsearchterms) | **GET** /asset/search-terms |
|
||||||
[**getAssetStats**](AssetApi.md#getassetstats) | **GET** /asset/statistics |
|
[**getAssetStatistics**](AssetApi.md#getassetstatistics) | **GET** /asset/statistics |
|
||||||
[**getAssetThumbnail**](AssetApi.md#getassetthumbnail) | **GET** /asset/thumbnail/{id} |
|
[**getAssetThumbnail**](AssetApi.md#getassetthumbnail) | **GET** /asset/thumbnail/{id} |
|
||||||
[**getByTimeBucket**](AssetApi.md#getbytimebucket) | **GET** /asset/time-bucket |
|
|
||||||
[**getCuratedLocations**](AssetApi.md#getcuratedlocations) | **GET** /asset/curated-locations |
|
[**getCuratedLocations**](AssetApi.md#getcuratedlocations) | **GET** /asset/curated-locations |
|
||||||
[**getCuratedObjects**](AssetApi.md#getcuratedobjects) | **GET** /asset/curated-objects |
|
[**getCuratedObjects**](AssetApi.md#getcuratedobjects) | **GET** /asset/curated-objects |
|
||||||
[**getDownloadInfo**](AssetApi.md#getdownloadinfo) | **POST** /asset/download/info |
|
[**getDownloadInfo**](AssetApi.md#getdownloadinfo) | **POST** /asset/download/info |
|
||||||
[**getMapMarkers**](AssetApi.md#getmapmarkers) | **GET** /asset/map-marker |
|
[**getMapMarkers**](AssetApi.md#getmapmarkers) | **GET** /asset/map-marker |
|
||||||
[**getMemoryLane**](AssetApi.md#getmemorylane) | **GET** /asset/memory-lane |
|
[**getMemoryLane**](AssetApi.md#getmemorylane) | **GET** /asset/memory-lane |
|
||||||
[**getRandom**](AssetApi.md#getrandom) | **GET** /asset/random |
|
[**getRandom**](AssetApi.md#getrandom) | **GET** /asset/random |
|
||||||
|
[**getTimeBucket**](AssetApi.md#gettimebucket) | **GET** /asset/time-bucket |
|
||||||
[**getTimeBuckets**](AssetApi.md#gettimebuckets) | **GET** /asset/time-buckets |
|
[**getTimeBuckets**](AssetApi.md#gettimebuckets) | **GET** /asset/time-buckets |
|
||||||
[**getUserAssetsByDeviceId**](AssetApi.md#getuserassetsbydeviceid) | **GET** /asset/{deviceId} |
|
[**getUserAssetsByDeviceId**](AssetApi.md#getuserassetsbydeviceid) | **GET** /asset/{deviceId} |
|
||||||
[**importFile**](AssetApi.md#importfile) | **POST** /asset/import |
|
[**importFile**](AssetApi.md#importfile) | **POST** /asset/import |
|
||||||
@ -41,8 +41,8 @@ Method | HTTP request | Description
|
|||||||
[**uploadFile**](AssetApi.md#uploadfile) | **POST** /asset/upload |
|
[**uploadFile**](AssetApi.md#uploadfile) | **POST** /asset/upload |
|
||||||
|
|
||||||
|
|
||||||
# **bulkUploadCheck**
|
# **checkBulkUpload**
|
||||||
> AssetBulkUploadCheckResponseDto bulkUploadCheck(assetBulkUploadCheckDto)
|
> AssetBulkUploadCheckResponseDto checkBulkUpload(assetBulkUploadCheckDto)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -70,10 +70,10 @@ final api_instance = AssetApi();
|
|||||||
final assetBulkUploadCheckDto = AssetBulkUploadCheckDto(); // AssetBulkUploadCheckDto |
|
final assetBulkUploadCheckDto = AssetBulkUploadCheckDto(); // AssetBulkUploadCheckDto |
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final result = api_instance.bulkUploadCheck(assetBulkUploadCheckDto);
|
final result = api_instance.checkBulkUpload(assetBulkUploadCheckDto);
|
||||||
print(result);
|
print(result);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('Exception when calling AssetApi->bulkUploadCheck: $e\n');
|
print('Exception when calling AssetApi->checkBulkUpload: $e\n');
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -550,8 +550,8 @@ This endpoint does not need any parameter.
|
|||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
# **getAssetStats**
|
# **getAssetStatistics**
|
||||||
> AssetStatsResponseDto getAssetStats(isArchived, isFavorite, isTrashed)
|
> AssetStatsResponseDto getAssetStatistics(isArchived, isFavorite, isTrashed)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -579,10 +579,10 @@ final isFavorite = true; // bool |
|
|||||||
final isTrashed = true; // bool |
|
final isTrashed = true; // bool |
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final result = api_instance.getAssetStats(isArchived, isFavorite, isTrashed);
|
final result = api_instance.getAssetStatistics(isArchived, isFavorite, isTrashed);
|
||||||
print(result);
|
print(result);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('Exception when calling AssetApi->getAssetStats: $e\n');
|
print('Exception when calling AssetApi->getAssetStatistics: $e\n');
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -668,79 +668,6 @@ Name | Type | Description | Notes
|
|||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
# **getByTimeBucket**
|
|
||||||
> List<AssetResponseDto> getByTimeBucket(size, timeBucket, userId, albumId, personId, isArchived, isFavorite, isTrashed, withStacked, key)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Example
|
|
||||||
```dart
|
|
||||||
import 'package:openapi/api.dart';
|
|
||||||
// TODO Configure API key authorization: cookie
|
|
||||||
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
|
|
||||||
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
|
||||||
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
|
|
||||||
// TODO Configure API key authorization: api_key
|
|
||||||
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
|
|
||||||
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
|
||||||
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
|
|
||||||
// TODO Configure HTTP Bearer authorization: bearer
|
|
||||||
// Case 1. Use String Token
|
|
||||||
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
|
|
||||||
// Case 2. Use Function which generate token.
|
|
||||||
// String yourTokenGeneratorFunction() { ... }
|
|
||||||
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
|
|
||||||
|
|
||||||
final api_instance = AssetApi();
|
|
||||||
final size = ; // TimeBucketSize |
|
|
||||||
final timeBucket = timeBucket_example; // String |
|
|
||||||
final userId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
|
||||||
final albumId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
|
||||||
final personId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
|
||||||
final isArchived = true; // bool |
|
|
||||||
final isFavorite = true; // bool |
|
|
||||||
final isTrashed = true; // bool |
|
|
||||||
final withStacked = true; // bool |
|
|
||||||
final key = key_example; // String |
|
|
||||||
|
|
||||||
try {
|
|
||||||
final result = api_instance.getByTimeBucket(size, timeBucket, userId, albumId, personId, isArchived, isFavorite, isTrashed, withStacked, key);
|
|
||||||
print(result);
|
|
||||||
} catch (e) {
|
|
||||||
print('Exception when calling AssetApi->getByTimeBucket: $e\n');
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**size** | [**TimeBucketSize**](.md)| |
|
|
||||||
**timeBucket** | **String**| |
|
|
||||||
**userId** | **String**| | [optional]
|
|
||||||
**albumId** | **String**| | [optional]
|
|
||||||
**personId** | **String**| | [optional]
|
|
||||||
**isArchived** | **bool**| | [optional]
|
|
||||||
**isFavorite** | **bool**| | [optional]
|
|
||||||
**isTrashed** | **bool**| | [optional]
|
|
||||||
**withStacked** | **bool**| | [optional]
|
|
||||||
**key** | **String**| | [optional]
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**List<AssetResponseDto>**](AssetResponseDto.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
[cookie](../README.md#cookie), [api_key](../README.md#api_key), [bearer](../README.md#bearer)
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
|
||||||
- **Accept**: application/json
|
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
# **getCuratedLocations**
|
# **getCuratedLocations**
|
||||||
> List<CuratedLocationsResponseDto> getCuratedLocations()
|
> List<CuratedLocationsResponseDto> getCuratedLocations()
|
||||||
|
|
||||||
@ -1073,6 +1000,79 @@ Name | Type | Description | Notes
|
|||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
# **getTimeBucket**
|
||||||
|
> List<AssetResponseDto> getTimeBucket(size, timeBucket, userId, albumId, personId, isArchived, isFavorite, isTrashed, withStacked, key)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```dart
|
||||||
|
import 'package:openapi/api.dart';
|
||||||
|
// TODO Configure API key authorization: cookie
|
||||||
|
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
|
||||||
|
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||||
|
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
|
||||||
|
// TODO Configure API key authorization: api_key
|
||||||
|
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
|
||||||
|
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||||
|
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
|
||||||
|
// TODO Configure HTTP Bearer authorization: bearer
|
||||||
|
// Case 1. Use String Token
|
||||||
|
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
|
||||||
|
// Case 2. Use Function which generate token.
|
||||||
|
// String yourTokenGeneratorFunction() { ... }
|
||||||
|
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
|
||||||
|
|
||||||
|
final api_instance = AssetApi();
|
||||||
|
final size = ; // TimeBucketSize |
|
||||||
|
final timeBucket = timeBucket_example; // String |
|
||||||
|
final userId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
||||||
|
final albumId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
||||||
|
final personId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
||||||
|
final isArchived = true; // bool |
|
||||||
|
final isFavorite = true; // bool |
|
||||||
|
final isTrashed = true; // bool |
|
||||||
|
final withStacked = true; // bool |
|
||||||
|
final key = key_example; // String |
|
||||||
|
|
||||||
|
try {
|
||||||
|
final result = api_instance.getTimeBucket(size, timeBucket, userId, albumId, personId, isArchived, isFavorite, isTrashed, withStacked, key);
|
||||||
|
print(result);
|
||||||
|
} catch (e) {
|
||||||
|
print('Exception when calling AssetApi->getTimeBucket: $e\n');
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**size** | [**TimeBucketSize**](.md)| |
|
||||||
|
**timeBucket** | **String**| |
|
||||||
|
**userId** | **String**| | [optional]
|
||||||
|
**albumId** | **String**| | [optional]
|
||||||
|
**personId** | **String**| | [optional]
|
||||||
|
**isArchived** | **bool**| | [optional]
|
||||||
|
**isFavorite** | **bool**| | [optional]
|
||||||
|
**isTrashed** | **bool**| | [optional]
|
||||||
|
**withStacked** | **bool**| | [optional]
|
||||||
|
**key** | **String**| | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**List<AssetResponseDto>**](AssetResponseDto.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
[cookie](../README.md#cookie), [api_key](../README.md#api_key), [bearer](../README.md#bearer)
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
# **getTimeBuckets**
|
# **getTimeBuckets**
|
||||||
> List<TimeBucketResponseDto> getTimeBuckets(size, userId, albumId, personId, isArchived, isFavorite, isTrashed, withStacked, key)
|
> List<TimeBucketResponseDto> getTimeBuckets(size, userId, albumId, personId, isArchived, isFavorite, isTrashed, withStacked, key)
|
||||||
|
|
||||||
|
84
mobile/openapi/doc/AuthenticationApi.md
generated
84
mobile/openapi/doc/AuthenticationApi.md
generated
@ -9,57 +9,16 @@ All URIs are relative to */api*
|
|||||||
|
|
||||||
Method | HTTP request | Description
|
Method | HTTP request | Description
|
||||||
------------- | ------------- | -------------
|
------------- | ------------- | -------------
|
||||||
[**adminSignUp**](AuthenticationApi.md#adminsignup) | **POST** /auth/admin-sign-up |
|
|
||||||
[**changePassword**](AuthenticationApi.md#changepassword) | **POST** /auth/change-password |
|
[**changePassword**](AuthenticationApi.md#changepassword) | **POST** /auth/change-password |
|
||||||
[**getAuthDevices**](AuthenticationApi.md#getauthdevices) | **GET** /auth/devices |
|
[**getAuthDevices**](AuthenticationApi.md#getauthdevices) | **GET** /auth/devices |
|
||||||
[**login**](AuthenticationApi.md#login) | **POST** /auth/login |
|
[**login**](AuthenticationApi.md#login) | **POST** /auth/login |
|
||||||
[**logout**](AuthenticationApi.md#logout) | **POST** /auth/logout |
|
[**logout**](AuthenticationApi.md#logout) | **POST** /auth/logout |
|
||||||
[**logoutAuthDevice**](AuthenticationApi.md#logoutauthdevice) | **DELETE** /auth/devices/{id} |
|
[**logoutAuthDevice**](AuthenticationApi.md#logoutauthdevice) | **DELETE** /auth/devices/{id} |
|
||||||
[**logoutAuthDevices**](AuthenticationApi.md#logoutauthdevices) | **DELETE** /auth/devices |
|
[**logoutAuthDevices**](AuthenticationApi.md#logoutauthdevices) | **DELETE** /auth/devices |
|
||||||
|
[**signUpAdmin**](AuthenticationApi.md#signupadmin) | **POST** /auth/admin-sign-up |
|
||||||
[**validateAccessToken**](AuthenticationApi.md#validateaccesstoken) | **POST** /auth/validateToken |
|
[**validateAccessToken**](AuthenticationApi.md#validateaccesstoken) | **POST** /auth/validateToken |
|
||||||
|
|
||||||
|
|
||||||
# **adminSignUp**
|
|
||||||
> AdminSignupResponseDto adminSignUp(signUpDto)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Example
|
|
||||||
```dart
|
|
||||||
import 'package:openapi/api.dart';
|
|
||||||
|
|
||||||
final api_instance = AuthenticationApi();
|
|
||||||
final signUpDto = SignUpDto(); // SignUpDto |
|
|
||||||
|
|
||||||
try {
|
|
||||||
final result = api_instance.adminSignUp(signUpDto);
|
|
||||||
print(result);
|
|
||||||
} catch (e) {
|
|
||||||
print('Exception when calling AuthenticationApi->adminSignUp: $e\n');
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**signUpDto** | [**SignUpDto**](SignUpDto.md)| |
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**AdminSignupResponseDto**](AdminSignupResponseDto.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
|
||||||
- **Accept**: application/json
|
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
# **changePassword**
|
# **changePassword**
|
||||||
> UserResponseDto changePassword(changePasswordDto)
|
> UserResponseDto changePassword(changePasswordDto)
|
||||||
|
|
||||||
@ -362,6 +321,47 @@ void (empty response body)
|
|||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
# **signUpAdmin**
|
||||||
|
> AdminSignupResponseDto signUpAdmin(signUpDto)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```dart
|
||||||
|
import 'package:openapi/api.dart';
|
||||||
|
|
||||||
|
final api_instance = AuthenticationApi();
|
||||||
|
final signUpDto = SignUpDto(); // SignUpDto |
|
||||||
|
|
||||||
|
try {
|
||||||
|
final result = api_instance.signUpAdmin(signUpDto);
|
||||||
|
print(result);
|
||||||
|
} catch (e) {
|
||||||
|
print('Exception when calling AuthenticationApi->signUpAdmin: $e\n');
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**signUpDto** | [**SignUpDto**](SignUpDto.md)| |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**AdminSignupResponseDto**](AdminSignupResponseDto.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
# **validateAccessToken**
|
# **validateAccessToken**
|
||||||
> ValidateAccessTokenResponseDto validateAccessToken()
|
> ValidateAccessTokenResponseDto validateAccessToken()
|
||||||
|
|
||||||
|
10
mobile/openapi/doc/LibraryApi.md
generated
10
mobile/openapi/doc/LibraryApi.md
generated
@ -11,7 +11,7 @@ Method | HTTP request | Description
|
|||||||
------------- | ------------- | -------------
|
------------- | ------------- | -------------
|
||||||
[**createLibrary**](LibraryApi.md#createlibrary) | **POST** /library |
|
[**createLibrary**](LibraryApi.md#createlibrary) | **POST** /library |
|
||||||
[**deleteLibrary**](LibraryApi.md#deletelibrary) | **DELETE** /library/{id} |
|
[**deleteLibrary**](LibraryApi.md#deletelibrary) | **DELETE** /library/{id} |
|
||||||
[**getAllForUser**](LibraryApi.md#getallforuser) | **GET** /library |
|
[**getLibraries**](LibraryApi.md#getlibraries) | **GET** /library |
|
||||||
[**getLibraryInfo**](LibraryApi.md#getlibraryinfo) | **GET** /library/{id} |
|
[**getLibraryInfo**](LibraryApi.md#getlibraryinfo) | **GET** /library/{id} |
|
||||||
[**getLibraryStatistics**](LibraryApi.md#getlibrarystatistics) | **GET** /library/{id}/statistics |
|
[**getLibraryStatistics**](LibraryApi.md#getlibrarystatistics) | **GET** /library/{id}/statistics |
|
||||||
[**removeOfflineFiles**](LibraryApi.md#removeofflinefiles) | **POST** /library/{id}/removeOffline |
|
[**removeOfflineFiles**](LibraryApi.md#removeofflinefiles) | **POST** /library/{id}/removeOffline |
|
||||||
@ -128,8 +128,8 @@ void (empty response body)
|
|||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
# **getAllForUser**
|
# **getLibraries**
|
||||||
> List<LibraryResponseDto> getAllForUser()
|
> List<LibraryResponseDto> getLibraries()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -154,10 +154,10 @@ import 'package:openapi/api.dart';
|
|||||||
final api_instance = LibraryApi();
|
final api_instance = LibraryApi();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final result = api_instance.getAllForUser();
|
final result = api_instance.getLibraries();
|
||||||
print(result);
|
print(result);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('Exception when calling LibraryApi->getAllForUser: $e\n');
|
print('Exception when calling LibraryApi->getLibraries: $e\n');
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
134
mobile/openapi/doc/OAuthApi.md
generated
134
mobile/openapi/doc/OAuthApi.md
generated
@ -9,57 +9,16 @@ All URIs are relative to */api*
|
|||||||
|
|
||||||
Method | HTTP request | Description
|
Method | HTTP request | Description
|
||||||
------------- | ------------- | -------------
|
------------- | ------------- | -------------
|
||||||
[**authorizeOAuth**](OAuthApi.md#authorizeoauth) | **POST** /oauth/authorize |
|
[**finishOAuth**](OAuthApi.md#finishoauth) | **POST** /oauth/callback |
|
||||||
[**callback**](OAuthApi.md#callback) | **POST** /oauth/callback |
|
[**generateOAuthConfig**](OAuthApi.md#generateoauthconfig) | **POST** /oauth/config |
|
||||||
[**generateConfig**](OAuthApi.md#generateconfig) | **POST** /oauth/config |
|
[**linkOAuthAccount**](OAuthApi.md#linkoauthaccount) | **POST** /oauth/link |
|
||||||
[**link**](OAuthApi.md#link) | **POST** /oauth/link |
|
[**redirectOAuthToMobile**](OAuthApi.md#redirectoauthtomobile) | **GET** /oauth/mobile-redirect |
|
||||||
[**mobileRedirect**](OAuthApi.md#mobileredirect) | **GET** /oauth/mobile-redirect |
|
[**startOAuth**](OAuthApi.md#startoauth) | **POST** /oauth/authorize |
|
||||||
[**unlink**](OAuthApi.md#unlink) | **POST** /oauth/unlink |
|
[**unlinkOAuthAccount**](OAuthApi.md#unlinkoauthaccount) | **POST** /oauth/unlink |
|
||||||
|
|
||||||
|
|
||||||
# **authorizeOAuth**
|
# **finishOAuth**
|
||||||
> OAuthAuthorizeResponseDto authorizeOAuth(oAuthConfigDto)
|
> LoginResponseDto finishOAuth(oAuthCallbackDto)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Example
|
|
||||||
```dart
|
|
||||||
import 'package:openapi/api.dart';
|
|
||||||
|
|
||||||
final api_instance = OAuthApi();
|
|
||||||
final oAuthConfigDto = OAuthConfigDto(); // OAuthConfigDto |
|
|
||||||
|
|
||||||
try {
|
|
||||||
final result = api_instance.authorizeOAuth(oAuthConfigDto);
|
|
||||||
print(result);
|
|
||||||
} catch (e) {
|
|
||||||
print('Exception when calling OAuthApi->authorizeOAuth: $e\n');
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**oAuthConfigDto** | [**OAuthConfigDto**](OAuthConfigDto.md)| |
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**OAuthAuthorizeResponseDto**](OAuthAuthorizeResponseDto.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
|
||||||
- **Accept**: application/json
|
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
# **callback**
|
|
||||||
> LoginResponseDto callback(oAuthCallbackDto)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -71,10 +30,10 @@ final api_instance = OAuthApi();
|
|||||||
final oAuthCallbackDto = OAuthCallbackDto(); // OAuthCallbackDto |
|
final oAuthCallbackDto = OAuthCallbackDto(); // OAuthCallbackDto |
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final result = api_instance.callback(oAuthCallbackDto);
|
final result = api_instance.finishOAuth(oAuthCallbackDto);
|
||||||
print(result);
|
print(result);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('Exception when calling OAuthApi->callback: $e\n');
|
print('Exception when calling OAuthApi->finishOAuth: $e\n');
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -99,8 +58,8 @@ No authorization required
|
|||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
# **generateConfig**
|
# **generateOAuthConfig**
|
||||||
> OAuthConfigResponseDto generateConfig(oAuthConfigDto)
|
> OAuthConfigResponseDto generateOAuthConfig(oAuthConfigDto)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -114,10 +73,10 @@ final api_instance = OAuthApi();
|
|||||||
final oAuthConfigDto = OAuthConfigDto(); // OAuthConfigDto |
|
final oAuthConfigDto = OAuthConfigDto(); // OAuthConfigDto |
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final result = api_instance.generateConfig(oAuthConfigDto);
|
final result = api_instance.generateOAuthConfig(oAuthConfigDto);
|
||||||
print(result);
|
print(result);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('Exception when calling OAuthApi->generateConfig: $e\n');
|
print('Exception when calling OAuthApi->generateOAuthConfig: $e\n');
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -142,8 +101,8 @@ No authorization required
|
|||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
# **link**
|
# **linkOAuthAccount**
|
||||||
> UserResponseDto link(oAuthCallbackDto)
|
> UserResponseDto linkOAuthAccount(oAuthCallbackDto)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -169,10 +128,10 @@ final api_instance = OAuthApi();
|
|||||||
final oAuthCallbackDto = OAuthCallbackDto(); // OAuthCallbackDto |
|
final oAuthCallbackDto = OAuthCallbackDto(); // OAuthCallbackDto |
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final result = api_instance.link(oAuthCallbackDto);
|
final result = api_instance.linkOAuthAccount(oAuthCallbackDto);
|
||||||
print(result);
|
print(result);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('Exception when calling OAuthApi->link: $e\n');
|
print('Exception when calling OAuthApi->linkOAuthAccount: $e\n');
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -197,8 +156,8 @@ Name | Type | Description | Notes
|
|||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
# **mobileRedirect**
|
# **redirectOAuthToMobile**
|
||||||
> mobileRedirect()
|
> redirectOAuthToMobile()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -209,9 +168,9 @@ import 'package:openapi/api.dart';
|
|||||||
final api_instance = OAuthApi();
|
final api_instance = OAuthApi();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
api_instance.mobileRedirect();
|
api_instance.redirectOAuthToMobile();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('Exception when calling OAuthApi->mobileRedirect: $e\n');
|
print('Exception when calling OAuthApi->redirectOAuthToMobile: $e\n');
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -233,8 +192,49 @@ No authorization required
|
|||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
# **unlink**
|
# **startOAuth**
|
||||||
> UserResponseDto unlink()
|
> OAuthAuthorizeResponseDto startOAuth(oAuthConfigDto)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```dart
|
||||||
|
import 'package:openapi/api.dart';
|
||||||
|
|
||||||
|
final api_instance = OAuthApi();
|
||||||
|
final oAuthConfigDto = OAuthConfigDto(); // OAuthConfigDto |
|
||||||
|
|
||||||
|
try {
|
||||||
|
final result = api_instance.startOAuth(oAuthConfigDto);
|
||||||
|
print(result);
|
||||||
|
} catch (e) {
|
||||||
|
print('Exception when calling OAuthApi->startOAuth: $e\n');
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**oAuthConfigDto** | [**OAuthConfigDto**](OAuthConfigDto.md)| |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**OAuthAuthorizeResponseDto**](OAuthAuthorizeResponseDto.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
# **unlinkOAuthAccount**
|
||||||
|
> UserResponseDto unlinkOAuthAccount()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -259,10 +259,10 @@ import 'package:openapi/api.dart';
|
|||||||
final api_instance = OAuthApi();
|
final api_instance = OAuthApi();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final result = api_instance.unlink();
|
final result = api_instance.unlinkOAuthAccount();
|
||||||
print(result);
|
print(result);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('Exception when calling OAuthApi->unlink: $e\n');
|
print('Exception when calling OAuthApi->unlinkOAuthAccount: $e\n');
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
104
mobile/openapi/doc/ServerInfoApi.md
generated
104
mobile/openapi/doc/ServerInfoApi.md
generated
@ -12,8 +12,8 @@ Method | HTTP request | Description
|
|||||||
[**getServerConfig**](ServerInfoApi.md#getserverconfig) | **GET** /server-info/config |
|
[**getServerConfig**](ServerInfoApi.md#getserverconfig) | **GET** /server-info/config |
|
||||||
[**getServerFeatures**](ServerInfoApi.md#getserverfeatures) | **GET** /server-info/features |
|
[**getServerFeatures**](ServerInfoApi.md#getserverfeatures) | **GET** /server-info/features |
|
||||||
[**getServerInfo**](ServerInfoApi.md#getserverinfo) | **GET** /server-info |
|
[**getServerInfo**](ServerInfoApi.md#getserverinfo) | **GET** /server-info |
|
||||||
|
[**getServerStatistics**](ServerInfoApi.md#getserverstatistics) | **GET** /server-info/statistics |
|
||||||
[**getServerVersion**](ServerInfoApi.md#getserverversion) | **GET** /server-info/version |
|
[**getServerVersion**](ServerInfoApi.md#getserverversion) | **GET** /server-info/version |
|
||||||
[**getStats**](ServerInfoApi.md#getstats) | **GET** /server-info/stats |
|
|
||||||
[**getSupportedMediaTypes**](ServerInfoApi.md#getsupportedmediatypes) | **GET** /server-info/media-types |
|
[**getSupportedMediaTypes**](ServerInfoApi.md#getsupportedmediatypes) | **GET** /server-info/media-types |
|
||||||
[**getTheme**](ServerInfoApi.md#gettheme) | **GET** /server-info/theme |
|
[**getTheme**](ServerInfoApi.md#gettheme) | **GET** /server-info/theme |
|
||||||
[**pingServer**](ServerInfoApi.md#pingserver) | **GET** /server-info/ping |
|
[**pingServer**](ServerInfoApi.md#pingserver) | **GET** /server-info/ping |
|
||||||
@ -144,6 +144,57 @@ This endpoint does not need any parameter.
|
|||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
# **getServerStatistics**
|
||||||
|
> ServerStatsResponseDto getServerStatistics()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```dart
|
||||||
|
import 'package:openapi/api.dart';
|
||||||
|
// TODO Configure API key authorization: cookie
|
||||||
|
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
|
||||||
|
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||||
|
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
|
||||||
|
// TODO Configure API key authorization: api_key
|
||||||
|
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
|
||||||
|
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||||
|
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
|
||||||
|
// TODO Configure HTTP Bearer authorization: bearer
|
||||||
|
// Case 1. Use String Token
|
||||||
|
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
|
||||||
|
// Case 2. Use Function which generate token.
|
||||||
|
// String yourTokenGeneratorFunction() { ... }
|
||||||
|
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
|
||||||
|
|
||||||
|
final api_instance = ServerInfoApi();
|
||||||
|
|
||||||
|
try {
|
||||||
|
final result = api_instance.getServerStatistics();
|
||||||
|
print(result);
|
||||||
|
} catch (e) {
|
||||||
|
print('Exception when calling ServerInfoApi->getServerStatistics: $e\n');
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
This endpoint does not need any parameter.
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**ServerStatsResponseDto**](ServerStatsResponseDto.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
[cookie](../README.md#cookie), [api_key](../README.md#api_key), [bearer](../README.md#bearer)
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
# **getServerVersion**
|
# **getServerVersion**
|
||||||
> ServerVersionResponseDto getServerVersion()
|
> ServerVersionResponseDto getServerVersion()
|
||||||
|
|
||||||
@ -181,57 +232,6 @@ No authorization required
|
|||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
# **getStats**
|
|
||||||
> ServerStatsResponseDto getStats()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Example
|
|
||||||
```dart
|
|
||||||
import 'package:openapi/api.dart';
|
|
||||||
// TODO Configure API key authorization: cookie
|
|
||||||
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
|
|
||||||
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
|
||||||
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
|
|
||||||
// TODO Configure API key authorization: api_key
|
|
||||||
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
|
|
||||||
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
|
||||||
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
|
|
||||||
// TODO Configure HTTP Bearer authorization: bearer
|
|
||||||
// Case 1. Use String Token
|
|
||||||
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
|
|
||||||
// Case 2. Use Function which generate token.
|
|
||||||
// String yourTokenGeneratorFunction() { ... }
|
|
||||||
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
|
|
||||||
|
|
||||||
final api_instance = ServerInfoApi();
|
|
||||||
|
|
||||||
try {
|
|
||||||
final result = api_instance.getStats();
|
|
||||||
print(result);
|
|
||||||
} catch (e) {
|
|
||||||
print('Exception when calling ServerInfoApi->getStats: $e\n');
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
This endpoint does not need any parameter.
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**ServerStatsResponseDto**](ServerStatsResponseDto.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
[cookie](../README.md#cookie), [api_key](../README.md#api_key), [bearer](../README.md#bearer)
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
|
||||||
- **Accept**: application/json
|
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
# **getSupportedMediaTypes**
|
# **getSupportedMediaTypes**
|
||||||
> ServerMediaTypesResponseDto getSupportedMediaTypes()
|
> ServerMediaTypesResponseDto getSupportedMediaTypes()
|
||||||
|
|
||||||
|
10
mobile/openapi/doc/SystemConfigApi.md
generated
10
mobile/openapi/doc/SystemConfigApi.md
generated
@ -10,7 +10,7 @@ All URIs are relative to */api*
|
|||||||
Method | HTTP request | Description
|
Method | HTTP request | Description
|
||||||
------------- | ------------- | -------------
|
------------- | ------------- | -------------
|
||||||
[**getConfig**](SystemConfigApi.md#getconfig) | **GET** /system-config |
|
[**getConfig**](SystemConfigApi.md#getconfig) | **GET** /system-config |
|
||||||
[**getDefaults**](SystemConfigApi.md#getdefaults) | **GET** /system-config/defaults |
|
[**getConfigDefaults**](SystemConfigApi.md#getconfigdefaults) | **GET** /system-config/defaults |
|
||||||
[**getStorageTemplateOptions**](SystemConfigApi.md#getstoragetemplateoptions) | **GET** /system-config/storage-template-options |
|
[**getStorageTemplateOptions**](SystemConfigApi.md#getstoragetemplateoptions) | **GET** /system-config/storage-template-options |
|
||||||
[**updateConfig**](SystemConfigApi.md#updateconfig) | **PUT** /system-config |
|
[**updateConfig**](SystemConfigApi.md#updateconfig) | **PUT** /system-config |
|
||||||
|
|
||||||
@ -66,8 +66,8 @@ This endpoint does not need any parameter.
|
|||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
# **getDefaults**
|
# **getConfigDefaults**
|
||||||
> SystemConfigDto getDefaults()
|
> SystemConfigDto getConfigDefaults()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -92,10 +92,10 @@ import 'package:openapi/api.dart';
|
|||||||
final api_instance = SystemConfigApi();
|
final api_instance = SystemConfigApi();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final result = api_instance.getDefaults();
|
final result = api_instance.getConfigDefaults();
|
||||||
print(result);
|
print(result);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('Exception when calling SystemConfigApi->getDefaults: $e\n');
|
print('Exception when calling SystemConfigApi->getConfigDefaults: $e\n');
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
30
mobile/openapi/lib/api/api_key_api.dart
generated
30
mobile/openapi/lib/api/api_key_api.dart
generated
@ -20,7 +20,7 @@ class APIKeyApi {
|
|||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
/// * [APIKeyCreateDto] aPIKeyCreateDto (required):
|
/// * [APIKeyCreateDto] aPIKeyCreateDto (required):
|
||||||
Future<Response> createKeyWithHttpInfo(APIKeyCreateDto aPIKeyCreateDto,) async {
|
Future<Response> createApiKeyWithHttpInfo(APIKeyCreateDto aPIKeyCreateDto,) async {
|
||||||
// ignore: prefer_const_declarations
|
// ignore: prefer_const_declarations
|
||||||
final path = r'/api-key';
|
final path = r'/api-key';
|
||||||
|
|
||||||
@ -48,8 +48,8 @@ class APIKeyApi {
|
|||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
/// * [APIKeyCreateDto] aPIKeyCreateDto (required):
|
/// * [APIKeyCreateDto] aPIKeyCreateDto (required):
|
||||||
Future<APIKeyCreateResponseDto?> createKey(APIKeyCreateDto aPIKeyCreateDto,) async {
|
Future<APIKeyCreateResponseDto?> createApiKey(APIKeyCreateDto aPIKeyCreateDto,) async {
|
||||||
final response = await createKeyWithHttpInfo(aPIKeyCreateDto,);
|
final response = await createApiKeyWithHttpInfo(aPIKeyCreateDto,);
|
||||||
if (response.statusCode >= HttpStatus.badRequest) {
|
if (response.statusCode >= HttpStatus.badRequest) {
|
||||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||||
}
|
}
|
||||||
@ -67,7 +67,7 @@ class APIKeyApi {
|
|||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
/// * [String] id (required):
|
/// * [String] id (required):
|
||||||
Future<Response> deleteKeyWithHttpInfo(String id,) async {
|
Future<Response> deleteApiKeyWithHttpInfo(String id,) async {
|
||||||
// ignore: prefer_const_declarations
|
// ignore: prefer_const_declarations
|
||||||
final path = r'/api-key/{id}'
|
final path = r'/api-key/{id}'
|
||||||
.replaceAll('{id}', id);
|
.replaceAll('{id}', id);
|
||||||
@ -96,8 +96,8 @@ class APIKeyApi {
|
|||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
/// * [String] id (required):
|
/// * [String] id (required):
|
||||||
Future<void> deleteKey(String id,) async {
|
Future<void> deleteApiKey(String id,) async {
|
||||||
final response = await deleteKeyWithHttpInfo(id,);
|
final response = await deleteApiKeyWithHttpInfo(id,);
|
||||||
if (response.statusCode >= HttpStatus.badRequest) {
|
if (response.statusCode >= HttpStatus.badRequest) {
|
||||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||||
}
|
}
|
||||||
@ -107,7 +107,7 @@ class APIKeyApi {
|
|||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
/// * [String] id (required):
|
/// * [String] id (required):
|
||||||
Future<Response> getKeyWithHttpInfo(String id,) async {
|
Future<Response> getApiKeyWithHttpInfo(String id,) async {
|
||||||
// ignore: prefer_const_declarations
|
// ignore: prefer_const_declarations
|
||||||
final path = r'/api-key/{id}'
|
final path = r'/api-key/{id}'
|
||||||
.replaceAll('{id}', id);
|
.replaceAll('{id}', id);
|
||||||
@ -136,8 +136,8 @@ class APIKeyApi {
|
|||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
/// * [String] id (required):
|
/// * [String] id (required):
|
||||||
Future<APIKeyResponseDto?> getKey(String id,) async {
|
Future<APIKeyResponseDto?> getApiKey(String id,) async {
|
||||||
final response = await getKeyWithHttpInfo(id,);
|
final response = await getApiKeyWithHttpInfo(id,);
|
||||||
if (response.statusCode >= HttpStatus.badRequest) {
|
if (response.statusCode >= HttpStatus.badRequest) {
|
||||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||||
}
|
}
|
||||||
@ -152,7 +152,7 @@ class APIKeyApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Performs an HTTP 'GET /api-key' operation and returns the [Response].
|
/// Performs an HTTP 'GET /api-key' operation and returns the [Response].
|
||||||
Future<Response> getKeysWithHttpInfo() async {
|
Future<Response> getApiKeysWithHttpInfo() async {
|
||||||
// ignore: prefer_const_declarations
|
// ignore: prefer_const_declarations
|
||||||
final path = r'/api-key';
|
final path = r'/api-key';
|
||||||
|
|
||||||
@ -177,8 +177,8 @@ class APIKeyApi {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<List<APIKeyResponseDto>?> getKeys() async {
|
Future<List<APIKeyResponseDto>?> getApiKeys() async {
|
||||||
final response = await getKeysWithHttpInfo();
|
final response = await getApiKeysWithHttpInfo();
|
||||||
if (response.statusCode >= HttpStatus.badRequest) {
|
if (response.statusCode >= HttpStatus.badRequest) {
|
||||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||||
}
|
}
|
||||||
@ -201,7 +201,7 @@ class APIKeyApi {
|
|||||||
/// * [String] id (required):
|
/// * [String] id (required):
|
||||||
///
|
///
|
||||||
/// * [APIKeyUpdateDto] aPIKeyUpdateDto (required):
|
/// * [APIKeyUpdateDto] aPIKeyUpdateDto (required):
|
||||||
Future<Response> updateKeyWithHttpInfo(String id, APIKeyUpdateDto aPIKeyUpdateDto,) async {
|
Future<Response> updateApiKeyWithHttpInfo(String id, APIKeyUpdateDto aPIKeyUpdateDto,) async {
|
||||||
// ignore: prefer_const_declarations
|
// ignore: prefer_const_declarations
|
||||||
final path = r'/api-key/{id}'
|
final path = r'/api-key/{id}'
|
||||||
.replaceAll('{id}', id);
|
.replaceAll('{id}', id);
|
||||||
@ -232,8 +232,8 @@ class APIKeyApi {
|
|||||||
/// * [String] id (required):
|
/// * [String] id (required):
|
||||||
///
|
///
|
||||||
/// * [APIKeyUpdateDto] aPIKeyUpdateDto (required):
|
/// * [APIKeyUpdateDto] aPIKeyUpdateDto (required):
|
||||||
Future<APIKeyResponseDto?> updateKey(String id, APIKeyUpdateDto aPIKeyUpdateDto,) async {
|
Future<APIKeyResponseDto?> updateApiKey(String id, APIKeyUpdateDto aPIKeyUpdateDto,) async {
|
||||||
final response = await updateKeyWithHttpInfo(id, aPIKeyUpdateDto,);
|
final response = await updateApiKeyWithHttpInfo(id, aPIKeyUpdateDto,);
|
||||||
if (response.statusCode >= HttpStatus.badRequest) {
|
if (response.statusCode >= HttpStatus.badRequest) {
|
||||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||||
}
|
}
|
||||||
|
238
mobile/openapi/lib/api/asset_api.dart
generated
238
mobile/openapi/lib/api/asset_api.dart
generated
@ -23,7 +23,7 @@ class AssetApi {
|
|||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
/// * [AssetBulkUploadCheckDto] assetBulkUploadCheckDto (required):
|
/// * [AssetBulkUploadCheckDto] assetBulkUploadCheckDto (required):
|
||||||
Future<Response> bulkUploadCheckWithHttpInfo(AssetBulkUploadCheckDto assetBulkUploadCheckDto,) async {
|
Future<Response> checkBulkUploadWithHttpInfo(AssetBulkUploadCheckDto assetBulkUploadCheckDto,) async {
|
||||||
// ignore: prefer_const_declarations
|
// ignore: prefer_const_declarations
|
||||||
final path = r'/asset/bulk-upload-check';
|
final path = r'/asset/bulk-upload-check';
|
||||||
|
|
||||||
@ -53,8 +53,8 @@ class AssetApi {
|
|||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
/// * [AssetBulkUploadCheckDto] assetBulkUploadCheckDto (required):
|
/// * [AssetBulkUploadCheckDto] assetBulkUploadCheckDto (required):
|
||||||
Future<AssetBulkUploadCheckResponseDto?> bulkUploadCheck(AssetBulkUploadCheckDto assetBulkUploadCheckDto,) async {
|
Future<AssetBulkUploadCheckResponseDto?> checkBulkUpload(AssetBulkUploadCheckDto assetBulkUploadCheckDto,) async {
|
||||||
final response = await bulkUploadCheckWithHttpInfo(assetBulkUploadCheckDto,);
|
final response = await checkBulkUploadWithHttpInfo(assetBulkUploadCheckDto,);
|
||||||
if (response.statusCode >= HttpStatus.badRequest) {
|
if (response.statusCode >= HttpStatus.badRequest) {
|
||||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||||
}
|
}
|
||||||
@ -513,7 +513,7 @@ class AssetApi {
|
|||||||
/// * [bool] isFavorite:
|
/// * [bool] isFavorite:
|
||||||
///
|
///
|
||||||
/// * [bool] isTrashed:
|
/// * [bool] isTrashed:
|
||||||
Future<Response> getAssetStatsWithHttpInfo({ bool? isArchived, bool? isFavorite, bool? isTrashed, }) async {
|
Future<Response> getAssetStatisticsWithHttpInfo({ bool? isArchived, bool? isFavorite, bool? isTrashed, }) async {
|
||||||
// ignore: prefer_const_declarations
|
// ignore: prefer_const_declarations
|
||||||
final path = r'/asset/statistics';
|
final path = r'/asset/statistics';
|
||||||
|
|
||||||
@ -555,8 +555,8 @@ class AssetApi {
|
|||||||
/// * [bool] isFavorite:
|
/// * [bool] isFavorite:
|
||||||
///
|
///
|
||||||
/// * [bool] isTrashed:
|
/// * [bool] isTrashed:
|
||||||
Future<AssetStatsResponseDto?> getAssetStats({ bool? isArchived, bool? isFavorite, bool? isTrashed, }) async {
|
Future<AssetStatsResponseDto?> getAssetStatistics({ bool? isArchived, bool? isFavorite, bool? isTrashed, }) async {
|
||||||
final response = await getAssetStatsWithHttpInfo( isArchived: isArchived, isFavorite: isFavorite, isTrashed: isTrashed, );
|
final response = await getAssetStatisticsWithHttpInfo( isArchived: isArchived, isFavorite: isFavorite, isTrashed: isTrashed, );
|
||||||
if (response.statusCode >= HttpStatus.badRequest) {
|
if (response.statusCode >= HttpStatus.badRequest) {
|
||||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||||
}
|
}
|
||||||
@ -633,119 +633,6 @@ class AssetApi {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Performs an HTTP 'GET /asset/time-bucket' operation and returns the [Response].
|
|
||||||
/// Parameters:
|
|
||||||
///
|
|
||||||
/// * [TimeBucketSize] size (required):
|
|
||||||
///
|
|
||||||
/// * [String] timeBucket (required):
|
|
||||||
///
|
|
||||||
/// * [String] userId:
|
|
||||||
///
|
|
||||||
/// * [String] albumId:
|
|
||||||
///
|
|
||||||
/// * [String] personId:
|
|
||||||
///
|
|
||||||
/// * [bool] isArchived:
|
|
||||||
///
|
|
||||||
/// * [bool] isFavorite:
|
|
||||||
///
|
|
||||||
/// * [bool] isTrashed:
|
|
||||||
///
|
|
||||||
/// * [bool] withStacked:
|
|
||||||
///
|
|
||||||
/// * [String] key:
|
|
||||||
Future<Response> getByTimeBucketWithHttpInfo(TimeBucketSize size, String timeBucket, { String? userId, String? albumId, String? personId, bool? isArchived, bool? isFavorite, bool? isTrashed, bool? withStacked, String? key, }) async {
|
|
||||||
// ignore: prefer_const_declarations
|
|
||||||
final path = r'/asset/time-bucket';
|
|
||||||
|
|
||||||
// ignore: prefer_final_locals
|
|
||||||
Object? postBody;
|
|
||||||
|
|
||||||
final queryParams = <QueryParam>[];
|
|
||||||
final headerParams = <String, String>{};
|
|
||||||
final formParams = <String, String>{};
|
|
||||||
|
|
||||||
queryParams.addAll(_queryParams('', 'size', size));
|
|
||||||
if (userId != null) {
|
|
||||||
queryParams.addAll(_queryParams('', 'userId', userId));
|
|
||||||
}
|
|
||||||
if (albumId != null) {
|
|
||||||
queryParams.addAll(_queryParams('', 'albumId', albumId));
|
|
||||||
}
|
|
||||||
if (personId != null) {
|
|
||||||
queryParams.addAll(_queryParams('', 'personId', personId));
|
|
||||||
}
|
|
||||||
if (isArchived != null) {
|
|
||||||
queryParams.addAll(_queryParams('', 'isArchived', isArchived));
|
|
||||||
}
|
|
||||||
if (isFavorite != null) {
|
|
||||||
queryParams.addAll(_queryParams('', 'isFavorite', isFavorite));
|
|
||||||
}
|
|
||||||
if (isTrashed != null) {
|
|
||||||
queryParams.addAll(_queryParams('', 'isTrashed', isTrashed));
|
|
||||||
}
|
|
||||||
if (withStacked != null) {
|
|
||||||
queryParams.addAll(_queryParams('', 'withStacked', withStacked));
|
|
||||||
}
|
|
||||||
queryParams.addAll(_queryParams('', 'timeBucket', timeBucket));
|
|
||||||
if (key != null) {
|
|
||||||
queryParams.addAll(_queryParams('', 'key', key));
|
|
||||||
}
|
|
||||||
|
|
||||||
const contentTypes = <String>[];
|
|
||||||
|
|
||||||
|
|
||||||
return apiClient.invokeAPI(
|
|
||||||
path,
|
|
||||||
'GET',
|
|
||||||
queryParams,
|
|
||||||
postBody,
|
|
||||||
headerParams,
|
|
||||||
formParams,
|
|
||||||
contentTypes.isEmpty ? null : contentTypes.first,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Parameters:
|
|
||||||
///
|
|
||||||
/// * [TimeBucketSize] size (required):
|
|
||||||
///
|
|
||||||
/// * [String] timeBucket (required):
|
|
||||||
///
|
|
||||||
/// * [String] userId:
|
|
||||||
///
|
|
||||||
/// * [String] albumId:
|
|
||||||
///
|
|
||||||
/// * [String] personId:
|
|
||||||
///
|
|
||||||
/// * [bool] isArchived:
|
|
||||||
///
|
|
||||||
/// * [bool] isFavorite:
|
|
||||||
///
|
|
||||||
/// * [bool] isTrashed:
|
|
||||||
///
|
|
||||||
/// * [bool] withStacked:
|
|
||||||
///
|
|
||||||
/// * [String] key:
|
|
||||||
Future<List<AssetResponseDto>?> getByTimeBucket(TimeBucketSize size, String timeBucket, { String? userId, String? albumId, String? personId, bool? isArchived, bool? isFavorite, bool? isTrashed, bool? withStacked, String? key, }) async {
|
|
||||||
final response = await getByTimeBucketWithHttpInfo(size, timeBucket, userId: userId, albumId: albumId, personId: personId, isArchived: isArchived, isFavorite: isFavorite, isTrashed: isTrashed, withStacked: withStacked, key: key, );
|
|
||||||
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<AssetResponseDto>') as List)
|
|
||||||
.cast<AssetResponseDto>()
|
|
||||||
.toList();
|
|
||||||
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Performs an HTTP 'GET /asset/curated-locations' operation and returns the [Response].
|
/// Performs an HTTP 'GET /asset/curated-locations' operation and returns the [Response].
|
||||||
Future<Response> getCuratedLocationsWithHttpInfo() async {
|
Future<Response> getCuratedLocationsWithHttpInfo() async {
|
||||||
// ignore: prefer_const_declarations
|
// ignore: prefer_const_declarations
|
||||||
@ -1075,6 +962,119 @@ class AssetApi {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Performs an HTTP 'GET /asset/time-bucket' operation and returns the [Response].
|
||||||
|
/// Parameters:
|
||||||
|
///
|
||||||
|
/// * [TimeBucketSize] size (required):
|
||||||
|
///
|
||||||
|
/// * [String] timeBucket (required):
|
||||||
|
///
|
||||||
|
/// * [String] userId:
|
||||||
|
///
|
||||||
|
/// * [String] albumId:
|
||||||
|
///
|
||||||
|
/// * [String] personId:
|
||||||
|
///
|
||||||
|
/// * [bool] isArchived:
|
||||||
|
///
|
||||||
|
/// * [bool] isFavorite:
|
||||||
|
///
|
||||||
|
/// * [bool] isTrashed:
|
||||||
|
///
|
||||||
|
/// * [bool] withStacked:
|
||||||
|
///
|
||||||
|
/// * [String] key:
|
||||||
|
Future<Response> getTimeBucketWithHttpInfo(TimeBucketSize size, String timeBucket, { String? userId, String? albumId, String? personId, bool? isArchived, bool? isFavorite, bool? isTrashed, bool? withStacked, String? key, }) async {
|
||||||
|
// ignore: prefer_const_declarations
|
||||||
|
final path = r'/asset/time-bucket';
|
||||||
|
|
||||||
|
// ignore: prefer_final_locals
|
||||||
|
Object? postBody;
|
||||||
|
|
||||||
|
final queryParams = <QueryParam>[];
|
||||||
|
final headerParams = <String, String>{};
|
||||||
|
final formParams = <String, String>{};
|
||||||
|
|
||||||
|
queryParams.addAll(_queryParams('', 'size', size));
|
||||||
|
if (userId != null) {
|
||||||
|
queryParams.addAll(_queryParams('', 'userId', userId));
|
||||||
|
}
|
||||||
|
if (albumId != null) {
|
||||||
|
queryParams.addAll(_queryParams('', 'albumId', albumId));
|
||||||
|
}
|
||||||
|
if (personId != null) {
|
||||||
|
queryParams.addAll(_queryParams('', 'personId', personId));
|
||||||
|
}
|
||||||
|
if (isArchived != null) {
|
||||||
|
queryParams.addAll(_queryParams('', 'isArchived', isArchived));
|
||||||
|
}
|
||||||
|
if (isFavorite != null) {
|
||||||
|
queryParams.addAll(_queryParams('', 'isFavorite', isFavorite));
|
||||||
|
}
|
||||||
|
if (isTrashed != null) {
|
||||||
|
queryParams.addAll(_queryParams('', 'isTrashed', isTrashed));
|
||||||
|
}
|
||||||
|
if (withStacked != null) {
|
||||||
|
queryParams.addAll(_queryParams('', 'withStacked', withStacked));
|
||||||
|
}
|
||||||
|
queryParams.addAll(_queryParams('', 'timeBucket', timeBucket));
|
||||||
|
if (key != null) {
|
||||||
|
queryParams.addAll(_queryParams('', 'key', key));
|
||||||
|
}
|
||||||
|
|
||||||
|
const contentTypes = <String>[];
|
||||||
|
|
||||||
|
|
||||||
|
return apiClient.invokeAPI(
|
||||||
|
path,
|
||||||
|
'GET',
|
||||||
|
queryParams,
|
||||||
|
postBody,
|
||||||
|
headerParams,
|
||||||
|
formParams,
|
||||||
|
contentTypes.isEmpty ? null : contentTypes.first,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Parameters:
|
||||||
|
///
|
||||||
|
/// * [TimeBucketSize] size (required):
|
||||||
|
///
|
||||||
|
/// * [String] timeBucket (required):
|
||||||
|
///
|
||||||
|
/// * [String] userId:
|
||||||
|
///
|
||||||
|
/// * [String] albumId:
|
||||||
|
///
|
||||||
|
/// * [String] personId:
|
||||||
|
///
|
||||||
|
/// * [bool] isArchived:
|
||||||
|
///
|
||||||
|
/// * [bool] isFavorite:
|
||||||
|
///
|
||||||
|
/// * [bool] isTrashed:
|
||||||
|
///
|
||||||
|
/// * [bool] withStacked:
|
||||||
|
///
|
||||||
|
/// * [String] key:
|
||||||
|
Future<List<AssetResponseDto>?> getTimeBucket(TimeBucketSize size, String timeBucket, { String? userId, String? albumId, String? personId, bool? isArchived, bool? isFavorite, bool? isTrashed, bool? withStacked, String? key, }) async {
|
||||||
|
final response = await getTimeBucketWithHttpInfo(size, timeBucket, userId: userId, albumId: albumId, personId: personId, isArchived: isArchived, isFavorite: isFavorite, isTrashed: isTrashed, withStacked: withStacked, key: key, );
|
||||||
|
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<AssetResponseDto>') as List)
|
||||||
|
.cast<AssetResponseDto>()
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/// Performs an HTTP 'GET /asset/time-buckets' operation and returns the [Response].
|
/// Performs an HTTP 'GET /asset/time-buckets' operation and returns the [Response].
|
||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
|
94
mobile/openapi/lib/api/authentication_api.dart
generated
94
mobile/openapi/lib/api/authentication_api.dart
generated
@ -16,53 +16,6 @@ class AuthenticationApi {
|
|||||||
|
|
||||||
final ApiClient apiClient;
|
final ApiClient apiClient;
|
||||||
|
|
||||||
/// Performs an HTTP 'POST /auth/admin-sign-up' operation and returns the [Response].
|
|
||||||
/// Parameters:
|
|
||||||
///
|
|
||||||
/// * [SignUpDto] signUpDto (required):
|
|
||||||
Future<Response> adminSignUpWithHttpInfo(SignUpDto signUpDto,) async {
|
|
||||||
// ignore: prefer_const_declarations
|
|
||||||
final path = r'/auth/admin-sign-up';
|
|
||||||
|
|
||||||
// ignore: prefer_final_locals
|
|
||||||
Object? postBody = signUpDto;
|
|
||||||
|
|
||||||
final queryParams = <QueryParam>[];
|
|
||||||
final headerParams = <String, String>{};
|
|
||||||
final formParams = <String, String>{};
|
|
||||||
|
|
||||||
const contentTypes = <String>['application/json'];
|
|
||||||
|
|
||||||
|
|
||||||
return apiClient.invokeAPI(
|
|
||||||
path,
|
|
||||||
'POST',
|
|
||||||
queryParams,
|
|
||||||
postBody,
|
|
||||||
headerParams,
|
|
||||||
formParams,
|
|
||||||
contentTypes.isEmpty ? null : contentTypes.first,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Parameters:
|
|
||||||
///
|
|
||||||
/// * [SignUpDto] signUpDto (required):
|
|
||||||
Future<AdminSignupResponseDto?> adminSignUp(SignUpDto signUpDto,) async {
|
|
||||||
final response = await adminSignUpWithHttpInfo(signUpDto,);
|
|
||||||
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), 'AdminSignupResponseDto',) as AdminSignupResponseDto;
|
|
||||||
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Performs an HTTP 'POST /auth/change-password' operation and returns the [Response].
|
/// Performs an HTTP 'POST /auth/change-password' operation and returns the [Response].
|
||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
@ -315,6 +268,53 @@ class AuthenticationApi {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Performs an HTTP 'POST /auth/admin-sign-up' operation and returns the [Response].
|
||||||
|
/// Parameters:
|
||||||
|
///
|
||||||
|
/// * [SignUpDto] signUpDto (required):
|
||||||
|
Future<Response> signUpAdminWithHttpInfo(SignUpDto signUpDto,) async {
|
||||||
|
// ignore: prefer_const_declarations
|
||||||
|
final path = r'/auth/admin-sign-up';
|
||||||
|
|
||||||
|
// ignore: prefer_final_locals
|
||||||
|
Object? postBody = signUpDto;
|
||||||
|
|
||||||
|
final queryParams = <QueryParam>[];
|
||||||
|
final headerParams = <String, String>{};
|
||||||
|
final formParams = <String, String>{};
|
||||||
|
|
||||||
|
const contentTypes = <String>['application/json'];
|
||||||
|
|
||||||
|
|
||||||
|
return apiClient.invokeAPI(
|
||||||
|
path,
|
||||||
|
'POST',
|
||||||
|
queryParams,
|
||||||
|
postBody,
|
||||||
|
headerParams,
|
||||||
|
formParams,
|
||||||
|
contentTypes.isEmpty ? null : contentTypes.first,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Parameters:
|
||||||
|
///
|
||||||
|
/// * [SignUpDto] signUpDto (required):
|
||||||
|
Future<AdminSignupResponseDto?> signUpAdmin(SignUpDto signUpDto,) async {
|
||||||
|
final response = await signUpAdminWithHttpInfo(signUpDto,);
|
||||||
|
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), 'AdminSignupResponseDto',) as AdminSignupResponseDto;
|
||||||
|
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/// Performs an HTTP 'POST /auth/validateToken' operation and returns the [Response].
|
/// Performs an HTTP 'POST /auth/validateToken' operation and returns the [Response].
|
||||||
Future<Response> validateAccessTokenWithHttpInfo() async {
|
Future<Response> validateAccessTokenWithHttpInfo() async {
|
||||||
// ignore: prefer_const_declarations
|
// ignore: prefer_const_declarations
|
||||||
|
6
mobile/openapi/lib/api/library_api.dart
generated
6
mobile/openapi/lib/api/library_api.dart
generated
@ -104,7 +104,7 @@ class LibraryApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Performs an HTTP 'GET /library' operation and returns the [Response].
|
/// Performs an HTTP 'GET /library' operation and returns the [Response].
|
||||||
Future<Response> getAllForUserWithHttpInfo() async {
|
Future<Response> getLibrariesWithHttpInfo() async {
|
||||||
// ignore: prefer_const_declarations
|
// ignore: prefer_const_declarations
|
||||||
final path = r'/library';
|
final path = r'/library';
|
||||||
|
|
||||||
@ -129,8 +129,8 @@ class LibraryApi {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<List<LibraryResponseDto>?> getAllForUser() async {
|
Future<List<LibraryResponseDto>?> getLibraries() async {
|
||||||
final response = await getAllForUserWithHttpInfo();
|
final response = await getLibrariesWithHttpInfo();
|
||||||
if (response.statusCode >= HttpStatus.badRequest) {
|
if (response.statusCode >= HttpStatus.badRequest) {
|
||||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||||
}
|
}
|
||||||
|
124
mobile/openapi/lib/api/o_auth_api.dart
generated
124
mobile/openapi/lib/api/o_auth_api.dart
generated
@ -16,58 +16,11 @@ class OAuthApi {
|
|||||||
|
|
||||||
final ApiClient apiClient;
|
final ApiClient apiClient;
|
||||||
|
|
||||||
/// Performs an HTTP 'POST /oauth/authorize' operation and returns the [Response].
|
|
||||||
/// Parameters:
|
|
||||||
///
|
|
||||||
/// * [OAuthConfigDto] oAuthConfigDto (required):
|
|
||||||
Future<Response> authorizeOAuthWithHttpInfo(OAuthConfigDto oAuthConfigDto,) async {
|
|
||||||
// ignore: prefer_const_declarations
|
|
||||||
final path = r'/oauth/authorize';
|
|
||||||
|
|
||||||
// ignore: prefer_final_locals
|
|
||||||
Object? postBody = oAuthConfigDto;
|
|
||||||
|
|
||||||
final queryParams = <QueryParam>[];
|
|
||||||
final headerParams = <String, String>{};
|
|
||||||
final formParams = <String, String>{};
|
|
||||||
|
|
||||||
const contentTypes = <String>['application/json'];
|
|
||||||
|
|
||||||
|
|
||||||
return apiClient.invokeAPI(
|
|
||||||
path,
|
|
||||||
'POST',
|
|
||||||
queryParams,
|
|
||||||
postBody,
|
|
||||||
headerParams,
|
|
||||||
formParams,
|
|
||||||
contentTypes.isEmpty ? null : contentTypes.first,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Parameters:
|
|
||||||
///
|
|
||||||
/// * [OAuthConfigDto] oAuthConfigDto (required):
|
|
||||||
Future<OAuthAuthorizeResponseDto?> authorizeOAuth(OAuthConfigDto oAuthConfigDto,) async {
|
|
||||||
final response = await authorizeOAuthWithHttpInfo(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/callback' operation and returns the [Response].
|
/// Performs an HTTP 'POST /oauth/callback' operation and returns the [Response].
|
||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
/// * [OAuthCallbackDto] oAuthCallbackDto (required):
|
/// * [OAuthCallbackDto] oAuthCallbackDto (required):
|
||||||
Future<Response> callbackWithHttpInfo(OAuthCallbackDto oAuthCallbackDto,) async {
|
Future<Response> finishOAuthWithHttpInfo(OAuthCallbackDto oAuthCallbackDto,) async {
|
||||||
// ignore: prefer_const_declarations
|
// ignore: prefer_const_declarations
|
||||||
final path = r'/oauth/callback';
|
final path = r'/oauth/callback';
|
||||||
|
|
||||||
@ -95,8 +48,8 @@ class OAuthApi {
|
|||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
/// * [OAuthCallbackDto] oAuthCallbackDto (required):
|
/// * [OAuthCallbackDto] oAuthCallbackDto (required):
|
||||||
Future<LoginResponseDto?> callback(OAuthCallbackDto oAuthCallbackDto,) async {
|
Future<LoginResponseDto?> finishOAuth(OAuthCallbackDto oAuthCallbackDto,) async {
|
||||||
final response = await callbackWithHttpInfo(oAuthCallbackDto,);
|
final response = await finishOAuthWithHttpInfo(oAuthCallbackDto,);
|
||||||
if (response.statusCode >= HttpStatus.badRequest) {
|
if (response.statusCode >= HttpStatus.badRequest) {
|
||||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||||
}
|
}
|
||||||
@ -117,7 +70,7 @@ class OAuthApi {
|
|||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
/// * [OAuthConfigDto] oAuthConfigDto (required):
|
/// * [OAuthConfigDto] oAuthConfigDto (required):
|
||||||
Future<Response> generateConfigWithHttpInfo(OAuthConfigDto oAuthConfigDto,) async {
|
Future<Response> generateOAuthConfigWithHttpInfo(OAuthConfigDto oAuthConfigDto,) async {
|
||||||
// ignore: prefer_const_declarations
|
// ignore: prefer_const_declarations
|
||||||
final path = r'/oauth/config';
|
final path = r'/oauth/config';
|
||||||
|
|
||||||
@ -147,8 +100,8 @@ class OAuthApi {
|
|||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
/// * [OAuthConfigDto] oAuthConfigDto (required):
|
/// * [OAuthConfigDto] oAuthConfigDto (required):
|
||||||
Future<OAuthConfigResponseDto?> generateConfig(OAuthConfigDto oAuthConfigDto,) async {
|
Future<OAuthConfigResponseDto?> generateOAuthConfig(OAuthConfigDto oAuthConfigDto,) async {
|
||||||
final response = await generateConfigWithHttpInfo(oAuthConfigDto,);
|
final response = await generateOAuthConfigWithHttpInfo(oAuthConfigDto,);
|
||||||
if (response.statusCode >= HttpStatus.badRequest) {
|
if (response.statusCode >= HttpStatus.badRequest) {
|
||||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||||
}
|
}
|
||||||
@ -166,7 +119,7 @@ class OAuthApi {
|
|||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
/// * [OAuthCallbackDto] oAuthCallbackDto (required):
|
/// * [OAuthCallbackDto] oAuthCallbackDto (required):
|
||||||
Future<Response> linkWithHttpInfo(OAuthCallbackDto oAuthCallbackDto,) async {
|
Future<Response> linkOAuthAccountWithHttpInfo(OAuthCallbackDto oAuthCallbackDto,) async {
|
||||||
// ignore: prefer_const_declarations
|
// ignore: prefer_const_declarations
|
||||||
final path = r'/oauth/link';
|
final path = r'/oauth/link';
|
||||||
|
|
||||||
@ -194,8 +147,8 @@ class OAuthApi {
|
|||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
/// * [OAuthCallbackDto] oAuthCallbackDto (required):
|
/// * [OAuthCallbackDto] oAuthCallbackDto (required):
|
||||||
Future<UserResponseDto?> link(OAuthCallbackDto oAuthCallbackDto,) async {
|
Future<UserResponseDto?> linkOAuthAccount(OAuthCallbackDto oAuthCallbackDto,) async {
|
||||||
final response = await linkWithHttpInfo(oAuthCallbackDto,);
|
final response = await linkOAuthAccountWithHttpInfo(oAuthCallbackDto,);
|
||||||
if (response.statusCode >= HttpStatus.badRequest) {
|
if (response.statusCode >= HttpStatus.badRequest) {
|
||||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||||
}
|
}
|
||||||
@ -210,7 +163,7 @@ class OAuthApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Performs an HTTP 'GET /oauth/mobile-redirect' operation and returns the [Response].
|
/// Performs an HTTP 'GET /oauth/mobile-redirect' operation and returns the [Response].
|
||||||
Future<Response> mobileRedirectWithHttpInfo() async {
|
Future<Response> redirectOAuthToMobileWithHttpInfo() async {
|
||||||
// ignore: prefer_const_declarations
|
// ignore: prefer_const_declarations
|
||||||
final path = r'/oauth/mobile-redirect';
|
final path = r'/oauth/mobile-redirect';
|
||||||
|
|
||||||
@ -235,15 +188,62 @@ class OAuthApi {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> mobileRedirect() async {
|
Future<void> redirectOAuthToMobile() async {
|
||||||
final response = await mobileRedirectWithHttpInfo();
|
final response = await redirectOAuthToMobileWithHttpInfo();
|
||||||
if (response.statusCode >= HttpStatus.badRequest) {
|
if (response.statusCode >= HttpStatus.badRequest) {
|
||||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Performs an HTTP 'POST /oauth/authorize' operation and returns the [Response].
|
||||||
|
/// Parameters:
|
||||||
|
///
|
||||||
|
/// * [OAuthConfigDto] oAuthConfigDto (required):
|
||||||
|
Future<Response> startOAuthWithHttpInfo(OAuthConfigDto oAuthConfigDto,) async {
|
||||||
|
// ignore: prefer_const_declarations
|
||||||
|
final path = r'/oauth/authorize';
|
||||||
|
|
||||||
|
// ignore: prefer_final_locals
|
||||||
|
Object? postBody = oAuthConfigDto;
|
||||||
|
|
||||||
|
final queryParams = <QueryParam>[];
|
||||||
|
final headerParams = <String, String>{};
|
||||||
|
final formParams = <String, String>{};
|
||||||
|
|
||||||
|
const contentTypes = <String>['application/json'];
|
||||||
|
|
||||||
|
|
||||||
|
return apiClient.invokeAPI(
|
||||||
|
path,
|
||||||
|
'POST',
|
||||||
|
queryParams,
|
||||||
|
postBody,
|
||||||
|
headerParams,
|
||||||
|
formParams,
|
||||||
|
contentTypes.isEmpty ? null : contentTypes.first,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Parameters:
|
||||||
|
///
|
||||||
|
/// * [OAuthConfigDto] oAuthConfigDto (required):
|
||||||
|
Future<OAuthAuthorizeResponseDto?> 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].
|
/// Performs an HTTP 'POST /oauth/unlink' operation and returns the [Response].
|
||||||
Future<Response> unlinkWithHttpInfo() async {
|
Future<Response> unlinkOAuthAccountWithHttpInfo() async {
|
||||||
// ignore: prefer_const_declarations
|
// ignore: prefer_const_declarations
|
||||||
final path = r'/oauth/unlink';
|
final path = r'/oauth/unlink';
|
||||||
|
|
||||||
@ -268,8 +268,8 @@ class OAuthApi {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<UserResponseDto?> unlink() async {
|
Future<UserResponseDto?> unlinkOAuthAccount() async {
|
||||||
final response = await unlinkWithHttpInfo();
|
final response = await unlinkOAuthAccountWithHttpInfo();
|
||||||
if (response.statusCode >= HttpStatus.badRequest) {
|
if (response.statusCode >= HttpStatus.badRequest) {
|
||||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||||
}
|
}
|
||||||
|
82
mobile/openapi/lib/api/server_info_api.dart
generated
82
mobile/openapi/lib/api/server_info_api.dart
generated
@ -139,6 +139,47 @@ class ServerInfoApi {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Performs an HTTP 'GET /server-info/statistics' operation and returns the [Response].
|
||||||
|
Future<Response> getServerStatisticsWithHttpInfo() async {
|
||||||
|
// ignore: prefer_const_declarations
|
||||||
|
final path = r'/server-info/statistics';
|
||||||
|
|
||||||
|
// ignore: prefer_final_locals
|
||||||
|
Object? postBody;
|
||||||
|
|
||||||
|
final queryParams = <QueryParam>[];
|
||||||
|
final headerParams = <String, String>{};
|
||||||
|
final formParams = <String, String>{};
|
||||||
|
|
||||||
|
const contentTypes = <String>[];
|
||||||
|
|
||||||
|
|
||||||
|
return apiClient.invokeAPI(
|
||||||
|
path,
|
||||||
|
'GET',
|
||||||
|
queryParams,
|
||||||
|
postBody,
|
||||||
|
headerParams,
|
||||||
|
formParams,
|
||||||
|
contentTypes.isEmpty ? null : contentTypes.first,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<ServerStatsResponseDto?> getServerStatistics() async {
|
||||||
|
final response = await getServerStatisticsWithHttpInfo();
|
||||||
|
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), 'ServerStatsResponseDto',) as ServerStatsResponseDto;
|
||||||
|
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/// Performs an HTTP 'GET /server-info/version' operation and returns the [Response].
|
/// Performs an HTTP 'GET /server-info/version' operation and returns the [Response].
|
||||||
Future<Response> getServerVersionWithHttpInfo() async {
|
Future<Response> getServerVersionWithHttpInfo() async {
|
||||||
// ignore: prefer_const_declarations
|
// ignore: prefer_const_declarations
|
||||||
@ -180,47 +221,6 @@ class ServerInfoApi {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Performs an HTTP 'GET /server-info/stats' operation and returns the [Response].
|
|
||||||
Future<Response> getStatsWithHttpInfo() async {
|
|
||||||
// ignore: prefer_const_declarations
|
|
||||||
final path = r'/server-info/stats';
|
|
||||||
|
|
||||||
// ignore: prefer_final_locals
|
|
||||||
Object? postBody;
|
|
||||||
|
|
||||||
final queryParams = <QueryParam>[];
|
|
||||||
final headerParams = <String, String>{};
|
|
||||||
final formParams = <String, String>{};
|
|
||||||
|
|
||||||
const contentTypes = <String>[];
|
|
||||||
|
|
||||||
|
|
||||||
return apiClient.invokeAPI(
|
|
||||||
path,
|
|
||||||
'GET',
|
|
||||||
queryParams,
|
|
||||||
postBody,
|
|
||||||
headerParams,
|
|
||||||
formParams,
|
|
||||||
contentTypes.isEmpty ? null : contentTypes.first,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<ServerStatsResponseDto?> getStats() async {
|
|
||||||
final response = await getStatsWithHttpInfo();
|
|
||||||
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), 'ServerStatsResponseDto',) as ServerStatsResponseDto;
|
|
||||||
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Performs an HTTP 'GET /server-info/media-types' operation and returns the [Response].
|
/// Performs an HTTP 'GET /server-info/media-types' operation and returns the [Response].
|
||||||
Future<Response> getSupportedMediaTypesWithHttpInfo() async {
|
Future<Response> getSupportedMediaTypesWithHttpInfo() async {
|
||||||
// ignore: prefer_const_declarations
|
// ignore: prefer_const_declarations
|
||||||
|
6
mobile/openapi/lib/api/system_config_api.dart
generated
6
mobile/openapi/lib/api/system_config_api.dart
generated
@ -58,7 +58,7 @@ class SystemConfigApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Performs an HTTP 'GET /system-config/defaults' operation and returns the [Response].
|
/// Performs an HTTP 'GET /system-config/defaults' operation and returns the [Response].
|
||||||
Future<Response> getDefaultsWithHttpInfo() async {
|
Future<Response> getConfigDefaultsWithHttpInfo() async {
|
||||||
// ignore: prefer_const_declarations
|
// ignore: prefer_const_declarations
|
||||||
final path = r'/system-config/defaults';
|
final path = r'/system-config/defaults';
|
||||||
|
|
||||||
@ -83,8 +83,8 @@ class SystemConfigApi {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<SystemConfigDto?> getDefaults() async {
|
Future<SystemConfigDto?> getConfigDefaults() async {
|
||||||
final response = await getDefaultsWithHttpInfo();
|
final response = await getConfigDefaultsWithHttpInfo();
|
||||||
if (response.statusCode >= HttpStatus.badRequest) {
|
if (response.statusCode >= HttpStatus.badRequest) {
|
||||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||||
}
|
}
|
||||||
|
20
mobile/openapi/test/api_key_api_test.dart
generated
20
mobile/openapi/test/api_key_api_test.dart
generated
@ -17,28 +17,28 @@ void main() {
|
|||||||
// final instance = APIKeyApi();
|
// final instance = APIKeyApi();
|
||||||
|
|
||||||
group('tests for APIKeyApi', () {
|
group('tests for APIKeyApi', () {
|
||||||
//Future<APIKeyCreateResponseDto> createKey(APIKeyCreateDto aPIKeyCreateDto) async
|
//Future<APIKeyCreateResponseDto> createApiKey(APIKeyCreateDto aPIKeyCreateDto) async
|
||||||
test('test createKey', () async {
|
test('test createApiKey', () async {
|
||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
|
||||||
//Future deleteKey(String id) async
|
//Future deleteApiKey(String id) async
|
||||||
test('test deleteKey', () async {
|
test('test deleteApiKey', () async {
|
||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
|
||||||
//Future<APIKeyResponseDto> getKey(String id) async
|
//Future<APIKeyResponseDto> getApiKey(String id) async
|
||||||
test('test getKey', () async {
|
test('test getApiKey', () async {
|
||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
|
||||||
//Future<List<APIKeyResponseDto>> getKeys() async
|
//Future<List<APIKeyResponseDto>> getApiKeys() async
|
||||||
test('test getKeys', () async {
|
test('test getApiKeys', () async {
|
||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
|
||||||
//Future<APIKeyResponseDto> updateKey(String id, APIKeyUpdateDto aPIKeyUpdateDto) async
|
//Future<APIKeyResponseDto> updateApiKey(String id, APIKeyUpdateDto aPIKeyUpdateDto) async
|
||||||
test('test updateKey', () async {
|
test('test updateApiKey', () async {
|
||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
|
||||||
|
18
mobile/openapi/test/asset_api_test.dart
generated
18
mobile/openapi/test/asset_api_test.dart
generated
@ -19,8 +19,8 @@ void main() {
|
|||||||
group('tests for AssetApi', () {
|
group('tests for AssetApi', () {
|
||||||
// Checks if assets exist by checksums
|
// Checks if assets exist by checksums
|
||||||
//
|
//
|
||||||
//Future<AssetBulkUploadCheckResponseDto> bulkUploadCheck(AssetBulkUploadCheckDto assetBulkUploadCheckDto) async
|
//Future<AssetBulkUploadCheckResponseDto> checkBulkUpload(AssetBulkUploadCheckDto assetBulkUploadCheckDto) async
|
||||||
test('test bulkUploadCheck', () async {
|
test('test checkBulkUpload', () async {
|
||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -70,8 +70,8 @@ void main() {
|
|||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
|
||||||
//Future<AssetStatsResponseDto> getAssetStats({ bool isArchived, bool isFavorite, bool isTrashed }) async
|
//Future<AssetStatsResponseDto> getAssetStatistics({ bool isArchived, bool isFavorite, bool isTrashed }) async
|
||||||
test('test getAssetStats', () async {
|
test('test getAssetStatistics', () async {
|
||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -80,11 +80,6 @@ void main() {
|
|||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
|
||||||
//Future<List<AssetResponseDto>> getByTimeBucket(TimeBucketSize size, String timeBucket, { String userId, String albumId, String personId, bool isArchived, bool isFavorite, bool isTrashed, bool withStacked, String key }) async
|
|
||||||
test('test getByTimeBucket', () async {
|
|
||||||
// TODO
|
|
||||||
});
|
|
||||||
|
|
||||||
//Future<List<CuratedLocationsResponseDto>> getCuratedLocations() async
|
//Future<List<CuratedLocationsResponseDto>> getCuratedLocations() async
|
||||||
test('test getCuratedLocations', () async {
|
test('test getCuratedLocations', () async {
|
||||||
// TODO
|
// TODO
|
||||||
@ -115,6 +110,11 @@ void main() {
|
|||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//Future<List<AssetResponseDto>> getTimeBucket(TimeBucketSize size, String timeBucket, { String userId, String albumId, String personId, bool isArchived, bool isFavorite, bool isTrashed, bool withStacked, String key }) async
|
||||||
|
test('test getTimeBucket', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
//Future<List<TimeBucketResponseDto>> getTimeBuckets(TimeBucketSize size, { String userId, String albumId, String personId, bool isArchived, bool isFavorite, bool isTrashed, bool withStacked, String key }) async
|
//Future<List<TimeBucketResponseDto>> getTimeBuckets(TimeBucketSize size, { String userId, String albumId, String personId, bool isArchived, bool isFavorite, bool isTrashed, bool withStacked, String key }) async
|
||||||
test('test getTimeBuckets', () async {
|
test('test getTimeBuckets', () async {
|
||||||
// TODO
|
// TODO
|
||||||
|
10
mobile/openapi/test/authentication_api_test.dart
generated
10
mobile/openapi/test/authentication_api_test.dart
generated
@ -17,11 +17,6 @@ void main() {
|
|||||||
// final instance = AuthenticationApi();
|
// final instance = AuthenticationApi();
|
||||||
|
|
||||||
group('tests for AuthenticationApi', () {
|
group('tests for AuthenticationApi', () {
|
||||||
//Future<AdminSignupResponseDto> adminSignUp(SignUpDto signUpDto) async
|
|
||||||
test('test adminSignUp', () async {
|
|
||||||
// TODO
|
|
||||||
});
|
|
||||||
|
|
||||||
//Future<UserResponseDto> changePassword(ChangePasswordDto changePasswordDto) async
|
//Future<UserResponseDto> changePassword(ChangePasswordDto changePasswordDto) async
|
||||||
test('test changePassword', () async {
|
test('test changePassword', () async {
|
||||||
// TODO
|
// TODO
|
||||||
@ -52,6 +47,11 @@ void main() {
|
|||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//Future<AdminSignupResponseDto> signUpAdmin(SignUpDto signUpDto) async
|
||||||
|
test('test signUpAdmin', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
//Future<ValidateAccessTokenResponseDto> validateAccessToken() async
|
//Future<ValidateAccessTokenResponseDto> validateAccessToken() async
|
||||||
test('test validateAccessToken', () async {
|
test('test validateAccessToken', () async {
|
||||||
// TODO
|
// TODO
|
||||||
|
4
mobile/openapi/test/library_api_test.dart
generated
4
mobile/openapi/test/library_api_test.dart
generated
@ -27,8 +27,8 @@ void main() {
|
|||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
|
||||||
//Future<List<LibraryResponseDto>> getAllForUser() async
|
//Future<List<LibraryResponseDto>> getLibraries() async
|
||||||
test('test getAllForUser', () async {
|
test('test getLibraries', () async {
|
||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
|
||||||
|
30
mobile/openapi/test/o_auth_api_test.dart
generated
30
mobile/openapi/test/o_auth_api_test.dart
generated
@ -17,35 +17,35 @@ void main() {
|
|||||||
// final instance = OAuthApi();
|
// final instance = OAuthApi();
|
||||||
|
|
||||||
group('tests for OAuthApi', () {
|
group('tests for OAuthApi', () {
|
||||||
//Future<OAuthAuthorizeResponseDto> authorizeOAuth(OAuthConfigDto oAuthConfigDto) async
|
//Future<LoginResponseDto> finishOAuth(OAuthCallbackDto oAuthCallbackDto) async
|
||||||
test('test authorizeOAuth', () async {
|
test('test finishOAuth', () async {
|
||||||
// TODO
|
|
||||||
});
|
|
||||||
|
|
||||||
//Future<LoginResponseDto> callback(OAuthCallbackDto oAuthCallbackDto) async
|
|
||||||
test('test callback', () async {
|
|
||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
|
||||||
// @deprecated use feature flags and /oauth/authorize
|
// @deprecated use feature flags and /oauth/authorize
|
||||||
//
|
//
|
||||||
//Future<OAuthConfigResponseDto> generateConfig(OAuthConfigDto oAuthConfigDto) async
|
//Future<OAuthConfigResponseDto> generateOAuthConfig(OAuthConfigDto oAuthConfigDto) async
|
||||||
test('test generateConfig', () async {
|
test('test generateOAuthConfig', () async {
|
||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
|
||||||
//Future<UserResponseDto> link(OAuthCallbackDto oAuthCallbackDto) async
|
//Future<UserResponseDto> linkOAuthAccount(OAuthCallbackDto oAuthCallbackDto) async
|
||||||
test('test link', () async {
|
test('test linkOAuthAccount', () async {
|
||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
|
||||||
//Future mobileRedirect() async
|
//Future redirectOAuthToMobile() async
|
||||||
test('test mobileRedirect', () async {
|
test('test redirectOAuthToMobile', () async {
|
||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
|
||||||
//Future<UserResponseDto> unlink() async
|
//Future<OAuthAuthorizeResponseDto> startOAuth(OAuthConfigDto oAuthConfigDto) async
|
||||||
test('test unlink', () async {
|
test('test startOAuth', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
//Future<UserResponseDto> unlinkOAuthAccount() async
|
||||||
|
test('test unlinkOAuthAccount', () async {
|
||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
|
||||||
|
8
mobile/openapi/test/server_info_api_test.dart
generated
8
mobile/openapi/test/server_info_api_test.dart
generated
@ -32,13 +32,13 @@ void main() {
|
|||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
|
||||||
//Future<ServerVersionResponseDto> getServerVersion() async
|
//Future<ServerStatsResponseDto> getServerStatistics() async
|
||||||
test('test getServerVersion', () async {
|
test('test getServerStatistics', () async {
|
||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
|
||||||
//Future<ServerStatsResponseDto> getStats() async
|
//Future<ServerVersionResponseDto> getServerVersion() async
|
||||||
test('test getStats', () async {
|
test('test getServerVersion', () async {
|
||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
|
||||||
|
4
mobile/openapi/test/system_config_api_test.dart
generated
4
mobile/openapi/test/system_config_api_test.dart
generated
@ -22,8 +22,8 @@ void main() {
|
|||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
|
||||||
//Future<SystemConfigDto> getDefaults() async
|
//Future<SystemConfigDto> getConfigDefaults() async
|
||||||
test('test getDefaults', () async {
|
test('test getConfigDefaults', () async {
|
||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -678,7 +678,7 @@
|
|||||||
},
|
},
|
||||||
"/api-key": {
|
"/api-key": {
|
||||||
"get": {
|
"get": {
|
||||||
"operationId": "getKeys",
|
"operationId": "getApiKeys",
|
||||||
"parameters": [],
|
"parameters": [],
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
@ -711,7 +711,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"post": {
|
"post": {
|
||||||
"operationId": "createKey",
|
"operationId": "createApiKey",
|
||||||
"parameters": [],
|
"parameters": [],
|
||||||
"requestBody": {
|
"requestBody": {
|
||||||
"content": {
|
"content": {
|
||||||
@ -753,7 +753,7 @@
|
|||||||
},
|
},
|
||||||
"/api-key/{id}": {
|
"/api-key/{id}": {
|
||||||
"delete": {
|
"delete": {
|
||||||
"operationId": "deleteKey",
|
"operationId": "deleteApiKey",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"name": "id",
|
"name": "id",
|
||||||
@ -786,7 +786,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"get": {
|
"get": {
|
||||||
"operationId": "getKey",
|
"operationId": "getApiKey",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"name": "id",
|
"name": "id",
|
||||||
@ -826,7 +826,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"put": {
|
"put": {
|
||||||
"operationId": "updateKey",
|
"operationId": "updateApiKey",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"name": "id",
|
"name": "id",
|
||||||
@ -1084,7 +1084,7 @@
|
|||||||
"/asset/bulk-upload-check": {
|
"/asset/bulk-upload-check": {
|
||||||
"post": {
|
"post": {
|
||||||
"description": "Checks if assets exist by checksums",
|
"description": "Checks if assets exist by checksums",
|
||||||
"operationId": "bulkUploadCheck",
|
"operationId": "checkBulkUpload",
|
||||||
"parameters": [],
|
"parameters": [],
|
||||||
"requestBody": {
|
"requestBody": {
|
||||||
"content": {
|
"content": {
|
||||||
@ -1855,7 +1855,7 @@
|
|||||||
},
|
},
|
||||||
"/asset/statistics": {
|
"/asset/statistics": {
|
||||||
"get": {
|
"get": {
|
||||||
"operationId": "getAssetStats",
|
"operationId": "getAssetStatistics",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"name": "isArchived",
|
"name": "isArchived",
|
||||||
@ -1977,7 +1977,7 @@
|
|||||||
},
|
},
|
||||||
"/asset/time-bucket": {
|
"/asset/time-bucket": {
|
||||||
"get": {
|
"get": {
|
||||||
"operationId": "getByTimeBucket",
|
"operationId": "getTimeBucket",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"name": "size",
|
"name": "size",
|
||||||
@ -2596,7 +2596,7 @@
|
|||||||
},
|
},
|
||||||
"/auth/admin-sign-up": {
|
"/auth/admin-sign-up": {
|
||||||
"post": {
|
"post": {
|
||||||
"operationId": "adminSignUp",
|
"operationId": "signUpAdmin",
|
||||||
"parameters": [],
|
"parameters": [],
|
||||||
"requestBody": {
|
"requestBody": {
|
||||||
"content": {
|
"content": {
|
||||||
@ -2943,7 +2943,7 @@
|
|||||||
},
|
},
|
||||||
"/library": {
|
"/library": {
|
||||||
"get": {
|
"get": {
|
||||||
"operationId": "getAllForUser",
|
"operationId": "getLibraries",
|
||||||
"parameters": [],
|
"parameters": [],
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
@ -3265,7 +3265,7 @@
|
|||||||
},
|
},
|
||||||
"/oauth/authorize": {
|
"/oauth/authorize": {
|
||||||
"post": {
|
"post": {
|
||||||
"operationId": "authorizeOAuth",
|
"operationId": "startOAuth",
|
||||||
"parameters": [],
|
"parameters": [],
|
||||||
"requestBody": {
|
"requestBody": {
|
||||||
"content": {
|
"content": {
|
||||||
@ -3296,7 +3296,7 @@
|
|||||||
},
|
},
|
||||||
"/oauth/callback": {
|
"/oauth/callback": {
|
||||||
"post": {
|
"post": {
|
||||||
"operationId": "callback",
|
"operationId": "finishOAuth",
|
||||||
"parameters": [],
|
"parameters": [],
|
||||||
"requestBody": {
|
"requestBody": {
|
||||||
"content": {
|
"content": {
|
||||||
@ -3329,7 +3329,7 @@
|
|||||||
"post": {
|
"post": {
|
||||||
"deprecated": true,
|
"deprecated": true,
|
||||||
"description": "@deprecated use feature flags and /oauth/authorize",
|
"description": "@deprecated use feature flags and /oauth/authorize",
|
||||||
"operationId": "generateConfig",
|
"operationId": "generateOAuthConfig",
|
||||||
"parameters": [],
|
"parameters": [],
|
||||||
"requestBody": {
|
"requestBody": {
|
||||||
"content": {
|
"content": {
|
||||||
@ -3360,7 +3360,7 @@
|
|||||||
},
|
},
|
||||||
"/oauth/link": {
|
"/oauth/link": {
|
||||||
"post": {
|
"post": {
|
||||||
"operationId": "link",
|
"operationId": "linkOAuthAccount",
|
||||||
"parameters": [],
|
"parameters": [],
|
||||||
"requestBody": {
|
"requestBody": {
|
||||||
"content": {
|
"content": {
|
||||||
@ -3402,7 +3402,7 @@
|
|||||||
},
|
},
|
||||||
"/oauth/mobile-redirect": {
|
"/oauth/mobile-redirect": {
|
||||||
"get": {
|
"get": {
|
||||||
"operationId": "mobileRedirect",
|
"operationId": "redirectOAuthToMobile",
|
||||||
"parameters": [],
|
"parameters": [],
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
@ -3416,7 +3416,7 @@
|
|||||||
},
|
},
|
||||||
"/oauth/unlink": {
|
"/oauth/unlink": {
|
||||||
"post": {
|
"post": {
|
||||||
"operationId": "unlink",
|
"operationId": "unlinkOAuthAccount",
|
||||||
"parameters": [],
|
"parameters": [],
|
||||||
"responses": {
|
"responses": {
|
||||||
"201": {
|
"201": {
|
||||||
@ -4307,9 +4307,9 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/server-info/stats": {
|
"/server-info/statistics": {
|
||||||
"get": {
|
"get": {
|
||||||
"operationId": "getStats",
|
"operationId": "getServerStatistics",
|
||||||
"parameters": [],
|
"parameters": [],
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
@ -4837,7 +4837,7 @@
|
|||||||
},
|
},
|
||||||
"/system-config/defaults": {
|
"/system-config/defaults": {
|
||||||
"get": {
|
"get": {
|
||||||
"operationId": "getDefaults",
|
"operationId": "getConfigDefaults",
|
||||||
"parameters": [],
|
"parameters": [],
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
|
@ -331,17 +331,17 @@ describe(AssetService.name, () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('getByTimeBucket', () => {
|
describe('getTimeBucket', () => {
|
||||||
it('should return the assets for a album time bucket if user has album.read', async () => {
|
it('should return the assets for a album time bucket if user has album.read', async () => {
|
||||||
accessMock.album.hasOwnerAccess.mockResolvedValue(true);
|
accessMock.album.hasOwnerAccess.mockResolvedValue(true);
|
||||||
assetMock.getByTimeBucket.mockResolvedValue([assetStub.image]);
|
assetMock.getTimeBucket.mockResolvedValue([assetStub.image]);
|
||||||
|
|
||||||
await expect(
|
await expect(
|
||||||
sut.getByTimeBucket(authStub.admin, { size: TimeBucketSize.DAY, timeBucket: 'bucket', albumId: 'album-id' }),
|
sut.getTimeBucket(authStub.admin, { size: TimeBucketSize.DAY, timeBucket: 'bucket', albumId: 'album-id' }),
|
||||||
).resolves.toEqual(expect.arrayContaining([expect.objectContaining({ id: 'asset-id' })]));
|
).resolves.toEqual(expect.arrayContaining([expect.objectContaining({ id: 'asset-id' })]));
|
||||||
|
|
||||||
expect(accessMock.album.hasOwnerAccess).toHaveBeenCalledWith(authStub.admin.id, 'album-id');
|
expect(accessMock.album.hasOwnerAccess).toHaveBeenCalledWith(authStub.admin.id, 'album-id');
|
||||||
expect(assetMock.getByTimeBucket).toBeCalledWith('bucket', {
|
expect(assetMock.getTimeBucket).toBeCalledWith('bucket', {
|
||||||
size: TimeBucketSize.DAY,
|
size: TimeBucketSize.DAY,
|
||||||
timeBucket: 'bucket',
|
timeBucket: 'bucket',
|
||||||
albumId: 'album-id',
|
albumId: 'album-id',
|
||||||
@ -349,17 +349,17 @@ describe(AssetService.name, () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should return the assets for a archive time bucket if user has archive.read', async () => {
|
it('should return the assets for a archive time bucket if user has archive.read', async () => {
|
||||||
assetMock.getByTimeBucket.mockResolvedValue([assetStub.image]);
|
assetMock.getTimeBucket.mockResolvedValue([assetStub.image]);
|
||||||
|
|
||||||
await expect(
|
await expect(
|
||||||
sut.getByTimeBucket(authStub.admin, {
|
sut.getTimeBucket(authStub.admin, {
|
||||||
size: TimeBucketSize.DAY,
|
size: TimeBucketSize.DAY,
|
||||||
timeBucket: 'bucket',
|
timeBucket: 'bucket',
|
||||||
isArchived: true,
|
isArchived: true,
|
||||||
userId: authStub.admin.id,
|
userId: authStub.admin.id,
|
||||||
}),
|
}),
|
||||||
).resolves.toEqual(expect.arrayContaining([expect.objectContaining({ id: 'asset-id' })]));
|
).resolves.toEqual(expect.arrayContaining([expect.objectContaining({ id: 'asset-id' })]));
|
||||||
expect(assetMock.getByTimeBucket).toBeCalledWith('bucket', {
|
expect(assetMock.getTimeBucket).toBeCalledWith('bucket', {
|
||||||
size: TimeBucketSize.DAY,
|
size: TimeBucketSize.DAY,
|
||||||
timeBucket: 'bucket',
|
timeBucket: 'bucket',
|
||||||
isArchived: true,
|
isArchived: true,
|
||||||
@ -368,16 +368,16 @@ describe(AssetService.name, () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should return the assets for a library time bucket if user has library.read', async () => {
|
it('should return the assets for a library time bucket if user has library.read', async () => {
|
||||||
assetMock.getByTimeBucket.mockResolvedValue([assetStub.image]);
|
assetMock.getTimeBucket.mockResolvedValue([assetStub.image]);
|
||||||
|
|
||||||
await expect(
|
await expect(
|
||||||
sut.getByTimeBucket(authStub.admin, {
|
sut.getTimeBucket(authStub.admin, {
|
||||||
size: TimeBucketSize.DAY,
|
size: TimeBucketSize.DAY,
|
||||||
timeBucket: 'bucket',
|
timeBucket: 'bucket',
|
||||||
userId: authStub.admin.id,
|
userId: authStub.admin.id,
|
||||||
}),
|
}),
|
||||||
).resolves.toEqual(expect.arrayContaining([expect.objectContaining({ id: 'asset-id' })]));
|
).resolves.toEqual(expect.arrayContaining([expect.objectContaining({ id: 'asset-id' })]));
|
||||||
expect(assetMock.getByTimeBucket).toBeCalledWith('bucket', {
|
expect(assetMock.getTimeBucket).toBeCalledWith('bucket', {
|
||||||
size: TimeBucketSize.DAY,
|
size: TimeBucketSize.DAY,
|
||||||
timeBucket: 'bucket',
|
timeBucket: 'bucket',
|
||||||
userId: authStub.admin.id,
|
userId: authStub.admin.id,
|
||||||
|
@ -194,12 +194,12 @@ export class AssetService {
|
|||||||
return this.assetRepository.getTimeBuckets(dto);
|
return this.assetRepository.getTimeBuckets(dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getByTimeBucket(
|
async getTimeBucket(
|
||||||
authUser: AuthUserDto,
|
authUser: AuthUserDto,
|
||||||
dto: TimeBucketAssetDto,
|
dto: TimeBucketAssetDto,
|
||||||
): Promise<AssetResponseDto[] | SanitizedAssetResponseDto[]> {
|
): Promise<AssetResponseDto[] | SanitizedAssetResponseDto[]> {
|
||||||
await this.timeBucketChecks(authUser, dto);
|
await this.timeBucketChecks(authUser, dto);
|
||||||
const assets = await this.assetRepository.getByTimeBucket(dto.timeBucket, dto);
|
const assets = await this.assetRepository.getTimeBucket(dto.timeBucket, dto);
|
||||||
if (authUser.isShowMetadata) {
|
if (authUser.isShowMetadata) {
|
||||||
return assets.map((asset) => mapAsset(asset, { withStack: true }));
|
return assets.map((asset) => mapAsset(asset, { withStack: true }));
|
||||||
} else {
|
} else {
|
||||||
|
@ -315,13 +315,8 @@ export class AuthService {
|
|||||||
const redirectUri = this.normalize(config, url.split('?')[0]);
|
const redirectUri = this.normalize(config, url.split('?')[0]);
|
||||||
const client = await this.getOAuthClient(config);
|
const client = await this.getOAuthClient(config);
|
||||||
const params = client.callbackParams(url);
|
const params = client.callbackParams(url);
|
||||||
try {
|
const tokens = await client.callback(redirectUri, params, { state: params.state });
|
||||||
const tokens = await client.callback(redirectUri, params, { state: params.state });
|
return client.userinfo<OAuthProfile>(tokens.access_token || '');
|
||||||
return client.userinfo<OAuthProfile>(tokens.access_token || '');
|
|
||||||
} catch (error: Error | any) {
|
|
||||||
this.logger.error(`Unable to complete OAuth login: ${error}`, error?.stack);
|
|
||||||
throw new InternalServerErrorException(`Unable to complete OAuth login: ${error}`, { cause: error });
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private async getOAuthClient(config: SystemConfig) {
|
private async getOAuthClient(config: SystemConfig) {
|
||||||
|
@ -123,6 +123,6 @@ export interface IAssetRepository {
|
|||||||
getMapMarkers(ownerId: string, options?: MapMarkerSearchOptions): Promise<MapMarker[]>;
|
getMapMarkers(ownerId: string, options?: MapMarkerSearchOptions): Promise<MapMarker[]>;
|
||||||
getStatistics(ownerId: string, options: AssetStatsOptions): Promise<AssetStats>;
|
getStatistics(ownerId: string, options: AssetStatsOptions): Promise<AssetStats>;
|
||||||
getTimeBuckets(options: TimeBucketOptions): Promise<TimeBucketItem[]>;
|
getTimeBuckets(options: TimeBucketOptions): Promise<TimeBucketItem[]>;
|
||||||
getByTimeBucket(timeBucket: string, options: TimeBucketOptions): Promise<AssetEntity[]>;
|
getTimeBucket(timeBucket: string, options: TimeBucketOptions): Promise<AssetEntity[]>;
|
||||||
upsertExif(exif: Partial<ExifEntity>): Promise<void>;
|
upsertExif(exif: Partial<ExifEntity>): Promise<void>;
|
||||||
}
|
}
|
||||||
|
@ -220,7 +220,7 @@ describe(ServerInfoService.name, () => {
|
|||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
await expect(sut.getStats()).resolves.toEqual({
|
await expect(sut.getStatistics()).resolves.toEqual({
|
||||||
photos: 120,
|
photos: 120,
|
||||||
videos: 31,
|
videos: 31,
|
||||||
usage: 1123455,
|
usage: 1123455,
|
||||||
|
@ -92,7 +92,7 @@ export class ServerInfoService {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
async getStats(): Promise<ServerStatsResponseDto> {
|
async getStatistics(): Promise<ServerStatsResponseDto> {
|
||||||
const userStats: UserStatsQueryResponse[] = await this.userRepository.getUserStats();
|
const userStats: UserStatsQueryResponse[] = await this.userRepository.getUserStats();
|
||||||
const serverStats = new ServerStatsResponseDto();
|
const serverStats = new ServerStatsResponseDto();
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { LibraryType, UserEntity } from '@app/infra/entities';
|
import { LibraryType, UserEntity } from '@app/infra/entities';
|
||||||
import { BadRequestException, ForbiddenException, InternalServerErrorException, Logger } from '@nestjs/common';
|
import { BadRequestException, ForbiddenException } from '@nestjs/common';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import sanitize from 'sanitize-filename';
|
import sanitize from 'sanitize-filename';
|
||||||
import { AuthUserDto } from '../auth';
|
import { AuthUserDto } from '../auth';
|
||||||
@ -61,26 +61,21 @@ export class UserCore {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
if (dto.password) {
|
||||||
if (dto.password) {
|
dto.password = await this.cryptoRepository.hashBcrypt(dto.password, SALT_ROUNDS);
|
||||||
dto.password = await this.cryptoRepository.hashBcrypt(dto.password, SALT_ROUNDS);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (dto.storageLabel === '') {
|
|
||||||
dto.storageLabel = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (dto.externalPath === '') {
|
|
||||||
dto.externalPath = null;
|
|
||||||
} else if (dto.externalPath) {
|
|
||||||
dto.externalPath = path.normalize(dto.externalPath);
|
|
||||||
}
|
|
||||||
|
|
||||||
return this.userRepository.update(id, dto);
|
|
||||||
} catch (e) {
|
|
||||||
Logger.error(e, 'Failed to update user info');
|
|
||||||
throw new InternalServerErrorException('Failed to update user info');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (dto.storageLabel === '') {
|
||||||
|
dto.storageLabel = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dto.externalPath === '') {
|
||||||
|
dto.externalPath = null;
|
||||||
|
} else if (dto.externalPath) {
|
||||||
|
dto.externalPath = path.normalize(dto.externalPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.userRepository.update(id, dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
async createUser(dto: Partial<UserEntity> & { email: string }): Promise<UserEntity> {
|
async createUser(dto: Partial<UserEntity> & { email: string }): Promise<UserEntity> {
|
||||||
@ -96,30 +91,25 @@ export class UserCore {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
const payload: Partial<UserEntity> = { ...dto };
|
||||||
const payload: Partial<UserEntity> = { ...dto };
|
if (payload.password) {
|
||||||
if (payload.password) {
|
payload.password = await this.cryptoRepository.hashBcrypt(payload.password, SALT_ROUNDS);
|
||||||
payload.password = await this.cryptoRepository.hashBcrypt(payload.password, SALT_ROUNDS);
|
|
||||||
}
|
|
||||||
if (payload.storageLabel) {
|
|
||||||
payload.storageLabel = sanitize(payload.storageLabel);
|
|
||||||
}
|
|
||||||
|
|
||||||
const userEntity = await this.userRepository.create(payload);
|
|
||||||
await this.libraryRepository.create({
|
|
||||||
owner: { id: userEntity.id } as UserEntity,
|
|
||||||
name: 'Default Library',
|
|
||||||
assets: [],
|
|
||||||
type: LibraryType.UPLOAD,
|
|
||||||
importPaths: [],
|
|
||||||
exclusionPatterns: [],
|
|
||||||
isVisible: true,
|
|
||||||
});
|
|
||||||
|
|
||||||
return userEntity;
|
|
||||||
} catch (e) {
|
|
||||||
Logger.error(e, 'Create new user');
|
|
||||||
throw new InternalServerErrorException('Failed to register new user');
|
|
||||||
}
|
}
|
||||||
|
if (payload.storageLabel) {
|
||||||
|
payload.storageLabel = sanitize(payload.storageLabel);
|
||||||
|
}
|
||||||
|
|
||||||
|
const userEntity = await this.userRepository.create(payload);
|
||||||
|
await this.libraryRepository.create({
|
||||||
|
owner: { id: userEntity.id } as UserEntity,
|
||||||
|
name: 'Default Library',
|
||||||
|
assets: [],
|
||||||
|
type: LibraryType.UPLOAD,
|
||||||
|
importPaths: [],
|
||||||
|
exclusionPatterns: [],
|
||||||
|
isVisible: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
return userEntity;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,8 +17,8 @@ import {
|
|||||||
import { ApiBody, ApiConsumes, ApiHeader, ApiOkResponse, ApiTags } from '@nestjs/swagger';
|
import { ApiBody, ApiConsumes, ApiHeader, ApiOkResponse, ApiTags } from '@nestjs/swagger';
|
||||||
import { Response as Res } from 'express';
|
import { Response as Res } from 'express';
|
||||||
import { AuthUser, Authenticated, SharedLinkRoute } from '../../app.guard';
|
import { AuthUser, Authenticated, SharedLinkRoute } from '../../app.guard';
|
||||||
import { FileUploadInterceptor, ImmichFile, Route, mapToUploadFile } from '../../app.interceptor';
|
|
||||||
import { UUIDParamDto } from '../../controllers/dto/uuid-param.dto';
|
import { UUIDParamDto } from '../../controllers/dto/uuid-param.dto';
|
||||||
|
import { FileUploadInterceptor, ImmichFile, Route, mapToUploadFile } from '../../interceptors';
|
||||||
import FileNotEmptyValidator from '../validation/file-not-empty-validator';
|
import FileNotEmptyValidator from '../validation/file-not-empty-validator';
|
||||||
import { AssetService } from './asset.service';
|
import { AssetService } from './asset.service';
|
||||||
import { AssetBulkUploadCheckDto } from './dto/asset-check.dto';
|
import { AssetBulkUploadCheckDto } from './dto/asset-check.dto';
|
||||||
@ -204,7 +204,7 @@ export class AssetController {
|
|||||||
*/
|
*/
|
||||||
@Post('/bulk-upload-check')
|
@Post('/bulk-upload-check')
|
||||||
@HttpCode(HttpStatus.OK)
|
@HttpCode(HttpStatus.OK)
|
||||||
bulkUploadCheck(
|
checkBulkUpload(
|
||||||
@AuthUser() authUser: AuthUserDto,
|
@AuthUser() authUser: AuthUserDto,
|
||||||
@Body(ValidationPipe) dto: AssetBulkUploadCheckDto,
|
@Body(ValidationPipe) dto: AssetBulkUploadCheckDto,
|
||||||
): Promise<AssetBulkUploadCheckResponseDto> {
|
): Promise<AssetBulkUploadCheckResponseDto> {
|
||||||
|
@ -2,14 +2,13 @@ import { DomainModule } from '@app/domain';
|
|||||||
import { InfraModule } from '@app/infra';
|
import { InfraModule } from '@app/infra';
|
||||||
import { AssetEntity } from '@app/infra/entities';
|
import { AssetEntity } from '@app/infra/entities';
|
||||||
import { Module, OnModuleDestroy, OnModuleInit } from '@nestjs/common';
|
import { Module, OnModuleDestroy, OnModuleInit } from '@nestjs/common';
|
||||||
import { APP_GUARD } from '@nestjs/core';
|
import { APP_GUARD, APP_INTERCEPTOR } from '@nestjs/core';
|
||||||
import { ScheduleModule } from '@nestjs/schedule';
|
import { ScheduleModule } from '@nestjs/schedule';
|
||||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||||
import { AssetRepository, IAssetRepository } from './api-v1/asset/asset-repository';
|
import { AssetRepository, IAssetRepository } from './api-v1/asset/asset-repository';
|
||||||
import { AssetController as AssetControllerV1 } from './api-v1/asset/asset.controller';
|
import { AssetController as AssetControllerV1 } from './api-v1/asset/asset.controller';
|
||||||
import { AssetService } from './api-v1/asset/asset.service';
|
import { AssetService } from './api-v1/asset/asset.service';
|
||||||
import { AppGuard } from './app.guard';
|
import { AppGuard } from './app.guard';
|
||||||
import { FileUploadInterceptor } from './app.interceptor';
|
|
||||||
import { AppService } from './app.service';
|
import { AppService } from './app.service';
|
||||||
import {
|
import {
|
||||||
APIKeyController,
|
APIKeyController,
|
||||||
@ -31,6 +30,7 @@ import {
|
|||||||
TagController,
|
TagController,
|
||||||
UserController,
|
UserController,
|
||||||
} from './controllers';
|
} from './controllers';
|
||||||
|
import { ErrorInterceptor, FileUploadInterceptor } from './interceptors';
|
||||||
|
|
||||||
@Module({
|
@Module({
|
||||||
imports: [
|
imports: [
|
||||||
@ -61,10 +61,9 @@ import {
|
|||||||
PersonController,
|
PersonController,
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
//
|
{ provide: APP_INTERCEPTOR, useClass: ErrorInterceptor },
|
||||||
{ provide: APP_GUARD, useExisting: AppGuard },
|
{ provide: APP_GUARD, useClass: AppGuard },
|
||||||
{ provide: IAssetRepository, useClass: AssetRepository },
|
{ provide: IAssetRepository, useClass: AssetRepository },
|
||||||
AppGuard,
|
|
||||||
AppService,
|
AppService,
|
||||||
AssetService,
|
AssetService,
|
||||||
FileUploadInterceptor,
|
FileUploadInterceptor,
|
||||||
|
@ -47,6 +47,9 @@ function sortKeys<T>(obj: T): T {
|
|||||||
return result as T;
|
return result as T;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const routeToErrorMessage = (methodName: string) =>
|
||||||
|
'Failed to ' + methodName.replace(/[A-Z]+/g, (letter) => ` ${letter.toLowerCase()}`);
|
||||||
|
|
||||||
const patchOpenAPI = (document: OpenAPIObject) => {
|
const patchOpenAPI = (document: OpenAPIObject) => {
|
||||||
document.paths = sortKeys(document.paths);
|
document.paths = sortKeys(document.paths);
|
||||||
if (document.components?.schemas) {
|
if (document.components?.schemas) {
|
||||||
@ -78,6 +81,10 @@ const patchOpenAPI = (document: OpenAPIObject) => {
|
|||||||
delete operation.summary;
|
delete operation.summary;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (operation.operationId) {
|
||||||
|
// console.log(`${routeToErrorMessage(operation.operationId).padEnd(40)} (${operation.operationId})`);
|
||||||
|
}
|
||||||
|
|
||||||
if (operation.description === '') {
|
if (operation.description === '') {
|
||||||
delete operation.description;
|
delete operation.description;
|
||||||
}
|
}
|
||||||
|
@ -20,22 +20,22 @@ export class APIKeyController {
|
|||||||
constructor(private service: APIKeyService) {}
|
constructor(private service: APIKeyService) {}
|
||||||
|
|
||||||
@Post()
|
@Post()
|
||||||
createKey(@AuthUser() authUser: AuthUserDto, @Body() dto: APIKeyCreateDto): Promise<APIKeyCreateResponseDto> {
|
createApiKey(@AuthUser() authUser: AuthUserDto, @Body() dto: APIKeyCreateDto): Promise<APIKeyCreateResponseDto> {
|
||||||
return this.service.create(authUser, dto);
|
return this.service.create(authUser, dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Get()
|
@Get()
|
||||||
getKeys(@AuthUser() authUser: AuthUserDto): Promise<APIKeyResponseDto[]> {
|
getApiKeys(@AuthUser() authUser: AuthUserDto): Promise<APIKeyResponseDto[]> {
|
||||||
return this.service.getAll(authUser);
|
return this.service.getAll(authUser);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Get(':id')
|
@Get(':id')
|
||||||
getKey(@AuthUser() authUser: AuthUserDto, @Param() { id }: UUIDParamDto): Promise<APIKeyResponseDto> {
|
getApiKey(@AuthUser() authUser: AuthUserDto, @Param() { id }: UUIDParamDto): Promise<APIKeyResponseDto> {
|
||||||
return this.service.getById(authUser, id);
|
return this.service.getById(authUser, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Put(':id')
|
@Put(':id')
|
||||||
updateKey(
|
updateApiKey(
|
||||||
@AuthUser() authUser: AuthUserDto,
|
@AuthUser() authUser: AuthUserDto,
|
||||||
@Param() { id }: UUIDParamDto,
|
@Param() { id }: UUIDParamDto,
|
||||||
@Body() dto: APIKeyUpdateDto,
|
@Body() dto: APIKeyUpdateDto,
|
||||||
@ -44,7 +44,7 @@ export class APIKeyController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Delete(':id')
|
@Delete(':id')
|
||||||
deleteKey(@AuthUser() authUser: AuthUserDto, @Param() { id }: UUIDParamDto): Promise<void> {
|
deleteApiKey(@AuthUser() authUser: AuthUserDto, @Param() { id }: UUIDParamDto): Promise<void> {
|
||||||
return this.service.delete(authUser, id);
|
return this.service.delete(authUser, id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -39,10 +39,11 @@ import {
|
|||||||
import { ApiOkResponse, ApiTags } from '@nestjs/swagger';
|
import { ApiOkResponse, ApiTags } from '@nestjs/swagger';
|
||||||
import { AuthUser, Authenticated, SharedLinkRoute } from '../app.guard';
|
import { AuthUser, Authenticated, SharedLinkRoute } from '../app.guard';
|
||||||
import { UseValidation, asStreamableFile } from '../app.utils';
|
import { UseValidation, asStreamableFile } from '../app.utils';
|
||||||
|
import { Route } from '../interceptors';
|
||||||
import { UUIDParamDto } from './dto/uuid-param.dto';
|
import { UUIDParamDto } from './dto/uuid-param.dto';
|
||||||
|
|
||||||
@ApiTags('Asset')
|
@ApiTags('Asset')
|
||||||
@Controller('asset')
|
@Controller(Route.ASSET)
|
||||||
@Authenticated()
|
@Authenticated()
|
||||||
@UseValidation()
|
@UseValidation()
|
||||||
export class AssetController {
|
export class AssetController {
|
||||||
@ -86,7 +87,7 @@ export class AssetController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Get('statistics')
|
@Get('statistics')
|
||||||
getAssetStats(@AuthUser() authUser: AuthUserDto, @Query() dto: AssetStatsDto): Promise<AssetStatsResponseDto> {
|
getAssetStatistics(@AuthUser() authUser: AuthUserDto, @Query() dto: AssetStatsDto): Promise<AssetStatsResponseDto> {
|
||||||
return this.service.getStatistics(authUser, dto);
|
return this.service.getStatistics(authUser, dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -98,8 +99,8 @@ export class AssetController {
|
|||||||
|
|
||||||
@Authenticated({ isShared: true })
|
@Authenticated({ isShared: true })
|
||||||
@Get('time-bucket')
|
@Get('time-bucket')
|
||||||
getByTimeBucket(@AuthUser() authUser: AuthUserDto, @Query() dto: TimeBucketAssetDto): Promise<AssetResponseDto[]> {
|
getTimeBucket(@AuthUser() authUser: AuthUserDto, @Query() dto: TimeBucketAssetDto): Promise<AssetResponseDto[]> {
|
||||||
return this.service.getByTimeBucket(authUser, dto) as Promise<AssetResponseDto[]>;
|
return this.service.getTimeBucket(authUser, dto) as Promise<AssetResponseDto[]>;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Post('jobs')
|
@Post('jobs')
|
||||||
|
@ -43,7 +43,7 @@ export class AuthController {
|
|||||||
@PublicRoute()
|
@PublicRoute()
|
||||||
@Post('admin-sign-up')
|
@Post('admin-sign-up')
|
||||||
@ApiBadRequestResponse({ description: 'The server already has an admin' })
|
@ApiBadRequestResponse({ description: 'The server already has an admin' })
|
||||||
adminSignUp(@Body() signUpCredential: SignUpDto): Promise<AdminSignupResponseDto> {
|
signUpAdmin(@Body() signUpCredential: SignUpDto): Promise<AdminSignupResponseDto> {
|
||||||
return this.service.adminSignUp(signUpCredential);
|
return this.service.adminSignUp(signUpCredential);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ export class LibraryController {
|
|||||||
constructor(private service: LibraryService) {}
|
constructor(private service: LibraryService) {}
|
||||||
|
|
||||||
@Get()
|
@Get()
|
||||||
getAllForUser(@AuthUser() authUser: AuthUserDto): Promise<ResponseDto[]> {
|
getLibraries(@AuthUser() authUser: AuthUserDto): Promise<ResponseDto[]> {
|
||||||
return this.service.getAllForUser(authUser);
|
return this.service.getAllForUser(authUser);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ export class OAuthController {
|
|||||||
@PublicRoute()
|
@PublicRoute()
|
||||||
@Get('mobile-redirect')
|
@Get('mobile-redirect')
|
||||||
@Redirect()
|
@Redirect()
|
||||||
mobileRedirect(@Req() req: Request) {
|
redirectOAuthToMobile(@Req() req: Request) {
|
||||||
return {
|
return {
|
||||||
url: this.service.getMobileRedirect(req.url),
|
url: this.service.getMobileRedirect(req.url),
|
||||||
statusCode: HttpStatus.TEMPORARY_REDIRECT,
|
statusCode: HttpStatus.TEMPORARY_REDIRECT,
|
||||||
@ -35,19 +35,19 @@ export class OAuthController {
|
|||||||
/** @deprecated use feature flags and /oauth/authorize */
|
/** @deprecated use feature flags and /oauth/authorize */
|
||||||
@PublicRoute()
|
@PublicRoute()
|
||||||
@Post('config')
|
@Post('config')
|
||||||
generateConfig(@Body() dto: OAuthConfigDto): Promise<OAuthConfigResponseDto> {
|
generateOAuthConfig(@Body() dto: OAuthConfigDto): Promise<OAuthConfigResponseDto> {
|
||||||
return this.service.generateConfig(dto);
|
return this.service.generateConfig(dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PublicRoute()
|
@PublicRoute()
|
||||||
@Post('authorize')
|
@Post('authorize')
|
||||||
authorizeOAuth(@Body() dto: OAuthConfigDto): Promise<OAuthAuthorizeResponseDto> {
|
startOAuth(@Body() dto: OAuthConfigDto): Promise<OAuthAuthorizeResponseDto> {
|
||||||
return this.service.authorize(dto);
|
return this.service.authorize(dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PublicRoute()
|
@PublicRoute()
|
||||||
@Post('callback')
|
@Post('callback')
|
||||||
async callback(
|
async finishOAuth(
|
||||||
@Res({ passthrough: true }) res: Response,
|
@Res({ passthrough: true }) res: Response,
|
||||||
@Body() dto: OAuthCallbackDto,
|
@Body() dto: OAuthCallbackDto,
|
||||||
@GetLoginDetails() loginDetails: LoginDetails,
|
@GetLoginDetails() loginDetails: LoginDetails,
|
||||||
@ -58,12 +58,12 @@ export class OAuthController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Post('link')
|
@Post('link')
|
||||||
link(@AuthUser() authUser: AuthUserDto, @Body() dto: OAuthCallbackDto): Promise<UserResponseDto> {
|
linkOAuthAccount(@AuthUser() authUser: AuthUserDto, @Body() dto: OAuthCallbackDto): Promise<UserResponseDto> {
|
||||||
return this.service.link(authUser, dto);
|
return this.service.link(authUser, dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Post('unlink')
|
@Post('unlink')
|
||||||
unlink(@AuthUser() authUser: AuthUserDto): Promise<UserResponseDto> {
|
unlinkOAuthAccount(@AuthUser() authUser: AuthUserDto): Promise<UserResponseDto> {
|
||||||
return this.service.unlink(authUser);
|
return this.service.unlink(authUser);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -57,9 +57,9 @@ export class ServerInfoController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@AdminRoute()
|
@AdminRoute()
|
||||||
@Get('stats')
|
@Get('statistics')
|
||||||
getStats(): Promise<ServerStatsResponseDto> {
|
getServerStatistics(): Promise<ServerStatsResponseDto> {
|
||||||
return this.service.getStats();
|
return this.service.getStatistics();
|
||||||
}
|
}
|
||||||
|
|
||||||
@PublicRoute()
|
@PublicRoute()
|
||||||
|
@ -17,7 +17,7 @@ export class SystemConfigController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Get('defaults')
|
@Get('defaults')
|
||||||
getDefaults(): SystemConfigDto {
|
getConfigDefaults(): SystemConfigDto {
|
||||||
return this.service.getDefaults();
|
return this.service.getDefaults();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,8 +22,8 @@ import {
|
|||||||
} from '@nestjs/common';
|
} from '@nestjs/common';
|
||||||
import { ApiBody, ApiConsumes, ApiTags } from '@nestjs/swagger';
|
import { ApiBody, ApiConsumes, ApiTags } from '@nestjs/swagger';
|
||||||
import { AdminRoute, AuthUser, Authenticated } from '../app.guard';
|
import { AdminRoute, AuthUser, Authenticated } from '../app.guard';
|
||||||
import { FileUploadInterceptor, Route } from '../app.interceptor';
|
|
||||||
import { UseValidation, asStreamableFile } from '../app.utils';
|
import { UseValidation, asStreamableFile } from '../app.utils';
|
||||||
|
import { FileUploadInterceptor, Route } from '../interceptors';
|
||||||
import { UUIDParamDto } from './dto/uuid-param.dto';
|
import { UUIDParamDto } from './dto/uuid-param.dto';
|
||||||
|
|
||||||
@ApiTags('User')
|
@ApiTags('User')
|
||||||
|
32
server/src/immich/interceptors/error.interceptor.ts
Normal file
32
server/src/immich/interceptors/error.interceptor.ts
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
import {
|
||||||
|
CallHandler,
|
||||||
|
ExecutionContext,
|
||||||
|
HttpException,
|
||||||
|
Injectable,
|
||||||
|
InternalServerErrorException,
|
||||||
|
Logger,
|
||||||
|
NestInterceptor,
|
||||||
|
} from '@nestjs/common';
|
||||||
|
import { Observable, catchError, throwError } from 'rxjs';
|
||||||
|
import { routeToErrorMessage } from '../app.utils';
|
||||||
|
|
||||||
|
@Injectable()
|
||||||
|
export class ErrorInterceptor implements NestInterceptor {
|
||||||
|
private logger = new Logger(ErrorInterceptor.name);
|
||||||
|
|
||||||
|
async intercept(context: ExecutionContext, next: CallHandler<any>): Promise<Observable<any>> {
|
||||||
|
return next.handle().pipe(
|
||||||
|
catchError((error) =>
|
||||||
|
throwError(() => {
|
||||||
|
if (error instanceof HttpException === false) {
|
||||||
|
const errorMessage = routeToErrorMessage(context.getHandler().name);
|
||||||
|
this.logger.error(errorMessage, error, error?.errors);
|
||||||
|
return new InternalServerErrorException(errorMessage);
|
||||||
|
} else {
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
@ -7,7 +7,7 @@ import { createHash } from 'crypto';
|
|||||||
import { NextFunction, RequestHandler } from 'express';
|
import { NextFunction, RequestHandler } from 'express';
|
||||||
import multer, { StorageEngine, diskStorage } from 'multer';
|
import multer, { StorageEngine, diskStorage } from 'multer';
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
import { AuthRequest } from './app.guard';
|
import { AuthRequest } from '../app.guard';
|
||||||
|
|
||||||
export enum Route {
|
export enum Route {
|
||||||
ASSET = 'asset',
|
ASSET = 'asset',
|
2
server/src/immich/interceptors/index.ts
Normal file
2
server/src/immich/interceptors/index.ts
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
export * from './error.interceptor';
|
||||||
|
export * from './file.interceptor';
|
@ -493,7 +493,7 @@ export class AssetRepository implements IAssetRepository {
|
|||||||
.getRawMany();
|
.getRawMany();
|
||||||
}
|
}
|
||||||
|
|
||||||
getByTimeBucket(timeBucket: string, options: TimeBucketOptions): Promise<AssetEntity[]> {
|
getTimeBucket(timeBucket: string, options: TimeBucketOptions): Promise<AssetEntity[]> {
|
||||||
const truncated = dateTrunc(options);
|
const truncated = dateTrunc(options);
|
||||||
return (
|
return (
|
||||||
this.getBuilder(options)
|
this.getBuilder(options)
|
||||||
|
@ -103,9 +103,9 @@ describe(`${ServerInfoController.name} (e2e)`, () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('GET /server-info/stats', () => {
|
describe('GET /server-info/statistics', () => {
|
||||||
it('should require authentication', async () => {
|
it('should require authentication', async () => {
|
||||||
const { status, body } = await request(server).get('/server-info/stats');
|
const { status, body } = await request(server).get('/server-info/statistics');
|
||||||
expect(status).toBe(401);
|
expect(status).toBe(401);
|
||||||
expect(body).toEqual(errorStub.unauthorized);
|
expect(body).toEqual(errorStub.unauthorized);
|
||||||
});
|
});
|
||||||
@ -115,7 +115,7 @@ describe(`${ServerInfoController.name} (e2e)`, () => {
|
|||||||
await api.userApi.create(server, accessToken, { ...loginDto, firstName: 'test', lastName: 'test' });
|
await api.userApi.create(server, accessToken, { ...loginDto, firstName: 'test', lastName: 'test' });
|
||||||
const { accessToken: userAccessToken } = await api.authApi.login(server, loginDto);
|
const { accessToken: userAccessToken } = await api.authApi.login(server, loginDto);
|
||||||
const { status, body } = await request(server)
|
const { status, body } = await request(server)
|
||||||
.get('/server-info/stats')
|
.get('/server-info/statistics')
|
||||||
.set('Authorization', `Bearer ${userAccessToken}`);
|
.set('Authorization', `Bearer ${userAccessToken}`);
|
||||||
expect(status).toBe(403);
|
expect(status).toBe(403);
|
||||||
expect(body).toEqual(errorStub.forbidden);
|
expect(body).toEqual(errorStub.forbidden);
|
||||||
@ -123,7 +123,7 @@ describe(`${ServerInfoController.name} (e2e)`, () => {
|
|||||||
|
|
||||||
it('should return the server stats', async () => {
|
it('should return the server stats', async () => {
|
||||||
const { status, body } = await request(server)
|
const { status, body } = await request(server)
|
||||||
.get('/server-info/stats')
|
.get('/server-info/statistics')
|
||||||
.set('Authorization', `Bearer ${accessToken}`);
|
.set('Authorization', `Bearer ${accessToken}`);
|
||||||
expect(status).toBe(200);
|
expect(status).toBe(200);
|
||||||
expect(body).toEqual({
|
expect(body).toEqual({
|
||||||
|
@ -26,7 +26,7 @@ export const newAssetRepositoryMock = (): jest.Mocked<IAssetRepository> => {
|
|||||||
findLivePhotoMatch: jest.fn(),
|
findLivePhotoMatch: jest.fn(),
|
||||||
getMapMarkers: jest.fn(),
|
getMapMarkers: jest.fn(),
|
||||||
getStatistics: jest.fn(),
|
getStatistics: jest.fn(),
|
||||||
getByTimeBucket: jest.fn(),
|
getTimeBucket: jest.fn(),
|
||||||
getTimeBuckets: jest.fn(),
|
getTimeBuckets: jest.fn(),
|
||||||
restoreAll: jest.fn(),
|
restoreAll: jest.fn(),
|
||||||
softDeleteAll: jest.fn(),
|
softDeleteAll: jest.fn(),
|
||||||
|
1146
web/src/api/open-api/api.ts
generated
1146
web/src/api/open-api/api.ts
generated
File diff suppressed because it is too large
Load Diff
@ -36,23 +36,19 @@ export const oauth = {
|
|||||||
authorize: async (location: Location) => {
|
authorize: async (location: Location) => {
|
||||||
try {
|
try {
|
||||||
const redirectUri = location.href.split('?')[0];
|
const redirectUri = location.href.split('?')[0];
|
||||||
const { data } = await api.oauthApi.authorizeOAuth({ oAuthConfigDto: { redirectUri } });
|
const { data } = await api.oauthApi.startOAuth({ oAuthConfigDto: { redirectUri } });
|
||||||
goto(data.url);
|
goto(data.url);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
handleError(error, 'Unable to login with OAuth');
|
handleError(error, 'Unable to login with OAuth');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getConfig: (location: Location) => {
|
|
||||||
const redirectUri = location.href.split('?')[0];
|
|
||||||
return api.oauthApi.generateConfig({ oAuthConfigDto: { redirectUri } });
|
|
||||||
},
|
|
||||||
login: (location: Location) => {
|
login: (location: Location) => {
|
||||||
return api.oauthApi.callback({ oAuthCallbackDto: { url: location.href } });
|
return api.oauthApi.finishOAuth({ oAuthCallbackDto: { url: location.href } });
|
||||||
},
|
},
|
||||||
link: (location: Location): AxiosPromise<UserResponseDto> => {
|
link: (location: Location): AxiosPromise<UserResponseDto> => {
|
||||||
return api.oauthApi.link({ oAuthCallbackDto: { url: location.href } });
|
return api.oauthApi.linkOAuthAccount({ oAuthCallbackDto: { url: location.href } });
|
||||||
},
|
},
|
||||||
unlink: () => {
|
unlink: () => {
|
||||||
return api.oauthApi.unlink();
|
return api.oauthApi.unlinkOAuthAccount();
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
async function getConfigs() {
|
async function getConfigs() {
|
||||||
[savedConfig, defaultConfig] = await Promise.all([
|
[savedConfig, defaultConfig] = await Promise.all([
|
||||||
api.systemConfigApi.getConfig().then((res) => res.data.ffmpeg),
|
api.systemConfigApi.getConfig().then((res) => res.data.ffmpeg),
|
||||||
api.systemConfigApi.getDefaults().then((res) => res.data.ffmpeg),
|
api.systemConfigApi.getConfigDefaults().then((res) => res.data.ffmpeg),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,7 +76,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function resetToDefault() {
|
async function resetToDefault() {
|
||||||
const { data: configs } = await api.systemConfigApi.getDefaults();
|
const { data: configs } = await api.systemConfigApi.getConfigDefaults();
|
||||||
|
|
||||||
ffmpegConfig = { ...configs.ffmpeg };
|
ffmpegConfig = { ...configs.ffmpeg };
|
||||||
defaultConfig = { ...configs.ffmpeg };
|
defaultConfig = { ...configs.ffmpeg };
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
async function getConfigs() {
|
async function getConfigs() {
|
||||||
[savedConfig, defaultConfig] = await Promise.all([
|
[savedConfig, defaultConfig] = await Promise.all([
|
||||||
api.systemConfigApi.getConfig().then((res) => res.data.job),
|
api.systemConfigApi.getConfig().then((res) => res.data.job),
|
||||||
api.systemConfigApi.getDefaults().then((res) => res.data.job),
|
api.systemConfigApi.getConfigDefaults().then((res) => res.data.job),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,7 +59,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function resetToDefault() {
|
async function resetToDefault() {
|
||||||
const { data: configs } = await api.systemConfigApi.getDefaults();
|
const { data: configs } = await api.systemConfigApi.getConfigDefaults();
|
||||||
|
|
||||||
jobConfig = { ...configs.job };
|
jobConfig = { ...configs.job };
|
||||||
defaultConfig = { ...configs.job };
|
defaultConfig = { ...configs.job };
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
async function getConfigs() {
|
async function getConfigs() {
|
||||||
[savedConfig, defaultConfig] = await Promise.all([
|
[savedConfig, defaultConfig] = await Promise.all([
|
||||||
api.systemConfigApi.getConfig().then((res) => res.data.library),
|
api.systemConfigApi.getConfig().then((res) => res.data.library),
|
||||||
api.systemConfigApi.getDefaults().then((res) => res.data.library),
|
api.systemConfigApi.getConfigDefaults().then((res) => res.data.library),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -68,7 +68,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function resetToDefault() {
|
async function resetToDefault() {
|
||||||
const { data: configs } = await api.systemConfigApi.getDefaults();
|
const { data: configs } = await api.systemConfigApi.getConfigDefaults();
|
||||||
|
|
||||||
libraryConfig = { ...configs.library };
|
libraryConfig = { ...configs.library };
|
||||||
defaultConfig = { ...configs.library };
|
defaultConfig = { ...configs.library };
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
async function refreshConfig() {
|
async function refreshConfig() {
|
||||||
[savedConfig, defaultConfig] = await Promise.all([
|
[savedConfig, defaultConfig] = await Promise.all([
|
||||||
api.systemConfigApi.getConfig().then((res) => res.data.machineLearning),
|
api.systemConfigApi.getConfig().then((res) => res.data.machineLearning),
|
||||||
api.systemConfigApi.getDefaults().then((res) => res.data.machineLearning),
|
api.systemConfigApi.getConfigDefaults().then((res) => res.data.machineLearning),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
async function refreshConfig() {
|
async function refreshConfig() {
|
||||||
[savedConfig, defaultConfig] = await Promise.all([
|
[savedConfig, defaultConfig] = await Promise.all([
|
||||||
api.systemConfigApi.getConfig().then((res) => res.data),
|
api.systemConfigApi.getConfig().then((res) => res.data),
|
||||||
api.systemConfigApi.getDefaults().then((res) => res.data),
|
api.systemConfigApi.getConfigDefaults().then((res) => res.data),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -65,7 +65,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function resetToDefault() {
|
async function resetToDefault() {
|
||||||
const { data: configs } = await api.systemConfigApi.getDefaults();
|
const { data: configs } = await api.systemConfigApi.getConfigDefaults();
|
||||||
|
|
||||||
config = cloneDeep(configs);
|
config = cloneDeep(configs);
|
||||||
defaultConfig = cloneDeep(configs);
|
defaultConfig = cloneDeep(configs);
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
async function getConfigs() {
|
async function getConfigs() {
|
||||||
[savedConfig, defaultConfig] = await Promise.all([
|
[savedConfig, defaultConfig] = await Promise.all([
|
||||||
api.systemConfigApi.getConfig().then((res) => res.data.newVersionCheck),
|
api.systemConfigApi.getConfig().then((res) => res.data.newVersionCheck),
|
||||||
api.systemConfigApi.getDefaults().then((res) => res.data.newVersionCheck),
|
api.systemConfigApi.getConfigDefaults().then((res) => res.data.newVersionCheck),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -55,7 +55,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function resetToDefault() {
|
async function resetToDefault() {
|
||||||
const { data: configs } = await api.systemConfigApi.getDefaults();
|
const { data: configs } = await api.systemConfigApi.getConfigDefaults();
|
||||||
|
|
||||||
newVersionCheckConfig = { ...configs.newVersionCheck };
|
newVersionCheckConfig = { ...configs.newVersionCheck };
|
||||||
defaultConfig = { ...configs.newVersionCheck };
|
defaultConfig = { ...configs.newVersionCheck };
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
async function getConfigs() {
|
async function getConfigs() {
|
||||||
[savedConfig, defaultConfig] = await Promise.all([
|
[savedConfig, defaultConfig] = await Promise.all([
|
||||||
api.systemConfigApi.getConfig().then((res) => res.data.oauth),
|
api.systemConfigApi.getConfig().then((res) => res.data.oauth),
|
||||||
api.systemConfigApi.getDefaults().then((res) => res.data.oauth),
|
api.systemConfigApi.getConfigDefaults().then((res) => res.data.oauth),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,7 +90,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function resetToDefault() {
|
async function resetToDefault() {
|
||||||
const { data: defaultConfig } = await api.systemConfigApi.getDefaults();
|
const { data: defaultConfig } = await api.systemConfigApi.getConfigDefaults();
|
||||||
|
|
||||||
oauthConfig = { ...defaultConfig.oauth };
|
oauthConfig = { ...defaultConfig.oauth };
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
async function getConfigs() {
|
async function getConfigs() {
|
||||||
[savedConfig, defaultConfig] = await Promise.all([
|
[savedConfig, defaultConfig] = await Promise.all([
|
||||||
api.systemConfigApi.getConfig().then((res) => res.data.passwordLogin),
|
api.systemConfigApi.getConfig().then((res) => res.data.passwordLogin),
|
||||||
api.systemConfigApi.getDefaults().then((res) => res.data.passwordLogin),
|
api.systemConfigApi.getConfigDefaults().then((res) => res.data.passwordLogin),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,7 +77,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function resetToDefault() {
|
async function resetToDefault() {
|
||||||
const { data: configs } = await api.systemConfigApi.getDefaults();
|
const { data: configs } = await api.systemConfigApi.getConfigDefaults();
|
||||||
|
|
||||||
passwordLoginConfig = { ...configs.passwordLogin };
|
passwordLoginConfig = { ...configs.passwordLogin };
|
||||||
defaultConfig = { ...configs.passwordLogin };
|
defaultConfig = { ...configs.passwordLogin };
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
async function getConfigs() {
|
async function getConfigs() {
|
||||||
[savedConfig, defaultConfig, templateOptions] = await Promise.all([
|
[savedConfig, defaultConfig, templateOptions] = await Promise.all([
|
||||||
api.systemConfigApi.getConfig().then((res) => res.data.storageTemplate),
|
api.systemConfigApi.getConfig().then((res) => res.data.storageTemplate),
|
||||||
api.systemConfigApi.getDefaults().then((res) => res.data.storageTemplate),
|
api.systemConfigApi.getConfigDefaults().then((res) => res.data.storageTemplate),
|
||||||
api.systemConfigApi.getStorageTemplateOptions().then((res) => res.data),
|
api.systemConfigApi.getStorageTemplateOptions().then((res) => res.data),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@ -119,7 +119,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function resetToDefault() {
|
async function resetToDefault() {
|
||||||
const { data: defaultConfig } = await api.systemConfigApi.getDefaults();
|
const { data: defaultConfig } = await api.systemConfigApi.getConfigDefaults();
|
||||||
|
|
||||||
storageConfig.template = defaultConfig.storageTemplate.template;
|
storageConfig.template = defaultConfig.storageTemplate.template;
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
async function getConfigs() {
|
async function getConfigs() {
|
||||||
[savedConfig, defaultConfig] = await Promise.all([
|
[savedConfig, defaultConfig] = await Promise.all([
|
||||||
api.systemConfigApi.getConfig().then((res) => res.data.theme),
|
api.systemConfigApi.getConfig().then((res) => res.data.theme),
|
||||||
api.systemConfigApi.getDefaults().then((res) => res.data.theme),
|
api.systemConfigApi.getConfigDefaults().then((res) => res.data.theme),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -56,7 +56,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function resetToDefault() {
|
async function resetToDefault() {
|
||||||
const { data: configs } = await api.systemConfigApi.getDefaults();
|
const { data: configs } = await api.systemConfigApi.getConfigDefaults();
|
||||||
|
|
||||||
themeConfig = { ...configs.theme };
|
themeConfig = { ...configs.theme };
|
||||||
defaultConfig = { ...configs.theme };
|
defaultConfig = { ...configs.theme };
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
async function getConfigs() {
|
async function getConfigs() {
|
||||||
[savedConfig, defaultConfig] = await Promise.all([
|
[savedConfig, defaultConfig] = await Promise.all([
|
||||||
api.systemConfigApi.getConfig().then((res) => res.data.thumbnail),
|
api.systemConfigApi.getConfig().then((res) => res.data.thumbnail),
|
||||||
api.systemConfigApi.getDefaults().then((res) => res.data.thumbnail),
|
api.systemConfigApi.getConfigDefaults().then((res) => res.data.thumbnail),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -37,7 +37,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function resetToDefault() {
|
async function resetToDefault() {
|
||||||
const { data: configs } = await api.systemConfigApi.getDefaults();
|
const { data: configs } = await api.systemConfigApi.getConfigDefaults();
|
||||||
|
|
||||||
thumbnailConfig = { ...configs.thumbnail };
|
thumbnailConfig = { ...configs.thumbnail };
|
||||||
defaultConfig = { ...configs.thumbnail };
|
defaultConfig = { ...configs.thumbnail };
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
async function getConfigs() {
|
async function getConfigs() {
|
||||||
[savedConfig, defaultConfig] = await Promise.all([
|
[savedConfig, defaultConfig] = await Promise.all([
|
||||||
api.systemConfigApi.getConfig().then((res) => res.data.trash),
|
api.systemConfigApi.getConfig().then((res) => res.data.trash),
|
||||||
api.systemConfigApi.getDefaults().then((res) => res.data.trash),
|
api.systemConfigApi.getConfigDefaults().then((res) => res.data.trash),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -53,7 +53,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function resetToDefault() {
|
async function resetToDefault() {
|
||||||
const { data: configs } = await api.systemConfigApi.getDefaults();
|
const { data: configs } = await api.systemConfigApi.getConfigDefaults();
|
||||||
|
|
||||||
trashConfig = { ...configs.trash };
|
trashConfig = { ...configs.trash };
|
||||||
defaultConfig = { ...configs.trash };
|
defaultConfig = { ...configs.trash };
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
const firstName = form.get('firstName');
|
const firstName = form.get('firstName');
|
||||||
const lastName = form.get('lastName');
|
const lastName = form.get('lastName');
|
||||||
|
|
||||||
const { status } = await api.authenticationApi.adminSignUp({
|
const { status } = await api.authenticationApi.signUpAdmin({
|
||||||
signUpDto: {
|
signUpDto: {
|
||||||
email: String(email),
|
email: String(email),
|
||||||
password: String(password),
|
password: String(password),
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import { page } from '$app/stores';
|
import { page } from '$app/stores';
|
||||||
import { locale, sidebarSettings } from '$lib/stores/preferences.store';
|
import { locale, sidebarSettings } from '$lib/stores/preferences.store';
|
||||||
import { featureFlags } from '$lib/stores/server-config.store';
|
import { featureFlags } from '$lib/stores/server-config.store';
|
||||||
import { AssetApiGetAssetStatsRequest, api } from '@api';
|
import { AssetApiGetAssetStatisticsRequest, api } from '@api';
|
||||||
import {
|
import {
|
||||||
mdiAccount,
|
mdiAccount,
|
||||||
mdiAccountMultiple,
|
mdiAccountMultiple,
|
||||||
@ -23,8 +23,8 @@
|
|||||||
import SideBarButton from './side-bar-button.svelte';
|
import SideBarButton from './side-bar-button.svelte';
|
||||||
import SideBarSection from './side-bar-section.svelte';
|
import SideBarSection from './side-bar-section.svelte';
|
||||||
|
|
||||||
const getStats = async (dto: AssetApiGetAssetStatsRequest) => {
|
const getStats = async (dto: AssetApiGetAssetStatisticsRequest) => {
|
||||||
const { data: stats } = await api.assetApi.getAssetStats(dto);
|
const { data: stats } = await api.assetApi.getAssetStatistics(dto);
|
||||||
return stats;
|
return stats;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
async function readLibraryList() {
|
async function readLibraryList() {
|
||||||
const { data } = await api.libraryApi.getAllForUser();
|
const { data } = await api.libraryApi.getLibraries();
|
||||||
libraries = data;
|
libraries = data;
|
||||||
|
|
||||||
dropdownOpen.length = libraries.length;
|
dropdownOpen.length = libraries.length;
|
||||||
|
@ -25,14 +25,14 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
async function refreshKeys() {
|
async function refreshKeys() {
|
||||||
const { data } = await api.keyApi.getKeys();
|
const { data } = await api.keyApi.getApiKeys();
|
||||||
keys = data;
|
keys = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleCreate = async (event: CustomEvent<APIKeyResponseDto>) => {
|
const handleCreate = async (event: CustomEvent<APIKeyResponseDto>) => {
|
||||||
try {
|
try {
|
||||||
const dto = event.detail;
|
const dto = event.detail;
|
||||||
const { data } = await api.keyApi.createKey({ aPIKeyCreateDto: dto });
|
const { data } = await api.keyApi.createApiKey({ aPIKeyCreateDto: dto });
|
||||||
secret = data.secret;
|
secret = data.secret;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
handleError(error, 'Unable to create a new API Key');
|
handleError(error, 'Unable to create a new API Key');
|
||||||
@ -50,7 +50,7 @@
|
|||||||
const dto = event.detail;
|
const dto = event.detail;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await api.keyApi.updateKey({ id: editKey.id, aPIKeyUpdateDto: { name: dto.name } });
|
await api.keyApi.updateApiKey({ id: editKey.id, aPIKeyUpdateDto: { name: dto.name } });
|
||||||
notificationController.show({
|
notificationController.show({
|
||||||
message: `Saved API Key`,
|
message: `Saved API Key`,
|
||||||
type: NotificationType.Info,
|
type: NotificationType.Info,
|
||||||
@ -69,7 +69,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await api.keyApi.deleteKey({ id: deleteKey.id });
|
await api.keyApi.deleteApiKey({ id: deleteKey.id });
|
||||||
notificationController.show({
|
notificationController.show({
|
||||||
message: `Removed API Key: ${deleteKey.name}`,
|
message: `Removed API Key: ${deleteKey.name}`,
|
||||||
type: NotificationType.Info,
|
type: NotificationType.Info,
|
||||||
|
@ -196,7 +196,7 @@ export class AssetStore {
|
|||||||
|
|
||||||
bucket.cancelToken = new AbortController();
|
bucket.cancelToken = new AbortController();
|
||||||
|
|
||||||
const { data: assets } = await api.assetApi.getByTimeBucket(
|
const { data: assets } = await api.assetApi.getTimeBucket(
|
||||||
{
|
{
|
||||||
...this.options,
|
...this.options,
|
||||||
timeBucket: bucketDate,
|
timeBucket: bucketDate,
|
||||||
@ -206,7 +206,7 @@ export class AssetStore {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (this.albumId) {
|
if (this.albumId) {
|
||||||
const { data: albumAssets } = await api.assetApi.getByTimeBucket(
|
const { data: albumAssets } = await api.assetApi.getTimeBucket(
|
||||||
{
|
{
|
||||||
albumId: this.albumId,
|
albumId: this.albumId,
|
||||||
timeBucket: bucketDate,
|
timeBucket: bucketDate,
|
||||||
|
@ -8,7 +8,7 @@ export const load = (async ({ parent, locals }) => {
|
|||||||
throw redirect(302, AppRoute.AUTH_LOGIN);
|
throw redirect(302, AppRoute.AUTH_LOGIN);
|
||||||
}
|
}
|
||||||
|
|
||||||
const { data: keys } = await locals.api.keyApi.getKeys();
|
const { data: keys } = await locals.api.keyApi.getApiKeys();
|
||||||
const { data: devices } = await locals.api.authenticationApi.getAuthDevices();
|
const { data: devices } = await locals.api.authenticationApi.getAuthDevices();
|
||||||
const { data: partners } = await locals.api.partnerApi.getPartners({ direction: 'shared-by' });
|
const { data: partners } = await locals.api.partnerApi.getPartners({ direction: 'shared-by' });
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ export const load = (async ({ parent, locals: { api } }) => {
|
|||||||
throw redirect(302, AppRoute.PHOTOS);
|
throw redirect(302, AppRoute.PHOTOS);
|
||||||
}
|
}
|
||||||
|
|
||||||
const { data: stats } = await api.serverInfoApi.getStats();
|
const { data: stats } = await api.serverInfoApi.getServerStatistics();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
user,
|
user,
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
setIntervalHandler = setInterval(async () => {
|
setIntervalHandler = setInterval(async () => {
|
||||||
const { data: stats } = await api.serverInfoApi.getStats();
|
const { data: stats } = await api.serverInfoApi.getServerStatistics();
|
||||||
data.stats = stats;
|
data.stats = stats;
|
||||||
}, 5000);
|
}, 5000);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user