diff --git a/mobile/openapi/README.md b/mobile/openapi/README.md index 219df96e7d..25bec3aaf1 100644 Binary files a/mobile/openapi/README.md and b/mobile/openapi/README.md differ diff --git a/mobile/openapi/doc/APIKeyApi.md b/mobile/openapi/doc/APIKeyApi.md index 72af85513a..ecf2fcc674 100644 Binary files a/mobile/openapi/doc/APIKeyApi.md and b/mobile/openapi/doc/APIKeyApi.md differ diff --git a/mobile/openapi/doc/AlbumApi.md b/mobile/openapi/doc/AlbumApi.md index 02405ec988..e7d544708e 100644 Binary files a/mobile/openapi/doc/AlbumApi.md and b/mobile/openapi/doc/AlbumApi.md differ diff --git a/mobile/openapi/doc/AssetApi.md b/mobile/openapi/doc/AssetApi.md index ac35640dd3..e1a4165b3b 100644 Binary files a/mobile/openapi/doc/AssetApi.md and b/mobile/openapi/doc/AssetApi.md differ diff --git a/mobile/openapi/doc/AuthenticationApi.md b/mobile/openapi/doc/AuthenticationApi.md index 8c9b0e2d48..3dc72f90f8 100644 Binary files a/mobile/openapi/doc/AuthenticationApi.md and b/mobile/openapi/doc/AuthenticationApi.md differ diff --git a/mobile/openapi/doc/DeviceInfoApi.md b/mobile/openapi/doc/DeviceInfoApi.md index 47dbd7712b..af1cab2f75 100644 Binary files a/mobile/openapi/doc/DeviceInfoApi.md and b/mobile/openapi/doc/DeviceInfoApi.md differ diff --git a/mobile/openapi/doc/JobApi.md b/mobile/openapi/doc/JobApi.md index 11a6544e07..edb412cd57 100644 Binary files a/mobile/openapi/doc/JobApi.md and b/mobile/openapi/doc/JobApi.md differ diff --git a/mobile/openapi/doc/OAuthApi.md b/mobile/openapi/doc/OAuthApi.md index d1bcec6685..4070fe8795 100644 Binary files a/mobile/openapi/doc/OAuthApi.md and b/mobile/openapi/doc/OAuthApi.md differ diff --git a/mobile/openapi/doc/ServerInfoApi.md b/mobile/openapi/doc/ServerInfoApi.md index 4089a3bafa..df57bc9a79 100644 Binary files a/mobile/openapi/doc/ServerInfoApi.md and b/mobile/openapi/doc/ServerInfoApi.md differ diff --git a/mobile/openapi/doc/ShareApi.md b/mobile/openapi/doc/ShareApi.md index 7123b8ce39..a0673dd28d 100644 Binary files a/mobile/openapi/doc/ShareApi.md and b/mobile/openapi/doc/ShareApi.md differ diff --git a/mobile/openapi/doc/SystemConfigApi.md b/mobile/openapi/doc/SystemConfigApi.md index 74cf32606c..1ed0ada098 100644 Binary files a/mobile/openapi/doc/SystemConfigApi.md and b/mobile/openapi/doc/SystemConfigApi.md differ diff --git a/mobile/openapi/doc/TagApi.md b/mobile/openapi/doc/TagApi.md index 7e3996c10a..bdf66dcfef 100644 Binary files a/mobile/openapi/doc/TagApi.md and b/mobile/openapi/doc/TagApi.md differ diff --git a/mobile/openapi/doc/UserApi.md b/mobile/openapi/doc/UserApi.md index 01b6bd1ad3..d8337ed642 100644 Binary files a/mobile/openapi/doc/UserApi.md and b/mobile/openapi/doc/UserApi.md differ diff --git a/mobile/openapi/lib/api/album_api.dart b/mobile/openapi/lib/api/album_api.dart index f3e2b96d94..8f42545b8b 100644 Binary files a/mobile/openapi/lib/api/album_api.dart and b/mobile/openapi/lib/api/album_api.dart differ diff --git a/mobile/openapi/lib/api/asset_api.dart b/mobile/openapi/lib/api/asset_api.dart index 3bedc290f8..c851b943d7 100644 Binary files a/mobile/openapi/lib/api/asset_api.dart and b/mobile/openapi/lib/api/asset_api.dart differ diff --git a/mobile/openapi/lib/api/share_api.dart b/mobile/openapi/lib/api/share_api.dart index eeaa563088..ce0e4d8d02 100644 Binary files a/mobile/openapi/lib/api/share_api.dart and b/mobile/openapi/lib/api/share_api.dart differ diff --git a/mobile/openapi/test/album_api_test.dart b/mobile/openapi/test/album_api_test.dart index 8d22634b42..eb6f87395e 100644 Binary files a/mobile/openapi/test/album_api_test.dart and b/mobile/openapi/test/album_api_test.dart differ diff --git a/mobile/openapi/test/asset_api_test.dart b/mobile/openapi/test/asset_api_test.dart index 877b5b0aa3..cf428cb186 100644 Binary files a/mobile/openapi/test/asset_api_test.dart and b/mobile/openapi/test/asset_api_test.dart differ diff --git a/mobile/openapi/test/share_api_test.dart b/mobile/openapi/test/share_api_test.dart index af25d6e01f..d746800de4 100644 Binary files a/mobile/openapi/test/share_api_test.dart and b/mobile/openapi/test/share_api_test.dart differ diff --git a/server/apps/immich/src/api-v1/album/album.controller.ts b/server/apps/immich/src/api-v1/album/album.controller.ts index 7ac3f4f284..d41c6ec421 100644 --- a/server/apps/immich/src/api-v1/album/album.controller.ts +++ b/server/apps/immich/src/api-v1/album/album.controller.ts @@ -22,7 +22,7 @@ import { AddUsersDto } from './dto/add-users.dto'; import { RemoveAssetsDto } from './dto/remove-assets.dto'; import { UpdateAlbumDto } from './dto/update-album.dto'; import { GetAlbumsDto } from './dto/get-albums.dto'; -import { ApiBearerAuth, ApiTags } from '@nestjs/swagger'; +import { ApiOkResponse, ApiTags } from '@nestjs/swagger'; import { AlbumResponseDto } from '@app/domain'; import { AlbumCountResponseDto } from './response-dto/album-count-response.dto'; import { AddAssetsResponseDto } from './response-dto/add-assets-response.dto'; @@ -37,7 +37,6 @@ import { CreateAlbumShareLinkDto as CreateAlbumSharedLinkDto } from './dto/creat // TODO might be worth creating a AlbumParamsDto that validates `albumId` instead of using the pipe. -@ApiBearerAuth() @ApiTags('Album') @Controller('album') export class AlbumController { @@ -134,12 +133,13 @@ export class AlbumController { @Authenticated({ isShared: true }) @Get('/:albumId/download') + @ApiOkResponse({ content: { 'application/zip': { schema: { type: 'string', format: 'binary' } } } }) async downloadArchive( @GetAuthUser() authUser: AuthUserDto, @Param('albumId', new ParseUUIDPipe({ version: '4' })) albumId: string, @Query(new ValidationPipe({ transform: true })) dto: DownloadDto, @Response({ passthrough: true }) res: Res, - ): Promise { + ) { this.albumService.checkDownloadAccess(authUser); const { stream, fileName, fileSize, fileCount, complete } = await this.albumService.downloadArchive( diff --git a/server/apps/immich/src/api-v1/asset/asset.controller.ts b/server/apps/immich/src/api-v1/asset/asset.controller.ts index 4c4cdd0e93..d63e99f83c 100644 --- a/server/apps/immich/src/api-v1/asset/asset.controller.ts +++ b/server/apps/immich/src/api-v1/asset/asset.controller.ts @@ -28,7 +28,7 @@ import { Response as Res } from 'express'; import { DeleteAssetDto } from './dto/delete-asset.dto'; import { SearchAssetDto } from './dto/search-asset.dto'; import { CheckDuplicateAssetDto } from './dto/check-duplicate-asset.dto'; -import { ApiBearerAuth, ApiBody, ApiConsumes, ApiHeader, ApiTags } from '@nestjs/swagger'; +import { ApiBody, ApiConsumes, ApiHeader, ApiOkResponse, ApiTags } from '@nestjs/swagger'; import { CuratedObjectsResponseDto } from './response-dto/curated-objects-response.dto'; import { CuratedLocationsResponseDto } from './response-dto/curated-locations-response.dto'; import { AssetResponseDto, ImmichReadStream } from '@app/domain'; @@ -62,7 +62,6 @@ function asStreamableFile({ stream, type, length }: ImmichReadStream) { return new StreamableFile(stream, { type, length }); } -@ApiBearerAuth() @ApiTags('Asset') @Controller('asset') export class AssetController { @@ -108,21 +107,23 @@ export class AssetController { @Authenticated({ isShared: true }) @Get('/download/:assetId') + @ApiOkResponse({ content: { 'application/octet-stream': { schema: { type: 'string', format: 'binary' } } } }) async downloadFile( @GetAuthUser() authUser: AuthUserDto, @Response({ passthrough: true }) res: Res, @Param('assetId') assetId: string, - ): Promise { + ) { return this.assetService.downloadFile(authUser, assetId).then(asStreamableFile); } @Authenticated({ isShared: true }) @Post('/download-files') + @ApiOkResponse({ content: { 'application/octet-stream': { schema: { type: 'string', format: 'binary' } } } }) async downloadFiles( @GetAuthUser() authUser: AuthUserDto, @Response({ passthrough: true }) res: Res, @Body(new ValidationPipe()) dto: DownloadFilesDto, - ): Promise { + ) { this.assetService.checkDownloadAccess(authUser); await this.assetService.checkAssetsAccess(authUser, [...dto.assetIds]); const { stream, fileName, fileSize, fileCount, complete } = await this.assetService.downloadFiles(dto); @@ -138,11 +139,12 @@ export class AssetController { */ @Authenticated({ isShared: true }) @Get('/download-library') + @ApiOkResponse({ content: { 'application/octet-stream': { schema: { type: 'string', format: 'binary' } } } }) async downloadLibrary( @GetAuthUser() authUser: AuthUserDto, @Query(new ValidationPipe({ transform: true })) dto: DownloadDto, @Response({ passthrough: true }) res: Res, - ): Promise { + ) { this.assetService.checkDownloadAccess(authUser); const { stream, fileName, fileSize, fileCount, complete } = await this.assetService.downloadLibrary(authUser, dto); res.attachment(fileName); @@ -155,13 +157,14 @@ export class AssetController { @Authenticated({ isShared: true }) @Get('/file/:assetId') @Header('Cache-Control', 'max-age=31536000') + @ApiOkResponse({ content: { 'application/octet-stream': { schema: { type: 'string', format: 'binary' } } } }) async serveFile( @GetAuthUser() authUser: AuthUserDto, @Headers() headers: Record, @Response({ passthrough: true }) res: Res, @Query(new ValidationPipe({ transform: true })) query: ServeFileDto, @Param('assetId') assetId: string, - ): Promise { + ) { await this.assetService.checkAssetsAccess(authUser, [assetId]); return this.assetService.serveFile(authUser, assetId, query, res, headers); } @@ -169,13 +172,14 @@ export class AssetController { @Authenticated({ isShared: true }) @Get('/thumbnail/:assetId') @Header('Cache-Control', 'max-age=31536000') + @ApiOkResponse({ content: { 'application/octet-stream': { schema: { type: 'string', format: 'binary' } } } }) async getAssetThumbnail( @GetAuthUser() authUser: AuthUserDto, @Headers() headers: Record, @Response({ passthrough: true }) res: Res, @Param('assetId') assetId: string, @Query(new ValidationPipe({ transform: true })) query: GetAssetThumbnailDto, - ): Promise { + ) { await this.assetService.checkAssetsAccess(authUser, [assetId]); return this.assetService.getAssetThumbnail(assetId, query, res, headers); } diff --git a/server/apps/immich/src/api-v1/job/job.controller.ts b/server/apps/immich/src/api-v1/job/job.controller.ts index a6228ddcc1..6abcdb5428 100644 --- a/server/apps/immich/src/api-v1/job/job.controller.ts +++ b/server/apps/immich/src/api-v1/job/job.controller.ts @@ -1,5 +1,5 @@ import { Body, Controller, Get, Param, Put, ValidationPipe } from '@nestjs/common'; -import { ApiBearerAuth, ApiTags } from '@nestjs/swagger'; +import { ApiTags } from '@nestjs/swagger'; import { Authenticated } from '../../decorators/authenticated.decorator'; import { AllJobStatusResponseDto } from './response-dto/all-job-status-response.dto'; import { GetJobDto } from './dto/get-job.dto'; @@ -8,7 +8,6 @@ import { JobCommandDto } from './dto/job-command.dto'; @Authenticated({ admin: true }) @ApiTags('Job') -@ApiBearerAuth() @Controller('jobs') export class JobController { constructor(private readonly jobService: JobService) {} diff --git a/server/apps/immich/src/controllers/auth.controller.ts b/server/apps/immich/src/controllers/auth.controller.ts index 5ba2716b54..d244807671 100644 --- a/server/apps/immich/src/controllers/auth.controller.ts +++ b/server/apps/immich/src/controllers/auth.controller.ts @@ -14,7 +14,7 @@ import { ValidateAccessTokenResponseDto, } from '@app/domain'; import { Body, Controller, Ip, Post, Req, Res, ValidationPipe } from '@nestjs/common'; -import { ApiBadRequestResponse, ApiBearerAuth, ApiTags } from '@nestjs/swagger'; +import { ApiBadRequestResponse, ApiTags } from '@nestjs/swagger'; import { Request, Response } from 'express'; import { GetAuthUser } from '../decorators/auth-user.decorator'; import { Authenticated } from '../decorators/authenticated.decorator'; @@ -45,7 +45,6 @@ export class AuthController { } @Authenticated() - @ApiBearerAuth() @Post('validateToken') // eslint-disable-next-line @typescript-eslint/no-unused-vars validateAccessToken(@GetAuthUser() authUser: AuthUserDto): ValidateAccessTokenResponseDto { @@ -53,7 +52,6 @@ export class AuthController { } @Authenticated() - @ApiBearerAuth() @Post('change-password') async changePassword(@GetAuthUser() authUser: AuthUserDto, @Body() dto: ChangePasswordDto): Promise { return this.authService.changePassword(authUser, dto); diff --git a/server/apps/immich/src/controllers/device-info.controller.ts b/server/apps/immich/src/controllers/device-info.controller.ts index 7b2b5e8adb..f651edd2b5 100644 --- a/server/apps/immich/src/controllers/device-info.controller.ts +++ b/server/apps/immich/src/controllers/device-info.controller.ts @@ -5,12 +5,11 @@ import { UpsertDeviceInfoDto as UpsertDto, } from '@app/domain'; import { Body, Controller, Put, ValidationPipe } from '@nestjs/common'; -import { ApiBearerAuth, ApiTags } from '@nestjs/swagger'; +import { ApiTags } from '@nestjs/swagger'; import { GetAuthUser } from '../decorators/auth-user.decorator'; import { Authenticated } from '../decorators/authenticated.decorator'; @Authenticated() -@ApiBearerAuth() @ApiTags('Device Info') @Controller('device-info') export class DeviceInfoController { diff --git a/server/apps/immich/src/controllers/system-config.controller.ts b/server/apps/immich/src/controllers/system-config.controller.ts index d815683258..924a40a09f 100644 --- a/server/apps/immich/src/controllers/system-config.controller.ts +++ b/server/apps/immich/src/controllers/system-config.controller.ts @@ -1,10 +1,9 @@ import { SystemConfigDto, SystemConfigService, SystemConfigTemplateStorageOptionDto } from '@app/domain'; import { Body, Controller, Get, Put, ValidationPipe } from '@nestjs/common'; -import { ApiBearerAuth, ApiTags } from '@nestjs/swagger'; +import { ApiTags } from '@nestjs/swagger'; import { Authenticated } from '../decorators/authenticated.decorator'; @ApiTags('System Config') -@ApiBearerAuth() @Authenticated({ admin: true }) @Controller('system-config') export class SystemConfigController { diff --git a/server/apps/immich/src/controllers/user.controller.ts b/server/apps/immich/src/controllers/user.controller.ts index 723bfcadfb..99817fe3b0 100644 --- a/server/apps/immich/src/controllers/user.controller.ts +++ b/server/apps/immich/src/controllers/user.controller.ts @@ -23,7 +23,7 @@ import { UpdateUserDto } from '@app/domain'; import { FileInterceptor } from '@nestjs/platform-express'; import { profileImageUploadOption } from '../config/profile-image-upload.config'; import { Response as Res } from 'express'; -import { ApiBearerAuth, ApiBody, ApiConsumes, ApiTags } from '@nestjs/swagger'; +import { ApiBody, ApiConsumes, ApiTags } from '@nestjs/swagger'; import { UserResponseDto } from '@app/domain'; import { UserCountResponseDto } from '@app/domain'; import { CreateProfileImageDto } from '@app/domain'; @@ -36,7 +36,6 @@ export class UserController { constructor(private readonly userService: UserService) {} @Authenticated() - @ApiBearerAuth() @Get() async getAllUsers( @GetAuthUser() authUser: AuthUserDto, @@ -51,14 +50,12 @@ export class UserController { } @Authenticated() - @ApiBearerAuth() @Get('me') async getMyUserInfo(@GetAuthUser() authUser: AuthUserDto): Promise { return await this.userService.getUserInfo(authUser); } @Authenticated({ admin: true }) - @ApiBearerAuth() @Post() async createUser( @Body(new ValidationPipe({ transform: true })) createUserDto: CreateUserDto, @@ -72,21 +69,18 @@ export class UserController { } @Authenticated({ admin: true }) - @ApiBearerAuth() @Delete('/:userId') async deleteUser(@GetAuthUser() authUser: AuthUserDto, @Param('userId') userId: string): Promise { return await this.userService.deleteUser(authUser, userId); } @Authenticated({ admin: true }) - @ApiBearerAuth() @Post('/:userId/restore') async restoreUser(@GetAuthUser() authUser: AuthUserDto, @Param('userId') userId: string): Promise { return await this.userService.restoreUser(authUser, userId); } @Authenticated() - @ApiBearerAuth() @Put() async updateUser( @GetAuthUser() authUser: AuthUserDto, @@ -97,7 +91,6 @@ export class UserController { @UseInterceptors(FileInterceptor('file', profileImageUploadOption)) @Authenticated() - @ApiBearerAuth() @ApiConsumes('multipart/form-data') @ApiBody({ description: 'A new avatar for the user', diff --git a/server/apps/immich/src/decorators/authenticated.decorator.ts b/server/apps/immich/src/decorators/authenticated.decorator.ts index 212b65bdbb..c176f95f73 100644 --- a/server/apps/immich/src/decorators/authenticated.decorator.ts +++ b/server/apps/immich/src/decorators/authenticated.decorator.ts @@ -1,4 +1,5 @@ import { applyDecorators, SetMetadata } from '@nestjs/common'; +import { ApiBearerAuth, ApiCookieAuth, ApiQuery } from '@nestjs/swagger'; interface AuthenticatedOptions { admin?: boolean; @@ -12,7 +13,7 @@ export enum Metadata { } export const Authenticated = (options?: AuthenticatedOptions) => { - const decorators = [SetMetadata(Metadata.AUTH_ROUTE, true)]; + const decorators: MethodDecorator[] = [ApiBearerAuth(), ApiCookieAuth(), SetMetadata(Metadata.AUTH_ROUTE, true)]; options = options || {}; @@ -22,6 +23,7 @@ export const Authenticated = (options?: AuthenticatedOptions) => { if (options.isShared) { decorators.push(SetMetadata(Metadata.SHARED_ROUTE, true)); + decorators.push(ApiQuery({ name: 'key', type: String, required: false })); } return applyDecorators(...decorators); diff --git a/server/apps/immich/src/main.ts b/server/apps/immich/src/main.ts index 37dd5ecfad..185ae2b184 100644 --- a/server/apps/immich/src/main.ts +++ b/server/apps/immich/src/main.ts @@ -11,6 +11,7 @@ import { RedisIoAdapter } from './middlewares/redis-io.adapter.middleware'; import { json } from 'body-parser'; import { patchOpenAPI } from './utils/patch-open-api.util'; import { getLogLevels, MACHINE_LEARNING_ENABLED } from '@app/common'; +import { IMMICH_ACCESS_COOKIE } from '@app/domain'; const logger = new Logger('ImmichServer'); @@ -42,6 +43,7 @@ async function bootstrap() { scheme: 'Bearer', in: 'header', }) + .addCookieAuth(IMMICH_ACCESS_COOKIE) .addServer('/api') .build(); diff --git a/server/immich-openapi-specs.json b/server/immich-openapi-specs.json index 37c2df60cb..a89e62a3ac 100644 --- a/server/immich-openapi-specs.json +++ b/server/immich-openapi-specs.json @@ -30,6 +30,14 @@ }, "tags": [ "API Key" + ], + "security": [ + { + "bearer": [] + }, + { + "cookie": [] + } ] }, "get": { @@ -53,6 +61,14 @@ }, "tags": [ "API Key" + ], + "security": [ + { + "bearer": [] + }, + { + "cookie": [] + } ] } }, @@ -84,6 +100,14 @@ }, "tags": [ "API Key" + ], + "security": [ + { + "bearer": [] + }, + { + "cookie": [] + } ] }, "put": { @@ -123,6 +147,14 @@ }, "tags": [ "API Key" + ], + "security": [ + { + "bearer": [] + }, + { + "cookie": [] + } ] }, "delete": { @@ -145,6 +177,14 @@ }, "tags": [ "API Key" + ], + "security": [ + { + "bearer": [] + }, + { + "cookie": [] + } ] } }, @@ -238,6 +278,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -275,6 +318,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -298,6 +344,14 @@ }, "tags": [ "Authentication" + ], + "security": [ + { + "bearer": [] + }, + { + "cookie": [] + } ] } }, @@ -334,6 +388,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -446,6 +503,14 @@ }, "tags": [ "OAuth" + ], + "security": [ + { + "bearer": [] + }, + { + "cookie": [] + } ] } }, @@ -468,6 +533,14 @@ }, "tags": [ "OAuth" + ], + "security": [ + { + "bearer": [] + }, + { + "cookie": [] + } ] } }, @@ -493,6 +566,14 @@ }, "tags": [ "share" + ], + "security": [ + { + "bearer": [] + }, + { + "cookie": [] + } ] } }, @@ -500,7 +581,16 @@ "get": { "operationId": "getMySharedLink", "description": "", - "parameters": [], + "parameters": [ + { + "name": "key", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -515,6 +605,14 @@ }, "tags": [ "share" + ], + "security": [ + { + "bearer": [] + }, + { + "cookie": [] + } ] } }, @@ -546,6 +644,14 @@ }, "tags": [ "share" + ], + "security": [ + { + "bearer": [] + }, + { + "cookie": [] + } ] }, "delete": { @@ -568,6 +674,14 @@ }, "tags": [ "share" + ], + "security": [ + { + "bearer": [] + }, + { + "cookie": [] + } ] }, "patch": { @@ -607,6 +721,14 @@ }, "tags": [ "share" + ], + "security": [ + { + "bearer": [] + }, + { + "cookie": [] + } ] } }, @@ -633,6 +755,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] }, @@ -668,6 +793,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -695,6 +823,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -722,6 +853,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -761,6 +895,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] }, @@ -796,6 +933,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] }, @@ -831,6 +971,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -889,6 +1032,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -957,6 +1103,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -993,6 +1142,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -1031,6 +1183,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -1070,7 +1225,16 @@ "post": { "operationId": "uploadFile", "description": "", - "parameters": [], + "parameters": [ + { + "name": "key", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + } + ], "requestBody": { "required": true, "description": "Asset Upload Information", @@ -1100,6 +1264,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -1116,18 +1283,27 @@ "schema": { "type": "string" } + }, + { + "name": "key", + "required": false, + "in": "query", + "schema": { + "type": "string" + } } ], "responses": { "200": { - "description": "", "content": { - "application/json": { + "application/octet-stream": { "schema": { - "type": "object" + "type": "string", + "format": "binary" } } - } + }, + "description": "" } }, "tags": [ @@ -1136,6 +1312,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -1144,7 +1323,16 @@ "post": { "operationId": "downloadFiles", "description": "", - "parameters": [], + "parameters": [ + { + "name": "key", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + } + ], "requestBody": { "required": true, "content": { @@ -1156,15 +1344,19 @@ } }, "responses": { - "201": { - "description": "", + "200": { "content": { - "application/json": { + "application/octet-stream": { "schema": { - "type": "object" + "type": "string", + "format": "binary" } } - } + }, + "description": "" + }, + "201": { + "description": "" } }, "tags": [ @@ -1173,6 +1365,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -1189,18 +1384,27 @@ "schema": { "type": "number" } + }, + { + "name": "key", + "required": false, + "in": "query", + "schema": { + "type": "string" + } } ], "responses": { "200": { - "description": "", "content": { - "application/json": { + "application/octet-stream": { "schema": { - "type": "object" + "type": "string", + "format": "binary" } } - } + }, + "description": "" } }, "tags": [ @@ -1209,6 +1413,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -1243,18 +1450,27 @@ "schema": { "type": "string" } + }, + { + "name": "key", + "required": false, + "in": "query", + "schema": { + "type": "string" + } } ], "responses": { "200": { - "description": "", "content": { - "application/json": { + "application/octet-stream": { "schema": { - "type": "object" + "type": "string", + "format": "binary" } } - } + }, + "description": "" } }, "tags": [ @@ -1263,6 +1479,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -1287,18 +1506,27 @@ "schema": { "$ref": "#/components/schemas/ThumbnailFormat" } + }, + { + "name": "key", + "required": false, + "in": "query", + "schema": { + "type": "string" + } } ], "responses": { "200": { - "description": "", "content": { - "application/json": { + "application/octet-stream": { "schema": { - "type": "object" + "type": "string", + "format": "binary" } } - } + }, + "description": "" } }, "tags": [ @@ -1307,6 +1535,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -1337,6 +1568,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -1367,6 +1601,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -1397,6 +1634,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -1437,6 +1677,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -1474,6 +1717,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -1501,6 +1747,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -1557,6 +1806,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] }, @@ -1595,6 +1847,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -1635,6 +1890,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -1674,6 +1932,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -1690,6 +1951,14 @@ "schema": { "type": "string" } + }, + { + "name": "key", + "required": false, + "in": "query", + "schema": { + "type": "string" + } } ], "responses": { @@ -1710,6 +1979,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -1756,6 +2028,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -1764,7 +2039,16 @@ "post": { "operationId": "checkDuplicateAsset", "description": "Check duplicated asset before uploading - for Web upload used", - "parameters": [], + "parameters": [ + { + "name": "key", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + } + ], "requestBody": { "required": true, "content": { @@ -1793,6 +2077,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -1830,6 +2117,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -1867,6 +2157,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -1875,7 +2168,16 @@ "patch": { "operationId": "addAssetsToSharedLink", "description": "", - "parameters": [], + "parameters": [ + { + "name": "key", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + } + ], "requestBody": { "required": true, "content": { @@ -1904,6 +2206,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -1912,7 +2217,16 @@ "patch": { "operationId": "removeAssetsFromSharedLink", "description": "", - "parameters": [], + "parameters": [ + { + "name": "key", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + } + ], "requestBody": { "required": true, "content": { @@ -1941,6 +2255,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -1974,6 +2291,14 @@ }, "tags": [ "Tag" + ], + "security": [ + { + "bearer": [] + }, + { + "cookie": [] + } ] }, "get": { @@ -1997,6 +2322,14 @@ }, "tags": [ "Tag" + ], + "security": [ + { + "bearer": [] + }, + { + "cookie": [] + } ] } }, @@ -2028,6 +2361,14 @@ }, "tags": [ "Tag" + ], + "security": [ + { + "bearer": [] + }, + { + "cookie": [] + } ] }, "patch": { @@ -2067,6 +2408,14 @@ }, "tags": [ "Tag" + ], + "security": [ + { + "bearer": [] + }, + { + "cookie": [] + } ] }, "delete": { @@ -2089,6 +2438,14 @@ }, "tags": [ "Tag" + ], + "security": [ + { + "bearer": [] + }, + { + "cookie": [] + } ] } }, @@ -2115,6 +2472,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -2152,6 +2512,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] }, @@ -2198,6 +2561,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -2244,6 +2610,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -2260,6 +2629,14 @@ "schema": { "type": "string" } + }, + { + "name": "key", + "required": false, + "in": "query", + "schema": { + "type": "string" + } } ], "requestBody": { @@ -2290,6 +2667,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] }, @@ -2334,6 +2714,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -2350,6 +2733,14 @@ "schema": { "type": "string" } + }, + { + "name": "key", + "required": false, + "in": "query", + "schema": { + "type": "string" + } } ], "responses": { @@ -2370,6 +2761,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] }, @@ -2397,6 +2791,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] }, @@ -2441,6 +2838,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -2478,6 +2878,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -2502,18 +2905,27 @@ "schema": { "type": "number" } + }, + { + "name": "key", + "required": false, + "in": "query", + "schema": { + "type": "string" + } } ], "responses": { "200": { - "description": "", "content": { - "application/json": { + "application/zip": { "schema": { - "type": "object" + "type": "string", + "format": "binary" } } - } + }, + "description": "" } }, "tags": [ @@ -2522,6 +2934,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -2559,6 +2974,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -2648,6 +3066,14 @@ }, "tags": [ "Server Info" + ], + "security": [ + { + "bearer": [] + }, + { + "cookie": [] + } ] } }, @@ -2674,6 +3100,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -2720,6 +3149,9 @@ "security": [ { "bearer": [] + }, + { + "cookie": [] } ] } @@ -2744,6 +3176,11 @@ "bearerFormat": "JWT", "type": "http", "in": "header" + }, + "cookie": { + "type": "apiKey", + "in": "cookie", + "name": "immich_access_token" } }, "schemas": { diff --git a/web/src/api/open-api/api.ts b/web/src/api/open-api/api.ts index 79c6913b11..45571fd946 100644 --- a/web/src/api/open-api/api.ts +++ b/web/src/api/open-api/api.ts @@ -2328,6 +2328,12 @@ export const APIKeyApiAxiosParamCreator = function (configuration?: Configuratio const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + // authentication cookie required + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -2364,6 +2370,12 @@ export const APIKeyApiAxiosParamCreator = function (configuration?: Configuratio const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -2397,6 +2409,12 @@ export const APIKeyApiAxiosParamCreator = function (configuration?: Configuratio const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -2426,6 +2444,12 @@ export const APIKeyApiAxiosParamCreator = function (configuration?: Configuratio const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -2462,6 +2486,12 @@ export const APIKeyApiAxiosParamCreator = function (configuration?: Configuratio const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + // authentication cookie required + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -2668,10 +2698,11 @@ export const AlbumApiAxiosParamCreator = function (configuration?: Configuration * * @param {string} albumId * @param {AddAssetsDto} addAssetsDto + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - addAssetsToAlbum: async (albumId: string, addAssetsDto: AddAssetsDto, options: AxiosRequestConfig = {}): Promise => { + addAssetsToAlbum: async (albumId: string, addAssetsDto: AddAssetsDto, key?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'albumId' is not null or undefined assertParamExists('addAssetsToAlbum', 'albumId', albumId) // verify required parameter 'addAssetsDto' is not null or undefined @@ -2693,6 +2724,12 @@ export const AlbumApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + + if (key !== undefined) { + localVarQueryParameter['key'] = key; + } + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -2736,6 +2773,8 @@ export const AlbumApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -2775,6 +2814,8 @@ export const AlbumApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -2814,6 +2855,8 @@ export const AlbumApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -2854,6 +2897,8 @@ export const AlbumApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -2869,10 +2914,11 @@ export const AlbumApiAxiosParamCreator = function (configuration?: Configuration * * @param {string} albumId * @param {number} [skip] + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - downloadArchive: async (albumId: string, skip?: number, options: AxiosRequestConfig = {}): Promise => { + downloadArchive: async (albumId: string, skip?: number, key?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'albumId' is not null or undefined assertParamExists('downloadArchive', 'albumId', albumId) const localVarPath = `/album/{albumId}/download` @@ -2892,10 +2938,16 @@ export const AlbumApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + if (skip !== undefined) { localVarQueryParameter['skip'] = skip; } + if (key !== undefined) { + localVarQueryParameter['key'] = key; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -2929,6 +2981,8 @@ export const AlbumApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -2943,10 +2997,11 @@ export const AlbumApiAxiosParamCreator = function (configuration?: Configuration /** * * @param {string} albumId + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getAlbumInfo: async (albumId: string, options: AxiosRequestConfig = {}): Promise => { + getAlbumInfo: async (albumId: string, key?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'albumId' is not null or undefined assertParamExists('getAlbumInfo', 'albumId', albumId) const localVarPath = `/album/{albumId}` @@ -2966,6 +3021,12 @@ export const AlbumApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + + if (key !== undefined) { + localVarQueryParameter['key'] = key; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -3001,6 +3062,8 @@ export const AlbumApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + if (shared !== undefined) { localVarQueryParameter['shared'] = shared; } @@ -3049,6 +3112,8 @@ export const AlbumApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -3093,6 +3158,8 @@ export const AlbumApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -3133,6 +3200,8 @@ export const AlbumApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -3161,11 +3230,12 @@ export const AlbumApiFp = function(configuration?: Configuration) { * * @param {string} albumId * @param {AddAssetsDto} addAssetsDto + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async addAssetsToAlbum(albumId: string, addAssetsDto: AddAssetsDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.addAssetsToAlbum(albumId, addAssetsDto, options); + async addAssetsToAlbum(albumId: string, addAssetsDto: AddAssetsDto, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.addAssetsToAlbum(albumId, addAssetsDto, key, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -3213,11 +3283,12 @@ export const AlbumApiFp = function(configuration?: Configuration) { * * @param {string} albumId * @param {number} [skip] + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async downloadArchive(albumId: string, skip?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.downloadArchive(albumId, skip, options); + async downloadArchive(albumId: string, skip?: number, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.downloadArchive(albumId, skip, key, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -3232,11 +3303,12 @@ export const AlbumApiFp = function(configuration?: Configuration) { /** * * @param {string} albumId + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getAlbumInfo(albumId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getAlbumInfo(albumId, options); + async getAlbumInfo(albumId: string, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAlbumInfo(albumId, key, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -3297,11 +3369,12 @@ export const AlbumApiFactory = function (configuration?: Configuration, basePath * * @param {string} albumId * @param {AddAssetsDto} addAssetsDto + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - addAssetsToAlbum(albumId: string, addAssetsDto: AddAssetsDto, options?: any): AxiosPromise { - return localVarFp.addAssetsToAlbum(albumId, addAssetsDto, options).then((request) => request(axios, basePath)); + addAssetsToAlbum(albumId: string, addAssetsDto: AddAssetsDto, key?: string, options?: any): AxiosPromise { + return localVarFp.addAssetsToAlbum(albumId, addAssetsDto, key, options).then((request) => request(axios, basePath)); }, /** * @@ -3344,11 +3417,12 @@ export const AlbumApiFactory = function (configuration?: Configuration, basePath * * @param {string} albumId * @param {number} [skip] + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - downloadArchive(albumId: string, skip?: number, options?: any): AxiosPromise { - return localVarFp.downloadArchive(albumId, skip, options).then((request) => request(axios, basePath)); + downloadArchive(albumId: string, skip?: number, key?: string, options?: any): AxiosPromise { + return localVarFp.downloadArchive(albumId, skip, key, options).then((request) => request(axios, basePath)); }, /** * @@ -3361,11 +3435,12 @@ export const AlbumApiFactory = function (configuration?: Configuration, basePath /** * * @param {string} albumId + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getAlbumInfo(albumId: string, options?: any): AxiosPromise { - return localVarFp.getAlbumInfo(albumId, options).then((request) => request(axios, basePath)); + getAlbumInfo(albumId: string, key?: string, options?: any): AxiosPromise { + return localVarFp.getAlbumInfo(albumId, key, options).then((request) => request(axios, basePath)); }, /** * @@ -3421,12 +3496,13 @@ export class AlbumApi extends BaseAPI { * * @param {string} albumId * @param {AddAssetsDto} addAssetsDto + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AlbumApi */ - public addAssetsToAlbum(albumId: string, addAssetsDto: AddAssetsDto, options?: AxiosRequestConfig) { - return AlbumApiFp(this.configuration).addAssetsToAlbum(albumId, addAssetsDto, options).then((request) => request(this.axios, this.basePath)); + public addAssetsToAlbum(albumId: string, addAssetsDto: AddAssetsDto, key?: string, options?: AxiosRequestConfig) { + return AlbumApiFp(this.configuration).addAssetsToAlbum(albumId, addAssetsDto, key, options).then((request) => request(this.axios, this.basePath)); } /** @@ -3478,12 +3554,13 @@ export class AlbumApi extends BaseAPI { * * @param {string} albumId * @param {number} [skip] + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AlbumApi */ - public downloadArchive(albumId: string, skip?: number, options?: AxiosRequestConfig) { - return AlbumApiFp(this.configuration).downloadArchive(albumId, skip, options).then((request) => request(this.axios, this.basePath)); + public downloadArchive(albumId: string, skip?: number, key?: string, options?: AxiosRequestConfig) { + return AlbumApiFp(this.configuration).downloadArchive(albumId, skip, key, options).then((request) => request(this.axios, this.basePath)); } /** @@ -3499,12 +3576,13 @@ export class AlbumApi extends BaseAPI { /** * * @param {string} albumId + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AlbumApi */ - public getAlbumInfo(albumId: string, options?: AxiosRequestConfig) { - return AlbumApiFp(this.configuration).getAlbumInfo(albumId, options).then((request) => request(this.axios, this.basePath)); + public getAlbumInfo(albumId: string, key?: string, options?: AxiosRequestConfig) { + return AlbumApiFp(this.configuration).getAlbumInfo(albumId, key, options).then((request) => request(this.axios, this.basePath)); } /** @@ -3566,10 +3644,11 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration /** * * @param {AddAssetsDto} addAssetsDto + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - addAssetsToSharedLink: async (addAssetsDto: AddAssetsDto, options: AxiosRequestConfig = {}): Promise => { + addAssetsToSharedLink: async (addAssetsDto: AddAssetsDto, key?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'addAssetsDto' is not null or undefined assertParamExists('addAssetsToSharedLink', 'addAssetsDto', addAssetsDto) const localVarPath = `/asset/shared-link/add`; @@ -3588,6 +3667,12 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + + if (key !== undefined) { + localVarQueryParameter['key'] = key; + } + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -3605,10 +3690,11 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration /** * Check duplicated asset before uploading - for Web upload used * @param {CheckDuplicateAssetDto} checkDuplicateAssetDto + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - checkDuplicateAsset: async (checkDuplicateAssetDto: CheckDuplicateAssetDto, options: AxiosRequestConfig = {}): Promise => { + checkDuplicateAsset: async (checkDuplicateAssetDto: CheckDuplicateAssetDto, key?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'checkDuplicateAssetDto' is not null or undefined assertParamExists('checkDuplicateAsset', 'checkDuplicateAssetDto', checkDuplicateAssetDto) const localVarPath = `/asset/check`; @@ -3627,6 +3713,12 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + + if (key !== undefined) { + localVarQueryParameter['key'] = key; + } + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -3666,6 +3758,8 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -3705,6 +3799,8 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -3744,6 +3840,8 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -3761,10 +3859,11 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration /** * * @param {string} assetId + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - downloadFile: async (assetId: string, options: AxiosRequestConfig = {}): Promise => { + downloadFile: async (assetId: string, key?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'assetId' is not null or undefined assertParamExists('downloadFile', 'assetId', assetId) const localVarPath = `/asset/download/{assetId}` @@ -3784,6 +3883,12 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + + if (key !== undefined) { + localVarQueryParameter['key'] = key; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -3798,10 +3903,11 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration /** * * @param {DownloadFilesDto} downloadFilesDto + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - downloadFiles: async (downloadFilesDto: DownloadFilesDto, options: AxiosRequestConfig = {}): Promise => { + downloadFiles: async (downloadFilesDto: DownloadFilesDto, key?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'downloadFilesDto' is not null or undefined assertParamExists('downloadFiles', 'downloadFilesDto', downloadFilesDto) const localVarPath = `/asset/download-files`; @@ -3820,6 +3926,12 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + + if (key !== undefined) { + localVarQueryParameter['key'] = key; + } + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -3837,10 +3949,11 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration /** * Current this is not used in any UI element * @param {number} [skip] + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - downloadLibrary: async (skip?: number, options: AxiosRequestConfig = {}): Promise => { + downloadLibrary: async (skip?: number, key?: string, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/asset/download-library`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -3857,10 +3970,16 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + if (skip !== undefined) { localVarQueryParameter['skip'] = skip; } + if (key !== undefined) { + localVarQueryParameter['key'] = key; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -3897,6 +4016,8 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + if (isFavorite !== undefined) { localVarQueryParameter['isFavorite'] = isFavorite; } @@ -3923,10 +4044,11 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration /** * Get a single asset\'s information * @param {string} assetId + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getAssetById: async (assetId: string, options: AxiosRequestConfig = {}): Promise => { + getAssetById: async (assetId: string, key?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'assetId' is not null or undefined assertParamExists('getAssetById', 'assetId', assetId) const localVarPath = `/asset/assetById/{assetId}` @@ -3946,6 +4068,12 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + + if (key !== undefined) { + localVarQueryParameter['key'] = key; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -3982,6 +4110,8 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -4021,6 +4151,8 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -4057,6 +4189,8 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -4090,6 +4224,8 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -4105,10 +4241,11 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration * * @param {string} assetId * @param {ThumbnailFormat} [format] + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getAssetThumbnail: async (assetId: string, format?: ThumbnailFormat, options: AxiosRequestConfig = {}): Promise => { + getAssetThumbnail: async (assetId: string, format?: ThumbnailFormat, key?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'assetId' is not null or undefined assertParamExists('getAssetThumbnail', 'assetId', assetId) const localVarPath = `/asset/thumbnail/{assetId}` @@ -4128,10 +4265,16 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + if (format !== undefined) { localVarQueryParameter['format'] = format; } + if (key !== undefined) { + localVarQueryParameter['key'] = key; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -4165,6 +4308,8 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -4198,6 +4343,8 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -4235,6 +4382,8 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -4249,10 +4398,11 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration /** * * @param {RemoveAssetsDto} removeAssetsDto + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - removeAssetsFromSharedLink: async (removeAssetsDto: RemoveAssetsDto, options: AxiosRequestConfig = {}): Promise => { + removeAssetsFromSharedLink: async (removeAssetsDto: RemoveAssetsDto, key?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'removeAssetsDto' is not null or undefined assertParamExists('removeAssetsFromSharedLink', 'removeAssetsDto', removeAssetsDto) const localVarPath = `/asset/shared-link/remove`; @@ -4271,6 +4421,12 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + + if (key !== undefined) { + localVarQueryParameter['key'] = key; + } + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -4310,6 +4466,8 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -4329,10 +4487,11 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration * @param {string} assetId * @param {boolean} [isThumb] * @param {boolean} [isWeb] + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - serveFile: async (assetId: string, isThumb?: boolean, isWeb?: boolean, options: AxiosRequestConfig = {}): Promise => { + serveFile: async (assetId: string, isThumb?: boolean, isWeb?: boolean, key?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'assetId' is not null or undefined assertParamExists('serveFile', 'assetId', assetId) const localVarPath = `/asset/file/{assetId}` @@ -4352,6 +4511,8 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + if (isThumb !== undefined) { localVarQueryParameter['isThumb'] = isThumb; } @@ -4360,6 +4521,10 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration localVarQueryParameter['isWeb'] = isWeb; } + if (key !== undefined) { + localVarQueryParameter['key'] = key; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -4400,6 +4565,8 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -4424,13 +4591,14 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration * @param {string} fileModifiedAt * @param {boolean} isFavorite * @param {string} fileExtension + * @param {string} [key] * @param {any} [livePhotoData] * @param {boolean} [isVisible] * @param {string} [duration] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - uploadFile: async (assetType: AssetTypeEnum, assetData: any, deviceAssetId: string, deviceId: string, fileCreatedAt: string, fileModifiedAt: string, isFavorite: boolean, fileExtension: string, livePhotoData?: any, isVisible?: boolean, duration?: string, options: AxiosRequestConfig = {}): Promise => { + uploadFile: async (assetType: AssetTypeEnum, assetData: any, deviceAssetId: string, deviceId: string, fileCreatedAt: string, fileModifiedAt: string, isFavorite: boolean, fileExtension: string, key?: string, livePhotoData?: any, isVisible?: boolean, duration?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'assetType' is not null or undefined assertParamExists('uploadFile', 'assetType', assetType) // verify required parameter 'assetData' is not null or undefined @@ -4464,6 +4632,12 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + + if (key !== undefined) { + localVarQueryParameter['key'] = key; + } + if (assetType !== undefined) { localVarFormParams.append('assetType', new Blob([JSON.stringify(assetType)], { type: "application/json", })); @@ -4535,21 +4709,23 @@ export const AssetApiFp = function(configuration?: Configuration) { /** * * @param {AddAssetsDto} addAssetsDto + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async addAssetsToSharedLink(addAssetsDto: AddAssetsDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.addAssetsToSharedLink(addAssetsDto, options); + async addAssetsToSharedLink(addAssetsDto: AddAssetsDto, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.addAssetsToSharedLink(addAssetsDto, key, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Check duplicated asset before uploading - for Web upload used * @param {CheckDuplicateAssetDto} checkDuplicateAssetDto + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async checkDuplicateAsset(checkDuplicateAssetDto: CheckDuplicateAssetDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.checkDuplicateAsset(checkDuplicateAssetDto, options); + async checkDuplicateAsset(checkDuplicateAssetDto: CheckDuplicateAssetDto, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.checkDuplicateAsset(checkDuplicateAssetDto, key, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -4585,31 +4761,34 @@ export const AssetApiFp = function(configuration?: Configuration) { /** * * @param {string} assetId + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async downloadFile(assetId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.downloadFile(assetId, options); + async downloadFile(assetId: string, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.downloadFile(assetId, key, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * * @param {DownloadFilesDto} downloadFilesDto + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async downloadFiles(downloadFilesDto: DownloadFilesDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.downloadFiles(downloadFilesDto, options); + async downloadFiles(downloadFilesDto: DownloadFilesDto, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.downloadFiles(downloadFilesDto, key, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Current this is not used in any UI element * @param {number} [skip] + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async downloadLibrary(skip?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.downloadLibrary(skip, options); + async downloadLibrary(skip?: number, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.downloadLibrary(skip, key, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -4627,11 +4806,12 @@ export const AssetApiFp = function(configuration?: Configuration) { /** * Get a single asset\'s information * @param {string} assetId + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getAssetById(assetId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getAssetById(assetId, options); + async getAssetById(assetId: string, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAssetById(assetId, key, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -4676,11 +4856,12 @@ export const AssetApiFp = function(configuration?: Configuration) { * * @param {string} assetId * @param {ThumbnailFormat} [format] + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getAssetThumbnail(assetId: string, format?: ThumbnailFormat, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getAssetThumbnail(assetId, format, options); + async getAssetThumbnail(assetId: string, format?: ThumbnailFormat, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAssetThumbnail(assetId, format, key, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -4714,11 +4895,12 @@ export const AssetApiFp = function(configuration?: Configuration) { /** * * @param {RemoveAssetsDto} removeAssetsDto + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async removeAssetsFromSharedLink(removeAssetsDto: RemoveAssetsDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.removeAssetsFromSharedLink(removeAssetsDto, options); + async removeAssetsFromSharedLink(removeAssetsDto: RemoveAssetsDto, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.removeAssetsFromSharedLink(removeAssetsDto, key, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -4736,11 +4918,12 @@ export const AssetApiFp = function(configuration?: Configuration) { * @param {string} assetId * @param {boolean} [isThumb] * @param {boolean} [isWeb] + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async serveFile(assetId: string, isThumb?: boolean, isWeb?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.serveFile(assetId, isThumb, isWeb, options); + async serveFile(assetId: string, isThumb?: boolean, isWeb?: boolean, key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.serveFile(assetId, isThumb, isWeb, key, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -4764,14 +4947,15 @@ export const AssetApiFp = function(configuration?: Configuration) { * @param {string} fileModifiedAt * @param {boolean} isFavorite * @param {string} fileExtension + * @param {string} [key] * @param {any} [livePhotoData] * @param {boolean} [isVisible] * @param {string} [duration] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async uploadFile(assetType: AssetTypeEnum, assetData: any, deviceAssetId: string, deviceId: string, fileCreatedAt: string, fileModifiedAt: string, isFavorite: boolean, fileExtension: string, livePhotoData?: any, isVisible?: boolean, duration?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(assetType, assetData, deviceAssetId, deviceId, fileCreatedAt, fileModifiedAt, isFavorite, fileExtension, livePhotoData, isVisible, duration, options); + async uploadFile(assetType: AssetTypeEnum, assetData: any, deviceAssetId: string, deviceId: string, fileCreatedAt: string, fileModifiedAt: string, isFavorite: boolean, fileExtension: string, key?: string, livePhotoData?: any, isVisible?: boolean, duration?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(assetType, assetData, deviceAssetId, deviceId, fileCreatedAt, fileModifiedAt, isFavorite, fileExtension, key, livePhotoData, isVisible, duration, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } @@ -4787,20 +4971,22 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath /** * * @param {AddAssetsDto} addAssetsDto + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - addAssetsToSharedLink(addAssetsDto: AddAssetsDto, options?: any): AxiosPromise { - return localVarFp.addAssetsToSharedLink(addAssetsDto, options).then((request) => request(axios, basePath)); + addAssetsToSharedLink(addAssetsDto: AddAssetsDto, key?: string, options?: any): AxiosPromise { + return localVarFp.addAssetsToSharedLink(addAssetsDto, key, options).then((request) => request(axios, basePath)); }, /** * Check duplicated asset before uploading - for Web upload used * @param {CheckDuplicateAssetDto} checkDuplicateAssetDto + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - checkDuplicateAsset(checkDuplicateAssetDto: CheckDuplicateAssetDto, options?: any): AxiosPromise { - return localVarFp.checkDuplicateAsset(checkDuplicateAssetDto, options).then((request) => request(axios, basePath)); + checkDuplicateAsset(checkDuplicateAssetDto: CheckDuplicateAssetDto, key?: string, options?: any): AxiosPromise { + return localVarFp.checkDuplicateAsset(checkDuplicateAssetDto, key, options).then((request) => request(axios, basePath)); }, /** * Checks if multiple assets exist on the server and returns all existing - used by background backup @@ -4832,29 +5018,32 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath /** * * @param {string} assetId + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - downloadFile(assetId: string, options?: any): AxiosPromise { - return localVarFp.downloadFile(assetId, options).then((request) => request(axios, basePath)); + downloadFile(assetId: string, key?: string, options?: any): AxiosPromise { + return localVarFp.downloadFile(assetId, key, options).then((request) => request(axios, basePath)); }, /** * * @param {DownloadFilesDto} downloadFilesDto + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - downloadFiles(downloadFilesDto: DownloadFilesDto, options?: any): AxiosPromise { - return localVarFp.downloadFiles(downloadFilesDto, options).then((request) => request(axios, basePath)); + downloadFiles(downloadFilesDto: DownloadFilesDto, key?: string, options?: any): AxiosPromise { + return localVarFp.downloadFiles(downloadFilesDto, key, options).then((request) => request(axios, basePath)); }, /** * Current this is not used in any UI element * @param {number} [skip] + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - downloadLibrary(skip?: number, options?: any): AxiosPromise { - return localVarFp.downloadLibrary(skip, options).then((request) => request(axios, basePath)); + downloadLibrary(skip?: number, key?: string, options?: any): AxiosPromise { + return localVarFp.downloadLibrary(skip, key, options).then((request) => request(axios, basePath)); }, /** * Get all AssetEntity belong to the user @@ -4870,11 +5059,12 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath /** * Get a single asset\'s information * @param {string} assetId + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getAssetById(assetId: string, options?: any): AxiosPromise { - return localVarFp.getAssetById(assetId, options).then((request) => request(axios, basePath)); + getAssetById(assetId: string, key?: string, options?: any): AxiosPromise { + return localVarFp.getAssetById(assetId, key, options).then((request) => request(axios, basePath)); }, /** * @@ -4914,11 +5104,12 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath * * @param {string} assetId * @param {ThumbnailFormat} [format] + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getAssetThumbnail(assetId: string, format?: ThumbnailFormat, options?: any): AxiosPromise { - return localVarFp.getAssetThumbnail(assetId, format, options).then((request) => request(axios, basePath)); + getAssetThumbnail(assetId: string, format?: ThumbnailFormat, key?: string, options?: any): AxiosPromise { + return localVarFp.getAssetThumbnail(assetId, format, key, options).then((request) => request(axios, basePath)); }, /** * @@ -4948,11 +5139,12 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath /** * * @param {RemoveAssetsDto} removeAssetsDto + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - removeAssetsFromSharedLink(removeAssetsDto: RemoveAssetsDto, options?: any): AxiosPromise { - return localVarFp.removeAssetsFromSharedLink(removeAssetsDto, options).then((request) => request(axios, basePath)); + removeAssetsFromSharedLink(removeAssetsDto: RemoveAssetsDto, key?: string, options?: any): AxiosPromise { + return localVarFp.removeAssetsFromSharedLink(removeAssetsDto, key, options).then((request) => request(axios, basePath)); }, /** * @@ -4968,11 +5160,12 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath * @param {string} assetId * @param {boolean} [isThumb] * @param {boolean} [isWeb] + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - serveFile(assetId: string, isThumb?: boolean, isWeb?: boolean, options?: any): AxiosPromise { - return localVarFp.serveFile(assetId, isThumb, isWeb, options).then((request) => request(axios, basePath)); + serveFile(assetId: string, isThumb?: boolean, isWeb?: boolean, key?: string, options?: any): AxiosPromise { + return localVarFp.serveFile(assetId, isThumb, isWeb, key, options).then((request) => request(axios, basePath)); }, /** * Update an asset @@ -4994,14 +5187,15 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath * @param {string} fileModifiedAt * @param {boolean} isFavorite * @param {string} fileExtension + * @param {string} [key] * @param {any} [livePhotoData] * @param {boolean} [isVisible] * @param {string} [duration] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - uploadFile(assetType: AssetTypeEnum, assetData: any, deviceAssetId: string, deviceId: string, fileCreatedAt: string, fileModifiedAt: string, isFavorite: boolean, fileExtension: string, livePhotoData?: any, isVisible?: boolean, duration?: string, options?: any): AxiosPromise { - return localVarFp.uploadFile(assetType, assetData, deviceAssetId, deviceId, fileCreatedAt, fileModifiedAt, isFavorite, fileExtension, livePhotoData, isVisible, duration, options).then((request) => request(axios, basePath)); + uploadFile(assetType: AssetTypeEnum, assetData: any, deviceAssetId: string, deviceId: string, fileCreatedAt: string, fileModifiedAt: string, isFavorite: boolean, fileExtension: string, key?: string, livePhotoData?: any, isVisible?: boolean, duration?: string, options?: any): AxiosPromise { + return localVarFp.uploadFile(assetType, assetData, deviceAssetId, deviceId, fileCreatedAt, fileModifiedAt, isFavorite, fileExtension, key, livePhotoData, isVisible, duration, options).then((request) => request(axios, basePath)); }, }; }; @@ -5016,23 +5210,25 @@ export class AssetApi extends BaseAPI { /** * * @param {AddAssetsDto} addAssetsDto + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AssetApi */ - public addAssetsToSharedLink(addAssetsDto: AddAssetsDto, options?: AxiosRequestConfig) { - return AssetApiFp(this.configuration).addAssetsToSharedLink(addAssetsDto, options).then((request) => request(this.axios, this.basePath)); + public addAssetsToSharedLink(addAssetsDto: AddAssetsDto, key?: string, options?: AxiosRequestConfig) { + return AssetApiFp(this.configuration).addAssetsToSharedLink(addAssetsDto, key, options).then((request) => request(this.axios, this.basePath)); } /** * Check duplicated asset before uploading - for Web upload used * @param {CheckDuplicateAssetDto} checkDuplicateAssetDto + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AssetApi */ - public checkDuplicateAsset(checkDuplicateAssetDto: CheckDuplicateAssetDto, options?: AxiosRequestConfig) { - return AssetApiFp(this.configuration).checkDuplicateAsset(checkDuplicateAssetDto, options).then((request) => request(this.axios, this.basePath)); + public checkDuplicateAsset(checkDuplicateAssetDto: CheckDuplicateAssetDto, key?: string, options?: AxiosRequestConfig) { + return AssetApiFp(this.configuration).checkDuplicateAsset(checkDuplicateAssetDto, key, options).then((request) => request(this.axios, this.basePath)); } /** @@ -5071,34 +5267,37 @@ export class AssetApi extends BaseAPI { /** * * @param {string} assetId + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AssetApi */ - public downloadFile(assetId: string, options?: AxiosRequestConfig) { - return AssetApiFp(this.configuration).downloadFile(assetId, options).then((request) => request(this.axios, this.basePath)); + public downloadFile(assetId: string, key?: string, options?: AxiosRequestConfig) { + return AssetApiFp(this.configuration).downloadFile(assetId, key, options).then((request) => request(this.axios, this.basePath)); } /** * * @param {DownloadFilesDto} downloadFilesDto + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AssetApi */ - public downloadFiles(downloadFilesDto: DownloadFilesDto, options?: AxiosRequestConfig) { - return AssetApiFp(this.configuration).downloadFiles(downloadFilesDto, options).then((request) => request(this.axios, this.basePath)); + public downloadFiles(downloadFilesDto: DownloadFilesDto, key?: string, options?: AxiosRequestConfig) { + return AssetApiFp(this.configuration).downloadFiles(downloadFilesDto, key, options).then((request) => request(this.axios, this.basePath)); } /** * Current this is not used in any UI element * @param {number} [skip] + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AssetApi */ - public downloadLibrary(skip?: number, options?: AxiosRequestConfig) { - return AssetApiFp(this.configuration).downloadLibrary(skip, options).then((request) => request(this.axios, this.basePath)); + public downloadLibrary(skip?: number, key?: string, options?: AxiosRequestConfig) { + return AssetApiFp(this.configuration).downloadLibrary(skip, key, options).then((request) => request(this.axios, this.basePath)); } /** @@ -5117,12 +5316,13 @@ export class AssetApi extends BaseAPI { /** * Get a single asset\'s information * @param {string} assetId + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AssetApi */ - public getAssetById(assetId: string, options?: AxiosRequestConfig) { - return AssetApiFp(this.configuration).getAssetById(assetId, options).then((request) => request(this.axios, this.basePath)); + public getAssetById(assetId: string, key?: string, options?: AxiosRequestConfig) { + return AssetApiFp(this.configuration).getAssetById(assetId, key, options).then((request) => request(this.axios, this.basePath)); } /** @@ -5171,12 +5371,13 @@ export class AssetApi extends BaseAPI { * * @param {string} assetId * @param {ThumbnailFormat} [format] + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AssetApi */ - public getAssetThumbnail(assetId: string, format?: ThumbnailFormat, options?: AxiosRequestConfig) { - return AssetApiFp(this.configuration).getAssetThumbnail(assetId, format, options).then((request) => request(this.axios, this.basePath)); + public getAssetThumbnail(assetId: string, format?: ThumbnailFormat, key?: string, options?: AxiosRequestConfig) { + return AssetApiFp(this.configuration).getAssetThumbnail(assetId, format, key, options).then((request) => request(this.axios, this.basePath)); } /** @@ -5213,12 +5414,13 @@ export class AssetApi extends BaseAPI { /** * * @param {RemoveAssetsDto} removeAssetsDto + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AssetApi */ - public removeAssetsFromSharedLink(removeAssetsDto: RemoveAssetsDto, options?: AxiosRequestConfig) { - return AssetApiFp(this.configuration).removeAssetsFromSharedLink(removeAssetsDto, options).then((request) => request(this.axios, this.basePath)); + public removeAssetsFromSharedLink(removeAssetsDto: RemoveAssetsDto, key?: string, options?: AxiosRequestConfig) { + return AssetApiFp(this.configuration).removeAssetsFromSharedLink(removeAssetsDto, key, options).then((request) => request(this.axios, this.basePath)); } /** @@ -5237,12 +5439,13 @@ export class AssetApi extends BaseAPI { * @param {string} assetId * @param {boolean} [isThumb] * @param {boolean} [isWeb] + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AssetApi */ - public serveFile(assetId: string, isThumb?: boolean, isWeb?: boolean, options?: AxiosRequestConfig) { - return AssetApiFp(this.configuration).serveFile(assetId, isThumb, isWeb, options).then((request) => request(this.axios, this.basePath)); + public serveFile(assetId: string, isThumb?: boolean, isWeb?: boolean, key?: string, options?: AxiosRequestConfig) { + return AssetApiFp(this.configuration).serveFile(assetId, isThumb, isWeb, key, options).then((request) => request(this.axios, this.basePath)); } /** @@ -5267,6 +5470,7 @@ export class AssetApi extends BaseAPI { * @param {string} fileModifiedAt * @param {boolean} isFavorite * @param {string} fileExtension + * @param {string} [key] * @param {any} [livePhotoData] * @param {boolean} [isVisible] * @param {string} [duration] @@ -5274,8 +5478,8 @@ export class AssetApi extends BaseAPI { * @throws {RequiredError} * @memberof AssetApi */ - public uploadFile(assetType: AssetTypeEnum, assetData: any, deviceAssetId: string, deviceId: string, fileCreatedAt: string, fileModifiedAt: string, isFavorite: boolean, fileExtension: string, livePhotoData?: any, isVisible?: boolean, duration?: string, options?: AxiosRequestConfig) { - return AssetApiFp(this.configuration).uploadFile(assetType, assetData, deviceAssetId, deviceId, fileCreatedAt, fileModifiedAt, isFavorite, fileExtension, livePhotoData, isVisible, duration, options).then((request) => request(this.axios, this.basePath)); + public uploadFile(assetType: AssetTypeEnum, assetData: any, deviceAssetId: string, deviceId: string, fileCreatedAt: string, fileModifiedAt: string, isFavorite: boolean, fileExtension: string, key?: string, livePhotoData?: any, isVisible?: boolean, duration?: string, options?: AxiosRequestConfig) { + return AssetApiFp(this.configuration).uploadFile(assetType, assetData, deviceAssetId, deviceId, fileCreatedAt, fileModifiedAt, isFavorite, fileExtension, key, livePhotoData, isVisible, duration, options).then((request) => request(this.axios, this.basePath)); } } @@ -5346,6 +5550,8 @@ export const AuthenticationApiAxiosParamCreator = function (configuration?: Conf // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -5413,6 +5619,12 @@ export const AuthenticationApiAxiosParamCreator = function (configuration?: Conf const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -5446,6 +5658,8 @@ export const AuthenticationApiAxiosParamCreator = function (configuration?: Conf // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -5664,6 +5878,8 @@ export const DeviceInfoApiAxiosParamCreator = function (configuration?: Configur // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -5768,6 +5984,8 @@ export const JobApiAxiosParamCreator = function (configuration?: Configuration) // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -5808,6 +6026,8 @@ export const JobApiAxiosParamCreator = function (configuration?: Configuration) // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -6011,6 +6231,12 @@ export const OAuthApiAxiosParamCreator = function (configuration?: Configuration const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + // authentication cookie required + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -6072,6 +6298,12 @@ export const OAuthApiAxiosParamCreator = function (configuration?: Configuration const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -6341,6 +6573,12 @@ export const ServerInfoApiAxiosParamCreator = function (configuration?: Configur const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -6552,6 +6790,12 @@ export const ShareApiAxiosParamCreator = function (configuration?: Configuration const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + // authentication cookie required + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -6584,6 +6828,12 @@ export const ShareApiAxiosParamCreator = function (configuration?: Configuration const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -6597,10 +6847,11 @@ export const ShareApiAxiosParamCreator = function (configuration?: Configuration }, /** * + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getMySharedLink: async (options: AxiosRequestConfig = {}): Promise => { + getMySharedLink: async (key?: string, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/share/me`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -6613,6 +6864,16 @@ export const ShareApiAxiosParamCreator = function (configuration?: Configuration const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + // authentication cookie required + + if (key !== undefined) { + localVarQueryParameter['key'] = key; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -6646,6 +6907,12 @@ export const ShareApiAxiosParamCreator = function (configuration?: Configuration const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -6679,6 +6946,12 @@ export const ShareApiAxiosParamCreator = function (configuration?: Configuration const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -6722,11 +6995,12 @@ export const ShareApiFp = function(configuration?: Configuration) { }, /** * + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getMySharedLink(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getMySharedLink(options); + async getMySharedLink(key?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getMySharedLink(key, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -6779,11 +7053,12 @@ export const ShareApiFactory = function (configuration?: Configuration, basePath }, /** * + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getMySharedLink(options?: any): AxiosPromise { - return localVarFp.getMySharedLink(options).then((request) => request(axios, basePath)); + getMySharedLink(key?: string, options?: any): AxiosPromise { + return localVarFp.getMySharedLink(key, options).then((request) => request(axios, basePath)); }, /** * @@ -6837,12 +7112,13 @@ export class ShareApi extends BaseAPI { /** * + * @param {string} [key] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ShareApi */ - public getMySharedLink(options?: AxiosRequestConfig) { - return ShareApiFp(this.configuration).getMySharedLink(options).then((request) => request(this.axios, this.basePath)); + public getMySharedLink(key?: string, options?: AxiosRequestConfig) { + return ShareApiFp(this.configuration).getMySharedLink(key, options).then((request) => request(this.axios, this.basePath)); } /** @@ -6897,6 +7173,8 @@ export const SystemConfigApiAxiosParamCreator = function (configuration?: Config // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -6930,6 +7208,8 @@ export const SystemConfigApiAxiosParamCreator = function (configuration?: Config // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -6963,6 +7243,8 @@ export const SystemConfigApiAxiosParamCreator = function (configuration?: Config // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -6999,6 +7281,8 @@ export const SystemConfigApiAxiosParamCreator = function (configuration?: Config // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -7184,6 +7468,12 @@ export const TagApiAxiosParamCreator = function (configuration?: Configuration) const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -7216,6 +7506,12 @@ export const TagApiAxiosParamCreator = function (configuration?: Configuration) const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + // authentication cookie required + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -7248,6 +7544,12 @@ export const TagApiAxiosParamCreator = function (configuration?: Configuration) const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -7281,6 +7583,12 @@ export const TagApiAxiosParamCreator = function (configuration?: Configuration) const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -7317,6 +7625,12 @@ export const TagApiAxiosParamCreator = function (configuration?: Configuration) const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + // authentication cookie required + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -7545,6 +7859,8 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + if (file !== undefined) { localVarFormParams.append('file', file as any); @@ -7588,6 +7904,8 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -7628,6 +7946,8 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -7664,6 +7984,8 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + if (isAll !== undefined) { localVarQueryParameter['isAll'] = isAll; } @@ -7701,6 +8023,8 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -7838,6 +8162,8 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -7874,6 +8200,8 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + // authentication cookie required + localVarHeaderParameter['Content-Type'] = 'application/json'; diff --git a/web/src/lib/components/album-page/__tests__/album-card.spec.ts b/web/src/lib/components/album-page/__tests__/album-card.spec.ts index 61706ebf05..411d3fbfe3 100644 --- a/web/src/lib/components/album-page/__tests__/album-card.spec.ts +++ b/web/src/lib/components/album-page/__tests__/album-card.spec.ts @@ -93,6 +93,7 @@ describe('AlbumCard component', () => { expect(apiMock.assetApi.getAssetThumbnail).toHaveBeenCalledWith( 'thumbnailIdOne', ThumbnailFormat.Jpeg, + undefined, { responseType: 'blob' } ); expect(createObjectURLMock).toHaveBeenCalledWith(thumbnailBlob); diff --git a/web/src/lib/components/album-page/album-card.svelte b/web/src/lib/components/album-page/album-card.svelte index 0dedd6a781..584faf0692 100644 --- a/web/src/lib/components/album-page/album-card.svelte +++ b/web/src/lib/components/album-page/album-card.svelte @@ -34,9 +34,14 @@ return; } - const { data } = await api.assetApi.getAssetThumbnail(thubmnailId, ThumbnailFormat.Jpeg, { - responseType: 'blob' - }); + const { data } = await api.assetApi.getAssetThumbnail( + thubmnailId, + ThumbnailFormat.Jpeg, + undefined, + { + responseType: 'blob' + } + ); if (data instanceof Blob) { return URL.createObjectURL(data); diff --git a/web/src/lib/components/album-page/album-viewer.svelte b/web/src/lib/components/album-page/album-viewer.svelte index 228760e24d..558b1a9574 100644 --- a/web/src/lib/components/album-page/album-viewer.svelte +++ b/web/src/lib/components/album-page/album-viewer.svelte @@ -170,11 +170,7 @@ { assetIds: assets.map((a) => a.id) }, - { - params: { - key: sharedLink?.key - } - } + sharedLink?.key ); if (data.album) { @@ -269,10 +265,8 @@ const { data, status, headers } = await api.albumApi.downloadArchive( album.id, skip || undefined, + sharedLink?.key, { - params: { - key: sharedLink?.key - }, responseType: 'blob', onDownloadProgress: function (progressEvent) { const request = this as XMLHttpRequest; diff --git a/web/src/lib/components/asset-viewer/asset-viewer.svelte b/web/src/lib/components/asset-viewer/asset-viewer.svelte index d06016b4d6..4197d73265 100644 --- a/web/src/lib/components/asset-viewer/asset-viewer.svelte +++ b/web/src/lib/components/asset-viewer/asset-viewer.svelte @@ -145,8 +145,7 @@ $downloadAssets[imageFileName] = 0; - const { data, status } = await api.assetApi.downloadFile(assetId, { - params: { key }, + const { data, status } = await api.assetApi.downloadFile(assetId, key, { responseType: 'blob', onDownloadProgress: (progressEvent) => { if (progressEvent.lengthComputable) { diff --git a/web/src/lib/components/asset-viewer/photo-viewer.svelte b/web/src/lib/components/asset-viewer/photo-viewer.svelte index c3f8094920..875a3ba221 100644 --- a/web/src/lib/components/asset-viewer/photo-viewer.svelte +++ b/web/src/lib/components/asset-viewer/photo-viewer.svelte @@ -26,10 +26,7 @@ const loadAssetData = async () => { try { - const { data } = await api.assetApi.serveFile(asset.id, false, true, { - params: { - key: publicSharedKey - }, + const { data } = await api.assetApi.serveFile(asset.id, false, true, publicSharedKey, { responseType: 'blob' }); diff --git a/web/src/lib/components/share-page/individual-shared-viewer.svelte b/web/src/lib/components/share-page/individual-shared-viewer.svelte index 50aaec3ca5..be588209ab 100644 --- a/web/src/lib/components/share-page/individual-shared-viewer.svelte +++ b/web/src/lib/components/share-page/individual-shared-viewer.svelte @@ -54,11 +54,7 @@ { assetIds }, - { - params: { - key: sharedLink?.key - } - } + sharedLink?.key ); notificationController.show({ @@ -76,11 +72,7 @@ { assetIds: assets.filter((a) => !selectedAssets.has(a)).map((a) => a.id) }, - { - params: { - key: sharedLink?.key - } - } + sharedLink?.key ); assets = assets.filter((a) => !selectedAssets.has(a)); diff --git a/web/src/lib/components/sharing-page/shared-album-list-tile.svelte b/web/src/lib/components/sharing-page/shared-album-list-tile.svelte index 2bdab95c65..5cb5deeb7f 100644 --- a/web/src/lib/components/sharing-page/shared-album-list-tile.svelte +++ b/web/src/lib/components/sharing-page/shared-album-list-tile.svelte @@ -11,9 +11,14 @@ return noThumbnailUrl; } - const { data } = await api.assetApi.getAssetThumbnail(thubmnailId, ThumbnailFormat.Webp, { - responseType: 'blob' - }); + const { data } = await api.assetApi.getAssetThumbnail( + thubmnailId, + ThumbnailFormat.Webp, + undefined, + { + responseType: 'blob' + } + ); if (data instanceof Blob) { return URL.createObjectURL(data); } diff --git a/web/src/lib/utils/asset-utils.ts b/web/src/lib/utils/asset-utils.ts index dc13c4f959..043b0ee4ce 100644 --- a/web/src/lib/utils/asset-utils.ts +++ b/web/src/lib/utils/asset-utils.ts @@ -18,19 +18,17 @@ export const addAssetsToAlbum = async ( assetIds: Array, key: string | undefined = undefined ): Promise => - api.albumApi - .addAssetsToAlbum(albumId, { assetIds }, { params: { key } }) - .then(({ data: dto }) => { - if (dto.successfullyAdded > 0) { - // This might be 0 if the user tries to add an asset that is already in the album - notificationController.show({ - message: `Added ${dto.successfullyAdded} to ${dto.album?.albumName}`, - type: NotificationType.Info - }); - } + api.albumApi.addAssetsToAlbum(albumId, { assetIds }, key).then(({ data: dto }) => { + if (dto.successfullyAdded > 0) { + // This might be 0 if the user tries to add an asset that is already in the album + notificationController.show({ + message: `Added ${dto.successfullyAdded} to ${dto.album?.albumName}`, + type: NotificationType.Info + }); + } - return dto; - }); + return dto; + }); export async function bulkDownload( fileName: string, @@ -53,24 +51,20 @@ export async function bulkDownload( let total = 0; - const { data, status, headers } = await api.assetApi.downloadFiles( - { assetIds }, - { - params: { key }, - responseType: 'blob', - onDownloadProgress: function (progressEvent) { - const request = this as XMLHttpRequest; - if (!total) { - total = Number(request.getResponseHeader('X-Immich-Content-Length-Hint')) || 0; - } + const { data, status, headers } = await api.assetApi.downloadFiles({ assetIds }, key, { + responseType: 'blob', + onDownloadProgress: function (progressEvent) { + const request = this as XMLHttpRequest; + if (!total) { + total = Number(request.getResponseHeader('X-Immich-Content-Length-Hint')) || 0; + } - if (total) { - const current = progressEvent.loaded; - downloadAssets.set({ [downloadFileName]: Math.floor((current / total) * 100) }); - } + if (total) { + const current = progressEvent.loaded; + downloadAssets.set({ [downloadFileName]: Math.floor((current / total) * 100) }); } } - ); + }); const isNotComplete = headers['x-immich-archive-complete'] === 'false'; const fileCount = Number(headers['x-immich-archive-file-count']) || 0; diff --git a/web/src/lib/utils/file-uploader.ts b/web/src/lib/utils/file-uploader.ts index 3d3529d5a4..bad793e5da 100644 --- a/web/src/lib/utils/file-uploader.ts +++ b/web/src/lib/utils/file-uploader.ts @@ -108,11 +108,7 @@ async function fileUploader( deviceAssetId: String(deviceAssetId), deviceId: 'WEB' }, - { - params: { - key: sharedKey - } - } + sharedKey ); if (status === 200 && data.isExist && data.id) { diff --git a/web/src/routes/share/[key]/+page.server.ts b/web/src/routes/share/[key]/+page.server.ts index 199f338cc0..e89ce1eea5 100644 --- a/web/src/routes/share/[key]/+page.server.ts +++ b/web/src/routes/share/[key]/+page.server.ts @@ -12,7 +12,7 @@ export const load: PageServerLoad = async ({ params, parent }) => { const { key } = params; try { - const { data: sharedLink } = await api.shareApi.getMySharedLink({ params: { key } }); + const { data: sharedLink } = await api.shareApi.getMySharedLink(key); const assetCount = sharedLink.assets.length; const assetId = sharedLink.album?.albumThumbnailAssetId || sharedLink.assets[0]?.id; diff --git a/web/src/routes/share/[key]/photos/[assetId]/+page.server.ts b/web/src/routes/share/[key]/photos/[assetId]/+page.server.ts index 90d7722201..5e17efb180 100644 --- a/web/src/routes/share/[key]/photos/[assetId]/+page.server.ts +++ b/web/src/routes/share/[key]/photos/[assetId]/+page.server.ts @@ -7,9 +7,7 @@ import type { PageServerLoad } from './$types'; export const load: PageServerLoad = async ({ params }) => { try { const { key, assetId } = params; - const { data: asset } = await api.assetApi.getAssetById(assetId, { - params: { key } - }); + const { data: asset } = await api.assetApi.getAssetById(assetId, key); if (!asset) { return error(404, 'Asset not found');